ci: GHCR docker build for Lite branch + compose updates
- .github/workflows/docker-lite.yml: build & push ghcr.io/lezi-fun/ forumlify-deploy:lite on Lite branch push (linux/amd64+arm64) - docker-compose.yml: pull :lite image from GHCR, add PORT / ENABLE_ CAPTCHA env, restart: unless-stopped on both services
This commit is contained in:
1 parent
8f88f803f5
commit
9e407d0a2d
1532 files changed
+645187
-1
No files matched your search
@@ -0,0 +1,80 @@
|
||||
module.exports = [
|
||||
"[externals]/module [external] (module, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("module", () => require("module"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/next/dist/compiled/@opentelemetry/api [external] (next/dist/compiled/@opentelemetry/api, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/compiled/@opentelemetry/api", () => require("next/dist/compiled/@opentelemetry/api"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/next/dist/compiled/next-server/app-page-turbo.runtime.dev.js [external] (next/dist/compiled/next-server/app-page-turbo.runtime.dev.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/compiled/next-server/app-page-turbo.runtime.dev.js", () => require("next/dist/compiled/next-server/app-page-turbo.runtime.dev.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/next/dist/server/app-render/action-async-storage.external.js [external] (next/dist/server/app-render/action-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/server/app-render/action-async-storage.external.js", () => require("next/dist/server/app-render/action-async-storage.external.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/next/dist/server/app-render/after-task-async-storage.external.js [external] (next/dist/server/app-render/after-task-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/server/app-render/after-task-async-storage.external.js", () => require("next/dist/server/app-render/after-task-async-storage.external.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/next/dist/server/app-render/dynamic-access-async-storage.external.js [external] (next/dist/server/app-render/dynamic-access-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/server/app-render/dynamic-access-async-storage.external.js", () => require("next/dist/server/app-render/dynamic-access-async-storage.external.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/server/app-render/work-async-storage.external.js", () => require("next/dist/server/app-render/work-async-storage.external.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external] (next/dist/server/app-render/work-unit-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/server/app-render/work-unit-async-storage.external.js", () => require("next/dist/server/app-render/work-unit-async-storage.external.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/next/dist/server/runtime-reacts.external.js [external] (next/dist/server/runtime-reacts.external.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/server/runtime-reacts.external.js", () => require("next/dist/server/runtime-reacts.external.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/node:stream [external] (node:stream, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("node:stream", () => require("node:stream"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/node:zlib [external] (node:zlib, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("node:zlib", () => require("node:zlib"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/path [external] (path, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("path", () => require("path"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/util [external] (util, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("util", () => require("util"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
];
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": []
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
module.exports = [
|
||||
"[externals]/next/dist/shared/lib/no-fallback-error.external.js [external] (next/dist/shared/lib/no-fallback-error.external.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/shared/lib/no-fallback-error.external.js", () => require("next/dist/shared/lib/no-fallback-error.external.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/node:stream [external] (node:stream, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("node:stream", () => require("node:stream"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
];
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": []
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
module.exports = [
|
||||
"[externals]/next/dist/compiled/@opentelemetry/api [external] (next/dist/compiled/@opentelemetry/api, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/compiled/@opentelemetry/api", () => require("next/dist/compiled/@opentelemetry/api"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/next/dist/compiled/next-server/pages-turbo.runtime.dev.js [external] (next/dist/compiled/next-server/pages-turbo.runtime.dev.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/compiled/next-server/pages-turbo.runtime.dev.js", () => require("next/dist/compiled/next-server/pages-turbo.runtime.dev.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/path [external] (path, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("path", () => require("path"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/react [external] (react, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("react", () => require("react"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/react/jsx-runtime [external] (react/jsx-runtime, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("react/jsx-runtime", () => require("react/jsx-runtime"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
];
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": []
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 46, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/CustomCssLoader.js"],"sourcesContent":["'use client';\n\n// 加载自定义 CSS(管理员上传的 style.css,覆盖默认样式)\nimport { useEffect } from 'react';\n\nexport default function CustomCssLoader() {\n useEffect(() => {\n // 尝试加载 /api/custom-css;404 表示未设置,静默跳过\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = '/api/custom-css';\n link.id = 'custom-css-link';\n document.head.appendChild(link);\n }, []);\n\n return null;\n}\n"],"names":["CustomCssLoader","link","document","createElement","rel","href","id","head","appendChild"],"mappings":";;;;AAEA,qCAAqC;AACrC;AAHA;;AAKe,SAASA;IACtB,IAAA,kNAAS,EAAC;QACR,sCAAsC;QACtC,MAAMC,OAAOC,SAASC,aAAa,CAAC;QACpCF,KAAKG,GAAG,GAAG;QACXH,KAAKI,IAAI,GAAG;QACZJ,KAAKK,EAAE,GAAG;QACVJ,SAASK,IAAI,CAACC,WAAW,CAACP;IAC5B,GAAG,EAAE;IAEL,OAAO;AACT"}},
|
||||
{"offset": {"line": 69, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/I18nInit.js"],"sourcesContent":["'use client';\n\n// i18n 客户端 Provider:在 children 渲染前同步初始化 i18n\n// - lng 由 Server Component(layout)从 cookie / Accept-Language 推导传入\n// - 同步 init(initImmediate:false)→ SSR 与客户端首次渲染语言一致,无 hydration mismatch\nimport { initI18n } from '@/lib/i18n';\n\nexport default function I18nProvider({ lng, children }) {\n // 函数体在 children 渲染前执行:useTranslation 组件拿到已初始化的 i18n\n initI18n(lng);\n return <>{children}</>;\n}\n"],"names":["I18nProvider","lng","children"],"mappings":";;;;;AAEA,6CAA6C;AAC7C,kEAAkE;AAClE,wEAAwE;AACxE;AALA;;;AAOe,SAASA,aAAa,EAAEC,GAAG,EAAEC,QAAQ,EAAE;IACpD,oDAAoD;IACpD,IAAA,uHAAQ,EAACD;IACT,qBAAO;kBAAGC;;;;;;AACZ"}},
|
||||
{"offset": {"line": 96, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Icons.js"],"sourcesContent":["'use client';\n\n// 图标库 — SVG 内容逐字符提取自旧版 index.html (Feather Icons),与原版一致\nconst S = {\n xmlns: 'http://www.w3.org/2000/svg', width: 16, height: 16, viewBox: '0 0 24 24',\n fill: 'none', stroke: 'currentColor', strokeWidth: 2, strokeLinecap: 'round', strokeLinejoin: 'round',\n style: { display: 'inline', verticalAlign: 'middle' },\n};\n\nexport function Icon({ name, size = 16, ...rest }) {\n return <svg {...S} width={size} height={size} {...rest}>{PATHS[name] || null}</svg>;\n}\n\nconst PATHS = {\n message: (\n <>\n <path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\"/>\n </>\n ),\n reply: (\n <>\n <path d=\"M9 14l-4-4 4-4\"/><path d=\"M5 10h11a4 4 0 0 1 4 4v0\"/>\n </>\n ),\n chevronDown: (\n <>\n <path d=\"M6 9l6 6 6-6\"/>\n </>\n ),\n settings: (\n <>\n <path d=\"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>\n </>\n ),\n shieldAlert: (\n <>\n <path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"/><path d=\"M12 8v4\"/><path d=\"M12 16h.01\"/>\n </>\n ),\n user: (\n <>\n <path d=\"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/>\n </>\n ),\n lock: (\n <>\n <rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/>\n </>\n ),\n moon: (\n <>\n <path d=\"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z\"/>\n </>\n ),\n sun: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"5\"/><line x1=\"12\" y1=\"1\" x2=\"12\" y2=\"3\"/><line x1=\"12\" y1=\"21\" x2=\"12\" y2=\"23\"/><line x1=\"4.22\" y1=\"4.22\" x2=\"5.64\" y2=\"5.64\"/><line x1=\"18.36\" y1=\"18.36\" x2=\"19.78\" y2=\"19.78\"/><line x1=\"1\" y1=\"12\" x2=\"3\" y2=\"12\"/><line x1=\"21\" y1=\"12\" x2=\"23\" y2=\"12\"/><line x1=\"4.22\" y1=\"19.78\" x2=\"5.64\" y2=\"18.36\"/><line x1=\"18.36\" y1=\"5.64\" x2=\"19.78\" y2=\"4.22\"/>\n </>\n ),\n logout: (\n <>\n <path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\"/><polyline points=\"16 17 21 12 16 7\"/><line x1=\"21\" y1=\"12\" x2=\"9\" y2=\"12\"/>\n </>\n ),\n book: (\n <>\n <path d=\"M21 12V7H5a2 2 0 0 1 0-4h14v4\"/><path d=\"M3 5v14a2 2 0 0 0 2 2h16v-5\"/><line x1=\"18\" y1=\"12\" x2=\"18\" y2=\"12\"/>\n </>\n ),\n link: (\n <>\n <path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/>\n </>\n ),\n plus: (\n <>\n <line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"/><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"/>\n </>\n ),\n shield: (\n <>\n <path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"/>\n </>\n ),\n users: (\n <>\n <path d=\"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2\"/><circle cx=\"9\" cy=\"7\" r=\"4\"/><path d=\"M23 21v-2a4 4 0 0 0-3-3.87\"/><path d=\"M16 3.13a4 4 0 0 1 0 7.75\"/>\n </>\n ),\n file: (\n <>\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"/><polyline points=\"14 2 14 8 20 8\"/><line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"/><line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"/><polyline points=\"10 9 9 9 8 9\"/>\n </>\n ),\n plus2: (\n <>\n <path d=\"M12 5v14\"/><path d=\"M5 12h14\"/>\n </>\n ),\n back: (\n <>\n <polyline points=\"15 18 9 12 15 6\"/>\n </>\n ),\n close: (\n <>\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/>\n </>\n ),\n trash: (\n <>\n <polyline points=\"3 6 5 6 21 6\"/><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/>\n </>\n ),\n success: (\n <>\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"/><polyline points=\"22 4 12 14.01 9 11.01\"/>\n </>\n ),\n error: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"/><line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"/>\n </>\n ),\n warning: (\n <>\n <path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/><circle cx=\"12\" cy=\"12\" r=\"10\"/>\n </>\n ),\n pending: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/>\n </>\n ),\n edit: (\Line truncated
|
||||
{"offset": {"line": 1241, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Toast.js"],"sourcesContent":["'use client';\n\n// Toast 通知系统:右上角弹出,自动消失(替代 alert)\n// 用法:const { toast } = useToast(); toast('发布成功', 'success');\n// 注意:不用 createPortal(SSR 时 document 不存在会造成 hydration mismatch,\n// 导致整树重建)。toast-container 是 position:fixed,渲染位置不影响视觉。\nimport { createContext, useContext, useState, useCallback, useRef, useEffect } from 'react';\nimport { Icon } from './Icons';\n\nconst ToastContext = createContext(null);\n\nexport function useToast() {\n return useContext(ToastContext);\n}\n\nlet idCounter = 0;\n\nexport function ToastProvider({ children }) {\n const [toasts, setToasts] = useState([]);\n const [dialog, setDialog] = useState(null);\n const timersRef = useRef({});\n const dialogTimerRef = useRef(null);\n const dialogResolverRef = useRef(null);\n\n const removeToast = useCallback((id) => {\n setToasts((prev) => prev.filter((item) => item.id !== id));\n delete timersRef.current[id];\n }, []);\n\n const dismiss = useCallback((id) => {\n if (timersRef.current[id]) clearTimeout(timersRef.current[id]);\n setToasts((prev) => prev.map((item) => item.id === id ? { ...item, closing: true } : item));\n timersRef.current[id] = setTimeout(() => removeToast(id), 220);\n }, [removeToast]);\n\n const toast = useCallback((message, type = 'success', duration = 3000) => {\n const id = ++idCounter;\n setToasts((prev) => [...prev, { id, message, type, closing: false }]);\n if (timersRef.current[id]) clearTimeout(timersRef.current[id]);\n timersRef.current[id] = setTimeout(() => dismiss(id), duration);\n }, [dismiss]);\n\n const confirmAction = useCallback((message, options = {}) => {\n if (dialogResolverRef.current) dialogResolverRef.current(false);\n const isEnglish = localStorage.getItem('forumlify-lang') === 'en';\n setDialog({\n message,\n title: options.title || (isEnglish ? 'Confirm action' : '确认操作'),\n confirmLabel: options.confirmLabel || (isEnglish ? 'Confirm' : '确定'),\n cancelLabel: options.cancelLabel || (isEnglish ? 'Cancel' : '取消'),\n danger: options.danger !== false,\n closing: false,\n });\n return new Promise((resolve) => {\n dialogResolverRef.current = resolve;\n });\n }, []);\n\n const closeDialog = useCallback((result) => {\n setDialog((current) => current ? { ...current, closing: true } : current);\n if (dialogTimerRef.current) clearTimeout(dialogTimerRef.current);\n dialogTimerRef.current = setTimeout(() => {\n setDialog(null);\n const resolve = dialogResolverRef.current;\n dialogResolverRef.current = null;\n if (resolve) resolve(result);\n }, 340);\n }, []);\n\n useEffect(() => () => {\n Object.values(timersRef.current).forEach(clearTimeout);\n if (dialogTimerRef.current) clearTimeout(dialogTimerRef.current);\n if (dialogResolverRef.current) dialogResolverRef.current(false);\n }, []);\n\n return (\n <ToastContext.Provider value={{ toast, confirmAction }}>\n {children}\n <div className=\"toast-container\">\n {toasts.map((t) => (\n <div key={t.id} className={'toast toast-' + t.type + (t.closing ? ' closing' : '')} onClick={() => dismiss(t.id)} role=\"status\">\n <Icon name={t.type === 'error' ? 'error' : t.type === 'warning' ? 'warning' : 'success'} size={16} />\n <span>{t.message}</span>\n </div>\n ))}\n </div>\n {dialog && (\n <div className={'modal active feedback-confirm' + (dialog.closing ? ' closing' : '')} onClick={(e) => { if (e.target === e.currentTarget) closeDialog(false); }}>\n <div className=\"modal-content\" role=\"alertdialog\" aria-modal=\"true\" aria-labelledby=\"feedbackConfirmTitle\" aria-describedby=\"feedbackConfirmMessage\">\n <h2 id=\"feedbackConfirmTitle\"><Icon name=\"warning\" size={20} /> {dialog.title}</h2>\n <p id=\"feedbackConfirmMessage\">{dialog.message}</p>\n <div className=\"feedback-confirm-actions\">\n <button className={dialog.danger ? 'btn-danger' : 'btn-primary'} onClick={() => closeDialog(true)}>{dialog.confirmLabel}</button>\n <button className=\"btn-secondary\" onClick={() => closeDialog(false)}>{dialog.cancelLabel}</button>\n </div>\n </div>\n </div>\n )}\n </ToastContext.Provider>\n );\n}\n"],"names":["ToastContext","useToast","idCounter","ToastProvider","children","toasts","setToasts","dialog","setDialog","timersRef","dialogTimerRef","dialogResolverRef","removeToast","id","prev","filter","item","current","dismiss","clearTimeout","map","closing","setTimeout","toast","message","type","duration","confirmAction","options","isEnglish","localStorage","getItem","tiLine truncated
|
||||
{"offset": {"line": 1460, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/lib/i18n.js"],"sourcesContent":["'use client';\n\n// i18n 配置:i18next + react-i18next\n// - initI18n(lng?):可传入初始语言(SSR 从 cookie/浏览器偏好推导),\n// 无传入时按 localStorage > 浏览器语言 > zh 自动选择\n// - 顶层模块加载时不 init(由 I18nInit 在客户端 useEffect 调用),\n// 保证 SSR/客户端首次渲染语言一致 → 无 hydration mismatch\nimport i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport zh from '@/locales/zh.json';\nimport en from '@/locales/en.json';\n\nlet initialized = false;\n\nexport function initI18n(lng) {\n if (initialized) {\n // 已初始化:如果外部给了不同语言(如路由跳转后 cookie 变化)则切换\n if (lng && i18n.language !== lng) i18n.changeLanguage(lng);\n return i18n;\n }\n initialized = true;\n if (!lng && typeof window !== 'undefined') {\n const saved = localStorage.getItem('forumlify-lang');\n const nav = (navigator.language || 'zh').toLowerCase();\n lng = saved || (nav.startsWith('en') ? 'en' : 'zh');\n }\n i18n.use(initReactI18next).init({\n resources: {\n zh: { translation: zh },\n en: { translation: en },\n },\n lng: lng || 'zh',\n fallbackLng: 'zh',\n interpolation: { escapeValue: false },\n react: { useSuspense: false },\n initImmediate: false,\n });\n return i18n;\n}\n\n// 切换语言(保存到 localStorage + cookie,SSR 首帧即用正确语言)\nexport function setAppLanguage(lng) {\n if (typeof window !== 'undefined') {\n localStorage.setItem('forumlify-lang', lng);\n document.cookie = 'forumlify-lang=' + lng + '; path=/; max-age=31536000';\n }\n return i18n.changeLanguage(lng);\n}\n"],"names":["initialized","initI18n","lng","language","changeLanguage","use","init","resources","zh","translation","en","fallbackLng","interpolation","escapeValue","react","useSuspense","initImmediate","setAppLanguage"],"mappings":";;;;;;AAEA,kCAAkC;AAClC,kDAAkD;AAClD,yCAAyC;AACzC,iDAAiD;AACjD,8CAA8C;AAC9C;AACA;AAAA;AACA;AACA;AAVA;;;;;AAYA,IAAIA,cAAc;AAEX,SAASC,SAASC,GAAG;IAC1B,IAAIF,aAAa;QACf,uCAAuC;QACvC,IAAIE,OAAO,4JAAI,CAACC,QAAQ,KAAKD,KAAK,4JAAI,CAACE,cAAc,CAACF;QACtD,OAAO,4JAAI;IACb;IACAF,cAAc;IACd;;IAKA,4JAAI,CAACK,GAAG,CAAC,sLAAgB,EAAEC,IAAI,CAAC;QAC9BC,WAAW;YACTC,IAAI;gBAAEC,aAAa,6IAAE;YAAC;YACtBC,IAAI;gBAAED,aAAa,6IAAE;YAAC;QACxB;QACAP,KAAKA,OAAO;QACZS,aAAa;QACbC,eAAe;YAAEC,aAAa;QAAM;QACpCC,OAAO;YAAEC,aAAa;QAAM;QAC5BC,eAAe;IACjB;IACA,OAAO,4JAAI;AACb;AAGO,SAASC,eAAef,GAAG;IAChC;;IAIA,OAAO,4JAAI,CAACE,cAAc,CAACF;AAC7B"}},
|
||||
{"offset": {"line": 1520, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/locales/en.json.[json].cjs/turbopack:/locales/en.json"],"sourcesContent":["{\"appName\":\"Forumlify\",\"nav\":{\"home\":\"Home\",\"messages\":\"Messages\",\"settings\":\"Settings\",\"admin\":\"Admin\",\"login\":\"Login\",\"register\":\"Register\",\"logout\":\"Logout\",\"darkMode\":\"Dark mode\",\"lightMode\":\"Light mode\",\"logoutConfirm\":\"Are you sure you want to log out?\"},\"feed\":{\"latest\":\"Latest posts\",\"hot\":\"Latest replies\",\"newPost\":\"New post\",\"loading\":\"Loading...\",\"empty\":\"No posts yet — be the first to publish!\",\"pinned\":\"Pinned\",\"deleted\":\"(edited)\",\"report\":\"Report\",\"delete\":\"Delete\",\"confirmDelete\":\"Are you sure you want to delete this post?\",\"deleteFailed\":\"Delete failed: {{msg}}\",\"noTitle\":\"Untitled\",\"anonymous\":\"Anonymous\"},\"post\":{\"title\":\"Post detail\",\"back\":\"← Back\",\"edit\":\"Edit\",\"save\":\"Save\",\"cancel\":\"Cancel\",\"editFailed\":\"Load failed: {{msg}}\",\"contentRequired\":\"Please fill in the content\",\"reply\":\"Reply\",\"replyCount\":\"{{count}} replies\",\"reportReason\":\"Report reason\",\"confirmDelete\":\"Are you sure you want to delete this post?\",\"reportTitle\":\"Report post\",\"submitReport\":\"Submit report\"},\"newPost\":{\"title\":\"Title\",\"content\":\"Say something...\",\"publish\":\"Publish post\",\"uploading\":\"Uploading...\",\"pleaseLogin\":\"Please log in first\",\"captchaError\":\"Wrong captcha, please try again\",\"publishSuccess\":\"Post published\",\"publishFailed\":\"Publish failed: {{msg}}\",\"answer\":\"Answer\",\"captchaLoading\":\"Loading captcha...\",\"drop\":\"Release to upload\",\"dropHint\":\"Click or drag to upload image\"},\"reply\":{\"submit\":\"Submit reply\",\"placeholder\":\"Write your reply...\",\"empty\":\"No replies yet — be the first to comment\",\"replyFailed\":\"Reply failed: {{msg}}\",\"delete\":\"Delete\",\"confirmDelete\":\"Are you sure you want to delete this reply?\",\"deleteFailed\":\"Delete failed: {{msg}}\"},\"auth\":{\"email\":\"Email\",\"password\":\"Password\",\"username\":\"Username\",\"passwordHint\":\"Password (min 6 chars)\",\"forgotPassword\":\"Forgot password?\",\"captchaError\":\"Wrong captcha, please try again\",\"registerSuccess\":\"Registration successful\",\"loginSuccess\":\"Logged in\",\"logoutSuccess\":\"Logged out\",\"login\":\"Login\",\"register\":\"Register\"},\"settings\":{\"title\":\"Settings\",\"profile\":\"Profile\",\"security\":\"Security\",\"recovery\":\"Recovery codes\",\"language\":\"Language\",\"languageZh\":\"中文\",\"languageEn\":\"English\",\"username\":\"Username\",\"bio\":\"Bio\",\"signature\":\"Signature\",\"signatureHint\":\"Shown below every post; Markdown is supported\",\"signaturePlaceholder\":\"Signature...\",\"avatarFileRequired\":\"Please select an image file\",\"avatarTooLarge\":\"Image must be smaller than 5MB\",\"avatarUpdated\":\"Avatar updated\",\"changeAvatar\":\"Change avatar\",\"save\":\"Save settings\",\"saved\":\"Saved!\",\"saveFailed\":\"Save failed: {{msg}}\",\"usernameRequired\":\"Username cannot be empty\",\"pleaseLogin\":\"Please log in first\"},\"user\":{\"title\":\"User profile\",\"bioEmpty\":\"This user hasn't written a bio yet\",\"sendMessage\":\"Send message\",\"joined\":\"Joined {{date}}\",\"posts\":\"{{count}} posts\",\"admin\":\"Admin\",\"noPosts\":\"No posts yet\",\"notFound\":\"User not found\",\"loading\":\"Loading...\"},\"stats\":{\"topics\":\"Topics\",\"posts\":\"Posts\",\"users\":\"Users\",\"links\":\"Links\"},\"loading\":\"Loading...\",\"common\":{\"confirm\":\"Confirm\",\"cancel\":\"Cancel\",\"close\":\"Close\"},\"report\":{\"spam\":\"Spam\",\"abuse\":\"Harassment\",\"illegal\":\"Illegal content\",\"nsfw\":\"Inappropriate content\",\"other\":\"Other\"},\"security\":{\"title\":\"Account security\",\"currentPw\":\"Current password\",\"newPw\":\"New password\",\"changePw\":\"Change password\",\"currentPwVerify\":\"Current password (verify identity)\",\"newEmail\":\"New email\",\"changeEmail\":\"Change email\",\"fillAll\":\"Please fill in all fields\",\"pwMin\":\"New password must be at least 6 characters\",\"pwChanged\":\"Password changed\",\"emailChanged\":\"Email changed\"},\"recovery\":{\"title\":\"Recovery codes\",\"desc\":\"Use these to reset your account if you forget your password. Each code works once.\",\"view\":\"View recovery codes\",\"regenerate\":\"Regenerate\",\"remaining\":\"{{count}} recovery codes remaining\",\"confirmRegenerate\":\"Regenerating will invalidate all old codes. Continue?\",\"genFailed\":\"Generation failed: {{msg}}\",\"fetchFailed\":\"Fetch failed: {{msg}}\",\"newCodes\":\"New recovery codes\",\"saveWarning\":\"Save these codes now — they cannot be viewed again after closing.\",\"saved\":\"I have saved them\"},\"admin\":{\"title\":\"Admin\",\"reports\":\"Reports\",\"users\":\"Users\",\"logs\":\"Event logs\",\"links\":\"Links\",\"forumSeLine truncated
|
||||
{"offset": {"line": 1804, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/locales/zh.json.[json].cjs/turbopack:/locales/zh.json"],"sourcesContent":["{\"appName\":\"Forumlify\",\"nav\":{\"home\":\"首页\",\"messages\":\"消息\",\"settings\":\"设置\",\"admin\":\"管理后台\",\"login\":\"登录\",\"register\":\"注册\",\"logout\":\"退出\",\"darkMode\":\"暗色模式\",\"lightMode\":\"亮色模式\",\"logoutConfirm\":\"确定要退出吗?\"},\"feed\":{\"latest\":\"最新发布\",\"hot\":\"最新回复\",\"newPost\":\"发布新帖\",\"loading\":\"加载中...\",\"empty\":\"还没有帖子,快来发布第一条吧!\",\"pinned\":\"置顶\",\"deleted\":\"(已编辑)\",\"report\":\"举报\",\"delete\":\"删除\",\"confirmDelete\":\"确定要删除这条帖子吗?\",\"deleteFailed\":\"删除失败:{{msg}}\",\"noTitle\":\"无标题\",\"anonymous\":\"匿名用户\"},\"post\":{\"title\":\"帖子详情\",\"back\":\"← 返回\",\"edit\":\"编辑\",\"save\":\"保存\",\"cancel\":\"取消\",\"editFailed\":\"加载失败:{{msg}}\",\"contentRequired\":\"请填写内容\",\"reply\":\"回复\",\"replyCount\":\"{{count}} 条回复\",\"reportReason\":\"举报原因\",\"confirmDelete\":\"确定要删除这条帖子吗?\",\"reportTitle\":\"举报帖子\",\"submitReport\":\"提交举报\"},\"newPost\":{\"title\":\"标题\",\"content\":\"说点什么...\",\"publish\":\"发布帖子\",\"uploading\":\"上传中...\",\"pleaseLogin\":\"请先登录\",\"captchaError\":\"验证码错误,请重新计算\",\"publishSuccess\":\"发布成功\",\"publishFailed\":\"发布失败:{{msg}}\",\"answer\":\"答案\",\"captchaLoading\":\"验证码加载中...\",\"drop\":\"松开上传\",\"dropHint\":\"点击或拖拽上传图片\"},\"reply\":{\"submit\":\"提交回复\",\"placeholder\":\"写下你的回复...\",\"empty\":\"还没有回复,快来发表第一条回复吧\",\"replyFailed\":\"回复失败:{{msg}}\",\"delete\":\"删除\",\"confirmDelete\":\"确定要删除这条回复吗?\",\"deleteFailed\":\"删除失败:{{msg}}\"},\"auth\":{\"email\":\"邮箱\",\"password\":\"密码\",\"username\":\"用户名\",\"passwordHint\":\"密码(至少6位)\",\"forgotPassword\":\"忘记密码?\",\"captchaError\":\"验证码错误,请重新计算\",\"registerSuccess\":\"注册成功\",\"loginSuccess\":\"登录成功\",\"logoutSuccess\":\"已退出登录\",\"login\":\"登录\",\"register\":\"注册\"},\"settings\":{\"title\":\"设置\",\"profile\":\"个人资料\",\"security\":\"安全设置\",\"recovery\":\"恢复码\",\"language\":\"语言\",\"languageZh\":\"中文\",\"languageEn\":\"English\",\"username\":\"用户名\",\"bio\":\"个人简介\",\"signature\":\"个性签名\",\"signatureHint\":\"显示在每篇帖子底部,支持 Markdown\",\"signaturePlaceholder\":\"签名...\",\"avatarFileRequired\":\"请选择图片文件\",\"avatarTooLarge\":\"图片不能超过 5MB\",\"avatarUpdated\":\"头像已更新\",\"changeAvatar\":\"更换头像\",\"save\":\"保存设置\",\"saved\":\"保存成功!\",\"saveFailed\":\"保存失败:{{msg}}\",\"usernameRequired\":\"用户名不能为空\",\"pleaseLogin\":\"请先登录\"},\"user\":{\"title\":\"用户主页\",\"bioEmpty\":\"这个人很懒,什么都没写\",\"sendMessage\":\"发私信\",\"joined\":\"加入于 {{date}}\",\"posts\":\"发了 {{count}} 个帖子\",\"admin\":\"管理员\",\"noPosts\":\"还没有发帖\",\"notFound\":\"用户不存在\",\"loading\":\"加载中...\"},\"stats\":{\"topics\":\"主题\",\"posts\":\"帖子\",\"users\":\"用户\",\"links\":\"友情链接\"},\"loading\":\"加载中...\",\"common\":{\"confirm\":\"确定\",\"cancel\":\"取消\",\"close\":\"关闭\"},\"report\":{\"spam\":\"垃圾广告\",\"abuse\":\"人身攻击\",\"illegal\":\"违法内容\",\"nsfw\":\"不适当内容\",\"other\":\"其他\"},\"security\":{\"title\":\"账户安全\",\"currentPw\":\"当前密码\",\"newPw\":\"新密码\",\"changePw\":\"修改密码\",\"currentPwVerify\":\"当前密码(验证身份)\",\"newEmail\":\"新邮箱\",\"changeEmail\":\"修改邮箱\",\"fillAll\":\"请填写完整信息\",\"pwMin\":\"新密码至少6位\",\"pwChanged\":\"密码修改成功\",\"emailChanged\":\"邮箱修改成功\"},\"recovery\":{\"title\":\"恢复码\",\"desc\":\"用于忘记密码时重置账户。每个恢复码只能使用一次。\",\"view\":\"查看恢复码\",\"regenerate\":\"重新生成\",\"remaining\":\"剩余 {{count}} 个可用恢复码\",\"confirmRegenerate\":\"重新生成将使所有旧恢复码失效,确定继续吗?\",\"genFailed\":\"生成失败:{{msg}}\",\"fetchFailed\":\"获取失败:{{msg}}\",\"newCodes\":\"新恢复码\",\"saveWarning\":\"请妥善保存这些恢复码,关闭窗口后无法再次查看。\",\"saved\":\"我已保存\"},\"admin\":{\"title\":\"管理后台\",\"reports\":\"举报处理\",\"users\":\"用户管理\",\"logs\":\"事件日志\",\"links\":\"友情链接\",\"forumSettings\":\"论坛Line truncated
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
module.exports = [
|
||||
"[externals]/next/dist/shared/lib/no-fallback-error.external.js [external] (next/dist/shared/lib/no-fallback-error.external.js, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("next/dist/shared/lib/no-fallback-error.external.js", () => require("next/dist/shared/lib/no-fallback-error.external.js"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[project]/app/HomeClient.js [app-rsc] (client reference proxy)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/app/HomeClient.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/app/HomeClient.js", "default");
|
||||
}),
|
||||
"[project]/app/HomeClient.js [app-rsc] (client reference proxy) <module evaluation>", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/app/HomeClient.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/app/HomeClient.js <module evaluation>", "default");
|
||||
}),
|
||||
"[project]/app/HomeClient.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$app$2f$HomeClient$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__$3c$module__evaluation$3e$__ = __turbopack_context__.i("[project]/app/HomeClient.js [app-rsc] (client reference proxy) <module evaluation>");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$app$2f$HomeClient$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__ = __turbopack_context__.i("[project]/app/HomeClient.js [app-rsc] (client reference proxy)");
|
||||
;
|
||||
__turbopack_context__.n(__TURBOPACK__imported__module__$5b$project$5d2f$app$2f$HomeClient$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__);
|
||||
}),
|
||||
"[project]/app/page.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>Home,
|
||||
"dynamic",
|
||||
()=>dynamic
|
||||
]);
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js [app-rsc] (ecmascript)");
|
||||
// 主页:Server Component —— 从 cookie 读取缓存论坛名(SSR 首帧即输出),
|
||||
// 其余逻辑在客户端 HomeClient 中
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$headers$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/headers.js [app-rsc] (ecmascript)");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$app$2f$HomeClient$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/app/HomeClient.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
;
|
||||
;
|
||||
const dynamic = 'force-dynamic';
|
||||
async function Home() {
|
||||
let cachedName = '';
|
||||
try {
|
||||
// Next 15+:cookies() 返回 Promise,必须 await
|
||||
const cookieStore = await (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$headers$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["cookies"])();
|
||||
cachedName = decodeURIComponent(cookieStore.get('forumlify-name')?.value || '');
|
||||
} catch (e) {
|
||||
cachedName = '';
|
||||
}
|
||||
return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$app$2f$HomeClient$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["default"], {
|
||||
cachedName: cachedName
|
||||
}, void 0, false, {
|
||||
fileName: "[project]/app/page.js",
|
||||
lineNumber: 18,
|
||||
columnNumber: 10
|
||||
}, this);
|
||||
}
|
||||
}),
|
||||
"[project]/app/page.js [app-rsc] (ecmascript, Next.js Server Component)", (function(__turbopack_context__){
|
||||
|
||||
__turbopack_context__.n(__turbopack_context__.i("[project]/app/page.js [app-rsc] (ecmascript)"));
|
||||
}),
|
||||
];
|
||||
|
||||
//# sourceMappingURL=%5Broot-of-the-server%5D__0keo79d._.js.map
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 10, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/app/HomeClient.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/app/HomeClient.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/app/HomeClient.js\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAAiQ,GAC9R,+BACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 24, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/app/HomeClient.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/app/HomeClient.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/app/HomeClient.js <module evaluation>\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAAqR,GAClT,mDACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 38, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
|
||||
{"offset": {"line": 46, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/app/page.js"],"sourcesContent":["// 主页:Server Component —— 从 cookie 读取缓存论坛名(SSR 首帧即输出),\n// 其余逻辑在客户端 HomeClient 中\nimport { cookies } from 'next/headers';\nimport HomeClient from './HomeClient';\n\n// cookies() 是动态 API:禁止静态优化,每次请求 SSR\nexport const dynamic = 'force-dynamic';\n\nexport default async function Home() {\n let cachedName = '';\n try {\n // Next 15+:cookies() 返回 Promise,必须 await\n const cookieStore = await cookies();\n cachedName = decodeURIComponent(cookieStore.get('forumlify-name')?.value || '');\n } catch (e) {\n cachedName = '';\n }\n return <HomeClient cachedName={cachedName} />;\n}\n"],"names":["dynamic","Home","cachedName","cookieStore","decodeURIComponent","get","value","e"],"mappings":";;;;;;;AAAA,sDAAsD;AACtD,wBAAwB;AACxB;AACA;;;;AAGO,MAAMA,UAAU;AAER,eAAeC;IAC5B,IAAIC,aAAa;IACjB,IAAI;QACF,yCAAyC;QACzC,MAAMC,cAAc,MAAM,IAAA,0IAAO;QACjCD,aAAaE,mBAAmBD,YAAYE,GAAG,CAAC,mBAAmBC,SAAS;IAC9E,EAAE,OAAOC,GAAG;QACVL,aAAa;IACf;IACA,qBAAO,8OAAC,4HAAU;QAACA,YAAYA;;;;;;AACjC"}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 9, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/dayjs/dayjs.min.js"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;Line truncated
|
||||
{"offset": {"line": 363, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/deepmerge/dist/cjs.js"],"sourcesContent":["'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n"],"names":["isMergeableObject","value","isNonNullObject","isSpecial","stringValue","Object","prototype","toString","call","isReactElement","canUseSymbol","Symbol","for","REACT_ELEMENT_TYPE","$$typeof","emptyTarget","val","Array","isArray","cloneUnlessOtherwiseSpecified","options","clone","deepmerge","defaultArrayMerge","target","source","concat","map","element","getMergeFunction","key","customMerge","getEnumerableOwnPropertySymbols","getOwnPropertySymbols","filter","symbol","propertyIsEnumerable","getKeys","keys","propertyIsOnObjectLine truncated
|
||||
{"offset": {"line": 470, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/dom-serializer/dist/foreign-names.js","sources":["file:///Users/home/Projects/forumlify/node_modules/dom-serializer/src/foreign-names.ts"],"sourcesContent":["/**\n * Mixed-case SVG and MathML element names recognized in foreign content.\n * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n */\nexport const elementNames = new Map<string, string>(\n \"altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath\"\n .split(\" \")\n .map((name) => [name.toLowerCase(), name]),\n);\n\n/**\n * Mixed-case SVG and MathML attribute names recognized in foreign content.\n * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n */\nexport const attributeNames = new Map<string, string>(\n \"definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan\"\n .split(\" \")\n .map((name) => [name.toLowerCase(), name]),\n);\n"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;AACI,MAAM,YAAY,GAAG,IAAI,GAAG,CACjC,scAAsc,CACnc,KAAK,CAAC,GAAG,CAAC,CACV,GAAG,CAAC,CAAC,IAAI,EAAE,CAAG,CAAD;QAAE,IAAI,CAAC,WAAW,EAAE;QAAE,IAAI;KAAC,CAAC,CAC7C,CAAC;AAMK,MAAM,cAAc,GAAG,IAAI,GAAG,CACnC,uvBAAuvB,CACpvB,KAAK,CAAC,GAAG,CAAC,CACV,GAAG,CAAC,CAAC,IAAI,EAAE,CAAG,CAAD;QAAE,IAAI,CAAC,WAAW,EAAE;QAAE,IAAI;KAAC,CAAC,CAC7C,CAAC"}},
|
||||
{"offset": {"line": 491, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/dom-serializer/dist/index.js","sources":["file:///Users/home/Projects/forumlify/node_modules/dom-serializer/src/index.ts"],"sourcesContent":["import * as ElementType from \"domelementtype\";\nimport type {\n AnyNode,\n CDATA,\n Comment,\n Element,\n ProcessingInstruction,\n Text,\n} from \"domhandler\";\nimport { encodeXML, escapeAttribute, escapeText } from \"entities\";\nimport { attributeNames, elementNames } from \"./foreign-names.js\";\n\n/**\n * Options for DOM serialization.\n */\nexport interface DomSerializerOptions {\n /**\n * Print an empty attribute's value.\n * @default xmlMode\n * @example With <code>emptyAttrs: false</code>: <code><input checked></code>\n * @example With <code>emptyAttrs: true</code>: <code><input checked=\"\"></code>\n */\n emptyAttrs?: boolean;\n /**\n * Print self-closing tags for tags without contents. If `xmlMode` is set,\n * this will apply to all tags. Otherwise, only tags that are defined as\n * self-closing in the HTML specification will be printed as such.\n * @default xmlMode\n * @example With <code>selfClosingTags: false</code>: <code><foo></foo><br></br></code>\n * @example With <code>xmlMode: true</code> and <code>selfClosingTags: true</code>: <code><foo/><br/></code>\n * @example With <code>xmlMode: false</code> and <code>selfClosingTags: true</code>: <code><foo></foo><br /></code>\n */\n selfClosingTags?: boolean;\n /**\n * Treat the input as an XML document; enables the `emptyAttrs` and\n * `selfClosingTags` options.\n *\n * If the value is `\"foreign\"`, it will try to correct mixed-case attribute\n * names.\n * @default false\n */\n xmlMode?: boolean | \"foreign\";\n /**\n * Encode characters reserved in HTML or XML in text and attribute values.\n *\n * If `xmlMode` is set or the value is not `'utf8'`, characters outside the\n * ASCII range will also be encoded as numeric entities.\n *\n * **Security:** Setting this to `false` disables encoding of `<`, `>`, `&`,\n * and (in attribute values) `'` — only `\"` in attribute values is escaped.\n * This is safe for the round-trip case (DOM was parsed with\n * `decodeEntities: false`, so any markup characters in text or attribute\n * values exist only as entity references), and unsafe otherwise. If text\n * or attribute values in the DOM contain raw `<`, `>`, or `&`, those\n * characters will appear literally in the output.\n * @default `decodeEntities`\n */\n encodeEntities?: boolean | \"utf8\";\n /**\n * Default for `encodeEntities`. Named to match the parser option of the\n * same name so a single options object can be threaded through parse and\n * serialize for a faithful round-trip — for example, cheerio parses with\n * `decodeEntities: false` to preserve entity references and passes the\n * same option here so they are not re-encoded.\n *\n * Despite the name, on the serializer this option controls *encoding*.\n * Setting it to `false` carries the same caveat as `encodeEntities: false`\n * — see that option.\n * @default true\n */\n decodeEntities?: boolean;\n}\n\n// ── Constants ────────────────────────────────────────────────────────\n\n/** Elements whose text content is never entity-encoded. */\nconst unencodedElements = new Set(\n \"style script xmp iframe noembed noframes plaintext noscript\".split(\" \"),\n);\n\n/** HTML void elements — they cannot have children. */\nconst voidElements = new Set(\n \"area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr\".split(\n \" \",\n ),\n);\n\n/** Elements that switch the parser into foreign (XML-like) mode. */\nconst foreignElements = new Set([\"svg\", \"math\"]);\n\n/**\n * Foreign-mode integration points: children of these elements are parsed\n * as HTML again, not as foreign content.\n */\nconst foreignModeIntegrationPoints = new Set(\n \"mi mo mn ms mtext annotation-xml foreignObject desc title\".split(\" \"),\n);\n\n// ── Public API ───────────────────────────────────────────────────────\n\n/**\n * Renders a DOM node or an array of DOM nodes to a string.\n *\n * Can be thought of as the equivalent of the `outerHTML` of the passed\n * node(s).\n * @param node Node to be rendered.\n * @param options Changes serialization behavior\n */\nexport function render(\n node: AnyNode | ArrayLike<AnyNode>,\n options: DomSerializerOptions = {},\n): string {\n const nodes = \"length\" in node ? node : [node];\n\n /*\n * `xmlMode` is threaded as a separate argument through the internal\n * functiLine truncated
|
||||
{"offset": {"line": 650, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/domelementtype/dist/index.js"],"sourcesContent":["/** Types of elements found in htmlparser2's DOM */\nexport var ElementType;\n(function (ElementType) {\n /** Type for the root element of a document */\n ElementType[\"Root\"] = \"root\";\n /** Type for Text */\n ElementType[\"Text\"] = \"text\";\n /** Type for <? ... ?> */\n ElementType[\"Directive\"] = \"directive\";\n /** Type for <!-- ... --> */\n ElementType[\"Comment\"] = \"comment\";\n /** Type for <script> tags */\n ElementType[\"Script\"] = \"script\";\n /** Type for <style> tags */\n ElementType[\"Style\"] = \"style\";\n /** Type for Any tag */\n ElementType[\"Tag\"] = \"tag\";\n /** Type for <![CDATA[ ... ]]> */\n ElementType[\"CDATA\"] = \"cdata\";\n /** Type for <!doctype ...> */\n ElementType[\"Doctype\"] = \"doctype\";\n})(ElementType || (ElementType = {}));\n/**\n * Tests whether an element is a tag or not.\n * @param element Element to test\n * @param element.type Node type discriminator to check.\n */\nexport function isTag(element) {\n return (element.type === ElementType.Tag ||\n element.type === ElementType.Script ||\n element.type === ElementType.Style);\n}\n// Exports for backwards compatibility\n/** Type for the root element of a document */\n// eslint-disable-next-line prefer-destructuring\nexport const Root = ElementType.Root;\n/** Type for Text */\n// eslint-disable-next-line prefer-destructuring\nexport const Text = ElementType.Text;\n/** Type for <? ... ?> */\n// eslint-disable-next-line prefer-destructuring\nexport const Directive = ElementType.Directive;\n/** Type for <!-- ... --> */\n// eslint-disable-next-line prefer-destructuring\nexport const Comment = ElementType.Comment;\n/** Type for <script> tags */\n// eslint-disable-next-line prefer-destructuring\nexport const Script = ElementType.Script;\n/** Type for <style> tags */\n// eslint-disable-next-line prefer-destructuring\nexport const Style = ElementType.Style;\n/** Type for Any tag */\n// eslint-disable-next-line prefer-destructuring\nexport const Tag = ElementType.Tag;\n/** Type for <![CDATA[ ... ]]> */\n// eslint-disable-next-line prefer-destructuring\nexport const CDATA = ElementType.CDATA;\n/** Type for <!doctype ...> */\n// eslint-disable-next-line prefer-destructuring\nexport const Doctype = ElementType.Doctype;\n"],"names":["ElementType","isTag","element","type","Tag","Script","Style","Root","Text","Directive","Comment","CDATA","Doctype"],"mappings":"AAAA,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;AAC1C,IAAIA;AACX,CAAC,SAAUA,WAAW;IAClB,4CAA4C,GAC5CA,WAAW,CAAC,OAAO,GAAG;IACtB,kBAAkB,GAClBA,WAAW,CAAC,OAAO,GAAG;IACtB,uBAAuB,GACvBA,WAAW,CAAC,YAAY,GAAG;IAC3B,0BAA0B,GAC1BA,WAAW,CAAC,UAAU,GAAG;IACzB,2BAA2B,GAC3BA,WAAW,CAAC,SAAS,GAAG;IACxB,0BAA0B,GAC1BA,WAAW,CAAC,QAAQ,GAAG;IACvB,qBAAqB,GACrBA,WAAW,CAAC,MAAM,GAAG;IACrB,+BAA+B,GAC/BA,WAAW,CAAC,QAAQ,GAAG;IACvB,4BAA4B,GAC5BA,WAAW,CAAC,UAAU,GAAG;AAC7B,CAAC,EAAEA,eAAe,CAACA,cAAc,CAAC,CAAC;AAM5B,SAASC,MAAMC,OAAO;IACzB,OAAQA,QAAQC,IAAI,KAAKH,YAAYI,GAAG,IACpCF,QAAQC,IAAI,KAAKH,YAAYK,MAAM,IACnCH,QAAQC,IAAI,KAAKH,YAAYM,KAAK;AAC1C;AAIO,MAAMC,OAAOP,YAAYO,IAAI;AAG7B,MAAMC,OAAOR,YAAYQ,IAAI;AAG7B,MAAMC,YAAYT,YAAYS,SAAS;AAGvC,MAAMC,UAAUV,YAAYU,OAAO;AAGnC,MAAML,SAASL,YAAYK,MAAM;AAGjC,MAAMC,QAAQN,YAAYM,KAAK;AAG/B,MAAMF,MAAMJ,YAAYI,GAAG;AAG3B,MAAMO,QAAQX,YAAYW,KAAK;AAG/B,MAAMC,UAAUZ,YAAYY,OAAO","ignoreList":[0]}},
|
||||
{"offset": {"line": 702, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/domhandler/dist/index.js"],"sourcesContent":["import { ElementType } from \"domelementtype\";\nimport { CDATA, Comment, Document, Element, ProcessingInstruction, Text, } from \"./node.js\";\nexport * from \"./node.js\";\n// Default options\nconst defaultOptions = {\n withStartIndices: false,\n withEndIndices: false,\n xmlMode: false,\n};\n/**\n * Event-based handler that builds a DOM tree from parser callbacks.\n */\nexport class DomHandler {\n /** The elements of the DOM */\n dom = [];\n /** The root element for the DOM */\n root = new Document(this.dom);\n /** Called once parsing has completed. */\n callback;\n /** Settings for the handler. */\n options;\n /** Callback whenever a tag is closed. */\n elementCB;\n /** Indicated whether parsing has been completed. */\n done = false;\n /** Stack of open tags. */\n tagStack = [this.root];\n /** A data node that is still being written to. */\n lastNode = null;\n /** Reference to the parser instance. Used for location information. */\n parser = null;\n /**\n * @param callback Called once parsing has completed.\n * @param options Settings for the handler.\n * @param elementCB Callback whenever a tag is closed.\n */\n constructor(callback, options, elementCB) {\n // Make it possible to skip arguments, for backwards-compatibility\n if (typeof options === \"function\") {\n elementCB = options;\n options = defaultOptions;\n }\n if (typeof callback === \"object\") {\n options = callback;\n callback = undefined;\n }\n this.callback = callback ?? null;\n this.options = options ?? defaultOptions;\n this.elementCB = elementCB ?? null;\n }\n onparserinit(parser) {\n this.parser = parser;\n }\n // Resets the handler back to starting state\n onreset() {\n this.dom = [];\n this.root = new Document(this.dom);\n this.done = false;\n this.tagStack = [this.root];\n this.lastNode = null;\n this.parser = null;\n }\n // Signals the handler that parsing is done\n onend() {\n if (this.done)\n return;\n this.done = true;\n this.parser = null;\n this.handleCallback(null);\n }\n onerror(error) {\n this.handleCallback(error);\n }\n onclosetag() {\n this.lastNode = null;\n const element = this.tagStack.pop();\n if (this.options.withEndIndices && this.parser) {\n element.endIndex = this.parser.endIndex;\n }\n if (this.elementCB)\n this.elementCB(element);\n }\n onopentag(name, attribs) {\n const type = this.options.xmlMode ? ElementType.Tag : undefined;\n const element = new Element(name, attribs, undefined, type);\n this.addNode(element);\n this.tagStack.push(element);\n }\n ontext(data) {\n const { lastNode } = this;\n if (lastNode && lastNode.type === ElementType.Text) {\n lastNode.data += data;\n if (this.options.withEndIndices && this.parser) {\n lastNode.endIndex = this.parser.endIndex;\n }\n }\n else {\n const node = new Text(data);\n this.addNode(node);\n this.lastNode = node;\n }\n }\n oncomment(data) {\n if (this.lastNode && this.lastNode.type === ElementType.Comment) {\n this.lastNode.data += data;\n return;\n }\n const node = new Comment(data);\n this.addNode(node);\n this.lastNode = node;\n }\n oncommentend() {\n this.lastNode = null;\n }\n oncdatastart() {\n const text = new Text(\"\");\n const node = new CDATA([text]);\n this.addNode(node);\n text.parent = node;\n this.lastNode = text;\n }\n oncdataend() {\n this.lastNode = null;\n }\n onprocessinginstruction(name, data) {\n const node = new ProcessingInstruction(name, data);\n this.addNode(node);\n }\n handleCallback(error) {\n if (typeof this.callback === \"function\") {\n this.callback(error, this.dom);\n }\n else if (error) {\n throw error;\n }\n }\n addNode(node) {\n const parent = this.tagStack[this.tagStack.length - 1];\n const previousSibling = parent.children[parent.children.length - 1];\n if (this.options.withStartIndices && this.parser) {\n node.startIndex = this.parser.startIndex;\n }\n if (this.options.withEndIndices && this.parser) {\n node.endIndex = this.parser.endIndex;\n }\n parent.children.push(node);\n if (previousSibling) {\n node.prev = previousSibling;\n Line truncated
|
||||
{"offset": {"line": 858, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/domhandler/dist/node.js"],"sourcesContent":["import { ElementType, isTag as isTagRaw } from \"domelementtype\";\n/**\n * This object will be used as the prototype for Nodes when creating a\n * DOM-Level-1-compliant structure.\n */\nexport class Node {\n /** Parent of the node */\n parent = null;\n /** Previous sibling */\n prev = null;\n /** Next sibling */\n next = null;\n /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n startIndex = null;\n /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n endIndex = null;\n // Read-write aliases for properties\n /**\n * Same as {@link parent}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get parentNode() {\n return this.parent;\n }\n set parentNode(parent) {\n this.parent = parent;\n }\n /**\n * Same as {@link prev}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get previousSibling() {\n return this.prev;\n }\n set previousSibling(previous) {\n this.prev = previous;\n }\n /**\n * Same as {@link next}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get nextSibling() {\n return this.next;\n }\n set nextSibling(next) {\n this.next = next;\n }\n /**\n * Clone this node, and optionally its children.\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\n cloneNode(recursive = false) {\n return cloneNode(this, recursive);\n }\n}\n/**\n * A node that contains some data.\n */\nexport class DataNode extends Node {\n data;\n /**\n * @param data The content of the data node\n */\n constructor(data) {\n super();\n this.data = data;\n }\n /**\n * Same as {@link data}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get nodeValue() {\n return this.data;\n }\n set nodeValue(data) {\n this.data = data;\n }\n}\n/**\n * Text within the document.\n */\nexport class Text extends DataNode {\n type = ElementType.Text;\n get nodeType() {\n return 3;\n }\n}\n/**\n * Comments within the document.\n */\nexport class Comment extends DataNode {\n type = ElementType.Comment;\n get nodeType() {\n return 8;\n }\n}\n/**\n * Processing instructions, including doc types.\n */\nexport class ProcessingInstruction extends DataNode {\n type = ElementType.Directive;\n name;\n constructor(name, data) {\n super(data);\n this.name = name;\n }\n get nodeType() {\n return 1;\n }\n /** If this is a doctype, the document type name (parse5 only). */\n \"x-name\";\n /** If this is a doctype, the document type public identifier (parse5 only). */\n \"x-publicId\";\n /** If this is a doctype, the document type system identifier (parse5 only). */\n \"x-systemId\";\n}\n/**\n * A node that can have children.\n */\nexport class NodeWithChildren extends Node {\n children;\n /**\n * @param children Children of the node. Only certain node types can have children.\n */\n constructor(children) {\n super();\n this.children = children;\n }\n // Aliases\n /** First child of the node. */\n get firstChild() {\n return this.children[0] ?? null;\n }\n /** Last child of the node. */\n get lastChild() {\n return this.children.length > 0\n ? this.children[this.children.length - 1]\n : null;\n }\n /**\n * Same as {@link children}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get childNodes() {\n return this.children;\n }\n set childNodes(children) {\n this.children = children;\n }\n}\n/**\n * CDATA nodes.\n */\nexport class CDATA extends NodeWithChildren {\n type = ElementType.CDATA;\n get nodeType() {\n return 4;\n }\n}\n/**\n * The root node of the document.\n */\nexport class Document extends NodeWithChildren {\n type = ElementType.Root;\n get nodeType() {\n return 9;\n }\n}\n/**\n * An element within the DOM.\n */\nexport class Element extends NodeWithChildren {\n name;\n attribs;\n type;\n /**\n * @param name Name of the tag, eg. `div`, `span`.\n * @param attribs Object mapping attribute names to attribute values.\n * @param children Children of the node.\n * @param type Node type used for the new node instance.\n */\n constructor(name, attribs, children = [], type = name === \"script\"\n ? ElementType.Script\n : name === \"style\"\n ? ElementType.Style\n : ElementType.Tag) {\n super(children);\n Line truncated
|
||||
{"offset": {"line": 1159, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/domutils/dist/feeds.js","sources":["file:///Users/home/Projects/forumlify/node_modules/domutils/src/feeds.ts"],"sourcesContent":["import type { AnyNode, Element } from \"domhandler\";\nimport { getElementsByTagName } from \"./legacy.js\";\nimport { textContent } from \"./stringify.js\";\n\n/**\n * The medium of a media item.\n *\n * @category Feeds\n */\nexport type FeedItemMediaMedium =\n | \"image\"\n | \"audio\"\n | \"video\"\n | \"document\"\n | \"executable\";\n\n/**\n * The type of a media item.\n *\n * @category Feeds\n */\nexport type FeedItemMediaExpression = \"sample\" | \"full\" | \"nonstop\";\n\n/**\n * A media item of a feed entry.\n *\n * @category Feeds\n */\nexport interface FeedItemMedia {\n medium: FeedItemMediaMedium | undefined;\n isDefault: boolean;\n url?: string;\n fileSize?: number;\n type?: string;\n expression?: FeedItemMediaExpression;\n bitrate?: number;\n framerate?: number;\n samplingrate?: number;\n channels?: number;\n duration?: number;\n height?: number;\n width?: number;\n lang?: string;\n}\n\n/**\n * An entry of a feed.\n *\n * @category Feeds\n */\nexport interface FeedItem {\n id?: string;\n title?: string;\n link?: string;\n description?: string;\n pubDate?: Date;\n media: FeedItemMedia[];\n}\n\n/**\n * The root of a feed.\n *\n * @category Feeds\n */\nexport interface Feed {\n type: string;\n id?: string;\n title?: string;\n link?: string;\n description?: string;\n updated?: Date;\n author?: string;\n items: FeedItem[];\n}\n\n/**\n * Get the feed object from the root of a DOM tree.\n *\n * @category Feeds\n * @param document The DOM to extract the feed from.\n * @returns The feed.\n */\nexport function getFeed(document: AnyNode[]): Feed | null {\n const feedRoot = getOneElement(isValidFeed, document);\n\n return feedRoot\n ? feedRoot.name === \"feed\"\n ? getAtomFeed(feedRoot)\n : getRssFeed(feedRoot)\n : null;\n}\n\n/**\n * Parse an Atom feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getAtomFeed(feedRoot: Element) {\n const childs = feedRoot.children;\n\n const feed: Feed = {\n type: \"atom\",\n items: getElementsByTagName(\"entry\", childs).map((item) => {\n const { children } = item;\n const entry: FeedItem = { media: getMediaElements(children) };\n\n addConditionally(entry, \"id\", \"id\", children);\n addConditionally(entry, \"title\", \"title\", children);\n\n const href = getOneElement(\"link\", children)?.attribs[\"href\"];\n if (href) {\n entry.link = href;\n }\n\n const description =\n fetch(\"summary\", children) || fetch(\"content\", children);\n if (description) {\n entry.description = description;\n }\n\n const pubDate = fetch(\"updated\", children);\n if (pubDate) {\n entry.pubDate = new Date(pubDate);\n }\n\n return entry;\n }),\n };\n\n addConditionally(feed, \"id\", \"id\", childs);\n addConditionally(feed, \"title\", \"title\", childs);\n const href = getOneElement(\"link\", childs)?.attribs[\"href\"];\n if (href) {\n feed.link = href;\n }\n addConditionally(feed, \"description\", \"subtitle\", childs);\n\n const updated = fetch(\"updated\", childs);\n if (updated) {\n feed.updated = new Date(updated);\n }\n\n addConditionally(feed, \"author\", \"email\", childs, true);\n\n return feed;\n}\n\n/**\n * Parse a RSS feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getRssFeed(feedRoot: Element) {\n const childs = getOneElement(\"channel\", feedRoot.children)?.children ?? [];\n\n const feed: Feed = {\n type: feedRoot.name.substr(0, 3),\n id: \"\",\n items: getElementsByTagName(\"item\", feedRoot.children).map(\n (item: Element) => {\n const { children } = item;\n const entry: FeedItem = { media: getMediaElements(children) };\n addConditionally(entry, \"id\", \"guid\", children);\n addConditionally(entry, \"title\", \"title\", children);\n addConditionally(entry, \"link\", \"link\", children);\n addConditionally(entry, \"description\", \"description\", children);\n const pubDate =\n fetch(\"pubDate\", children) || fetch(\"dc:date\", children);\n if (pubDate) entry.pubDate = new Date(pubDate);\n\n return entry;\n },\n ),\n };\n\n addConditionally(feed, \"title\", \"title\", childs);\n addConditionally(feed, \"link\"Line truncated
|
||||
{"offset": {"line": 1336, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/domutils/dist/helpers.js","sources":["file:///Users/home/Projects/forumlify/node_modules/domutils/src/helpers.ts"],"sourcesContent":["import { type AnyNode, hasChildren, type ParentNode } from \"domhandler\";\n\n/**\n * Given an array of nodes, remove any member that is contained by another\n * member.\n *\n * @category Helpers\n * @param nodes Nodes to filter.\n * @returns Remaining nodes that aren't contained by other nodes.\n */\nexport function removeSubsets(nodes: AnyNode[]): AnyNode[] {\n let index = nodes.length;\n\n /*\n * Check if each node (or one of its ancestors) is already contained in the\n * array.\n */\n while (--index >= 0) {\n const node = nodes[index];\n\n /*\n * Remove the node if it is not unique.\n * We are going through the array from the end, so we only\n * have to check nodes that preceed the node under consideration in the array.\n */\n if (index > 0 && nodes.lastIndexOf(node, index - 1) >= 0) {\n nodes.splice(index, 1);\n continue;\n }\n\n for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) {\n if (nodes.includes(ancestor)) {\n nodes.splice(index, 1);\n break;\n }\n }\n }\n\n return nodes;\n}\n/**\n * @category Helpers\n * @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition}\n */\nexport const enum DocumentPosition {\n DISCONNECTED = 1,\n PRECEDING = 2,\n FOLLOWING = 4,\n CONTAINS = 8,\n CONTAINED_BY = 16,\n}\n\n/**\n * Compare the position of one node against another node in any other document,\n * returning a bitmask with the values from {@link DocumentPosition}.\n *\n * Document order:\n * > There is an ordering, document order, defined on all the nodes in the\n * > document corresponding to the order in which the first character of the\n * > XML representation of each node occurs in the XML representation of the\n * > document after expansion of general entities. Thus, the document element\n * > node will be the first node. Element nodes occur before their children.\n * > Thus, document order orders element nodes in order of the occurrence of\n * > their start-tag in the XML (after expansion of entities). The attribute\n * > nodes of an element occur after the element and before its children. The\n * > relative order of attribute nodes is implementation-dependent.\n *\n * Source:\n * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order\n *\n * @category Helpers\n * @param nodeA The first node to use in the comparison\n * @param nodeB The second node to use in the comparison\n * @returns A bitmask describing the input nodes' relative position.\n *\n * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for\n * a description of these values.\n */\nexport function compareDocumentPosition(\n nodeA: AnyNode,\n nodeB: AnyNode,\n): number {\n const aParents: ParentNode[] = [];\n const bParents: ParentNode[] = [];\n\n if (nodeA === nodeB) {\n return 0;\n }\n\n let current = hasChildren(nodeA) ? nodeA : nodeA.parent;\n while (current) {\n aParents.unshift(current);\n current = current.parent;\n }\n current = hasChildren(nodeB) ? nodeB : nodeB.parent;\n while (current) {\n bParents.unshift(current);\n current = current.parent;\n }\n\n const maxIndex = Math.min(aParents.length, bParents.length);\n let index = 0;\n while (index < maxIndex && aParents[index] === bParents[index]) {\n index++;\n }\n\n if (index === 0) {\n return DocumentPosition.DISCONNECTED;\n }\n\n const sharedParent = aParents[index - 1];\n const siblings: AnyNode[] = sharedParent.children;\n const aSibling = aParents[index];\n const bSibling = bParents[index];\n\n if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {\n if (sharedParent === nodeB) {\n return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY;\n }\n return DocumentPosition.FOLLOWING;\n }\n if (sharedParent === nodeA) {\n return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS;\n }\n return DocumentPosition.PRECEDING;\n}\n\n/**\n * Sort an array of nodes based on their relative position in the document,\n * removing any duplicate nodes. If the array contains nodes that do not belong\n * to the same document, sort order is unspecified.\n *\n * @category Helpers\n * @param nodes Array of DOM nodes.\n * @returns Collection of unique nodes, sorted in document order.\n */\nexport function uniqueSort<T extends AnyNode>(nodes: T[]): T[] {\n nodes = nodes.filter(\n (node, index, array) => !array.includes(node, index + 1),\n );\n\n nodes.sort((a, b) => {\n const relative = compareDocumentPositLine truncated
|
||||
{"offset": {"line": 1521, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/domutils/dist/index.js","sources":["file:///Users/home/Projects/forumlify/node_modules/domutils/src/index.ts"],"sourcesContent":["export * from \"./feeds.js\";\nexport * from \"./helpers.js\";\nexport * from \"./legacy.js\";\nexport * from \"./manipulation.js\";\nexport * from \"./querying.js\";\nexport * from \"./stringify.js\";\nexport * from \"./traversal.js\";\n"],"names":[],"mappings":""}},
|
||||
{"offset": {"line": 1533, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/domutils/dist/legacy.js","sources":["file:///Users/home/Projects/forumlify/node_modules/domutils/src/legacy.ts"],"sourcesContent":["import type { ElementType } from \"domelementtype\";\nimport { type AnyNode, type Element, isTag, isText } from \"domhandler\";\nimport { filter, findOne } from \"./querying.js\";\n\ntype TestType = (element: AnyNode) => boolean;\n\n/**\n * An object with keys to check elements against. If a key is `tag_name`,\n * `tag_type` or `tag_contains`, it will check the value against that specific\n * value. Otherwise, it will check an attribute with the key's name.\n *\n * @category Legacy Query Functions\n */\n// eslint-disable-next-line unicorn/prevent-abbreviations -- Keep the exported API name for backwards compatibility.\nexport interface TestElementOpts {\n tag_name?: string | ((name: string) => boolean);\n tag_type?: string | ((name: string) => boolean);\n tag_contains?: string | ((data?: string) => boolean);\n [attributeName: string]:\n | undefined\n | string\n | ((attributeValue: string) => boolean);\n}\n\n/**\n * A map of functions to check nodes against.\n */\nconst Checks: Record<\n string,\n (value: string | undefined | ((inputString: string) => boolean)) => TestType\n> = {\n tag_name(name) {\n if (typeof name === \"function\") {\n return (element: AnyNode) => isTag(element) && name(element.name);\n }\n if (name === \"*\") {\n return isTag;\n }\n return (element: AnyNode) => isTag(element) && element.name === name;\n },\n tag_type(type) {\n if (typeof type === \"function\") {\n return (element: AnyNode) => type(element.type);\n }\n return (element: AnyNode) => element.type === type;\n },\n tag_contains(data) {\n if (typeof data === \"function\") {\n return (element: AnyNode) => isText(element) && data(element.data);\n }\n return (element: AnyNode) => isText(element) && element.data === data;\n },\n};\n\n/**\n * Returns a function to check whether a node has an attribute with a particular\n * value.\n *\n * @param attrib Attribute to check.\n * @param value Attribute value to look for.\n * @returns A function to check whether the a node has an attribute with a\n * particular value.\n */\nfunction getAttribCheck(\n attrib: string,\n value: undefined | string | ((value: string) => boolean),\n): TestType {\n if (typeof value === \"function\") {\n return (element: AnyNode) =>\n isTag(element) && value(element.attribs[attrib]);\n }\n return (element: AnyNode) =>\n isTag(element) && element.attribs[attrib] === value;\n}\n\n/**\n * Returns a function that returns `true` if either of the input functions\n * returns `true` for a node.\n *\n * @param a First function to combine.\n * @param b Second function to combine.\n * @returns A function taking a node and returning `true` if either of the input\n * functions returns `true` for the node.\n */\nfunction combineFuncs(a: TestType, b: TestType): TestType {\n return (element: AnyNode) => a(element) || b(element);\n}\n\n/**\n * Returns a function that executes all checks in `options` and returns `true`\n * if any of them match a node.\n *\n * @param options An object describing nodes to look for.\n * @returns A function that executes all checks in `options` and returns `true`\n * if any of them match a node.\n */\nfunction compileTest(options: TestElementOpts): TestType | null {\n const funcs = Object.keys(options).map((key) => {\n const value = options[key];\n return Object.hasOwn(Checks, key)\n ? Checks[key](value)\n : getAttribCheck(key, value);\n });\n\n return funcs.length === 0 ? null : funcs.reduce(combineFuncs);\n}\n\n/**\n * Checks whether a node matches the description in `options`.\n *\n * @category Legacy Query Functions\n * @param options An object describing nodes to look for.\n * @param node The element to test.\n * @returns Whether the element matches the description in `options`.\n */\nexport function testElement(options: TestElementOpts, node: AnyNode): boolean {\n const test = compileTest(options);\n return test ? test(node) : true;\n}\n\n/**\n * Returns all nodes that match `options`.\n *\n * @category Legacy Query Functions\n * @param options An object describing nodes to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes that match `options`.\n */\nexport function getElements(\n options: TestElementOpts,\n nodes: AnyNode | AnyNode[],\n recurse: boolean,\n limit: number = Number.POSITIVE_INFINITY,\n): AnyNode[] {\n const test = compileTest(options);\n return test ? filter(test, nodes, recurse, limiLine truncated
|
||||
{"offset": {"line": 1642, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/domutils/dist/manipulation.js","sources":["file:///Users/home/Projects/forumlify/node_modules/domutils/src/manipulation.ts"],"sourcesContent":["import type { ChildNode, ParentNode } from \"domhandler\";\n\n/**\n * Remove an element from the dom\n *\n * @category Manipulation\n * @param element The element to be removed.\n */\nexport function removeElement(element: ChildNode): void {\n if (element.prev) element.prev.next = element.next;\n if (element.next) element.next.prev = element.prev;\n\n if (element.parent) {\n const childs = element.parent.children;\n const childsIndex = childs.lastIndexOf(element);\n if (childsIndex !== -1) {\n childs.splice(childsIndex, 1);\n }\n }\n element.next = null;\n element.prev = null;\n element.parent = null;\n}\n\n/**\n * Replace an element in the dom\n *\n * @category Manipulation\n * @param element The element to be replaced.\n * @param replacement The element to be added\n */\nexport function replaceElement(\n element: ChildNode,\n replacement: ChildNode,\n): void {\n replacement.prev = element.prev;\n if (replacement.prev) {\n replacement.prev.next = replacement;\n }\n\n replacement.next = element.next;\n if (replacement.next) {\n replacement.next.prev = replacement;\n }\n\n replacement.parent = element.parent;\n if (replacement.parent) {\n const { children } = replacement.parent;\n const elementIndex = children.lastIndexOf(element);\n if (elementIndex === -1) {\n return;\n }\n\n children[elementIndex] = replacement;\n element.parent = null;\n }\n}\n\n/**\n * Append a child to an element.\n *\n * @category Manipulation\n * @param parent The element to append to.\n * @param child The element to be added as a child.\n */\nexport function appendChild(parent: ParentNode, child: ChildNode): void {\n removeElement(child);\n\n child.next = null;\n child.parent = parent;\n\n if (parent.children.push(child) > 1) {\n const sibling = parent.children[parent.children.length - 2];\n sibling.next = child;\n child.prev = sibling;\n } else {\n child.prev = null;\n }\n}\n\n/**\n * Append an element after another.\n *\n * @category Manipulation\n * @param element The element to append after.\n * @param next The element be added.\n */\nexport function append(element: ChildNode, next: ChildNode): void {\n removeElement(next);\n\n const { parent } = element;\n const currentNext = element.next;\n\n next.next = currentNext;\n next.prev = element;\n element.next = next;\n next.parent = parent;\n\n if (currentNext) {\n currentNext.prev = next;\n if (parent) {\n const childs = parent.children;\n childs.splice(childs.lastIndexOf(currentNext), 0, next);\n }\n } else if (parent) {\n parent.children.push(next);\n }\n}\n\n/**\n * Prepend a child to an element.\n *\n * @category Manipulation\n * @param parent The element to prepend before.\n * @param child The element to be added as a child.\n */\nexport function prependChild(parent: ParentNode, child: ChildNode): void {\n removeElement(child);\n\n child.parent = parent;\n child.prev = null;\n\n if (parent.children.unshift(child) === 1) {\n child.next = null;\n } else {\n const sibling = parent.children[1];\n sibling.prev = child;\n child.next = sibling;\n }\n}\n\n/**\n * Prepend an element before another.\n *\n * @category Manipulation\n * @param element The element to prepend before.\n * @param previous The element to be added.\n */\nexport function prepend(element: ChildNode, previous: ChildNode): void {\n removeElement(previous);\n\n const { parent } = element;\n if (parent) {\n const childs = parent.children;\n childs.splice(childs.indexOf(element), 0, previous);\n }\n\n if (element.prev) {\n element.prev.next = previous;\n }\n\n previous.parent = parent;\n previous.prev = element.prev;\n previous.next = element;\n element.prev = previous;\n}\n"],"names":[],"mappings":"AAEA;;;;;GAKG;;;;;;;;;;;;;;AACG,SAAU,aAAa,CAAC,OAAkB;IAC5C,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACnD,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACjB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;QACvC,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,WAAW,KAAK,CAAC,CAAC,EAAE,CAAC;YACrB,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;IACL,CAAC;IACD,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;AAC1B,CAAC;AASK,SAAU,cAAc,CAC1B,OAAkB,EAClB,WAAsB;IAEtB,WAAW,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAChC,IAAI,WAAW,CAAC,IAAI,EAAE,CAALine truncated
|
||||
{"offset": {"line": 1756, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/domutils/dist/querying.js","sources":["file:///Users/home/Projects/forumlify/node_modules/domutils/src/querying.ts"],"sourcesContent":["import {\n type AnyNode,\n type Element,\n hasChildren,\n isTag,\n type ParentNode,\n} from \"domhandler\";\n\n/**\n * Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param node Node to search. Will be included in the result set if it matches.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nexport function filter(\n test: (element: AnyNode) => boolean,\n node: AnyNode | AnyNode[],\n recurse = true,\n limit: number = Number.POSITIVE_INFINITY,\n): AnyNode[] {\n return find(test, Array.isArray(node) ? node : [node], recurse, limit);\n}\n\n/**\n * Search an array of nodes and their children for nodes passing a test function.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nexport function find(\n test: (element: AnyNode) => boolean,\n nodes: AnyNode[] | ParentNode,\n recurse: boolean,\n limit: number,\n): AnyNode[] {\n const result: AnyNode[] = [];\n /** Stack of the arrays we are looking at. */\n const nodeStack: AnyNode[][] = [Array.isArray(nodes) ? nodes : [nodes]];\n /** Stack of the indices within the arrays. */\n const indexStack = [0];\n\n for (;;) {\n // First, check if the current array has any more elements to look at.\n if (indexStack[0] >= nodeStack[0].length) {\n // If we have no more arrays to look at, we are done.\n if (indexStack.length === 1) {\n return result;\n }\n\n // Otherwise, remove the current array from the stack.\n nodeStack.shift();\n indexStack.shift();\n\n // Loop back to the start to continue with the next array.\n continue;\n }\n\n const element = nodeStack[0][indexStack[0]++];\n\n if (test(element)) {\n result.push(element);\n if (--limit <= 0) return result;\n }\n\n if (recurse && hasChildren(element) && element.children.length > 0) {\n /*\n * Add the children to the stack. We are depth-first, so this is\n * the next array we look at.\n */\n indexStack.unshift(0);\n nodeStack.unshift(element.children);\n }\n }\n}\n\n/**\n * Finds one element in a tree that passes a test.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Node or array of nodes to search.\n * @param recurse Also consider child nodes.\n * @returns The first node that passes `test`.\n */\nexport function findOne(\n test: (element: Element) => boolean,\n nodes: AnyNode[] | ParentNode,\n recurse = true,\n): Element | null {\n const searchedNodes = Array.isArray(nodes) ? nodes : [nodes];\n for (const node of searchedNodes) {\n if (isTag(node) && test(node)) {\n return node;\n }\n if (recurse && hasChildren(node) && node.children.length > 0) {\n const found = findOne(test, node.children, true);\n if (found) return found;\n }\n }\n\n return null;\n}\n\n/**\n * Checks if a tree of nodes contains at least one node passing a test.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns Whether a tree of nodes contains at least one node passing the test.\n */\nexport function existsOne(\n test: (element: Element) => boolean,\n nodes: AnyNode[] | ParentNode,\n): boolean {\n return (Array.isArray(nodes) ? nodes : [nodes]).some(\n (node) =>\n (isTag(node) && test(node)) ||\n (hasChildren(node) && existsOne(test, node.children)),\n );\n}\n\n/**\n * Search an array of nodes and their children for elements passing a test function.\n *\n * Same as `find`, but limited to elements and with less options, leading to reduced complexity.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns All nodes passing `test`.\n */\nexport function findAll(\n test: (element: Element) => boolean,\n nodes: AnyNode[] | ParentNode,\n): Element[] {\n const result = [];\n const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];\n const indexStack = [0];\n\n for (;;) {\n if (indexStack[0] >= nodeStack[0].length) {\n if (nodeStack.leLine truncated
|
||||
{"offset": {"line": 1863, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/domutils/dist/stringify.js","sources":["file:///Users/home/Projects/forumlify/node_modules/domutils/src/stringify.ts"],"sourcesContent":["import renderHTML, { type DomSerializerOptions } from \"dom-serializer\";\nimport { ElementType } from \"domelementtype\";\nimport {\n type AnyNode,\n hasChildren,\n isCDATA,\n isComment,\n isTag,\n isText,\n} from \"domhandler\";\n\n/**\n * @category Stringify\n * @deprecated Use the `dom-serializer` module directly.\n * @param node Node to get the outer HTML of.\n * @param options Options for serialization.\n * @returns `node`'s outer HTML.\n */\nexport function getOuterHTML(\n node: AnyNode | ArrayLike<AnyNode>,\n options?: DomSerializerOptions,\n): string {\n return renderHTML(node, options);\n}\n\n/**\n * @category Stringify\n * @deprecated Use the `dom-serializer` module directly.\n * @param node Node to get the inner HTML of.\n * @param options Options for serialization.\n * @returns `node`'s inner HTML.\n */\nexport function getInnerHTML(\n node: AnyNode,\n options?: DomSerializerOptions,\n): string {\n return hasChildren(node)\n ? node.children.map((node) => getOuterHTML(node, options)).join(\"\")\n : \"\";\n}\n\n/**\n * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags. Ignores comments.\n *\n * @category Stringify\n * @deprecated Use `textContent` instead.\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n */\nexport function getText(node: AnyNode | AnyNode[]): string {\n if (Array.isArray(node)) return node.map(getText).join(\"\");\n if (isTag(node)) return node.name === \"br\" ? \"\\n\" : getText(node.children);\n if (isCDATA(node)) return getText(node.children);\n if (isText(node)) return node.data;\n return \"\";\n}\n\n/**\n * Get a node's text content. Ignores comments.\n *\n * @category Stringify\n * @param node Node to get the text content of.\n * @returns `node`'s text content.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}\n */\nexport function textContent(node: AnyNode | AnyNode[]): string {\n if (Array.isArray(node)) return node.map(textContent).join(\"\");\n if (hasChildren(node) && !isComment(node)) {\n return textContent(node.children);\n }\n if (isText(node)) return node.data;\n return \"\";\n}\n\n/**\n * Get a node's inner text, ignoring `<script>` and `<style>` tags. Ignores comments.\n *\n * @category Stringify\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}\n */\nexport function innerText(node: AnyNode | AnyNode[]): string {\n if (Array.isArray(node)) return node.map(innerText).join(\"\");\n if (hasChildren(node) && (node.type === ElementType.Tag || isCDATA(node))) {\n return innerText(node.children);\n }\n if (isText(node)) return node.data;\n return \"\";\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,UAAyC,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAEH,WAAW,EACX,OAAO,EACP,SAAS,EACT,KAAK,EACL,MAAM,GACT,MAAM,YAAY,CAAC;;;;AASd,SAAU,YAAY,CACxB,IAAkC,EAClC,OAA8B;IAE9B,WAAO,6JAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AASK,SAAU,YAAY,CACxB,IAAa,EACb,OAA8B;IAE9B,WAAO,yJAAW,EAAC,IAAI,CAAC,GAClB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAG,CAAD,WAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GACjE,EAAE,CAAC;AACb,CAAC;AAUK,SAAU,OAAO,CAAC,IAAyB;IAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3D,QAAI,mJAAK,EAAC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3E,QAAI,qJAAO,EAAC,IAAI,CAAC,EAAE,OAAO,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjD,QAAI,oJAAM,EAAC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC;AACd,CAAC;AAUK,SAAU,WAAW,CAAC,IAAyB;IACjD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/D,QAAI,yJAAW,EAAC,IAAI,CAAC,IAAI,KAAC,uJAAS,EAAC,IAAI,CAAC,EAAE,CAAC;QACxC,OAAO,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IACD,QAAI,oJAAM,EAAC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC;AACd,CAAC;AAUK,SAAU,SAAS,CAAC,IAAyB;IAC/C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7D,QAAI,yJAAW,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,8JAAW,CAAC,GAAG,QAAI,qJAAO,EAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACxE,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IACD,QAAI,oJAAM,EAAC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC;AACd,CAAC"}},
|
||||
{"offset": {"line": 1914, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/domutils/dist/traversal.js","sources":["file:///Users/home/Projects/forumlify/node_modules/domutils/src/traversal.ts"],"sourcesContent":["import {\n type AnyNode,\n type ChildNode,\n type Element,\n hasChildren,\n isTag,\n type ParentNode,\n} from \"domhandler\";\n\n/**\n * Get a node's children.\n *\n * @category Traversal\n * @param element Node to get the children of.\n * @returns `element`'s children, or an empty array.\n */\nexport function getChildren(element: AnyNode): ChildNode[] {\n return hasChildren(element) ? element.children : [];\n}\n\n/**\n * Get a node's parent.\n *\n * @category Traversal\n * @param element Node to get the parent of.\n * @returns `element`'s parent node, or `null` if `element` is a root node.\n */\nexport function getParent(element: AnyNode): ParentNode | null;\nexport function getParent(element: AnyNode): ParentNode | null {\n return element.parent || null;\n}\n\n/**\n * Gets an elements siblings, including the element itself.\n *\n * Attempts to get the children through the element's parent first. If we don't\n * have a parent (the element is a root node), we walk the element's `prev` &\n * `next` to get all remaining nodes.\n *\n * @category Traversal\n * @param element Element to get the siblings of.\n * @returns `element`'s siblings, including `element`.\n */\nexport function getSiblings(element: AnyNode): AnyNode[] {\n const parent = getParent(element);\n if (parent != null) return getChildren(parent);\n\n const siblings = [element];\n let { prev, next } = element;\n while (prev != null) {\n siblings.unshift(prev);\n ({ prev } = prev);\n }\n while (next != null) {\n siblings.push(next);\n ({ next } = next);\n }\n return siblings;\n}\n\n/**\n * Gets an attribute from an element.\n *\n * @category Traversal\n * @param element Element to check.\n * @param name Attribute name to retrieve.\n * @returns The element's attribute value, or `undefined`.\n */\nexport function getAttributeValue(\n element: Element,\n name: string,\n): string | undefined {\n const { attribs } = element as {\n attribs?: Record<string, string | undefined>;\n };\n return attribs?.[name];\n}\n\n/**\n * Checks whether an element has an attribute.\n *\n * @category Traversal\n * @param element Element to check.\n * @param name Attribute name to look for.\n * @returns Returns whether `element` has the attribute `name`.\n */\nexport function hasAttrib(element: Element, name: string): boolean {\n const { attribs } = element as { attribs?: Record<string, string | null> };\n return (\n attribs != null && Object.hasOwn(attribs, name) && attribs[name] != null\n );\n}\n\n/**\n * Get the tag name of an element.\n *\n * @category Traversal\n * @param element The element to get the name for.\n * @returns The tag name of `element`.\n */\nexport function getName(element: Element): string {\n return element.name;\n}\n\n/**\n * Returns the next element sibling of a node.\n *\n * @category Traversal\n * @param element The element to get the next sibling of.\n * @returns `element`'s next sibling that is a tag, or `null` if there is no next\n * sibling.\n */\nexport function nextElementSibling(element: AnyNode): Element | null {\n let { next } = element;\n while (next !== null && !isTag(next)) ({ next } = next);\n return next;\n}\n\n/**\n * Returns the previous element sibling of a node.\n *\n * @category Traversal\n * @param element The element to get the previous sibling of.\n * @returns `element`'s previous sibling that is a tag, or `null` if there is no\n * previous sibling.\n */\n// eslint-disable-next-line unicorn/prevent-abbreviations -- Keep public API name for backwards compatibility.\nexport function prevElementSibling(element: AnyNode): Element | null {\n let { prev } = element;\n while (prev !== null && !isTag(prev)) ({ prev } = prev);\n return prev;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAIH,WAAW,EACX,KAAK,GAER,MAAM,YAAY,CAAC;;AASd,SAAU,WAAW,CAAC,OAAgB;IACxC,WAAO,yJAAW,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;AACxD,CAAC;AAUK,SAAU,SAAS,CAAC,OAAgB;IACtC,OAAO,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC;AAClC,CAAC;AAaK,SAAU,WAAW,CAAC,OAAgB;IACxC,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAClC,IAAI,MAAM,IAAI,IAAI,EAAE,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;IAE/C,MAAM,QAAQ,GAAG;QAAC,OAAO;KAAC,CAAC;IAC3B,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAC7B,MAAO,IAAI,IAAI,IAAI,CAAE,CAAC;QAClB,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IACtB,CAAC;IACD,MAAO,IAAI,IAAI,IAAI,CAAE,CAAC;QAClB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAUK,SAAU,iBAAiB,CAC7B,OAAgB,EAChB,IAAY;IAEZ,MAAM,EAAE,OAAO,EAAE,GAAG,OAEnB,CAAC;IACF,OAAO,OAAO,EAAE,CAAC,IAAILine truncated
|
||||
{"offset": {"line": 1982, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/entities/dist/decode-codepoint.js","sources":["file:///Users/home/Projects/forumlify/node_modules/entities/src/decode-codepoint.ts"],"sourcesContent":["// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134\n\nconst decodeMap = new Map([\n [0, 65_533],\n // C1 Unicode control character reference replacements\n [128, 8364],\n [130, 8218],\n [131, 402],\n [132, 8222],\n [133, 8230],\n [134, 8224],\n [135, 8225],\n [136, 710],\n [137, 8240],\n [138, 352],\n [139, 8249],\n [140, 338],\n [142, 381],\n [145, 8216],\n [146, 8217],\n [147, 8220],\n [148, 8221],\n [149, 8226],\n [150, 8211],\n [151, 8212],\n [152, 732],\n [153, 8482],\n [154, 353],\n [155, 8250],\n [156, 339],\n [158, 382],\n [159, 376],\n]);\n\n/**\n * Replace the given code point with a replacement character if it is a\n * surrogate or is outside the valid range. Otherwise return the code\n * point unchanged.\n * @param codePoint Unicode code point to convert.\n */\nexport function replaceCodePoint(codePoint: number): number {\n if (\n (codePoint >= 0xd8_00 && codePoint <= 0xdf_ff) ||\n codePoint > 0x10_ff_ff\n ) {\n return 0xff_fd;\n }\n\n return decodeMap.get(codePoint) ?? codePoint;\n}\n"],"names":[],"mappings":";;;;AAAA,qHAAqH;AAErH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACtB;QAAC,CAAC;QAAE,MAAM;KAAC;IACX,sDAAsD;IACtD;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,GAAG;KAAC;IACV;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,GAAG;KAAC;IACV;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,GAAG;KAAC;IACV;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,GAAG;KAAC;IACV;QAAC,GAAG;QAAE,GAAG;KAAC;IACV;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,GAAG;KAAC;IACV;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,GAAG;KAAC;IACV;QAAC,GAAG;QAAE,IAAI;KAAC;IACX;QAAC,GAAG;QAAE,GAAG;KAAC;IACV;QAAC,GAAG;QAAE,GAAG;KAAC;IACV;QAAC,GAAG;QAAE,GAAG;KAAC;CACb,CAAC,CAAC;AAQG,SAAU,gBAAgB,CAAC,SAAiB;IAC9C,IACI,AAAC,SAAS,IAAI,OAAO,IAAI,SAAS,IAAI,OAAO,CAAC,GAC9C,SAAS,GAAG,UAAU,EACxB,CAAC;QACC,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,OAAO,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC;AACjD,CAAC"}},
|
||||
{"offset": {"line": 2112, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/entities/dist/decode.js","sources":["file:///Users/home/Projects/forumlify/node_modules/entities/src/decode.ts"],"sourcesContent":["import { replaceCodePoint } from \"./decode-codepoint.js\";\nimport { htmlDecodeTree } from \"./generated/decode-data-html.js\";\nimport { xmlDecodeTree } from \"./generated/decode-data-xml.js\";\nimport { BinTrieFlags } from \"./internal/bin-trie-flags.js\";\n\nconst enum CharCodes {\n NUM = 35, // \"#\"\n SEMI = 59, // \";\"\n EQUALS = 61, // \"=\"\n ZERO = 48, // \"0\"\n NINE = 57, // \"9\"\n LOWER_A = 97, // \"a\"\n LOWER_F = 102, // \"f\"\n LOWER_X = 120, // \"x\"\n LOWER_Z = 122, // \"z\"\n UPPER_A = 65, // \"A\"\n UPPER_F = 70, // \"F\"\n UPPER_Z = 90, // \"Z\"\n}\n\n/** Bit that needs to be set to convert an upper case ASCII character to lower case */\nconst TO_LOWER_BIT = 0b10_0000;\n\nfunction isNumber(code: number): boolean {\n return code >= CharCodes.ZERO && code <= CharCodes.NINE;\n}\n\nfunction isHexadecimalCharacter(code: number): boolean {\n return (\n (code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||\n (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)\n );\n}\n\nfunction isAsciiAlphaNumeric(code: number): boolean {\n return (\n (code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||\n (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||\n isNumber(code)\n );\n}\n\n/**\n * Checks if the given character is a valid end character for an entity in an attribute.\n *\n * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n * @param code Code point to decode.\n */\nfunction isEntityInAttributeInvalidEnd(code: number): boolean {\n return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);\n}\n\nconst enum EntityDecoderState {\n EntityStart,\n NumericStart,\n NumericDecimal,\n NumericHex,\n NamedEntity,\n}\n\n/**\n * Decoding mode for named entities.\n */\nexport enum DecodingMode {\n /** Entities in text nodes that can end with any character. */\n Legacy = 0,\n /** Only allow entities terminated with a semicolon. */\n Strict = 1,\n /** Entities in attributes have limitations on ending characters. */\n Attribute = 2,\n}\n\n/**\n * Producers for character reference errors as defined in the HTML spec.\n */\nexport interface EntityErrorProducer {\n missingSemicolonAfterCharacterReference(): void;\n absenceOfDigitsInNumericCharacterReference(\n consumedCharacters: number,\n ): void;\n validateNumericCharacterReference(code: number): void;\n}\n\n/**\n * Token decoder with support of writing partial entities.\n */\nexport class EntityDecoder {\n constructor(\n /** The tree used to decode entities. */\n // biome-ignore lint/correctness/noUnusedPrivateClassMembers: False positive\n private readonly decodeTree: Uint16Array,\n /**\n * The function that is called when a codepoint is decoded.\n *\n * For multi-byte named entities, this will be called multiple times,\n * with the second codepoint, and the same `consumed` value.\n * @param codepoint The decoded codepoint.\n * @param consumed The number of bytes consumed by the decoder.\n */\n private readonly emitCodePoint: (cp: number, consumed: number) => void,\n /** An object that is used to produce errors. */\n private readonly errors?: EntityErrorProducer | undefined,\n ) {}\n\n /** The current state of the decoder. */\n private state = EntityDecoderState.EntityStart;\n /** Characters that were consumed while parsing an entity. */\n private consumed = 1;\n /**\n * The result of the entity.\n *\n * Either the result index of a numeric entity, or the codepoint of a\n * numeric entity.\n */\n private result = 0;\n\n /** The current index in the decode tree. */\n private treeIndex = 0;\n /** The number of characters that were consumed in excess. */\n private excess = 1;\n /** The mode in which the decoder is operating. */\n private decodeMode = DecodingMode.Strict;\n /** The number of characters that have been consumed in the current run. */\n private runConsumed = 0;\n\n /**\n * Resets the instance to make it reusable.\n * @param decodeMode Entity decoding mode to use.\n */\n startEntity(decodeMode: DecodingMode): void {\n this.decodeMode = decodeMode;\n this.state = EntityDecoderState.EntityStart;\n this.result = 0;\n this.treeIndex = 0;\n this.excess = 1;\n this.consumed = 1;\n this.runConsumed = 0;\n }\n\n /**\n * Write an entity to the decoder. This cLine truncated
|
||||
{"offset": {"line": 2585, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/entities/dist/escape.js","sources":["file:///Users/home/Projects/forumlify/node_modules/entities/src/escape.ts"],"sourcesContent":["const xmlCodeMap = new Map([\n [34, \""\"],\n [38, \"&\"],\n [39, \"'\"],\n [60, \"<\"],\n [62, \">\"],\n]);\n\n// For compatibility with node < 4, we wrap `codePointAt`\n/**\n * Read a code point at a given index.\n * @param input Input string to encode or decode.\n * @param index Current read position in the input string.\n */\nexport const getCodePoint: (c: string, index: number) => number =\n typeof String.prototype.codePointAt === \"function\"\n ? (input: string, index: number): number => input.codePointAt(index)!\n : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n (c: string, index: number): number =>\n (c.charCodeAt(index) & 0xfc_00) === 0xd8_00\n ? (c.charCodeAt(index) - 0xd8_00) * 0x4_00 +\n c.charCodeAt(index + 1) -\n 0xdc_00 +\n 0x1_00_00\n : c.charCodeAt(index);\n\n/**\n * Bitset for ASCII characters that need to be escaped in XML.\n */\nexport const XML_BITSET_VALUE = 0x50_00_00_c4; // 32..63 -> 34 (\"),38 (&),39 ('),60 (<),62 (>)\n\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities. Uses a fast bitset scan instead of RegExp.\n *\n * If a character has no equivalent entity, a numeric hexadecimal reference\n * (eg. `ü`) will be used.\n * @param input Input string to encode or decode.\n */\nexport function encodeXML(input: string): string {\n let out: string | undefined;\n let last = 0;\n const { length } = input;\n\n for (let index = 0; index < length; index++) {\n const char = input.charCodeAt(index);\n\n // Check for ASCII chars that don't need escaping\n if (\n char < 0x80 &&\n (((XML_BITSET_VALUE >>> char) & 1) === 0 || char >= 64 || char < 32)\n ) {\n continue;\n }\n\n if (out === undefined) out = input.substring(0, index);\n else if (last !== index) out += input.substring(last, index);\n\n if (char < 64) {\n // Known replacement\n out += xmlCodeMap.get(char)!;\n last = index + 1;\n continue;\n }\n\n // Non-ASCII: encode as numeric entity (handle surrogate pair)\n const cp = getCodePoint(input, index);\n out += `&#x${cp.toString(16)};`;\n if (cp !== char) index++; // Skip trailing surrogate\n last = index + 1;\n }\n\n if (out === undefined) return input;\n if (last < length) out += input.substr(last);\n return out;\n}\n\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `ü`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n * @param data String to escape.\n */\nexport const escape: typeof encodeXML = encodeXML;\n\n/**\n * Creates a function that escapes all characters matched by the given regular\n * expression using the given map of characters to escape to their entities.\n * @param regex Regular expression to match characters to escape.\n * @param map Map of characters to escape to their entities.\n * @returns Function that escapes all characters matched by the given regular\n * expression using the given map of characters to escape to their entities.\n */\nfunction getEscaper(\n regex: RegExp,\n map: Map<number, string>,\n): (data: string) => string {\n return function escape(data: string): string {\n let match: RegExpExecArray | null;\n let lastIndex = 0;\n let result = \"\";\n\n while ((match = regex.exec(data))) {\n if (lastIndex !== match.index) {\n result += data.substring(lastIndex, match.index);\n }\n\n // We know that this character will be in the map.\n result += map.get(match[0].charCodeAt(0))!;\n\n // Every match will be of length 1\n lastIndex = match.index + 1;\n }\n\n return result + data.substring(lastIndex);\n };\n}\n\n/**\n * Encodes all characters not valid in XML documents using XML entities.\n *\n * Note that the output will be character-set dependent.\n * @param data String to escape.\n */\nexport const escapeUTF8: (data: string) => string = /* #__PURE__ */ getEscaper(\n /[\"&'<>]/g,\n xmlCodeMap,\n);\n\n/**\n * Encodes all characters that have to be escaped in HTML attributes,\n * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n * @param data String to escape.\n */\nexport const escapeAttribute: (data: string) => string =\n /* #__PURE__ */ gLine truncated
|
||||
{"offset": {"line": 2715, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/entities/dist/generated/decode-data-html.js","sources":["file:///Users/home/Projects/forumlify/node_modules/entities/src/generated/decode-data-html.ts"],"sourcesContent":["// Generated using scripts/write-decode-map.ts\n\nimport { decodeBase64 } from \"../internal/decode-shared.js\";\n/** Packed HTML decode trie data. */\nexport const htmlDecodeTree: Uint16Array = /* #__PURE__ */ decodeBase64(\n \"QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcLine truncated
|
||||
{"offset": {"line": 2727, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/entities/dist/generated/decode-data-xml.js","sources":["file:///Users/home/Projects/forumlify/node_modules/entities/src/generated/decode-data-xml.ts"],"sourcesContent":["// Generated using scripts/write-decode-map.ts\n\nimport { decodeBase64 } from \"../internal/decode-shared.js\";\n/** Packed XML decode trie data. */\nexport const xmlDecodeTree: Uint16Array = /* #__PURE__ */ decodeBase64(\n \"AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg\",\n);\n"],"names":[],"mappings":";;;;AAAA,8CAA8C;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;;AAErD,MAAM,aAAa,GAAgB,aAAA,EAAe,KAAC,gLAAY,EAClE,kEAAkE,CACrE,CAAC"}},
|
||||
{"offset": {"line": 2739, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/entities/dist/internal/bin-trie-flags.js","sources":["file:///Users/home/Projects/forumlify/node_modules/entities/src/internal/bin-trie-flags.ts"],"sourcesContent":["/**\n * Bit flags & masks for the binary trie encoding used for entity decoding.\n *\n * Bit layout (16 bits total):\n * 15..14 VALUE_LENGTH (+1 encoding; 0 => no value)\n * 13 FLAG13. If valueLength>0: semicolon required flag (implicit ';').\n * If valueLength==0: compact run flag.\n * 12..7 BRANCH_LENGTH Branch length (0 => single branch in 6..0 if jumpOffset==char) OR run length (when compact run)\n * 6..0 JUMP_TABLE Jump offset (jump table) OR single-branch char code OR first run char\n */\nexport enum BinTrieFlags {\n VALUE_LENGTH = 0b1100_0000_0000_0000,\n FLAG13 = 0b0010_0000_0000_0000,\n BRANCH_LENGTH = 0b0001_1111_1000_0000,\n JUMP_TABLE = 0b0000_0000_0111_1111,\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;;;;AACH,IAAY,YAKX;AALD,CAAA,SAAY,YAAY;IACpB,YAAA,CAAA,YAAA,CAAA,eAAA,GAAA,MAAA,GAAA,cAAoC,CAAA;IACpC,YAAA,CAAA,YAAA,CAAA,SAAA,GAAA,KAAA,GAAA,QAA8B,CAAA;IAC9B,YAAA,CAAA,YAAA,CAAA,gBAAA,GAAA,KAAA,GAAA,eAAqC,CAAA;IACrC,YAAA,CAAA,YAAA,CAAA,aAAA,GAAA,IAAA,GAAA,YAAkC,CAAA;AACtC,CAAC,EALW,YAAY,IAAA,CAAZ,YAAY,GAAA,CAAA,CAAA,GAKvB"}},
|
||||
{"offset": {"line": 2763, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/entities/dist/internal/decode-shared.js","sources":["file:///Users/home/Projects/forumlify/node_modules/entities/src/internal/decode-shared.ts"],"sourcesContent":["/**\n * Shared base64 decode helper for generated decode data.\n * Assumes global atob is available.\n * @param input Input string to encode or decode.\n */\nexport function decodeBase64(input: string): Uint16Array {\n const binary: string = atob(input);\n const evenLength = binary.length & ~1; // Round down to even length\n const out = new Uint16Array(evenLength / 2);\n\n for (let index = 0, outIndex = 0; index < evenLength; index += 2) {\n const lo = binary.charCodeAt(index);\n const hi = binary.charCodeAt(index + 1);\n out[outIndex++] = lo | (hi << 8);\n }\n\n return out;\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;;AACG,SAAU,YAAY,CAAC,KAAa;IACtC,MAAM,MAAM,GAAW,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,4BAA4B;IACnE,MAAM,GAAG,GAAG,IAAI,WAAW,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAE5C,IAAK,IAAI,KAAK,GAAG,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE,KAAK,GAAG,UAAU,EAAE,KAAK,IAAI,CAAC,CAAE,CAAC;QAC/D,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACpC,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACxC,GAAG,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,AAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC"}},
|
||||
{"offset": {"line": 2786, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/escape-string-regexp/index.js"],"sourcesContent":["'use strict';\n\nmodule.exports = string => {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a \\unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n};\n"],"names":["module","exports","string","TypeError","replace"],"mappings":"AAEAA,OAAOC,OAAO,GAAGC,CAAAA;IAChB,IAAI,OAAOA,WAAW,UAAU;QAC/B,MAAM,IAAIC,UAAU;IACrB;IAEA,kFAAkF;IAClF,6JAA6J;IAC7J,OAAOD,OACLE,OAAO,CAAC,uBAAuB,QAC/BA,OAAO,CAAC,MAAM;AACjB","ignoreList":[0]}},
|
||||
{"offset": {"line": 2798, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/htmlparser2/dist/Parser.js","sources":["file:///Users/home/Projects/forumlify/node_modules/htmlparser2/src/Parser.ts"],"sourcesContent":["const { fromCodePoint } = String;\n\nimport Tokenizer, { type Callbacks, QuoteType } from \"./Tokenizer.js\";\n\nconst formTags = new Set([\n \"input\",\n \"option\",\n \"optgroup\",\n \"select\",\n \"button\",\n \"datalist\",\n \"textarea\",\n]);\nconst pTag = new Set([\"p\"]);\nconst headingTags = new Set([\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"p\"]);\nconst tableSectionTags = new Set([\"thead\", \"tbody\"]);\nconst ddtTags = new Set([\"dd\", \"dt\"]);\nconst rtpTags = new Set([\"rt\", \"rp\"]);\n\nconst openImpliesClose = new Map<string, Set<string>>([\n [\"tr\", new Set([\"tr\", \"th\", \"td\"])],\n [\"th\", new Set([\"th\"])],\n [\"td\", new Set([\"thead\", \"th\", \"td\"])],\n [\"body\", new Set([\"head\", \"link\", \"script\"])],\n [\"a\", new Set([\"a\"])],\n [\"li\", new Set([\"li\"])],\n [\"p\", pTag],\n [\"h1\", headingTags],\n [\"h2\", headingTags],\n [\"h3\", headingTags],\n [\"h4\", headingTags],\n [\"h5\", headingTags],\n [\"h6\", headingTags],\n [\"select\", formTags],\n [\"input\", formTags],\n [\"output\", formTags],\n [\"button\", formTags],\n [\"datalist\", formTags],\n [\"textarea\", formTags],\n [\"option\", new Set([\"option\"])],\n [\"optgroup\", new Set([\"optgroup\", \"option\"])],\n [\"dd\", ddtTags],\n [\"dt\", ddtTags],\n [\"address\", pTag],\n [\"article\", pTag],\n [\"aside\", pTag],\n [\"blockquote\", pTag],\n [\"details\", pTag],\n [\"div\", pTag],\n [\"dl\", pTag],\n [\"fieldset\", pTag],\n [\"figcaption\", pTag],\n [\"figure\", pTag],\n [\"footer\", pTag],\n [\"form\", pTag],\n [\"header\", pTag],\n [\"hr\", pTag],\n [\"main\", pTag],\n [\"nav\", pTag],\n [\"ol\", pTag],\n [\"pre\", pTag],\n [\"section\", pTag],\n [\"table\", pTag],\n [\"ul\", pTag],\n [\"rt\", rtpTags],\n [\"rp\", rtpTags],\n [\"tbody\", tableSectionTags],\n [\"tfoot\", tableSectionTags],\n]);\n\nconst DOCUMENT_TYPE = \"doctype\";\n\nconst voidElements = new Set([\n \"area\",\n \"base\",\n \"basefont\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"img\",\n \"input\",\n \"isindex\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\n\nconst foreignContextElements = new Set([\"math\", \"svg\"]);\n\n/**\n * Elements that can be used to integrate HTML content within foreign namespaces (e.g., SVG or MathML).\n *\n * Entries must use the SVG-adjusted casing (e.g. \"foreignObject\" not\n * \"foreignobject\") since they are compared against adjusted tag names.\n */\nconst htmlIntegrationElements = new Set([\n \"mi\",\n \"mo\",\n \"mn\",\n \"ms\",\n \"mtext\",\n \"annotation-xml\",\n \"foreignObject\",\n \"desc\",\n \"title\",\n]);\n\nconst svgTagNameAdjustments = new Map<string, string>([\n [\"altglyph\", \"altGlyph\"],\n [\"altglyphdef\", \"altGlyphDef\"],\n [\"altglyphitem\", \"altGlyphItem\"],\n [\"animatecolor\", \"animateColor\"],\n [\"animatemotion\", \"animateMotion\"],\n [\"animatetransform\", \"animateTransform\"],\n [\"clippath\", \"clipPath\"],\n [\"feblend\", \"feBlend\"],\n [\"fecolormatrix\", \"feColorMatrix\"],\n [\"fecomponenttransfer\", \"feComponentTransfer\"],\n [\"fecomposite\", \"feComposite\"],\n [\"feconvolvematrix\", \"feConvolveMatrix\"],\n [\"fediffuselighting\", \"feDiffuseLighting\"],\n [\"fedisplacementmap\", \"feDisplacementMap\"],\n [\"fedistantlight\", \"feDistantLight\"],\n [\"fedropshadow\", \"feDropShadow\"],\n [\"feflood\", \"feFlood\"],\n [\"fefunca\", \"feFuncA\"],\n [\"fefuncb\", \"feFuncB\"],\n [\"fefuncg\", \"feFuncG\"],\n [\"fefuncr\", \"feFuncR\"],\n [\"fegaussianblur\", \"feGaussianBlur\"],\n [\"feimage\", \"feImage\"],\n [\"femerge\", \"feMerge\"],\n [\"femergenode\", \"feMergeNode\"],\n [\"femorphology\", \"feMorphology\"],\n [\"feoffset\", \"feOffset\"],\n [\"fepointlight\", \"fePointLight\"],\n [\"fespecularlighting\", \"feSpecularLighting\"],\n [\"fespotlight\", \"feSpotLight\"],\n [\"fetile\", \"feTile\"],\n [\"feturbulence\", \"feTurbulence\"],\n [\"foreignobject\", \"foreignObject\"],\n [\"glyphref\", \"glyphRef\"],\n [\"lineargradient\", \"linearGradient\"],\n [\"radialgradient\", \"radialGradient\"],\n [\"textpath\", \"textPath\"],\n]);\n\nconst enum ForeignContext {\n None,\n Svg,\n MathML,\n}\n\n/**\n * Options for the streaming HTML/XML parser.\n */\nexport interface ParserOptions {\n /**\n * Indicates whether special tags (`<script>`, `<style>`, and `<title>`) Line truncated
|
||||
{"offset": {"line": 3685, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/htmlparser2/dist/Tokenizer.js","sources":["file:///Users/home/Projects/forumlify/node_modules/htmlparser2/src/Tokenizer.ts"],"sourcesContent":["import {\n DecodingMode,\n EntityDecoder,\n htmlDecodeTree,\n xmlDecodeTree,\n} from \"entities/decode\";\n\nconst enum CharCodes {\n Tab = 0x9, // \"\\t\"\n NewLine = 0xa, // \"\\n\"\n FormFeed = 0xc, // \"\\f\"\n CarriageReturn = 0xd, // \"\\r\"\n Space = 0x20, // \" \"\n ExclamationMark = 0x21, // \"!\"\n Number = 0x23, // \"#\"\n Amp = 0x26, // \"&\"\n SingleQuote = 0x27, // \"'\"\n DoubleQuote = 0x22, // '\"'\n Dash = 0x2d, // \"-\"\n Slash = 0x2f, // \"/\"\n Zero = 0x30, // \"0\"\n Nine = 0x39, // \"9\"\n Semi = 0x3b, // \";\"\n Lt = 0x3c, // \"<\"\n Eq = 0x3d, // \"=\"\n Gt = 0x3e, // \">\"\n Questionmark = 0x3f, // \"?\"\n UpperA = 0x41, // \"A\"\n LowerA = 0x61, // \"a\"\n UpperF = 0x46, // \"F\"\n LowerF = 0x66, // \"f\"\n UpperZ = 0x5a, // \"Z\"\n LowerZ = 0x7a, // \"z\"\n LowerX = 0x78, // \"x\"\n OpeningSquareBracket = 0x5b, // \"[\"\n}\n\n/** All the states the tokenizer can be in. */\nconst enum State {\n Text = 1,\n BeforeTagName, // After <\n InTagName,\n InSelfClosingTag,\n BeforeClosingTagName,\n InClosingTagName,\n AfterClosingTagName,\n\n // Attributes\n BeforeAttributeName,\n InAttributeName,\n AfterAttributeName,\n BeforeAttributeValue,\n InAttributeValueDq, // \"\n InAttributeValueSq, // '\n InAttributeValueNq,\n\n // Declarations\n BeforeDeclaration, // !\n InDeclaration,\n\n // Processing instructions\n InProcessingInstruction, // ?\n\n // Comments & CDATA\n BeforeComment,\n CDATASequence,\n DeclarationSequence,\n InSpecialComment,\n InCommentLike,\n\n // Special tags\n SpecialStartSequence,\n InSpecialTag,\n InPlainText,\n\n InEntity,\n}\n\nfunction isWhitespace(c: number): boolean {\n return (\n c === CharCodes.Space ||\n c === CharCodes.NewLine ||\n c === CharCodes.Tab ||\n c === CharCodes.FormFeed ||\n c === CharCodes.CarriageReturn\n );\n}\n\nfunction isEndOfTagSection(c: number): boolean {\n return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace(c);\n}\n\nfunction isASCIIAlpha(c: number): boolean {\n return (\n (c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||\n (c >= CharCodes.UpperA && c <= CharCodes.UpperZ)\n );\n}\n\n/**\n * Quote style used for parsed attributes.\n */\nexport enum QuoteType {\n NoValue = 0,\n Unquoted = 1,\n Single = 2,\n Double = 3,\n}\n\n/**\n * Low-level tokenizer callback interface.\n */\nexport interface Callbacks {\n onattribdata(start: number, endIndex: number): void;\n onattribentity(codepoint: number): void;\n onattribend(quote: QuoteType, endIndex: number): void;\n onattribname(start: number, endIndex: number): void;\n oncdata(start: number, endIndex: number, endOffset: number): void;\n onclosetag(start: number, endIndex: number): void;\n oncomment(start: number, endIndex: number, endOffset: number): void;\n ondeclaration(start: number, endIndex: number): void;\n onend(): void;\n onopentagend(endIndex: number): void;\n onopentagname(start: number, endIndex: number): void;\n onprocessinginstruction(start: number, endIndex: number): void;\n onselfclosingtag(endIndex: number): void;\n ontext(start: number, endIndex: number): void;\n ontextentity(codepoint: number, endIndex: number): void;\n isInForeignContext?(): boolean;\n}\n\n/**\n * Sequences used to match longer strings.\n *\n * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End\n * sequences with an increased offset.\n */\nconst Sequences = {\n Empty: new Uint8Array(0),\n Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[\n CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]), // ]]>\n CommentEnd: new Uint8Array([0x2d, 0x2d, 0x21, 0x3e]), // `--!>`\n Doctype: new Uint8Array([0x64, 0x6f, 0x63, 0x74, 0x79, 0x70, 0x65]), // `doctype`\n IframeEnd: new Uint8Array([0x3c, 0x2f, 0x69, 0x66, 0x72, 0x61, 0x6d, 0x65]), // `</iframe`\n NoembedEnd: new Uint8Array([\n 0x3c, 0x2f, 0x6e, 0x6f, 0x65, 0x6d, 0x62, 0x65, 0x64,\n ]), // `</noembed`\n NoframesEnd: new Uint8Array([\n 0x3c, 0x2f, 0x6e, 0x6f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73,\n ]), // `</noframes`\n Plaintext: new Uint8Array([\n 0x3c, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74,\n ]), // `</plaintext`\n ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `</script`\n StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]), // `</style`\n TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`\n Line truncated
|
||||
{"offset": {"line": 4806, "column": 0}, "map": {"version":3,"file":"turbopack:///[project]/node_modules/htmlparser2/dist/index.js","sources":["file:///Users/home/Projects/forumlify/node_modules/htmlparser2/src/index.ts"],"sourcesContent":["import { Parser, type ParserOptions } from \"./Parser.js\";\n\nexport type { Handler, ParserOptions } from \"./Parser.js\";\nexport { Parser } from \"./Parser.js\";\n\nimport {\n type Document,\n DomHandler,\n type DomHandlerOptions,\n type Element,\n} from \"domhandler\";\n\nexport {\n DomHandler,\n // Old name for DomHandler\n DomHandler as DefaultHandler,\n type DomHandlerOptions,\n} from \"domhandler\";\n\n/**\n * Combined parser and handler options.\n */\nexport type Options = ParserOptions & DomHandlerOptions;\n\n// Helper methods\n\n/**\n * Parses the data, returns the resulting document.\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM handler.\n */\nexport function parseDocument(data: string, options?: Options): Document {\n const handler = new DomHandler(undefined, options);\n new Parser(handler, options).end(data);\n return handler.root;\n}\n\n/**\n * Creates a parser instance, with an attached DOM handler.\n * @param callback A callback that will be called once parsing has been completed, with the resulting document.\n * @param options Optional options for the parser and DOM handler.\n * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nexport function createDocumentStream(\n callback: (error: Error | null, document: Document) => void,\n options?: Options,\n elementCallback?: (element: Element) => void,\n): Parser {\n const handler: DomHandler = new DomHandler(\n (error: Error | null) => callback(error, handler.root),\n options,\n elementCallback,\n );\n return new Parser(handler, options);\n}\n\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\nexport * as ElementType from \"domelementtype\";\nexport {\n type Callbacks as TokenizerCallbacks,\n default as Tokenizer,\n QuoteType,\n} from \"./Tokenizer.js\";\n\nimport { type Feed, getFeed } from \"domutils\";\n\nexport { type Feed, getFeed } from \"domutils\";\n\nconst parseFeedDefaultOptions = { xmlMode: true };\n\n/**\n * Parse a feed.\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`.\n */\nexport function parseFeed(\n feed: string,\n options: Options = parseFeedDefaultOptions,\n): Feed | null {\n return getFeed(parseDocument(feed, options).children);\n}\n\nexport * as DomUtils from \"domutils\";\n"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AAKzD,OAAO,EAEH,UAAU,GAGb,MAAM,YAAY,CAAC;AAyDpB,OAAO,EAAa,OAAO,EAAE,MAAM,UAAU,CAAC;;;;;AApCxC,SAAU,aAAa,CAAC,IAAY,EAAE,OAAiB;IACzD,MAAM,OAAO,GAAG,IAAI,yKAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnD,IAAI,uJAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC;AACxB,CAAC;AAQK,SAAU,oBAAoB,CAChC,QAA2D,EAC3D,OAAiB,EACjB,eAA4C;IAE5C,MAAM,OAAO,GAAe,IAAI,yKAAU,CACtC,CAAC,KAAmB,EAAE,CAAG,CAAD,OAAS,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,EACtD,OAAO,EACP,eAAe,CAClB,CAAC;IACF,OAAO,IAAI,uJAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;;;;;AAiBD,MAAM,uBAAuB,GAAG;IAAE,OAAO,EAAE,IAAI;AAAA,CAAE,CAAC;AAO5C,SAAU,SAAS,CACrB,IAAY,EACZ,UAAmB,uBAAuB;IAE1C,WAAO,oJAAO,EAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC1D,CAAC"}},
|
||||
{"offset": {"line": 4845, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/is-plain-object/dist/is-plain-object.js"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexports.isPlainObject = isPlainObject;\n"],"names":["Object","defineProperty","exports","value","isObject","o","prototype","toString","call","isPlainObject","ctor","prot","undefined","hasOwnProperty"],"mappings":"AAEAA,OAAOC,cAAc,CAACC,SAAS,cAAc;IAAEC,OAAO;AAAK;AAE3D;;;;;CAKC,GAED,SAASC,SAASC,CAAC;IACjB,OAAOL,OAAOM,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACH,OAAO;AAC/C;AAEA,SAASI,cAAcJ,CAAC;IACtB,IAAIK,MAAKC;IAET,IAAIP,SAASC,OAAO,OAAO,OAAO;IAElC,8BAA8B;IAC9BK,OAAOL,EAAE,WAAW;IACpB,IAAIK,SAASE,WAAW,OAAO;IAE/B,4BAA4B;IAC5BD,OAAOD,KAAKJ,SAAS;IACrB,IAAIF,SAASO,UAAU,OAAO,OAAO;IAErC,yDAAyD;IACzD,IAAIA,KAAKE,cAAc,CAAC,qBAAqB,OAAO;QAClD,OAAO;IACT;IAEA,6BAA6B;IAC7B,OAAO;AACT;AAEAX,QAAQO,aAAa,GAAGA","ignoreList":[0]}},
|
||||
{"offset": {"line": 4876, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/launder/index.js"],"sourcesContent":["const dayjs = require('dayjs');\n\n// Strip characters browsers ignore inside URLs (control chars and\n// embedded HTML comments) that are commonly used to sneak XSS\n// payloads past simple scheme checks.\nfunction cleanHref(href) {\n // Browsers ignore character codes of 32 (space) and below in a surprising\n // number of situations. Start reading here:\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#Embedded_tab\n // eslint-disable-next-line no-control-regex\n href = href.replace(/[\\x00-\\x20]+/g, '');\n // Clobber any comments in URLs, which the browser might\n // interpret inside an XML data island, allowing\n // a javascript: URL to be snuck through\n while (true) {\n const firstIndex = href.indexOf('<!--');\n if (firstIndex === -1) {\n break;\n }\n const lastIndex = href.indexOf('-->', firstIndex + 4);\n if (lastIndex === -1) {\n break;\n }\n href = href.substring(0, firstIndex) + href.substring(lastIndex + 3);\n }\n return href;\n}\n\n// Returns true if `href` should be rejected as unsafe. Used to block\n// `javascript:`, `data:` and other dangerous schemes both when\n// validating URL fields and when sanitizing HTML attribute values.\n//\n// `options.allowedSchemes` is an array of permitted URL schemes\n// (defaults to the schemes long permitted by `launder().url`).\n// `options.allowProtocolRelative` controls whether protocol-relative\n// URLs (e.g. `//example.com`) are permitted. Defaults to true.\nfunction naughtyHref(href, options) {\n options = options || {};\n const allowedSchemes = options.allowedSchemes ||\n [ 'http', 'https', 'ftp', 'mailto', 'tel', 'sms' ];\n const allowProtocolRelative = (options.allowProtocolRelative !== false);\n if (typeof href !== 'string') {\n return false;\n }\n href = cleanHref(href);\n // Case insensitive so we don't get faked out by JAVASCRIPT #1\n // Allow more characters after the first so we don't get faked\n // out by certain schemes browsers accept\n const matches = href.match(/^([a-zA-Z][a-zA-Z0-9.\\-+]*):/);\n if (!matches) {\n // Protocol-relative URL starting with any combination of '/' and '\\'\n if (href.match(/^[/\\\\]{2}/)) {\n return !allowProtocolRelative;\n }\n // No scheme\n return false;\n }\n const scheme = matches[1].toLowerCase();\n return allowedSchemes.indexOf(scheme) === -1;\n}\n\nmodule.exports = function(options) {\n const self = {};\n self.options = options || {};\n\n self.filterTag = self.options.filterTag || function(tag) {\n tag = tag.trim();\n return tag.toLowerCase();\n };\n\n self.string = function(s, def) {\n if (typeof (s) !== 'string') {\n if ((typeof (s) === 'number') || (typeof (s) === 'boolean')) {\n s += '';\n } else {\n s = '';\n }\n }\n s = s.trim();\n if (def !== undefined) {\n if (s === '') {\n s = def;\n }\n }\n return s;\n };\n\n self.strings = function(strings) {\n if (!Array.isArray(strings)) {\n return [];\n }\n return strings.map(function(s) {\n return self.string(s);\n });\n };\n\n self.integer = function(i, def, min, max) {\n if (def === undefined) {\n def = 0;\n }\n if (typeof (i) === 'number') {\n i = Math.floor(i);\n } else {\n try {\n i = parseInt(i, 10);\n if (isNaN(i)) {\n i = def;\n }\n } catch (e) {\n i = def;\n }\n }\n if ((typeof (min) === 'number') && (i < min)) {\n i = min;\n }\n if ((typeof (max) === 'number') && (i > max)) {\n i = max;\n }\n return i;\n };\n\n self.padInteger = function(i, places) {\n let s = i + '';\n while (s.length < places) {\n s = '0' + s;\n }\n return s;\n };\n\n self.float = function(i, def, min, max) {\n if (def === undefined) {\n def = 0;\n }\n if (!(typeof (i) === 'number')) {\n try {\n i = parseFloat(i, 10);\n if (isNaN(i)) {\n i = def;\n }\n } catch (e) {\n i = def;\n }\n }\n if ((typeof (min) === 'number') && (i < min)) {\n i = min;\n }\n if ((typeof (max) === 'number') && (i > max)) {\n i = max;\n }\n return i;\n };\n\n self.naughtyHref = naughtyHref;\n\n self.url = function(s, def, httpsFix) {\n s = self.string(s, def);\n // Allow the default to be undefined, null, false, etc.\n if (s === def) {\n return s;\n }\n // Strip characters browsers ignore that are commonly used to\n // smuggle dangerous schemes past validation.\n s = cleanHref(s);\n // Reject naughty URLs (e.g. `javascript:`, `data:`) before fixUrl\n // runs. Otherwise fixUrl could mask such schemes by prepending\n // `https://` to anything containing a `.`, turning\n // `javascript:alert(dLine truncated
|
||||
{"offset": {"line": 5385, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/marked/src/defaults.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/rules.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/helpers.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/Tokenizer.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/Lexer.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/Renderer.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/TextRenderer.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/Parser.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/Hooks.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/Instance.ts","file:///Users/home/Projects/forumlify/node_modules/marked/src/marked.ts"],"sourcesContent":["import type { MarkedOptions } from './MarkedOptions.ts';\n\n/**\n * Gets the original marked default options.\n */\nexport function _getDefaults<ParserOutput = string, RendererOutput = string>(): MarkedOptions<ParserOutput, RendererOutput> {\n return {\n async: false,\n breaks: false,\n extensions: null,\n gfm: true,\n hooks: null,\n pedantic: false,\n renderer: null,\n silent: false,\n tokenizer: null,\n walkTokens: null,\n };\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport let _defaults: MarkedOptions<any, any> = _getDefaults();\n\nexport function changeDefaults<ParserOutput = string, RendererOutput = string>(newDefaults: MarkedOptions<ParserOutput, RendererOutput>) {\n _defaults = newDefaults;\n}\n","const noopTest = { exec: () => null } as unknown as RegExp;\n\nfunction cachedIndentRegex(createRegex: (indent: number) => RegExp) {\n const cache: RegExp[] = [];\n return (indent: number) => {\n const cacheIndex = Math.max(0, Math.min(3, indent - 1));\n let regex = cache[cacheIndex];\n if (!regex) {\n regex = createRegex(cacheIndex);\n cache[cacheIndex] = regex;\n }\n return regex;\n };\n}\n\nfunction edit(regex: string | RegExp, opt = '') {\n let source = typeof regex === 'string' ? regex : regex.source;\n const obj = {\n replace: (name: string | RegExp, val: string | RegExp) => {\n let valSource = typeof val === 'string' ? val : val.source;\n valSource = valSource.replace(other.caret, '$1');\n source = source.replace(name, valSource);\n return obj;\n },\n getRegex: () => {\n return new RegExp(source, opt);\n },\n };\n return obj;\n}\n\n// use a default variable to ensure the regex is evaluated on client an not removed by minifiers\nconst supportsLookbehind = ((a = '') => {\ntry {\n return !!new RegExp('(?<=1)(?<!1)' + a);\n} catch {\n // See browser support here:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Lookbehind_assertion\n return false;\n}\n})();\n\nexport const other = {\n codeRemoveIndent: /^(?: {1,4}| {0,3}\\t)/gm,\n outputLinkReplace: /\\\\([\\[\\]])/g,\n indentCodeCompensation: /^(\\s+)(?:```)/,\n beginningSpace: /^\\s+/,\n endingHash: /#$/,\n startingSpaceChar: /^ /,\n endingSpaceChar: / $/,\n nonSpaceChar: /[^ ]/,\n newLineCharGlobal: /\\n/g,\n tabCharGlobal: /\\t/g,\n multipleSpaceGlobal: /\\s+/g,\n blankLine: /^[ \\t]*$/,\n doubleBlankLine: /\\n[ \\t]*\\n[ \\t]*$/,\n blockquoteStart: /^ {0,3}>/,\n blockquoteSetextReplace: /\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g,\n blockquoteSetextReplace2: /^ {0,3}>[ \\t]?/gm,\n listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,\n listIsTask: /^\\[[ xX]\\] +\\S/,\n listReplaceTask: /^\\[[ xX]\\] +/,\n listTaskCheckbox: /\\[[ xX]\\]/,\n anyLine: /\\n.*\\n/,\n hrefBrackets: /^<(.*)>$/,\n tableDelimiter: /[:|]/,\n tableAlignChars: /^\\||\\| *$/g,\n tableRowBlankLine: /\\n[ \\t]*$/,\n tableAlignRight: /^ *-+: *$/,\n tableAlignCenter: /^ *:-+: *$/,\n tableAlignLeft: /^ *:-+ *$/,\n startATag: /^<a /i,\n endATag: /^<\\/a>/i,\n startPreScriptTag: /^<(pre|code|kbd|script)(\\s|>)/i,\n endPreScriptTag: /^<\\/(pre|code|kbd|script)(\\s|>)/i,\n startAngleBracket: /^</,\n endAngleBracket: />$/,\n pedanticHrefTitle: /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/,\n unicodeAlphaNumeric: /[\\p{L}\\p{N}]/u,\n escapeTest: /[&<>\"']/,\n escapeReplace: /[&<>\"']/g,\n escapeTestNoEncode: /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,\n escapeReplaceNoEncode: /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,\n caret: /(^|[^\\[])\\^/g,\n percentDecode: /%25/g,\n findPipe: /\\|/g,\n splitPipe: / \\|/,\n slashPipe: /\\\\\\|/g,\n carriageReturn: /\\r\\n|\\r/g,\n spaceLine: /^ +$/gm,\n notSpaceStart: /^\\S*/,\n endingNewline: /\\n$/,\n listItemRegex: (bull: string) => new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`),\n nextBulletRegex: cachedIndentRegex((indent: number) => new RegExp(`^ {0,${indent}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*Line truncated
|
||||
{"offset": {"line": 7081, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/parse-srcset/src/parse-srcset.js"],"sourcesContent":["/**\n * Srcset Parser\n *\n * By Alex Bell | MIT License\n *\n * JS Parser for the string value that appears in markup <img srcset=\"here\">\n *\n * @returns Array [{url: _, d: _, w: _, h:_}, ...]\n *\n * Based super duper closely on the reference algorithm at:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute\n *\n * Most comments are copied in directly from the spec\n * (except for comments in parens).\n */\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof module === 'object' && module.exports) {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.parseSrcset = factory();\n\t}\n}(this, function () {\n\n\t// 1. Let input be the value passed to this algorithm.\n\treturn function (input) {\n\n\t\t// UTILITY FUNCTIONS\n\n\t\t// Manual is faster than RegEx\n\t\t// http://bjorn.tipling.com/state-and-regular-expressions-in-javascript\n\t\t// http://jsperf.com/whitespace-character/5\n\t\tfunction isSpace(c) {\n\t\t\treturn (c === \"\\u0020\" || // space\n\t\t\tc === \"\\u0009\" || // horizontal tab\n\t\t\tc === \"\\u000A\" || // new line\n\t\t\tc === \"\\u000C\" || // form feed\n\t\t\tc === \"\\u000D\"); // carriage return\n\t\t}\n\n\t\tfunction collectCharacters(regEx) {\n\t\t\tvar chars,\n\t\t\t\tmatch = regEx.exec(input.substring(pos));\n\t\t\tif (match) {\n\t\t\t\tchars = match[ 0 ];\n\t\t\t\tpos += chars.length;\n\t\t\t\treturn chars;\n\t\t\t}\n\t\t}\n\n\t\tvar inputLength = input.length,\n\n\t\t\t// (Don't use \\s, to avoid matching non-breaking space)\n\t\t\tregexLeadingSpaces = /^[ \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingCommasOrSpaces = /^[, \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingNotSpaces = /^[^ \\t\\n\\r\\u000c]+/,\n\t\t\tregexTrailingCommas = /[,]+$/,\n\t\t\tregexNonNegativeInteger = /^\\d+$/,\n\n\t\t\t// ( Positive or negative or unsigned integers or decimals, without or without exponents.\n\t\t\t// Must include at least one digit.\n\t\t\t// According to spec tests any decimal point must be followed by a digit.\n\t\t\t// No leading plus sign is allowed.)\n\t\t\t// https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number\n\t\t\tregexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,\n\n\t\t\turl,\n\t\t\tdescriptors,\n\t\t\tcurrentDescriptor,\n\t\t\tstate,\n\t\t\tc,\n\n\t\t\t// 2. Let position be a pointer into input, initially pointing at the start\n\t\t\t// of the string.\n\t\t\tpos = 0,\n\n\t\t\t// 3. Let candidates be an initially empty source set.\n\t\t\tcandidates = [];\n\n\t\t// 4. Splitting loop: Collect a sequence of characters that are space\n\t\t// characters or U+002C COMMA characters. If any U+002C COMMA characters\n\t\t// were collected, that is a parse error.\n\t\twhile (true) {\n\t\t\tcollectCharacters(regexLeadingCommasOrSpaces);\n\n\t\t\t// 5. If position is past the end of input, return candidates and abort these steps.\n\t\t\tif (pos >= inputLength) {\n\t\t\t\treturn candidates; // (we're done, this is the sole return path)\n\t\t\t}\n\n\t\t\t// 6. Collect a sequence of characters that are not space characters,\n\t\t\t// and let that be url.\n\t\t\turl = collectCharacters(regexLeadingNotSpaces);\n\n\t\t\t// 7. Let descriptors be a new empty list.\n\t\t\tdescriptors = [];\n\n\t\t\t// 8. If url ends with a U+002C COMMA character (,), follow these substeps:\n\t\t\t//\t\t(1). Remove all trailing U+002C COMMA characters from url. If this removed\n\t\t\t// more than one character, that is a parse error.\n\t\t\tif (url.slice(-1) === \",\") {\n\t\t\t\turl = url.replace(regexTrailingCommas, \"\");\n\t\t\t\t// (Jump ahead to step 9 to skip tokenization and just push the candidate).\n\t\t\t\tparseDescriptors();\n\n\t\t\t\t//\tOtherwise, follow these substeps:\n\t\t\t} else {\n\t\t\t\ttokenize();\n\t\t\t} // (close else of step 8)\n\n\t\t\t// 16. Return to the step labeled splitting loop.\n\t\t} // (Close of big while loop.)\n\n\t\t/**\n\t\t * Tokenizes descriptor properties prior to parsing\n\t\t * Returns undefined.\n\t\t */\n\t\tfunction tokenize() {\n\n\t\t\t// 8.1. Descriptor tokeniser: Skip whitespace\n\t\t\tcollectCharacters(regexLeadingSpaces);\n\n\t\t\t// 8.2. Let current descriptor be the empty string.\n\t\t\tcurrentDescriptor = \"\";\n\n\t\t\t// 8.3. Let state be in descriptor.\n\t\t\tstate = \"in descriptor\";\n\n\t\t\twhile (true) {\n\n\t\t\t\t// 8.4. Let c be the character at position.\n\t\t\t\tc = input.charAt(pos);\n\n\t\t\t\t// Do the following depending on the value of state.\n\t\tLine truncated
|
||||
{"offset": {"line": 7360, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/sanitize-html/index.js"],"sourcesContent":["const htmlparser = require('htmlparser2');\nconst escapeStringRegexp = require('escape-string-regexp');\nconst { isPlainObject } = require('is-plain-object');\nconst deepmerge = require('deepmerge');\nconst parseSrcset = require('parse-srcset');\nconst { parse: postcssParse } = require('postcss');\nconst { naughtyHref: launderNaughtyHref } = require('launder');\n// Tags that can conceivably represent stand-alone media.\nconst mediaTags = [\n 'img', 'audio', 'video', 'picture', 'svg',\n 'object', 'map', 'iframe', 'embed'\n];\n// Tags that are inherently vulnerable to being used in XSS attacks.\nconst vulnerableTags = [ 'script', 'style' ];\n\nfunction each(obj, cb) {\n if (obj) {\n Object.keys(obj).forEach(function (key) {\n cb(obj[key], key);\n });\n }\n}\n\n// Avoid false positives with .__proto__, .hasOwnProperty, etc.\nfunction has(obj, key) {\n return ({}).hasOwnProperty.call(obj, key);\n}\n\n// Returns those elements of `a` for which `cb(a)` returns truthy\nfunction filter(a, cb) {\n const n = [];\n each(a, function(v) {\n if (cb(v)) {\n n.push(v);\n }\n });\n return n;\n}\n\nfunction isEmptyObject(obj) {\n for (const key in obj) {\n if (has(obj, key)) {\n return false;\n }\n }\n return true;\n}\n\nfunction stringifySrcset(parsedSrcset) {\n return parsedSrcset.map(function(part) {\n if (!part.url) {\n throw new Error('URL missing');\n }\n\n return (\n part.url +\n (part.w ? ` ${part.w}w` : '') +\n (part.h ? ` ${part.h}h` : '') +\n (part.d ? ` ${part.d}x` : '')\n );\n }).join(', ');\n}\n\nmodule.exports = sanitizeHtml;\n\n// A valid attribute name.\n// We use a tolerant definition based on the set of strings defined by\n// html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state\n// and html.spec.whatwg.org/multipage/parsing.html#attribute-name-state .\n// The characters accepted are ones which can be appended to the attribute\n// name buffer without triggering a parse error:\n// * unexpected-equals-sign-before-attribute-name\n// * unexpected-null-character\n// * unexpected-character-in-attribute-name\n// We exclude the empty string because it's impossible to get to the after\n// attribute name state with an empty attribute name buffer.\nconst VALID_HTML_ATTRIBUTE_NAME = /^[^\\0\\t\\n\\f\\r /<=>]+$/;\n\n// Ignore the _recursing flag; it's there for recursive\n// invocation as a guard against this exploit:\n// https://github.com/fb55/htmlparser2/issues/105\n\nfunction sanitizeHtml(html, options, _recursing) {\n if (html == null) {\n return '';\n }\n if (typeof html === 'number') {\n html = html.toString();\n }\n\n let result = '';\n // Used for hot swapping the result variable with an empty string\n // in order to \"capture\" the text written to it.\n let tempResult = '';\n\n function Frame(tag, attribs) {\n const that = this;\n this.tag = tag;\n this.attribs = attribs || {};\n this.tagPosition = result.length;\n this.text = ''; // Node inner text\n this.openingTagLength = 0;\n this.mediaChildren = [];\n\n this.updateParentNodeText = function() {\n if (stack.length) {\n const parentFrame = stack[stack.length - 1];\n parentFrame.text += that.text;\n }\n };\n\n this.updateParentNodeMediaChildren = function() {\n if (stack.length && mediaTags.includes(this.tag)) {\n const parentFrame = stack[stack.length - 1];\n parentFrame.mediaChildren.push(this.tag);\n }\n };\n }\n\n options = Object.assign({}, sanitizeHtml.defaults, options);\n options.parser = Object.assign({}, htmlParserDefaults, options.parser);\n\n const tagAllowed = function (name) {\n return options.allowedTags === false ||\n (options.allowedTags || []).indexOf(name) > -1;\n };\n\n // vulnerableTags\n vulnerableTags.forEach(function (tag) {\n if (tagAllowed(tag) && !options.allowVulnerableTags) {\n console.warn(`\\n\\n⚠️ Your \\`allowedTags\\` option includes, \\`${tag}\\`, which is inherently\\nvulnerable to XSS attacks. Please remove it from \\`allowedTags\\`.\\nOr, to disable this warning, add the \\`allowVulnerableTags\\` option\\nand ensure you are accounting for this risk.\\n\\n`);\n }\n });\n\n // Tags that contain something other than HTML, or where discarding\n // the text when the tag is disallowed makes sense for other reasons.\n // If we are not allowing these tags, we should drop their content too.\n // For other tags you would drop the tag but keep its content.\n // `xmp` is included because htmlparser2 treats it as a raw-text element,\n // so markup inside is parsed as text on input but would otherwise be\n // re-emitted unescaped via the `ontext` branch below, allowing XSS bypass\n // when `xmp` is disallowed (which is the defaLine truncated
|
||||
}
|
||||
@@ -0,0 +1,294 @@
|
||||
module.exports = [
|
||||
"[externals]/react [external] (react, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("react", () => require("react"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[externals]/react/jsx-runtime [external] (react/jsx-runtime, cjs)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
var mod = __turbopack_context__.x("react/jsx-runtime", () => require("react/jsx-runtime"));
|
||||
|
||||
module.exports = mod;
|
||||
}),
|
||||
"[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
exports._ = _interop_require_default;
|
||||
}),
|
||||
"[project]/node_modules/next/app.js [ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/pages/_app.js [ssr] (ecmascript)");
|
||||
}),
|
||||
"[project]/node_modules/next/dist/pages/_app.js [ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return App;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [ssr] (ecmascript)");
|
||||
const _jsxruntime = __turbopack_context__.r("[externals]/react/jsx-runtime [external] (react/jsx-runtime, cjs)");
|
||||
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[externals]/react [external] (react, cjs)"));
|
||||
const _utils = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils.js [ssr] (ecmascript)");
|
||||
/**
|
||||
* `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.
|
||||
* This allows for keeping state between navigation, custom error handling, injecting additional data.
|
||||
*/ async function appGetInitialProps({ Component, ctx }) {
|
||||
const pageProps = await (0, _utils.loadGetInitialProps)(Component, ctx);
|
||||
return {
|
||||
pageProps
|
||||
};
|
||||
}
|
||||
class App extends _react.default.Component {
|
||||
static{
|
||||
this.origGetInitialProps = appGetInitialProps;
|
||||
}
|
||||
static{
|
||||
this.getInitialProps = appGetInitialProps;
|
||||
}
|
||||
render() {
|
||||
const { Component, pageProps } = this.props;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Component, {
|
||||
...pageProps
|
||||
});
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}),
|
||||
"[project]/node_modules/next/dist/shared/lib/utils.js [ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
DecodeError: null,
|
||||
MiddlewareNotFoundError: null,
|
||||
MissingStaticPage: null,
|
||||
NormalizeError: null,
|
||||
PageNotFoundError: null,
|
||||
SP: null,
|
||||
ST: null,
|
||||
WEB_VITALS: null,
|
||||
execOnce: null,
|
||||
getDisplayName: null,
|
||||
getLocationOrigin: null,
|
||||
getURL: null,
|
||||
isAbsoluteUrl: null,
|
||||
isResSent: null,
|
||||
loadGetInitialProps: null,
|
||||
normalizeRepeatedSlashes: null,
|
||||
stringifyError: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
DecodeError: function() {
|
||||
return DecodeError;
|
||||
},
|
||||
MiddlewareNotFoundError: function() {
|
||||
return MiddlewareNotFoundError;
|
||||
},
|
||||
MissingStaticPage: function() {
|
||||
return MissingStaticPage;
|
||||
},
|
||||
NormalizeError: function() {
|
||||
return NormalizeError;
|
||||
},
|
||||
PageNotFoundError: function() {
|
||||
return PageNotFoundError;
|
||||
},
|
||||
SP: function() {
|
||||
return SP;
|
||||
},
|
||||
ST: function() {
|
||||
return ST;
|
||||
},
|
||||
WEB_VITALS: function() {
|
||||
return WEB_VITALS;
|
||||
},
|
||||
execOnce: function() {
|
||||
return execOnce;
|
||||
},
|
||||
getDisplayName: function() {
|
||||
return getDisplayName;
|
||||
},
|
||||
getLocationOrigin: function() {
|
||||
return getLocationOrigin;
|
||||
},
|
||||
getURL: function() {
|
||||
return getURL;
|
||||
},
|
||||
isAbsoluteUrl: function() {
|
||||
return isAbsoluteUrl;
|
||||
},
|
||||
isResSent: function() {
|
||||
return isResSent;
|
||||
},
|
||||
loadGetInitialProps: function() {
|
||||
return loadGetInitialProps;
|
||||
},
|
||||
normalizeRepeatedSlashes: function() {
|
||||
return normalizeRepeatedSlashes;
|
||||
},
|
||||
stringifyError: function() {
|
||||
return stringifyError;
|
||||
}
|
||||
});
|
||||
const WEB_VITALS = [
|
||||
'CLS',
|
||||
'FCP',
|
||||
'FID',
|
||||
'INP',
|
||||
'LCP',
|
||||
'TTFB'
|
||||
];
|
||||
function execOnce(fn) {
|
||||
let used = false;
|
||||
let result;
|
||||
return (...args)=>{
|
||||
if (!used) {
|
||||
used = true;
|
||||
result = fn(...args);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
|
||||
// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
|
||||
const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
|
||||
const isAbsoluteUrl = (url)=>{
|
||||
// Fast path: an absolute URL must start with a letter (the scheme).
|
||||
// Check for a-z and A-Z without the cost of the regex.
|
||||
const c = url.charCodeAt(0);
|
||||
const isLetter = c >= 65 /* A */ && c <= 90 || c >= 97 /* a */ && c <= 122;
|
||||
/* z */ if (!isLetter) {
|
||||
return false;
|
||||
}
|
||||
return ABSOLUTE_URL_REGEX.test(url);
|
||||
};
|
||||
function getLocationOrigin() {
|
||||
const { protocol, hostname, port } = window.location;
|
||||
return `${protocol}//${hostname}${port ? ':' + port : ''}`;
|
||||
}
|
||||
function getURL() {
|
||||
const { href } = window.location;
|
||||
const origin = getLocationOrigin();
|
||||
return href.substring(origin.length);
|
||||
}
|
||||
function getDisplayName(Component) {
|
||||
return typeof Component === 'string' ? Component : Component.displayName || Component.name || 'Unknown';
|
||||
}
|
||||
function isResSent(res) {
|
||||
return res.finished || res.headersSent;
|
||||
}
|
||||
function normalizeRepeatedSlashes(url) {
|
||||
const urlParts = url.split('?');
|
||||
const urlNoQuery = urlParts[0];
|
||||
return urlNoQuery // first we replace any non-encoded backslashes with forward
|
||||
// then normalize repeated forward slashes
|
||||
.replace(/\\/g, '/').replace(/\/\/+/g, '/') + (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '');
|
||||
}
|
||||
async function loadGetInitialProps(App, ctx) {
|
||||
if ("TURBOPACK compile-time truthy", 1) {
|
||||
if (App.prototype?.getInitialProps) {
|
||||
const message = `"${getDisplayName(App)}.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`;
|
||||
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
||||
value: "E1035",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
// when called from _app `ctx` is nested in `ctx`
|
||||
const res = ctx.res || ctx.ctx && ctx.ctx.res;
|
||||
if (!App.getInitialProps) {
|
||||
if (ctx.ctx && ctx.Component) {
|
||||
// @ts-ignore pageProps default
|
||||
return {
|
||||
pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
|
||||
};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
const props = await App.getInitialProps(ctx);
|
||||
if (res && isResSent(res)) {
|
||||
return props;
|
||||
}
|
||||
if (!props) {
|
||||
const message = `"${getDisplayName(App)}.getInitialProps()" should resolve to an object. But found "${props}" instead.`;
|
||||
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
||||
value: "E1025",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
if ("TURBOPACK compile-time truthy", 1) {
|
||||
if (Object.keys(props).length === 0 && !ctx.ctx) {
|
||||
console.warn(`${getDisplayName(App)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`);
|
||||
}
|
||||
}
|
||||
return props;
|
||||
}
|
||||
const SP = typeof performance !== 'undefined';
|
||||
const ST = SP && [
|
||||
'mark',
|
||||
'measure',
|
||||
'getEntriesByName'
|
||||
].every((method)=>typeof performance[method] === 'function');
|
||||
class DecodeError extends Error {
|
||||
}
|
||||
class NormalizeError extends Error {
|
||||
}
|
||||
class PageNotFoundError extends Error {
|
||||
constructor(page){
|
||||
super();
|
||||
this.code = 'ENOENT';
|
||||
this.name = 'PageNotFoundError';
|
||||
this.message = `Cannot find module for page: ${page}`;
|
||||
}
|
||||
}
|
||||
class MissingStaticPage extends Error {
|
||||
constructor(page, message){
|
||||
super();
|
||||
this.message = `Failed to load static file for page: ${page} ${message}`;
|
||||
}
|
||||
}
|
||||
class MiddlewareNotFoundError extends Error {
|
||||
constructor(){
|
||||
super();
|
||||
this.code = 'ENOENT';
|
||||
this.message = `Cannot find the middleware module`;
|
||||
}
|
||||
}
|
||||
function stringifyError(error) {
|
||||
return JSON.stringify({
|
||||
message: error.message,
|
||||
stack: error.stack
|
||||
});
|
||||
}
|
||||
}),
|
||||
];
|
||||
|
||||
//# sourceMappingURL=%5Broot-of-the-server%5D__0y0_snu._.js.map
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 16, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/@swc/helpers/cjs/_interop_require_default.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nexports._ = _interop_require_default;\n"],"names":["_interop_require_default","obj","__esModule","default","exports","_"],"mappings":"AAEA,SAASA,yBAAyBC,GAAG;IACjC,OAAOA,OAAOA,IAAIC,UAAU,GAAGD,MAAM;QAAEE,SAASF;IAAI;AACxD;AACAG,QAAQC,CAAC,GAAGL","ignoreList":[0]}},
|
||||
{"offset": {"line": 25, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/app.js"],"sourcesContent":["module.exports = require('./dist/pages/_app')\n"],"names":["module","exports"],"mappings":"AAAAA,OAAOC,OAAO","ignoreList":[0]}},
|
||||
{"offset": {"line": 30, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/pages/_app.tsx"],"sourcesContent":["import React from 'react'\n\nimport type {\n AppContextType,\n AppInitialProps,\n AppPropsType,\n NextWebVitalsMetric,\n AppType,\n} from '../shared/lib/utils'\nimport type { Router } from '../client/router'\n\nimport { loadGetInitialProps } from '../shared/lib/utils'\n\nexport type { AppInitialProps, AppType }\n\nexport type { NextWebVitalsMetric }\n\nexport type AppContext = AppContextType<Router>\n\nexport type AppProps<P = any> = AppPropsType<Router, P>\n\n/**\n * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.\n * This allows for keeping state between navigation, custom error handling, injecting additional data.\n */\nasync function appGetInitialProps({\n Component,\n ctx,\n}: AppContext): Promise<AppInitialProps> {\n const pageProps = await loadGetInitialProps(Component, ctx)\n return { pageProps }\n}\n\nexport default class App<P = any, CP = {}, S = {}> extends React.Component<\n P & AppProps<CP>,\n S\n> {\n static origGetInitialProps = appGetInitialProps\n static getInitialProps = appGetInitialProps\n\n render() {\n const { Component, pageProps } = this.props as AppProps<CP>\n\n return <Component {...pageProps} />\n }\n}\n"],"names":["App","appGetInitialProps","Component","ctx","pageProps","loadGetInitialProps","React","origGetInitialProps","getInitialProps","render","props"],"mappings":";;;+BAiCA,WAAA;;;eAAqBA;;;;;gEAjCH;uBAWkB;AAUpC;;;CAGC,GACD,eAAeC,mBAAmB,EAChCC,SAAS,EACTC,GAAG,EACQ;IACX,MAAMC,YAAY,MAAMC,CAAAA,GAAAA,OAAAA,mBAAmB,EAACH,WAAWC;IACvD,OAAO;QAAEC;IAAU;AACrB;AAEe,MAAMJ,YAAsCM,OAAAA,OAAK,CAACJ,SAAS;;aAIjEK,mBAAAA,GAAsBN;;;aACtBO,eAAAA,GAAkBP;;IAEzBQ,SAAS;QACP,MAAM,EAAEP,SAAS,EAAEE,SAAS,EAAE,GAAG,IAAI,CAACM,KAAK;QAE3C,OAAA,WAAA,GAAO,CAAA,GAAA,YAAA,GAAA,EAACR,WAAAA;YAAW,GAAGE,SAAS;;IACjC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 77, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/utils.ts"],"sourcesContent":["import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n Context extends BaseContext = NextPageContext,\n InitialProps = {},\n Props = {},\n> = ComponentType<Props> & {\n /**\n * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n * @param context Context of `page`\n */\n getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n DocumentContext,\n DocumentInitialProps,\n DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n AppContextType,\n P,\n AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n id: string\n startTime: number\n value: number\n attribution?: { [key: string]: unknown }\n} & (\n | {\n label: 'web-vital'\n name: (typeof WEB_VITALS)[number]\n }\n | {\n label: 'custom'\n name:\n | 'Next.js-hydration'\n | 'Next.js-route-change-to-render'\n | 'Next.js-render'\n }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n | {\n enhanceApp?: Enhancer<AppType>\n enhanceComponent?: Enhancer<NextComponentType>\n }\n | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n html: string\n head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n res?: ServerResponse\n [k: string]: any\n}\n\nexport type NEXT_DATA = {\n props: Record<string, any>\n page: string\n query: ParsedUrlQuery\n buildId: string\n assetPrefix?: string\n nextExport?: boolean\n autoExport?: boolean\n isFallback?: boolean\n isExperimentalCompile?: boolean\n dynamicIds?: (string | number)[]\n err?: Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n __NEXT_ERROR_CODE?: string\n }\n gsp?: boolean\n gssp?: boolean\n customServer?: boolean\n gip?: boolean\n appGip?: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n scriptLoader?: any[]\n isPreview?: boolean\n notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n /**\n * Error object if encountered during rendering\n */\n err?: (Error & { statusCode?: number }) | null\n /**\n * `HTTP` request object.\n */\n req?: IncomingMessage\n /**\n * `HTTP` response object.\n */\n res?: ServerResponse\n /**\n * Path section of `URL`.\n */\n pathname: string\n /**\n * Query string section of `URL` parsed as an object.\n */\n query: ParsedUrlQuery\n /**\n * `String` of the actual path including query.\n */\n asPath?: string\n /**\n * The currently active locale\n */\n locale?: string\n /**\n * All configured locales\n */\n locales?: readonly string[]\n /**\n * The configured default locale\n */\n defaultLocale?: string\n /**\n * `Component` the tree of the App to use if needing to render separately\n */\n AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n Component: NextComponentType<NextPageContext>\n AppTree: AppTreeType\n ctx: NextPageContext\n router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n pageProps: PageProps\n}\n\nexport type AppPropsType<\n Router extends NextRouter = NextRouter,\n PageProps = {},\n> = AppInitialProps<PageProps> & {\n Component: NextComponentType<NextPageContext, any, any>\n router: Router\n __N_SSG?: boolean\n __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n renderPage: RenderPage\n defaultGetInitialProps(\n ctx: DocumentContext,\n options?: { nonce?: string }\n ): Promise<DocumentInitialProps>\n}\n\nexport type Line truncated
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 16, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"./runtime-types.d.ts\" />\n/// <reference path=\"./async-module.ts\" />\n\ntype EsmNamespaceObject = Record<string, any>\n\n/**\n * Describes why a module was instantiated.\n * Shared between browser and Node.js runtimes.\n */\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent<M>(\n id: ModuleId,\n sourceModule: M\n): M\n\n// @ts-ignore Defined in `hmr-runtime.ts` (dev mode only)\ndeclare let devModuleCache: Record<ModuleId, any> | undefined\n\n/**\n * Flag indicating which module object type to create when a module is merged. Set to `true`\n * by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,\n * nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it\n * uses plain Module objects.\n */\nlet createModuleWithDirectionFlag = false\n\nconst REEXPORTED_OBJECTS = new WeakMap<Module, ReexportedObjects>()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext<Module>,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext<Module>\n\ntype ModuleContextMap = Record<ModuleId, ModuleContextEntry>\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise<Exports | EsmNamespaceObject>\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent<M extends Module> = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType<any>\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache<Module>,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n if (createModuleWithDirectionFlag) {\n // set in development modes for hmr support\n module = createModuleWithDirection(id)\n } else {\n module = createModuleObject(id)\n }\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\nfunction createModuleWithDirection(id: ModuleId): ModuleWithDirection {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n parents: [],\n children: [],\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings, dynamic?: booleaLine truncated
|
||||
{"offset": {"line": 541, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/async-module.ts"],"sourcesContent":["/// <reference path=\"./runtime-types.d.ts\" />\n/// <reference path=\"./runtime-utils.ts\" />\n\n/**\n * Top-level-await / async-module machinery. This is only included in the runtime\n * when the module graph actually contains an async module (a module with\n * top-level await, or one that transitively depends on one). When no async\n * module is present, the chunk items never reference `__turbopack_context__.a`,\n * so this whole file can be omitted.\n *\n * everything below is adapted from webpack\n * https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n */\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise<Exports>\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise<T = Exports> = Promise<T> & AsyncModuleExt\n\nfunction isPromise<T = any>(maybePromise: any): maybePromise is Promise<T> {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt<T extends {}>(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise<T>() {\n let resolve: (value: T | PromiseLike<T>) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise<T>((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext<Module>,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set<AsyncQueue> = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise<Exports>()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.sLine truncated
|
||||
{"offset": {"line": 673, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/base-externals-utils.ts"],"sourcesContent":["/// <reference path=\"../shared/runtime/runtime-utils.ts\" />\n\n/// A 'base' utilities to support runtime can have externals.\n/// Currently this is for node.js / edge runtime both.\n/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.\n\nasync function externalImport(id: DependencySpecifier) {\n let raw\n try {\n raw = await import(id)\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (raw && raw.__esModule && raw.default && 'default' in raw.default) {\n return interopEsm(raw.default, createNS(raw), true)\n }\n\n return raw\n}\ncontextPrototype.y = externalImport\n\nfunction externalRequire(\n id: ModuleId,\n thunk: () => any,\n esm: boolean = false\n): Exports | EsmNamespaceObject {\n let raw\n try {\n raw = thunk()\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (!esm || raw.__esModule) {\n return raw\n }\n\n return interopEsm(raw, createNS(raw), true)\n}\n\nexternalRequire.resolve = (\n id: string,\n options?: {\n paths?: string[]\n }\n) => {\n return require.resolve(id, options)\n}\ncontextPrototype.x = externalRequire\n"],"names":["externalImport","id","raw","err","Error","__esModule","default","interopEsm","createNS","contextPrototype","y","externalRequire","thunk","esm","resolve","options","require","x"],"mappings":"AAAA,2DAA2D;AAE3D,6DAA6D;AAC7D,sDAAsD;AACtD,qGAAqG;AAErG,eAAeA,eAAeC,EAAuB;IACnD,IAAIC;IACJ,IAAI;QACFA,MAAM,MAAM,MAAM,CAACD;IACrB,EAAE,OAAOE,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAID,OAAOA,IAAIG,UAAU,IAAIH,IAAII,OAAO,IAAI,aAAaJ,IAAII,OAAO,EAAE;QACpE,OAAOC,WAAWL,IAAII,OAAO,EAAEE,SAASN,MAAM;IAChD;IAEA,OAAOA;AACT;AACAO,iBAAiBC,CAAC,GAAGV;AAErB,SAASW,gBACPV,EAAY,EACZW,KAAgB,EAChBC,MAAe,KAAK;IAEpB,IAAIX;IACJ,IAAI;QACFA,MAAMU;IACR,EAAE,OAAOT,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAI,CAACU,OAAOX,IAAIG,UAAU,EAAE;QAC1B,OAAOH;IACT;IAEA,OAAOK,WAAWL,KAAKM,SAASN,MAAM;AACxC;AAEAS,gBAAgBG,OAAO,GAAG,CACxBb,IACAc;IAIA,OAAOC,QAAQF,OAAO,CAACb,IAAIc;AAC7B;AACAN,iBAAiBQ,CAAC,GAAGN","ignoreList":[0]}},
|
||||
{"offset": {"line": 714, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-externals-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\ndeclare var RUNTIME_PUBLIC_PATH: string\ndeclare var RELATIVE_ROOT_PATH: string\ndeclare var ASSET_PREFIX: string\n\nconst path = require('path')\n\nconst relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.')\n// Compute the relative path to the `distDir`.\nconst relativePathToDistRoot = path.join(\n relativePathToRuntimeRoot,\n RELATIVE_ROOT_PATH\n)\nconst RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot)\n// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.\nconst ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot)\n\n/**\n * Returns an absolute path to the given module path.\n * Module path should be relative, either path to a file or a directory.\n *\n * This fn allows to calculate an absolute path for some global static values, such as\n * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.\n * See ImportMetaBinding::code_generation for the usage.\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n if (modulePath) {\n return path.join(ABSOLUTE_ROOT, modulePath)\n }\n return ABSOLUTE_ROOT\n}\nContext.prototype.P = resolveAbsolutePath\n\n/**\n * Returns an absolute `file://` URL for the given module path.\n *\n * Uses `url.pathToFileURL` so that the resulting URL is a valid file URI on\n * all platforms (forward slashes on Windows, drive letters handled\n * correctly, path segments URL-encoded).\n */\nfunction resolveFileUrl(modulePath?: string): string {\n return require('url').pathToFileURL(resolveAbsolutePath(modulePath)).href\n}\nContext.prototype.F = resolveFileUrl\n"],"names":["path","require","relativePathToRuntimeRoot","relative","RUNTIME_PUBLIC_PATH","relativePathToDistRoot","join","RELATIVE_ROOT_PATH","RUNTIME_ROOT","resolve","__filename","ABSOLUTE_ROOT","resolveAbsolutePath","modulePath","Context","prototype","P","resolveFileUrl","pathToFileURL","href","F"],"mappings":"AAAA,oDAAoD,GAMpD,MAAMA,OAAOC,QAAQ;AAErB,MAAMC,4BAA4BF,KAAKG,QAAQ,CAACC,qBAAqB;AACrE,8CAA8C;AAC9C,MAAMC,yBAAyBL,KAAKM,IAAI,CACtCJ,2BACAK;AAEF,MAAMC,eAAeR,KAAKS,OAAO,CAACC,YAAYR;AAC9C,mGAAmG;AACnG,MAAMS,gBAAgBX,KAAKS,OAAO,CAACC,YAAYL;AAE/C;;;;;;;CAOC,GACD,SAASO,oBAAoBC,UAAmB;IAC9C,IAAIA,YAAY;QACd,OAAOb,KAAKM,IAAI,CAACK,eAAeE;IAClC;IACA,OAAOF;AACT;AACAG,QAAQC,SAAS,CAACC,CAAC,GAAGJ;AAEtB;;;;;;CAMC,GACD,SAASK,eAAeJ,UAAmB;IACzC,OAAOZ,QAAQ,OAAOiB,aAAa,CAACN,oBAAoBC,aAAaM,IAAI;AAC3E;AACAL,QAAQC,SAAS,CAACK,CAAC,GAAGH","ignoreList":[0]}},
|
||||
{"offset": {"line": 745, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/runtime-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"../../shared/runtime/runtime-utils.ts\" />\n/// <reference path=\"../../shared-node/base-externals-utils.ts\" />\n/// <reference path=\"../../shared-node/node-externals-utils.ts\" />\n/// <reference path=\"./nodejs-globals.d.ts\" />\n\n/**\n * Base Node.js runtime shared between production and development.\n * Contains chunk loading, module caching, and other non-HMR functionality.\n */\n\nprocess.env.TURBOPACK = '1'\n\nconst url = require('url') as typeof import('url')\n\nconst moduleFactories: ModuleFactories = new Map()\nconst moduleCache: ModuleCache<Module> = Object.create(null)\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext<Module>,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n const exportedPath = exported?.default ?? exported\n if (typeof exportedPath !== 'string') {\n return exported as any\n }\n\n const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length)\n const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix)\n\n return url.pathToFileURL(resolved).href\n}\n\n/**\n * Exports a URL value. No suffix is added in Node.js runtime.\n */\nfunction exportUrl(\n this: TurbopackBaseContext<Module>,\n urlValue: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, urlValue, id)\n}\n\nfunction loadRuntimeChunk(sourcePath: ChunkPath, chunkData: ChunkData): void {\n if (typeof chunkData === 'string') {\n loadRuntimeChunkPath(sourcePath, chunkData)\n } else {\n loadRuntimeChunkPath(sourcePath, chunkData.path)\n }\n}\n\nconst loadedChunks = new Set<ChunkPath>()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise<void> = Promise.resolve(undefined)\nconst chunkCache = new Map<ChunkPath, Promise<void>>()\n\nfunction clearChunkCache() {\n chunkCache.clear()\n loadedChunks.clear()\n}\n\nfunction loadRuntimeChunkPath(\n sourcePath: ChunkPath,\n chunkPath: ChunkPath\n): void {\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return\n }\n\n if (loadedChunks.has(chunkPath)) {\n return\n }\n\n try {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n loadedChunks.add(chunkPath)\n } catch (cause) {\n let errorMessage = `Failed to load chunk ${chunkPath}`\n\n if (sourcePath) {\n errorMessage += ` from runtime for chunk ${sourcePath}`\n }\n\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n throw error\n }\n}\n\nfunction loadChunkAsync<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkData: ChunkData\n): Promise<void> {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return unsupportedLoadChunk\n }\n\n let entry = chunkCache.get(chunkPath)\n if (entry === undefined) {\n try {\n // resolve to an absolute path to simplify `require` handling\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io\n // However this is incompatible with hot reloading (since `import` doesn't use the require cache)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n entry = loadedChunk\n } catch (cause) {\n const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n\n // Cache the failure promise, future requests will also get this same rejection\n entry = Promise.reject(error)\n }\n chunkCache.set(chunkPath, entry)\n }\n // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.\n return entry\n}\ncontextPrototype.l = loadChunkAsync\n\nfunction loadChunkAsyncByUrl<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkUrl: string\n) {\n const path = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT)) as ChunkPath\n return loadChunkAsync.call(this, path)\n}\ncontextPrototype.L = loadChunkAsyncByUrl\n\n// Shared runtime primitive: the root that on-disk chunk paths are resolved\n// against. Used by the bundled wasm helper (exposed as `__turbopack_runtime_root__`).\ncontextPrototype.w =Line truncated
|
||||
{"offset": {"line": 860, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/hmr-runtime.ts"],"sourcesContent":["/// <reference path=\"./runtime-utils.ts\" />\n/// <reference path=\"./runtime-types.d.ts\" />\n/// <reference path=\"./dev-extensions.ts\" />\n/// <reference path=\"./dev-protocol.d.ts\" />\n\ntype HotModuleFactoryFunction = ModuleFactoryFunction<\n HotModule,\n TurbopackBaseContext<HotModule>\n>\n\n/**\n * Shared HMR (Hot Module Replacement) implementation.\n *\n * This file contains the complete HMR implementation that's shared between\n * browser and Node.js runtimes. It manages module hot state, dependency\n * tracking, the module.hot API, and the full HMR update flow.\n */\n\n/**\n * The development module cache shared across the runtime.\n * Browser runtime declares this directly.\n * Node.js runtime assigns globalThis.__turbopack_module_cache__ to this.\n */\nlet devModuleCache: Record<ModuleId, any>\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nlet runtimeModules: Set<ModuleId>\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map<ModuleId, HotData> = new Map()\n\n/**\n * Maps module instances to their hot module state.\n * Uses WeakMap so it works with both HotModule and ModuleWithDirection.\n */\nconst moduleHotState: WeakMap<any, HotState> = new WeakMap()\n\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set<ModuleId> = new Set()\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n parentId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set<ModuleId>\n outdatedDependencies: Map<ModuleId, Set<ModuleId>>\n }\n\n/**\n * Records parent-child relationship when a module imports another.\n * Should be called during module instantiation.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction trackModuleImport(\n parentModule: ModuleWithDirection,\n childModuleId: ModuleId,\n childModule: ModuleWithDirection | undefined\n): void {\n // Record that parent imports child\n if (parentModule.children.indexOf(childModuleId) === -1) {\n parentModule.children.push(childModuleId)\n }\n\n // Record that child is imported by parent\n if (childModule && childModule.parents.indexOf(parentModule.id) === -1) {\n childModule.parents.push(parentModule.id)\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\n/**\n * Walks the dependency tree to find all modules affected by a change.\n * Returns information about whether the update can be accepted and which\n * modules need to be invalidated.\n *\n * @param moduleId - The module that changed\n * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept().\n * This is used for server-side HMR where pages auto-accept at the top level.\n */\nfunction getAffectedModuleEffects(\n moduleId: ModuleId,\n autoAcceptRootModules: boolean\n): ModuleEffect {\n const outdatedModules: Set<ModuleId> = new Set()\n const outdatedDependencies: Map<ModuleId, Set<ModuleId>> = new Map()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: Array<QueueItem | undefined> = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let queueIndex = 0\n while (queueIndex < queue.length) {\n const { moduleId, dependencyChain } = queue[queueIndex]!\n // Release copied dependency chains as soon as their queue item is consumed.\n queue[queueIndex++] = undefined\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n if (autoAcceptRootModules) {\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n outdatedDependencies,\n }\n }\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCachLine truncated
|
||||
{"offset": {"line": 1556, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/dev-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"./runtime-base.ts\" />\n/// <reference path=\"../../shared/runtime/dev-extensions.ts\" />\n/// <reference path=\"../../shared/runtime/hmr-runtime.ts\" />\n\n/**\n * Development Node.js runtime.\n * Uses HotModule and shared HMR logic for hot module replacement support.\n */\n\n// Cast the module cache to HotModule for development mode\n// (hmr-runtime.ts declares devModuleCache as `let` variable expecting assignment)\n// This is safe because HotModule extends Module\ndevModuleCache = moduleCache as ModuleCache<HotModule>\n\n// this is read in runtime-utils.ts so it creates a module with direction for hmr\ncreateModuleWithDirectionFlag = true\n\nif (!globalThis.__turbopack_runtime_modules__) {\n globalThis.__turbopack_runtime_modules__ = new Set()\n}\nruntimeModules = globalThis.__turbopack_runtime_modules__\n\ninterface TurbopackNodeDevBuildContext extends TurbopackBaseContext<HotModule> {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n C: typeof clearChunkCache\n}\n\nconst nodeDevContextPrototype =\n Context.prototype as TurbopackNodeDevBuildContext\n\nnodeDevContextPrototype.q = exportUrl\nnodeDevContextPrototype.M = moduleFactories\nnodeDevContextPrototype.c = devModuleCache\nnodeDevContextPrototype.R = resolvePathFromModule\nnodeDevContextPrototype.C = clearChunkCache\n\n/**\n * Instantiates a module in development mode using shared HMR logic.\n */\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): HotModule {\n // Node.js: creates base module object (hot API added by shared code)\n const createModuleObjectFn = (moduleId: ModuleId) => {\n return createModuleWithDirection(moduleId) as HotModule\n }\n\n // Node.js: creates Context (no refresh parameter)\n const createContext = (\n module: HotModule,\n exports: Exports,\n _refresh?: any\n ) => {\n return new (Context as any as ContextConstructor<HotModule>)(\n module,\n exports\n )\n }\n\n // Node.js: no hooks wrapper, just execute directly\n const runWithHooks = (module: HotModule, exec: (refresh: any) => void) => {\n exec(undefined) // no refresh context\n }\n\n // Use shared instantiation logic (includes hot API setup)\n const newModule = instantiateModuleShared(\n id,\n sourceType,\n sourceData,\n moduleFactories,\n devModuleCache,\n runtimeModules,\n createModuleObjectFn,\n createContext,\n runWithHooks\n )\n\n // Node.js-specific: mark module as loaded\n ;(newModule as any).loaded = true\n\n return newModule\n}\n\n/**\n * Instantiates a runtime module in development mode.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): HotModule {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): HotModule {\n const module = devModuleCache[moduleId]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n * Also tracks parent-child relationships for HMR dependency tracking.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: HotModule\n): HotModule {\n // Track parent-child relationship\n trackModuleImport(sourceModule, id, devModuleCache[id])\n\n const module = devModuleCache[id]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n const newModule = instantiateModule(id, SourceType.Parent, sourceModule.id)\n\n // Track again after instantiation to ensure the relationship is recorded\n trackModuleImport(sourceModule, id, newModule)\n\n return newModule\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["devModuleCache","moduleCache","createModuleWithDirectionFlag","globalThis","__turbopack_runtime_modules__","Set","runtimeModules","nodeDevContextPrototype","Context","prototype","q","exportUrl","M","moduleFactories","c","R","resolvePathFromModule","C","clearChunkCache","instantiateModule","id","sourceType","sourceData","createModuleObjectFn","moduleId","createModuleWithDirection","createContext","module1","exports","_refresh","runWithHooks","exec","undefined","newModule","instantiateModuleSLine truncated
|
||||
{"offset": {"line": 1639, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/dev/hmr-client.ts"],"sourcesContent":["/// <reference path=\"../../shared/runtime/dev-protocol.d.ts\" />\n/// <reference path=\"../../shared/runtime/hmr-runtime.ts\" />\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\ntype NodeJsHmrPayload = {\n resource: {\n path: string\n headers?: Record<string, string>\n }\n issues: Issue[]\n type: 'partial'\n instruction: NodeJsEcmascriptMergedUpdate | NodeJsChunkListUpdate\n}\n\n/**\n * Appends the module code with //# sourceURL and //# sourceMappingURL so\n * that Node.js can resolve stack frames from `eval`ed server HMR modules back to\n * their original source files. Mirrors the browser's _eval in dev-backend-dom.ts.\n */\nfunction inlineSourcemaps(entry: EcmascriptModuleEntry): string {\n const [chunkPath, moduleId] = entry.url.split('?', 2)\n const absolutePath = path.resolve(RUNTIME_ROOT, chunkPath)\n const fileHref = url.pathToFileURL(absolutePath).href\n const sourceURL = moduleId ? `${fileHref}?${moduleId}` : fileHref\n let code = entry.code + '\\n\\n//# sourceURL=' + sourceURL\n if (entry.map) {\n code +=\n '\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,' +\n Buffer.from(entry.map).toString('base64')\n }\n return code\n}\n\nlet serverHmrUpdateHandler: ((msg: NodeJsHmrPayload) => void) | null = null\n\nfunction initializeServerHmr(\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache<HotModule>\n): void {\n if (serverHmrUpdateHandler != null) {\n throw new Error('[Server HMR] Server HMR client is already initialized')\n }\n\n // Register the update handler for the server runtime\n serverHmrUpdateHandler = (msg: NodeJsHmrPayload) => {\n handleNodejsUpdate(msg, moduleFactories, devModuleCache)\n }\n}\n\n/**\n * Emits an HMR message to the registered update handler.\n * Node uses a simpler listener pattern than the browser's websocket connection.\n *\n * Note: This is only called via __turbopack_server_hmr_apply__ which ensures\n * the handler is initialized first via ensureHmrClientInitialized().\n */\nfunction emitMessage(msg: { type: string; data: any }): void {\n if (serverHmrUpdateHandler == null) {\n throw new Error(\n '[Server HMR] No update handler registered to receive message'\n )\n }\n\n serverHmrUpdateHandler(msg.data)\n}\n\n/**\n * Handles server message updates and applies them to the Node.js runtime.\n * Uses shared HMR update logic from hmr-runtime.ts.\n */\nfunction handleNodejsUpdate(\n msg: NodeJsHmrPayload,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache<HotModule>\n): void {\n if (msg.type !== 'partial') {\n return\n }\n\n const instruction = msg.instruction\n\n try {\n if (instruction.type === 'ChunkListUpdate') {\n // All node ecmascript chunks are mergeable, so a `total`/`partial` here\n // means a non-mergeable asset changed in an unsupported way. Escalate\n // to a full clear() rather than leave stale factories in memory.\n for (const [chunkPath, chunkUpdate] of Object.entries(\n instruction.chunks ?? {}\n )) {\n if (chunkUpdate.type === 'total' || chunkUpdate.type === 'partial') {\n throw new Error(\n `unsupported '${chunkUpdate.type}' update for chunk ${chunkPath}`\n )\n }\n }\n\n if (instruction.merged) {\n for (const merged of instruction.merged) {\n applyEcmascriptMergedUpdate(merged, moduleFactories, devModuleCache)\n }\n }\n return\n }\n\n if (instruction.type === 'EcmascriptMergedUpdate') {\n applyEcmascriptMergedUpdate(instruction, moduleFactories, devModuleCache)\n return\n }\n } catch (e) {\n console.error('[Server HMR] Update failed, full reload needed:', e)\n throw e\n }\n}\n\nfunction applyEcmascriptMergedUpdate(\n instruction: NodeJsEcmascriptMergedUpdate,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache<HotModule>\n): void {\n const { entries = {}, chunks = {} } = instruction\n\n const evalModuleEntry = (entry: EcmascriptModuleEntry) => {\n const code = entry.map ? inlineSourcemaps(entry) : entry.code\n // eslint-disable-next-line no-eval\n return (0, eval)(`(require) => ${code}`)(require)\n }\n\n const { added, modified } = computeChangedModules(\n entries,\n chunks,\n undefined // no chunkModulesMap for Node.js\n )\n\n // Modules that appear in an \"added\" chunk but already exist in the cache\n // were moved to a renamed chunk. Treat them as modified so the dependency\n // walk runs and they get re-instantiated with the new factory.\n for (const [moduleId, entry] of added) {\n if (entry != null && devModuleCache[moduleId] != null) {\n added.delete(moduleId)\n modified.set(moduleId, entry)\n }\n }\n\n // Use shared HMR update implementation\n applyEcmascriptMergedUpdateShLine truncated
|
||||
{"offset": {"line": 1743, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/dev/dev-nodejs.ts"],"sourcesContent":["/// <reference path=\"../../shared/runtime/dev-protocol.d.ts\" />\n/// <reference path=\"./hmr-client.ts\" />\n\n/**\n * Note: hmr-runtime.ts is embedded before this file, so its functions\n * (initializeServerHmr, emitMessage) are available in the same scope.\n */\n\n// Initialize server HMR client (connects to shared HMR infrastructure)\nlet hmrClientInitialized = false\nfunction ensureHmrClientInitialized() {\n if (hmrClientInitialized) return\n hmrClientInitialized = true\n\n // initializeServerHmr is from hmr-client.ts (embedded before this file)\n // moduleFactories is from dev-runtime.ts\n // devModuleCache is the HotModule-typed cache from dev-runtime.ts\n initializeServerHmr(moduleFactories, devModuleCache)\n}\n\nfunction __turbopack_server_hmr_apply__(update: NodeJsHmrPayload): void {\n ensureHmrClientInitialized()\n // Throws if the update can't be applied in-process; the consumer catches it\n // and falls back to evicting require.cache.\n emitMessage({\n type: 'turbopack-message',\n data: update,\n })\n}\n\n// Turbopack produces one server runtime per chunking context (e.g.\n// server/chunks/ssr/ for pages, server/chunks/ for route handlers), each with\n// its own moduleFactories. We keep a globalThis Map from __filename to handler\n// so updates are routed only to runtimes whose chunkPrefix matches the update's\n// chunk paths, skipping unnecessary eval() calls. Map.set() naturally replaces\n// stale entries when a runtime file is re-evaluated after require.cache eviction.\n\ntype HmrHandlerEntry = {\n handler: (update: NodeJsHmrPayload) => void\n /** Output directory relative to RUNTIME_ROOT, e.g. \"server/chunks/ssr\". */\n chunkPrefix: string\n}\n\nconst handlers: Map<string, HmrHandlerEntry> =\n globalThis.__turbopack_server_hmr_handlers__ ?? new Map()\n\n// Normalize to forward slashes so it matches the virtual chunk paths in\n// `update.instruction.chunks`, which always use `/` regardless of OS.\nconst chunkPrefix = path\n .relative(RUNTIME_ROOT, path.dirname(__filename))\n .replaceAll(path.sep, '/')\n\nif (handlers.size === 0) {\n // First registration in this generation: install the routing dispatcher.\n globalThis.__turbopack_server_hmr_apply__ = (\n update: NodeJsHmrPayload\n ): void => {\n const registry: Map<string, HmrHandlerEntry> =\n globalThis.__turbopack_server_hmr_handlers__ ?? new Map()\n\n // Chunk paths can appear either directly on the instruction (single-chunk\n // updates) or nested inside `merged` entries (chunks covered by a\n // merger). Collect both so routing isn't skipped just because a mergeable\n // chunk's update only reports its paths inside `merged`.\n const updateChunkPaths = new Set<string>([\n ...Object.keys(update.instruction?.chunks ?? {}),\n ...(update.instruction?.merged ?? []).flatMap((merged) =>\n Object.keys(merged.chunks ?? {})\n ),\n ])\n\n const toCall: HmrHandlerEntry[] = []\n if (updateChunkPaths.size === 0) {\n for (const entry of registry.values()) toCall.push(entry)\n } else {\n const seen = new Set<string>()\n for (const chunkPath of updateChunkPaths) {\n const dir = path.dirname(chunkPath)\n for (const [key, entry] of registry) {\n if (dir === entry.chunkPrefix && !seen.has(key)) {\n seen.add(key)\n toCall.push(entry)\n }\n }\n }\n }\n\n // No matching runtime loaded (e.g. editing a route not required yet this\n // session): nothing live to patch, so this is a no-op. A handler that\n // throws propagates to the consumer, which evicts require.cache.\n for (const { handler } of toCall) {\n handler(update)\n }\n }\n}\n\nglobalThis.__turbopack_server_hmr_handlers__ = handlers\n\nhandlers.set(__filename, {\n handler: __turbopack_server_hmr_apply__,\n chunkPrefix,\n})\n"],"names":["hmrClientInitialized","ensureHmrClientInitialized","initializeServerHmr","moduleFactories","devModuleCache","__turbopack_server_hmr_apply__","update","emitMessage","type","data","handlers","globalThis","__turbopack_server_hmr_handlers__","Map","chunkPrefix","path","relative","RUNTIME_ROOT","dirname","__filename","replaceAll","sep","size","registry","updateChunkPaths","Set","Object","keys","instruction","chunks","merged","flatMap","toCall","entry","values","push","seen","chunkPath","dir","key","has","add","handler","set"],"mappings":"AAAA,+DAA+D;AAC/D,wCAAwC;AAExC;;;CAGC,GAED,uEAAuE;AACvE,IAAIA,uBAAuB;AAC3B,SAASC;IACP,IAAID,sBAAsB;IAC1BA,uBAAuB;IAEvB,wEAAwE;IACxE,yCAAyC;IACzC,kEAAkE;IAClEE,oBAAoBC,iBAAiBC;AACvC;AAEA,SAASC,+BAA+BC,MAAwB;IAC9DL;IACA,4EAA4E;IAC5E,4CAA4C;IAC5CM,YAAY;QACVC,MAAM;QACNC,MAAMH;IACR;AACF;AAeA,MAAMI,WACJC,WAAWC,iCAAiC,IAAI,IAAIC;AAEtD,wEAAwE;AACxE,sEAAsE;AACtE,MAAMC,cAAcC,KACjBC,QAAQ,CAACC,cAAcF,KAAKG,OAAO,CAACC,Line truncated
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
module.exports = [
|
||||
"[project]/app/layout.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
// 全局布局
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>RootLayout,
|
||||
"dynamic",
|
||||
()=>dynamic,
|
||||
"metadata",
|
||||
()=>metadata
|
||||
]);
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js [app-rsc] (ecmascript)");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$headers$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/headers.js [app-rsc] (ecmascript)");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/components/CustomCssLoader.js [app-rsc] (ecmascript)");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/components/Toast.js [app-rsc] (ecmascript)");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/components/I18nInit.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
const metadata = {
|
||||
// 初始标题用默认论坛名(AppProvider 加载期轮换 Loading.,完成后覆盖为真实名)。
|
||||
// 注意:不能设 'Loading...' —— Next.js 客户端重渲染会重置 <title> 为 metadata 值,
|
||||
// 导致加载完成后标题又变回 "Loading..."。
|
||||
title: 'Forumlify',
|
||||
description: 'Forumlify - 简洁优雅的现代社区系统'
|
||||
};
|
||||
const dynamic = 'force-dynamic';
|
||||
async function RootLayout({ children }) {
|
||||
// 语言检测:用户配置 cookie 优先,否则按浏览器 Accept-Language
|
||||
let lng = 'zh';
|
||||
try {
|
||||
const cookieStore = await (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$headers$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["cookies"])();
|
||||
const saved = cookieStore.get('forumlify-lang')?.value;
|
||||
if (saved === 'en' || saved === 'zh') {
|
||||
lng = saved;
|
||||
} else {
|
||||
const hdrs = await (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$headers$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["headers"])();
|
||||
const accept = (hdrs.get('accept-language') || '').toLowerCase();
|
||||
if (accept.startsWith('en')) lng = 'en';
|
||||
}
|
||||
} catch (e) {}
|
||||
return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("html", {
|
||||
lang: lng === 'en' ? 'en' : 'zh-CN',
|
||||
suppressHydrationWarning: true,
|
||||
children: [
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("head", {}, void 0, false, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 36,
|
||||
columnNumber: 7
|
||||
}, this),
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("body", {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("script", {
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: `(function(){
|
||||
try {
|
||||
var t = localStorage.getItem('forumlify-theme');
|
||||
if (!t) { t = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light'; }
|
||||
document.documentElement.setAttribute('data-theme', t);
|
||||
} catch (e) {}
|
||||
try { var n = localStorage.getItem('forumlify-forum-name'); if (n) document.title = n; } catch (e) {}
|
||||
// 加载页论坛名不再由脚本注入 DOM——由 Server Component 读 cookie 首帧输出,
|
||||
// React 状态渲染,SSR/客户端一致,无 hydration mismatch
|
||||
})();`
|
||||
}
|
||||
}, void 0, false, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 41,
|
||||
columnNumber: 9
|
||||
}, this),
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["ToastProvider"], {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["default"], {
|
||||
lng: lng
|
||||
}, void 0, false, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 52,
|
||||
columnNumber: 11
|
||||
}, this),
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["default"], {}, void 0, false, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 53,
|
||||
columnNumber: 11
|
||||
}, this),
|
||||
children
|
||||
]
|
||||
}, void 0, true, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 51,
|
||||
columnNumber: 9
|
||||
}, this)
|
||||
]
|
||||
}, void 0, true, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 38,
|
||||
columnNumber: 7
|
||||
}, this)
|
||||
]
|
||||
}, void 0, true, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 35,
|
||||
columnNumber: 5
|
||||
}, this);
|
||||
}
|
||||
}),
|
||||
"[project]/app/layout.js [app-rsc] (ecmascript, Next.js Server Component)", (function(__turbopack_context__){
|
||||
|
||||
__turbopack_context__.n(__turbopack_context__.i("[project]/app/layout.js [app-rsc] (ecmascript)"));
|
||||
}),
|
||||
"[project]/components/CustomCssLoader.js [app-rsc] (client reference proxy)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/components/CustomCssLoader.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/CustomCssLoader.js", "default");
|
||||
}),
|
||||
"[project]/components/CustomCssLoader.js [app-rsc] (client reference proxy) <module evaluation>", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/components/CustomCssLoader.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/CustomCssLoader.js <module evaluation>", "default");
|
||||
}),
|
||||
"[project]/components/CustomCssLoader.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__$3c$module__evaluation$3e$__ = __turbopack_context__.i("[project]/components/CustomCssLoader.js [app-rsc] (client reference proxy) <module evaluation>");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__ = __turbopack_context__.i("[project]/components/CustomCssLoader.js [app-rsc] (client reference proxy)");
|
||||
;
|
||||
__turbopack_context__.n(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__);
|
||||
}),
|
||||
"[project]/components/I18nInit.js [app-rsc] (client reference proxy)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/components/I18nInit.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/I18nInit.js", "default");
|
||||
}),
|
||||
"[project]/components/I18nInit.js [app-rsc] (client reference proxy) <module evaluation>", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/components/I18nInit.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/I18nInit.js <module evaluation>", "default");
|
||||
}),
|
||||
"[project]/components/I18nInit.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__$3c$module__evaluation$3e$__ = __turbopack_context__.i("[project]/components/I18nInit.js [app-rsc] (client reference proxy) <module evaluation>");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__ = __turbopack_context__.i("[project]/components/I18nInit.js [app-rsc] (client reference proxy)");
|
||||
;
|
||||
__turbopack_context__.n(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__);
|
||||
}),
|
||||
"[project]/components/Toast.js [app-rsc] (client reference proxy)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"ToastProvider",
|
||||
()=>ToastProvider,
|
||||
"useToast",
|
||||
()=>useToast
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const ToastProvider = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/Toast.js", "ToastProvider");
|
||||
const useToast = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call useToast() from the server but useToast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/Toast.js", "useToast");
|
||||
}),
|
||||
"[project]/components/Toast.js [app-rsc] (client reference proxy) <module evaluation>", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"ToastProvider",
|
||||
()=>ToastProvider,
|
||||
"useToast",
|
||||
()=>useToast
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const ToastProvider = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/Toast.js <module evaluation>", "ToastProvider");
|
||||
const useToast = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call useToast() from the server but useToast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/Toast.js <module evaluation>", "useToast");
|
||||
}),
|
||||
"[project]/components/Toast.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__$3c$module__evaluation$3e$__ = __turbopack_context__.i("[project]/components/Toast.js [app-rsc] (client reference proxy) <module evaluation>");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__ = __turbopack_context__.i("[project]/components/Toast.js [app-rsc] (client reference proxy)");
|
||||
;
|
||||
__turbopack_context__.n(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__);
|
||||
}),
|
||||
];
|
||||
|
||||
//# sourceMappingURL=_0g--ssi._.js.map
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/app/layout.js"],"sourcesContent":["// 全局布局\nimport './globals.css';\nimport { cookies, headers } from 'next/headers';\nimport CustomCssLoader from '@/components/CustomCssLoader';\nimport { ToastProvider } from '@/components/Toast';\nimport I18nInit from '@/components/I18nInit';\n\nexport const metadata = {\n // 初始标题用默认论坛名(AppProvider 加载期轮换 Loading.,完成后覆盖为真实名)。\n // 注意:不能设 'Loading...' —— Next.js 客户端重渲染会重置 <title> 为 metadata 值,\n // 导致加载完成后标题又变回 \"Loading...\"。\n title: 'Forumlify',\n description: 'Forumlify - 简洁优雅的现代社区系统',\n};\n\n// cookies()/headers() 是动态 API:禁止静态优化\nexport const dynamic = 'force-dynamic';\n\nexport default async function RootLayout({ children }) {\n // 语言检测:用户配置 cookie 优先,否则按浏览器 Accept-Language\n let lng = 'zh';\n try {\n const cookieStore = await cookies();\n const saved = cookieStore.get('forumlify-lang')?.value;\n if (saved === 'en' || saved === 'zh') {\n lng = saved;\n } else {\n const hdrs = await headers();\n const accept = (hdrs.get('accept-language') || '').toLowerCase();\n if (accept.startsWith('en')) lng = 'en';\n }\n } catch (e) { /* 默认 zh */ }\n\n return (\n <html lang={lng === 'en' ? 'en' : 'zh-CN'} suppressHydrationWarning>\n <head>\n </head>\n <body>\n {/* 首帧初始化(主题防 FOUC + 论坛名首帧显示):\n script 放 body 首个子元素(children 前),React 官方防 FOUC 模式 */}\n <script dangerouslySetInnerHTML={{ __html: `(function(){\n try {\n var t = localStorage.getItem('forumlify-theme');\n if (!t) { t = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light'; }\n document.documentElement.setAttribute('data-theme', t);\n } catch (e) {}\n try { var n = localStorage.getItem('forumlify-forum-name'); if (n) document.title = n; } catch (e) {}\n // 加载页论坛名不再由脚本注入 DOM——由 Server Component 读 cookie 首帧输出,\n // React 状态渲染,SSR/客户端一致,无 hydration mismatch\n })();` }} />\n <ToastProvider>\n <I18nInit lng={lng} />\n <CustomCssLoader />\n {children}\n </ToastProvider>\n </body>\n </html>\n );\n}\n"],"names":["metadata","title","description","dynamic","RootLayout","children","lng","cookieStore","saved","get","value","hdrs","accept","toLowerCase","startsWith","e","lang","suppressHydrationWarning","dangerouslySetInnerHTML","__html"],"mappings":"AAAA,OAAO;;;;;;;;;;AAEP;AACA;AACA;AACA;;;;;;;AAEO,MAAMA,WAAW;IACtB,oDAAoD;IACpD,iEAAiE;IACjE,6BAA6B;IAC7BC,OAAO;IACPC,aAAa;AACf;AAGO,MAAMC,UAAU;AAER,eAAeC,WAAW,EAAEC,QAAQ,EAAE;IACnD,6CAA6C;IAC7C,IAAIC,MAAM;IACV,IAAI;QACF,MAAMC,cAAc,MAAM,IAAA,0IAAO;QACjC,MAAMC,QAAQD,YAAYE,GAAG,CAAC,mBAAmBC;QACjD,IAAIF,UAAU,QAAQA,UAAU,MAAM;YACpCF,MAAME;QACR,OAAO;YACL,MAAMG,OAAO,MAAM,IAAA,0IAAO;YAC1B,MAAMC,SAAS,CAACD,KAAKF,GAAG,CAAC,sBAAsB,EAAE,EAAEI,WAAW;YAC9D,IAAID,OAAOE,UAAU,CAAC,OAAOR,MAAM;QACrC;IACF,EAAE,OAAOS,GAAG,CAAc;IAE1B,qBACE,8OAAC;QAAKC,MAAMV,QAAQ,OAAO,OAAO;QAASW,wBAAwB;;0BACjE,8OAAC;;;;;0BAED,8OAAC;;kCAGC,8OAAC;wBAAOC,yBAAyB;4BAAEC,QAAQ,CAAC;;;;;;;;;aASvC,CAAC;wBAAC;;;;;;kCACP,8OAAC,oIAAa;;0CACZ,8OAAC,iIAAQ;gCAACb,KAAKA;;;;;;0CACf,8OAAC,wIAAe;;;;;4BACfD;;;;;;;;;;;;;;;;;;;AAKX"}},
|
||||
{"offset": {"line": 117, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/CustomCssLoader.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/components/CustomCssLoader.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/CustomCssLoader.js\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAA6Q,GAC1S,2CACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 131, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/CustomCssLoader.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/components/CustomCssLoader.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/CustomCssLoader.js <module evaluation>\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAAiS,GAC9T,+DACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 145, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
|
||||
{"offset": {"line": 153, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/I18nInit.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/components/I18nInit.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/I18nInit.js\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAAsQ,GACnS,oCACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 167, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/I18nInit.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/components/I18nInit.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/I18nInit.js <module evaluation>\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAA0R,GACvT,wDACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 181, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
|
||||
{"offset": {"line": 189, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Toast.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const ToastProvider = registerClientReference(\n function() { throw new Error(\"Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/Toast.js\",\n \"ToastProvider\",\n);\nexport const useToast = registerClientReference(\n function() { throw new Error(\"Attempted to call useToast() from the server but useToast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/Toast.js\",\n \"useToast\",\n);\n"],"names":["ToastProvider","Error","useToast"],"mappings":";;;;;;AAAA,uEAAuE;AACvE;;AACO,MAAMA,gBAAgB,IAAA,wQAAuB,EAChD;IAAa,MAAM,IAAIC,MAAM;AAA0O,GACvQ,iCACA;AAEG,MAAMC,WAAW,IAAA,wQAAuB,EAC3C;IAAa,MAAM,IAAID,MAAM;AAAgO,GAC7P,iCACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 208, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Toast.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const ToastProvider = registerClientReference(\n function() { throw new Error(\"Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/Toast.js <module evaluation>\",\n \"ToastProvider\",\n);\nexport const useToast = registerClientReference(\n function() { throw new Error(\"Attempted to call useToast() from the server but useToast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/Toast.js <module evaluation>\",\n \"useToast\",\n);\n"],"names":["ToastProvider","Error","useToast"],"mappings":";;;;;;AAAA,uEAAuE;AACvE;;AACO,MAAMA,gBAAgB,IAAA,wQAAuB,EAChD;IAAa,MAAM,IAAIC,MAAM;AAA0O,GACvQ,qDACA;AAEG,MAAMC,WAAW,IAAA,wQAAuB,EAC3C;IAAa,MAAM,IAAID,MAAM;AAAgO,GAC7P,qDACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 227, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/app/HomeClient.js"],"sourcesContent":["'use client';\n\n// 主页客户端组件:SPA 视图调度 (feed/post/new/admin/settings/messages)\nimport { useState } from 'react';\nimport AppProvider, { useApp } from '@/components/AppProvider';\nimport Navbar from '@/components/Navbar';\nimport Sidebar from '@/components/Sidebar';\nimport Feed from '@/components/Feed';\nimport PostDetail from '@/components/PostDetail';\nimport NewPost from '@/components/NewPost';\nimport AdminPage from '@/components/AdminPage';\nimport SettingsPage from '@/components/SettingsPage';\nimport UserProfile from '@/components/UserProfile';\nimport CustomPage from '@/components/CustomPage';\nimport MessagesPage from '@/components/MessagesPage';\nimport ChatManager from '@/components/chat/ChatManager';\nimport Modals from '@/components/Modals';\nimport LoadingScreen from '@/components/LoadingScreen';\n\nfunction HomeInner() {\n const { view, currentPostId, currentPostPreview, currentUsername, currentPageName, ready, forumName, forumNameLoaded } = useApp();\n const [modal, setModal] = useState(null); // null | login | register | report\n const [reportPostId, setReportPostId] = useState(null);\n\n const openModal = (m) => setModal(m);\n const openReport = (postId) => { setReportPostId(postId); setModal('report'); };\n\n // 初始化未完成:显示全屏加载页,避免未加载完的界面闪烁\n if (!ready) {\n return <LoadingScreen forumName={forumName} forumNameLoaded={forumNameLoaded} />;\n }\n\n return (\n <div className=\"app-fade-in\">\n <Navbar onOpenModal={openModal} />\n <ChatManager />\n <div id=\"app\" style={{ display: view === 'feed' ? undefined : 'none' }}>\n <Sidebar />\n <Feed onOpenModal={openModal} onReport={openReport} />\n </div>\n\n {/* 独立页面 */}\n <div style={{ display: view !== 'feed' ? 'block' : 'none' }}>\n {view === 'post' && currentPostId && <PostDetail postId={currentPostId} initialPost={currentPostPreview} />}\n {view === 'user' && currentUsername && <UserProfile username={currentUsername} />}\n {view === 'custom' && currentPageName && <CustomPage pageName={currentPageName} />}\n {view === 'new' && <NewPost />}\n {view === 'admin' && <AdminPage />}\n {view === 'settings' && <SettingsPage />}\n {view === 'messages' && <MessagesPage />}\n </div>\n\n <Modals modal={modal} onClose={() => setModal(null)} reportPostId={reportPostId} />\n </div>\n );\n}\n\nexport default function HomeClient({ cachedName = '' }) {\n return (\n <AppProvider cachedName={cachedName}>\n <HomeInner />\n </AppProvider>\n );\n}\n"],"names":["HomeInner","view","currentPostId","currentPostPreview","currentUsername","currentPageName","ready","forumName","forumNameLoaded","modal","setModal","reportPostId","setReportPostId","openModal","m","openReport","postId","className","onOpenModal","id","style","display","undefined","onReport","initialPost","username","pageName","onClose","HomeClient","cachedName"],"mappings":";;;;;AAEA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA;;;;;;;;;;;;;;;;;AAmBA,SAASA;IACP,MAAM,EAAEC,IAAI,EAAEC,aAAa,EAAEC,kBAAkB,EAAEC,eAAe,EAAEC,eAAe,EAAEC,KAAK,EAAEC,SAAS,EAAEC,eAAe,EAAE,GAAG,IAAA,mIAAM;IAC/H,MAAM,CAACC,OAAOC,SAAS,GAAG,IAAA,iNAAQ,EAAC,OAAO,mCAAmC;IAC7E,MAAM,CAACC,cAAcC,gBAAgB,GAAG,IAAA,iNAAQ,EAAC;IAEjD,MAAMC,YAAY,CAACC,IAAMJ,SAASI;IAClC,MAAMC,aAAa,CAACC;QAAaJ,gBAAgBI;QAASN,SAAS;IAAW;IAE9E,6BAA6B;IAC7B,IAAI,CAACJ,OAAO;QACV,qBAAO,8OAAC,sIAAa;YAACC,WAAWA;YAAWC,iBAAiBA;;;;;;IAC/D;IAEA,qBACE,8OAAC;QAAIS,WAAU;;0BACb,8OAAC,+HAAM;gBAACC,aAAaL;;;;;;0BACrB,8OAAC,4IAAW;;;;;0BACZ,8OAAC;gBAAIM,IAAG;gBAAMC,OAAO;oBAAEC,SAASpB,SAAS,SAASqB,YAAY;gBAAO;;kCACnE,8OAAC,gIAAO;;;;;kCACR,8OAAC,6HAAI;wBAACJ,aAAaL;wBAAWU,UAAUR;;;;;;;;;;;;0BAI1C,8OAAC;gBAAIK,OAAO;oBAAEC,SAASpB,SAAS,SAAS,UAAU;gBAAO;;oBACvDA,SAAS,UAAUC,+BAAiB,8OAAC,mIAAU;wBAACc,QAAQd;wBAAesB,aAAarB;;;;;;oBACpFF,SAAS,UAAUG,iCAAmB,8OAAC,oIAAW;wBAACqB,UAAUrB;;;;;;oBAC7DH,SAAS,YAAYI,iCAAmB,8OAAC,mIAAU;wBAACqB,UAAUrB;;;;;;oBAC9DJ,SAAS,uBAAS,8OAAC,gIAAO;;;;;oBAC1BA,SAAS,yBAAW,8OAAC,kIAAS;;;;;oBAC9BA,SAAS,4BAAc,8OAAC,qIAAY;;;;;oBACpCA,SAAS,4BAAc,8OAAC,qIAAY;;;;;;;;;;;0BAGvC,8OAAC,+HAAM;gBAACQ,OAAOA;gBAAOkB,SAAS,IAAMjB,SAAS;gBAAOC,cAAcA;;;;;;;;;;;;AAGzE;AAEe,SAASiB,WAAW,EAAEC,aAAa,EAAE,EAAE;IACpD,qBACE,8OAAC,oIAAW;QAACA,YAAYA;kBACvB,cAAA,8OAAC7B;;;;;;;;;;AAGP"}},
|
||||
{"offset": {"line": 189, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/AccountSecurity.js"],"sourcesContent":["'use client';\n\n// 账户安全:修改密码 + 修改邮箱\nimport { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport { useApp } from './AppProvider';\nimport { Icon } from './Icons';\nimport { useToast } from './Toast';\n\nexport default function AccountSecurity() {\n const { currentUser } = useApp();\n const { t } = useTranslation();\n const { toast } = useToast();\n const [oldPassword, setOldPassword] = useState('');\n const [newPassword, setNewPassword] = useState('');\n const [pwStatus, setPwStatus] = useState(null);\n const [emailPassword, setEmailPassword] = useState('');\n const [newEmail, setNewEmail] = useState('');\n const [emailStatus, setEmailStatus] = useState(null);\n\n const changePassword = async () => {\n if (!oldPassword || !newPassword) { toast(t('security.fillAll'), 'warning'); return; }\n if (newPassword.length < 6) { toast(t('security.pwMin'), 'warning'); return; }\n try {\n await API.updatePassword(currentUser.id, oldPassword, newPassword);\n setPwStatus({ ok: true, msg: t('security.pwChanged') });\n setOldPassword('');\n setNewPassword('');\n } catch (err) {\n setPwStatus({ ok: false, msg: err.message });\n }\n };\n\n const changeEmail = async () => {\n if (!emailPassword || !newEmail) { toast(t('security.fillAll'), 'warning'); return; }\n try {\n await API.updateEmail(currentUser.id, emailPassword, newEmail);\n setEmailStatus({ ok: true, msg: t('security.emailChanged') });\n setEmailPassword('');\n setNewEmail('');\n } catch (err) {\n setEmailStatus({ ok: false, msg: err.message });\n }\n };\n\n return (\n <div style={{ marginTop: 16, background: 'var(--surface)', border: '1px solid var(--border)', borderRadius: 8, padding: 20 }}>\n <h3 style={{ fontSize: 16, marginBottom: 12 }}><Icon name=\"lock\" size={16} /> {t('security.title')}</h3>\n\n <div style={{ marginBottom: 12 }}>\n <label style={{ fontWeight: 600, fontSize: 13, display: 'block', marginBottom: 4 }}>{t('security.currentPw')}</label>\n <input type=\"password\" value={oldPassword} style={{ width: '100%', padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, fontSize: 14, background: 'var(--bg)', color: 'var(--text)' }} onChange={(e) => setOldPassword(e.target.value)} />\n </div>\n <div style={{ marginBottom: 12 }}>\n <label style={{ fontWeight: 600, fontSize: 13, display: 'block', marginBottom: 4 }}>{t('security.newPw')}</label>\n <input type=\"password\" value={newPassword} style={{ width: '100%', padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, fontSize: 14, background: 'var(--bg)', color: 'var(--text)' }} onChange={(e) => setNewPassword(e.target.value)} />\n </div>\n <button className=\"btn-secondary\" style={{ padding: '8px 16px', border: '1px solid var(--border)', borderRadius: 4, background: 'var(--surface)', cursor: 'pointer', color: 'var(--text)' }} onClick={changePassword}>{t('security.changePw')}</button>\n {pwStatus && <div style={{ fontSize: 13, marginTop: 6, color: pwStatus.ok ? '#22c55e' : '#ef4444', display: 'flex', alignItems: 'center', gap: 5 }}><Icon name={pwStatus.ok ? 'success' : 'error'} size={14} /> {pwStatus.msg}</div>}\n\n <div style={{ borderTop: '1px solid var(--border)', margin: '16px 0' }}></div>\n\n <div style={{ marginBottom: 12 }}>\n <label style={{ fontWeight: 600, fontSize: 13, display: 'block', marginBottom: 4 }}>{t('security.currentPwVerify')}</label>\n <input type=\"password\" value={emailPassword} style={{ width: '100%', padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, fontSize: 14, background: 'var(--bg)', color: 'var(--text)' }} onChange={(e) => setEmailPassword(e.target.value)} />\n </div>\n <div style={{ marginBottom: 12 }}>\n <label style={{ fontWeight: 600, fontSize: 13, display: 'block', marginBottom: 4 }}>{t('security.newEmail')}</label>\n <input type=\"email\" value={newEmail} style={{ width: '100%', padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, fontSize: 14, background: 'var(--bg)', color: 'var(--text)' }} onChange={(e) => setNewEmail(e.target.value)} />\n </div>\n <button className=\"btn-secondary\" style={{ padding: '8px 16px', border: '1px solid var(--border)', borderRadius: 4, background: 'var(--surface)', cursor: 'pointer', color: 'var(--text)' }} onClick={changeEmail}>{t('security.changeEmail')}</button>\n {emailStatus && <div style={{ fontSize: 13, marginTop: 6, color: emailStatus.ok ? '#22c55e' : '#ef4444', display: 'flex', alignItems: 'center', gap: 5 }}><Icon name={emailStatus.ok ? 'success' : 'error'} size={14} /> {emailStatusLine truncated
|
||||
{"offset": {"line": 570, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/AdminPage.js"],"sourcesContent":["'use client';\n\n// 管理后台:侧边栏布局(对齐上游 main 分支)\nimport { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Icon } from './Icons';\nimport AdminReports from './admin/AdminReports';\nimport AdminUsers from './admin/AdminUsers';\nimport AdminLogs from './admin/AdminLogs';\nimport AdminLinks from './admin/AdminLinks';\nimport AdminForumSettings from './admin/AdminForumSettings';\nimport AdminCustomPages from './admin/AdminCustomPages';\nimport AdminCustomCss from './admin/AdminCustomCss';\n\nconst NAV = [\n { key: 'reports', labelKey: 'admin.reports', icon: 'shieldAlert' },\n { key: 'users', labelKey: 'admin.users', icon: 'users' },\n { key: 'logs', labelKey: 'admin.logs', icon: 'file' },\n { key: 'links', labelKey: 'admin.links', icon: 'link' },\n { key: 'settings', labelKey: 'admin.forumSettings', icon: 'settings' },\n { key: 'custom', labelKey: 'admin.customPages', icon: 'file' },\n { key: 'css', labelKey: 'admin.customCss', icon: 'file' },\n];\n\nexport default function AdminPage() {\n const { t } = useTranslation();\n const [tab, setTab] = useState('reports');\n\n return (\n <div className=\"page-slide active\">\n <div className=\"page-header\" style={{ maxWidth: 1200, margin: '0 auto', width: '100%' }}>\n <h2><Icon name=\"shieldAlert\" size={20} /> {t('admin.title')}</h2>\n </div>\n <div className=\"admin-layout\" style={{ maxWidth: 1200, margin: '0 auto', width: '100%' }}>\n <aside className=\"admin-sidebar\">\n <nav className=\"admin-nav\">\n {NAV.map((n) => (\n <a\n key={n.key}\n href=\"#\"\n className={'admin-nav-item' + (tab === n.key ? ' active' : '')}\n data-tab={n.key}\n onClick={(e) => { e.preventDefault(); setTab(n.key); }}\n >\n <span className=\"nav-icon\"><Icon name={n.icon} size={18} /></span>\n {t(n.labelKey)}\n </a>\n ))}\n </nav>\n </aside>\n <main className=\"admin-content\" id=\"adminContent\">\n {tab === 'reports' && <AdminReports />}\n {tab === 'users' && <AdminUsers />}\n {tab === 'logs' && <AdminLogs />}\n {tab === 'links' && <AdminLinks />}\n {tab === 'custom' && <AdminCustomPages />}\n {tab === 'css' && <AdminCustomCss />}\n {tab === 'settings' && <AdminForumSettings />}\n </main>\n </div>\n </div>\n );\n}\n"],"names":["NAV","key","labelKey","icon","AdminPage","t","tab","setTab","className","style","maxWidth","margin","width","name","size","map","n","href","onClick","e","preventDefault","id"],"mappings":";;;;;AAEA,2BAA2B;AAC3B;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZA;;;;;;;;;;;;AAcA,MAAMA,MAAM;IACV;QAAEC,KAAK;QAAWC,UAAU;QAAiBC,MAAM;IAAc;IACjE;QAAEF,KAAK;QAASC,UAAU;QAAeC,MAAM;IAAQ;IACvD;QAAEF,KAAK;QAAQC,UAAU;QAAcC,MAAM;IAAO;IACpD;QAAEF,KAAK;QAASC,UAAU;QAAeC,MAAM;IAAO;IACtD;QAAEF,KAAK;QAAYC,UAAU;QAAuBC,MAAM;IAAW;IACrE;QAAEF,KAAK;QAAUC,UAAU;QAAqBC,MAAM;IAAO;IAC7D;QAAEF,KAAK;QAAOC,UAAU;QAAmBC,MAAM;IAAO;CACzD;AAEc,SAASC;IACtB,MAAM,EAAEC,CAAC,EAAE,GAAG,IAAA,kLAAc;IAC5B,MAAM,CAACC,KAAKC,OAAO,GAAG,IAAA,iNAAQ,EAAC;IAE/B,qBACE,8OAAC;QAAIC,WAAU;;0BACb,8OAAC;gBAAIA,WAAU;gBAAcC,OAAO;oBAAEC,UAAU;oBAAMC,QAAQ;oBAAUC,OAAO;gBAAO;0BACpF,cAAA,8OAAC;;sCAAG,8OAAC,2HAAI;4BAACC,MAAK;4BAAcC,MAAM;;;;;;wBAAM;wBAAET,EAAE;;;;;;;;;;;;0BAE/C,8OAAC;gBAAIG,WAAU;gBAAeC,OAAO;oBAAEC,UAAU;oBAAMC,QAAQ;oBAAUC,OAAO;gBAAO;;kCACrF,8OAAC;wBAAMJ,WAAU;kCACf,cAAA,8OAAC;4BAAIA,WAAU;sCACZR,IAAIe,GAAG,CAAC,CAACC,kBACR,8OAAC;oCAECC,MAAK;oCACLT,WAAW,mBAAmB,CAACF,QAAQU,EAAEf,GAAG,GAAG,YAAY,EAAE;oCAC7D,YAAUe,EAAEf,GAAG;oCACfiB,SAAS,CAACC;wCAAQA,EAAEC,cAAc;wCAAIb,OAAOS,EAAEf,GAAG;oCAAG;;sDAErD,8OAAC;4CAAKO,WAAU;sDAAW,cAAA,8OAAC,2HAAI;gDAACK,MAAMG,EAAEb,IAAI;gDAAEW,MAAM;;;;;;;;;;;wCACpDT,EAAEW,EAAEd,QAAQ;;mCAPRc,EAAEf,GAAG;;;;;;;;;;;;;;;kCAYlB,8OAAC;wBAAKO,WAAU;wBAAgBa,IAAG;;4BAChCf,QAAQ,2BAAa,8OAAC,8IAAY;;;;;4BAClCA,QAAQ,yBAAW,8OAAC,4IAAU;;;;;4BAC9BA,QAAQ,wBAAU,8OAAC,2IAAS;;;;;4BAC5BA,QAAQ,yBAAW,8OAAC,4IAAU;;;;;4BAC9BA,QAAQ,0BAAY,8OAAC,kJAAgB;;;;;4BACrCA,QAAQ,uBAAS,8OAAC,gJAAc;;;;;4BAChCA,QAAQ,4BAAc,8OAAC,oJAAkB;;;;;;;;;;;;;;;;;;;;;;;AAKpD"}},
|
||||
{"offset": {"line": 787, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/AppProvider.js"],"sourcesContent":["'use client';\n\n// 全局状态 Provider:用户、主题、论坛名、当前视图(feed/post/new/admin/...)\nimport { createContext, useContext, useState, useEffect, useCallback, useRef } from 'react';\nimport { flushSync } from 'react-dom';\nimport { API, getTheme, setToken, getToken } from '@/lib/api';\n\nconst AppContext = createContext(null);\n\nconst POST_TRANSITION_PARTS = [\n ['.post-avatar', 'post-avatar'],\n ['.post-username', 'post-author'],\n ['.post-title', 'post-heading'],\n ['.post-time', 'post-time'],\n ['.post-content', 'post-body'],\n ['.post-images', 'post-feed-media'],\n ['.post-pin-state', 'post-pin-state'],\n ['.post-edited-state', 'post-edited-state'],\n ['.post-actions', 'post-feed-actions'],\n];\n\nfunction namePostTransitionParts(card) {\n if (!card) return [];\n return POST_TRANSITION_PARTS.flatMap(([selector, name]) => {\n const element = card.querySelector(selector);\n if (!element) return [];\n element.style.viewTransitionName = name;\n return [element];\n });\n}\n\nfunction clearPostTransitionParts(elements) {\n elements.forEach((element) => {\n element.style.viewTransitionName = '';\n });\n}\n\nfunction waitForPostImages(container) {\n const images = Array.from(container?.querySelectorAll('img') || []);\n if (images.length === 0) return Promise.resolve();\n\n return new Promise((resolve) => {\n let settled = false;\n const finish = () => {\n if (settled) return;\n settled = true;\n clearTimeout(timeout);\n resolve();\n };\n const timeout = setTimeout(finish, 1200);\n Promise.all(images.map((image) => image.decode?.().catch(() => {}) || Promise.resolve())).then(finish);\n });\n}\n\nfunction stageSharedGeometry(transition, {\n name,\n duration,\n moveOffset,\n moveEasing = 'cubic-bezier(0.16, 1, 0.3, 1)',\n resizeEasing = 'cubic-bezier(0.4, 0, 0.2, 1)',\n reverse = false,\n}) {\n transition.ready.then(() => {\n const groupAnimation = document.getAnimations().find(\n (animation) => animation.effect?.pseudoElement === `::view-transition-group(${name})`\n );\n const frames = groupAnimation?.effect?.getKeyframes();\n if (!groupAnimation || !frames || frames.length < 2) return;\n\n const start = frames[0];\n const end = frames[frames.length - 1];\n groupAnimation.effect.setKeyframes(reverse ? [\n {\n offset: 0,\n width: start.width,\n height: start.height,\n transform: start.transform,\n easing: resizeEasing,\n },\n {\n offset: 1 - moveOffset,\n width: start.width,\n height: end.height,\n transform: start.transform,\n easing: moveEasing,\n },\n {\n offset: 1,\n width: end.width,\n height: end.height,\n transform: end.transform,\n },\n ] : [\n {\n offset: 0,\n width: start.width,\n height: start.height,\n transform: start.transform,\n easing: moveEasing,\n },\n {\n offset: moveOffset,\n width: end.width,\n height: start.height,\n transform: end.transform,\n easing: resizeEasing,\n },\n {\n offset: 1,\n width: end.width,\n height: end.height,\n transform: end.transform,\n },\n ]);\n groupAnimation.effect.updateTiming({ duration, easing: 'linear', fill: 'both' });\n }).catch(() => {});\n}\n\nexport function useApp() {\n return useContext(AppContext);\n}\n\nexport default function AppProvider({ children, cachedName = '' }) {\n const [currentUser, setCurrentUser] = useState(null);\n // 论坛名初始值来自 cookie(SSR 首帧即输出,SSR/客户端一致 → 无 hydration mismatch)\n const [forumName, setForumName] = useState(cachedName || 'Forumlify');\n const [theme, setThemeState] = useState('light');\n const [view, setView] = useState('feed'); // feed | post | new | admin | settings | messages | user | custom\n const [currentPostId, setCurrentPostId] = useState(null);\n const [currentPostPreview, setCurrentPostPreview] = useState(null);\n const [currentUsername, setCurrentUsername] = useState(null);\n const [currentPageName, setCurrentPageName] = useState(null);\n const [sort, setSort] = useState('latest');\n const [refreshKey, setRefreshKey] = useState(0);\n const [ready, setReady] = useState(false); // 初始加载完成标记(控制加载页/淡入)\n // 有 cookie 缓存名即视为已加载(SSR/客户端一致)\n const [forumNameLoaded, setForumNameLoaded] = useState(!!cachedName);\n const loadedRef = useRef(false);\n\n const refresh = useCallback(() => setRefreshKey((k) => k + 1), []);\n\n // 论坛名写 cookie(SSR 可读 → 首帧输出,无需内联脚本注入 DOM)\n const syncForumNameCookie = useCallback((nLine truncated
|
||||
{"offset": {"line": 1316, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/CaptchaImage.js"],"sourcesContent":["'use client';\n\n// 图片验证码:用 canvas 绘制算式(带噪点/干扰线,挡一部分人机)\n// 点击图片可刷新验证码\nimport { useEffect, useRef } from 'react';\n\nexport default function CaptchaImage({ captcha, onRefresh }) {\n const canvasRef = useRef(null);\n\n useEffect(() => {\n const canvas = canvasRef.current;\n if (!canvas || !captcha) return;\n const ctx = canvas.getContext('2d');\n const W = canvas.width;\n const H = canvas.height;\n\n // 背景(半透明玻璃感)\n ctx.clearRect(0, 0, W, H);\n ctx.fillStyle = 'rgba(91, 155, 213, 0.10)';\n ctx.fillRect(0, 0, W, H);\n\n // 干扰线\n for (let i = 0; i < 4; i++) {\n ctx.strokeStyle = `rgba(${80 + Math.random() * 120}, ${80 + Math.random() * 120}, 200, ${0.2 + Math.random() * 0.3})`;\n ctx.lineWidth = 1 + Math.random();\n ctx.beginPath();\n ctx.moveTo(Math.random() * W, Math.random() * H);\n ctx.lineTo(Math.random() * W, Math.random() * H);\n ctx.stroke();\n }\n\n // 噪点\n for (let i = 0; i < 30; i++) {\n ctx.fillStyle = `rgba(${Math.random() * 200}, ${Math.random() * 200}, 220, ${0.3 + Math.random() * 0.5})`;\n ctx.beginPath();\n ctx.arc(Math.random() * W, Math.random() * H, 1 + Math.random() * 1.5, 0, Math.PI * 2);\n ctx.fill();\n }\n\n // 算式文字(每个字符轻微旋转/位移,增加识别难度)\n const text = (captcha.text || captcha.question || '').replace(' = ?', '');\n const chars = text.split('');\n const fontSize = Math.floor(H * 0.52);\n const step = W / (chars.length + 1);\n chars.forEach((ch, i) => {\n ctx.save();\n ctx.translate(step * (i + 1) + (Math.random() - 0.5) * 6, H / 2 + (Math.random() - 0.5) * 6);\n ctx.rotate((Math.random() - 0.5) * 0.25);\n ctx.font = `bold ${fontSize}px -apple-system, \"SF Pro Display\", \"Segoe UI\", Roboto, sans-serif`;\n ctx.fillStyle = `rgba(${40 + Math.random() * 60}, ${50 + Math.random() * 50}, 90, 0.9)`;\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.fillText(ch, 0, 0);\n ctx.restore();\n });\n }, [captcha]);\n\n return (\n <canvas\n ref={canvasRef}\n width={120}\n height={40}\n onClick={onRefresh}\n title=\"看不清?点击刷新\"\n style={{ cursor: 'pointer', borderRadius: 6, border: '1px solid var(--glass-border)', verticalAlign: 'middle' }}\n />\n );\n}\n"],"names":["CaptchaImage","captcha","onRefresh","canvasRef","canvas","current","ctx","getContext","W","width","H","height","clearRect","fillStyle","fillRect","i","strokeStyle","Math","random","lineWidth","beginPath","moveTo","lineTo","stroke","arc","PI","fill","text","question","replace","chars","split","fontSize","floor","step","length","forEach","ch","save","translate","rotate","font","textAlign","textBaseline","fillText","restore","ref","onClick","title","style","cursor","borderRadius","border","verticalAlign"],"mappings":";;;;;AAEA,sCAAsC;AACtC,aAAa;AACb;AAJA;;;AAMe,SAASA,aAAa,EAAEC,OAAO,EAAEC,SAAS,EAAE;IACzD,MAAMC,YAAY,IAAA,+MAAM,EAAC;IAEzB,IAAA,kNAAS,EAAC;QACR,MAAMC,SAASD,UAAUE,OAAO;QAChC,IAAI,CAACD,UAAU,CAACH,SAAS;QACzB,MAAMK,MAAMF,OAAOG,UAAU,CAAC;QAC9B,MAAMC,IAAIJ,OAAOK,KAAK;QACtB,MAAMC,IAAIN,OAAOO,MAAM;QAEvB,aAAa;QACbL,IAAIM,SAAS,CAAC,GAAG,GAAGJ,GAAGE;QACvBJ,IAAIO,SAAS,GAAG;QAChBP,IAAIQ,QAAQ,CAAC,GAAG,GAAGN,GAAGE;QAEtB,MAAM;QACN,IAAK,IAAIK,IAAI,GAAGA,IAAI,GAAGA,IAAK;YAC1BT,IAAIU,WAAW,GAAG,CAAC,KAAK,EAAE,KAAKC,KAAKC,MAAM,KAAK,IAAI,EAAE,EAAE,KAAKD,KAAKC,MAAM,KAAK,IAAI,OAAO,EAAE,MAAMD,KAAKC,MAAM,KAAK,IAAI,CAAC,CAAC;YACrHZ,IAAIa,SAAS,GAAG,IAAIF,KAAKC,MAAM;YAC/BZ,IAAIc,SAAS;YACbd,IAAIe,MAAM,CAACJ,KAAKC,MAAM,KAAKV,GAAGS,KAAKC,MAAM,KAAKR;YAC9CJ,IAAIgB,MAAM,CAACL,KAAKC,MAAM,KAAKV,GAAGS,KAAKC,MAAM,KAAKR;YAC9CJ,IAAIiB,MAAM;QACZ;QAEA,KAAK;QACL,IAAK,IAAIR,IAAI,GAAGA,IAAI,IAAIA,IAAK;YAC3BT,IAAIO,SAAS,GAAG,CAAC,KAAK,EAAEI,KAAKC,MAAM,KAAK,IAAI,EAAE,EAAED,KAAKC,MAAM,KAAK,IAAI,OAAO,EAAE,MAAMD,KAAKC,MAAM,KAAK,IAAI,CAAC,CAAC;YACzGZ,IAAIc,SAAS;YACbd,IAAIkB,GAAG,CAACP,KAAKC,MAAM,KAAKV,GAAGS,KAAKC,MAAM,KAAKR,GAAG,IAAIO,KAAKC,MAAM,KAAK,KAAK,GAAGD,KAAKQ,EAAE,GAAG;YACpFnB,IAAIoB,IAAI;QACV;QAEA,2BAA2B;QAC3B,MAAMC,OAAO,CAAC1B,QAAQ0B,IAAI,IAAI1B,QAAQ2B,QAAQ,IAAI,EAAE,EAAEC,OAAO,CAAC,QAAQ;QACtE,MAAMC,QAAQH,KAAKI,KAAK,CAAC;QACzB,MAAMC,WAAWf,KAAKgB,KAAK,CAACvB,IAAI;QAChC,MAAMwB,OAAO1B,IAAI,CAACsB,MAAMK,MAAM,GAAG,CAAC;QAClCL,MAAMM,OAAO,CAAC,CAACC,IAAItB;YACjBT,IAAIgC,IAAI;YACRhC,IAAIiC,SAAS,CAACL,OAAO,CAACnB,IAAI,CAAC,IAAI,CAACE,KAAKC,MAAM,KAAK,GAAG,IAAI,GAAGR,IAAI,IAAI,CAACO,KAAKC,MAAM,KAAK,GAAG,IAAI;YAC1FZ,IAAIkC,MAAM,CAAC,CAACvB,KAAKC,MAAM,KAAK,GAAG,IAAI;YACnCZ,IAAImC,IAAI,GAAG,CAAC,KAAK,EAAET,SAAS,kEAAkE,CAAC;YAC/F1B,IAAIO,SAAS,GAAG,CAAC,KAAK,EAAE,KAAKI,KAAKC,MAAM,KAAK,GAAG,EAAE,EAAE,KAAKD,KAAKC,MAAM,KAAK,GAAG,UAAU,CAAC;YACvFZ,IAAIoC,SAAS,Line truncated
|
||||
{"offset": {"line": 1396, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/CustomPage.js"],"sourcesContent":["'use client';\n\n// 自定义页面:以 iframe srcdoc 渲染 HTML 内容(与原版一致)\nimport { useEffect, useState } from 'react';\nimport { API } from '@/lib/api';\n\nexport default function CustomPage({ pageName }) {\n const [html, setHtml] = useState(null);\n const [error, setError] = useState(null);\n\n useEffect(() => {\n setHtml(null);\n setError(null);\n API.getCustomPage(pageName)\n .then((page) => setHtml(page.content))\n .catch((err) => setError(err.message));\n }, [pageName]);\n\n if (error) {\n return (\n <div style={{ padding: '84px 32px', textAlign: 'center', color: '#ef4444' }}>\n 页面加载失败:{error}\n </div>\n );\n }\n if (html === null) {\n return <div style={{ padding: '84px 32px', textAlign: 'center', color: '#94a3b8' }}><span className=\"spinner-sm\" />加载中...</div>;\n }\n\n const srcdoc = `<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<style>\n * { margin: 0; padding: 0; box-sizing: border-box; }\n body {\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n padding: 24px;\n background: var(--bg, #f6f8fc);\n color: var(--text, #0a0e1a);\n }\n @media (prefers-color-scheme: dark) {\n body { background: #0f1117; color: #e8edf5; }\n }\n</style>\n</head>\n<body>${html}</body>\n</html>`;\n\n return (\n <div className=\"custom-page-container\" style={{ padding: '84px 32px 40px', background: 'var(--bg)', minHeight: '100vh' }}>\n <iframe\n style={{ width: '100%', minHeight: '70vh', border: 'none', borderRadius: 8, background: 'var(--surface)' }}\n sandbox=\"allow-scripts allow-modals allow-same-origin\"\n srcDoc={srcdoc}\n title={pageName}\n />\n </div>\n );\n}\n"],"names":["CustomPage","pageName","html","setHtml","error","setError","getCustomPage","then","page","content","catch","err","message","style","padding","textAlign","color","className","srcdoc","background","minHeight","width","border","borderRadius","sandbox","srcDoc","title"],"mappings":";;;;;AAEA,0CAA0C;AAC1C;AACA;AAJA;;;;AAMe,SAASA,WAAW,EAAEC,QAAQ,EAAE;IAC7C,MAAM,CAACC,MAAMC,QAAQ,GAAG,IAAA,iNAAQ,EAAC;IACjC,MAAM,CAACC,OAAOC,SAAS,GAAG,IAAA,iNAAQ,EAAC;IAEnC,IAAA,kNAAS,EAAC;QACRF,QAAQ;QACRE,SAAS;QACT,iHAAG,CAACC,aAAa,CAACL,UACfM,IAAI,CAAC,CAACC,OAASL,QAAQK,KAAKC,OAAO,GACnCC,KAAK,CAAC,CAACC,MAAQN,SAASM,IAAIC,OAAO;IACxC,GAAG;QAACX;KAAS;IAEb,IAAIG,OAAO;QACT,qBACE,8OAAC;YAAIS,OAAO;gBAAEC,SAAS;gBAAaC,WAAW;gBAAUC,OAAO;YAAU;;gBAAG;gBACnEZ;;;;;;;IAGd;IACA,IAAIF,SAAS,MAAM;QACjB,qBAAO,8OAAC;YAAIW,OAAO;gBAAEC,SAAS;gBAAaC,WAAW;gBAAUC,OAAO;YAAU;;8BAAG,8OAAC;oBAAKC,WAAU;;;;;;gBAAe;;;;;;;IACrH;IAEA,MAAMC,SAAS,CAAC;;;;;;;;;;;;;;;;;;MAkBZ,EAAEhB,KAAK;OACN,CAAC;IAEN,qBACE,8OAAC;QAAIe,WAAU;QAAwBJ,OAAO;YAAEC,SAAS;YAAkBK,YAAY;YAAaC,WAAW;QAAQ;kBACrH,cAAA,8OAAC;YACCP,OAAO;gBAAEQ,OAAO;gBAAQD,WAAW;gBAAQE,QAAQ;gBAAQC,cAAc;gBAAGJ,YAAY;YAAiB;YACzGK,SAAQ;YACRC,QAAQP;YACRQ,OAAOzB;;;;;;;;;;;AAIf"}},
|
||||
{"offset": {"line": 1511, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Feed.js"],"sourcesContent":["'use client';\n\n// 信息流:帖子列表 + 排序 tab + 发布新帖按钮\nimport { useEffect, useState, useCallback, useRef } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport { useApp } from './AppProvider';\nimport { Icon } from './Icons';\nimport ImageViewer from './ImageViewer';\nimport { renderMarkdown } from '@/lib/markdown';\nimport { useToast } from './Toast';\n\nfunction avatar(username) {\n return 'https://ui-avatars.com/api/?name=' + encodeURIComponent(username || '匿名用户') +\n '&background=6366f1&color=fff&size=64';\n}\n\nexport default function Feed({ onOpenModal, onReport }) {\n const { currentUser, sort, setSort, openPost, openUser, navigate, refreshKey } = useApp();\n const { t } = useTranslation();\n const { toast, confirmAction } = useToast();\n const [posts, setPosts] = useState(null);\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState(true);\n const [page, setPage] = useState(1);\n const [totalPages, setTotalPages] = useState(1);\n const [viewerSrc, setViewerSrc] = useState(null);\n const [selectedSort, setSelectedSort] = useState(sort);\n const [drawerPhase, setDrawerPhase] = useState('idle');\n const postListRef = useRef(null);\n const sortTimerRef = useRef(null);\n const pendingSortRef = useRef(null);\n const PAGE_SIZE = 20;\n\n const load = useCallback(async (targetPage) => {\n setError(null);\n try {\n const result = await API.getPosts(sort, null, targetPage, PAGE_SIZE);\n setPosts(result.data || []);\n setTotalPages(result.pagination?.totalPages || 1);\n setPage(result.pagination?.page || 1);\n } catch (err) {\n setError(err.message);\n setPosts([]);\n } finally {\n if (pendingSortRef.current === sort) {\n requestAnimationFrame(() => {\n setDrawerPhase('opening');\n sortTimerRef.current = setTimeout(() => {\n pendingSortRef.current = null;\n setDrawerPhase('idle');\n }, 360);\n });\n }\n }\n }, [sort, refreshKey]);\n\n useEffect(() => { load(page); }, [load]);\n\n // 长帖内容:超过 3 行时加 .has-fade(底部渐变遮罩提示还有更多内容)\n useEffect(() => {\n if (!posts || posts.length === 0 || !postListRef.current) return;\n const els = postListRef.current.querySelectorAll('.post-content');\n els.forEach((el) => {\n if (el.scrollHeight > el.clientHeight + 4) {\n el.classList.add('has-fade');\n } else {\n el.classList.remove('has-fade');\n }\n });\n }, [posts]);\n\n // 排序切换时回第一页\n useEffect(() => { setPage(1); }, [sort]);\n\n useEffect(() => () => clearTimeout(sortTimerRef.current), []);\n\n const handleSortChange = (nextSort) => {\n if (nextSort === selectedSort) return;\n\n setSelectedSort(nextSort);\n clearTimeout(sortTimerRef.current);\n\n // 快速切回当前排序时,直接重新展开尚未替换的列表。\n if (nextSort === sort) {\n pendingSortRef.current = null;\n setDrawerPhase('opening');\n sortTimerRef.current = setTimeout(() => setDrawerPhase('idle'), 360);\n return;\n }\n\n setDrawerPhase('closing');\n sortTimerRef.current = setTimeout(() => {\n pendingSortRef.current = nextSort;\n setDrawerPhase('closed');\n setSort(nextSort);\n }, 220);\n };\n\n const handleDelete = async (postId) => {\n if (!await confirmAction(t('feed.confirmDelete'))) return;\n try {\n await API.deletePost(postId);\n load(page);\n } catch (err) {\n toast(t('feed.deleteFailed', { msg: err.message }), 'error');\n }\n };\n\n return (\n <main id=\"feed\">\n <div className=\"feed-header\">\n <div className=\"feed-header-left\">\n <button className={'tab' + (selectedSort === 'latest' ? ' active' : '')} onClick={() => handleSortChange('latest')}>{t('feed.latest')}</button>\n <button className={'tab' + (selectedSort === 'hot' ? ' active' : '')} onClick={() => handleSortChange('hot')}>{t('feed.hot')}</button>\n </div>\n <button\n className=\"btn-primary fab-btn\"\n onClick={() => {\n if (!currentUser) { toast(t('newPost.pleaseLogin'), 'warning'); return; }\n navigate('new');\n }}\n >\n <Icon name=\"plus\" /> {t('feed.newPost')}\n </button>\n </div>\n <div className={'feed-posts-drawer ' + drawerPhase}>\n <div className=\"feed-posts-drawer-inner\">\n <div id=\"postList\" ref={postListRef}>\n {posts === null ? (\n <div style={{ textAlign: 'center', color: '#94a3b8', padding: '40px 0' }}><span className=\"spinner-sm\" />{t('feed.loading')}</div>\n ) : error ? (\Line truncated
|
||||
{"offset": {"line": 2085, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/ImageViewer.js"],"sourcesContent":["'use client';\n\n// 图片查看器(点击帖子图片放大)\nimport { useEffect } from 'react';\n\nexport default function ImageViewer({ src, onClose }) {\n useEffect(() => {\n const onKey = (e) => { if (e.key === 'Escape') onClose(); };\n document.addEventListener('keydown', onKey);\n return () => document.removeEventListener('keydown', onKey);\n }, [onClose]);\n\n return (\n <div\n className=\"modal active\"\n style={{\n position: 'fixed', inset: 0, background: 'rgba(0,0,0,0.85)', zIndex: 9999,\n display: 'flex', alignItems: 'center', justifyContent: 'center',\n cursor: 'pointer', animation: 'fadeIn 0.2s ease-out',\n }}\n onClick={onClose}\n >\n <img\n src={src}\n alt=\"\"\n style={{\n maxWidth: '90vw', maxHeight: '90vh', objectFit: 'contain',\n borderRadius: 8, boxShadow: '0 8px 32px rgba(0,0,0,0.5)',\n cursor: 'default', userSelect: 'none',\n }}\n onClick={(e) => e.stopPropagation()}\n />\n </div>\n );\n}\n"],"names":["ImageViewer","src","onClose","onKey","e","key","document","addEventListener","removeEventListener","className","style","position","inset","background","zIndex","display","alignItems","justifyContent","cursor","animation","onClick","alt","maxWidth","maxHeight","objectFit","borderRadius","boxShadow","userSelect","stopPropagation"],"mappings":";;;;;AAEA,kBAAkB;AAClB;AAHA;;;AAKe,SAASA,YAAY,EAAEC,GAAG,EAAEC,OAAO,EAAE;IAClD,IAAA,kNAAS,EAAC;QACR,MAAMC,QAAQ,CAACC;YAAQ,IAAIA,EAAEC,GAAG,KAAK,UAAUH;QAAW;QAC1DI,SAASC,gBAAgB,CAAC,WAAWJ;QACrC,OAAO,IAAMG,SAASE,mBAAmB,CAAC,WAAWL;IACvD,GAAG;QAACD;KAAQ;IAEZ,qBACE,8OAAC;QACCO,WAAU;QACVC,OAAO;YACLC,UAAU;YAASC,OAAO;YAAGC,YAAY;YAAoBC,QAAQ;YACrEC,SAAS;YAAQC,YAAY;YAAUC,gBAAgB;YACvDC,QAAQ;YAAWC,WAAW;QAChC;QACAC,SAASlB;kBAET,cAAA,8OAAC;YACCD,KAAKA;YACLoB,KAAI;YACJX,OAAO;gBACLY,UAAU;gBAAQC,WAAW;gBAAQC,WAAW;gBAChDC,cAAc;gBAAGC,WAAW;gBAC5BR,QAAQ;gBAAWS,YAAY;YACjC;YACAP,SAAS,CAAChB,IAAMA,EAAEwB,eAAe;;;;;;;;;;;AAIzC"}},
|
||||
{"offset": {"line": 2147, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/LoadingScreen.js"],"sourcesContent":["'use client';\n\n// 全屏加载页:初始化未完成时显示转圈,加载完成后淡出\n// 论坛名:容器由 React 渲染(SSR 即有),内联脚本在 DOMContentLoaded 时\n// 填充缓存名 → 首帧显示;suppressHydrationWarning 让 React 跳过该元素\n// 的文本检查(保留脚本填入的内容),hydrate 后由 AppProvider 状态接管。\nexport default function LoadingScreen({ forumName, forumNameLoaded }) {\n return (\n <div className=\"loading-screen\">\n <div className=\"loading-inner\">\n <div className=\"loading-spinner\" />\n <div className={'loading-title' + (forumNameLoaded ? ' loading-title-appear' : '')} id=\"loadingTitle\" suppressHydrationWarning>\n {forumNameLoaded && forumName}\n </div>\n <div className=\"loading-sub\">加载中...</div>\n </div>\n </div>\n );\n}\n"],"names":["LoadingScreen","forumName","forumNameLoaded","className","id","suppressHydrationWarning"],"mappings":";;;;;AAAA;;AAMe,SAASA,cAAc,EAAEC,SAAS,EAAEC,eAAe,EAAE;IAClE,qBACE,8OAAC;QAAIC,WAAU;kBACb,cAAA,8OAAC;YAAIA,WAAU;;8BACb,8OAAC;oBAAIA,WAAU;;;;;;8BACf,8OAAC;oBAAIA,WAAW,kBAAkB,CAACD,kBAAkB,0BAA0B,EAAE;oBAAGE,IAAG;oBAAeC,wBAAwB;8BAC3HH,mBAAmBD;;;;;;8BAEtB,8OAAC;oBAAIE,WAAU;8BAAc;;;;;;;;;;;;;;;;;AAIrC"}},
|
||||
{"offset": {"line": 2201, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/MessagesPage.js"],"sourcesContent":["'use client';\n\n// 消息页:通知列表(回复/删除/举报处理/系统)\nimport { useEffect, useState } from 'react';\nimport { API } from '@/lib/api';\nimport { useApp } from './AppProvider';\nimport { Icon } from './Icons';\n\nconst TYPE_MAP = { reply: 'message', post_deleted: 'trash', report_handled: 'shield', system: 'megaphone' };\n\nexport default function MessagesPage() {\n const { currentUser } = useApp();\n const [notifications, setNotifications] = useState(null);\n const [error, setError] = useState(null);\n\n useEffect(() => {\n if (!currentUser) return;\n API.getNotifications()\n .then((data) => {\n setNotifications(data || []);\n setError(null);\n API.markAllNotificationsRead().catch(() => {});\n })\n .catch((e) => { setError(e.message); setNotifications([]); });\n }, [currentUser]);\n\n if (!currentUser) {\n return <div className=\"page-slide active\" style={{ textAlign: 'center', color: '#94a3b8', padding: '40px 0' }}>请先登录</div>;\n }\n\n return (\n <div className=\"page-slide active\">\n <div className=\"page-header\" style={{ maxWidth: 700, margin: '0 auto', width: '100%' }}>\n <h2><Icon name=\"message\" size={20} /> 消息</h2>\n </div>\n <div style={{ maxWidth: 700, margin: '0 auto', width: '100%' }}>\n {error ? (\n <div style={{ textAlign: 'center', color: '#ef4444', padding: 20 }}>加载失败:{error}</div>\n ) : notifications === null ? (\n <div style={{ textAlign: 'center', color: '#94a3b8', padding: '40px 0' }}>加载中...</div>\n ) : notifications.length === 0 ? (\n <div style={{ textAlign: 'center', color: '#94a3b8', padding: '60px 0' }}>\n <Icon name=\"message\" size={48} />\n <p style={{ fontSize: 16 }}>暂无消息</p>\n <p style={{ fontSize: 13 }}>当有人回复你的帖子或处理你的举报时,会在这里通知你</p>\n </div>\n ) : (\n notifications.map((n) => {\n const icon = TYPE_MAP[n.type] || 'pin';\n const time = n.created_at ? new Date(n.created_at).toLocaleString('zh-CN') : '';\n return (\n <div key={n.id} style={{ display: 'flex', alignItems: 'flex-start', gap: 12, padding: '14px 16px', borderBottom: '1px solid var(--border-light)', background: 'var(--surface)', borderRadius: 6, marginBottom: 6 }}>\n <span style={{ color: 'var(--text-secondary)', paddingTop: 2 }}><Icon name={icon} size={20} /></span>\n <div style={{ flex: 1, minWidth: 0 }}>\n <div style={{ fontWeight: 600, fontSize: 14 }}>{n.title}</div>\n <div style={{ color: 'var(--text-secondary)', fontSize: 13, marginTop: 2 }}>{n.content}</div>\n {n.link && <a href={n.link} style={{ color: 'var(--primary)', fontSize: 13, textDecoration: 'none', marginTop: 4, display: 'inline-block' }}>查看详情 →</a>}\n <div style={{ fontSize: 12, color: 'var(--text-light)', marginTop: 4 }}>{time}</div>\n </div>\n </div>\n );\n })\n )}\n </div>\n </div>\n );\n}\n"],"names":["TYPE_MAP","reply","post_deleted","report_handled","system","MessagesPage","currentUser","notifications","setNotifications","error","setError","getNotifications","then","data","markAllNotificationsRead","catch","e","message","className","style","textAlign","color","padding","maxWidth","margin","width","name","size","length","fontSize","map","n","icon","type","time","created_at","Date","toLocaleString","display","alignItems","gap","borderBottom","background","borderRadius","marginBottom","paddingTop","flex","minWidth","fontWeight","title","marginTop","content","link","href","textDecoration","id"],"mappings":";;;;;AAEA,0BAA0B;AAC1B;AACA;AACA;AACA;AANA;;;;;;AAQA,MAAMA,WAAW;IAAEC,OAAO;IAAWC,cAAc;IAASC,gBAAgB;IAAUC,QAAQ;AAAY;AAE3F,SAASC;IACtB,MAAM,EAAEC,WAAW,EAAE,GAAG,IAAA,mIAAM;IAC9B,MAAM,CAACC,eAAeC,iBAAiB,GAAG,IAAA,iNAAQ,EAAC;IACnD,MAAM,CAACC,OAAOC,SAAS,GAAG,IAAA,iNAAQ,EAAC;IAEnC,IAAA,kNAAS,EAAC;QACR,IAAI,CAACJ,aAAa;QAClB,iHAAG,CAACK,gBAAgB,GACjBC,IAAI,CAAC,CAACC;YACLL,iBAAiBK,QAAQ,EAAE;YAC3BH,SAAS;YACT,iHAAG,CAACI,wBAAwB,GAAGC,KAAK,CAAC,KAAO;QAC9C,GACCA,KAAK,CAAC,CAACC;YAAQN,SAASM,EAAEC,OAAO;YAAGT,iBAAiB,EAAE;QAAG;IAC/D,GAAG;QAACF;KAAY;IAEhB,IAAI,CAACA,aAAa;QAChB,qBAAO,8OAAC;YAAIY,WAAU;YAAoBC,OAAO;gBAAEC,WAAW;gBAAUC,OAAO;gBAAWC,SAAS;YAAS;sBAAG;;;;;;IACjH;IAEA,qBACE,8OAAC;QAAIJ,WAAU;;0BACb,8OAAC;gBAAIA,WAAU;gBAAcC,OAAO;oBAAEI,UAAU;oBAAKC,QAAQ;oBAAUC,OAAO;gBAAO;0BACnF,cAAA,8OAAC;;sCAAG,8OAAC,2HAAI;4BAACC,MAAK;4BAAUC,MAAM;;;;;;wBAAM;;;;;;;;;;;;0BAEvC,8OAAC;gBAAIR,OAAO;oBAAEI,UAAU;oBAAKC,QAAQ;oBAAUC,OAAO;gBAAO;0BAC1DhB,sBACC,8OAAC;oBAAIU,OAAO;wBAAEC,WAAW;wBAAUC,OAAO;wBAAWC,SAAS;oBAAG;;wBALine truncated
|
||||
{"offset": {"line": 2476, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Modals.js"],"sourcesContent":["'use client';\n\n// 登录/注册/举报 模态框\nimport { useState, useEffect } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport { useApp } from './AppProvider';\nimport { Icon } from './Icons';\nimport CaptchaImage from './CaptchaImage';\nimport { useToast } from './Toast';\n\nexport default function Modals({ modal, onClose, reportPostId }) {\n const { login, register, currentUser, refresh } = useApp();\n const { t } = useTranslation();\n const { toast } = useToast();\n\n // 登录表单\n const [loginEmail, setLoginEmail] = useState('');\n const [loginPassword, setLoginPassword] = useState('');\n\n // 注册表单\n const [regUsername, setRegUsername] = useState('');\n const [regEmail, setRegEmail] = useState('');\n const [regPassword, setRegPassword] = useState('');\n const [regCaptcha, setRegCaptcha] = useState(null);\n const [regCaptchaInput, setRegCaptchaInput] = useState('');\n\n // 举报表单\n const [reportReason, setReportReason] = useState('spam');\n\n // 打开注册弹窗时从服务器获取验证码挑战(HMAC 签名)\n useEffect(() => {\n if (modal === 'register') {\n API.getCaptcha().then((c) => setRegCaptcha(c)).catch(() => {});\n }\n }, [modal]);\n\n if (!modal) return null;\n\n const close = (e) => {\n if (e && e.target !== e.currentTarget) return;\n onClose();\n };\n\n const handleLogin = async () => {\n if (!loginEmail.trim() || !loginPassword) { toast('请填写完整信息', 'warning'); return; }\n try {\n const result = await login(loginEmail.trim(), loginPassword);\n if (result.user) {\n onClose();\n setLoginEmail('');\n setLoginPassword('');\n refresh();\n }\n } catch (err) {\n toast('登录失败:' + err.message, 'error');\n }\n };\n\n const handleRegister = async () => {\n if (!regUsername.trim() || !regEmail.trim() || !regPassword) { toast('请填写完整信息', 'warning'); return; }\n if (regPassword.length < 6) { toast('密码至少6位', 'warning'); return; }\n if (!regCaptcha || !regCaptchaInput.trim()) {\n toast('请填写验证码', 'warning');\n return;\n }\n try {\n // 答案由服务端 HMAC 校验,前端不对比答案\n await register(regEmail.trim(), regPassword, regUsername.trim(), { id: regCaptcha.id, answer: regCaptchaInput.trim(), sig: regCaptcha.sig });\n onClose();\n setRegUsername('');\n setRegEmail('');\n setRegPassword('');\n setRegCaptchaInput('');\n toast('注册成功!', 'success');\n refresh();\n } catch (err) {\n toast('注册失败:' + err.message, 'error');\n // 失败后刷新验证码\n API.getCaptcha().then((c) => setRegCaptcha(c)).catch(() => {});\n setRegCaptchaInput('');\n }\n };\n\n const handleReport = async () => {\n if (!reportPostId) return;\n try {\n await API.createReport(reportPostId, reportReason);\n onClose();\n toast('举报已提交,管理员将尽快处理', 'success');\n } catch (err) {\n toast('举报失败:' + err.message, 'error');\n }\n };\n\n return (\n <>\n {modal === 'login' && (\n <div className=\"modal active\" onClick={close}>\n <div className=\"modal-content\">\n <span className=\"close\" onClick={onClose}><Icon name=\"close\" size={20} /></span>\n <h2 style={{ marginBottom: 16 }}>{t('auth.login')}</h2>\n <input type=\"email\" placeholder={t('auth.email')} value={loginEmail} onChange={(e) => setLoginEmail(e.target.value)} />\n <input type=\"password\" placeholder={t('auth.password')} value={loginPassword} onChange={(e) => setLoginPassword(e.target.value)}\n onKeyDown={(e) => { if (e.key === 'Enter') handleLogin(); }} />\n <button className=\"btn-primary\" style={{ width: '100%' }} onClick={handleLogin}>{t('auth.login')}</button>\n </div>\n </div>\n )}\n\n {modal === 'register' && (\n <div className=\"modal active\" onClick={close}>\n <div className=\"modal-content\">\n <span className=\"close\" onClick={onClose}><Icon name=\"close\" size={20} /></span>\n <h2 style={{ marginBottom: 16 }}>{t('auth.register')}</h2>\n <input type=\"text\" placeholder={t('auth.username')} value={regUsername} onChange={(e) => setRegUsername(e.target.value)} />\n <input type=\"email\" placeholder={t('auth.email')} value={regEmail} onChange={(e) => setRegEmail(e.target.value)} />\n <input type=\"password\" placeholder={t('auth.passwordHint')} value={regPassword} onChange={(e) => setRegPassword(e.target.value)} />\n <div className=\"captcha-row\" style={{ display: 'flex', alignItems: 'centeLine truncated
|
||||
{"offset": {"line": 2954, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Navbar.js"],"sourcesContent":["'use client';\n\n// 导航栏:论坛名、自定义页面链接、登录/注册、私信、用户菜单、主题切换\nimport { useState, useEffect } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useApp } from './AppProvider';\nimport { Icon } from './Icons';\nimport { API } from '@/lib/api';\nimport { DMButton } from './chat/ChatManager';\nimport { useToast } from './Toast';\n\nexport default function Navbar({ onOpenModal }) {\n const { currentUser, forumName, theme, toggleTheme, navigate, openCustomPage, logout } = useApp();\n const { t } = useTranslation();\n const { toast, confirmAction } = useToast();\n const [menuOpen, setMenuOpen] = useState(false);\n const [customPages, setCustomPages] = useState([]);\n\n useEffect(() => {\n API.getCustomPages().then(setCustomPages).catch(() => {});\n }, []);\n\n // 点击菜单外部关闭下拉(检查目标是否在菜单/头像内,避免 React 合成事件与原生监听冲突)\n useEffect(() => {\n const closeMenu = (e) => {\n const menu = document.getElementById('userDropdown');\n const avatarEl = document.getElementById('userDropdown')?.querySelector('.avatar');\n if (menu && menu.contains(e.target)) return;\n if (avatarEl && avatarEl.contains(e.target)) return;\n setMenuOpen(false);\n };\n document.addEventListener('click', closeMenu);\n return () => document.removeEventListener('click', closeMenu);\n }, []);\n\n const avatarSrc = currentUser?.avatar_url ||\n 'https://ui-avatars.com/api/?name=' + encodeURIComponent(currentUser?.username || 'U') +\n '&background=6366f1&color=fff';\n\n const goPage = (page) => {\n if (page === 'admin' && currentUser?.role !== 'admin') {\n toast('无权限访问', 'warning');\n return;\n }\n setMenuOpen(false);\n navigate(page);\n };\n\n const openMessages = (e) => {\n e.preventDefault();\n setMenuOpen(false);\n // 消息页展示通知列表,私信使用导航栏按钮。\n navigate('messages');\n };\n\n return (\n <nav id=\"navbar\">\n <div className=\"nav-left\">\n <span className=\"forum-name\" onClick={() => navigate('feed')} style={{ cursor: 'pointer' }}>\n {forumName}\n </span>\n <span id=\"customNavLinks\" style={{ display: 'inline-flex', alignItems: 'center', gap: 6, marginLeft: 16 }}>\n {customPages.map((p) => (\n <a\n key={p.id}\n href=\"#\"\n className=\"custom-page-nav-link\"\n data-custom={p.name}\n onClick={(e) => { e.preventDefault(); openCustomPage(p.name); }}\n style={{ color: 'var(--text-secondary)', textDecoration: 'none', fontSize: 14, padding: '4px 10px', borderRadius: 4, transition: 'color 0.15s' }}\n onMouseEnter={(e) => { e.currentTarget.style.color = 'var(--text)'; }}\n onMouseLeave={(e) => { e.currentTarget.style.color = 'var(--text-secondary)'; }}\n >\n {p.title}\n </a>\n ))}\n </span>\n </div>\n <div className=\"nav-right\">\n <DMButton />\n <div id=\"userMenu\">\n {!currentUser ? (\n <div id=\"authButtons\">\n <button className=\"btn-ghost\" onClick={() => onOpenModal('login')}>{t('nav.login')}</button>\n <button className=\"btn-primary\" onClick={() => onOpenModal('register')}>{t('nav.register')}</button>\n </div>\n ) : (\n <div id=\"userDropdown\" style={{ display: 'block' }}>\n <img\n className=\"avatar\"\n src={avatarSrc}\n alt=\"avatar\"\n onClick={(e) => { e.stopPropagation(); setMenuOpen(!menuOpen); }}\n />\n {menuOpen && (\n <div className=\"dropdown-menu show\" onClick={(e) => e.stopPropagation()}>\n <a href=\"#\" onClick={openMessages}>\n <Icon name=\"message\" /> {t('nav.messages')}\n </a>\n <a href=\"#\" onClick={(e) => { e.preventDefault(); goPage('settings'); }}>\n <Icon name=\"settings\" /> {t('nav.settings')}\n </a>\n {currentUser.role === 'admin' && (\n <a href=\"#\" onClick={(e) => { e.preventDefault(); goPage('admin'); }}>\n <Icon name=\"shieldAlert\" /> {t('nav.admin')}\n </a>\n )}\n <hr />\n <a\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n toggleTheme();\n setMenuOpen(false);\n }}\n >\n Line truncated
|
||||
{"offset": {"line": 3292, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/NewPost.js"],"sourcesContent":["'use client';\n\n// 发帖页\nimport { useState, useEffect, useRef } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API, uploadImage } from '@/lib/api';\nimport { useApp } from './AppProvider';\nimport { Icon } from './Icons';\nimport { useToast } from './Toast';\nimport CaptchaImage from './CaptchaImage';\n\nexport default function NewPost() {\n const { currentUser, navigate, refresh } = useApp();\n const { t } = useTranslation();\n const { toast } = useToast();\n const [title, setTitle] = useState('');\n const [content, setContent] = useState('');\n const [images, setImages] = useState([]); // 上传后的 URL 列表\n const [previews, setPreviews] = useState([]); // 本地预览 dataURL\n const [captcha, setCaptcha] = useState(null);\n const [captchaInput, setCaptchaInput] = useState('');\n const [uploading, setUploading] = useState(false);\n\n useEffect(() => { API.getCaptcha().then((c) => setCaptcha(c)).catch(() => {}); }, []);\n\n const handleFiles = async (files) => {\n setUploading(true);\n try {\n const newPreviews = [];\n for (const file of files) {\n if (!file.type.startsWith('image/')) continue;\n if (file.size > 5 * 1024 * 1024) {\n toast('图片 ' + file.name + ' 超过 5MB,请压缩后上传', 'warning');\n continue;\n }\n const dataUrl = await new Promise((resolve) => {\n const reader = new FileReader();\n reader.onload = (e) => resolve(e.target.result);\n reader.readAsDataURL(file);\n });\n newPreviews.push(dataUrl);\n const url = await uploadImage(file);\n setImages((prev) => [...prev, url]);\n }\n setPreviews((prev) => [...prev, ...newPreviews]);\n } catch (err) {\n toast('上传失败:' + err.message, 'error');\n } finally {\n setUploading(false);\n }\n };\n\n // 拖拽上传\n const [dragOver, setDragOver] = useState(false);\n const fileInputRef = useRef(null);\n const dropZoneStyle = {\n border: '2px dashed ' + (dragOver ? 'var(--primary)' : 'var(--border)'),\n borderRadius: 8, padding: 24, textAlign: 'center', cursor: 'pointer',\n transition: 'all 0.3s', margin: '8px 0 12px',\n background: dragOver ? 'var(--primary-bg)' : 'var(--bg)',\n };\n\n const handleSubmit = async () => {\n if (!currentUser || !currentUser.id) {\n toast('请先登录', 'error');\n navigate('feed');\n return;\n }\n if (!content.trim()) { toast('请填写内容', 'error'); return; }\n if (!captcha || !captchaInput.trim()) { toast('请填写验证码', 'error'); return; }\n try {\n // 答案由服务端 HMAC 校验\n await API.createPost(title.trim() || '无标题', content.trim(), images, { id: captcha.id, answer: captchaInput.trim(), sig: captcha.sig });\n toast('发布成功', 'success');\n navigate('feed');\n refresh();\n } catch (err) {\n toast('发布失败:' + err.message, 'error');\n }\n };\n\n return (\n <div className=\"page-slide active\">\n <div className=\"page-header\" style={{ maxWidth: 600, margin: '0 auto', width: '100%' }}>\n <h2><Icon name=\"plus\" size={20} /> {t('newPost.title')}</h2>\n </div>\n <div style={{ maxWidth: 600, margin: '0 auto', width: '100%' }}>\n <input\n type=\"text\"\n placeholder={t('newPost.title')}\n style={{ width: '100%', padding: '10px 14px', border: '1.5px solid var(--border)', borderRadius: 6, fontSize: 15, fontWeight: 600, marginBottom: 12, fontFamily: 'inherit', background: 'var(--bg)', color: 'var(--text)' }}\n value={title}\n onChange={(e) => setTitle(e.target.value)}\n />\n <textarea\n rows={6}\n placeholder={t('newPost.content')}\n style={{ width: '100%', padding: 12, border: '1.5px solid var(--border)', borderRadius: 6, fontSize: 15, fontFamily: 'inherit', resize: 'vertical', background: 'var(--bg)', color: 'var(--text)' }}\n value={content}\n onChange={(e) => setContent(e.target.value)}\n />\n <div id=\"imagePreview\" style={{ display: 'flex', flexWrap: 'wrap', gap: 8, margin: '8px 0' }}>\n {previews.map((src, i) => (\n <img key={i} src={src} alt=\"\" style={{ width: 80, height: 80, objectFit: 'cover', borderRadius: 4, border: '1px solid var(--border)' }} />\n ))}\n </div>\n <div\n id=\"dropZone\"\n style={dropZoneStyle}\n onClick={() => fileInputRef.current?.click()}\n onDragOver={(e) => { e.preventDefault(); setDragOver(true); }}\n onDragLeave={(e) => { e.preventDefault(); setDragOver(false); }}\n onDrop={(e) => { e.preventDefault(); setDragOver(false); if (e.dataTransfer.files) handleFilesLine truncated
|
||||
{"offset": {"line": 3662, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/PostDetail.js"],"sourcesContent":["'use client';\n\n// 帖子详情页\nimport { useEffect, useState, useCallback, useMemo, useRef } from 'react';\nimport { API, uploadImage } from '@/lib/api';\nimport { useApp } from './AppProvider';\nimport ReplyList from './ReplyList';\nimport Sidebar from './Sidebar';\nimport { Icon } from './Icons';\nimport ImageViewer from './ImageViewer';\nimport { renderMarkdown } from '@/lib/markdown';\nimport { useToast } from './Toast';\n\nfunction avatar(username) {\n return 'https://ui-avatars.com/api/?name=' + encodeURIComponent(username || '匿名用户') +\n '&background=6366f1&color=fff&size=64';\n}\n\nexport default function PostDetail({ postId, initialPost = null }) {\n const { currentUser, navigate, openUser, refreshKey } = useApp();\n const { toast, confirmAction } = useToast();\n const [post, setPost] = useState(initialPost);\n const [error, setError] = useState(null);\n const [viewerSrc, setViewerSrc] = useState(null);\n const [editing, setEditing] = useState(false);\n const [editTitle, setEditTitle] = useState('');\n const [editContent, setEditContent] = useState('');\n const [editImages, setEditImages] = useState([]);\n const [editUploading, setEditUploading] = useState(false);\n const editImageInputRef = useRef(null);\n // 评论抽屉:帖子加载完成后自动展开(动画完整播放)\n const [repliesOpen, setRepliesOpen] = useState(false);\n useEffect(() => {\n if (post && !repliesOpen) {\n // 延迟到帖子内容渲染后,让抽屉动画平滑播放\n const t = setTimeout(() => setRepliesOpen(true), 60);\n return () => clearTimeout(t);\n }\n }, [post]);\n\n const load = useCallback(async () => {\n setError(null);\n try {\n const data = await API.getPost(postId);\n setPost(data);\n } catch (err) {\n setError(err.message);\n }\n }, [postId, refreshKey]);\n\n const initialRefreshKey = useRef(refreshKey);\n useEffect(() => {\n if (initialPost?.id === postId && refreshKey === initialRefreshKey.current) return;\n load();\n }, [initialPost?.id, load, postId, refreshKey]);\n const renderedContent = useMemo(() => renderMarkdown(post?.content), [post?.content]);\n const renderedSignature = useMemo(() => renderMarkdown(post?.signature), [post?.signature]);\n\n if (error) {\n return (\n <div id=\"pagePost\" className=\"page-slide active\" style={{ padding: '40px 0', textAlign: 'center', color: '#ef4444' }}>\n 加载失败:{error}\n </div>\n );\n }\n if (!post) {\n return <div id=\"pagePost\" className=\"page-slide active\" style={{ textAlign: 'center', color: '#94a3b8' }}><span className=\"spinner-sm\" />加载中...</div>;\n }\n\n const time = post.created_at ? new Date(post.created_at).toLocaleString('zh-CN') : '';\n // 作者本人 或 管理员 可删除/编辑\n const canDelete = currentUser && (currentUser.id === post.user_id || currentUser.role === 'admin');\n const canEdit = currentUser && currentUser.id === post.user_id;\n\n const handleDelete = async () => {\n if (!await confirmAction('确定要删除这条帖子吗?')) return;\n try {\n await API.deletePost(postId);\n toast('删除成功', 'success');\n navigate('feed');\n } catch (err) {\n toast('删除失败:' + err.message, 'error');\n }\n };\n\n const handleTogglePin = async () => {\n if (!await confirmAction('确定要' + (post.is_pinned ? '取消' : '') + '置顶吗?', { danger: false })) return;\n try {\n await API.togglePinPost(postId);\n load();\n } catch (err) {\n toast('操作失败:' + err.message, 'error');\n }\n };\n\n const handleEdit = () => {\n setEditTitle(post.title || '');\n setEditContent(post.content || '');\n setEditImages(post.images || []);\n setEditing(true);\n };\n\n const handleSaveEdit = async () => {\n if (!editContent.trim()) { toast('请填写内容', 'warning'); return; }\n try {\n await API.updatePost(postId, editTitle.trim() || '无标题', editContent.trim(), editImages);\n setEditing(false);\n load();\n } catch (err) {\n toast('编辑失败:' + err.message, 'error');\n }\n };\n\n // 编辑时上传新图片\n const handleEditUpload = async (file) => {\n if (!file) return;\n if (!file.type.startsWith('image/')) { toast('请选择图片文件', 'warning'); return; }\n if (file.size > 5 * 1024 * 1024) { toast('图片不能超过 5MB', 'warning'); return; }\n setEditUploading(true);\n try {\n const url = await uploadImage(file);\n setEditImages((prev) => [...prev, url]);\n } catch (err) {\n toast('上传失败:' + err.message, 'error');\n } finally {\n setEditUploading(false);\n }\n };\n\n // 编辑时删除图片\n const handleEditRemoveImage = (url) => {\n sLine truncated
|
||||
{"offset": {"line": 4460, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/RecoveryCodes.js"],"sourcesContent":["'use client';\n\n// 恢复码管理:查看 + 重新生成\nimport { useState, useEffect } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport { Icon } from './Icons';\nimport { useToast } from './Toast';\n\nexport default function RecoveryCodes() {\n const { t } = useTranslation();\n const { toast, confirmAction } = useToast();\n const [count, setCount] = useState(0);\n const [modal, setModal] = useState(null); // null | {codes, isNew}\n const [modalClosing, setModalClosing] = useState(false);\n\n const closeModal = () => {\n setModalClosing(true);\n setTimeout(() => {\n setModal(null);\n setModalClosing(false);\n }, 340);\n };\n\n const loadCount = () => {\n API.getRecoveryCodeCount().then((d) => setCount(d.count || 0)).catch(() => {});\n };\n useEffect(loadCount, []);\n\n const regenerate = async () => {\n if (!await confirmAction(t('recovery.confirmRegenerate'))) return;\n try {\n const d = await API.generateRecoveryCodes();\n setModal({ codes: d.codes || [], isNew: true });\n loadCount();\n } catch (err) {\n toast(t('recovery.genFailed', { msg: err.message }), 'error');\n }\n };\n\n const view = async () => {\n try {\n // 生成后直接展示;若已有恢复码则重新生成展示(与原版一致:查看即生成新码)\n const d = await API.generateRecoveryCodes();\n setModal({ codes: d.codes || [], isNew: false });\n loadCount();\n } catch (err) {\n toast(t('recovery.fetchFailed', { msg: err.message }), 'error');\n }\n };\n\n return (\n <div style={{ marginTop: 16, background: 'var(--surface)', border: '1px solid var(--border)', borderRadius: 8, padding: 20 }}>\n <h3 style={{ fontSize: 16, marginBottom: 8 }}><Icon name=\"key\" size={16} /> {t('recovery.title')}</h3>\n <p style={{ fontSize: 13, color: 'var(--text-secondary)', marginBottom: 12 }}>{t('recovery.desc')}</p>\n <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap' }}>\n <button className=\"btn-secondary\" style={{ padding: '8px 16px', border: '1px solid var(--border)', borderRadius: 4, background: 'var(--surface)', cursor: 'pointer', color: 'var(--text)' }} onClick={view}><Icon name=\"list\" size={14} /> {t('recovery.view')}</button>\n <button className=\"btn-secondary\" style={{ padding: '8px 16px', border: '1px solid var(--border)', borderRadius: 4, background: 'var(--surface)', cursor: 'pointer', color: 'var(--text)' }} onClick={regenerate}><Icon name=\"refresh\" size={14} /> {t('recovery.regenerate')}</button>\n </div>\n <div id=\"recoveryCodesStatus\" style={{ fontSize: 13, color: 'var(--text-light)', marginTop: 8 }}>{t('recovery.remaining', { count })}</div>\n\n {modal && (\n <div className={'modal active' + (modalClosing ? ' closing' : '')} style={{ display: 'flex' }} onClick={(e) => { if (e.target === e.currentTarget) closeModal(); }}>\n <div className=\"modal-content\" style={{ maxWidth: 480, position: 'relative' }}>\n <span className=\"close\" style={{ position: 'absolute', top: 12, right: 16, cursor: 'pointer', color: 'var(--text-light)' }} onClick={closeModal}><Icon name=\"close\" size={20} /></span>\n <h2 style={{ marginBottom: 12 }}>{modal.isNew ? t('recovery.newCodes') : t('recovery.title')}</h2>\n <p style={{ fontSize: 13, color: '#ef4444', marginBottom: 12, display: 'flex', alignItems: 'flex-start', gap: 6 }}><Icon name=\"warning\" size={14} /> {t('recovery.saveWarning')}</p>\n <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }}>\n {modal.codes.map((c, i) => (\n <code key={i} style={{ background: 'var(--bg)', padding: '8px 12px', borderRadius: 6, fontSize: 13, textAlign: 'center', userSelect: 'all' }}>{c}</code>\n ))}\n </div>\n <button className=\"btn-primary\" style={{ width: '100%', padding: 10, marginTop: 16 }} onClick={closeModal}>{t('recovery.saved')}</button>\n </div>\n </div>\n )}\n </div>\n );\n}\n"],"names":["RecoveryCodes","t","toast","confirmAction","count","setCount","modal","setModal","modalClosing","setModalClosing","closeModal","setTimeout","loadCount","getRecoveryCodeCount","then","d","catch","regenerate","generateRecoveryCodes","codes","isNew","err","msg","message","view","style","marginTop","background","border","borderRadius","padding","fontSize","marginBottom","name","size","color","display","gap","flexWrap","className","cursor","onClick","id","e","target","currentTarget","maxWidth","position","top","right","alignItems","gridTemplateColumns","map","c","i","textAlign","userSelect","width"],"mappings":";;;;;AAEA,kBAAkB;AAClB;AACA;AAAA;AACA;AACA;AACA;AAPA;;;;;;;AASe,SALine truncated
|
||||
{"offset": {"line": 4789, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/ReplyList.js"],"sourcesContent":["'use client';\n\n// 回复列表 + 发表回复表单\nimport { useEffect, useState, useCallback, useRef } from 'react';\nimport { API } from '@/lib/api';\nimport { useApp } from './AppProvider';\nimport { Icon } from './Icons';\nimport { renderMarkdown } from '@/lib/markdown';\nimport CaptchaImage from './CaptchaImage';\nimport { useToast } from './Toast';\n\nfunction avatar(username) {\n return 'https://ui-avatars.com/api/?name=' + encodeURIComponent(username || '匿名用户') +\n '&background=6366f1&color=fff&size=64';\n}\n\nexport default function ReplyList({ postId, onRefresh }) {\n const { currentUser, openUser } = useApp();\n const { toast, confirmAction } = useToast();\n const [replies, setReplies] = useState([]);\n const [content, setContent] = useState('');\n const [captcha, setCaptcha] = useState(null);\n const [captchaInput, setCaptchaInput] = useState('');\n // 正在回复的用户(hover 回复按钮 → 回填到回复框)\n const [replyTo, setReplyTo] = useState(null);\n const replyAreaRef = useRef(null);\n const replyInputRef = useRef(null);\n\n // 点击\"回复\":记录目标回复 ID,滚动到回复框并聚焦\n const startReply = (replyId) => {\n setReplyTo(replyId);\n setTimeout(() => {\n replyAreaRef.current?.scrollIntoView({ behavior: 'smooth', block: 'center' });\n replyInputRef.current?.focus();\n }, 120);\n };\n\n const load = useCallback(async () => {\n try {\n const data = await API.getReplies(postId);\n setReplies(data || []);\n } catch { setReplies([]); }\n }, [postId]);\n\n useEffect(() => { load(); }, [load]);\n useEffect(() => { API.getCaptcha().then((c) => setCaptcha(c)).catch(() => {}); }, [postId]);\n\n const handleSubmit = async () => {\n if (!currentUser) { toast('请先登录', 'warning'); return; }\n if (!content.trim()) { toast('请填写回复内容', 'warning'); return; }\n if (!captcha || !captchaInput.trim()) { toast('请填写验证码', 'warning'); return; }\n try {\n // 答案由服务端 HMAC 校验\n await API.createReply(postId, content.trim(), { id: captcha.id, answer: captchaInput.trim(), sig: captcha.sig }, replyTo);\n setContent('');\n setCaptchaInput('');\n setReplyTo(null);\n API.getCaptcha().then((c) => setCaptcha(c)).catch(() => {});\n load();\n onRefresh();\n } catch (err) {\n toast('回复失败:' + err.message, 'error');\n API.getCaptcha().then((c) => setCaptcha(c)).catch(() => {});\n setCaptchaInput('');\n }\n };\n\n const handleDelete = async (replyId) => {\n if (!await confirmAction('确定要删除这条回复吗?')) return;\n try {\n await API.deleteReply(replyId);\n load();\n } catch (err) {\n toast('删除失败:' + err.message, 'error');\n }\n };\n\n // 计算每条回复的嵌套深度(按 reply_to_id 精确追踪回复链)\n const replyDepths = (() => {\n const map = {};\n const getDepth = (r) => {\n if (map[r.id] !== undefined) return map[r.id];\n if (!r.reply_to_id) { map[r.id] = 0; return 0; }\n const parent = replies.find((x) => x.id === r.reply_to_id);\n const d = parent ? getDepth(parent) + 1 : 0;\n map[r.id] = d;\n return d;\n };\n replies.forEach((r) => getDepth(r));\n return map;\n })();\n\n // 正在回复的目标回复对象(用于显示 @用户名)\n const replyToObj = replyTo ? replies.find((x) => x.id === replyTo) : null;\n\n return (\n <>\n <div className=\"post-reply-count\" style={{ marginTop: 20, fontSize: 14, color: '#64748b' }}>\n <Icon name=\"message\" size={14} /> {replies.length} 条回复\n </div>\n <div style={{ marginTop: 12 }}>\n {replies.length === 0 ? (\n <div style={{ color: '#94a3b8', padding: '20px 0', textAlign: 'center' }}><Icon name=\"message\" size={16} /> 还没有回复,快来发表第一条回复吧</div>\n ) : (\n replies.map((r) => {\n const rTime = r.created_at ? new Date(r.created_at).toLocaleString('zh-CN') : '';\n const nestDepth = Math.min(replyDepths[r.id] || 0, 5);\n return (\n <div key={r.id} className=\"reply-item\" data-username={r.username} data-reply-id={r.id} style={{ marginLeft: nestDepth ? nestDepth * 18 : 0 }}>\n <div className=\"reply-header\">\n <img src={r.avatar_url || avatar(r.username)} className=\"reply-avatar\" alt=\"\" />\n <span\n className=\"reply-username\"\n style={{ cursor: 'pointer', color: 'var(--primary)' }}\n onClick={() => openUser(r.username)}\n >\n {r.username || '匿名用户'}\n </span>\n <spaLine truncated
|
||||
{"offset": {"line": 5257, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/SettingsPage.js"],"sourcesContent":["'use client';\n\n// 个人设置页:侧边栏布局 + 上下滑动平滑切换\n// - 三个面板纵向排列在滚动容器里,scroll-snap 每次滑动对齐一个面板\n// - 点侧边栏导航 → 平滑滚动到对应面板;滚动结束 → 自动更新导航高亮\nimport { useState, useRef, useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Icon } from './Icons';\nimport SettingsProfile from './SettingsProfile';\nimport AccountSecurity from './AccountSecurity';\nimport RecoveryCodes from './RecoveryCodes';\n\nconst NAV = [\n { key: 'profile', labelKey: 'settings.profile', icon: 'user' },\n { key: 'security', labelKey: 'settings.security', icon: 'shieldAlert' },\n { key: 'recovery', labelKey: 'settings.recovery', icon: 'lock' },\n];\n\nexport default function SettingsPage() {\n const { t } = useTranslation();\n const [tab, setTab] = useState('profile');\n const scrollRef = useRef(null);\n const scrollTicking = useRef(false);\n\n // 滚动结束(或对齐后)更新高亮\n const handleScroll = useCallback(() => {\n const el = scrollRef.current;\n if (!el || scrollTicking.current) return;\n scrollTicking.current = true;\n requestAnimationFrame(() => {\n scrollTicking.current = false;\n const idx = Math.round(el.scrollTop / el.clientHeight);\n const key = NAV[Math.min(Math.max(idx, 0), NAV.length - 1)]?.key;\n if (key) setTab(key);\n });\n }, []);\n\n // 点击导航 → 平滑滚动到对应面板\n const goTo = (key, e) => {\n if (e) e.preventDefault();\n setTab(key);\n const el = scrollRef.current;\n if (!el) return;\n const idx = NAV.findIndex((n) => n.key === key);\n el.scrollTo({ top: idx * el.clientHeight, behavior: 'smooth' });\n };\n\n return (\n <div className=\"page-slide active\" style={{ overflow: 'hidden', height: '100vh', display: 'flex', flexDirection: 'column' }}>\n <div className=\"page-header\" style={{ width: '100%', flexShrink: 0 }}>\n <h2><Icon name=\"settings\" size={20} /> {t('settings.title')}</h2>\n </div>\n <div className=\"settings-layout\" style={{ width: '100%', display: 'flex', gap: 28, alignItems: 'flex-start', flex: 1, minHeight: 0 }}>\n <aside className=\"settings-sidebar\" style={{ width: 200, flexShrink: 0 }}>\n <nav className=\"settings-nav\">\n {NAV.map((n) => (\n <a\n key={n.key}\n href=\"#\"\n className={'settings-nav-item' + (tab === n.key ? ' active' : '')}\n data-settings-tab={n.key}\n onClick={(e) => goTo(n.key, e)}\n >\n <span className=\"nav-icon\"><Icon name={n.icon} size={18} /></span>\n {t(n.labelKey)}\n </a>\n ))}\n </nav>\n </aside>\n <main className=\"settings-content\" id=\"settingsContent\" style={{ overflow: 'hidden', padding: 0, alignSelf: 'stretch', display: 'flex', flexDirection: 'column', minHeight: 0 }}>\n <div\n ref={scrollRef}\n onScroll={handleScroll}\n style={{\n flex: 1,\n minHeight: 0,\n overflowY: 'auto',\n scrollSnapType: 'y mandatory',\n scrollBehavior: 'smooth',\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n >\n <div style={{ scrollSnapAlign: 'start', minHeight: '100%', padding: '20px 24px' }} data-panel=\"profile\">\n <SettingsProfile />\n </div>\n <div style={{ scrollSnapAlign: 'start', minHeight: '100%', padding: '20px 24px', borderTop: '1px solid var(--glass-border)' }} data-panel=\"security\">\n <AccountSecurity />\n </div>\n <div style={{ scrollSnapAlign: 'start', minHeight: '100%', padding: '20px 24px', borderTop: '1px solid var(--glass-border)' }} data-panel=\"recovery\">\n <RecoveryCodes />\n </div>\n </div>\n </main>\n </div>\n </div>\n );\n}\n"],"names":["NAV","key","labelKey","icon","SettingsPage","t","tab","setTab","scrollRef","scrollTicking","handleScroll","el","current","requestAnimationFrame","idx","Math","round","scrollTop","clientHeight","min","max","length","goTo","e","preventDefault","findIndex","n","scrollTo","top","behavior","className","style","overflow","height","display","flexDirection","width","flexShrink","name","size","gap","alignItems","flex","minHeight","map","href","onClick","id","padding","alignSelf","ref","onScroll","overflowY","scrollSnapType","scrollBehavior","scrollbarWidth","msOverflowStyle","scrollSnapAlign","borderTop"],"mappings":";;;;;AAEA,yBAAyB;AACzB,0CAA0C;AAC1C,uCAAuC;AACvC;AACA;AAAA;AACA;AACA;AACA;AACA;AALine truncated
|
||||
{"offset": {"line": 5526, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/SettingsProfile.js"],"sourcesContent":["'use client';\n\n// 设置 - 个人资料(头像 + 用户名/简介/签名 + 语言)\nimport { useState, useRef } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API, uploadImage } from '@/lib/api';\nimport { useApp } from './AppProvider';\nimport { setAppLanguage } from '@/lib/i18n';\nimport { Icon } from './Icons';\nimport { useToast } from './Toast';\n\nexport default function SettingsProfile() {\n const { currentUser, setCurrentUser } = useApp();\n const { t, i18n } = useTranslation();\n const { toast } = useToast();\n const [username, setUsername] = useState(currentUser?.username || '');\n const [bio, setBio] = useState(currentUser?.bio || '');\n const [signature, setSignature] = useState(currentUser?.signature || '');\n const [avatarUrl, setAvatarUrl] = useState(currentUser?.avatar_url || '');\n const [avatarStatus, setAvatarStatus] = useState(null);\n const avatarInputRef = useRef(null);\n\n const handleAvatar = async (file) => {\n if (!file) return;\n if (!file.type.startsWith('image/')) { setAvatarStatus({ ok: false, msg: t('settings.avatarFileRequired') }); return; }\n if (file.size > 5 * 1024 * 1024) { setAvatarStatus({ ok: false, msg: t('settings.avatarTooLarge') }); return; }\n try {\n const url = await uploadImage(file);\n await API.updateAvatar(currentUser.id, url);\n setAvatarUrl(url);\n setCurrentUser({ ...currentUser, avatar_url: url });\n setAvatarStatus({ ok: true, msg: t('settings.avatarUpdated') });\n } catch (err) {\n setAvatarStatus({ ok: false, msg: err.message });\n }\n };\n\n const handleSave = async () => {\n if (!currentUser) { toast(t('settings.pleaseLogin'), 'warning'); return; }\n if (!username.trim()) { toast(t('settings.usernameRequired'), 'warning'); return; }\n try {\n const data = await API.updateProfile(currentUser.id, username.trim(), bio.trim(), signature.trim());\n if (data.error) throw new Error(data.error);\n setCurrentUser({ ...currentUser, username: username.trim(), bio: bio.trim(), signature: signature.trim() });\n toast(t('settings.saved'), 'success');\n } catch (err) {\n toast(t('settings.saveFailed', { msg: err.message }), 'error');\n }\n };\n\n const avatarSrc = avatarUrl ||\n 'https://ui-avatars.com/api/?name=' + encodeURIComponent(currentUser?.username || 'U') + '&background=6366f1&color=fff&size=128';\n\n return (\n <div>\n {/* 头像 */}\n <div style={{ textAlign: 'center', marginBottom: 24 }}>\n <div style={{ position: 'relative', display: 'inline-block' }}>\n <img src={avatarSrc} style={{ width: 100, height: 100, borderRadius: '50%', objectFit: 'cover', border: '3px solid var(--primary)' }} alt=\"\" />\n <button\n style={{ position: 'absolute', bottom: 0, right: 0, background: 'var(--primary)', color: '#fff', border: 'none', borderRadius: '50%', width: 32, height: 32, cursor: 'pointer', fontSize: 16, display: 'flex', alignItems: 'center', justifyContent: 'center', boxShadow: '0 2px 8px rgba(99,102,241,0.4)' }}\n onClick={() => avatarInputRef.current?.click()}\n aria-label={t('settings.changeAvatar')}\n title={t('settings.changeAvatar')}\n >\n <Icon name=\"camera\" size={16} />\n </button>\n </div>\n <input type=\"file\" ref={avatarInputRef} accept=\"image/*\" style={{ display: 'none' }} onChange={(e) => { if (e.target.files?.[0]) handleAvatar(e.target.files[0]); }} />\n <h2 style={{ margin: '12px 0 4px' }}>{currentUser?.username}</h2>\n <p style={{ color: 'var(--text-secondary)', fontSize: 14 }}>{bio || t('user.bioEmpty')}</p>\n {avatarStatus && (\n <div style={{ fontSize: 13, marginTop: 8, color: avatarStatus.ok ? '#22c55e' : '#ef4444', display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 5 }}><Icon name={avatarStatus.ok ? 'success' : 'error'} size={14} /> {avatarStatus.msg}</div>\n )}\n </div>\n\n {/* 基本资料 */}\n <div style={{ background: 'var(--surface)', border: '1px solid var(--border)', borderRadius: 8, padding: 20 }}>\n <div style={{ marginBottom: 16 }}>\n <label style={{ fontWeight: 600, fontSize: 14, display: 'block', marginBottom: 4 }}>{t('settings.username')}</label>\n <input type=\"text\" value={username} style={{ width: '100%', padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, fontSize: 14, background: 'var(--bg)', color: 'var(--text)' }} onChange={(e) => setUsername(e.target.value)} />\n </div>\n <div style={{ marginBottom: 16 }}>\n <label style={{ fontWeight: 600, fontSize: 14, display: 'block', marginBottom: 4 }}>{t('settings.bio')}</label>\n <textarea rows={3} valuLine truncated
|
||||
{"offset": {"line": 6004, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Sidebar.js"],"sourcesContent":["'use client';\n\n// 侧边栏:社区统计 + 友情链接\nimport { useEffect, useState } from 'react';\nimport { API } from '@/lib/api';\nimport { Icon } from './Icons';\n\nconst emptyStats = { posts: 0, users: 0, topics: 0, online: 0 };\nlet cachedStats = null;\nlet cachedLinks = null;\n\nexport default function Sidebar({ id = 'sidebar' }) {\n const [stats, setStats] = useState(() => cachedStats || emptyStats);\n const [links, setLinks] = useState(() => cachedLinks || []);\n\n useEffect(() => {\n if (!cachedStats) {\n API.getStats().then((nextStats) => {\n cachedStats = nextStats;\n setStats(nextStats);\n }).catch(() => {});\n }\n if (!cachedLinks) {\n API.getLinks().then((nextLinks) => {\n cachedLinks = nextLinks;\n setLinks(nextLinks);\n }).catch(() => {});\n }\n }, []);\n\n return (\n <aside id={id} className=\"sidebar\">\n <div className=\"stats-box\">\n <h4>\n <Icon name=\"book\" size={14} /> 社区统计\n </h4>\n <div className=\"stat-item\"><span>主题</span><span>{stats.topics || 0}</span></div>\n <div className=\"stat-item\"><span>帖子</span><span>{stats.posts || 0}</span></div>\n <div className=\"stat-item\"><span>用户</span><span>{stats.users || 0}</span></div>\n <div className=\"stat-item\"><span>在线</span><span>{stats.online || 0}</span></div>\n </div>\n <div className=\"links-box\">\n <h4>\n <Icon name=\"link\" size={14} /> 友情链接\n </h4>\n <ul id={id === 'sidebar' ? 'friendlyLinks' : undefined} className=\"friendly-links\">\n {links.length === 0 ? (\n <li style={{ color: '#94a3b8', fontSize: 13 }}>暂无链接</li>\n ) : (\n links.map((l) => (\n <li key={l.id}><a href={l.url} target=\"_blank\" rel=\"noreferrer\">{l.title}</a></li>\n ))\n )}\n </ul>\n </div>\n </aside>\n );\n}\n"],"names":["emptyStats","posts","users","topics","online","cachedStats","cachedLinks","Sidebar","id","stats","setStats","links","setLinks","getStats","then","nextStats","catch","getLinks","nextLinks","className","name","size","undefined","length","style","color","fontSize","map","l","href","url","target","rel","title"],"mappings":";;;;;AAEA,kBAAkB;AAClB;AACA;AACA;AALA;;;;;AAOA,MAAMA,aAAa;IAAEC,OAAO;IAAGC,OAAO;IAAGC,QAAQ;IAAGC,QAAQ;AAAE;AAC9D,IAAIC,cAAc;AAClB,IAAIC,cAAc;AAEH,SAASC,QAAQ,EAAEC,KAAK,SAAS,EAAE;IAChD,MAAM,CAACC,OAAOC,SAAS,GAAG,IAAA,iNAAQ,EAAC,IAAML,eAAeL;IACxD,MAAM,CAACW,OAAOC,SAAS,GAAG,IAAA,iNAAQ,EAAC,IAAMN,eAAe,EAAE;IAE1D,IAAA,kNAAS,EAAC;QACR,IAAI,CAACD,aAAa;YAChB,iHAAG,CAACQ,QAAQ,GAAGC,IAAI,CAAC,CAACC;gBACnBV,cAAcU;gBACdL,SAASK;YACX,GAAGC,KAAK,CAAC,KAAO;QAClB;QACA,IAAI,CAACV,aAAa;YAChB,iHAAG,CAACW,QAAQ,GAAGH,IAAI,CAAC,CAACI;gBACnBZ,cAAcY;gBACdN,SAASM;YACX,GAAGF,KAAK,CAAC,KAAO;QAClB;IACF,GAAG,EAAE;IAEL,qBACE,8OAAC;QAAMR,IAAIA;QAAIW,WAAU;;0BACvB,8OAAC;gBAAIA,WAAU;;kCACb,8OAAC;;0CACC,8OAAC,2HAAI;gCAACC,MAAK;gCAAOC,MAAM;;;;;;4BAAM;;;;;;;kCAEhC,8OAAC;wBAAIF,WAAU;;0CAAY,8OAAC;0CAAK;;;;;;0CAAS,8OAAC;0CAAMV,MAAMN,MAAM,IAAI;;;;;;;;;;;;kCACjE,8OAAC;wBAAIgB,WAAU;;0CAAY,8OAAC;0CAAK;;;;;;0CAAS,8OAAC;0CAAMV,MAAMR,KAAK,IAAI;;;;;;;;;;;;kCAChE,8OAAC;wBAAIkB,WAAU;;0CAAY,8OAAC;0CAAK;;;;;;0CAAS,8OAAC;0CAAMV,MAAMP,KAAK,IAAI;;;;;;;;;;;;kCAChE,8OAAC;wBAAIiB,WAAU;;0CAAY,8OAAC;0CAAK;;;;;;0CAAS,8OAAC;0CAAMV,MAAML,MAAM,IAAI;;;;;;;;;;;;;;;;;;0BAEnE,8OAAC;gBAAIe,WAAU;;kCACb,8OAAC;;0CACC,8OAAC,2HAAI;gCAACC,MAAK;gCAAOC,MAAM;;;;;;4BAAM;;;;;;;kCAEhC,8OAAC;wBAAGb,IAAIA,OAAO,YAAY,kBAAkBc;wBAAWH,WAAU;kCAC/DR,MAAMY,MAAM,KAAK,kBAChB,8OAAC;4BAAGC,OAAO;gCAAEC,OAAO;gCAAWC,UAAU;4BAAG;sCAAG;;;;;mCAE/Cf,MAAMgB,GAAG,CAAC,CAACC,kBACT,8OAAC;0CAAc,cAAA,8OAAC;oCAAEC,MAAMD,EAAEE,GAAG;oCAAEC,QAAO;oCAASC,KAAI;8CAAcJ,EAAEK,KAAK;;;;;;+BAA/DL,EAAEpB,EAAE;;;;;;;;;;;;;;;;;;;;;;AAO3B"}},
|
||||
{"offset": {"line": 6236, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/UserProfile.js"],"sourcesContent":["'use client';\n\n// 用户主页:资料卡 + 该用户的帖子列表\nimport { useEffect, useState, useCallback } from 'react';\nimport { API } from '@/lib/api';\nimport { useApp } from './AppProvider';\nimport { Icon } from './Icons';\nimport { useOpenPrivateChat } from './chat/ChatManager';\n\nfunction avatar(username, size = 128) {\n return 'https://ui-avatars.com/api/?name=' + encodeURIComponent(username || 'U') +\n '&background=6366f1&color=fff&size=' + size;\n}\n\nexport default function UserProfile({ username }) {\n const { currentUser, openPost } = useApp();\n const openPrivateChat = useOpenPrivateChat();\n const [user, setUser] = useState(null);\n const [posts, setPosts] = useState([]);\n const [error, setError] = useState(null);\n\n const load = useCallback(async () => {\n setError(null);\n try {\n const u = await API.getUserProfile(username);\n if (u.error || !u.id) {\n setError(u.error || '用户不存在');\n return;\n }\n setUser(u);\n const result = await API.getPosts('latest', u.id);\n setPosts(result.data || []);\n } catch (err) {\n setError(err.message || '加载失败');\n }\n }, [username]);\n\n useEffect(() => { load(); }, [load]);\n\n if (error) {\n return (\n <div className=\"page-slide active\">\n <div style={{ textAlign: 'center', color: '#ef4444', padding: '40px 0' }}>加载失败:{error}</div>\n </div>\n );\n }\n if (!user) {\n return <div style={{ textAlign: 'center', color: '#94a3b8', padding: '40px 0' }}><span className=\"spinner-sm\" />加载中...</div>;\n }\n\n return (\n <div className=\"page-slide active\">\n <div className=\"page-header\" style={{ maxWidth: 700, margin: '0 auto', width: '100%' }}>\n <h2><Icon name=\"users\" size={20} /> 用户主页</h2>\n </div>\n <div style={{ maxWidth: 700, margin: '0 auto', width: '100%' }}>\n <div style={{ background: 'var(--surface)', border: '1px solid var(--border)', borderRadius: 8, padding: 32, textAlign: 'center' }}>\n <img src={user.avatar_url || avatar(user.username)} style={{ width: 96, height: 96, borderRadius: '50%', objectFit: 'cover', border: '3px solid var(--primary)' }} alt=\"\" />\n <h2 style={{ margin: '16px 0 4px', fontSize: 24 }}>{user.username}</h2>\n <p style={{ color: 'var(--text-secondary)', fontSize: 14 }}>{user.bio || '这个人很懒,什么都没写'}</p>\n {currentUser && currentUser.id !== user.id && (\n <button\n className=\"btn-primary\"\n style={{ marginTop: 12, padding: '8px 20px' }}\n onClick={() => openPrivateChat(user.id, user.username)}\n >\n <Icon name=\"message\" size={14} /> 发私信\n </button>\n )}\n <div style={{ display: 'flex', justifyContent: 'center', gap: 32, marginTop: 16, fontSize: 14, color: 'var(--text-secondary)', flexWrap: 'wrap' }}>\n <span><Icon name=\"calendar\" size={14} /> 加入于 {user.created_at ? new Date(user.created_at).toLocaleDateString('zh-CN') : '未知'}</span>\n <span><Icon name=\"file\" size={14} /> 发了 {posts.length} 个帖子</span>\n {user.role === 'admin' && <span style={{ color: 'var(--primary)', fontWeight: 600 }}><Icon name=\"shield\" size={14} /> 管理员</span>}\n </div>\n </div>\n <h3 style={{ margin: '24px 0 16px', fontSize: 18 }}><Icon name=\"file\" size={18} /> 发布的帖子</h3>\n {posts.length === 0 ? (\n <div style={{ color: '#94a3b8', padding: '20px 0', textAlign: 'center' }}>还没有发帖</div>\n ) : (\n posts.map((p) => {\n const time = p.created_at ? new Date(p.created_at).toLocaleString('zh-CN') : '';\n return (\n <div key={p.id} className=\"post-card\" style={{ cursor: 'pointer' }} onClick={(e) => openPost(p.id, e.currentTarget, p)}>\n <div className=\"post-title\" style={{ fontSize: 16, fontWeight: 600 }}>{p.title || '无标题'}</div>\n <div className=\"post-content\" style={{ fontSize: 14, color: 'var(--text-secondary)' }}>\n {(p.content || '').substring(0, 100)}{(p.content || '').length > 100 ? '...' : ''}\n </div>\n <div style={{ fontSize: 12, color: 'var(--text-light)', marginTop: 8 }}>{time}</div>\n </div>\n );\n })\n )}\n </div>\n </div>\n );\n}\n"],"names":["avatar","username","size","encodeURIComponent","UserProfile","currentUser","openPost","openPrivateChat","user","setUser","posts","setPosts","error","setError","load","u","getUserProfile","id","result","getPosts","data","err","message","className","style","textAlign","color","padding","maxWiLine truncated
|
||||
{"offset": {"line": 6625, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/admin/AdminCustomCss.js"],"sourcesContent":["'use client';\n\n// 管理后台 - 自定义 CSS(上传 style.css 覆盖默认样式)\nimport { useState, useRef } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport { Icon } from '../Icons';\nimport { useToast } from '../Toast';\n\nexport default function AdminCustomCss() {\n const { t } = useTranslation();\n const { confirmAction } = useToast();\n const [status, setStatus] = useState(null);\n const [dragOver, setDragOver] = useState(false);\n const [pendingFile, setPendingFile] = useState(null); // 待确认的 CSS 文件\n const fileInputRef = useRef(null);\n\n const handleFile = async (file) => {\n if (!file) return;\n if (file.name !== 'style.css') {\n setStatus({ ok: false, msg: t('admin.css.filenameInvalid') });\n return;\n }\n if (file.size > 1024 * 1024) {\n setStatus({ ok: false, msg: t('admin.css.sizeInvalid') });\n return;\n }\n // 上传前警告确认(与原版一致)\n setPendingFile(file);\n };\n\n const doUpload = async () => {\n try {\n await API.uploadCustomCss(pendingFile);\n setStatus({ ok: true, msg: t('admin.css.active') });\n const link = document.getElementById('custom-css-link');\n if (link) link.href = '/api/custom-css?t=' + Date.now();\n } catch (err) {\n setStatus({ ok: false, msg: err.message });\n } finally {\n setPendingFile(null);\n }\n };\n\n const handleDelete = async () => {\n if (!await confirmAction(t('admin.css.confirmDelete'))) return;\n try {\n await API.deleteCustomCss();\n setStatus({ ok: true, msg: t('admin.css.deleted') });\n const link = document.getElementById('custom-css-link');\n if (link) link.remove();\n } catch (err) {\n setStatus({ ok: false, msg: err.message });\n }\n };\n\n return (\n <>\n <h3 style={{ marginBottom: 16 }}><Icon name=\"code\" size={16} /> {t('admin.css.title')}</h3>\n <p style={{ fontSize: 13, color: 'var(--text-secondary)', marginBottom: 12 }}>\n {t('admin.css.description')}\n </p>\n <div\n style={{\n border: '2px dashed ' + (dragOver ? 'var(--primary)' : 'var(--border)'),\n borderRadius: 8, padding: 32, textAlign: 'center', cursor: 'pointer',\n transition: 'all 0.3s', background: dragOver ? 'var(--primary-bg)' : 'var(--bg)',\n }}\n onClick={() => fileInputRef.current?.click()}\n onDragOver={(e) => { e.preventDefault(); setDragOver(true); }}\n onDragLeave={() => setDragOver(false)}\n onDrop={(e) => { e.preventDefault(); setDragOver(false); if (e.dataTransfer.files?.[0]) handleFile(e.dataTransfer.files[0]); }}\n >\n <span style={{ fontSize: 13, color: 'var(--text-secondary)' }}>\n <Icon name=\"upload\" size={14} /> {dragOver ? t('admin.css.releaseUpload') : t('admin.css.uploadHint')}\n </span>\n </div>\n <input\n type=\"file\"\n ref={fileInputRef}\n accept=\".css\"\n style={{ display: 'none' }}\n onChange={(e) => { if (e.target.files?.[0]) handleFile(e.target.files[0]); }}\n />\n {status && (\n <div style={{ fontSize: 13, marginTop: 8, color: status.ok ? '#22c55e' : '#ef4444', display: 'flex', alignItems: 'center', gap: 5 }}><Icon name={status.ok ? 'success' : 'error'} size={14} /> {status.msg}</div>\n )}\n <div style={{ display: 'flex', gap: 8, marginTop: 16 }}>\n <button className=\"btn-primary\" style={{ padding: '8px 20px' }} onClick={() => fileInputRef.current?.click()}><Icon name=\"save\" size={14} /> {t('admin.css.save')}</button>\n <button className=\"btn-secondary\" style={{ padding: '8px 20px', border: '1px solid var(--border)', borderRadius: 4, background: 'var(--surface)', cursor: 'pointer', color: 'var(--text)' }} onClick={handleDelete}><Icon name=\"trash\" size={14} /> {t('admin.css.delete')}</button>\n </div>\n\n {/* 上传前警告确认 */}\n {pendingFile && (\n <div className=\"modal active\" style={{ display: 'flex' }} onClick={() => setPendingFile(null)}>\n <div className=\"modal-content\" style={{ maxWidth: 420 }} onClick={(e) => e.stopPropagation()}>\n <h2 style={{ marginBottom: 12 }}><Icon name=\"warning\" size={20} /> {t('admin.css.warningTitle')}</h2>\n <p style={{ fontSize: 14, color: 'var(--text-secondary)', marginBottom: 16 }}>\n {t('admin.css.warningBody')}\n </p>\n <p style={{ fontSize: 13, color: 'var(--text-light)', marginBottom: 20 }}>\n {t('admin.css.warningHelp')}\n </p>\n <div style={{ display: 'flex', gap: 8 }}>\n <button className=\"btn-primary\" style={{ padding: '8px 24px' }} onClick={doUpload}><ILine truncated
|
||||
{"offset": {"line": 7025, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/admin/AdminCustomPages.js"],"sourcesContent":["'use client';\n\n// 管理后台 - 自定义页面管理(列表)\nimport { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport CustomPageEditor from './CustomPageEditor';\nimport { Icon } from '../Icons';\nimport { useToast } from '../Toast';\n\nexport default function AdminCustomPages() {\n const { t } = useTranslation();\n const { toast, confirmAction } = useToast();\n const [pages, setPages] = useState(null);\n const [error, setError] = useState(null);\n const [editing, setEditing] = useState(null); // null | 'new' | page对象\n\n const load = () => {\n API.adminGetCustomPages()\n .then((data) => { setPages(data || []); setError(null); })\n .catch((e) => { setError(e.message); setPages([]); });\n };\n\n useEffect(load, []);\n\n const handleDelete = async (p) => {\n if (!await confirmAction(t('admin.page.confirmDelete'))) return;\n try {\n await API.adminDeleteCustomPage(p.id);\n load();\n } catch (err) {\n toast(t('admin.common.deleteFailed', { msg: err.message }), 'error');\n }\n };\n\n if (error) return <div style={{ textAlign: 'center', color: '#ef4444', padding: 20 }}>{t('admin.common.loadFailed', { msg: error })}</div>;\n\n return (\n <>\n <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>\n <h3 style={{ margin: 0 }}><Icon name=\"file\" size={16} /> {t('admin.page.title')}</h3>\n <button className=\"btn-primary\" style={{ padding: '8px 16px' }} onClick={() => setEditing('new')}><Icon name=\"plus\" size={14} /> {t('admin.page.add')}</button>\n </div>\n <div id=\"customPageList\">\n {pages === null ? (\n <div style={{ textAlign: 'center', color: '#94a3b8', padding: 20 }}><span className=\"spinner-sm\" />{t('admin.common.loading')}</div>\n ) : pages.length === 0 ? (\n <div style={{ textAlign: 'center', color: '#94a3b8', padding: 20 }}>{t('admin.page.empty')}</div>\n ) : (\n <div style={{ overflowX: 'auto' }}>\n <table style={{ width: '100%', borderCollapse: 'collapse', fontSize: 14 }}>\n <thead>\n <tr style={{ textAlign: 'left', borderBottom: '2px solid var(--border)' }}>\n <th style={{ padding: '8px 12px' }}>{t('admin.page.name')}</th>\n <th style={{ padding: '8px 12px' }}>{t('admin.page.columnTitle')}</th>\n <th style={{ padding: '8px 12px' }}>{t('admin.page.url')}</th>\n <th style={{ padding: '8px 12px' }}>{t('admin.common.status')}</th>\n <th style={{ padding: '8px 12px', textAlign: 'center' }}>{t('admin.common.actions')}</th>\n </tr>\n </thead>\n <tbody>\n {pages.map((p) => (\n <tr key={p.id} style={{ borderBottom: '1px solid var(--border-light)' }}>\n <td style={{ padding: '8px 12px' }}><code style={{ background: 'var(--bg)', padding: '2px 6px', borderRadius: 4, fontSize: 12 }}>{p.name}</code></td>\n <td style={{ padding: '8px 12px' }}>{p.title}</td>\n <td style={{ padding: '8px 12px' }}><code style={{ background: 'var(--bg)', padding: '2px 6px', borderRadius: 4, fontSize: 12 }}>?custom={p.name}</code></td>\n <td style={{ padding: '8px 12px' }}>\n <span style={{ color: p.enabled ? '#22c55e' : '#ef4444', display: 'inline-flex', alignItems: 'center', gap: 4 }}><Icon name={p.enabled ? 'success' : 'error'} size={13} /> {p.enabled ? t('admin.common.enabled') : t('admin.common.disabled')}</span>\n </td>\n <td style={{ padding: '8px 12px', textAlign: 'center', display: 'flex', gap: 6, justifyContent: 'center' }}>\n <button className=\"btn-sm btn-secondary\" title={t('admin.page.edit')} aria-label={t('admin.page.edit')} onClick={() => setEditing(p)}><Icon name=\"edit\" size={13} /></button>\n <button className=\"btn-sm btn-danger\" title={t('admin.page.delete')} aria-label={t('admin.page.delete')} onClick={() => handleDelete(p)}><Icon name=\"trash\" size={13} /></button>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </div>\n\n {editing && (\n <CustomPageEditor\n page={editing === 'new' ? null : editing}\n onClose={() => setEditing(null)}\n onSaved={() => { setEditing(null); load(); }}\n />\n )}\n </>\n );\n}\n"],"names":["AdminCustomPages","t","toast","confirmAction","pages","setPages","error","setError","editing","setEditing","load","adminGetLine truncated
|
||||
{"offset": {"line": 7457, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/admin/AdminForumSettings.js"],"sourcesContent":["'use client';\n\n// 管理后台 - 论坛设置\nimport { useEffect, useState } from 'react';\nimport { API } from '@/lib/api';\nimport { useApp } from '../AppProvider';\nimport { Icon } from '../Icons';\nimport { useTranslation } from 'react-i18next';\nimport { useToast } from '../Toast';\n\nexport default function AdminForumSettings() {\n const { updateForumName } = useApp();\n const { t } = useTranslation();\n const { toast } = useToast();\n // 初始为空:收到服务器返回的论坛名后才显示,避免默认名一闪而过\n const [name, setName] = useState('');\n const [result, setResult] = useState(null); // {ok, msg}\n\n useEffect(() => {\n API.getSettings()\n .then((data) => { if (data.forum_name) setName(data.forum_name); })\n .catch(() => {});\n }, []);\n\n const handleSave = async () => {\n if (!name.trim()) { toast(t('admin.forum.nameRequired'), 'warning'); return; }\n try {\n await API.updateSettings(name.trim());\n updateForumName(name.trim());\n setResult({ ok: true, msg: t('admin.forum.saved') });\n } catch {\n setResult({ ok: false, msg: t('admin.forum.saveFailed') });\n }\n };\n\n return (\n <>\n <h3 style={{ marginBottom: 16 }}><Icon name=\"settings\" size={16} /> {t('admin.forum.title')}</h3>\n <div style={{ maxWidth: 400 }}>\n <label style={{ fontWeight: 600, fontSize: 14, display: 'block', marginBottom: 6 }}>{t('admin.forum.nameLabel')}</label>\n <input\n type=\"text\"\n style={{ width: '100%', padding: '10px 14px', border: '1.5px solid var(--border)', borderRadius: 6, fontSize: 15, marginBottom: 12, fontFamily: 'inherit', background: 'var(--bg)', color: 'var(--text)' }}\n value={name}\n onChange={(e) => setName(e.target.value)}\n />\n <button className=\"btn-primary\" style={{ padding: '10px 24px' }} onClick={handleSave}><Icon name=\"save\" size={14} /> {t('admin.forum.save')}</button>\n {result && (\n <span style={{ marginLeft: 12, fontSize: 14, color: result.ok ? '#22c55e' : '#ef4444' }}><Icon name={result.ok ? 'success' : 'error'} size={14} /> {result.msg}</span>\n )}\n </div>\n </>\n );\n}\n"],"names":["AdminForumSettings","updateForumName","t","toast","name","setName","result","setResult","getSettings","then","data","forum_name","catch","handleSave","trim","updateSettings","ok","msg","style","marginBottom","size","maxWidth","fontWeight","fontSize","display","type","width","padding","border","borderRadius","fontFamily","background","color","value","onChange","e","target","className","onClick","marginLeft"],"mappings":";;;;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;AAAA;AACA;AARA;;;;;;;;AAUe,SAASA;IACtB,MAAM,EAAEC,eAAe,EAAE,GAAG,IAAA,mIAAM;IAClC,MAAM,EAAEC,CAAC,EAAE,GAAG,IAAA,kLAAc;IAC5B,MAAM,EAAEC,KAAK,EAAE,GAAG,IAAA,+HAAQ;IAC1B,iCAAiC;IACjC,MAAM,CAACC,MAAMC,QAAQ,GAAG,IAAA,iNAAQ,EAAC;IACjC,MAAM,CAACC,QAAQC,UAAU,GAAG,IAAA,iNAAQ,EAAC,OAAO,YAAY;IAExD,IAAA,kNAAS,EAAC;QACR,iHAAG,CAACC,WAAW,GACZC,IAAI,CAAC,CAACC;YAAW,IAAIA,KAAKC,UAAU,EAAEN,QAAQK,KAAKC,UAAU;QAAG,GAChEC,KAAK,CAAC,KAAO;IAClB,GAAG,EAAE;IAEL,MAAMC,aAAa;QACjB,IAAI,CAACT,KAAKU,IAAI,IAAI;YAAEX,MAAMD,EAAE,6BAA6B;YAAY;QAAQ;QAC7E,IAAI;YACF,MAAM,iHAAG,CAACa,cAAc,CAACX,KAAKU,IAAI;YAClCb,gBAAgBG,KAAKU,IAAI;YACzBP,UAAU;gBAAES,IAAI;gBAAMC,KAAKf,EAAE;YAAqB;QACpD,EAAE,OAAM;YACNK,UAAU;gBAAES,IAAI;gBAAOC,KAAKf,EAAE;YAA0B;QAC1D;IACF;IAEA,qBACE;;0BACE,8OAAC;gBAAGgB,OAAO;oBAAEC,cAAc;gBAAG;;kCAAG,8OAAC,2HAAI;wBAACf,MAAK;wBAAWgB,MAAM;;;;;;oBAAM;oBAAElB,EAAE;;;;;;;0BACvE,8OAAC;gBAAIgB,OAAO;oBAAEG,UAAU;gBAAI;;kCAC1B,8OAAC;wBAAMH,OAAO;4BAAEI,YAAY;4BAAKC,UAAU;4BAAIC,SAAS;4BAASL,cAAc;wBAAE;kCAAIjB,EAAE;;;;;;kCACvF,8OAAC;wBACCuB,MAAK;wBACLP,OAAO;4BAAEQ,OAAO;4BAAQC,SAAS;4BAAaC,QAAQ;4BAA6BC,cAAc;4BAAGN,UAAU;4BAAIJ,cAAc;4BAAIW,YAAY;4BAAWC,YAAY;4BAAaC,OAAO;wBAAc;wBACzMC,OAAO7B;wBACP8B,UAAU,CAACC,IAAM9B,QAAQ8B,EAAEC,MAAM,CAACH,KAAK;;;;;;kCAEzC,8OAAC;wBAAOI,WAAU;wBAAcnB,OAAO;4BAAES,SAAS;wBAAY;wBAAGW,SAASzB;;0CAAY,8OAAC,2HAAI;gCAACT,MAAK;gCAAOgB,MAAM;;;;;;4BAAM;4BAAElB,EAAE;;;;;;;oBACvHI,wBACC,8OAAC;wBAAKY,OAAO;4BAAEqB,YAAY;4BAAIhB,UAAU;4BAAIS,OAAO1B,OAAOU,EAAE,GAAG,YAAY;wBAAU;;0CAAG,8OAAC,2HAAI;gCAACZ,MAAME,OAAOU,EAAE,GAAG,YAAY;gCAASI,MAAM;;;;;;4BAAM;4BAAEd,OAAOW,GAAG;;;;;;;;;;;;;;;;;;;AAKxK"}},
|
||||
{"offset": {"line": 7633, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/admin/AdminLinks.js"],"sourcesContent":["'use client';\n\n// 管理后台 - 友情链接管理\nimport { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport { Icon } from '../Icons';\nimport { useToast } from '../Toast';\n\nexport default function AdminLinks() {\n const { t } = useTranslation();\n const { toast, confirmAction } = useToast();\n const [links, setLinks] = useState([]);\n const [title, setTitle] = useState('');\n const [url, setUrl] = useState('');\n\n const load = () => { API.getLinks().then(setLinks).catch(() => {}); };\n useEffect(load, []);\n\n const handleAdd = async () => {\n if (!title.trim() || !url.trim()) { toast(t('admin.link.incomplete'), 'warning'); return; }\n try {\n await API.addLink(title.trim(), url.trim());\n setTitle('');\n setUrl('');\n load();\n } catch (err) {\n toast(t('admin.link.addFailed', { msg: err.message }), 'error');\n }\n };\n\n const handleDelete = async (id) => {\n if (!await confirmAction(t('admin.link.confirmDelete'))) return;\n try {\n await API.deleteLink(id);\n load();\n } catch (err) {\n toast(t('admin.common.deleteFailed', { msg: err.message }), 'error');\n }\n };\n\n return (\n <>\n <div style={{ marginBottom: 16, display: 'flex', gap: 8, flexWrap: 'wrap' }}>\n <input\n type=\"text\" placeholder={t('admin.link.namePlaceholder')}\n style={{ flex: 1, minWidth: 120, padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, background: 'var(--bg)', color: 'var(--text)' }}\n value={title} onChange={(e) => setTitle(e.target.value)}\n />\n <input\n type=\"url\" placeholder={t('admin.link.urlPlaceholder')}\n style={{ flex: 2, minWidth: 160, padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, background: 'var(--bg)', color: 'var(--text)' }}\n value={url} onChange={(e) => setUrl(e.target.value)}\n />\n <button className=\"btn-primary\" style={{ padding: '8px 16px' }} onClick={handleAdd}>{t('admin.link.add')}</button>\n </div>\n <div id=\"linkList\">\n {links.length === 0 ? (\n <div style={{ color: '#94a3b8', fontSize: 13 }}>{t('admin.link.empty')}</div>\n ) : (\n links.map((l) => (\n <div key={l.id} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '8px 0', borderBottom: '1px solid var(--border)' }}>\n <span><a href={l.url} target=\"_blank\" rel=\"noreferrer\" style={{ color: '#6366f1', textDecoration: 'none' }}>{l.title}</a></span>\n <button className=\"btn-sm btn-danger\" onClick={() => handleDelete(l.id)}>\n <Icon name=\"trash\" size={12} /> {t('admin.common.delete')}\n </button>\n </div>\n ))\n )}\n </div>\n </>\n );\n}\n"],"names":["AdminLinks","t","toast","confirmAction","links","setLinks","title","setTitle","url","setUrl","load","getLinks","then","catch","handleAdd","trim","addLink","err","msg","message","handleDelete","id","deleteLink","style","marginBottom","display","gap","flexWrap","type","placeholder","flex","minWidth","padding","border","borderRadius","background","color","value","onChange","e","target","className","onClick","length","fontSize","map","l","justifyContent","alignItems","borderBottom","href","rel","textDecoration","name","size"],"mappings":";;;;;AAEA,gBAAgB;AAChB;AACA;AAAA;AACA;AACA;AACA;AAPA;;;;;;;AASe,SAASA;IACtB,MAAM,EAAEC,CAAC,EAAE,GAAG,IAAA,kLAAc;IAC5B,MAAM,EAAEC,KAAK,EAAEC,aAAa,EAAE,GAAG,IAAA,+HAAQ;IACzC,MAAM,CAACC,OAAOC,SAAS,GAAG,IAAA,iNAAQ,EAAC,EAAE;IACrC,MAAM,CAACC,OAAOC,SAAS,GAAG,IAAA,iNAAQ,EAAC;IACnC,MAAM,CAACC,KAAKC,OAAO,GAAG,IAAA,iNAAQ,EAAC;IAE/B,MAAMC,OAAO;QAAQ,iHAAG,CAACC,QAAQ,GAAGC,IAAI,CAACP,UAAUQ,KAAK,CAAC,KAAO;IAAI;IACpE,IAAA,kNAAS,EAACH,MAAM,EAAE;IAElB,MAAMI,YAAY;QAChB,IAAI,CAACR,MAAMS,IAAI,MAAM,CAACP,IAAIO,IAAI,IAAI;YAAEb,MAAMD,EAAE,0BAA0B;YAAY;QAAQ;QAC1F,IAAI;YACF,MAAM,iHAAG,CAACe,OAAO,CAACV,MAAMS,IAAI,IAAIP,IAAIO,IAAI;YACxCR,SAAS;YACTE,OAAO;YACPC;QACF,EAAE,OAAOO,KAAK;YACZf,MAAMD,EAAE,wBAAwB;gBAAEiB,KAAKD,IAAIE,OAAO;YAAC,IAAI;QACzD;IACF;IAEA,MAAMC,eAAe,OAAOC;QAC1B,IAAI,CAAC,MAAMlB,cAAcF,EAAE,8BAA8B;QACzD,IAAI;YACF,MAAM,iHAAG,CAACqB,UAAU,CAACD;YACrBX;QACF,EAAE,OAAOO,KAAK;YACZf,MAAMD,EAAE,6BAA6B;gBAAEiB,KAAKD,IAAIE,OAAO;YAAC,IAAI;QAC9D;IACF;IAEA,qBACE;;0BACE,8OAAC;gBAAII,OAAO;oBAAEC,cAAc;oBAAIC,SAAS;oBAAQC,KAAK;oBAAGC,UAAU;gBAAO;;kCACxE,8OAAC;wBACCC,MAAK;wBAAOC,aAAa5B,EAAE;wBAC3BsB,OAAO;4BAAEO,MAAM;4BAAGC,UAAU;4BAAKC,SAAS;4BAAYC,QAAQ;4BAA2BC,cAAc;4BAAGC,YAAY;4BAAaC,OAAO;wBAAc;wBACxJC,OAAO/B;wBAAOgC,UAAU,CAACC,IAAMhC,SAASgC,EAAEC,MAAM,CAACH,KAAK;;;;;;kCAExD,8OAAC;wBACCT,MAAK;wBAAMC,aAAa5B,EAAE;wBAC1BsB,OAAO;4BAAEO,MAAM;4BAAGC,UAAU;4BAALine truncated
|
||||
{"offset": {"line": 7838, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/admin/AdminLogs.js"],"sourcesContent":["'use client';\n\n// 管理后台 - 事件日志\nimport { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\n\nexport default function AdminLogs() {\n const { t, i18n } = useTranslation();\n const [logs, setLogs] = useState(null);\n const [error, setError] = useState(null);\n\n const load = () => {\n API.getEventLogs()\n .then((data) => { setLogs(data || []); setError(null); })\n .catch((e) => { setError(e.message); setLogs([]); });\n };\n\n useEffect(load, []);\n\n if (error) return <div style={{ textAlign: 'center', color: '#ef4444', padding: 20 }}>{t('admin.common.loadFailed', { msg: error })}</div>;\n if (!logs) return <div style={{ textAlign: 'center', color: '#94a3b8', padding: 20 }}><span className=\"spinner-sm\" />{t('admin.common.loading')}</div>;\n if (logs.length === 0) return <div style={{ textAlign: 'center', color: '#94a3b8', padding: 40 }}>{t('admin.log.empty')}</div>;\n\n const dateLocale = i18n.resolvedLanguage === 'en' ? 'en-US' : 'zh-CN';\n\n return (\n <table style={{ width: '100%', borderCollapse: 'collapse', fontSize: 13 }}>\n <thead>\n <tr style={{ textAlign: 'left', borderBottom: '1px solid var(--border)' }}>\n <th>{t('admin.log.time')}</th><th>{t('admin.log.user')}</th><th>{t('admin.log.action')}</th>\n </tr>\n </thead>\n <tbody>\n {logs.map((l) => (\n <tr key={l.id} style={{ borderBottom: '1px solid #f1f5f9' }}>\n <td style={{ padding: '6px 0' }}>{new Date(l.created_at).toLocaleString(dateLocale)}</td>\n <td style={{ padding: '6px 0' }}>{l.username || t('admin.log.system')}</td>\n <td style={{ padding: '6px 0' }}>{l.action}</td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"],"names":["AdminLogs","t","i18n","logs","setLogs","error","setError","load","getEventLogs","then","data","catch","e","message","style","textAlign","color","padding","msg","className","length","dateLocale","resolvedLanguage","width","borderCollapse","fontSize","borderBottom","map","l","Date","created_at","toLocaleString","username","action","id"],"mappings":";;;;;AAEA,cAAc;AACd;AACA;AAAA;AACA;AALA;;;;;AAOe,SAASA;IACtB,MAAM,EAAEC,CAAC,EAAEC,IAAI,EAAE,GAAG,IAAA,kLAAc;IAClC,MAAM,CAACC,MAAMC,QAAQ,GAAG,IAAA,iNAAQ,EAAC;IACjC,MAAM,CAACC,OAAOC,SAAS,GAAG,IAAA,iNAAQ,EAAC;IAEnC,MAAMC,OAAO;QACX,iHAAG,CAACC,YAAY,GACbC,IAAI,CAAC,CAACC;YAAWN,QAAQM,QAAQ,EAAE;YAAGJ,SAAS;QAAO,GACtDK,KAAK,CAAC,CAACC;YAAQN,SAASM,EAAEC,OAAO;YAAGT,QAAQ,EAAE;QAAG;IACtD;IAEA,IAAA,kNAAS,EAACG,MAAM,EAAE;IAElB,IAAIF,OAAO,qBAAO,8OAAC;QAAIS,OAAO;YAAEC,WAAW;YAAUC,OAAO;YAAWC,SAAS;QAAG;kBAAIhB,EAAE,2BAA2B;YAAEiB,KAAKb;QAAM;;;;;;IACjI,IAAI,CAACF,MAAM,qBAAO,8OAAC;QAAIW,OAAO;YAAEC,WAAW;YAAUC,OAAO;YAAWC,SAAS;QAAG;;0BAAG,8OAAC;gBAAKE,WAAU;;;;;;YAAgBlB,EAAE;;;;;;;IACxH,IAAIE,KAAKiB,MAAM,KAAK,GAAG,qBAAO,8OAAC;QAAIN,OAAO;YAAEC,WAAW;YAAUC,OAAO;YAAWC,SAAS;QAAG;kBAAIhB,EAAE;;;;;;IAErG,MAAMoB,aAAanB,KAAKoB,gBAAgB,KAAK,OAAO,UAAU;IAE9D,qBACE,8OAAC;QAAMR,OAAO;YAAES,OAAO;YAAQC,gBAAgB;YAAYC,UAAU;QAAG;;0BACtE,8OAAC;0BACC,cAAA,8OAAC;oBAAGX,OAAO;wBAAEC,WAAW;wBAAQW,cAAc;oBAA0B;;sCACtE,8OAAC;sCAAIzB,EAAE;;;;;;sCAAuB,8OAAC;sCAAIA,EAAE;;;;;;sCAAuB,8OAAC;sCAAIA,EAAE;;;;;;;;;;;;;;;;;0BAGvE,8OAAC;0BACEE,KAAKwB,GAAG,CAAC,CAACC,kBACT,8OAAC;wBAAcd,OAAO;4BAAEY,cAAc;wBAAoB;;0CACxD,8OAAC;gCAAGZ,OAAO;oCAAEG,SAAS;gCAAQ;0CAAI,IAAIY,KAAKD,EAAEE,UAAU,EAAEC,cAAc,CAACV;;;;;;0CACxE,8OAAC;gCAAGP,OAAO;oCAAEG,SAAS;gCAAQ;0CAAIW,EAAEI,QAAQ,IAAI/B,EAAE;;;;;;0CAClD,8OAAC;gCAAGa,OAAO;oCAAEG,SAAS;gCAAQ;0CAAIW,EAAEK,MAAM;;;;;;;uBAHnCL,EAAEM,EAAE;;;;;;;;;;;;;;;;AASvB"}},
|
||||
{"offset": {"line": 8019, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/admin/AdminReports.js"],"sourcesContent":["'use client';\n\n// 管理后台 - 举报处理\nimport { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport { Icon } from '../Icons';\nimport { useToast } from '../Toast';\n\nexport default function AdminReports() {\n const { t } = useTranslation();\n const { toast, confirmAction } = useToast();\n const [reports, setReports] = useState(null);\n const [error, setError] = useState(null);\n\n const load = () => {\n API.getReports()\n .then((data) => { setReports(data || []); setError(null); })\n .catch((e) => { setError(e.message); setReports([]); });\n };\n\n useEffect(load, []);\n\n const handleAction = async (r, action) => {\n const status = action === 'approve' ? 'approved' : 'rejected';\n const note = action === 'approve' ? t('admin.report.approvedNote') : t('admin.report.rejectedNote');\n if (action === 'approve' && !await confirmAction(t('admin.report.confirmApprove'))) return;\n try {\n await API.updateReport(r.id, status, note);\n if (action === 'approve' && r.post_id) {\n API.deletePost(r.post_id).catch(() => {});\n }\n load();\n } catch (err) {\n toast(t('admin.common.operationFailed', { msg: err.message }), 'error');\n }\n };\n\n if (error) return <div style={{ textAlign: 'center', color: '#ef4444', padding: 20 }}>{t('admin.common.loadFailed', { msg: error })}</div>;\n if (!reports) return <div style={{ textAlign: 'center', color: '#94a3b8', padding: 20 }}><span className=\"spinner-sm\" />{t('admin.common.loading')}</div>;\n if (reports.length === 0) return <div style={{ textAlign: 'center', color: '#94a3b8', padding: 40 }}><Icon name=\"success\" size={16} /> {t('admin.report.empty')}</div>;\n\n const statusLabels = {\n pending: t('admin.report.statusPending'),\n approved: t('admin.report.statusApproved'),\n rejected: t('admin.report.statusRejected'),\n };\n const statusIcons = { pending: 'pending', approved: 'success', rejected: 'error' };\n\n return reports.map((r) => (\n <div key={r.id} className=\"report-item\">\n <div>{t('admin.report.reportedPost', { name: r.reporter_name || t('admin.report.anonymous') })}</div>\n <div style={{ fontSize: 13, color: '#64748b', margin: '4px 0' }}>{t('admin.report.reason', { reason: r.reason })}</div>\n <div style={{ fontSize: 13, color: '#64748b', margin: '4px 0' }}>\n {t('admin.report.post', {\n title: r.post_title || t('admin.report.untitled'),\n content: (r.post_content || '').substring(0, 30) + ((r.post_content || '').length > 30 ? '...' : ''),\n })}\n </div>\n <div style={{ fontSize: 13, fontWeight: 600, display: 'flex', alignItems: 'center', gap: 4 }}>\n {statusIcons[r.status] && <Icon name={statusIcons[r.status]} size={13} />} {t('admin.common.status')}: {statusLabels[r.status] || r.status}\n </div>\n {r.handler_name && (\n <div style={{ fontSize: 12, color: '#94a3b8' }}>\n {t('admin.report.handler', { name: r.handler_name })}{r.handler_note ? ' (' + r.handler_note + ')' : ''}\n </div>\n )}\n {r.status === 'pending' && (\n <div className=\"report-actions\">\n <button className=\"btn-sm btn-danger\" onClick={() => handleAction(r, 'approve')}>\n <Icon name=\"trash\" size={12} /> {t('admin.report.deletePost')}\n </button>\n <button className=\"btn-sm btn-secondary\" onClick={() => handleAction(r, 'reject')}>\n <Icon name=\"close\" size={12} /> {t('admin.report.reject')}\n </button>\n </div>\n )}\n </div>\n ));\n}\n"],"names":["AdminReports","t","toast","confirmAction","reports","setReports","error","setError","load","getReports","then","data","catch","e","message","handleAction","r","action","status","note","updateReport","id","post_id","deletePost","err","msg","style","textAlign","color","padding","className","length","name","size","statusLabels","pending","approved","rejected","statusIcons","map","reporter_name","fontSize","margin","reason","title","post_title","content","post_content","substring","fontWeight","display","alignItems","gap","handler_name","handler_note","onClick"],"mappings":";;;;;AAEA,cAAc;AACd;AACA;AAAA;AACA;AACA;AACA;AAPA;;;;;;;AASe,SAASA;IACtB,MAAM,EAAEC,CAAC,EAAE,GAAG,IAAA,kLAAc;IAC5B,MAAM,EAAEC,KAAK,EAAEC,aAAa,EAAE,GAAG,IAAA,+HAAQ;IACzC,MAAM,CAACC,SAASC,WAAW,GAAG,IAAA,iNAAQ,EAAC;IACvC,MAAM,CAACC,OAAOC,SAAS,GAAG,IAAA,iNAAQ,EAAC;IAEnC,MAAMC,OAAO;QACX,iHAAG,CAACC,UAAU,GACXC,IAAI,CAAC,CAACC;YAAWN,WAAWM,QAAQ,EAAE;YAAGJ,SAAS;QAAO,GACzDK,KAAK,CAAC,CAACC;YAAQN,SAASM,EAAEC,OAAO;YAAGT,WAAW,EAAE;QAAG;IACzD;IAEA,IAAA,kNAAS,EAACG,MAAM,EAAE;IAElB,MAAMO,eAAe,OAAOC,GAAGC;QAC7B,MAAMC,SAASD,WAAW,YAAY,aAAa;QACnD,MAAME,OAAOF,WAAW,YAAYhB,EALine truncated
|
||||
{"offset": {"line": 8281, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/admin/AdminUsers.js"],"sourcesContent":["'use client';\n\n// 管理后台 - 用户管理\nimport { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport { useApp } from '../AppProvider';\nimport { useToast } from '../Toast';\n\nexport default function AdminUsers() {\n const { currentUser } = useApp();\n const { t, i18n } = useTranslation();\n const { toast, confirmAction } = useToast();\n const [users, setUsers] = useState(null);\n const [error, setError] = useState(null);\n\n const load = () => {\n API.getUsers()\n .then((data) => { setUsers(data || []); setError(null); })\n .catch((e) => { setError(e.message); setUsers([]); });\n };\n\n useEffect(load, []);\n\n const handleRole = async (u, role) => {\n const roleName = role === 'admin' ? t('admin.user.roleAdmin') : t('admin.user.roleUser');\n if (!await confirmAction(t('admin.user.confirmRole', { role: roleName }), { danger: false })) return;\n try {\n await API.updateUserRole(u.id, role);\n load();\n } catch (err) {\n toast(t('admin.common.operationFailed', { msg: err.message }), 'error');\n }\n };\n\n if (error) return <div style={{ textAlign: 'center', color: '#ef4444', padding: 20 }}>{t('admin.common.loadFailed', { msg: error })}</div>;\n if (!users) return <div style={{ textAlign: 'center', color: '#94a3b8', padding: 20 }}><span className=\"spinner-sm\" />{t('admin.common.loading')}</div>;\n\n const dateLocale = i18n.resolvedLanguage === 'en' ? 'en-US' : 'zh-CN';\n\n return (\n <>\n <div style={{ marginBottom: 12, fontSize: 13, color: '#94a3b8' }}>{t('admin.user.count', { count: users.length })}</div>\n <div style={{ overflowX: 'auto' }}>\n <table style={{ width: '100%', borderCollapse: 'collapse', fontSize: 14 }}>\n <thead>\n <tr style={{ textAlign: 'left', borderBottom: '2px solid var(--border)' }}>\n <th style={{ padding: '10px 12px' }}>{t('admin.user.user')}</th>\n <th style={{ padding: '10px 12px' }}>{t('admin.user.role')}</th>\n <th style={{ padding: '10px 12px' }}>{t('admin.user.registeredAt')}</th>\n <th style={{ padding: '10px 12px', textAlign: 'center' }}>{t('admin.common.actions')}</th>\n </tr>\n </thead>\n <tbody>\n {users.map((u) => {\n const isAdmin = u.role === 'admin';\n const isCurrent = currentUser && currentUser.id === u.id;\n return (\n <tr key={u.id} style={{ borderBottom: '1px solid #f1f5f9' }}>\n <td style={{ padding: '10px 12px' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>\n <img\n src={u.avatar_url || 'https://ui-avatars.com/api/?name=' + encodeURIComponent(u.username) + '&background=6366f1&color=fff&size=64'}\n style={{ width: 28, height: 28, borderRadius: '50%', objectFit: 'cover' }}\n alt=\"\"\n />\n <span style={{ fontWeight: 500 }}>{u.username}</span>\n {isCurrent && <span style={{ fontSize: 11, color: '#94a3b8', background: '#eef2ff', padding: '1px 8px', borderRadius: 4 }}>{t('admin.user.you')}</span>}\n </div>\n </td>\n <td style={{ padding: '10px 12px' }}>\n <span style={{\n display: 'inline-block', padding: '2px 10px', borderRadius: 4, fontSize: 12, fontWeight: 500,\n ...(isAdmin ? { background: '#6366f1', color: '#fff' } : { background: 'var(--border)', color: 'var(--text-secondary)' }),\n }}>\n {isAdmin ? (u.is_super ? t('admin.user.roleSuper') : t('admin.user.roleAdmin')) : t('admin.user.roleUser')}\n </span>\n </td>\n <td style={{ padding: '10px 12px', color: '#94a3b8', fontSize: 13 }}>\n {u.created_at ? new Date(u.created_at).toLocaleDateString(dateLocale) : '—'}\n </td>\n <td style={{ padding: '10px 12px', textAlign: 'center' }}>\n {isCurrent ? (\n <span style={{ fontSize: 12, color: '#94a3b8' }}>{t('admin.user.cannotSelf')}</span>\n ) : isAdmin ? (\n <button className=\"btn-sm btn-secondary\" style={{ padding: '4px 12px' }} onClick={() => handleRole(u, 'user')}>{t('admin.user.makeUser')}</button>\n ) : (\n <button className=\"btn-sm btn-primary\" style={{ padding: '4px 12px', background: '#6366f1', color: '#fff', border: 'none', borderRadius: 4, cursor: 'pointer' }} onClick={() => handleRole(Line truncated
|
||||
{"offset": {"line": 8647, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/admin/CustomPageEditor.js"],"sourcesContent":["'use client';\n\n// 管理后台 - 自定义页面编辑器(modal)\nimport { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { API } from '@/lib/api';\nimport { Icon } from '../Icons';\nimport { useToast } from '../Toast';\n\nexport default function CustomPageEditor({ page, onClose, onSaved }) {\n const { t } = useTranslation();\n const { toast } = useToast();\n const isEdit = !!page;\n const [name, setName] = useState(page?.name || '');\n const [title, setTitle] = useState(page?.title || '');\n const [content, setContent] = useState(page?.content || '');\n const [enabled, setEnabled] = useState(page?.enabled !== false);\n\n const handleSave = async () => {\n if (!name.trim()) { toast(t('admin.page.nameRequired'), 'warning'); return; }\n if (!title.trim()) { toast(t('admin.page.titleRequired'), 'warning'); return; }\n if (!content.trim()) { toast(t('admin.page.contentRequired'), 'warning'); return; }\n if (!/^[a-zA-Z0-9\\-_]+$/.test(name.trim())) {\n toast(t('admin.page.nameInvalid'), 'warning');\n return;\n }\n try {\n if (isEdit) {\n await API.adminUpdateCustomPage(page.id, title.trim(), content.trim(), enabled);\n } else {\n await API.adminCreateCustomPage(name.trim(), title.trim(), content.trim());\n }\n onSaved();\n } catch (err) {\n toast(t('admin.common.saveFailed', { msg: err.message }), 'error');\n }\n };\n\n return (\n <div className=\"modal active\" style={{ display: 'flex' }} onClick={(e) => { if (e.target === e.currentTarget) onClose(); }}>\n <div className=\"modal-content\" style={{ maxWidth: 600, maxHeight: '90vh', overflowY: 'auto', position: 'relative' }}>\n <span className=\"close\" style={{ position: 'absolute', top: 12, right: 16, cursor: 'pointer', color: 'var(--text-light)' }} onClick={onClose}><Icon name=\"close\" size={20} /></span>\n <h2 style={{ marginBottom: 16 }}><Icon name={isEdit ? 'edit' : 'file'} size={20} /> {isEdit ? t('admin.page.editTitle') : t('admin.page.addTitle')}</h2>\n <div style={{ marginBottom: 12 }}>\n <label style={{ fontWeight: 600, fontSize: 14, display: 'block', marginBottom: 4 }}>{t('admin.page.nameLabel')}</label>\n <input\n type=\"text\"\n value={name}\n readOnly={isEdit}\n placeholder={t('admin.page.namePlaceholder')}\n style={{ width: '100%', padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, fontSize: 14, background: isEdit ? 'var(--border-light)' : 'var(--bg)', color: 'var(--text)' }}\n onChange={(e) => setName(e.target.value)}\n />\n {isEdit\n ? <div style={{ fontSize: 12, color: 'var(--text-light)', marginTop: 2 }}><Icon name=\"warning\" size={12} /> {t('admin.page.nameLocked')}</div>\n : <div style={{ fontSize: 12, color: 'var(--text-light)', marginTop: 2 }}>{t('admin.page.nameHint')}</div>}\n </div>\n <div style={{ marginBottom: 12 }}>\n <label style={{ fontWeight: 600, fontSize: 14, display: 'block', marginBottom: 4 }}>{t('admin.page.navTitleLabel')}</label>\n <input\n type=\"text\"\n value={title}\n placeholder={t('admin.page.navTitlePlaceholder')}\n style={{ width: '100%', padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, fontSize: 14, background: 'var(--bg)', color: 'var(--text)' }}\n onChange={(e) => setTitle(e.target.value)}\n />\n </div>\n <div style={{ marginBottom: 12 }}>\n <label style={{ fontWeight: 600, fontSize: 14, display: 'block', marginBottom: 4 }}>{t('admin.common.status')}</label>\n <select\n value={String(enabled)}\n style={{ width: '100%', padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, fontSize: 14, background: 'var(--bg)', color: 'var(--text)' }}\n onChange={(e) => setEnabled(e.target.value === 'true')}\n >\n <option value=\"true\">{t('admin.common.enabled')}</option>\n <option value=\"false\">{t('admin.common.disabled')}</option>\n </select>\n </div>\n <div style={{ marginBottom: 12 }}>\n <label style={{ fontWeight: 600, fontSize: 14, display: 'block', marginBottom: 4 }}>{t('admin.page.contentLabel')}</label>\n <textarea\n rows={12}\n value={content}\n style={{ width: '100%', padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 4, fontSize: 13, fontFamily: 'monospace', background: 'var(--bg)', color: 'var(--text)', resize: 'vertical' }}\n onChange={(e) => setContent(e.target.value)}\n />\n <div style={{ fontSizeLine truncated
|
||||
{"offset": {"line": 9030, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/chat/ChatManager.js"],"sourcesContent":["'use client';\n\n// 私信管理器:会话列表 modal + 聊天窗口 modal + 未读 badge\nimport { useState, useEffect, useCallback } from 'react';\nimport { API } from '@/lib/api';\nimport { useApp } from '../AppProvider';\nimport { Icon } from '../Icons';\nimport ConversationList from './ConversationList';\nimport ChatWindow from './ChatWindow';\nimport { useToast } from '../Toast';\n\n// 私信按钮(含未读 badge),渲染在导航栏内\nexport function DMButton() {\n const { currentUser } = useApp();\n const [unread, setUnread] = useState(0);\n\n useEffect(() => {\n if (!currentUser) { setUnread(0); return; }\n const update = () => {\n API.getConversations()\n .then((cs) => setUnread((cs || []).reduce((s, c) => s + (c.unread_count || 0), 0)))\n .catch(() => {});\n };\n update();\n const t = setInterval(update, 30000);\n return () => clearInterval(t);\n }, [currentUser]);\n\n if (!currentUser) return null; // 未登录不显示私信按钮\n\n return (\n <button\n className=\"nav-icon-btn\"\n title=\"私信\"\n style={{ position: 'relative', padding: '6px 8px', background: 'none', border: 'none', cursor: 'pointer', color: 'var(--text-secondary)', borderRadius: 4, display: 'inline-flex', alignItems: 'center', justifyContent: 'center' }}\n onClick={() => window.dispatchEvent(new CustomEvent('forumlify-open-messages'))}\n >\n <Icon name=\"message\" size={20} />\n {unread > 0 && (\n <span style={{ position: 'absolute', top: -2, right: -2, background: '#ef4444', color: '#fff', borderRadius: '50%', padding: '2px 6px', fontSize: 10, fontWeight: 600, minWidth: 18, textAlign: 'center', lineHeight: 1.4 }}>\n {unread > 99 ? '99+' : unread}\n </span>\n )}\n </button>\n );\n}\n\n// 私信 modals 容器(会话列表 + 聊天窗口)\nexport default function ChatManager() {\n const [listOpen, setListOpen] = useState(false);\n const [chat, setChat] = useState(null); // {conversationId, otherUserId, otherUsername}\n const [refreshKey, setRefreshKey] = useState(0);\n\n const refreshList = useCallback(() => setRefreshKey((k) => k + 1), []);\n\n // 监听事件:打开会话列表 / 打开聊天\n useEffect(() => {\n const handler = (e) => {\n setChat(e.detail);\n setListOpen(false);\n };\n const openList = () => setListOpen(true);\n window.addEventListener('forumlify-open-chat', handler);\n window.addEventListener('forumlify-open-messages', openList);\n return () => {\n window.removeEventListener('forumlify-open-chat', handler);\n window.removeEventListener('forumlify-open-messages', openList);\n };\n }, []);\n\n const openChat = (conversationId, otherUserId, otherUsername) => {\n setChat({ conversationId, otherUserId, otherUsername });\n setListOpen(false);\n };\n\n const closeChat = () => {\n setChat(null);\n refreshList();\n };\n\n return (\n <>\n {listOpen && (\n <ConversationList\n onOpenChat={openChat}\n onClose={() => setListOpen(false)}\n />\n )}\n {chat && (\n <ChatWindow\n conversationId={chat.conversationId}\n otherUserId={chat.otherUserId}\n otherUsername={chat.otherUsername}\n onClose={closeChat}\n onRefreshList={refreshList}\n />\n )}\n </>\n );\n}\n\n// 供其他组件调用的打开私信(通过自定义事件桥接)\nexport function useOpenPrivateChat() {\n const { currentUser } = useApp();\n const { toast } = useToast();\n const open = async (otherUserId, otherUsername) => {\n if (!currentUser) { toast('请先登录', 'warning'); return; }\n try {\n const result = await API.getOrCreateConversation(otherUserId);\n window.dispatchEvent(new CustomEvent('forumlify-open-chat', {\n detail: { conversationId: result.id, otherUserId, otherUsername },\n }));\n } catch (err) {\n toast('打开私信失败:' + err.message, 'error');\n }\n };\n return open;\n}\n"],"names":["DMButton","currentUser","unread","setUnread","update","getConversations","then","cs","reduce","s","c","unread_count","catch","t","setInterval","clearInterval","className","title","style","position","padding","background","border","cursor","color","borderRadius","display","alignItems","justifyContent","onClick","window","dispatchEvent","CustomEvent","name","size","top","right","fontSize","fontWeight","minWidth","textAlign","lineHeight","ChatManager","listOpen","setListOpen","chat","setChat","refreshKey","setRefreshKey","refreshList","k","handler","e","detail","openList","addEventListener","removeEventListener","openChat","conversationId","otherUserId","otherUsername","closeChat","onOpenChat","onClose","onRefreshList","useOpenPrivateCLine truncated
|
||||
{"offset": {"line": 9213, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/chat/ChatWindow.js"],"sourcesContent":["'use client';\n\n// 私信 - 聊天窗口(3 秒轮询新消息)\nimport { useEffect, useState, useRef, useCallback } from 'react';\nimport { API } from '@/lib/api';\nimport { useApp } from '../AppProvider';\nimport { Icon } from '../Icons';\nimport { useToast } from '../Toast';\n\nfunction avatar(username) {\n return 'https://ui-avatars.com/api/?name=' + encodeURIComponent(username || 'U') +\n '&background=6366f1&color=fff&size=64';\n}\n\nexport default function ChatWindow({ conversationId, otherUserId, otherUsername, onClose, onRefreshList }) {\n const { currentUser } = useApp();\n const { toast } = useToast();\n const [messages, setMessages] = useState(null);\n const [content, setContent] = useState('');\n const containerRef = useRef(null);\n\n const load = useCallback(async (silent = false) => {\n if (!silent) setMessages(null);\n try {\n const data = await API.getMessages(conversationId);\n setMessages(data || []);\n } catch {\n if (!silent) setMessages([]);\n }\n }, [conversationId]);\n\n useEffect(() => { load(); }, [load]);\n\n // 3 秒轮询\n useEffect(() => {\n const t = setInterval(() => load(true), 3000);\n return () => clearInterval(t);\n }, [load]);\n\n // 自动滚动到底部\n useEffect(() => {\n if (containerRef.current) containerRef.current.scrollTop = containerRef.current.scrollHeight;\n }, [messages]);\n\n const send = async () => {\n if (!content.trim()) return;\n try {\n await API.sendMessage(conversationId, content.trim());\n setContent('');\n load();\n onRefreshList();\n } catch (err) {\n toast('发送失败:' + err.message, 'error');\n }\n };\n\n return (\n <div className=\"modal active\" onClick={(e) => { if (e.target === e.currentTarget) onClose(); }}>\n <div className=\"modal-content\" style={{ display: 'flex', flexDirection: 'column', height: '70vh', maxHeight: '70vh', padding: 0, overflow: 'hidden' }}>\n <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '16px 20px', borderBottom: '1px solid var(--border)' }}>\n <span id=\"chatTitle\" style={{ fontWeight: 600, fontSize: 16 }}>{otherUsername}</span>\n <span className=\"close\" onClick={onClose} style={{ cursor: 'pointer', color: 'var(--text-light)', lineHeight: 1 }}><Icon name=\"close\" size={20} /></span>\n </div>\n <div id=\"chatMessages\" ref={containerRef} style={{ flex: 1, overflowY: 'auto', padding: 16, minHeight: 0 }}>\n {messages === null ? (\n <div style={{ textAlign: 'center', color: '#94a3b8', padding: '40px 0' }}><span className=\"spinner-sm\" />加载中...</div>\n ) : messages.length === 0 ? (\n <div style={{ textAlign: 'center', color: '#94a3b8', padding: '40px 0' }}>还没有消息,打个招呼吧 👋</div>\n ) : (\n messages.map((m) => {\n const isMine = m.sender_id === currentUser?.id;\n const time = m.created_at ? new Date(m.created_at).toLocaleString('zh-CN') : '';\n return (\n <div key={m.id} style={{ display: 'flex', justifyContent: isMine ? 'flex-end' : 'flex-start', marginBottom: 12 }}>\n {!isMine && (\n <img src={m.sender_avatar_url || avatar(m.sender_username)} style={{ width: 32, height: 32, borderRadius: '50%', objectFit: 'cover', marginRight: 8, flexShrink: 0 }} alt=\"\" />\n )}\n <div style={{ maxWidth: '70%' }}>\n <div style={{\n background: isMine ? 'var(--primary)' : 'var(--surface)',\n color: isMine ? '#fff' : 'var(--text)',\n padding: '10px 14px', borderRadius: 12,\n border: isMine ? 'none' : '1px solid var(--border)',\n wordBreak: 'break-word',\n }}>\n {m.content}\n </div>\n <div style={{ fontSize: 11, color: 'var(--text-light)', marginTop: 4, textAlign: isMine ? 'right' : 'left' }}>\n {time} {isMine && <Icon name=\"success\" size={10} aria-label={m.is_read ? '已读' : '已发送'} />}\n </div>\n </div>\n </div>\n );\n })\n )}\n </div>\n <div style={{ display: 'flex', gap: 8, padding: '12px 16px', borderTop: '1px solid var(--border)', flexShrink: 0 }}>\n <input\n type=\"text\"\n id=\"chatInput\"\n placeholder=\"输入消息...\"\n style={{ flex: 1, padding: '8px 12px', border: '1px solid var(--border)', borderRadius: 6, fontSize: 14, background: 'var(--bg)', color: 'var(--text)', outline: 'nLine truncated
|
||||
{"offset": {"line": 9540, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/chat/ConversationList.js"],"sourcesContent":["'use client';\n\n// 私信 - 会话列表\nimport { useEffect, useState } from 'react';\nimport { API } from '@/lib/api';\nimport { Icon } from '../Icons';\n\nfunction avatar(username) {\n return 'https://ui-avatars.com/api/?name=' + encodeURIComponent(username || 'U') +\n '&background=6366f1&color=fff&size=64';\n}\n\nexport default function ConversationList({ onOpenChat, onClose }) {\n const [conversations, setConversations] = useState(null);\n\n const load = () => {\n API.getConversations()\n .then((data) => setConversations(data || []))\n .catch(() => setConversations([]));\n };\n\n useEffect(load, []);\n\n return (\n <div className=\"modal active\" onClick={(e) => { if (e.target === e.currentTarget) onClose(); }}>\n <div className=\"modal-content\" style={{ display: 'flex', flexDirection: 'column', height: '70vh', maxHeight: '70vh', padding: 0, overflow: 'hidden' }}>\n <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '16px 20px', borderBottom: '1px solid var(--border)' }}>\n <h2 style={{ fontSize: 18, margin: 0 }}><Icon name=\"message\" size={18} style={{ verticalAlign: -3, marginRight: 6 }} /> 私信</h2>\n <span className=\"close\" onClick={onClose} style={{ cursor: 'pointer', color: 'var(--text-light)', lineHeight: 1 }}><Icon name=\"close\" size={20} /></span>\n </div>\n <div id=\"messageListContent\" style={{ flex: 1, overflowY: 'auto', padding: 0 }}>\n {conversations === null ? (\n <div style={{ textAlign: 'center', color: '#94a3b8', padding: '40px 0' }}><span className=\"spinner-sm\" />加载中...</div>\n ) : conversations.length === 0 ? (\n <div style={{ textAlign: 'center', color: '#94a3b8', padding: '40px 0' }}>暂无私信</div>\n ) : (\n conversations.map((c) => {\n const unread = c.unread_count || 0;\n const lastMsg = c.last_message || '暂无消息';\n const time = c.last_message_time ? new Date(c.last_message_time).toLocaleString('zh-CN') : '';\n return (\n <div\n key={c.id}\n className=\"message-list-item\"\n style={{ display: 'flex', alignItems: 'center', gap: 12, padding: '12px 16px', borderBottom: '1px solid var(--border)', cursor: 'pointer', transition: 'background 0.15s' }}\n onClick={() => onOpenChat(c.id, c.other_user_id, c.other_username)}\n >\n <img src={c.other_avatar_url || avatar(c.other_username)} style={{ width: 40, height: 40, borderRadius: '50%', objectFit: 'cover' }} alt=\"\" />\n <div style={{ flex: 1, minWidth: 0 }}>\n <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>\n <span style={{ fontWeight: 600 }}>{c.other_username}</span>\n <span style={{ fontSize: 12, color: 'var(--text-light)' }}>{time}</span>\n </div>\n <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>\n <span style={{ fontSize: 13, color: 'var(--text-secondary)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', maxWidth: 200 }}>{lastMsg}</span>\n {unread > 0 && (\n <span style={{ background: '#ef4444', color: '#fff', borderRadius: '50%', padding: '2px 8px', fontSize: 11, fontWeight: 600 }}>{unread}</span>\n )}\n </div>\n </div>\n </div>\n );\n })\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"names":["avatar","username","encodeURIComponent","ConversationList","onOpenChat","onClose","conversations","setConversations","load","getConversations","then","data","catch","className","onClick","e","target","currentTarget","style","display","flexDirection","height","maxHeight","padding","overflow","justifyContent","alignItems","borderBottom","fontSize","margin","name","size","verticalAlign","marginRight","cursor","color","lineHeight","id","flex","overflowY","textAlign","length","map","c","unread","unread_count","lastMsg","last_message","time","last_message_time","Date","toLocaleString","gap","transition","other_user_id","other_username","src","other_avatar_url","width","borderRadius","objectFit","alt","minWidth","fontWeight","textOverflow","whiteSpace","maxWidth","background"],"mappings":";;;;;AAEA,YAAY;AACZ;AACA;AACA;AALA;;;;;AAOA,SAASA,OAAOC,QAAQ;IACtB,OAAO,sCAAsCC,mBAAmBD,YAAY,OAC1E;AACJ;AAEe,SAASE,iBAAiB,EAAEC,UAAU,EAAEC,OAAO,EAAE;IAC9D,MAAM,CAACC,eAAeC,iBAAiB,GAAG,IAAA,iNAAQ,EAAC;IAEnD,MAAMC,OAAO;QACX,iHAAG,CAACC,gBAAgBLine truncated
|
||||
{"offset": {"line": 9826, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/lib/api.js"],"sourcesContent":["// 前端 API 封装 (替代原 index.html 的 apiFetch + API 对象)\n// 所有调用返回 JSON;HTTP 错误时抛出带 error 消息的 Error\n\nconst API_BASE_URL = '/api';\n\nlet token = null;\nif (typeof window !== 'undefined') {\n token = localStorage.getItem('forumlify-token') || null;\n}\n\nexport function getToken() {\n return token;\n}\n\nexport function setToken(t) {\n token = t;\n if (t) localStorage.setItem('forumlify-token', t);\n else localStorage.removeItem('forumlify-token');\n}\n\nasync function apiFetch(path, options = {}) {\n const headers = { ...(options.headers || {}) };\n if (options.body && typeof options.body === 'string') {\n headers['Content-Type'] = 'application/json';\n }\n if (token) headers['Authorization'] = 'Bearer ' + token;\n const res = await fetch(API_BASE_URL + path, { ...options, headers });\n const data = await res.json().catch(() => ({}));\n if (!res.ok || data.error) {\n const err = new Error(data.error || '请求失败');\n err.status = res.status;\n throw err;\n }\n return data;\n}\n\nexport const API = {\n // 认证\n async login(email, password) {\n const data = await apiFetch('/auth/login', { method: 'POST', body: JSON.stringify({ email, password }) });\n if (data.token) setToken(data.token);\n return data;\n },\n // 服务端验证码(HMAC 签名挑战)\n getCaptcha() {\n return apiFetch('/captcha');\n },\n register(email, password, username, captcha) {\n return apiFetch('/auth/register', {\n method: 'POST',\n body: JSON.stringify({ email, password, username, captcha_id: captcha?.id, captcha_answer: captcha?.answer, captcha_sig: captcha?.sig }),\n });\n },\n logout() { setToken(null); },\n getMe() { return apiFetch('/auth/me'); },\n\n // 帖子\n getPosts(sort, userId, page = 1, limit = 20) {\n let q = '/posts?sort=' + (sort || 'latest') + '&page=' + page + '&limit=' + limit;\n if (userId) q += '&user_id=' + userId;\n return apiFetch(q);\n },\n getPost(postId) { return apiFetch('/posts/' + postId); },\n createPost(title, content, images, captcha) {\n return apiFetch('/posts', {\n method: 'POST',\n body: JSON.stringify({ title, content, images: images || [], captcha_id: captcha?.id, captcha_answer: captcha?.answer, captcha_sig: captcha?.sig }),\n });\n },\n updatePost(postId, title, content, images) {\n return apiFetch('/posts/' + postId, { method: 'PUT', body: JSON.stringify({ title, content, images }) });\n },\n togglePinPost(postId) {\n return apiFetch('/posts/' + postId + '/pin', { method: 'PUT' });\n },\n deletePost(postId) { return apiFetch('/posts/' + postId, { method: 'DELETE' }); },\n\n // 回复\n getReplies(postId) { return apiFetch('/posts/' + postId + '/replies'); },\n createReply(postId, content, captcha, replyToId) {\n return apiFetch('/posts/' + postId + '/replies', {\n method: 'POST',\n body: JSON.stringify({ content, captcha_id: captcha?.id, captcha_answer: captcha?.answer, captcha_sig: captcha?.sig, reply_to_id: replyToId || null }),\n });\n },\n deleteReply(replyId) { return apiFetch('/replies/' + replyId, { method: 'DELETE' }); },\n\n // 用户管理\n getUsers() { return apiFetch('/users'); },\n getUsersByUsername(username) { return apiFetch('/users?username=' + encodeURIComponent(username)); },\n getUserProfile(username) { return apiFetch('/users/profile/' + encodeURIComponent(username)); },\n updateUserRole(userId, role) {\n return apiFetch('/users/' + userId + '/role', { method: 'PUT', body: JSON.stringify({ role }) });\n },\n updateProfile(userId, username, bio, signature) {\n return apiFetch('/users/' + userId, { method: 'PUT', body: JSON.stringify({ username, bio, signature }) });\n },\n updateAvatar(userId, avatar_url) {\n return apiFetch('/users/' + userId + '/avatar', { method: 'PUT', body: JSON.stringify({ avatar_url }) });\n },\n updatePassword(userId, oldPassword, newPassword) {\n return apiFetch('/users/' + userId + '/password', { method: 'PUT', body: JSON.stringify({ oldPassword, newPassword }) });\n },\n updateEmail(userId, password, newEmail) {\n return apiFetch('/users/' + userId + '/email', { method: 'PUT', body: JSON.stringify({ password, newEmail }) });\n },\n\n // 举报\n getReports() { return apiFetch('/reports'); },\n createReport(postId, reason) {\n return apiFetch('/reports', { method: 'POST', body: JSON.stringify({ post_id: postId, reason }) });\n },\n updateReport(reportId, status, note) {\n return apiFetch('/reports/' + reportId, { method: 'PUT', body: JSON.stringify({ status, note }) });\n },\n\n // 统计 + 设置 + 友链\n getStats() { return apiFetch('/stats'); },\n getSettings() { return apiFetch('/settings'); },\n updateSettings(forum_name) {\n return apiFetch('/settings', { method:Line truncated
|
||||
{"offset": {"line": 10252, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/lib/markdown.js"],"sourcesContent":["// Markdown 渲染工具(对齐上游 marked 行为 + XSS 清理)\nimport { marked } from 'marked';\nimport sanitizeHtml from 'sanitize-html';\n\n// 允许的 markdown 元素/属性白名单(对齐上游安全策略:禁止 script/iframe/style/事件属性)\nconst SANITIZE_OPTS = {\n allowedTags: [\n 'p', 'br', 'hr', 'strong', 'em', 'b', 'i', 'u', 's', 'del', 'ins',\n 'a', 'img', 'code', 'pre', 'blockquote', 'ul', 'ol', 'li',\n 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'span', 'div',\n ],\n allowedAttributes: {\n a: ['href', 'target', 'rel', 'title'],\n img: ['src', 'alt', 'title', 'width', 'height'],\n code: ['class'],\n pre: ['class'],\n span: ['class'],\n div: ['class'],\n th: ['align', 'colspan', 'rowspan'],\n td: ['align', 'colspan', 'rowspan'],\n table: ['align', 'border', 'cellpadding', 'cellspacing'],\n },\n // URL 白名单:仅 http/https/相对路径,图片同样限制,禁止 javascript: 等\n allowedSchemes: ['http', 'https', 'mailto'],\n allowedSchemesByTag: { img: ['http', 'https'] },\n allowedSchemesAppliedToAttributes: ['href', 'src', 'cite'],\n allowProtocolRelative: false,\n // 事件属性(on*)默认被 sanitize-html 移除,无需额外配置\n disallowedTagsMode: 'discard',\n};\n\n// 渲染 markdown 为 HTML(已消毒,防存储型 XSS);失败时回退为纯文本换行\nexport function renderMarkdown(text) {\n if (!text) return '';\n try {\n const raw = marked.parse(text);\n return sanitizeHtml(raw, SANITIZE_OPTS);\n } catch {\n return sanitizeHtml(text.replace(/\\n/g, '<br>'), SANITIZE_OPTS);\n }\n}\n"],"names":["SANITIZE_OPTS","allowedTags","allowedAttributes","a","img","code","pre","span","div","th","td","table","allowedSchemes","allowedSchemesByTag","allowedSchemesAppliedToAttributes","allowProtocolRelative","disallowedTagsMode","renderMarkdown","text","raw","parse","replace"],"mappings":";;;;AAAA,yCAAyC;AACzC;AACA;;;AAEA,8DAA8D;AAC9D,MAAMA,gBAAgB;IACpBC,aAAa;QACX;QAAK;QAAM;QAAM;QAAU;QAAM;QAAK;QAAK;QAAK;QAAK;QAAO;QAC5D;QAAK;QAAO;QAAQ;QAAO;QAAc;QAAM;QAAM;QACrD;QAAM;QAAM;QAAM;QAAM;QAAM;QAAM;QAAS;QAAS;QAAS;QAAM;QAAM;QAAM;QAAQ;KAC1F;IACDC,mBAAmB;QACjBC,GAAG;YAAC;YAAQ;YAAU;YAAO;SAAQ;QACrCC,KAAK;YAAC;YAAO;YAAO;YAAS;YAAS;SAAS;QAC/CC,MAAM;YAAC;SAAQ;QACfC,KAAK;YAAC;SAAQ;QACdC,MAAM;YAAC;SAAQ;QACfC,KAAK;YAAC;SAAQ;QACdC,IAAI;YAAC;YAAS;YAAW;SAAU;QACnCC,IAAI;YAAC;YAAS;YAAW;SAAU;QACnCC,OAAO;YAAC;YAAS;YAAU;YAAe;SAAc;IAC1D;IACA,oDAAoD;IACpDC,gBAAgB;QAAC;QAAQ;QAAS;KAAS;IAC3CC,qBAAqB;QAAET,KAAK;YAAC;YAAQ;SAAQ;IAAC;IAC9CU,mCAAmC;QAAC;QAAQ;QAAO;KAAO;IAC1DC,uBAAuB;IACvB,uCAAuC;IACvCC,oBAAoB;AACtB;AAGO,SAASC,eAAeC,IAAI;IACjC,IAAI,CAACA,MAAM,OAAO;IAClB,IAAI;QACF,MAAMC,MAAM,wJAAM,CAACC,KAAK,CAACF;QACzB,OAAO,IAAA,oJAAY,EAACC,KAAKnB;IAC3B,EAAE,OAAM;QACN,OAAO,IAAA,oJAAY,EAACkB,KAAKG,OAAO,CAAC,OAAO,SAASrB;IACnD;AACF"}}]
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
module.exports = [
|
||||
"[project]/app/layout.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
// 全局布局
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>RootLayout,
|
||||
"metadata",
|
||||
()=>metadata
|
||||
]);
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js [app-rsc] (ecmascript)");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/components/CustomCssLoader.js [app-rsc] (ecmascript)");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/components/Toast.js [app-rsc] (ecmascript)");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/components/I18nInit.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
const metadata = {
|
||||
// 初始标题用默认论坛名(AppProvider 加载期轮换 Loading.,完成后覆盖为真实名)。
|
||||
// 注意:不能设 'Loading...' —— Next.js 客户端重渲染会重置 <title> 为 metadata 值,
|
||||
// 导致加载完成后标题又变回 "Loading..."。
|
||||
title: 'Forumlify',
|
||||
description: 'Forumlify - 简洁优雅的现代社区系统'
|
||||
};
|
||||
function RootLayout({ children }) {
|
||||
return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("html", {
|
||||
lang: "zh-CN",
|
||||
suppressHydrationWarning: true,
|
||||
children: [
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("head", {}, void 0, false, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 18,
|
||||
columnNumber: 7
|
||||
}, this),
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("body", {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("script", {
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: `(function(){
|
||||
try {
|
||||
var t = localStorage.getItem('forumlify-theme');
|
||||
if (!t) { t = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light'; }
|
||||
document.documentElement.setAttribute('data-theme', t);
|
||||
} catch (e) {}
|
||||
try { var n = localStorage.getItem('forumlify-forum-name'); if (n) document.title = n; } catch (e) {}
|
||||
// 加载页论坛名不再由脚本注入 DOM——由 Server Component 读 cookie 首帧输出,
|
||||
// React 状态渲染,SSR/客户端一致,无 hydration mismatch
|
||||
})();`
|
||||
}
|
||||
}, void 0, false, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 23,
|
||||
columnNumber: 9
|
||||
}, this),
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["ToastProvider"], {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["default"], {}, void 0, false, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 34,
|
||||
columnNumber: 11
|
||||
}, this),
|
||||
/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["default"], {}, void 0, false, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 35,
|
||||
columnNumber: 11
|
||||
}, this),
|
||||
children
|
||||
]
|
||||
}, void 0, true, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 33,
|
||||
columnNumber: 9
|
||||
}, this)
|
||||
]
|
||||
}, void 0, true, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 20,
|
||||
columnNumber: 7
|
||||
}, this)
|
||||
]
|
||||
}, void 0, true, {
|
||||
fileName: "[project]/app/layout.js",
|
||||
lineNumber: 17,
|
||||
columnNumber: 5
|
||||
}, this);
|
||||
}
|
||||
}),
|
||||
"[project]/app/layout.js [app-rsc] (ecmascript, Next.js Server Component)", (function(__turbopack_context__){
|
||||
|
||||
__turbopack_context__.n(__turbopack_context__.i("[project]/app/layout.js [app-rsc] (ecmascript)"));
|
||||
}),
|
||||
"[project]/components/CustomCssLoader.js [app-rsc] (client reference proxy)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/components/CustomCssLoader.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/CustomCssLoader.js", "default");
|
||||
}),
|
||||
"[project]/components/CustomCssLoader.js [app-rsc] (client reference proxy) <module evaluation>", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/components/CustomCssLoader.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/CustomCssLoader.js <module evaluation>", "default");
|
||||
}),
|
||||
"[project]/components/CustomCssLoader.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__$3c$module__evaluation$3e$__ = __turbopack_context__.i("[project]/components/CustomCssLoader.js [app-rsc] (client reference proxy) <module evaluation>");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__ = __turbopack_context__.i("[project]/components/CustomCssLoader.js [app-rsc] (client reference proxy)");
|
||||
;
|
||||
__turbopack_context__.n(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$CustomCssLoader$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__);
|
||||
}),
|
||||
"[project]/components/I18nInit.js [app-rsc] (client reference proxy)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/components/I18nInit.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/I18nInit.js", "default");
|
||||
}),
|
||||
"[project]/components/I18nInit.js [app-rsc] (client reference proxy) <module evaluation>", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"default",
|
||||
()=>__TURBOPACK__default__export__
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call the default export of [project]/components/I18nInit.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/I18nInit.js <module evaluation>", "default");
|
||||
}),
|
||||
"[project]/components/I18nInit.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__$3c$module__evaluation$3e$__ = __turbopack_context__.i("[project]/components/I18nInit.js [app-rsc] (client reference proxy) <module evaluation>");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__ = __turbopack_context__.i("[project]/components/I18nInit.js [app-rsc] (client reference proxy)");
|
||||
;
|
||||
__turbopack_context__.n(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$I18nInit$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__);
|
||||
}),
|
||||
"[project]/components/Toast.js [app-rsc] (client reference proxy)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"ToastProvider",
|
||||
()=>ToastProvider,
|
||||
"useToast",
|
||||
()=>useToast
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const ToastProvider = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/Toast.js", "ToastProvider");
|
||||
const useToast = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call useToast() from the server but useToast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/Toast.js", "useToast");
|
||||
}),
|
||||
"[project]/components/Toast.js [app-rsc] (client reference proxy) <module evaluation>", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
__turbopack_context__.s([
|
||||
"ToastProvider",
|
||||
()=>ToastProvider,
|
||||
"useToast",
|
||||
()=>useToast
|
||||
]);
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
;
|
||||
const ToastProvider = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/Toast.js <module evaluation>", "ToastProvider");
|
||||
const useToast = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() {
|
||||
throw new Error("Attempted to call useToast() from the server but useToast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
||||
}, "[project]/components/Toast.js <module evaluation>", "useToast");
|
||||
}),
|
||||
"[project]/components/Toast.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__$3c$module__evaluation$3e$__ = __turbopack_context__.i("[project]/components/Toast.js [app-rsc] (client reference proxy) <module evaluation>");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__ = __turbopack_context__.i("[project]/components/Toast.js [app-rsc] (client reference proxy)");
|
||||
;
|
||||
__turbopack_context__.n(__TURBOPACK__imported__module__$5b$project$5d2f$components$2f$Toast$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__);
|
||||
}),
|
||||
"[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-rsc] (ecmascript)").vendored['react-rsc'].ReactJsxDevRuntime;
|
||||
}),
|
||||
];
|
||||
|
||||
//# sourceMappingURL=_12_w0-2._.js.map
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/app/layout.js"],"sourcesContent":["// 全局布局\nimport './globals.css';\nimport CustomCssLoader from '@/components/CustomCssLoader';\nimport { ToastProvider } from '@/components/Toast';\nimport I18nInit from '@/components/I18nInit';\n\nexport const metadata = {\n // 初始标题用默认论坛名(AppProvider 加载期轮换 Loading.,完成后覆盖为真实名)。\n // 注意:不能设 'Loading...' —— Next.js 客户端重渲染会重置 <title> 为 metadata 值,\n // 导致加载完成后标题又变回 \"Loading...\"。\n title: 'Forumlify',\n description: 'Forumlify - 简洁优雅的现代社区系统',\n};\n\nexport default function RootLayout({ children }) {\n return (\n <html lang=\"zh-CN\" suppressHydrationWarning>\n <head>\n </head>\n <body>\n {/* 首帧初始化(主题防 FOUC + 论坛名首帧显示):\n script 放 body 首个子元素(children 前),React 官方防 FOUC 模式 */}\n <script dangerouslySetInnerHTML={{ __html: `(function(){\n try {\n var t = localStorage.getItem('forumlify-theme');\n if (!t) { t = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light'; }\n document.documentElement.setAttribute('data-theme', t);\n } catch (e) {}\n try { var n = localStorage.getItem('forumlify-forum-name'); if (n) document.title = n; } catch (e) {}\n // 加载页论坛名不再由脚本注入 DOM——由 Server Component 读 cookie 首帧输出,\n // React 状态渲染,SSR/客户端一致,无 hydration mismatch\n })();` }} />\n <ToastProvider>\n <I18nInit />\n <CustomCssLoader />\n {children}\n </ToastProvider>\n </body>\n </html>\n );\n}\n"],"names":["metadata","title","description","RootLayout","children","lang","suppressHydrationWarning","dangerouslySetInnerHTML","__html"],"mappings":"AAAA,OAAO;;;;;;;;AAEP;AACA;AACA;;;;;;AAEO,MAAMA,WAAW;IACtB,oDAAoD;IACpD,iEAAiE;IACjE,6BAA6B;IAC7BC,OAAO;IACPC,aAAa;AACf;AAEe,SAASC,WAAW,EAAEC,QAAQ,EAAE;IAC7C,qBACE,8OAAC;QAAKC,MAAK;QAAQC,wBAAwB;;0BACzC,8OAAC;;;;;0BAED,8OAAC;;kCAGC,8OAAC;wBAAOC,yBAAyB;4BAAEC,QAAQ,CAAC;;;;;;;;;aASvC,CAAC;wBAAC;;;;;;kCACP,8OAAC,oIAAa;;0CACZ,8OAAC,iIAAQ;;;;;0CACT,8OAAC,wIAAe;;;;;4BACfJ;;;;;;;;;;;;;;;;;;;AAKX"}},
|
||||
{"offset": {"line": 97, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/CustomCssLoader.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/components/CustomCssLoader.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/CustomCssLoader.js\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAA6Q,GAC1S,2CACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 111, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/CustomCssLoader.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/components/CustomCssLoader.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/CustomCssLoader.js <module evaluation>\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAAiS,GAC9T,+DACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 125, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
|
||||
{"offset": {"line": 133, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/I18nInit.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/components/I18nInit.js from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/I18nInit.js\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAAsQ,GACnS,oCACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 147, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/I18nInit.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/components/I18nInit.js <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/I18nInit.js <module evaluation>\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAA0R,GACvT,wDACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 161, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
|
||||
{"offset": {"line": 169, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Toast.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const ToastProvider = registerClientReference(\n function() { throw new Error(\"Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/Toast.js\",\n \"ToastProvider\",\n);\nexport const useToast = registerClientReference(\n function() { throw new Error(\"Attempted to call useToast() from the server but useToast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/Toast.js\",\n \"useToast\",\n);\n"],"names":["ToastProvider","Error","useToast"],"mappings":";;;;;;AAAA,uEAAuE;AACvE;;AACO,MAAMA,gBAAgB,IAAA,wQAAuB,EAChD;IAAa,MAAM,IAAIC,MAAM;AAA0O,GACvQ,iCACA;AAEG,MAAMC,WAAW,IAAA,wQAAuB,EAC3C;IAAa,MAAM,IAAID,MAAM;AAAgO,GAC7P,iCACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 188, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/components/Toast.js/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const ToastProvider = registerClientReference(\n function() { throw new Error(\"Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/Toast.js <module evaluation>\",\n \"ToastProvider\",\n);\nexport const useToast = registerClientReference(\n function() { throw new Error(\"Attempted to call useToast() from the server but useToast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/components/Toast.js <module evaluation>\",\n \"useToast\",\n);\n"],"names":["ToastProvider","Error","useToast"],"mappings":";;;;;;AAAA,uEAAuE;AACvE;;AACO,MAAMA,gBAAgB,IAAA,wQAAuB,EAChD;IAAa,MAAM,IAAIC,MAAM;AAA0O,GACvQ,qDACA;AAEG,MAAMC,WAAW,IAAA,wQAAuB,EAC3C;IAAa,MAAM,IAAID,MAAM;AAAgO,GAC7P,qDACA","ignoreList":[0]}},
|
||||
{"offset": {"line": 207, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
|
||||
{"offset": {"line": 215, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.ReactJsxDevRuntime\n"],"names":["module","exports","require","vendored","ReactJsxDevRuntime"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,kBAAkB","ignoreList":[0]}}]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = [
|
||||
"[project]/.next-internal/server/app/page/actions.js [app-rsc] (server actions loader, ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
}),
|
||||
];
|
||||
|
||||
//# sourceMappingURL=_next-internal_server_app_page_actions_0hhsz1j.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
|
||||
}
|
||||
@@ -0,0 +1,358 @@
|
||||
module.exports = [
|
||||
"[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
exports._ = _interop_require_default;
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/builtin/error-styles.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
WarningIcon: null,
|
||||
errorStyles: null,
|
||||
errorThemeCss: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
WarningIcon: function() {
|
||||
return WarningIcon;
|
||||
},
|
||||
errorStyles: function() {
|
||||
return errorStyles;
|
||||
},
|
||||
errorThemeCss: function() {
|
||||
return errorThemeCss;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)");
|
||||
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)");
|
||||
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"));
|
||||
const errorStyles = {
|
||||
container: {
|
||||
fontFamily: 'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',
|
||||
height: '100vh',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
},
|
||||
card: {
|
||||
marginTop: '-32px',
|
||||
maxWidth: '325px',
|
||||
padding: '32px 28px',
|
||||
textAlign: 'left'
|
||||
},
|
||||
icon: {
|
||||
marginBottom: '24px'
|
||||
},
|
||||
title: {
|
||||
fontSize: '24px',
|
||||
fontWeight: 500,
|
||||
letterSpacing: '-0.02em',
|
||||
lineHeight: '32px',
|
||||
margin: '0 0 12px 0',
|
||||
color: 'var(--next-error-title)'
|
||||
},
|
||||
message: {
|
||||
fontSize: '14px',
|
||||
fontWeight: 400,
|
||||
lineHeight: '21px',
|
||||
margin: '0 0 20px 0',
|
||||
color: 'var(--next-error-message)'
|
||||
},
|
||||
form: {
|
||||
margin: 0
|
||||
},
|
||||
buttonGroup: {
|
||||
display: 'flex',
|
||||
gap: '8px',
|
||||
alignItems: 'center'
|
||||
},
|
||||
button: {
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: '32px',
|
||||
padding: '0 12px',
|
||||
fontSize: '14px',
|
||||
fontWeight: 500,
|
||||
lineHeight: '20px',
|
||||
borderRadius: '6px',
|
||||
cursor: 'pointer',
|
||||
color: 'var(--next-error-btn-text)',
|
||||
background: 'var(--next-error-btn-bg)',
|
||||
border: 'var(--next-error-btn-border)'
|
||||
},
|
||||
buttonSecondary: {
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: '32px',
|
||||
padding: '0 12px',
|
||||
fontSize: '14px',
|
||||
fontWeight: 500,
|
||||
lineHeight: '20px',
|
||||
borderRadius: '6px',
|
||||
cursor: 'pointer',
|
||||
color: 'var(--next-error-btn-secondary-text)',
|
||||
background: 'var(--next-error-btn-secondary-bg)',
|
||||
border: 'var(--next-error-btn-secondary-border)'
|
||||
},
|
||||
digestFooter: {
|
||||
position: 'fixed',
|
||||
bottom: '32px',
|
||||
left: '0',
|
||||
right: '0',
|
||||
textAlign: 'center',
|
||||
fontFamily: 'ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace',
|
||||
fontSize: '12px',
|
||||
lineHeight: '18px',
|
||||
fontWeight: 400,
|
||||
margin: '0',
|
||||
color: 'var(--next-error-digest)'
|
||||
}
|
||||
};
|
||||
const errorThemeCss = `
|
||||
:root {
|
||||
--next-error-bg: #fff;
|
||||
--next-error-text: #171717;
|
||||
--next-error-title: #171717;
|
||||
--next-error-message: #171717;
|
||||
--next-error-digest: #666666;
|
||||
--next-error-btn-text: #fff;
|
||||
--next-error-btn-bg: #171717;
|
||||
--next-error-btn-border: none;
|
||||
--next-error-btn-secondary-text: #171717;
|
||||
--next-error-btn-secondary-bg: transparent;
|
||||
--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--next-error-bg: #0a0a0a;
|
||||
--next-error-text: #ededed;
|
||||
--next-error-title: #ededed;
|
||||
--next-error-message: #ededed;
|
||||
--next-error-digest: #a0a0a0;
|
||||
--next-error-btn-text: #0a0a0a;
|
||||
--next-error-btn-bg: #ededed;
|
||||
--next-error-btn-border: none;
|
||||
--next-error-btn-secondary-text: #ededed;
|
||||
--next-error-btn-secondary-bg: transparent;
|
||||
--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);
|
||||
}
|
||||
}
|
||||
body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }
|
||||
`.replace(/\n\s*/g, '');
|
||||
function WarningIcon() {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", {
|
||||
width: "32",
|
||||
height: "32",
|
||||
viewBox: "-0.2 -1.5 32 32",
|
||||
fill: "none",
|
||||
style: errorStyles.icon,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
|
||||
d: "M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z",
|
||||
fill: "var(--next-error-title)"
|
||||
})
|
||||
});
|
||||
}
|
||||
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;
|
||||
}
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, // supplied custom global error signatures.
|
||||
"default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _default;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)");
|
||||
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)");
|
||||
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"));
|
||||
const _handleisrerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/handle-isr-error.js [app-ssr] (ecmascript)");
|
||||
const _errorstyles = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/builtin/error-styles.js [app-ssr] (ecmascript)");
|
||||
function DefaultGlobalError({ error }) {
|
||||
const digest = error?.digest;
|
||||
const isServerError = !!digest;
|
||||
const message = isServerError ? 'A server error occurred. Reload to try again.' : 'Reload to try again, or go back.';
|
||||
(0, _handleisrerror.handleISRError)({
|
||||
error
|
||||
});
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("html", {
|
||||
id: "__next_error__",
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("head", {
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: _errorstyles.errorThemeCss
|
||||
}
|
||||
})
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsxs)("body", {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
style: _errorstyles.errorStyles.container,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
style: _errorstyles.errorStyles.card,
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_errorstyles.WarningIcon, {}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("h1", {
|
||||
style: _errorstyles.errorStyles.title,
|
||||
children: "This page couldn’t load"
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
|
||||
style: _errorstyles.errorStyles.message,
|
||||
children: message
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
style: _errorstyles.errorStyles.buttonGroup,
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("form", {
|
||||
style: _errorstyles.errorStyles.form,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
||||
type: "submit",
|
||||
style: _errorstyles.errorStyles.button,
|
||||
children: "Reload"
|
||||
})
|
||||
}),
|
||||
!isServerError && /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
||||
type: "button",
|
||||
style: _errorstyles.errorStyles.buttonSecondary,
|
||||
onClick: ()=>{
|
||||
if (window.history.length > 1) {
|
||||
window.history.back();
|
||||
} else {
|
||||
window.location.href = '/';
|
||||
}
|
||||
},
|
||||
children: "Back"
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
}),
|
||||
digest && /*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
|
||||
style: _errorstyles.errorStyles.digestFooter,
|
||||
children: [
|
||||
"ERROR ",
|
||||
digest
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
const _default = DefaultGlobalError;
|
||||
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;
|
||||
}
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/handle-isr-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "handleISRError", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return handleISRError;
|
||||
}
|
||||
});
|
||||
const _serverasyncstorage = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/server-async-storage.js [app-ssr] (ecmascript)");
|
||||
function handleISRError({ error }) {
|
||||
if (_serverasyncstorage.workAsyncStorage) {
|
||||
const store = _serverasyncstorage.workAsyncStorage.getStore();
|
||||
if (store?.isStaticGeneration) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/server-async-storage.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
// Client-safe access to the server-only async-storage singletons. On the
|
||||
// server these re-export the real storages; in the browser bundle this module
|
||||
// is aliased to `./server-async-storage.browser` (see
|
||||
// scripts/generate-browser-variant-aliases.mjs), which exports `undefined`
|
||||
// stubs so the AsyncLocalStorage modules are never bundled into the client.
|
||||
// Consumers must guard usage so the stubs are not dereferenced in the browser.
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
actionAsyncStorage: null,
|
||||
workAsyncStorage: null,
|
||||
workUnitAsyncStorage: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
actionAsyncStorage: function() {
|
||||
return _actionasyncstorageexternal.actionAsyncStorage;
|
||||
},
|
||||
workAsyncStorage: function() {
|
||||
return _workasyncstorageexternal.workAsyncStorage;
|
||||
},
|
||||
workUnitAsyncStorage: function() {
|
||||
return _workunitasyncstorageexternal.workUnitAsyncStorage;
|
||||
}
|
||||
});
|
||||
const _actionasyncstorageexternal = __turbopack_context__.r("[externals]/next/dist/server/app-render/action-async-storage.external.js [external] (next/dist/server/app-render/action-async-storage.external.js, cjs)");
|
||||
const _workasyncstorageexternal = __turbopack_context__.r("[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)");
|
||||
const _workunitasyncstorageexternal = __turbopack_context__.r("[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external] (next/dist/server/app-render/work-unit-async-storage.external.js, cjs)");
|
||||
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=node_modules_01xbj_9._.js.map
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/@swc/helpers/cjs/_interop_require_default.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nexports._ = _interop_require_default;\n"],"names":["_interop_require_default","obj","__esModule","default","exports","_"],"mappings":"AAEA,SAASA,yBAAyBC,GAAG;IACjC,OAAOA,OAAOA,IAAIC,UAAU,GAAGD,MAAM;QAAEE,SAASF;IAAI;AACxD;AACAG,QAAQC,CAAC,GAAGL","ignoreList":[0]}},
|
||||
{"offset": {"line": 14, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/builtin/error-styles.tsx"],"sourcesContent":["import React from 'react'\n\nexport const errorStyles = {\n container: {\n fontFamily:\n 'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n height: '100vh',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n card: {\n marginTop: '-32px',\n maxWidth: '325px',\n padding: '32px 28px',\n textAlign: 'left' as const,\n },\n icon: {\n marginBottom: '24px',\n },\n title: {\n fontSize: '24px',\n fontWeight: 500,\n letterSpacing: '-0.02em',\n lineHeight: '32px',\n margin: '0 0 12px 0',\n color: 'var(--next-error-title)',\n },\n message: {\n fontSize: '14px',\n fontWeight: 400,\n lineHeight: '21px',\n margin: '0 0 20px 0',\n color: 'var(--next-error-message)',\n },\n form: {\n margin: 0,\n },\n buttonGroup: {\n display: 'flex',\n gap: '8px',\n alignItems: 'center',\n },\n button: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '32px',\n padding: '0 12px',\n fontSize: '14px',\n fontWeight: 500,\n lineHeight: '20px',\n borderRadius: '6px',\n cursor: 'pointer',\n color: 'var(--next-error-btn-text)',\n background: 'var(--next-error-btn-bg)',\n border: 'var(--next-error-btn-border)',\n },\n buttonSecondary: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '32px',\n padding: '0 12px',\n fontSize: '14px',\n fontWeight: 500,\n lineHeight: '20px',\n borderRadius: '6px',\n cursor: 'pointer',\n color: 'var(--next-error-btn-secondary-text)',\n background: 'var(--next-error-btn-secondary-bg)',\n border: 'var(--next-error-btn-secondary-border)',\n },\n digestFooter: {\n position: 'fixed' as const,\n bottom: '32px',\n left: '0',\n right: '0',\n textAlign: 'center' as const,\n fontFamily:\n 'ui-monospace,SFMono-Regular,\"SF Mono\",Menlo,Consolas,monospace',\n fontSize: '12px',\n lineHeight: '18px',\n fontWeight: 400,\n margin: '0',\n color: 'var(--next-error-digest)',\n },\n} as const\n\nexport const errorThemeCss = `\n:root {\n --next-error-bg: #fff;\n --next-error-text: #171717;\n --next-error-title: #171717;\n --next-error-message: #171717;\n --next-error-digest: #666666;\n --next-error-btn-text: #fff;\n --next-error-btn-bg: #171717;\n --next-error-btn-border: none;\n --next-error-btn-secondary-text: #171717;\n --next-error-btn-secondary-bg: transparent;\n --next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);\n}\n@media (prefers-color-scheme: dark) {\n :root {\n --next-error-bg: #0a0a0a;\n --next-error-text: #ededed;\n --next-error-title: #ededed;\n --next-error-message: #ededed;\n --next-error-digest: #a0a0a0;\n --next-error-btn-text: #0a0a0a;\n --next-error-btn-bg: #ededed;\n --next-error-btn-border: none;\n --next-error-btn-secondary-text: #ededed;\n --next-error-btn-secondary-bg: transparent;\n --next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);\n }\n}\nbody { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\n`.replace(/\\n\\s*/g, '')\n\nexport function WarningIcon() {\n return (\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"-0.2 -1.5 32 32\"\n fill=\"none\"\n style={errorStyles.icon}\n >\n <path\n d=\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\"\n fill=\"var(--next-error-title)\"\n />\n </svg>\n )\n}\n"],"names":["WarningIcon","errorStyles","errorThemeCss","container","fontFamily","height","display","alignItems","justifyContent","card","marginTop","maxWidth","padding","textAlign","icon","marginBottom","title","fontSize","fontWeight","letterSpacing","lineHeight","margin","color","message","form","buttonGroup","gap","button","borderRadius","cursor","background","border","buttonSecondary","digestFooter","position","bottom","left","right","replace","svg","width","viewBox","fill","style","path","d"],"mappings":";;;;;;;;;;;;;;;IAyHgBA,WAAW,EAAA;eAAXA;;IAvHHC,WAAW,EAAA;eAAXA;;IAuFAC,aAAa,EAAA;eAAbA;;;;;gEAzFK;AAEX,MAAMD,cAAc;IACzBE,WAAW;QACTC,YACE;QACFC,QAAQ;QACRC,SAAS;QACTC,YAAY;QACZC,gBAAgB;IAClB;IACAC,MAAM;QACJC,WAAW;QACXC,UAAU;QACVC,SAAS;QACTLine truncated
|
||||
{"offset": {"line": 181, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/builtin/global-error.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\nimport { handleISRError } from '../handle-isr-error'\nimport { errorStyles, errorThemeCss, WarningIcon } from './error-styles'\n\nexport type GlobalErrorComponent = React.ComponentType<{\n error: any\n reset: () => void\n retry: () => void\n}>\n\nfunction DefaultGlobalError({ error }: { error: any }) {\n const digest: string | undefined = error?.digest\n const isServerError = !!digest\n\n const message = isServerError\n ? 'A server error occurred. Reload to try again.'\n : 'Reload to try again, or go back.'\n\n handleISRError({ error })\n\n return (\n <html id=\"__next_error__\">\n <head>\n <style dangerouslySetInnerHTML={{ __html: errorThemeCss }} />\n </head>\n <body>\n <div style={errorStyles.container}>\n <div style={errorStyles.card}>\n <WarningIcon />\n <h1 style={errorStyles.title}>This page couldn’t load</h1>\n <p style={errorStyles.message}>{message}</p>\n <div style={errorStyles.buttonGroup}>\n <form style={errorStyles.form}>\n <button type=\"submit\" style={errorStyles.button}>\n Reload\n </button>\n </form>\n {!isServerError && (\n <button\n type=\"button\"\n style={errorStyles.buttonSecondary}\n onClick={() => {\n if (window.history.length > 1) {\n window.history.back()\n } else {\n window.location.href = '/'\n }\n }}\n >\n Back\n </button>\n )}\n </div>\n </div>\n </div>\n {digest && <p style={errorStyles.digestFooter}>ERROR {digest}</p>}\n </body>\n </html>\n )\n}\n\n// Exported so that the import signature in the loaders can be identical to user\n// supplied custom global error signatures.\nexport default DefaultGlobalError\n"],"names":["DefaultGlobalError","error","digest","isServerError","message","handleISRError","html","id","head","style","dangerouslySetInnerHTML","__html","errorThemeCss","body","div","errorStyles","container","card","WarningIcon","h1","title","p","buttonGroup","form","button","type","buttonSecondary","onClick","window","history","length","back","location","href","digestFooter"],"mappings":";;;+BAgEA,AADA,2CAC2C,qCADqC;AAEhF,WAAA;;;eAAA;;;;;gEA/DkB;gCACa;6BACyB;AAQxD,SAASA,mBAAmB,EAAEC,KAAK,EAAkB;IACnD,MAAMC,SAA6BD,OAAOC;IAC1C,MAAMC,gBAAgB,CAAC,CAACD;IAExB,MAAME,UAAUD,gBACZ,kDACA;IAEJE,CAAAA,GAAAA,gBAAAA,cAAc,EAAC;QAAEJ;IAAM;IAEvB,OAAA,WAAA,GACE,CAAA,GAAA,YAAA,IAAA,EAACK,QAAAA;QAAKC,IAAG;;0BACP,CAAA,GAAA,YAAA,GAAA,EAACC,QAAAA;0BACC,WAAA,GAAA,CAAA,GAAA,YAAA,GAAA,EAACC,SAAAA;oBAAMC,yBAAyB;wBAAEC,QAAQC,aAAAA,aAAa;oBAAC;;;0BAE1D,CAAA,GAAA,YAAA,IAAA,EAACC,QAAAA;;kCACC,CAAA,GAAA,YAAA,GAAA,EAACC,OAAAA;wBAAIL,OAAOM,aAAAA,WAAW,CAACC,SAAS;kCAC/B,WAAA,GAAA,CAAA,GAAA,YAAA,IAAA,EAACF,OAAAA;4BAAIL,OAAOM,aAAAA,WAAW,CAACE,IAAI;;8CAC1B,CAAA,GAAA,YAAA,GAAA,EAACC,aAAAA,WAAW,EAAA,CAAA;8CACZ,CAAA,GAAA,YAAA,GAAA,EAACC,MAAAA;oCAAGV,OAAOM,aAAAA,WAAW,CAACK,KAAK;8CAAE;;8CAC9B,CAAA,GAAA,YAAA,GAAA,EAACC,KAAAA;oCAAEZ,OAAOM,aAAAA,WAAW,CAACX,OAAO;8CAAGA;;8CAChC,CAAA,GAAA,YAAA,IAAA,EAACU,OAAAA;oCAAIL,OAAOM,aAAAA,WAAW,CAACO,WAAW;;sDACjC,CAAA,GAAA,YAAA,GAAA,EAACC,QAAAA;4CAAKd,OAAOM,aAAAA,WAAW,CAACQ,IAAI;sDAC3B,WAAA,GAAA,CAAA,GAAA,YAAA,GAAA,EAACC,UAAAA;gDAAOC,MAAK;gDAAShB,OAAOM,aAAAA,WAAW,CAACS,MAAM;0DAAE;;;wCAIlD,CAACrB,iBAAAA,WAAAA,GACA,CAAA,GAAA,YAAA,GAAA,EAACqB,UAAAA;4CACCC,MAAK;4CACLhB,OAAOM,aAAAA,WAAW,CAACW,eAAe;4CAClCC,SAAS;gDACP,IAAIC,OAAOC,OAAO,CAACC,MAAM,GAAG,GAAG;oDAC7BF,OAAOC,OAAO,CAACE,IAAI;gDACrB,OAAO;oDACLH,OAAOI,QAAQ,CAACC,IAAI,GAAG;gDACzB;4CACF;sDACD;;;;;;;oBAOR/B,UAAAA,WAAAA,GAAU,CAAA,GAAA,YAAA,IAAA,EAACmB,KAAAA;wBAAEZ,OAAOM,aAAAA,WAAW,CAACmB,YAAY;;4BAAE;4BAAOhC;;;;;;;AAI9D;MAIA,WAAeF","ignoreList":[0]}},
|
||||
{"offset": {"line": 281, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/handle-isr-error.tsx"],"sourcesContent":["import { workAsyncStorage } from './server-async-storage'\n\n// if we are revalidating we want to re-throw the error so the\n// function crashes so we can maintain our previous cache\n// instead of caching the error page\nexport function handleISRError({ error }: { error: any }) {\n if (workAsyncStorage) {\n const store = workAsyncStorage.getStore()\n if (store?.isStaticGeneration) {\n if (error) {\n console.error(error)\n }\n throw error\n }\n }\n}\n"],"names":["handleISRError","error","workAsyncStorage","store","getStore","isStaticGeneration","console"],"mappings":";;;+BAKgBA,kBAAAA;;;eAAAA;;;oCALiB;AAK1B,SAASA,eAAe,EAAEC,KAAK,EAAkB;IACtD,IAAIC,oBAAAA,gBAAgB,EAAE;QACpB,MAAMC,QAAQD,oBAAAA,gBAAgB,CAACE,QAAQ;QACvC,IAAID,OAAOE,oBAAoB;YAC7B,IAAIJ,OAAO;gBACTK,QAAQL,KAAK,CAACA;YAChB;YACA,MAAMA;QACR;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 313, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/server-async-storage.ts"],"sourcesContent":["// Client-safe access to the server-only async-storage singletons. On the\n// server these re-export the real storages; in the browser bundle this module\n// is aliased to `./server-async-storage.browser` (see\n// scripts/generate-browser-variant-aliases.mjs), which exports `undefined`\n// stubs so the AsyncLocalStorage modules are never bundled into the client.\n// Consumers must guard usage so the stubs are not dereferenced in the browser.\nexport { actionAsyncStorage } from '../../server/app-render/action-async-storage.external'\nexport { workAsyncStorage } from '../../server/app-render/work-async-storage.external'\nexport { workUnitAsyncStorage } from '../../server/app-render/work-unit-async-storage.external'\n"],"names":["actionAsyncStorage","workAsyncStorage","workUnitAsyncStorage"],"mappings":"AAAA,yEAAyE;AACzE,8EAA8E;AAC9E,sDAAsD;AACtD,2EAA2E;AAC3E,4EAA4E;AAC5E,+EAA+E;;;;;;;;;;;;;;;;IACtEA,kBAAkB,EAAA;eAAlBA,4BAAAA,kBAAkB;;IAClBC,gBAAgB,EAAA;eAAhBA,0BAAAA,gBAAgB;;IAChBC,oBAAoB,EAAA;eAApBA,8BAAAA,oBAAoB;;;4CAFM;0CACF;8CACI","ignoreList":[0]}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) return obj;\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") return { default: obj };\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) return cache.get(obj);\n\n var newObj = { __proto__: null };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);\n else newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n\n if (cache) cache.set(obj, newObj);\n\n return newObj;\n}\nexports._ = _interop_require_wildcard;\n"],"names":["_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_interop_require_wildcard","obj","__esModule","default","cache","has","get","newObj","__proto__","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","exports","_"],"mappings":"AAEA,SAASA,yBAAyBC,WAAW;IACzC,IAAI,OAAOC,YAAY,YAAY,OAAO;IAE1C,IAAIC,oBAAoB,IAAID;IAC5B,IAAIE,mBAAmB,IAAIF;IAE3B,OAAO,CAACF,2BAA2B,SAASC,WAAW;QACnD,OAAOA,cAAcG,mBAAmBD;IAC5C,CAAC,EAAEF;AACP;AACA,SAASI,0BAA0BC,GAAG,EAAEL,WAAW;IAC/C,IAAI,CAACA,eAAeK,OAAOA,IAAIC,UAAU,EAAE,OAAOD;IAClD,IAAIA,QAAQ,QAAQ,OAAOA,QAAQ,YAAY,OAAOA,QAAQ,YAAY,OAAO;QAAEE,SAASF;IAAI;IAEhG,IAAIG,QAAQT,yBAAyBC;IAErC,IAAIQ,SAASA,MAAMC,GAAG,CAACJ,MAAM,OAAOG,MAAME,GAAG,CAACL;IAE9C,IAAIM,SAAS;QAAEC,WAAW;IAAK;IAC/B,IAAIC,wBAAwBC,OAAOC,cAAc,IAAID,OAAOE,wBAAwB;IAEpF,IAAK,IAAIC,OAAOZ,IAAK;QACjB,IAAIY,QAAQ,aAAaH,OAAOI,SAAS,CAACC,cAAc,CAACC,IAAI,CAACf,KAAKY,MAAM;YACrE,IAAII,OAAOR,wBAAwBC,OAAOE,wBAAwB,CAACX,KAAKY,OAAO;YAC/E,IAAII,QAAQ,CAACA,KAAKX,GAAG,IAAIW,KAAKC,GAAG,GAAGR,OAAOC,cAAc,CAACJ,QAAQM,KAAKI;iBAClEV,MAAM,CAACM,IAAI,GAAGZ,GAAG,CAACY,IAAI;QAC/B;IACJ;IAEAN,OAAOJ,OAAO,GAAGF;IAEjB,IAAIG,OAAOA,MAAMc,GAAG,CAACjB,KAAKM;IAE1B,OAAOA;AACX;AACAY,QAAQC,CAAC,GAAGpB","ignoreList":[0]}},
|
||||
{"offset": {"line": 39, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n RequestCookies: () => RequestCookies,\n ResponseCookies: () => ResponseCookies,\n parseCookie: () => parseCookie,\n parseSetCookie: () => parseSetCookie,\n stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n var _a;\n const attrs = [\n \"path\" in c && c.path && `Path=${c.path}`,\n \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n \"domain\" in c && c.domain && `Domain=${c.domain}`,\n \"secure\" in c && c.secure && \"Secure\",\n \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n \"partitioned\" in c && c.partitioned && \"Partitioned\",\n \"priority\" in c && c.priority && `Priority=${c.priority}`\n ].filter(Boolean);\n const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n const map = /* @__PURE__ */ new Map();\n for (const pair of cookie.split(/; */)) {\n if (!pair)\n continue;\n const splitAt = pair.indexOf(\"=\");\n if (splitAt === -1) {\n map.set(pair, \"true\");\n continue;\n }\n const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n try {\n map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n } catch {\n }\n }\n return map;\n}\nfunction parseSetCookie(setCookie) {\n if (!setCookie) {\n return void 0;\n }\n const [[name, value], ...attributes] = parseCookie(setCookie);\n const {\n domain,\n expires,\n httponly,\n maxage,\n path,\n samesite,\n secure,\n partitioned,\n priority\n } = Object.fromEntries(\n attributes.map(([key, value2]) => [\n key.toLowerCase().replace(/-/g, \"\"),\n value2\n ])\n );\n const cookie = {\n name,\n value: decodeURIComponent(value),\n domain,\n ...expires && { expires: new Date(expires) },\n ...httponly && { httpOnly: true },\n ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n path,\n ...samesite && { sameSite: parseSameSite(samesite) },\n ...secure && { secure: true },\n ...priority && { priority: parsePriority(priority) },\n ...partitioned && { partitioned: true }\n };\n return compact(cookie);\n}\nfunction compact(t) {\n const newT = {};\n for (const key in t) {\n if (t[key]) {\n newT[key] = t[key];\n }\n }\n return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n string = string.toLowerCase();\n return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n string = string.toLowerCase();\n return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n if (!cookiesString)\n return [];\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n }\n while (pos < cookiesString.length) {\n start = pos;\n cookiesSeparatorFound = false;\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos);\n if (ch === \",\") {\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n Line truncated
|
||||
{"offset": {"line": 408, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/fresh/index.js"],"sourcesContent":["(()=>{\"use strict\";var e={928:e=>{\n/*!\n * fresh\n * Copyright(c) 2012 TJ Holowaychuk\n * Copyright(c) 2016-2017 Douglas Christopher Wilson\n * MIT Licensed\n */\nvar r=/(?:^|,)\\s*?no-cache\\s*?(?:,|$)/;e.exports=fresh;function fresh(e,a){var t=e[\"if-modified-since\"];var s=e[\"if-none-match\"];if(!t&&!s){return false}var i=e[\"cache-control\"];if(i&&r.test(i)){return false}if(s&&s!==\"*\"){var f=a[\"etag\"];if(!f){return false}var n=true;var u=parseTokenList(s);for(var _=0;_<u.length;_++){var o=u[_];if(o===f||o===\"W/\"+f||\"W/\"+o===f){n=false;break}}if(n){return false}}if(t){var p=a[\"last-modified\"];var v=!p||!(parseHttpDate(p)<=parseHttpDate(t));if(v){return false}}return true}function parseHttpDate(e){var r=e&&Date.parse(e);return typeof r===\"number\"?r:NaN}function parseTokenList(e){var r=0;var a=[];var t=0;for(var s=0,i=e.length;s<i;s++){switch(e.charCodeAt(s)){case 32:if(t===r){t=r=s+1}break;case 44:a.push(e.substring(t,r));t=r=s+1;break;default:r=s+1;break}}a.push(e.substring(t,r));return a}}};var r={};function __nccwpck_require__(a){var t=r[a];if(t!==undefined){return t.exports}var s=r[a]={exports:{}};var i=true;try{e[a](s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete r[a]}return s.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var a=__nccwpck_require__(928);module.exports=a})();"],"names":["e","r","exports","fresh","a","t","s","i","test","f","n","u","parseTokenList","_","length","o","p","v","parseHttpDate","Date","parse","NaN","charCodeAt","push","substring","__nccwpck_require__","undefined","ab","module"],"mappings":"AAAA,CAAC;IAAK;IAAa,IAAIA,IAAE;QAAC,KAAIA,CAAAA;YAC9B;;;;;CAKC,GACD,IAAIC,IAAE;YAAiCD,EAAEE,OAAO,GAACC;YAAM,SAASA,MAAMH,CAAC,EAACI,CAAC;gBAAE,IAAIC,IAAEL,CAAC,CAAC,oBAAoB;gBAAC,IAAIM,IAAEN,CAAC,CAAC,gBAAgB;gBAAC,IAAG,CAACK,KAAG,CAACC,GAAE;oBAAC,OAAO;gBAAK;gBAAC,IAAIC,IAAEP,CAAC,CAAC,gBAAgB;gBAAC,IAAGO,KAAGN,EAAEO,IAAI,CAACD,IAAG;oBAAC,OAAO;gBAAK;gBAAC,IAAGD,KAAGA,MAAI,KAAI;oBAAC,IAAIG,IAAEL,CAAC,CAAC,OAAO;oBAAC,IAAG,CAACK,GAAE;wBAAC,OAAO;oBAAK;oBAAC,IAAIC,IAAE;oBAAK,IAAIC,IAAEC,eAAeN;oBAAG,IAAI,IAAIO,IAAE,GAAEA,IAAEF,EAAEG,MAAM,EAACD,IAAI;wBAAC,IAAIE,IAAEJ,CAAC,CAACE,EAAE;wBAAC,IAAGE,MAAIN,KAAGM,MAAI,OAAKN,KAAG,OAAKM,MAAIN,GAAE;4BAACC,IAAE;4BAAM;wBAAK;oBAAC;oBAAC,IAAGA,GAAE;wBAAC,OAAO;oBAAK;gBAAC;gBAAC,IAAGL,GAAE;oBAAC,IAAIW,IAAEZ,CAAC,CAAC,gBAAgB;oBAAC,IAAIa,IAAE,CAACD,KAAG,CAAC,CAACE,cAAcF,MAAIE,cAAcb,EAAE;oBAAE,IAAGY,GAAE;wBAAC,OAAO;oBAAK;gBAAC;gBAAC,OAAO;YAAI;YAAC,SAASC,cAAclB,CAAC;gBAAE,IAAIC,IAAED,KAAGmB,KAAKC,KAAK,CAACpB;gBAAG,OAAO,OAAOC,MAAI,WAASA,IAAEoB;YAAG;YAAC,SAAST,eAAeZ,CAAC;gBAAE,IAAIC,IAAE;gBAAE,IAAIG,IAAE,EAAE;gBAAC,IAAIC,IAAE;gBAAE,IAAI,IAAIC,IAAE,GAAEC,IAAEP,EAAEc,MAAM,EAACR,IAAEC,GAAED,IAAI;oBAAC,OAAON,EAAEsB,UAAU,CAAChB;wBAAI,KAAK;4BAAG,IAAGD,MAAIJ,GAAE;gCAACI,IAAEJ,IAAEK,IAAE;4BAAC;4BAAC;wBAAM,KAAK;4BAAGF,EAAEmB,IAAI,CAACvB,EAAEwB,SAAS,CAACnB,GAAEJ;4BAAII,IAAEJ,IAAEK,IAAE;4BAAE;wBAAM;4BAAQL,IAAEK,IAAE;4BAAE;oBAAK;gBAAC;gBAACF,EAAEmB,IAAI,CAACvB,EAAEwB,SAAS,CAACnB,GAAEJ;gBAAI,OAAOG;YAAC;QAAC;IAAC;IAAE,IAAIH,IAAE,CAAC;IAAE,SAASwB,oBAAoBrB,CAAC;QAAE,IAAIC,IAAEJ,CAAC,CAACG,EAAE;QAAC,IAAGC,MAAIqB,WAAU;YAAC,OAAOrB,EAAEH,OAAO;QAAA;QAAC,IAAII,IAAEL,CAAC,CAACG,EAAE,GAAC;YAACF,SAAQ,CAAC;QAAC;QAAE,IAAIK,IAAE;QAAK,IAAG;YAACP,CAAC,CAACI,EAAE,CAACE,GAAEA,EAAEJ,OAAO,EAACuB;YAAqBlB,IAAE;QAAK,SAAQ;YAAC,IAAGA,GAAE,OAAON,CAAC,CAACG,EAAE;QAAA;QAAC,OAAOE,EAAEJ,OAAO;IAAA;IAAC,IAAG,OAAOuB,wBAAsB,aAAYA,oBAAoBE,EAAE,GAAC,kFAAU;IAAI,IAAIvB,IAAEqB,oBAAoB;IAAKG,OAAO1B,OAAO,GAACE;AAAC,CAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 511, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/output/log.ts"],"sourcesContent":["import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'\nimport { LRUCache } from '../../server/lib/lru-cache'\n\nexport const prefixes = {\n wait: white(bold('○')),\n error: red(bold('⨯')),\n warn: yellow(bold('⚠')),\n ready: '▲', // no color\n info: white(bold(' ')),\n event: green(bold('✓')),\n trace: magenta(bold('»')),\n} as const\n\nconst LOGGING_METHOD = {\n log: 'log',\n warn: 'warn',\n error: 'error',\n} as const\n\nfunction prefixedLog(prefixType: keyof typeof prefixes, ...message: any[]) {\n if ((message[0] === '' || message[0] === undefined) && message.length === 1) {\n message.shift()\n }\n\n const consoleMethod: keyof typeof LOGGING_METHOD =\n prefixType in LOGGING_METHOD\n ? LOGGING_METHOD[prefixType as keyof typeof LOGGING_METHOD]\n : 'log'\n\n const prefix = prefixes[prefixType]\n // If there's no message, don't print the prefix but a new line\n if (message.length === 0) {\n console[consoleMethod]('')\n } else {\n // Ensure if there's ANSI escape codes it's concatenated into one string.\n // Chrome DevTool can only handle color if it's in one string.\n if (message.length === 1 && typeof message[0] === 'string') {\n console[consoleMethod](prefix + ' ' + message[0])\n } else {\n console[consoleMethod](prefix, ...message)\n }\n }\n}\n\nexport function bootstrap(message: string) {\n console.log(message)\n}\n\nexport function wait(...message: any[]) {\n prefixedLog('wait', ...message)\n}\n\nexport function error(...message: any[]) {\n prefixedLog('error', ...message)\n}\n\nexport function warn(...message: any[]) {\n prefixedLog('warn', ...message)\n}\n\nexport function ready(...message: any[]) {\n prefixedLog('ready', ...message)\n}\n\nexport function info(...message: any[]) {\n prefixedLog('info', ...message)\n}\n\nexport function event(...message: any[]) {\n prefixedLog('event', ...message)\n}\n\nexport function trace(...message: any[]) {\n prefixedLog('trace', ...message)\n}\n\nconst warnOnceCache = new LRUCache<string>(10_000, (value) => value.length)\nexport function warnOnce(...message: any[]) {\n const key = message.join(' ')\n if (!warnOnceCache.has(key)) {\n warnOnceCache.set(key, key)\n warn(...message)\n }\n}\n\nconst errorOnceCache = new LRUCache<string>(10_000, (value) => value.length)\nexport function errorOnce(...message: any[]) {\n const key = message.join(' ')\n if (!errorOnceCache.has(key)) {\n errorOnceCache.set(key, key)\n error(...message)\n }\n}\n"],"names":["bold","green","magenta","red","yellow","white","LRUCache","prefixes","wait","error","warn","ready","info","event","trace","LOGGING_METHOD","log","prefixedLog","prefixType","message","undefined","length","shift","consoleMethod","prefix","console","bootstrap","warnOnceCache","value","warnOnce","key","join","has","set","errorOnceCache","errorOnce"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAEC,GAAG,EAAEC,MAAM,EAAEC,KAAK,QAAQ,uBAAsB;AAC/E,SAASC,QAAQ,QAAQ,6BAA4B;;;AAE9C,MAAMC,WAAW;IACtBC,UAAMH,0JAAAA,MAAML,yJAAAA,EAAK;IACjBS,WAAON,wJAAAA,MAAIH,yJAAAA,EAAK;IAChBU,UAAMN,2JAAAA,MAAOJ,yJAAAA,EAAK;IAClBW,OAAO;IACPC,UAAMP,0JAAAA,MAAML,yJAAAA,EAAK;IACjBa,WAAOZ,0JAAAA,MAAMD,yJAAAA,EAAK;IAClBc,WAAOZ,4JAAAA,MAAQF,yJAAAA,EAAK;AACtB,EAAU;AAEV,MAAMe,iBAAiB;IACrBC,KAAK;IACLN,MAAM;IACND,OAAO;AACT;AAEA,SAASQ,YAAYC,UAAiC,EAAE,GAAGC,OAAc;IACvE,IAAKA,CAAAA,OAAO,CAAC,EAAE,KAAK,MAAMA,OAAO,CAAC,EAAE,KAAKC,SAAQ,KAAMD,QAAQE,MAAM,KAAK,GAAG;QAC3EF,QAAQG,KAAK;IACf;IAEA,MAAMC,gBACJL,cAAcH,iBACVA,cAAc,CAACG,WAA0C,GACzD;IAEN,MAAMM,SAASjB,QAAQ,CAACW,WAAW;IACnC,+DAA+D;IAC/D,IAAIC,QAAQE,MAAM,KAAK,GAAG;QACxBI,OAAO,CAACF,cAAc,CAAC;IACzB,OAAO;QACL,yEAAyE;QACzE,8DAA8D;QAC9D,IAAIJ,QAAQE,MAAM,KAAK,KAAK,OAAOF,OAAO,CAAC,EAAE,KAAK,UAAU;YAC1DM,OAAO,CAACF,cAAc,CAACC,SAAS,MAAML,OAAO,CAAC,EAAE;QAClD,OAAO;YACLM,OAAO,CAACF,cAAc,CAACC,WAAWL;QACpC;IACF;AACF;AAEO,SAASO,UAAUP,OAAe;IACvCM,QAAQT,GAAG,CAACG;AACd;AAEO,SAASX,KAAK,GAAGW,OAAc;IACpCF,YAAY,WAAWE;AACzB;AAEO,SAASV,MAAM,GAAGU,OAAc;IACrCF,YAAY,YAAYE;AAC1B;AAEO,SAAST,KAAK,GAAGS,OAAc;IACpCF,YAAY,WAAWE;AACzB;AAEO,SAASR,MAAM,GAAGQ,OAAc;IACrCF,YAAY,YAAYE;AAC1B;AAEO,SAASP,KAAK,GAAGO,OAAc;IACpCF,YAAY,WAAWE;AACzB;AAEO,SAASN,MAAM,GAAGM,OAAc;IACrCF,YAAY,YAAYE;AAC1B;AAEO,SAASL,MAAM,GAAGK,OAAc;IACrCF,YAAY,YAAYE;AAC1B;AAEA,MAAMQ,gBAAgB,IAAIrB,yKAAAA,CAAiB,OAAQ,CAACsB,QAAUA,MAAMP,MAAM;AACnE,SAASQ,SAAS,GAAGV,OAAc;IACxC,MAAMW,MAAMX,QAAQY,IAAI,CAAC;IACzB,IAAI,CAACJ,cAAcK,GAAG,CAACF,MAAM;QAC3BH,cAAcM,GAAG,CAACH,KAAKA;QACvBpB,QAAQS;IACV;AACF;AAEA,MAAMe,iBAAiB,IAAI5B,yKAAAA,CAAiB,OAAQ,CAACsB,QAAUA,MAAMP,MAAM;AACpE,SAASc,UAAU,GAAGhB,OAAc;IACzC,MAAMW,MAAMX,QAAQY,IAAI,CAAC;IACzB,IAAI,CAACG,eAAeF,GAAG,CAACF,MAAM;QAC5BI,eAAeD,GAAG,CAACH,KAAKA;QACxBrB,SAASU;IACX;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 616, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/templates/helpers.ts"],"sourcesContent":["/**\n * Hoists a name from a module or promised module.\n *\n * @param module the module to hoist the name from\n * @param name the name to hoist\n * @returns the value on the module (or promised module)\n */\nexport function hoist(module: any, name: string) {\n // If the name is available in the module, return it.\n if (name in module) {\n return module[name]\n }\n\n // If a property called `then` exists, assume it's a promise and\n // return a promise that resolves to the name.\n if ('then' in module && typeof module.then === 'function') {\n return module.then((mod: any) => hoist(mod, name))\n }\n\n // If we're trying to hoise the default export, and the module is a function,\n // return the module itself.\n if (typeof module === 'function' && name === 'default') {\n return module\n }\n\n // Otherwise, return undefined.\n return undefined\n}\n"],"names":["hoist","module","name","then","mod","undefined"],"mappings":"AAAA;;;;;;CAMC,GACD;;;;AAAO,SAASA,MAAMC,MAAW,EAAEC,IAAY;IAC7C,qDAAqD;IACrD,IAAIA,QAAQD,QAAQ;QAClB,OAAOA,MAAM,CAACC,KAAK;IACrB;IAEA,gEAAgE;IAChE,8CAA8C;IAC9C,IAAI,UAAUD,UAAU,OAAOA,OAAOE,IAAI,KAAK,YAAY;QACzD,OAAOF,OAAOE,IAAI,CAAC,CAACC,MAAaJ,MAAMI,KAAKF;IAC9C;IAEA,6EAA6E;IAC7E,4BAA4B;IAC5B,IAAI,OAAOD,WAAW,cAAcC,SAAS,WAAW;QACtD,OAAOD;IACT;IAEA,+BAA+B;IAC/B,OAAOI;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 648, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/templates/pages.ts"],"sourcesContent":["import { PagesRouteModule } from '../../server/route-modules/pages/module.compiled'\nimport { RouteKind } from '../../server/route-kind'\n\nimport { hoist } from './helpers'\n\n// Import the app and document modules.\nimport * as document from 'VAR_MODULE_DOCUMENT'\nimport * as app from 'VAR_MODULE_APP'\n\n// Import the userland code.\nimport * as userland from 'VAR_USERLAND'\nimport { getHandler } from '../../server/route-modules/pages/pages-handler'\n\n// Re-export the component (should be the default export).\nexport default hoist(userland, 'default')\n\n// Re-export methods.\nexport const getStaticProps = hoist(userland, 'getStaticProps')\nexport const getStaticPaths = hoist(userland, 'getStaticPaths')\nexport const getServerSideProps = hoist(userland, 'getServerSideProps')\nexport const config = hoist(userland, 'config')\nexport const reportWebVitals = hoist(userland, 'reportWebVitals')\n\n// Re-export legacy methods.\nexport const unstable_getStaticProps = hoist(\n userland,\n 'unstable_getStaticProps'\n)\nexport const unstable_getStaticPaths = hoist(\n userland,\n 'unstable_getStaticPaths'\n)\nexport const unstable_getStaticParams = hoist(\n userland,\n 'unstable_getStaticParams'\n)\nexport const unstable_getServerProps = hoist(\n userland,\n 'unstable_getServerProps'\n)\nexport const unstable_getServerSideProps = hoist(\n userland,\n 'unstable_getServerSideProps'\n)\n\n// Create and export the route module that will be consumed.\nexport const routeModule = new PagesRouteModule({\n definition: {\n kind: RouteKind.PAGES,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n // The following aren't used in production.\n bundlePath: '',\n filename: '',\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n components: {\n // default export might not exist when optimized for data only\n App: app.default,\n Document: document.default,\n },\n userland,\n})\n\nexport const handler = getHandler({\n srcPage: 'VAR_DEFINITION_PAGE',\n config,\n userland,\n routeModule,\n getStaticPaths,\n getStaticProps,\n getServerSideProps,\n})\n"],"names":["PagesRouteModule","RouteKind","hoist","document","app","userland","getHandler","getStaticProps","getStaticPaths","getServerSideProps","config","reportWebVitals","unstable_getStaticProps","unstable_getStaticPaths","unstable_getStaticParams","unstable_getServerProps","unstable_getServerSideProps","routeModule","definition","kind","PAGES","page","pathname","bundlePath","filename","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","components","App","default","Document","handler","srcPage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,mDAAkD;AACnF,SAASC,SAAS,QAAQ,0BAAyB;AAEnD,SAASC,KAAK,QAAQ,YAAW;AAEjC,uCAAuC;AACvC,YAAYC,cAAc,sBAAqB;AAC/C,YAAYC,SAAS,iBAAgB;AAErC,4BAA4B;AAC5B,YAAYC,cAAc,eAAc;AACxC,SAASC,UAAU,QAAQ,iDAAgD;;;;;;;;2CAG5DJ,sKAAAA,EAAMG,0IAAU,WAAU;AAGlC,MAAME,qBAAiBL,sKAAAA,EAAMG,0IAAU,kBAAiB;AACxD,MAAMG,qBAAiBN,sKAAAA,EAAMG,0IAAU,kBAAiB;AACxD,MAAMI,yBAAqBP,sKAAAA,EAAMG,0IAAU,sBAAqB;AAChE,MAAMK,aAASR,sKAAAA,EAAMG,0IAAU,UAAS;AACxC,MAAMM,sBAAkBT,sKAAAA,EAAMG,0IAAU,mBAAkB;AAG1D,MAAMO,8BAA0BV,sKAAAA,EACrCG,0IACA,2BACD;AACM,MAAMQ,8BAA0BX,sKAAAA,EACrCG,0IACA,2BACD;AACM,MAAMS,+BAA2BZ,sKAAAA,EACtCG,0IACA,4BACD;AACM,MAAMU,8BAA0Bb,sKAAAA,EACrCG,0IACA,2BACD;AACM,MAAMW,kCAA8Bd,sKAAAA,EACzCG,0IACA,+BACD;AAGM,MAAMY,cAAc,IAAIjB,6MAAAA,CAAiB;IAC9CkB,YAAY;QACVC,MAAMlB,oKAAAA,CAAUmB,KAAK;QACrBC,MAAM;QACNC,UAAU;QACV,2CAA2C;QAC3CC,YAAY;QACZC,UAAU;IACZ;IACAC,SAASC,QAAQC,GAAG,CAACC,wBAAwB,aAAI;IACjDC,oBAAoBH,QAAQC,GAAG,CAACG,2BAA2B,CAAI;IAC/DC,YAAY;QACV,8DAA8D;QAC9DC,KAAK5B,IAAI6B,2HAAO;QAChBC,UAAU/B,SAAS8B,2HAAO;IAC5B;cACA5B;AACF,GAAE;AAEK,MAAM8B,cAAU7B,qMAAAA,EAAW;IAChC8B,SAAS;IACT1B;cACAL;IACAY;IACAT;IACAD;IACAE;AACF,GAAE","ignoreList":[0]}},
|
||||
{"offset": {"line": 734, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\n// Cookie for the Instant Navigation Testing API. Sent automatically with all\n// requests while a navigation lock is held; the server uses its presence to\n// render only the shell. Not exposed in production builds by default.\nexport const NEXT_INSTANT_TEST_COOKIE =\n 'next-instant-navigation-testing' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\nexport const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id' as const\nexport const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id' as const\n\n// TODO: Should this include nextjs in the name, like the others?\nexport const NEXT_ACTION_REVALIDATED_HEADER = 'x-action-revalidated' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_URL","RSC_CONTENT_TYPE_HEADER","NEXT_INSTANT_TEST_COOKIE","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER","NEXT_REQUEST_ID_HEADER","NEXT_HTML_REQUEST_ID_HEADER","NEXT_ACTION_REVALIDATED_HEADER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,aAAa,MAAc;AACjC,MAAMC,gBAAgB,cAAsB;AAI5C,MAAMC,gCAAgC,yBAAiC;AACvE,MAAMC,8BAA8B,uBAA+B;AAKnE,MAAMC,sCACX,+BAAuC;AAClC,MAAMC,0BAA0B,mBAA2B;AAC3D,MAAMC,WAAW,WAAmB;AACpC,MAAMC,0BAA0B,mBAA2B;AAK3D,MAAMC,2BACX,kCAA0C;AAErC,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEH,MAAMM,uBAAuB,OAAe;AAE5C,MAAMC,gCAAgC,sBAA8B;AACpE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,6BAA6B,0BAAkC;AACrE,MAAMC,8BAA8B,2BAAmC;AACvE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,+BAA+B,4BAAoC;AACzE,MAAMC,yBAAyB,sBAA8B;AAC7D,MAAMC,8BAA8B,2BAAmC;AAGvE,MAAMC,iCAAiC,uBAA+B","ignoreList":[0]}},
|
||||
{"offset": {"line": 806, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":";;;;AAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0]}},
|
||||
{"offset": {"line": 820, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/batcher.ts"],"sourcesContent":["import type { SchedulerFn } from './scheduler'\n\nimport { DetachedPromise } from './detached-promise'\n\ntype CacheKeyFn<K, C extends string | number | null> = (\n key: K\n) => PromiseLike<C> | C\n\ntype BatcherOptions<K, C extends string | number | null> = {\n cacheKeyFn?: CacheKeyFn<K, C>\n schedulerFn?: SchedulerFn<void>\n}\n\ntype WorkFnContext<V, K> = {\n resolve: (value: V | PromiseLike<V>) => void\n key: K\n}\n\ntype WorkFn<V, K> = (context: WorkFnContext<V, K>) => Promise<V>\n\n/**\n * A wrapper for a function that will only allow one call to the function to\n * execute at a time.\n */\nexport class Batcher<K, V, C extends string | number | null> {\n private readonly pending = new Map<C, Promise<V>>()\n\n protected constructor(\n private readonly cacheKeyFn?: CacheKeyFn<K, C>,\n /**\n * A function that will be called to schedule the wrapped function to be\n * executed. This defaults to a function that will execute the function\n * immediately.\n */\n private readonly schedulerFn: SchedulerFn<void> = (fn) => fn()\n ) {}\n\n /**\n * Creates a new instance of PendingWrapper. If the key extends a string or\n * number, the key will be used as the cache key. If the key is an object, a\n * cache key function must be provided.\n */\n public static create<K extends string | number | null, V>(\n options?: BatcherOptions<K, K>\n ): Batcher<K, V, K>\n public static create<K, V, C extends string | number | null>(\n options: BatcherOptions<K, C> &\n Required<Pick<BatcherOptions<K, C>, 'cacheKeyFn'>>\n ): Batcher<K, V, C>\n public static create<K, V, C extends string | number | null>(\n options?: BatcherOptions<K, C>\n ): Batcher<K, V, C> {\n return new Batcher<K, V, C>(options?.cacheKeyFn, options?.schedulerFn)\n }\n\n /**\n * Wraps a function in a promise that will be resolved or rejected only once\n * for a given key. This will allow multiple calls to the function to be\n * made, but only one will be executed at a time. The result of the first\n * call will be returned to all callers.\n *\n * @param key the key to use for the cache\n * @param fn the function to wrap\n * @returns a promise that resolves to the result of the function\n */\n public async batch(key: K, fn: WorkFn<V, K>): Promise<V> {\n const cacheKey = (this.cacheKeyFn ? await this.cacheKeyFn(key) : key) as C\n if (cacheKey === null) {\n return fn({ resolve: (value) => Promise.resolve(value), key })\n }\n\n const pending = this.pending.get(cacheKey)\n if (pending) return pending\n\n const { promise, resolve, reject } = new DetachedPromise<V>()\n this.pending.set(cacheKey, promise)\n\n this.schedulerFn(async () => {\n try {\n const result = await fn({ resolve, key })\n\n // Resolving a promise multiple times is a no-op, so we can safely\n // resolve all pending promises with the same result.\n resolve(result)\n } catch (err) {\n reject(err)\n } finally {\n this.pending.delete(cacheKey)\n }\n })\n\n return promise\n }\n}\n"],"names":["DetachedPromise","Batcher","cacheKeyFn","schedulerFn","fn","pending","Map","create","options","batch","key","cacheKey","resolve","value","Promise","get","promise","reject","set","result","err","delete"],"mappings":";;;;AAEA,SAASA,eAAe,QAAQ,qBAAoB;;AAsB7C,MAAMC;IAGX,YACmBC,UAA6B,EAC9C;;;;KAIC,GACgBC,cAAiC,CAACC,KAAOA,IAAI,CAC9D;aAPiBF,UAAAA,GAAAA;aAMAC,WAAAA,GAAAA;aATFE,OAAAA,GAAU,IAAIC;IAU5B;IAcH,OAAcC,OACZC,OAA8B,EACZ;QAClB,OAAO,IAAIP,QAAiBO,WAAAA,OAAAA,KAAAA,IAAAA,QAASN,UAAU,EAAEM,WAAAA,OAAAA,KAAAA,IAAAA,QAASL,WAAW;IACvE;IAEA;;;;;;;;;GASC,GACD,MAAaM,MAAMC,GAAM,EAAEN,EAAgB,EAAc;QACvD,MAAMO,WAAY,IAAI,CAACT,UAAU,GAAG,MAAM,IAAI,CAACA,UAAU,CAACQ,OAAOA;QACjE,IAAIC,aAAa,MAAM;YACrB,OAAOP,GAAG;gBAAEQ,SAAS,CAACC,QAAUC,QAAQF,OAAO,CAACC;gBAAQH;YAAI;QAC9D;QAEA,MAAML,UAAU,IAAI,CAACA,OAAO,CAACU,GAAG,CAACJ;QACjC,IAAIN,SAAS,OAAOA;QAEpB,MAAM,EAAEW,OAAO,EAAEJ,OAAO,EAAEK,MAAM,EAAE,GAAG,IAAIjB,6KAAAA;QACzC,IAAI,CAACK,OAAO,CAACa,GAAG,CAACP,UAAUK;QAE3B,IAAI,CAACb,WAAW,CAAC;YACf,IAAI;gBACF,MAAMgB,SAAS,MAAMf,GAAG;oBAAEQ;oBAASF;gBAAI;gBAEvC,kEAAkE;gBAClE,qDAAqD;gBACrDE,QAAQO;YACV,EAAE,OAAOC,KAAK;gBACZH,OAAOG;YACT,SAAU;gBACR,IAAI,CAACf,OAAO,CAACgB,MAAM,CAACV;YACtB;QACF;QAEA,OAAOK;IACT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 882, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/constants.ts"],"sourcesContent":["import type { ServerRuntime } from '../types'\n\nexport const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP'\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'\n\nexport const MATCHED_PATH_HEADER = 'x-matched-path'\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER =\n 'x-prerender-revalidate-if-generated'\n\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments'\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc'\nexport const RSC_SUFFIX = '.rsc'\nexport const ACTION_SUFFIX = '.action'\nexport const NEXT_DATA_SUFFIX = '.json'\nexport const NEXT_META_SUFFIX = '.meta'\nexport const NEXT_BODY_SUFFIX = '.body'\n\nexport const NEXT_NAV_DEPLOYMENT_ID_HEADER = 'x-nextjs-deployment-id'\n\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER =\n 'x-next-revalidate-tag-token'\n\nexport const NEXT_RESUME_HEADER = 'next-resume'\nexport const NEXT_RESUME_STATE_LENGTH_HEADER = 'x-next-resume-state-length'\n\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'\nexport const NEXT_CACHE_ROOT_PARAM_TAG_ID = '_N_RP_'\n\n// in seconds\nexport const CACHE_ONE_YEAR_SECONDS = 31536000\n\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe\n\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware'\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`\n\n// Patterns to detect proxy files (replacement for middleware)\nexport const PROXY_FILENAME = 'proxy'\nexport const PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`\n\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'\n\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages'\nexport const DOT_NEXT_ALIAS = 'private-dot-next'\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir'\nexport const APP_DIR_ALIAS = 'private-next-app-dir'\nexport const RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy'\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS =\n 'private-next-rsc-track-dynamic-import'\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS =\n 'private-next-rsc-action-client-wrapper'\n\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`\n\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`\n\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`\n\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`\n\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`\n\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`\n\nexport const GSP_NO_RETURNED_VALUE =\n 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'\nexport const GSSP_NO_RETURNED_VALUE =\n 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'\n\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR =\n 'The `unstable_revalidate` property is available for general use.\\n' +\n 'Please use `revalidate` instead.'\n\nexporLine truncated
|
||||
{"offset": {"line": 1171, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/detached-promise.ts"],"sourcesContent":["/**\n * A `Promise.withResolvers` implementation that exposes the `resolve` and\n * `reject` functions on a `Promise`.\n *\n * @see https://tc39.es/proposal-promise-with-resolvers/\n */\nexport class DetachedPromise<T = any> {\n public readonly resolve: (value: T | PromiseLike<T>) => void\n public readonly reject: (reason: any) => void\n public readonly promise: Promise<T>\n\n constructor() {\n let resolve: (value: T | PromiseLike<T>) => void\n let reject: (reason: any) => void\n\n // Create the promise and assign the resolvers to the object.\n this.promise = new Promise<T>((res, rej) => {\n resolve = res\n reject = rej\n })\n\n // We know that resolvers is defined because the Promise constructor runs\n // synchronously.\n this.resolve = resolve!\n this.reject = reject!\n }\n}\n"],"names":["DetachedPromise","constructor","resolve","reject","promise","Promise","res","rej"],"mappings":"AAAA;;;;;CAKC,GACD;;;;AAAO,MAAMA;IAKXC,aAAc;QACZ,IAAIC;QACJ,IAAIC;QAEJ,6DAA6D;QAC7D,IAAI,CAACC,OAAO,GAAG,IAAIC,QAAW,CAACC,KAAKC;YAClCL,UAAUI;YACVH,SAASI;QACX;QAEA,yEAAyE;QACzE,iBAAiB;QACjB,IAAI,CAACL,OAAO,GAAGA;QACf,IAAI,CAACC,MAAM,GAAGA;IAChB;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 1199, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/picocolors.ts"],"sourcesContent":["// ISC License\n\n// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n//\n// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1\n\nconst { env, stdout } = globalThis?.process ?? {}\n\nconst enabled =\n env &&\n !env.NO_COLOR &&\n (env.FORCE_COLOR || (stdout?.isTTY && !env.CI && env.TERM !== 'dumb'))\n\nconst replaceClose = (\n str: string,\n close: string,\n replace: string,\n index: number\n): string => {\n const start = str.substring(0, index) + replace\n const end = str.substring(index + close.length)\n const nextIndex = end.indexOf(close)\n return ~nextIndex\n ? start + replaceClose(end, close, replace, nextIndex)\n : start + end\n}\n\nconst formatter = (open: string, close: string, replace = open) => {\n if (!enabled) return String\n return (input: string) => {\n const string = '' + input\n const index = string.indexOf(close, open.length)\n return ~index\n ? open + replaceClose(string, close, replace, index) + close\n : open + string + close\n }\n}\n\nexport const reset = enabled ? (s: string) => `\\x1b[0m${s}\\x1b[0m` : String\nexport const bold = formatter('\\x1b[1m', '\\x1b[22m', '\\x1b[22m\\x1b[1m')\nexport const dim = formatter('\\x1b[2m', '\\x1b[22m', '\\x1b[22m\\x1b[2m')\nexport const italic = formatter('\\x1b[3m', '\\x1b[23m')\nexport const underline = formatter('\\x1b[4m', '\\x1b[24m')\nexport const inverse = formatter('\\x1b[7m', '\\x1b[27m')\nexport const hidden = formatter('\\x1b[8m', '\\x1b[28m')\nexport const strikethrough = formatter('\\x1b[9m', '\\x1b[29m')\nexport const black = formatter('\\x1b[30m', '\\x1b[39m')\nexport const red = formatter('\\x1b[31m', '\\x1b[39m')\nexport const green = formatter('\\x1b[32m', '\\x1b[39m')\nexport const yellow = formatter('\\x1b[33m', '\\x1b[39m')\nexport const blue = formatter('\\x1b[34m', '\\x1b[39m')\nexport const magenta = formatter('\\x1b[35m', '\\x1b[39m')\nexport const purple = formatter('\\x1b[38;2;173;127;168m', '\\x1b[39m')\nexport const cyan = formatter('\\x1b[36m', '\\x1b[39m')\nexport const white = formatter('\\x1b[37m', '\\x1b[39m')\nexport const gray = formatter('\\x1b[90m', '\\x1b[39m')\nexport const bgBlack = formatter('\\x1b[40m', '\\x1b[49m')\nexport const bgRed = formatter('\\x1b[41m', '\\x1b[49m')\nexport const bgGreen = formatter('\\x1b[42m', '\\x1b[49m')\nexport const bgYellow = formatter('\\x1b[43m', '\\x1b[49m')\nexport const bgBlue = formatter('\\x1b[44m', '\\x1b[49m')\nexport const bgMagenta = formatter('\\x1b[45m', '\\x1b[49m')\nexport const bgCyan = formatter('\\x1b[46m', '\\x1b[49m')\nexport const bgWhite = formatter('\\x1b[47m', '\\x1b[49m')\n"],"names":["globalThis","env","stdout","process","enabled","NO_COLOR","FORCE_COLOR","isTTY","CI","TERM","replaceClose","str","close","replace","index","start","substring","end","length","nextIndex","indexOf","formatter","open","String","input","string","reset","s","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","purple","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AAEd,wEAAwE;AAExE,2EAA2E;AAC3E,yEAAyE;AACzE,oEAAoE;AAEpE,2EAA2E;AAC3E,mEAAmE;AACnE,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,iEAAiE;AACjE,EAAE;AACF,8GAA8G;IAEtFA;AAAxB,MAAM,EAAEC,GAAG,EAAEC,MAAM,EAAE,GAAGF,CAAAA,CAAAA,cAAAA,UAAAA,KAAAA,OAAAA,KAAAA,IAAAA,YAAYG,OAAO,KAAI,CAAC;AAEhD,MAAMC,UACJH,OACA,CAACA,IAAII,QAAQ,IACZJ,CAAAA,IAAIK,WAAW,IAAKJ,CAAAA,UAAAA,OAAAA,KAAAA,IAAAA,OAAQK,KAAK,KAAI,CAACN,IAAIO,EAAE,IAAIP,IAAIQ,IAAI,KAAK,MAAM;AAEtE,MAAMC,eAAe,CACnBC,KACAC,OACAC,SACAC;IAEA,MAAMC,QAAQJ,IAAIK,SAAS,CAAC,GAAGF,SAASD;IACxC,MAAMI,MAAMN,IAAIK,SAAS,CAACF,QAAQF,MAAMM,MAAM;IAC9C,MAAMC,YAAYF,IAAIG,OAAO,CAACR;IAC9B,OAAO,CAACO,YACJJ,QAAQL,aAAaO,KAAKL,OAAOC,SAASM,aAC1CJ,QAAQE;AACd;AAEA,MAAMI,YAAY,CAACC,MAAcV,OAAeC,UAAUS,IAAI;IAC5D,IAAI,CAAClB,SAAS,OAAOmB;IACrB,OAAO,CAACC;QACN,MAAMC,SAAS,KAAKD;QACpB,MAAMV,QAALine truncated
|
||||
{"offset": {"line": 1314, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/redirect-status.ts"],"sourcesContent":["import { RedirectStatusCode } from '../client/components/redirect-status-code'\n\nexport const allowedStatusCodes = new Set([301, 302, 303, 307, 308])\n\nexport function getRedirectStatus(route: {\n statusCode?: number\n permanent?: boolean\n}): number {\n return (\n route.statusCode ||\n (route.permanent\n ? RedirectStatusCode.PermanentRedirect\n : RedirectStatusCode.TemporaryRedirect)\n )\n}\n\n// for redirects we restrict matching /_next and for all routes\n// we add an optional trailing slash at the end for easier\n// configuring between trailingSlash: true/false\nexport function modifyRouteRegex(regex: string, restrictedPaths?: string[]) {\n if (restrictedPaths) {\n regex = regex.replace(\n /\\^/,\n `^(?!${restrictedPaths\n .map((path) => path.replace(/\\//g, '\\\\/'))\n .join('|')})`\n )\n }\n regex = regex.replace(/\\$$/, '(?:\\\\/)?$')\n return regex\n}\n"],"names":["RedirectStatusCode","allowedStatusCodes","Set","getRedirectStatus","route","statusCode","permanent","PermanentRedirect","TemporaryRedirect","modifyRouteRegex","regex","restrictedPaths","replace","map","path","join"],"mappings":";;;;;;;;AAAA,SAASA,kBAAkB,QAAQ,4CAA2C;;AAEvE,MAAMC,qBAAqB,IAAIC,IAAI;IAAC;IAAK;IAAK;IAAK;IAAK;CAAI,EAAC;AAE7D,SAASC,kBAAkBC,KAGjC;IACC,OACEA,MAAMC,UAAU,IACfD,CAAAA,MAAME,SAAS,GACZN,wMAAAA,CAAmBO,iBAAiB,GACpCP,wMAAAA,CAAmBQ,iBAAgB;AAE3C;AAKO,SAASC,iBAAiBC,KAAa,EAAEC,eAA0B;IACxE,IAAIA,iBAAiB;QACnBD,QAAQA,MAAME,OAAO,CACnB,MACA,CAAC,IAAI,EAAED,gBACJE,GAAG,CAAC,CAACC,OAASA,KAAKF,OAAO,CAAC,OAAO,QAClCG,IAAI,CAAC,KAAK,CAAC,CAAC;IAEnB;IACAL,QAAQA,MAAME,OAAO,CAAC,OAAO;IAC7B,OAAOF;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 1345, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/scheduler.ts"],"sourcesContent":["export type ScheduledFn<T = void> = () => T | PromiseLike<T>\nexport type SchedulerFn<T = void> = (cb: ScheduledFn<T>) => void\n\n/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */\nexport const scheduleOnNextTick = (cb: ScheduledFn<void>) => {\n // We use Promise.resolve().then() here so that the operation is scheduled at\n // the end of the promise job queue, we then add it to the next process tick\n // to ensure it's evaluated afterwards.\n //\n // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n //\n Promise.resolve().then(() => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n process.nextTick(cb)\n }\n })\n}\n\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */\nexport const scheduleImmediate = (cb: ScheduledFn<void>): void => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n setImmediate(cb)\n }\n}\n\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */\nexport function atLeastOneTask() {\n return new Promise<void>((resolve) => scheduleImmediate(resolve))\n}\n\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */\nexport function waitAtLeastOneReactRenderTask(): Promise<void> {\n if (process.env.NEXT_RUNTIME === 'edge') {\n return new Promise((r) => setTimeout(r, 0))\n } else {\n return new Promise((r) => setImmediate(r))\n }\n}\n"],"names":["scheduleOnNextTick","cb","Promise","resolve","then","process","env","NEXT_RUNTIME","setTimeout","nextTick","scheduleImmediate","setImmediate","atLeastOneTask","waitAtLeastOneReactRenderTask","r"],"mappings":"AAGA;;;;;CAKC,GACD;;;;;;;;;;AAAO,MAAMA,qBAAqB,CAACC;IACjC,6EAA6E;IAC7E,4EAA4E;IAC5E,uCAAuC;IACvC,EAAE;IACF,kLAAkL;IAClL,EAAE;IACFC,QAAQC,OAAO,GAAGC,IAAI,CAAC;QACrB,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;aAElC;YACLF,QAAQI,QAAQ,CAACR;QACnB;IACF;AACF,EAAC;AAQM,MAAMS,oBAAoB,CAACT;IAChC,IAAII,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACLI,aAAaV;IACf;AACF,EAAC;AAOM,SAASW;IACd,OAAO,IAAIV,QAAc,CAACC,UAAYO,kBAAkBP;AAC1D;AAWO,SAASU;IACd,IAAIR,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACL,OAAO,IAAIL,QAAQ,CAACY,IAAMH,aAAaG;IACzC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 1396, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/interop-default.ts"],"sourcesContent":["/**\n * Interop between \"export default\" and \"module.exports\".\n */\nexport function interopDefault(mod: any) {\n return mod.default || mod\n}\n"],"names":["interopDefault","mod","default"],"mappings":"AAAA;;CAEC,GACD;;;;AAAO,SAASA,eAAeC,GAAQ;IACrC,OAAOA,IAAIC,OAAO,IAAID;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 1409, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/base-http/helpers.ts"],"sourcesContent":["import type { BaseNextRequest, BaseNextResponse } from './'\nimport type { NodeNextRequest, NodeNextResponse } from './node'\nimport type { WebNextRequest, WebNextResponse } from './web'\n\n/**\n * This file provides some helpers that should be used in conjunction with\n * explicit environment checks. When combined with the environment checks, it\n * will ensure that the correct typings are used as well as enable code\n * elimination.\n */\n\n/**\n * Type guard to determine if a request is a WebNextRequest. This does not\n * actually check the type of the request, but rather the runtime environment.\n * It's expected that when the runtime environment is the edge runtime, that any\n * base request is a WebNextRequest.\n */\nexport const isWebNextRequest = (req: BaseNextRequest): req is WebNextRequest =>\n process.env.NEXT_RUNTIME === 'edge'\n\n/**\n * Type guard to determine if a response is a WebNextResponse. This does not\n * actually check the type of the response, but rather the runtime environment.\n * It's expected that when the runtime environment is the edge runtime, that any\n * base response is a WebNextResponse.\n */\nexport const isWebNextResponse = (\n res: BaseNextResponse\n): res is WebNextResponse => process.env.NEXT_RUNTIME === 'edge'\n\n/**\n * Type guard to determine if a request is a NodeNextRequest. This does not\n * actually check the type of the request, but rather the runtime environment.\n * It's expected that when the runtime environment is the node runtime, that any\n * base request is a NodeNextRequest.\n */\nexport const isNodeNextRequest = (\n req: BaseNextRequest\n): req is NodeNextRequest => process.env.NEXT_RUNTIME !== 'edge'\n\n/**\n * Type guard to determine if a response is a NodeNextResponse. This does not\n * actually check the type of the response, but rather the runtime environment.\n * It's expected that when the runtime environment is the node runtime, that any\n * base response is a NodeNextResponse.\n */\nexport const isNodeNextResponse = (\n res: BaseNextResponse\n): res is NodeNextResponse => process.env.NEXT_RUNTIME !== 'edge'\n"],"names":["isWebNextRequest","req","process","env","NEXT_RUNTIME","isWebNextResponse","res","isNodeNextRequest","isNodeNextResponse"],"mappings":"AAIA;;;;;CAKC,GAED;;;;;CAKC,GACD;;;;;;;;;;AAAO,MAAMA,mBAAmB,CAACC,MAC/BC,QAAQC,GAAG,CAACC,YAAY,uBAAK,OAAM;AAQ9B,MAAMC,oBAAoB,CAC/BC,MAC2BJ,QAAQC,GAAG,CAACC,YAAY,uBAAK,OAAM;AAQzD,MAAMG,oBAAoB,CAC/BN,MAC2BC,QAAQC,GAAG,CAACC,YAAY,uBAAK,OAAM;AAQzD,MAAMI,qBAAqB,CAChCF,MAC4BJ,QAAQC,GAAG,CAACC,YAAY,uBAAK,OAAM","ignoreList":[0]}},
|
||||
{"offset": {"line": 1437, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/client-component-renderer-logger.ts"],"sourcesContent":["import type { AppPageModule } from './route-modules/app-page/module'\n\n// Combined load times for loading client components\nlet clientComponentLoadStart = 0\nlet clientComponentLoadTimes = 0\nlet clientComponentLoadCount = 0\n\nexport function wrapClientComponentLoader(\n ComponentMod: AppPageModule,\n isTracingEnabled: boolean\n): AppPageModule['__next_app__'] {\n if (\n !('performance' in globalThis) ||\n (!process.env.NEXT_OTEL_PERFORMANCE_PREFIX && !isTracingEnabled)\n ) {\n return ComponentMod.__next_app__\n }\n\n return {\n require: (...args) => {\n const startTime = performance.now()\n\n if (clientComponentLoadStart === 0) {\n clientComponentLoadStart = startTime\n }\n\n try {\n clientComponentLoadCount += 1\n return ComponentMod.__next_app__.require(...args)\n } finally {\n clientComponentLoadTimes += performance.now() - startTime\n }\n },\n loadChunk: (...args) => {\n const startTime = performance.now()\n const result = ComponentMod.__next_app__.loadChunk(...args)\n // Avoid wrapping `loadChunk`'s result in an extra promise in case something like React depends on its identity.\n // We only need to know when it's settled.\n result.finally(() => {\n clientComponentLoadTimes += performance.now() - startTime\n })\n return result\n },\n }\n}\n\nexport function getClientComponentLoaderMetrics(\n options: { reset?: boolean } = {}\n) {\n const metrics =\n clientComponentLoadStart === 0\n ? undefined\n : {\n clientComponentLoadStart,\n clientComponentLoadTimes,\n clientComponentLoadCount,\n }\n\n if (options.reset) {\n clientComponentLoadStart = 0\n clientComponentLoadTimes = 0\n clientComponentLoadCount = 0\n }\n\n return metrics\n}\n"],"names":["clientComponentLoadStart","clientComponentLoadTimes","clientComponentLoadCount","wrapClientComponentLoader","ComponentMod","isTracingEnabled","globalThis","process","env","NEXT_OTEL_PERFORMANCE_PREFIX","__next_app__","require","args","startTime","performance","now","loadChunk","result","finally","getClientComponentLoaderMetrics","options","metrics","undefined","reset"],"mappings":";;;;;;AAEA,oDAAoD;AACpD,IAAIA,2BAA2B;AAC/B,IAAIC,2BAA2B;AAC/B,IAAIC,2BAA2B;AAExB,SAASC,0BACdC,YAA2B,EAC3BC,gBAAyB;IAEzB,IACE,CAAE,CAAA,iBAAiBC,UAAS,KAC3B,CAACC,QAAQC,GAAG,CAACC,4BAA4B,IAAI,CAACJ,kBAC/C;QACA,OAAOD,aAAaM,YAAY;IAClC;IAEA,OAAO;QACLC,SAAS,CAAC,GAAGC;YACX,MAAMC,YAAYC,YAAYC,GAAG;YAEjC,IAAIf,6BAA6B,GAAG;gBAClCA,2BAA2Ba;YAC7B;YAEA,IAAI;gBACFX,4BAA4B;gBAC5B,OAAOE,aAAaM,YAAY,CAACC,OAAO,IAAIC;YAC9C,SAAU;gBACRX,4BAA4Ba,YAAYC,GAAG,KAAKF;YAClD;QACF;QACAG,WAAW,CAAC,GAAGJ;YACb,MAAMC,YAAYC,YAAYC,GAAG;YACjC,MAAME,SAASb,aAAaM,YAAY,CAACM,SAAS,IAAIJ;YACtD,gHAAgH;YAChH,0CAA0C;YAC1CK,OAAOC,OAAO,CAAC;gBACbjB,4BAA4Ba,YAAYC,GAAG,KAAKF;YAClD;YACA,OAAOI;QACT;IACF;AACF;AAEO,SAASE,gCACdC,UAA+B,CAAC,CAAC;IAEjC,MAAMC,UACJrB,6BAA6B,IACzBsB,YACA;QACEtB;QACAC;QACAC;IACF;IAEN,IAAIkB,QAAQG,KAAK,EAAE;QACjBvB,2BAA2B;QAC3BC,2BAA2B;QAC3BC,2BAA2B;IAC7B;IAEA,OAAOmB;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 1493, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/instrumentation/utils.ts"],"sourcesContent":["export function getRevalidateReason(params: {\n isOnDemandRevalidate?: boolean\n isStaticGeneration?: boolean\n}): 'on-demand' | 'stale' | undefined {\n if (params.isOnDemandRevalidate) {\n return 'on-demand'\n }\n if (params.isStaticGeneration) {\n return 'stale'\n }\n return undefined\n}\n"],"names":["getRevalidateReason","params","isOnDemandRevalidate","isStaticGeneration","undefined"],"mappings":";;;;AAAO,SAASA,oBAAoBC,MAGnC;IACC,IAAIA,OAAOC,oBAAoB,EAAE;QAC/B,OAAO;IACT;IACA,IAAID,OAAOE,kBAAkB,EAAE;QAC7B,OAAO;IACT;IACA,OAAOC;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 1510, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/cache-control.ts"],"sourcesContent":["import { CACHE_ONE_YEAR_SECONDS } from '../../lib/constants'\n\n/**\n * The revalidate option used internally for pages. A value of `false` means\n * that the page should not be revalidated. A number means that the page\n * should be revalidated after the given number of seconds (this also includes\n * `1` which means to revalidate after 1 second). A value of `0` is not a valid\n * value for this option.\n */\nexport type Revalidate = number | false\n\nexport interface CacheControl {\n revalidate: Revalidate\n expire: number | undefined\n}\n\nexport function getCacheControlHeader({\n revalidate,\n expire,\n}: CacheControl): string {\n const swrHeader =\n typeof revalidate === 'number' &&\n expire !== undefined &&\n revalidate < expire\n ? `, stale-while-revalidate=${expire - revalidate}`\n : ''\n\n if (revalidate === 0) {\n return 'private, no-cache, no-store, max-age=0, must-revalidate'\n } else if (typeof revalidate === 'number') {\n return `s-maxage=${revalidate}${swrHeader}`\n }\n\n return `s-maxage=${CACHE_ONE_YEAR_SECONDS}${swrHeader}`\n}\n"],"names":["CACHE_ONE_YEAR_SECONDS","getCacheControlHeader","revalidate","expire","swrHeader","undefined"],"mappings":";;;;AAAA,SAASA,sBAAsB,QAAQ,sBAAqB;;AAgBrD,SAASC,sBAAsB,EACpCC,UAAU,EACVC,MAAM,EACO;IACb,MAAMC,YACJ,OAAOF,eAAe,YACtBC,WAAWE,aACXH,aAAaC,SACT,CAAC,yBAAyB,EAAEA,SAASD,YAAY,GACjD;IAEN,IAAIA,eAAe,GAAG;QACpB,OAAO;IACT,OAAO,IAAI,OAAOA,eAAe,UAAU;QACzC,OAAO,CAAC,SAAS,EAAEA,aAAaE,WAAW;IAC7C;IAEA,OAAO,CAAC,SAAS,EAAEJ,0KAAAA,GAAyBI,WAAW;AACzD","ignoreList":[0]}},
|
||||
{"offset": {"line": 1529, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/etag.ts"],"sourcesContent":["/**\n * FNV-1a Hash implementation\n * @author Travis Webb (tjwebb) <me@traviswebb.com>\n *\n * Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js\n *\n * Simplified, optimized and add modified for 52 bit, which provides a larger hash space\n * and still making use of Javascript's 53-bit integer space.\n */\nexport const fnv1a52 = (str: string) => {\n const len = str.length\n let i = 0,\n t0 = 0,\n v0 = 0x2325,\n t1 = 0,\n v1 = 0x8422,\n t2 = 0,\n v2 = 0x9ce4,\n t3 = 0,\n v3 = 0xcbf2\n\n while (i < len) {\n v0 ^= str.charCodeAt(i++)\n t0 = v0 * 435\n t1 = v1 * 435\n t2 = v2 * 435\n t3 = v3 * 435\n t2 += v0 << 8\n t3 += v1 << 8\n t1 += t0 >>> 16\n v0 = t0 & 65535\n t2 += t1 >>> 16\n v1 = t1 & 65535\n v3 = (t3 + (t2 >>> 16)) & 65535\n v2 = t2 & 65535\n }\n\n return (\n (v3 & 15) * 281474976710656 +\n v2 * 4294967296 +\n v1 * 65536 +\n (v0 ^ (v3 >> 4))\n )\n}\n\nexport const generateETag = (payload: string, weak = false) => {\n const prefix = weak ? 'W/\"' : '\"'\n return (\n prefix + fnv1a52(payload).toString(36) + payload.length.toString(36) + '\"'\n )\n}\n"],"names":["fnv1a52","str","len","length","i","t0","v0","t1","v1","t2","v2","t3","v3","charCodeAt","generateETag","payload","weak","prefix","toString"],"mappings":"AAAA;;;;;;;;CAQC,GACD;;;;;;AAAO,MAAMA,UAAU,CAACC;IACtB,MAAMC,MAAMD,IAAIE,MAAM;IACtB,IAAIC,IAAI,GACNC,KAAK,GACLC,KAAK,QACLC,KAAK,GACLC,KAAK,QACLC,KAAK,GACLC,KAAK,QACLC,KAAK,GACLC,KAAK;IAEP,MAAOR,IAAIF,IAAK;QACdI,MAAML,IAAIY,UAAU,CAACT;QACrBC,KAAKC,KAAK;QACVC,KAAKC,KAAK;QACVC,KAAKC,KAAK;QACVC,KAAKC,KAAK;QACVH,MAAMH,MAAM;QACZK,MAAMH,MAAM;QACZD,MAAMF,OAAO;QACbC,KAAKD,KAAK;QACVI,MAAMF,OAAO;QACbC,KAAKD,KAAK;QACVK,KAAMD,KAAMF,CAAAA,OAAO,EAAC,IAAM;QAC1BC,KAAKD,KAAK;IACZ;IAEA,OACGG,CAAAA,KAAK,EAAC,IAAK,kBACZF,KAAK,aACLF,KAAK,QACJF,CAAAA,KAAMM,MAAM,CAAC;AAElB,EAAC;AAEM,MAAME,eAAe,CAACC,SAAiBC,OAAO,KAAK;IACxD,MAAMC,SAASD,OAAO,QAAQ;IAC9B,OACEC,SAASjB,QAAQe,SAASG,QAAQ,CAAC,MAAMH,QAAQZ,MAAM,CAACe,QAAQ,CAAC,MAAM;AAE3E,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 1571, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/lru-cache.ts"],"sourcesContent":["/**\n * Node in the doubly-linked list used for LRU tracking.\n * Each node represents a cache entry with bidirectional pointers.\n */\nclass LRUNode<T> {\n public readonly key: string\n public data: T\n public size: number\n public prev: LRUNode<T> | SentinelNode<T> | null = null\n public next: LRUNode<T> | SentinelNode<T> | null = null\n\n constructor(key: string, data: T, size: number) {\n this.key = key\n this.data = data\n this.size = size\n }\n}\n\n/**\n * Sentinel node used for head/tail boundaries.\n * These nodes don't contain actual cache data but simplify list operations.\n */\nclass SentinelNode<T> {\n public prev: LRUNode<T> | SentinelNode<T> | null = null\n public next: LRUNode<T> | SentinelNode<T> | null = null\n}\n\n/**\n * LRU (Least Recently Used) Cache implementation using a doubly-linked list\n * and hash map for O(1) operations.\n *\n * Algorithm:\n * - Uses a doubly-linked list to maintain access order (most recent at head)\n * - Hash map provides O(1) key-to-node lookup\n * - Sentinel head/tail nodes simplify edge case handling\n * - Size-based eviction supports custom size calculation functions\n *\n * Data Structure Layout:\n * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL\n *\n * Operations:\n * - get(): Move accessed node to head (mark as most recent)\n * - set(): Add new node at head, evict from tail if over capacity\n * - Eviction: Remove least recent node (tail.prev) when size exceeds limit\n */\nexport class LRUCache<T> {\n private readonly cache: Map<string, LRUNode<T>> = new Map()\n private readonly head: SentinelNode<T>\n private readonly tail: SentinelNode<T>\n private totalSize: number = 0\n private readonly maxSize: number\n private readonly calculateSize:\n | ((value: T, key: string) => number)\n | undefined\n private readonly onEvict: ((key: string, value: T) => void) | undefined\n\n constructor(\n maxSize: number,\n calculateSize?: (value: T, key: string) => number,\n onEvict?: (key: string, value: T) => void\n ) {\n this.maxSize = maxSize\n this.calculateSize = calculateSize\n this.onEvict = onEvict\n\n // Create sentinel nodes to simplify doubly-linked list operations\n // HEAD <-> TAIL (empty list)\n this.head = new SentinelNode<T>()\n this.tail = new SentinelNode<T>()\n this.head.next = this.tail\n this.tail.prev = this.head\n }\n\n /**\n * Adds a node immediately after the head (marks as most recently used).\n * Used when inserting new items or when an item is accessed.\n * PRECONDITION: node must be disconnected (prev/next should be null)\n */\n private addToHead(node: LRUNode<T>): void {\n node.prev = this.head\n node.next = this.head.next\n // head.next is always non-null (points to tail or another node)\n this.head.next!.prev = node\n this.head.next = node\n }\n\n /**\n * Removes a node from its current position in the doubly-linked list.\n * Updates the prev/next pointers of adjacent nodes to maintain list integrity.\n * PRECONDITION: node must be connected (prev/next are non-null)\n */\n private removeNode(node: LRUNode<T>): void {\n // Connected nodes always have non-null prev/next\n node.prev!.next = node.next\n node.next!.prev = node.prev\n }\n\n /**\n * Moves an existing node to the head position (marks as most recently used).\n * This is the core LRU operation - accessed items become most recent.\n */\n private moveToHead(node: LRUNode<T>): void {\n this.removeNode(node)\n this.addToHead(node)\n }\n\n /**\n * Removes and returns the least recently used node (the one before tail).\n * This is called during eviction when the cache exceeds capacity.\n * PRECONDITION: cache is not empty (ensured by caller)\n */\n private removeTail(): LRUNode<T> {\n const lastNode = this.tail.prev as LRUNode<T>\n // tail.prev is always non-null and always LRUNode when cache is not empty\n this.removeNode(lastNode)\n return lastNode\n }\n\n /**\n * Sets a key-value pair in the cache.\n * If the key exists, updates the value and moves to head.\n * If new, adds at head and evicts from tail if necessary.\n *\n * Time Complexity:\n * - O(1) for uniform item sizes\n * - O(k) where k is the number of items evicted (can be O(N) for variable sizes)\n */\n public set(key: string, value: T): boolean {\n const size = this.calculateSize?.(value, key) ?? 1\n if (size <= 0) {\n throw new Error(\n `LRUCache: calculateSize returned ${size}, but size must be > 0. ` +\n `Items with size 0 would never be evicted, causing unbounded cache growth.`\n )\n }\n if (size > this.maxSize) {\n console.warn('Single item size exceeds maxSize')\n return false\n }\n\n const existing = this.cacLine truncated
|
||||
{"offset": {"line": 1758, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/constants.ts"],"sourcesContent":["/**\n * Contains predefined constants for the trace span name in next/server.\n *\n * Currently, next/server/tracer is internal implementation only for tracking\n * next.js's implementation only with known span names defined here.\n **/\n\n// eslint typescript has a bug with TS enums\n\nenum BaseServerSpan {\n handleRequest = 'BaseServer.handleRequest',\n run = 'BaseServer.run',\n pipe = 'BaseServer.pipe',\n getStaticHTML = 'BaseServer.getStaticHTML',\n render = 'BaseServer.render',\n renderToResponseWithComponents = 'BaseServer.renderToResponseWithComponents',\n renderToResponse = 'BaseServer.renderToResponse',\n renderToHTML = 'BaseServer.renderToHTML',\n renderError = 'BaseServer.renderError',\n renderErrorToResponse = 'BaseServer.renderErrorToResponse',\n renderErrorToHTML = 'BaseServer.renderErrorToHTML',\n render404 = 'BaseServer.render404',\n}\n\nenum LoadComponentsSpan {\n loadDefaultErrorComponents = 'LoadComponents.loadDefaultErrorComponents',\n loadComponents = 'LoadComponents.loadComponents',\n}\n\nenum NextServerSpan {\n getRequestHandler = 'NextServer.getRequestHandler',\n getRequestHandlerWithMetadata = 'NextServer.getRequestHandlerWithMetadata',\n getServer = 'NextServer.getServer',\n getServerRequestHandler = 'NextServer.getServerRequestHandler',\n createServer = 'createServer.createServer',\n}\n\nenum NextNodeServerSpan {\n compression = 'NextNodeServer.compression',\n getBuildId = 'NextNodeServer.getBuildId',\n createComponentTree = 'NextNodeServer.createComponentTree',\n clientComponentLoading = 'NextNodeServer.clientComponentLoading',\n getLayoutOrPageModule = 'NextNodeServer.getLayoutOrPageModule',\n generateStaticRoutes = 'NextNodeServer.generateStaticRoutes',\n generateFsStaticRoutes = 'NextNodeServer.generateFsStaticRoutes',\n generatePublicRoutes = 'NextNodeServer.generatePublicRoutes',\n generateImageRoutes = 'NextNodeServer.generateImageRoutes.route',\n sendRenderResult = 'NextNodeServer.sendRenderResult',\n proxyRequest = 'NextNodeServer.proxyRequest',\n runApi = 'NextNodeServer.runApi',\n render = 'NextNodeServer.render',\n renderHTML = 'NextNodeServer.renderHTML',\n imageOptimizer = 'NextNodeServer.imageOptimizer',\n getPagePath = 'NextNodeServer.getPagePath',\n getRoutesManifest = 'NextNodeServer.getRoutesManifest',\n findPageComponents = 'NextNodeServer.findPageComponents',\n getFontManifest = 'NextNodeServer.getFontManifest',\n getServerComponentManifest = 'NextNodeServer.getServerComponentManifest',\n getRequestHandler = 'NextNodeServer.getRequestHandler',\n renderToHTML = 'NextNodeServer.renderToHTML',\n renderError = 'NextNodeServer.renderError',\n renderErrorToHTML = 'NextNodeServer.renderErrorToHTML',\n render404 = 'NextNodeServer.render404',\n startResponse = 'NextNodeServer.startResponse',\n\n // nested inner span, does not require parent scope name\n route = 'route',\n onProxyReq = 'onProxyReq',\n apiResolver = 'apiResolver',\n internalFetch = 'internalFetch',\n}\n\nenum StartServerSpan {\n startServer = 'startServer.startServer',\n}\n\nenum RenderSpan {\n getServerSideProps = 'Render.getServerSideProps',\n getStaticProps = 'Render.getStaticProps',\n renderToString = 'Render.renderToString',\n renderDocument = 'Render.renderDocument',\n createBodyResult = 'Render.createBodyResult',\n}\n\nenum AppRenderSpan {\n renderToString = 'AppRender.renderToString',\n renderToReadableStream = 'AppRender.renderToReadableStream',\n getBodyResult = 'AppRender.getBodyResult',\n fetch = 'AppRender.fetch',\n waitShellReady = 'AppRender.waitShellReady',\n renderToNodeFizzStream = 'AppRender.renderToNodeFizzStream',\n instantInsights = 'AppRender.instantInsights',\n instantInsightsPrepareValidation = 'AppRender.instantInsights.prepareValidation',\n instantInsightsRunValidation = 'AppRender.instantInsights.runValidation',\n}\n\nenum RouterSpan {\n executeRoute = 'Router.executeRoute',\n}\n\nenum NodeSpan {\n runHandler = 'Node.runHandler',\n}\n\nenum AppRouteRouteHandlersSpan {\n runHandler = 'AppRouteRouteHandlers.runHandler',\n}\n\nenum ResolveMetadataSpan {\n generateMetadata = 'ResolveMetadata.generateMetadata',\n generateViewport = 'ResolveMetadata.generateViewport',\n}\n\nenum MiddlewareSpan {\n execute = 'Middleware.execute',\n}\n\ntype SpanTypes =\n | `${BaseServerSpan}`\n | `${LoadComponentsSpan}`\n | `${NextServerSpan}`\n | `${StartServerSpan}`\n | `${NextNodeServerSpan}`\n | `${RenderSpan}`\n | `${RouterSpan}`\n | `${AppRenderSpan}`\n | `${NodeSpan}`\n | `${AppRouteRouteHandlersSpan}`\n | `${ResolveMetadataSpan}`\n | `${MiddlewareSpan}`\n\n// This list is used to filter out spans that are not relevant to the user\nexport const NextVanillaSpanAllowlist = new Set([\n MiddlewareSpan.execute,\n BaseServerSpan.haLine truncated
|
||||
{"offset": {"line": 1929, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/tracer.ts"],"sourcesContent":["import type { FetchEventResult } from '../../web/types'\nimport type { TextMapSetter } from '@opentelemetry/api'\nimport type { SpanTypes } from './constants'\nimport type { LocalSpanRecorder } from './local-span-recorder'\nimport { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'\n\nimport type {\n Context,\n ContextAPI,\n Span,\n SpanOptions,\n Tracer,\n AttributeValue,\n TextMapGetter,\n} from 'next/dist/compiled/@opentelemetry/api'\nimport { isThenable } from '../../../shared/lib/is-thenable'\n\nconst NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX\nconst LOCAL_SPAN_RECORDER_KEY = Symbol.for('@next/local-span-recorder')\n\ntype GlobalWithLocalSpanRecorder = typeof globalThis & {\n [LOCAL_SPAN_RECORDER_KEY]?: LocalSpanRecorder\n}\n\nlet api: typeof import('next/dist/compiled/@opentelemetry/api')\n\nfunction getLocalSpanRecorder() {\n if (process.env.__NEXT_DEV_SERVER) {\n return (globalThis as GlobalWithLocalSpanRecorder)[LOCAL_SPAN_RECORDER_KEY]\n } else {\n return undefined\n }\n}\n\n// we want to allow users to use their own version of @opentelemetry/api if they\n// want to, so we try to require it first, and if it fails we fall back to the\n// version that is bundled with Next.js\n// this is because @opentelemetry/api has to be synced with the version of\n// @opentelemetry/tracing that is used, and we don't want to force users to use\n// the version that is bundled with Next.js.\n// the API is ~stable, so this should be fine\nif (process.env.NEXT_RUNTIME === 'edge') {\n api = require('@opentelemetry/api') as typeof import('@opentelemetry/api')\n} else {\n try {\n api = require('@opentelemetry/api') as typeof import('@opentelemetry/api')\n } catch (err) {\n api =\n require('next/dist/compiled/@opentelemetry/api') as typeof import('next/dist/compiled/@opentelemetry/api')\n }\n}\n\nconst { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } =\n api\n\nexport class BubbledError extends Error {\n constructor(\n public readonly bubble?: boolean,\n public readonly result?: FetchEventResult\n ) {\n super()\n }\n}\n\nexport function isBubbledError(error: unknown): error is BubbledError {\n if (typeof error !== 'object' || error === null) return false\n return error instanceof BubbledError\n}\n\nconst closeSpanWithError = (span: Span, error?: Error) => {\n if (isBubbledError(error) && error.bubble) {\n span.setAttribute('next.bubble', true)\n } else {\n if (error) {\n span.recordException(error)\n span.setAttribute('error.type', error.name)\n }\n span.setStatus({ code: SpanStatusCode.ERROR, message: error?.message })\n }\n span.end()\n}\n\ntype TracerSpanOptions = Omit<SpanOptions, 'attributes'> & {\n parentSpan?: Span\n spanName?: string\n attributes?: Partial<Record<AttributeNames, AttributeValue | undefined>>\n hideSpan?: boolean\n}\n\ninterface NextTracer {\n getContext(): ContextAPI\n\n /**\n * Instruments a function by automatically creating a span activated on its\n * scope.\n *\n * The span will automatically be finished when one of these conditions is\n * met:\n *\n * * The function returns a promise, in which case the span will finish when\n * the promise is resolved or rejected.\n * * The function takes a callback as its second parameter, in which case the\n * span will finish when that callback is called.\n * * The function doesn't accept a callback and doesn't return a promise, in\n * which case the span will finish at the end of the function execution.\n *\n */\n trace<T>(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise<T>\n ): Promise<T>\n trace<T>(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => T\n ): T\n trace<T>(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise<T>\n ): Promise<T>\n trace<T>(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: (span?: Span, done?: (error?: Error) => any) => T\n ): T\n\n /**\n * Wrap a function to automatically create a span activated on its\n * scope when it's called.\n *\n * The span will automatically be finished when one of these conditions is\n * met:\n *\n * * The function returns a promise, in which case the span will finish when\n * the promise is resolved or rejected.\n * * The function takes a callback as its last parameter, in which case the\n * span will finish when that callback is called.\n * * The function doesn't accept a callback and doesn't return a promise, in\n * which case the span will finish at the end of the function execution.\n */\n wrap<T = (...args: Array<any>) => any>(type: SpanTypes, fn: T): T\n wrap<TLine truncated
|
||||
{"offset": {"line": 2302, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/pipe-readable.ts"],"sourcesContent":["import type { ServerResponse } from 'node:http'\nimport type { Readable } from 'node:stream'\n\nimport {\n ResponseAbortedName,\n createAbortController,\n} from './web/spec-extension/adapters/next-request'\nimport { DetachedPromise } from '../lib/detached-promise'\nimport { getTracer } from './lib/trace/tracer'\nimport { NextNodeServerSpan } from './lib/trace/constants'\nimport { getClientComponentLoaderMetrics } from './client-component-renderer-logger'\n\nexport function isAbortError(e: any): e is Error & { name: 'AbortError' } {\n return e?.name === 'AbortError' || e?.name === ResponseAbortedName\n}\n\nconst HAS_CLIENT_COMPONENT_METRICS_ENABLED =\n 'performance' in globalThis && process.env.NEXT_OTEL_PERFORMANCE_PREFIX\n\nfunction createWriterFromResponse(\n res: ServerResponse,\n waitUntilForEnd?: Promise<unknown>\n): WritableStream<Uint8Array> {\n let started = false\n\n // Create a promise that will resolve once the response has drained. See\n // https://nodejs.org/api/stream.html#stream_event_drain\n let drained = new DetachedPromise<void>()\n function onDrain() {\n drained.resolve()\n }\n res.on('drain', onDrain)\n\n // If the finish event fires, it means we shouldn't block and wait for the\n // drain event.\n res.once('close', () => {\n res.off('drain', onDrain)\n drained.resolve()\n })\n\n // Create a promise that will resolve once the response has finished. See\n // https://nodejs.org/api/http.html#event-finish_1\n const finished = new DetachedPromise<void>()\n res.once('finish', () => {\n finished.resolve()\n })\n\n // Create a writable stream that will write to the response.\n return new WritableStream<Uint8Array>({\n write: async (chunk) => {\n // You'd think we'd want to use `start` instead of placing this in `write`\n // but this ensures that we don't actually flush the headers until we've\n // started writing chunks.\n if (!started) {\n started = true\n\n if (HAS_CLIENT_COMPONENT_METRICS_ENABLED) {\n const metrics = getClientComponentLoaderMetrics()\n if (metrics) {\n performance.measure(\n `${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,\n {\n start: metrics.clientComponentLoadStart,\n end:\n metrics.clientComponentLoadStart +\n metrics.clientComponentLoadTimes,\n }\n )\n }\n }\n\n res.flushHeaders()\n getTracer().trace(\n NextNodeServerSpan.startResponse,\n {\n spanName: 'start response',\n },\n () => undefined\n )\n }\n\n try {\n const ok = res.write(chunk)\n\n // Added by the `compression` middleware, this is a function that will\n // flush the partially-compressed response to the client.\n if ('flush' in res && typeof res.flush === 'function') {\n res.flush()\n }\n\n // If the write returns false, it means there's some backpressure, so\n // wait until it's streamed before continuing.\n if (!ok) {\n await drained.promise\n\n // Reset the drained promise so that we can wait for the next drain event.\n drained = new DetachedPromise<void>()\n }\n } catch (err) {\n res.end()\n throw new Error('failed to write chunk to response', { cause: err })\n }\n },\n abort: (err) => {\n if (res.writableFinished) return\n\n res.destroy(err)\n },\n close: async () => {\n // if a waitUntil promise was passed, wait for it to resolve before\n // ending the response.\n if (waitUntilForEnd) {\n await waitUntilForEnd\n }\n\n if (res.writableFinished) return\n\n res.end()\n return finished.promise\n },\n })\n}\n\nexport async function pipeToNodeResponse(\n readable: ReadableStream<Uint8Array>,\n res: ServerResponse,\n waitUntilForEnd?: Promise<unknown>\n) {\n try {\n // If the response has already errored, then just return now.\n const { errored, destroyed } = res\n if (errored || destroyed) return\n\n // Create a new AbortController so that we can abort the readable if the\n // client disconnects.\n const controller = createAbortController(res)\n\n const writer = createWriterFromResponse(res, waitUntilForEnd)\n\n await readable.pipeTo(writer, { signal: controller.signal })\n } catch (err: any) {\n // If this isn't related to an abort error, re-throw it.\n if (isAbortError(err)) return\n\n throw new Error('failed to pipe response', { cause: err })\n }\n}\n\nexport async function pipeNodeReadableToNodeResponse(\n readable: Readable,\n res: ServerResponse,\n waitUntilForEnd?Line truncated
|
||||
{"offset": {"line": 2503, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/render-result.ts"],"sourcesContent":["import type { OutgoingHttpHeaders, ServerResponse } from 'http'\nimport type { Readable } from 'stream'\nimport type { CacheControl } from './lib/cache-control'\nimport type { FetchMetrics } from './base-http'\nimport type { PrefetchHints } from '../shared/lib/app-router-types'\n\nimport {\n chainStreams,\n streamFromBuffer,\n streamFromString,\n streamToString,\n} from './stream-utils/node-web-streams-helper'\nimport {\n isAbortError,\n pipeToNodeResponse,\n pipeNodeReadableToNodeResponse,\n} from './pipe-readable'\nimport type { RenderResumeDataCache } from './resume-data-cache/resume-data-cache'\nimport { InvariantError } from '../shared/lib/invariant-error'\nimport type {\n HTML_CONTENT_TYPE_HEADER,\n JSON_CONTENT_TYPE_HEADER,\n TEXT_PLAIN_CONTENT_TYPE_HEADER,\n} from '../lib/constants'\nimport type { RSC_CONTENT_TYPE_HEADER } from '../client/components/app-router-headers'\n\ntype ContentTypeOption =\n | typeof RSC_CONTENT_TYPE_HEADER // For App Page RSC responses\n | typeof HTML_CONTENT_TYPE_HEADER // For App Page, Pages HTML responses\n | typeof JSON_CONTENT_TYPE_HEADER // For API routes, Next.js data requests\n | typeof TEXT_PLAIN_CONTENT_TYPE_HEADER // For simplified errors\n\nexport type AppPageRenderResultMetadata = {\n flightData?: Buffer\n cacheControl?: CacheControl\n staticBailoutInfo?: {\n stack?: string\n description?: string\n }\n\n /**\n * The postponed state if the render had postponed and needs to be resumed.\n */\n postponed?: string\n\n /**\n * Whether the prerender left any UI pending in a Suspense boundary. This is\n * reported directly by React's prerender result before Next.js resumes\n * client-only boundaries.\n */\n hasPendingUi?: boolean\n\n /**\n * The headers to set on the response that were added by the render.\n */\n headers?: OutgoingHttpHeaders\n statusCode?: number\n fetchTags?: string\n fetchMetrics?: FetchMetrics\n\n segmentData?: Map<string, Buffer>\n\n /**\n * Per-route prefetch hints computed at build time (e.g. segment inlining\n * decisions based on gzip sizes). Written to prefetch-hints.json by the\n * build pipeline.\n */\n prefetchHints?: PrefetchHints\n\n /**\n * In development, the resume data cache is warmed up before the render. This\n * is attached to the metadata so that it can be used during the render. When\n * prerendering, the filled resume data cache is also attached to the metadata\n * so that it can be used when prerendering matching fallback shells.\n */\n renderResumeDataCache?: RenderResumeDataCache\n}\n\nexport type PagesRenderResultMetadata = {\n pageData?: any\n cacheControl?: CacheControl\n isNotFound?: boolean\n isRedirect?: boolean\n}\n\nexport type StaticRenderResultMetadata = {}\n\nexport type RenderResultMetadata = AppPageRenderResultMetadata &\n PagesRenderResultMetadata &\n StaticRenderResultMetadata\n\nexport type RenderResultResponse =\n | ReadableStream<Uint8Array>[]\n | ReadableStream<Uint8Array>\n | Readable\n | string\n | Buffer\n | null\n\nexport type RenderResultOptions<\n Metadata extends RenderResultMetadata = RenderResultMetadata,\n> = {\n contentType: ContentTypeOption | null\n waitUntil?: Promise<unknown>\n metadata: Metadata\n}\n\nfunction isNodeReadable(value: unknown): value is Readable {\n return (\n value !== null &&\n typeof value === 'object' &&\n typeof (value as Record<string, unknown>).pipe === 'function' &&\n typeof (value as Record<string, unknown>).on === 'function' &&\n !(value instanceof ReadableStream)\n )\n}\n\nexport default class RenderResult<\n Metadata extends RenderResultMetadata = RenderResultMetadata,\n> {\n /**\n * The detected content type for the response. This is used to set the\n * `Content-Type` header.\n */\n public readonly contentType: ContentTypeOption | null\n\n /**\n * The metadata for the response. This is used to set the revalidation times\n * and other metadata.\n */\n public readonly metadata: Readonly<Metadata>\n\n /**\n * The response itself. This can be a string, a stream, or null. If it's a\n * string, then it's a static response. If it's a stream, then it's a\n * dynamic response. If it's null, then the response was not found or was\n * already sent.\n */\n private response: RenderResultResponse\n\n /**\n * A render result that represents an empty response. This is used to\n * represent a response that was not found or was already sent.\n */\n public static readonly EMPTY = new RenderResult<StaticRenderResultMetadata>(\n null,\n { metadata: {}, contentType: null }\n )\n\n /**\n * Creates a new RenderResult instance from a static response.\n *\n * @param value the static response value\n * @param contentType the content type of the response\n Line truncated
|
||||
{"offset": {"line": 2738, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request-meta.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'http'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { UrlWithParsedQuery } from 'url'\nimport type { BaseNextRequest } from './base-http'\nimport type { CloneableBody } from './body-streams'\nimport type { RouteMatch } from './route-matches/route-match'\nimport type { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\nimport type {\n ResponseCacheEntry,\n ServerComponentsHmrCache,\n} from './response-cache'\nimport type { PagesDevOverlayBridgeType } from '../next-devtools/userspace/pages/pages-dev-overlay-setup'\nimport type { OpaqueFallbackRouteParams } from './request/fallback-params'\nimport type { IncrementalCache } from './lib/incremental-cache'\nimport type { RevalidateFn } from './lib/router-utils/router-server-context'\nimport type { NextRequest } from './web/exports'\n\n// FIXME: (wyattjoh) this is a temporary solution to allow us to pass data between bundled modules\nexport const NEXT_REQUEST_META = Symbol.for('NextInternalRequestMeta')\n\nexport type NextIncomingMessage = (\n | BaseNextRequest\n | IncomingMessage\n | NextRequest\n) & {\n [NEXT_REQUEST_META]?: RequestMeta\n}\n\n/**\n * The callback function to call when a response cache entry was generated or\n * looked up in the cache. When it returns true, the server assumes that the\n * handler has already responded to the request and will not do so itself.\n */\nexport type OnCacheEntryHandler = (\n /**\n * The response cache entry that was generated or looked up in the cache.\n */\n cacheEntry: ResponseCacheEntry,\n\n /**\n * The request metadata.\n */\n requestMeta: {\n /**\n * The URL that was used to make the request.\n */\n url: string | undefined\n }\n) => Promise<boolean | void> | boolean | void\n\nexport interface RequestMeta {\n /**\n * The query that was used to make the request.\n */\n initQuery?: ParsedUrlQuery\n\n /**\n * The URL that was used to make the request.\n */\n initURL?: string\n\n /**\n * The protocol that was used to make the request.\n */\n initProtocol?: string\n\n /**\n * The body that was read from the request. This is used to allow the body to\n * be read multiple times.\n */\n clonableBody?: CloneableBody\n\n /**\n * True when the request matched a locale domain that was configured in the\n * next.config.js file.\n */\n isLocaleDomain?: boolean\n\n /**\n * True when the request had locale information stripped from the pathname\n * part of the URL.\n */\n didStripLocale?: boolean\n\n /**\n * If the request had its URL rewritten, this is the pathname it was rewritten\n * to (not a full URL, just the pathname).\n */\n rewrittenPathname?: string\n\n /**\n * The resolved pathname for the request. Dynamic route params are\n * interpolated, the pathname is decoded, and the trailing slash is removed.\n */\n resolvedPathname?: string\n\n /**\n * The cookies that were added by middleware and were added to the response.\n */\n middlewareCookie?: string[]\n\n /**\n * The match on the request for a given route.\n */\n match?: RouteMatch\n\n /**\n * The incremental cache to use for the request.\n */\n incrementalCache?: IncrementalCache\n\n /**\n * The server components HMR cache, only for dev.\n */\n serverComponentsHmrCache?: ServerComponentsHmrCache\n\n /**\n * The hash of the most recent server component change (dev only), set by the\n * router-server from the hot-reloader. Included in `\"use cache\"` cache keys\n * so that cached entries are revalidated after an edit, for every client,\n * regardless of whether it runs the HMR client.\n */\n hmrRefreshHash?: string\n\n /**\n * Equals the segment path that was used for the prefetch RSC request.\n */\n segmentPrefetchRSCRequest?: string\n\n /**\n * True when the request is for the prefetch flight data.\n */\n isPrefetchRSCRequest?: true\n\n /**\n * True when the request is for the flight data.\n */\n isRSCRequest?: true\n\n /**\n * A search param set by the Next.js client when performing RSC requests.\n * Because some CDNs do not vary their cache entries on our custom headers,\n * this search param represents a hash of the header values. For any cached\n * RSC request, we should verify that the hash matches before responding.\n * Otherwise this can lead to cache poisoning.\n * TODO: Consider not using custom request headers at all, and instead encode\n * everything into the search param.\n */\n cacheBustingSearchParam?: string\n\n /**\n * True when the request is for the `/_next/data` route using the pages\n * router.\n */\n isNextDataReq?: true\n\n /**\n * Postponed state to use for resumption. When absent, the request is not a\n * Line truncated
|
||||
{"offset": {"line": 2774, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/response-cache/index.ts"],"sourcesContent":["import type {\n ResponseCacheEntry,\n ResponseGenerator,\n ResponseCacheBase,\n IncrementalResponseCacheEntry,\n IncrementalResponseCache,\n} from './types'\n\nimport { Batcher } from '../../lib/batcher'\nimport { LRUCache } from '../lib/lru-cache'\nimport { warnOnce } from '../../build/output/log'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport {\n fromResponseCacheEntry,\n routeKindToIncrementalCacheKind,\n toResponseCacheEntry,\n} from './utils'\nimport type { RouteKind } from '../route-kind'\n\n/**\n * Parses an environment variable as a positive integer, returning the fallback\n * if the value is missing, not a number, or not positive.\n */\nfunction parsePositiveInt(\n envValue: string | undefined,\n fallback: number\n): number {\n if (!envValue) return fallback\n const parsed = parseInt(envValue, 10)\n return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback\n}\n\n/**\n * Default TTL (in milliseconds) for minimal mode response cache entries.\n * Used for cache hit validation as a fallback for providers that don't\n * send the x-invocation-id header yet.\n *\n * 10 seconds chosen because:\n * - Long enough to dedupe rapid successive requests (e.g., page + data)\n * - Short enough to not serve stale data across unrelated requests\n *\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_TTL` environment variable.\n */\nconst DEFAULT_TTL_MS = parsePositiveInt(\n process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL,\n 10_000\n)\n\n/**\n * Default maximum number of entries in the response cache.\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE` environment variable.\n */\nconst DEFAULT_MAX_SIZE = parsePositiveInt(\n process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE,\n 150\n)\n\n/**\n * Separator used in compound cache keys to join pathname and invocationID.\n * Using null byte (\\0) since it cannot appear in valid URL paths or UUIDs.\n */\nconst KEY_SEPARATOR = '\\0'\n\n/**\n * Sentinel value used for TTL-based cache entries (when invocationID is undefined).\n * Chosen to be a clearly reserved marker for internal cache keys.\n */\nconst TTL_SENTINEL = '__ttl_sentinel__'\n\n/**\n * Entry stored in the LRU cache.\n */\ntype CacheEntry = {\n entry: IncrementalResponseCacheEntry | null\n /**\n * TTL expiration timestamp in milliseconds. Used as a fallback for\n * cache hit validation when providers don't send x-invocation-id.\n * Memory pressure is managed by LRU eviction rather than timers.\n */\n expiresAt: number\n}\n\n/**\n * Creates a compound cache key from pathname and invocationID.\n */\nfunction createCacheKey(\n pathname: string,\n invocationID: string | undefined\n): string {\n return `${pathname}${KEY_SEPARATOR}${invocationID ?? TTL_SENTINEL}`\n}\n\n/**\n * Extracts the invocationID from a compound cache key.\n * Returns undefined if the key used TTL_SENTINEL.\n */\nfunction extractInvocationID(compoundKey: string): string | undefined {\n const separatorIndex = compoundKey.lastIndexOf(KEY_SEPARATOR)\n if (separatorIndex === -1) return undefined\n\n const invocationID = compoundKey.slice(separatorIndex + 1)\n return invocationID === TTL_SENTINEL ? undefined : invocationID\n}\n\nexport * from './types'\n\nexport default class ResponseCache implements ResponseCacheBase {\n private readonly getBatcher = Batcher.create<\n { key: string; isOnDemandRevalidate: boolean },\n IncrementalResponseCacheEntry | null,\n string\n >({\n // Ensure on-demand revalidate doesn't block normal requests, it should be\n // safe to run an on-demand revalidate for the same key as a normal request.\n cacheKeyFn: ({ key, isOnDemandRevalidate }) =>\n `${key}-${isOnDemandRevalidate ? '1' : '0'}`,\n // We wait to do any async work until after we've added our promise to\n // `pendingResponses` to ensure that any any other calls will reuse the\n // same promise until we've fully finished our work.\n schedulerFn: scheduleOnNextTick,\n })\n\n private readonly revalidateBatcher = Batcher.create<\n string,\n IncrementalResponseCacheEntry | null\n >({\n // We wait to do any async work until after we've added our promise to\n // `pendingResponses` to ensure that any any other calls will reuse the\n // same promise until we've fully finished our work.\n schedulerFn: scheduleOnNextTick,\n })\n\n /**\n * LRU cache for minimal mode using compound keys (pathname + invocationID).\n * This allows multiple invocations to cache the same pathname without\n * overwriting each other's entries.\n */\n private readonly cache: LRUCache<CacheEntry>\n\n /**\n * Set of invocation IDs that have had cache entries evicted.\n * Used to detect when the cache size may be too small.\n * Bounded to prevent memory growth.\n */\n privaLine truncated
|
||||
{"offset": {"line": 3084, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/response-cache/types.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\nimport type RenderResult from '../render-result'\nimport type { CacheControl, Revalidate } from '../lib/cache-control'\nimport type { RouteKind } from '../route-kind'\n\nexport interface ResponseCacheBase {\n get(\n key: string | null,\n responseGenerator: ResponseGenerator,\n context: {\n isOnDemandRevalidate?: boolean\n isPrefetch?: boolean\n incrementalCache: IncrementalCache\n /**\n * This is a hint to the cache to help it determine what kind of route\n * this is so it knows where to look up the cache entry from. If not\n * provided it will test the filesystem to check.\n */\n routeKind: RouteKind\n\n /**\n * True if this is a fallback request.\n */\n isFallback?: boolean\n\n /**\n * True if the route is enabled for PPR.\n */\n isRoutePPREnabled?: boolean\n }\n ): Promise<ResponseCacheEntry | null>\n}\n\n// The server components HMR cache might store other data as well in the future,\n// at which point this should be refactored to a discriminated union type.\nexport interface ServerComponentsHmrCache {\n get(key: string): CachedFetchData | undefined\n set(key: string, data: CachedFetchData): void\n}\n\nexport type CachedFetchData = {\n headers: Record<string, string>\n body: string\n url: string\n status?: number\n}\n\nexport const enum CachedRouteKind {\n APP_PAGE = 'APP_PAGE',\n APP_ROUTE = 'APP_ROUTE',\n PAGES = 'PAGES',\n FETCH = 'FETCH',\n REDIRECT = 'REDIRECT',\n IMAGE = 'IMAGE',\n}\n\nexport interface CachedFetchValue {\n kind: CachedRouteKind.FETCH\n data: CachedFetchData\n // tags are only present with file-system-cache\n // fetch cache stores tags outside of cache entry\n tags?: string[]\n revalidate: number\n}\n\nexport interface CachedRedirectValue {\n kind: CachedRouteKind.REDIRECT\n props: Object\n}\n\nexport interface CachedAppPageValue {\n kind: CachedRouteKind.APP_PAGE\n // this needs to be a RenderResult so since renderResponse\n // expects that type instead of a string\n html: RenderResult\n rscData: Buffer | undefined\n status: number | undefined\n postponed: string | undefined\n headers: OutgoingHttpHeaders | undefined\n segmentData: Map<string, Buffer> | undefined\n}\n\nexport interface CachedPageValue {\n kind: CachedRouteKind.PAGES\n // this needs to be a RenderResult so since renderResponse\n // expects that type instead of a string\n html: RenderResult\n pageData: Object\n status: number | undefined\n headers: OutgoingHttpHeaders | undefined\n}\n\nexport interface CachedRouteValue {\n kind: CachedRouteKind.APP_ROUTE\n // this needs to be a RenderResult so since renderResponse\n // expects that type instead of a string\n body: Buffer\n status: number\n headers: OutgoingHttpHeaders\n}\n\nexport interface CachedImageValue {\n kind: CachedRouteKind.IMAGE\n etag: string\n upstreamEtag: string\n buffer: Buffer\n extension: string\n revalidate?: number\n isMiss?: boolean\n isStale?: boolean\n}\n\nexport interface IncrementalCachedAppPageValue {\n kind: CachedRouteKind.APP_PAGE\n // this needs to be a string since the cache expects to store\n // the string value\n html: string\n rscData: Buffer | undefined\n headers: OutgoingHttpHeaders | undefined\n postponed: string | undefined\n status: number | undefined\n segmentData: Map<string, Buffer> | undefined\n}\n\nexport interface IncrementalCachedPageValue {\n kind: CachedRouteKind.PAGES\n // this needs to be a string since the cache expects to store\n // the string value\n html: string\n pageData: Object\n headers: OutgoingHttpHeaders | undefined\n status: number | undefined\n}\n\nexport interface IncrementalResponseCacheEntry {\n cacheControl?: CacheControl\n /**\n * timestamp in milliseconds to revalidate after\n */\n revalidateAfter?: Revalidate\n /**\n * `-1` here dictates a blocking revalidate should be used\n */\n isStale?: boolean | -1\n isMiss?: boolean\n isFallback?: boolean\n value: Exclude<IncrementalCacheValue, CachedFetchValue> | null\n}\n\nexport interface IncrementalFetchCacheEntry {\n /**\n * `-1` here dictates a blocking revalidate should be used\n */\n isStale?: boolean | -1\n value: CachedFetchValue\n}\n\nexport type IncrementalCacheEntry =\n | IncrementalResponseCacheEntry\n | IncrementalFetchCacheEntry\n\nexport type IncrementalCacheValue =\n | CachedRedirectValue\n | IncrementalCachedPageValue\n | IncrementalCachedAppPageValue\n | CachedImageValue\n | CachedFetchValue\n | CachedRouteValue\n\nexport type ResponseCacheValue =\n | CachedRedirectValue\n | CachedPageValue\n | CachedAppPageValue\n | CachedImageValue\n | CachedRouteValue\n\nexport type ResponseCacheEntry = {\n cacheCLine truncated
|
||||
{"offset": {"line": 3111, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/response-cache/utils.ts"],"sourcesContent":["import {\n CachedRouteKind,\n IncrementalCacheKind,\n type CachedAppPageValue,\n type CachedPageValue,\n type IncrementalResponseCacheEntry,\n type ResponseCacheEntry,\n} from './types'\n\nimport RenderResult from '../render-result'\nimport { RouteKind } from '../route-kind'\nimport { HTML_CONTENT_TYPE_HEADER } from '../../lib/constants'\n\nexport async function fromResponseCacheEntry(\n cacheEntry: ResponseCacheEntry\n): Promise<IncrementalResponseCacheEntry> {\n return {\n ...cacheEntry,\n value:\n cacheEntry.value?.kind === CachedRouteKind.PAGES\n ? {\n kind: CachedRouteKind.PAGES,\n html: await cacheEntry.value.html.toUnchunkedString(true),\n pageData: cacheEntry.value.pageData,\n headers: cacheEntry.value.headers,\n status: cacheEntry.value.status,\n }\n : cacheEntry.value?.kind === CachedRouteKind.APP_PAGE\n ? {\n kind: CachedRouteKind.APP_PAGE,\n html: await cacheEntry.value.html.toUnchunkedString(true),\n postponed: cacheEntry.value.postponed,\n rscData: cacheEntry.value.rscData,\n headers: cacheEntry.value.headers,\n status: cacheEntry.value.status,\n segmentData: cacheEntry.value.segmentData,\n }\n : cacheEntry.value,\n }\n}\n\nexport async function toResponseCacheEntry(\n response: IncrementalResponseCacheEntry | null\n): Promise<ResponseCacheEntry | null> {\n if (!response) return null\n\n return {\n isMiss: response.isMiss,\n isStale: response.isStale,\n cacheControl: response.cacheControl,\n isFallback: response.isFallback,\n value:\n response.value?.kind === CachedRouteKind.PAGES\n ? ({\n kind: CachedRouteKind.PAGES,\n html: RenderResult.fromStatic(\n response.value.html,\n HTML_CONTENT_TYPE_HEADER\n ),\n pageData: response.value.pageData,\n headers: response.value.headers,\n status: response.value.status,\n } satisfies CachedPageValue)\n : response.value?.kind === CachedRouteKind.APP_PAGE\n ? ({\n kind: CachedRouteKind.APP_PAGE,\n html: RenderResult.fromStatic(\n response.value.html,\n HTML_CONTENT_TYPE_HEADER\n ),\n rscData: response.value.rscData,\n headers: response.value.headers,\n status: response.value.status,\n postponed: response.value.postponed,\n segmentData: response.value.segmentData,\n } satisfies CachedAppPageValue)\n : response.value,\n }\n}\n\nexport function routeKindToIncrementalCacheKind(\n routeKind: RouteKind\n): Exclude<IncrementalCacheKind, IncrementalCacheKind.FETCH> {\n switch (routeKind) {\n case RouteKind.PAGES:\n return IncrementalCacheKind.PAGES\n case RouteKind.APP_PAGE:\n return IncrementalCacheKind.APP_PAGE\n case RouteKind.IMAGE:\n return IncrementalCacheKind.IMAGE\n case RouteKind.APP_ROUTE:\n return IncrementalCacheKind.APP_ROUTE\n case RouteKind.PAGES_API:\n // Pages Router API routes are not cached in the incremental cache.\n throw new Error(`Unexpected route kind ${routeKind}`)\n default:\n return routeKind satisfies never\n }\n}\n"],"names":["CachedRouteKind","IncrementalCacheKind","RenderResult","RouteKind","HTML_CONTENT_TYPE_HEADER","fromResponseCacheEntry","cacheEntry","value","kind","PAGES","html","toUnchunkedString","pageData","headers","status","APP_PAGE","postponed","rscData","segmentData","toResponseCacheEntry","response","isMiss","isStale","cacheControl","isFallback","fromStatic","routeKindToIncrementalCacheKind","routeKind","IMAGE","APP_ROUTE","PAGES_API","Error"],"mappings":";;;;;;;;AAAA,SACEA,eAAe,EACfC,oBAAoB,QAKf,UAAS;AAEhB,OAAOC,kBAAkB,mBAAkB;AAC3C,SAASC,SAAS,QAAQ,gBAAe;AACzC,SAASC,wBAAwB,QAAQ,sBAAqB;;;;;AAEvD,eAAeC,uBACpBC,UAA8B;QAK1BA,mBAQIA;IAXR,OAAO;QACL,GAAGA,UAAU;QACbC,OACED,CAAAA,CAAAA,oBAAAA,WAAWC,KAAK,KAAA,OAAA,KAAA,IAAhBD,kBAAkBE,IAAI,MAAKR,uLAAAA,CAAgBS,KAAK,GAC5C;YACED,MAAMR,uLAAAA,CAAgBS,KAAK;YAC3BC,MAAM,MAAMJ,WAAWC,KAAK,CAACG,IAAI,CAACC,iBAAiB,CAAC;YACpDC,UAAUN,WAAWC,KAAK,CAACK,QAAQ;YACnCC,SAASP,WAAWC,KAAK,CAACM,OAAO;YACjCC,QAAQR,WAAWC,KAAK,CAACO,MAAM;QACjC,IACAR,CAAAA,CAAAA,qBAAAA,WAAWC,KAAK,KAAA,OAAA,KAAA,IAAhBD,mBAAkBE,IAAI,MAAKR,uLAAAA,CAAgBe,QAAQ,GACjD;YACEP,MAAMR,uLAAAA,CAAgBe,QAAQ;YAC9BL,MAAM,MAAMJ,WAAWC,KAAK,CAACG,IAAI,CAACC,iBAAiB,CAAC;YACpDK,WAAWV,WAAWC,KAAK,CAACS,SAAS;YACrCC,SAASX,WAAWC,KAAK,CAACU,OAAO;YACjCJ,SAASP,WAAWC,KAAK,CAACM,OAAO;YACjCC,QAAQR,WAAWC,KAAK,CAACO,MAAM;YAC/BI,aAAaZ,WAAWC,KAAK,CAACW,WAAW;QAC3C,IACAZ,WAAWC,KAAK;IAC1B;AACF;AAEO,eAAeY,qBACpBC,QAA8C;Line truncated
|
||||
{"offset": {"line": 3198, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-kind.ts"],"sourcesContent":["export const enum RouteKind {\n /**\n * `PAGES` represents all the React pages that are under `pages/`.\n */\n PAGES = 'PAGES',\n /**\n * `PAGES_API` represents all the API routes under `pages/api/`.\n */\n PAGES_API = 'PAGES_API',\n /**\n * `APP_PAGE` represents all the React pages that are under `app/` with the\n * filename of `page.{j,t}s{,x}`.\n */\n APP_PAGE = 'APP_PAGE',\n /**\n * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n * filename of `route.{j,t}s{,x}`.\n */\n APP_ROUTE = 'APP_ROUTE',\n\n /**\n * `IMAGE` represents all the images that are generated by `next/image`.\n */\n IMAGE = 'IMAGE',\n}\n"],"names":["RouteKind"],"mappings":";;;;AAAO,IAAWA,YAAAA,WAAAA,GAAAA,SAAAA,SAAAA;IAChB;;GAEC,GAAA,SAAA,CAAA,QAAA,GAAA;IAED;;GAEC,GAAA,SAAA,CAAA,YAAA,GAAA;IAED;;;GAGC,GAAA,SAAA,CAAA,WAAA,GAAA;IAED;;;GAGC,GAAA,SAAA,CAAA,YAAA,GAAA;IAGD;;GAEC,GAAA,SAAA,CAAA,QAAA,GAAA;WAtBeA;MAwBjB","ignoreList":[0]}},
|
||||
{"offset": {"line": 3225, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/pages/module.compiled.js"],"sourcesContent":["if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/pages/module.js')\n} else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/pages-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/pages.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/pages-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/pages.runtime.prod.js')\n }\n }\n}\n"],"names":["process","env","NEXT_RUNTIME","module","exports","require","NODE_ENV","TURBOPACK"],"mappings":"AAAA,IAAIA,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;KAElC;IACL,IAAIF,QAAQC,GAAG,CAACK,QAAQ,KAAK,WAAe;QAC1C,IAAIN,QAAQC,GAAG,CAACM,SAAS,eAAE;YACzBJ,OAAOC,OAAO,GAAGC,QAAQ;QAC3B,OAAO;;IAGT,OAAO;;AAOT","ignoreList":[0]}},
|
||||
{"offset": {"line": 3240, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/pages/pages-handler.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'node:http'\nimport type { ParsedUrlQuery } from 'node:querystring'\nimport { RouteKind } from '../../route-kind'\nimport { BaseServerSpan } from '../../lib/trace/constants'\nimport { getTracer, SpanKind, type Span } from '../../lib/trace/tracer'\nimport { formatUrl } from '../../../shared/lib/router/utils/format-url'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n type RequestMeta,\n} from '../../request-meta'\nimport { interopDefault } from '../../app-render/interop-default'\nimport { getRevalidateReason } from '../../instrumentation/utils'\nimport { normalizeDataPath } from '../../../shared/lib/page-path/normalize-data-path'\nimport {\n CachedRouteKind,\n type CachedPageValue,\n type CachedRedirectValue,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../response-cache'\n\nimport {\n getCacheControlHeader,\n type CacheControl,\n} from '../../lib/cache-control'\nimport { normalizeRepeatedSlashes } from '../../../shared/lib/utils'\nimport { getRedirectStatus } from '../../../lib/redirect-status'\nimport {\n CACHE_ONE_YEAR_SECONDS,\n HTML_CONTENT_TYPE_HEADER,\n JSON_CONTENT_TYPE_HEADER,\n NEXT_NAV_DEPLOYMENT_ID_HEADER,\n} from '../../../lib/constants'\nimport path from 'path'\nimport { sendRenderResult } from '../../send-payload'\nimport RenderResult from '../../render-result'\nimport { toResponseCacheEntry } from '../../response-cache/utils'\nimport { NoFallbackError } from '../../../shared/lib/no-fallback-error.external'\nimport { RedirectStatusCode } from '../../../client/components/redirect-status-code'\nimport { isBot } from '../../../shared/lib/router/utils/is-bot'\nimport { addPathPrefix } from '../../../shared/lib/router/utils/add-path-prefix'\nimport { removeTrailingSlash } from '../../../shared/lib/router/utils/remove-trailing-slash'\nimport type { PagesRouteModule } from './module.compiled'\nimport type {\n GetServerSideProps,\n GetStaticPaths,\n GetStaticProps,\n} from '../../../types'\n\nexport const getHandler = ({\n srcPage: originalSrcPage,\n config,\n userland,\n routeModule,\n isFallbackError,\n getStaticPaths,\n getStaticProps,\n getServerSideProps,\n}: {\n srcPage: string\n config: Record<string, any> | undefined\n userland: any\n isFallbackError?: boolean\n routeModule: PagesRouteModule\n getStaticProps?: GetStaticProps\n getStaticPaths?: GetStaticPaths\n getServerSideProps?: GetServerSideProps\n}) => {\n return async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n requestMeta?: RequestMeta\n }\n ) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta)\n }\n if (routeModule.isDev) {\n addRequestMeta(\n req,\n 'devRequestTimingInternalsEnd',\n process.hrtime.bigint()\n )\n }\n let srcPage = originalSrcPage\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/'\n }\n const multiZoneDraftMode = process.env\n .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode,\n })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return\n }\n\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n const render404 = async () => {\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext?.render404) {\n // When the Pages and App Routers coexist, a Pages Router 404 renders\n // the App Router not-found page. A direct route-module invocation\n // cannot provide the postponed state needed to resume that App Router\n // output, so an empty postponed state signals that the renderer must\n // perform a complete dynamic render instead.\n //\n // TODO: Re-enter routing with the App Router not-found output so its\n // prerender and postponed state can be selected and resumed.\n if (\n nextConfig.cacheComponents &&\n !routerServerContext.isWrappedByNextServer &&\n typeof getRequestMeta(req, 'postponed') !== 'string'\n ) {\n addRequestMeta(req, 'postponed', '')\n }\n await routerServerContext.render404(req, res, parsedUrl, false)\n Line truncated
|
||||
{"offset": {"line": 3821, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/send-payload.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'http'\nimport type RenderResult from './render-result'\nimport type { CacheControl } from './lib/cache-control'\n\nimport { isResSent } from '../shared/lib/utils'\nimport { generateETag } from './lib/etag'\nimport fresh from 'next/dist/compiled/fresh'\nimport { getCacheControlHeader } from './lib/cache-control'\nimport { HTML_CONTENT_TYPE_HEADER } from '../lib/constants'\n\nexport function sendEtagResponse(\n req: IncomingMessage,\n res: ServerResponse,\n etag: string | undefined\n): boolean {\n if (etag) {\n /**\n * The server generating a 304 response MUST generate any of the\n * following header fields that would have been sent in a 200 (OK)\n * response to the same request: Cache-Control, Content-Location, Date,\n * ETag, Expires, and Vary. https://tools.ietf.org/html/rfc7232#section-4.1\n */\n res.setHeader('ETag', etag)\n }\n\n if (fresh(req.headers, { etag })) {\n res.statusCode = 304\n res.end()\n return true\n }\n\n return false\n}\n\nexport async function sendRenderResult({\n req,\n res,\n result,\n generateEtags,\n poweredByHeader,\n cacheControl,\n}: {\n req: IncomingMessage\n res: ServerResponse\n result: RenderResult\n generateEtags: boolean\n poweredByHeader: boolean\n cacheControl: CacheControl | undefined\n}): Promise<void> {\n if (isResSent(res)) {\n return\n }\n\n if (poweredByHeader && result.contentType === HTML_CONTENT_TYPE_HEADER) {\n res.setHeader('X-Powered-By', 'Next.js')\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheControl && !res.getHeader('Cache-Control')) {\n res.setHeader('Cache-Control', getCacheControlHeader(cacheControl))\n }\n\n const payload = result.isDynamic ? null : result.toUnchunkedString()\n\n if (generateEtags && payload !== null) {\n const etag = generateETag(payload)\n if (sendEtagResponse(req, res, etag)) {\n return\n }\n }\n\n if (!res.getHeader('Content-Type') && result.contentType) {\n res.setHeader('Content-Type', result.contentType)\n }\n\n if (payload) {\n res.setHeader('Content-Length', Buffer.byteLength(payload))\n }\n\n if (req.method === 'HEAD') {\n res.end(null)\n return\n }\n\n if (payload !== null) {\n res.end(payload)\n return\n }\n\n // Pipe the render result to the response after we get a writer for it.\n await result.pipeToNodeResponse(res)\n}\n"],"names":["isResSent","generateETag","fresh","getCacheControlHeader","HTML_CONTENT_TYPE_HEADER","sendEtagResponse","req","res","etag","setHeader","headers","statusCode","end","sendRenderResult","result","generateEtags","poweredByHeader","cacheControl","contentType","getHeader","payload","isDynamic","toUnchunkedString","Buffer","byteLength","method","pipeToNodeResponse"],"mappings":";;;;;;AAIA,SAASA,SAAS,QAAQ,sBAAqB;AAC/C,SAASC,YAAY,QAAQ,aAAY;AACzC,OAAOC,WAAW,2BAA0B;AAC5C,SAASC,qBAAqB,QAAQ,sBAAqB;AAC3D,SAASC,wBAAwB,QAAQ,mBAAkB;;;;;;AAEpD,SAASC,iBACdC,GAAoB,EACpBC,GAAmB,EACnBC,IAAwB;IAExB,IAAIA,MAAM;QACR;;;;;KAKC,GACDD,IAAIE,SAAS,CAAC,QAAQD;IACxB;IAEA,QAAIN,8JAAAA,EAAMI,IAAII,OAAO,EAAE;QAAEF;IAAK,IAAI;QAChCD,IAAII,UAAU,GAAG;QACjBJ,IAAIK,GAAG;QACP,OAAO;IACT;IAEA,OAAO;AACT;AAEO,eAAeC,iBAAiB,EACrCP,GAAG,EACHC,GAAG,EACHO,MAAM,EACNC,aAAa,EACbC,eAAe,EACfC,YAAY,EAQb;IACC,QAAIjB,mKAAAA,EAAUO,MAAM;QAClB;IACF;IAEA,IAAIS,mBAAmBF,OAAOI,WAAW,KAAKd,4KAAAA,EAA0B;QACtEG,IAAIE,SAAS,CAAC,gBAAgB;IAChC;IAEA,2DAA2D;IAC3D,6DAA6D;IAC7D,IAAIQ,gBAAgB,CAACV,IAAIY,SAAS,CAAC,kBAAkB;QACnDZ,IAAIE,SAAS,CAAC,qBAAiBN,0LAAAA,EAAsBc;IACvD;IAEA,MAAMG,UAAUN,OAAOO,SAAS,GAAG,OAAOP,OAAOQ,iBAAiB;IAElE,IAAIP,iBAAiBK,YAAY,MAAM;QACrC,MAAMZ,WAAOP,qKAAAA,EAAamB;QAC1B,IAAIf,iBAAiBC,KAAKC,KAAKC,OAAO;YACpC;QACF;IACF;IAEA,IAAI,CAACD,IAAIY,SAAS,CAAC,mBAAmBL,OAAOI,WAAW,EAAE;QACxDX,IAAIE,SAAS,CAAC,gBAAgBK,OAAOI,WAAW;IAClD;IAEA,IAAIE,SAAS;QACXb,IAAIE,SAAS,CAAC,kBAAkBc,OAAOC,UAAU,CAACJ;IACpD;IAEA,IAAId,IAAImB,MAAM,KAAK,QAAQ;QACzBlB,IAAIK,GAAG,CAAC;QACR;IACF;IAEA,IAAIQ,YAAY,MAAM;QACpBb,IAAIK,GAAG,CAACQ;QACR;IACF;IAEA,uEAAuE;IACvE,MAAMN,OAAOY,kBAAkB,CAACnB;AAClC","ignoreList":[0]}},
|
||||
{"offset": {"line": 3895, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/stream-utils/encoded-tags.ts"],"sourcesContent":["export const ENCODED_TAGS = {\n // opening tags do not have the closing `>` since they can contain other attributes such as `<body className=''>`\n OPENING: {\n // <html\n HTML: new Uint8Array([60, 104, 116, 109, 108]),\n // <head\n HEAD: new Uint8Array([60, 104, 101, 97, 100]),\n // <body\n BODY: new Uint8Array([60, 98, 111, 100, 121]),\n },\n CLOSED: {\n // </head>\n HEAD: new Uint8Array([60, 47, 104, 101, 97, 100, 62]),\n // </body>\n BODY: new Uint8Array([60, 47, 98, 111, 100, 121, 62]),\n // </html>\n HTML: new Uint8Array([60, 47, 104, 116, 109, 108, 62]),\n // </body></html>\n BODY_AND_HTML: new Uint8Array([\n 60, 47, 98, 111, 100, 121, 62, 60, 47, 104, 116, 109, 108, 62,\n ]),\n },\n META: {\n // Only the match the prefix cause the suffix can be different wether it's xml compatible or not \">\" or \"/>\"\n // <meta name=\"«nxt-icon»\"\n // This is a special mark that will be replaced by the icon insertion script tag.\n ICON_MARK: new Uint8Array([\n 60, 109, 101, 116, 97, 32, 110, 97, 109, 101, 61, 34, 194, 171, 110, 120,\n 116, 45, 105, 99, 111, 110, 194, 187, 34,\n ]),\n },\n} as const\n"],"names":["ENCODED_TAGS","OPENING","HTML","Uint8Array","HEAD","BODY","CLOSED","BODY_AND_HTML","META","ICON_MARK"],"mappings":";;;;AAAO,MAAMA,eAAe;IAC1B,iHAAiH;IACjHC,SAAS;QACP,QAAQ;QACRC,MAAM,IAAIC,WAAW;YAAC;YAAI;YAAK;YAAK;YAAK;SAAI;QAC7C,QAAQ;QACRC,MAAM,IAAID,WAAW;YAAC;YAAI;YAAK;YAAK;YAAI;SAAI;QAC5C,QAAQ;QACRE,MAAM,IAAIF,WAAW;YAAC;YAAI;YAAI;YAAK;YAAK;SAAI;IAC9C;IACAG,QAAQ;QACN,UAAU;QACVF,MAAM,IAAID,WAAW;YAAC;YAAI;YAAI;YAAK;YAAK;YAAI;YAAK;SAAG;QACpD,UAAU;QACVE,MAAM,IAAIF,WAAW;YAAC;YAAI;YAAI;YAAI;YAAK;YAAK;YAAK;SAAG;QACpD,UAAU;QACVD,MAAM,IAAIC,WAAW;YAAC;YAAI;YAAI;YAAK;YAAK;YAAK;YAAK;SAAG;QACrD,iBAAiB;QACjBI,eAAe,IAAIJ,WAAW;YAC5B;YAAI;YAAI;YAAI;YAAK;YAAK;YAAK;YAAI;YAAI;YAAI;YAAK;YAAK;YAAK;YAAK;SAC5D;IACH;IACAK,MAAM;QACJ,4GAA4G;QAC5G,0BAA0B;QAC1B,iFAAiF;QACjFC,WAAW,IAAIN,WAAW;YACxB;YAAI;YAAK;YAAK;YAAK;YAAI;YAAI;YAAK;YAAI;YAAK;YAAK;YAAI;YAAI;YAAK;YAAK;YAAK;YACrE;YAAK;YAAI;YAAK;YAAI;YAAK;YAAK;YAAK;YAAK;SACvC;IACH;AACF,EAAU","ignoreList":[0]}},
|
||||
{"offset": {"line": 4013, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/stream-utils/node-web-streams-helper.ts"],"sourcesContent":["import type { ReactDOMServerReadableStream } from 'react-dom/server'\nimport { getTracer } from '../lib/trace/tracer'\nimport { AppRenderSpan } from '../lib/trace/constants'\nimport { DetachedPromise } from '../../lib/detached-promise'\nimport {\n scheduleImmediate,\n atLeastOneTask,\n waitAtLeastOneReactRenderTask,\n} from '../../lib/scheduler'\nimport { ENCODED_TAGS } from './encoded-tags'\nimport {\n indexOfUint8Array,\n isEquivalentUint8Arrays,\n removeFromUint8Array,\n} from './uint8array-helpers'\nimport { MISSING_ROOT_TAGS_ERROR } from '../../shared/lib/errors/constants'\nimport {\n RSC_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_RSC_UNION_QUERY,\n} from '../../client/components/app-router-headers'\nimport { computeCacheBustingSearchParam } from '../../shared/lib/router/utils/cache-busting-search-param'\nimport type { AnyStream } from '../app-render/stream-ops'\n\nfunction voidCatch() {\n // this catcher is designed to be used with pipeTo where we expect the underlying\n // pipe implementation to forward errors but we don't want the pipeTo promise to reject\n // and be unhandled\n}\n\n// We can share the same encoder instance everywhere\n// Notably we cannot do the same for TextDecoder because it is stateful\n// when handling streaming data\nconst encoder = new TextEncoder()\n\nexport function chainStreams<T>(\n ...streams: ReadableStream<T>[]\n): ReadableStream<T> {\n // If we have no streams, return an empty stream. This behavior is\n // intentional as we're now providing the `RenderResult.EMPTY` value.\n if (streams.length === 0) {\n return new ReadableStream<T>({\n start(controller) {\n controller.close()\n },\n })\n }\n\n // If we only have 1 stream we fast path it by returning just this stream\n if (streams.length === 1) {\n return streams[0]\n }\n\n const { readable, writable } = new TransformStream()\n\n // We always initiate pipeTo immediately. We know we have at least 2 streams\n // so we need to avoid closing the writable when this one finishes.\n let promise = streams[0].pipeTo(writable, { preventClose: true })\n\n let i = 1\n for (; i < streams.length - 1; i++) {\n const nextStream = streams[i]\n promise = promise.then(() =>\n nextStream.pipeTo(writable, { preventClose: true })\n )\n }\n\n // We can omit the length check because we halted before the last stream and there\n // is at least two streams so the lastStream here will always be defined\n const lastStream = streams[i]\n promise = promise.then(() => lastStream.pipeTo(writable))\n\n // Catch any errors from the streams and ignore them, they will be handled\n // by whatever is consuming the readable stream.\n promise.catch(voidCatch)\n\n return readable\n}\n\nexport function streamFromString(str: string): ReadableStream<Uint8Array> {\n return new ReadableStream({\n start(controller) {\n controller.enqueue(encoder.encode(str))\n controller.close()\n },\n })\n}\n\nexport function streamFromBuffer(chunk: Buffer): ReadableStream<Uint8Array> {\n return new ReadableStream({\n start(controller) {\n controller.enqueue(chunk)\n controller.close()\n },\n })\n}\n\nasync function streamToChunks(\n stream: ReadableStream<Uint8Array>\n): Promise<Array<Uint8Array>> {\n const reader = stream.getReader()\n const chunks: Array<Uint8Array> = []\n\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n break\n }\n\n chunks.push(value)\n }\n\n return chunks\n}\n\nfunction concatUint8Arrays(chunks: Array<Uint8Array>): Uint8Array {\n const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0)\n const result = new Uint8Array(totalLength)\n let offset = 0\n for (const chunk of chunks) {\n result.set(chunk, offset)\n offset += chunk.length\n }\n return result\n}\n\nexport async function webstreamToUint8Array(\n stream: ReadableStream<Uint8Array>\n): Promise<Uint8Array> {\n return concatUint8Arrays(await streamToChunks(stream))\n}\n\nfunction webToReadable(\n stream: ReadableStream<Uint8Array> | import('node:stream').Readable\n): import('node:stream').Readable {\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new Error('webToReadable cannot be used in the edge runtime')\n } else {\n let Readable: typeof import('node:stream').Readable\n if (process.env.TURBOPACK) {\n Readable = (require('node:stream') as typeof import('node:stream'))\n .Readable\n } else if (\n process.env.__NEXT_BUNDLER === 'Webpack' ||\n process.env.__NEXT_BUNDLER === 'Rspack'\n ) {\n Readable = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n } else {\n ReadaLine truncated
|
||||
{"offset": {"line": 4888, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/stream-utils/uint8array-helpers.ts"],"sourcesContent":["/**\n * Find the starting index of Uint8Array `b` within Uint8Array `a`.\n */\nexport function indexOfUint8Array(a: Uint8Array, b: Uint8Array) {\n if (b.length === 0) return 0\n if (a.length === 0 || b.length > a.length) return -1\n\n // Use Node's native implementation when available.\n if (typeof Buffer !== 'undefined') {\n const haystack = Buffer.isBuffer(a)\n ? a\n : Buffer.from(a.buffer, a.byteOffset, a.byteLength)\n return haystack.indexOf(b)\n }\n\n // start iterating through `a`\n for (let i = 0; i <= a.length - b.length; i++) {\n let completeMatch = true\n // from index `i`, iterate through `b` and check for mismatch\n for (let j = 0; j < b.length; j++) {\n // if the values do not match, then this isn't a complete match, exit `b` iteration early and iterate to next index of `a`.\n if (a[i + j] !== b[j]) {\n completeMatch = false\n break\n }\n }\n\n if (completeMatch) {\n return i\n }\n }\n\n return -1\n}\n\n/**\n * Check if two Uint8Arrays are strictly equivalent.\n */\nexport function isEquivalentUint8Arrays(a: Uint8Array, b: Uint8Array) {\n if (a.length !== b.length) return false\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false\n }\n\n return true\n}\n\n/**\n * Remove Uint8Array `b` from Uint8Array `a`.\n *\n * If `b` is not in `a`, `a` is returned unchanged.\n *\n * Otherwise, the function returns a new Uint8Array instance with size `a.length - b.length`\n */\nexport function removeFromUint8Array(a: Uint8Array, b: Uint8Array) {\n const tagIndex = indexOfUint8Array(a, b)\n if (tagIndex === 0) return a.subarray(b.length)\n if (tagIndex > -1) {\n const removed = new Uint8Array(a.length - b.length)\n removed.set(a.subarray(0, tagIndex))\n removed.set(a.subarray(tagIndex + b.length), tagIndex)\n return removed\n } else {\n return a\n }\n}\n"],"names":["indexOfUint8Array","a","b","length","Buffer","haystack","isBuffer","from","buffer","byteOffset","byteLength","indexOf","i","completeMatch","j","isEquivalentUint8Arrays","removeFromUint8Array","tagIndex","subarray","removed","Uint8Array","set"],"mappings":"AAAA;;CAEC,GACD;;;;;;;;AAAO,SAASA,kBAAkBC,CAAa,EAAEC,CAAa;IAC5D,IAAIA,EAAEC,MAAM,KAAK,GAAG,OAAO;IAC3B,IAAIF,EAAEE,MAAM,KAAK,KAAKD,EAAEC,MAAM,GAAGF,EAAEE,MAAM,EAAE,OAAO,CAAC;IAEnD,mDAAmD;IACnD,IAAI,OAAOC,WAAW,aAAa;QACjC,MAAMC,WAAWD,OAAOE,QAAQ,CAACL,KAC7BA,IACAG,OAAOG,IAAI,CAACN,EAAEO,MAAM,EAAEP,EAAEQ,UAAU,EAAER,EAAES,UAAU;QACpD,OAAOL,SAASM,OAAO,CAACT;IAC1B;IAEA,8BAA8B;IAC9B,IAAK,IAAIU,IAAI,GAAGA,KAAKX,EAAEE,MAAM,GAAGD,EAAEC,MAAM,EAAES,IAAK;QAC7C,IAAIC,gBAAgB;QACpB,6DAA6D;QAC7D,IAAK,IAAIC,IAAI,GAAGA,IAAIZ,EAAEC,MAAM,EAAEW,IAAK;YACjC,2HAA2H;YAC3H,IAAIb,CAAC,CAACW,IAAIE,EAAE,KAAKZ,CAAC,CAACY,EAAE,EAAE;gBACrBD,gBAAgB;gBAChB;YACF;QACF;QAEA,IAAIA,eAAe;YACjB,OAAOD;QACT;IACF;IAEA,OAAO,CAAC;AACV;AAKO,SAASG,wBAAwBd,CAAa,EAAEC,CAAa;IAClE,IAAID,EAAEE,MAAM,KAAKD,EAAEC,MAAM,EAAE,OAAO;IAElC,IAAK,IAAIS,IAAI,GAAGA,IAAIX,EAAEE,MAAM,EAAES,IAAK;QACjC,IAAIX,CAAC,CAACW,EAAE,KAAKV,CAAC,CAACU,EAAE,EAAE,OAAO;IAC5B;IAEA,OAAO;AACT;AASO,SAASI,qBAAqBf,CAAa,EAAEC,CAAa;IAC/D,MAAMe,WAAWjB,kBAAkBC,GAAGC;IACtC,IAAIe,aAAa,GAAG,OAAOhB,EAAEiB,QAAQ,CAAChB,EAAEC,MAAM;IAC9C,IAAIc,WAAW,CAAC,GAAG;QACjB,MAAME,UAAU,IAAIC,WAAWnB,EAAEE,MAAM,GAAGD,EAAEC,MAAM;QAClDgB,QAAQE,GAAG,CAACpB,EAAEiB,QAAQ,CAAC,GAAGD;QAC1BE,QAAQE,GAAG,CAACpB,EAAEiB,QAAQ,CAACD,WAAWf,EAAEC,MAAM,GAAGc;QAC7C,OAAOE;IACT,OAAO;QACL,OAAOlB;IACT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 4946, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/error.ts"],"sourcesContent":["export class PageSignatureError extends Error {\n constructor({ page }: { page: string }) {\n super(`The middleware \"${page}\" accepts an async API directly with the form:\n \n export function middleware(request, event) {\n return NextResponse.redirect('/new-location')\n }\n \n Read more: https://nextjs.org/docs/messages/middleware-new-signature\n `)\n }\n}\n\nexport class RemovedPageError extends Error {\n constructor() {\n super(`The request.page has been deprecated in favour of \\`URLPattern\\`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n `)\n }\n}\n\nexport class RemovedUAError extends Error {\n constructor() {\n super(`The request.ua has been removed in favour of \\`userAgent\\` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n `)\n }\n}\n"],"names":["PageSignatureError","Error","constructor","page","RemovedPageError","RemovedUAError"],"mappings":";;;;;;;;AAAO,MAAMA,2BAA2BC;IACtCC,YAAY,EAAEC,IAAI,EAAoB,CAAE;QACtC,KAAK,CAAC,CAAC,gBAAgB,EAAEA,KAAK;;;;;;;EAOhC,CAAC;QAPC,OAAA,cAOA,CAPA,IAOA,EAPA,qBAAA;mBAAA;wBAAA;0BAAA;QAOD;IACD;AACF;AAEO,MAAMC,yBAAyBH;IACpCC,aAAc;QACZ,KAAK,CAAC,CAAC;;EAET,CAAC;QAFC,OAAA,cAEA,CAFA,IAEA,EAFA,qBAAA;mBAAA;wBAAA;0BAAA;QAED;IACD;AACF;AAEO,MAAMG,uBAAuBJ;IAClCC,aAAc;QACZ,KAAK,CAAC,CAAC;;EAET,CAAC;QAFC,OAAA,cAEA,CAFA,IAEA,EAFA,qBAAA;mBAAA;wBAAA;0BAAA;QAED;IACD;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 4999, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/next-url.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\nimport type { DomainLocale, I18NConfig } from '../config-shared'\nimport type { I18NProvider } from '../lib/i18n-provider'\n\nimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'\nimport { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'\nimport { getHostname } from '../../shared/lib/get-hostname'\nimport { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'\n\ninterface Options {\n base?: string | URL\n headers?: OutgoingHttpHeaders\n forceLocale?: boolean\n nextConfig?: {\n basePath?: string\n i18n?: I18NConfig | null\n trailingSlash?: boolean\n }\n i18nProvider?: I18NProvider\n}\n\nconst REGEX_LOCALHOST_HOSTNAME =\n /^(?:127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\\[::1\\]|localhost)$/\n\nfunction parseURL(url: string | URL, base?: string | URL) {\n const parsed = new URL(String(url), base && String(base))\n if (REGEX_LOCALHOST_HOSTNAME.test(parsed.hostname)) {\n parsed.hostname = 'localhost'\n }\n return parsed\n}\n\nconst Internal = Symbol('NextURLInternal')\n\nexport class NextURL {\n private [Internal]: {\n basePath: string\n buildId?: string\n flightSearchParameters?: Record<string, string>\n defaultLocale?: string\n domainLocale?: DomainLocale\n locale?: string\n options: Options\n trailingSlash?: boolean\n url: URL\n }\n\n constructor(input: string | URL, base?: string | URL, opts?: Options)\n constructor(input: string | URL, opts?: Options)\n constructor(\n input: string | URL,\n baseOrOpts?: string | URL | Options,\n opts?: Options\n ) {\n let base: undefined | string | URL\n let options: Options\n\n if (\n (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts) ||\n typeof baseOrOpts === 'string'\n ) {\n base = baseOrOpts\n options = opts || {}\n } else {\n options = opts || baseOrOpts || {}\n }\n\n this[Internal] = {\n url: parseURL(input, base ?? options.base),\n options: options,\n basePath: '',\n }\n\n this.analyze()\n }\n\n private analyze() {\n const info = getNextPathnameInfo(this[Internal].url.pathname, {\n nextConfig: this[Internal].options.nextConfig,\n parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,\n i18nProvider: this[Internal].options.i18nProvider,\n })\n\n const hostname = getHostname(\n this[Internal].url,\n this[Internal].options.headers\n )\n this[Internal].domainLocale = this[Internal].options.i18nProvider\n ? this[Internal].options.i18nProvider.detectDomainLocale(hostname)\n : detectDomainLocale(\n this[Internal].options.nextConfig?.i18n?.domains,\n hostname\n )\n\n const defaultLocale =\n this[Internal].domainLocale?.defaultLocale ||\n this[Internal].options.nextConfig?.i18n?.defaultLocale\n\n this[Internal].url.pathname = info.pathname\n this[Internal].defaultLocale = defaultLocale\n this[Internal].basePath = info.basePath ?? ''\n this[Internal].buildId = info.buildId\n this[Internal].locale = info.locale ?? defaultLocale\n this[Internal].trailingSlash = info.trailingSlash\n }\n\n private formatPathname() {\n return formatNextPathnameInfo({\n basePath: this[Internal].basePath,\n buildId: this[Internal].buildId,\n defaultLocale: !this[Internal].options.forceLocale\n ? this[Internal].defaultLocale\n : undefined,\n locale: this[Internal].locale,\n pathname: this[Internal].url.pathname,\n trailingSlash: this[Internal].trailingSlash,\n })\n }\n\n private formatSearch() {\n return this[Internal].url.search\n }\n\n public get buildId() {\n return this[Internal].buildId\n }\n\n public set buildId(buildId: string | undefined) {\n this[Internal].buildId = buildId\n }\n\n public get locale() {\n return this[Internal].locale ?? ''\n }\n\n public set locale(locale: string) {\n if (\n !this[Internal].locale ||\n !this[Internal].options.nextConfig?.i18n?.locales.includes(locale)\n ) {\n throw new TypeError(\n `The NextURL configuration includes no locale \"${locale}\"`\n )\n }\n\n this[Internal].locale = locale\n }\n\n get defaultLocale() {\n return this[Internal].defaultLocale\n }\n\n get domainLocale() {\n return this[Internal].domainLocale\n }\n\n get searchParams() {\n return this[Internal].url.searchParams\n }\n\n get host() {\n return this[Internal].url.host\n }\n\n set host(value: string) {\n this[Internal].url.host = value\n }\n\n get hostname() {\n return this[Internal].url.hostname\n }\n\n set hostname(value: string) {\n this[Internal].url.hostname =Line truncated
|
||||
{"offset": {"line": 5198, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/next-request.ts"],"sourcesContent":["import type { BaseNextRequest } from '../../../base-http'\nimport type { NodeNextRequest } from '../../../base-http/node'\nimport type { WebNextRequest } from '../../../base-http/web'\nimport type { Writable } from 'node:stream'\n\nimport { getRequestMeta } from '../../../request-meta'\nimport { fromNodeOutgoingHttpHeaders } from '../../utils'\nimport { NextRequest } from '../request'\nimport { isNodeNextRequest, isWebNextRequest } from '../../../base-http/helpers'\n\nexport const ResponseAbortedName = 'ResponseAborted'\nexport class ResponseAborted extends Error {\n public readonly name = ResponseAbortedName\n}\n\n/**\n * Creates an AbortController tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * If the `close` event is fired before the `finish` event, then we'll send the\n * `abort` signal.\n */\nexport function createAbortController(response: Writable): AbortController {\n const controller = new AbortController()\n\n // If `finish` fires first, then `res.end()` has been called and the close is\n // just us finishing the stream on our side. If `close` fires first, then we\n // know the client disconnected before we finished.\n response.once('close', () => {\n if (response.writableFinished) return\n\n controller.abort(new ResponseAborted())\n })\n\n return controller\n}\n\n/**\n * Creates an AbortSignal tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * This cannot be done with the request (IncomingMessage or Readable) because\n * the `abort` event will not fire if to data has been fully read (because that\n * will \"close\" the readable stream and nothing fires after that).\n */\nexport function signalFromNodeResponse(response: Writable): AbortSignal {\n const { errored, destroyed } = response\n if (errored || destroyed) {\n return AbortSignal.abort(errored ?? new ResponseAborted())\n }\n\n const { signal } = createAbortController(response)\n return signal\n}\n\nexport class NextRequestAdapter {\n public static fromBaseNextRequest(\n request: BaseNextRequest,\n signal: AbortSignal\n ): NextRequest {\n if (\n // The type check here ensures that `req` is correctly typed, and the\n // environment variable check provides dead code elimination.\n process.env.NEXT_RUNTIME === 'edge' &&\n isWebNextRequest(request)\n ) {\n return NextRequestAdapter.fromWebNextRequest(request)\n } else if (\n // The type check here ensures that `req` is correctly typed, and the\n // environment variable check provides dead code elimination.\n process.env.NEXT_RUNTIME !== 'edge' &&\n isNodeNextRequest(request)\n ) {\n return NextRequestAdapter.fromNodeNextRequest(request, signal)\n } else {\n throw new Error('Invariant: Unsupported NextRequest type')\n }\n }\n\n public static fromNodeNextRequest(\n request: NodeNextRequest,\n signal: AbortSignal\n ): NextRequest {\n // HEAD and GET requests can not have a body.\n let body: BodyInit | null = null\n if (request.method !== 'GET' && request.method !== 'HEAD' && request.body) {\n // @ts-expect-error - this is handled by undici, when streams/web land use it instead\n body = request.body\n }\n\n let url: URL\n if (request.url.startsWith('http')) {\n url = new URL(request.url)\n } else {\n // Grab the full URL from the request metadata.\n const base = getRequestMeta(request, 'initURL')\n if (!base || !base.startsWith('http')) {\n // Because the URL construction relies on the fact that the URL provided\n // is absolute, we need to provide a base URL. We can't use the request\n // URL because it's relative, so we use a dummy URL instead.\n url = new URL(request.url, 'http://n')\n } else {\n url = new URL(request.url, base)\n }\n }\n\n return new NextRequest(url, {\n method: request.method,\n headers: fromNodeOutgoingHttpHeaders(request.headers),\n duplex: 'half',\n signal,\n // geo\n // ip\n // nextConfig\n\n // body can not be passed if request was aborted\n // or we get a Request body was disturbed error\n ...(signal.aborted\n ? {}\n : {\n body,\n }),\n })\n }\n\n public static fromWebNextRequest(request: WebNextRequest): NextRequest {\n // HEAD and GET requests can not have a body.\n let body: ReadableStream | null = null\n if (request.method !== 'GET' && request.method !== 'HEAD') {\n body = request.body\n }\n\n return new NextRequest(request.url, {\n method: request.method,\n headers: fromNodeOutgoingHttpHeaders(request.headers),\n duplex: 'half',\n signal: request.request.sigLine truncated
|
||||
{"offset": {"line": 5322, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/cookies.ts"],"sourcesContent":["export {\n RequestCookies,\n ResponseCookies,\n stringifyCookie,\n} from 'next/dist/compiled/@edge-runtime/cookies'\n"],"names":["RequestCookies","ResponseCookies","stringifyCookie"],"mappings":";AAAA,SACEA,cAAc,EACdC,eAAe,EACfC,eAAe,QACV,2CAA0C","ignoreList":[0]}},
|
||||
{"offset": {"line": 5329, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/request.ts"],"sourcesContent":["import type { I18NConfig } from '../../config-shared'\nimport { NextURL } from '../next-url'\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils'\nimport { RemovedUAError, RemovedPageError } from '../error'\nimport { RequestCookies } from './cookies'\n\nexport const INTERNALS = Symbol('internal request')\n\n/**\n * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request)\n */\nexport class NextRequest extends Request {\n /** @internal */\n [INTERNALS]: {\n cookies: RequestCookies\n url: string\n nextUrl: NextURL\n }\n\n constructor(input: URL | RequestInfo, init: RequestInit = {}) {\n const url =\n typeof input !== 'string' && 'url' in input ? input.url : String(input)\n\n validateURL(url)\n\n // node Request instance requires duplex option when a body\n // is present or it errors, we don't handle this for\n // Request being passed in since it would have already\n // errored if this wasn't configured\n if (process.env.NEXT_RUNTIME !== 'edge') {\n if (init.body && init.duplex !== 'half') {\n init.duplex = 'half'\n }\n }\n\n if (input instanceof Request) super(input, init)\n else super(url, init)\n\n const nextUrl = new NextURL(url, {\n headers: toNodeOutgoingHttpHeaders(this.headers),\n nextConfig: init.nextConfig,\n })\n this[INTERNALS] = {\n cookies: new RequestCookies(this.headers),\n nextUrl,\n url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE\n ? url\n : nextUrl.toString(),\n }\n }\n\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n nextUrl: this.nextUrl,\n url: this.url,\n // rest of props come from Request\n bodyUsed: this.bodyUsed,\n cache: this.cache,\n credentials: this.credentials,\n destination: this.destination,\n headers: Object.fromEntries(this.headers),\n integrity: this.integrity,\n keepalive: this.keepalive,\n method: this.method,\n mode: this.mode,\n redirect: this.redirect,\n referrer: this.referrer,\n referrerPolicy: this.referrerPolicy,\n signal: this.signal,\n }\n }\n\n public get cookies() {\n return this[INTERNALS].cookies\n }\n\n public get nextUrl() {\n return this[INTERNALS].nextUrl\n }\n\n /**\n * @deprecated\n * `page` has been deprecated in favour of `URLPattern`.\n * Read more: https://nextjs.org/docs/messages/middleware-request-page\n */\n public get page() {\n throw new RemovedPageError()\n }\n\n /**\n * @deprecated\n * `ua` has been removed in favour of \\`userAgent\\` function.\n * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n */\n public get ua() {\n throw new RemovedUAError()\n }\n\n public get url() {\n return this[INTERNALS].url\n }\n}\n\nexport interface RequestInit extends globalThis.RequestInit {\n nextConfig?: {\n basePath?: string\n i18n?: I18NConfig | null\n trailingSlash?: boolean\n }\n signal?: AbortSignal\n // see https://github.com/whatwg/fetch/pull/1457\n duplex?: 'half'\n}\n"],"names":["NextURL","toNodeOutgoingHttpHeaders","validateURL","RemovedUAError","RemovedPageError","RequestCookies","INTERNALS","Symbol","NextRequest","Request","constructor","input","init","url","String","process","env","NEXT_RUNTIME","body","duplex","nextUrl","headers","nextConfig","cookies","__NEXT_NO_MIDDLEWARE_URL_NORMALIZE","toString","for","bodyUsed","cache","credentials","destination","Object","fromEntries","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","page","ua"],"mappings":";;;;;;AACA,SAASA,OAAO,QAAQ,cAAa;AACrC,SAASC,yBAAyB,EAAEC,WAAW,QAAQ,WAAU;AACjE,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,WAAU;;AAC3D,SAASC,cAAc,QAAQ,YAAW;;;;;AAEnC,MAAMC,YAAYC,OAAO,oBAAmB;AAO5C,MAAMC,oBAAoBC;IAQ/BC,YAAYC,KAAwB,EAAEC,OAAoB,CAAC,CAAC,CAAE;QAC5D,MAAMC,MACJ,OAAOF,UAAU,YAAY,SAASA,QAAQA,MAAME,GAAG,GAAGC,OAAOH;YAEnET,qKAAAA,EAAYW;QAEZ,2DAA2D;QAC3D,oDAAoD;QACpD,sDAAsD;QACtD,oCAAoC;QACpC,IAAIE,QAAQC,GAAG,CAACC,YAAY,KAAK,OAAQ;YACvC,IAAIL,KAAKM,IAAI,IAAIN,KAAKO,MAAM,KAAK,QAAQ;gBACvCP,KAAKO,MAAM,GAAG;YAChB;QACF;QAEA,IAAIR,iBAAiBF,SAAS,KAAK,CAACE,OAAOC;aACtC,KAAK,CAACC,KAAKD;QAEhB,MAAMQ,UAAU,IAAIpB,uKAAAA,CAAQa,KAAK;YAC/BQ,aAASpB,mLAAAA,EAA0B,IAAI,CAACoB,OAAO;YAC/CC,YAAYV,KAAKU,UAAU;QAC7B;QACA,IAAI,CAAChB,UAAU,GAAG;YAChBiB,SAAS,IAAIlB,4LAAAA,CAAe,IAAI,CAACgB,OAAO;YACxCD;YACAP,KAAKE,QAAQC,GAAG,CAACQ,0BACbX,QAD+C,kBAE/CO,QAAQK,QAAQ;QACtB;IACF;IAEA,CAAClB,OAAOmB,GAAG,CAAC,+BAA+B,GAAG;QAC5C,OAAO;YACLH,SAAS,IAAI,CAACA,OAAO;YACrBH,SAAS,IAAI,CAACA,OAAO;YACrBP,KALine truncated
|
||||
{"offset": {"line": 5419, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/utils.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\nimport {\n NEXT_INTERCEPTION_MARKER_PREFIX,\n NEXT_QUERY_PARAM_PREFIX,\n} from '../../lib/constants'\n\n/**\n * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any\n * headers with multiple values will be joined with a comma and space. Any\n * headers that have an undefined value will be ignored and others will be\n * coerced to strings.\n *\n * @param nodeHeaders the headers object to convert\n * @returns the converted headers object\n */\nexport function fromNodeOutgoingHttpHeaders(\n nodeHeaders: OutgoingHttpHeaders\n): Headers {\n const headers = new Headers()\n for (let [key, value] of Object.entries(nodeHeaders)) {\n const values = Array.isArray(value) ? value : [value]\n for (let v of values) {\n if (typeof v === 'undefined') continue\n if (typeof v === 'number') {\n v = v.toString()\n }\n\n headers.append(key, v)\n }\n }\n return headers\n}\n\n/*\n Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas\n that are within a single set-cookie field-value, such as in the Expires portion.\n This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2\n Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128\n React Native's fetch does this for *every* header, including set-cookie.\n \n Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25\n Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation\n*/\nexport function splitCookiesString(cookiesString: string) {\n var cookiesStrings = []\n var pos = 0\n var start\n var ch\n var lastComma\n var nextStart\n var cookiesSeparatorFound\n\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1\n }\n return pos < cookiesString.length\n }\n\n function notSpecialChar() {\n ch = cookiesString.charAt(pos)\n\n return ch !== '=' && ch !== ';' && ch !== ','\n }\n\n while (pos < cookiesString.length) {\n start = pos\n cookiesSeparatorFound = false\n\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos)\n if (ch === ',') {\n // ',' is a cookie separator if we have later first '=', not ';' or ','\n lastComma = pos\n pos += 1\n\n skipWhitespace()\n nextStart = pos\n\n while (pos < cookiesString.length && notSpecialChar()) {\n pos += 1\n }\n\n // currently special character\n if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') {\n // we found cookies separator\n cookiesSeparatorFound = true\n // pos is inside the next cookie, so back up and return it.\n pos = nextStart\n cookiesStrings.push(cookiesString.substring(start, lastComma))\n start = pos\n } else {\n // in param ',' or param separator ';',\n // we continue from that comma\n pos = lastComma + 1\n }\n } else {\n pos += 1\n }\n }\n\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length))\n }\n }\n\n return cookiesStrings\n}\n\n/**\n * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is\n * required to support the set-cookie header, which may have multiple values.\n *\n * @param headers the headers object to convert\n * @returns the converted headers object\n */\nexport function toNodeOutgoingHttpHeaders(\n headers: Headers\n): OutgoingHttpHeaders {\n const nodeHeaders: OutgoingHttpHeaders = {}\n const cookies: string[] = []\n if (headers) {\n for (const [key, value] of headers.entries()) {\n if (key.toLowerCase() === 'set-cookie') {\n // We may have gotten a comma joined string of cookies, or multiple\n // set-cookie headers. We need to merge them into one header array\n // to represent all the cookies.\n cookies.push(...splitCookiesString(value))\n nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies\n } else {\n nodeHeaders[key] = value\n }\n }\n }\n return nodeHeaders\n}\n\n/**\n * Validate the correctness of a user-provided URL.\n */\nexport function validateURL(url: string | URL): string {\n try {\n return String(new URL(String(url)))\n } catch (error: any) {\n throw new Error(\n `URL is malformed \"${String(\n url\n )}\". Please use only absolute URLs - https://nextjs.org/docs/messages/middLine truncated
|
||||
{"offset": {"line": 5551, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/errors/constants.ts"],"sourcesContent":["export const MISSING_ROOT_TAGS_ERROR = 'NEXT_MISSING_ROOT_TAGS'\n"],"names":["MISSING_ROOT_TAGS_ERROR"],"mappings":";;;;AAAO,MAAMA,0BAA0B,yBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 5560, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/get-hostname.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD;;;;AAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,SAASE,QAAQ,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B","ignoreList":[0]}},
|
||||
{"offset": {"line": 5584, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/hash.ts"],"sourcesContent":["// http://www.cse.yorku.ca/~oz/hash.html\n// More specifically, 32-bit hash via djbxor\n// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)\n// This is due to number type differences between rust for turbopack to js number types,\n// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching\n// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation\n// as can gaurantee determinstic output from 32bit hash.\nexport function djb2Hash(str: string) {\n let hash = 5381\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = ((hash << 5) + hash + char) & 0xffffffff\n }\n return hash >>> 0\n}\n\nexport function hexHash(str: string) {\n return djb2Hash(str).toString(36).slice(0, 5)\n}\n"],"names":["djb2Hash","str","hash","i","length","char","charCodeAt","hexHash","toString","slice"],"mappings":"AAAA,wCAAwC;AACxC,4CAA4C;AAC5C,iHAAiH;AACjH,wFAAwF;AACxF,gGAAgG;AAChG,wHAAwH;AACxH,wDAAwD;;;;;;;AACjD,SAASA,SAASC,GAAW;IAClC,IAAIC,OAAO;IACX,IAAK,IAAIC,IAAI,GAAGA,IAAIF,IAAIG,MAAM,EAAED,IAAK;QACnC,MAAME,OAAOJ,IAAIK,UAAU,CAACH;QAC5BD,OAASA,CAAAA,QAAQ,CAAA,IAAKA,OAAOG,OAAQ;IACvC;IACA,OAAOH,SAAS;AAClB;AAEO,SAASK,QAAQN,GAAW;IACjC,OAAOD,SAASC,KAAKO,QAAQ,CAAC,IAAIC,KAAK,CAAC,GAAG;AAC7C","ignoreList":[0]}},
|
||||
{"offset": {"line": 5612, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/i18n/detect-domain-locale.ts"],"sourcesContent":["import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":";;;;AAEO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;QAC9B,yBAAyB;QACzB,MAAMK,iBAAiBD,KAAKE,MAAM,EAAEC,MAAM,KAAK,EAAE,CAAC,EAAE,CAACJ;QACrD,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MACjDC,KAAKK,OAAO,EAAEC,KAAK,CAACC,SAAWA,OAAOR,WAAW,OAAOD,iBACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 5633, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/i18n/normalize-locale-path.ts"],"sourcesContent":["export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap<readonly string[], readonly string[]>()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n"],"names":["cache","WeakMap","normalizeLocalePath","pathname","locales","lowercasedLocales","get","map","locale","toLowerCase","set","detectedLocale","segments","split","segment","index","indexOf","slice","length"],"mappings":";;;;AAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAWX,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpC","ignoreList":[0]}},
|
||||
{"offset": {"line": 5683, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":";;;;AAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACH,CAAC,WAAW,EAAED,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,IAAI,0BAA0B,CAAC,EACzFC;QAFF,OAAA,cAGC,CAHD,IAGC,EAHD,qBAAA;mBAAA;wBAAA;0BAAA;QAGA;QACA,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 5702, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD;;;;AAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0]}},
|
||||
{"offset": {"line": 5718, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/page-path/normalize-data-path.ts"],"sourcesContent":["import { pathHasPrefix } from '../router/utils/path-has-prefix'\n\n/**\n * strip _next/data/<build-id>/ prefix and .json suffix\n */\nexport function normalizeDataPath(pathname: string) {\n if (!pathHasPrefix(pathname || '/', '/_next/data')) {\n return pathname\n }\n pathname = pathname\n .replace(/\\/_next\\/data\\/[^/]{1,}/, '')\n .replace(/\\.json$/, '')\n\n if (pathname === '/index') {\n return '/'\n }\n return pathname\n}\n"],"names":["pathHasPrefix","normalizeDataPath","pathname","replace"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,kCAAiC;;AAKxD,SAASC,kBAAkBC,QAAgB;IAChD,IAAI,KAACF,0MAAAA,EAAcE,YAAY,KAAK,gBAAgB;QAClD,OAAOA;IACT;IACAA,WAAWA,SACRC,OAAO,CAAC,2BAA2B,IACnCA,OAAO,CAAC,WAAW;IAEtB,IAAID,aAAa,UAAU;QACzB,OAAO;IACT;IACA,OAAOA;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 5738, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/add-locale.ts"],"sourcesContent":["import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n"],"names":["addPathPrefix","pathHasPrefix","addLocale","path","locale","defaultLocale","ignorePrefix","lower","toLowerCase"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;;;AAO1C,SAASC,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,QAAIL,0MAAAA,EAAcM,OAAO,SAAS,OAAOJ;QACzC,QAAIF,0MAAAA,EAAcM,OAAO,CAAC,CAAC,EAAEH,OAAOI,WAAW,IAAI,GAAG,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,WAAOH,0MAAAA,EAAcG,MAAM,CAAC,CAAC,EAAEC,QAAQ;AACzC","ignoreList":[0]}},
|
||||
{"offset": {"line": 5764, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/add-path-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n"],"names":["parsePath","addPathPrefix","path","prefix","startsWith","pathname","query","hash"],"mappings":";;;;AAAA,SAASA,SAAS,QAAQ,eAAc;;AAMjC,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,OAAGP,8LAAAA,EAAUE;IAC5C,OAAO,GAAGC,SAASE,WAAWC,QAAQC,MAAM;AAC9C","ignoreList":[0]}},
|
||||
{"offset": {"line": 5781, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/add-path-suffix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n"],"names":["parsePath","addPathSuffix","path","suffix","startsWith","pathname","query","hash"],"mappings":";;;;AAAA,SAASA,SAAS,QAAQ,eAAc;;AAOjC,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,OAAGP,8LAAAA,EAAUE;IAC5C,OAAO,GAAGG,WAAWF,SAASG,QAAQC,MAAM;AAC9C","ignoreList":[0]}},
|
||||
{"offset": {"line": 5798, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/cache-busting-search-param.ts"],"sourcesContent":["import { hexHash } from '../../hash'\n\nconst CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES = 12\nconst textEncoder = new TextEncoder()\n\nfunction encodeCacheBustingSearchParam(bytes: Uint8Array): string {\n let binary = ''\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i])\n }\n\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '')\n}\n\nfunction normalizeCacheBustingInput(\n value: string | string[] | undefined\n): string {\n if (value === undefined) {\n return '0'\n }\n return Array.isArray(value) ? value.join(',') : value\n}\n\nfunction createCacheBustingSearchParamInput(\n prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): string | null {\n if (\n (prefetchHeader === undefined || prefetchHeader === '0') &&\n segmentPrefetchHeader === undefined &&\n stateTreeHeader === undefined &&\n nextUrlHeader === undefined\n ) {\n return null\n }\n\n return [\n prefetchHeader ?? '0',\n normalizeCacheBustingInput(segmentPrefetchHeader),\n normalizeCacheBustingInput(stateTreeHeader),\n normalizeCacheBustingInput(nextUrlHeader),\n ].join(',')\n}\n\nasync function computeCacheBustingSearchParamFromInput(\n input: string\n): Promise<string> {\n // Truncate SHA-256 to 96 bits to keep `_rsc` compact\n const digest = await globalThis.crypto.subtle.digest(\n 'SHA-256',\n textEncoder.encode(input)\n )\n return encodeCacheBustingSearchParam(\n new Uint8Array(digest).subarray(0, CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES)\n )\n}\n\nexport async function computeCacheBustingSearchParam(\n prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): Promise<string> {\n const input = createCacheBustingSearchParamInput(\n prefetchHeader,\n segmentPrefetchHeader,\n stateTreeHeader,\n nextUrlHeader\n )\n if (input === null) {\n return ''\n }\n\n return computeCacheBustingSearchParamFromInput(input)\n}\n\nexport function computeLegacyCacheBustingSearchParam(\n prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): string {\n const input = createCacheBustingSearchParamInput(\n prefetchHeader,\n segmentPrefetchHeader,\n stateTreeHeader,\n nextUrlHeader\n )\n if (input === null) {\n return ''\n }\n\n return hexHash(input)\n}\n"],"names":["hexHash","CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES","textEncoder","TextEncoder","encodeCacheBustingSearchParam","bytes","binary","i","length","String","fromCharCode","btoa","replace","normalizeCacheBustingInput","value","undefined","Array","isArray","join","createCacheBustingSearchParamInput","prefetchHeader","segmentPrefetchHeader","stateTreeHeader","nextUrlHeader","computeCacheBustingSearchParamFromInput","input","digest","globalThis","crypto","subtle","encode","Uint8Array","subarray","computeCacheBustingSearchParam","computeLegacyCacheBustingSearchParam"],"mappings":";;;;;;AAAA,SAASA,OAAO,QAAQ,aAAY;;AAEpC,MAAMC,0CAA0C;AAChD,MAAMC,cAAc,IAAIC;AAExB,SAASC,8BAA8BC,KAAiB;IACtD,IAAIC,SAAS;IACb,IAAK,IAAIC,IAAI,GAAGA,IAAIF,MAAMG,MAAM,EAAED,IAAK;QACrCD,UAAUG,OAAOC,YAAY,CAACL,KAAK,CAACE,EAAE;IACxC;IAEA,OAAOI,KAAKL,QAAQM,OAAO,CAAC,OAAO,KAAKA,OAAO,CAAC,OAAO,KAAKA,OAAO,CAAC,OAAO;AAC7E;AAEA,SAASC,2BACPC,KAAoC;IAEpC,IAAIA,UAAUC,WAAW;QACvB,OAAO;IACT;IACA,OAAOC,MAAMC,OAAO,CAACH,SAASA,MAAMI,IAAI,CAAC,OAAOJ;AAClD;AAEA,SAASK,mCACPC,cAAiD,EACjDC,qBAAoD,EACpDC,eAA8C,EAC9CC,aAA4C;IAE5C,IACGH,CAAAA,mBAAmBL,aAAaK,mBAAmB,GAAE,KACtDC,0BAA0BN,aAC1BO,oBAAoBP,aACpBQ,kBAAkBR,WAClB;QACA,OAAO;IACT;IAEA,OAAO;QACLK,kBAAkB;QAClBP,2BAA2BQ;QAC3BR,2BAA2BS;QAC3BT,2BAA2BU;KAC5B,CAACL,IAAI,CAAC;AACT;AAEA,eAAeM,wCACbC,KAAa;IAEb,qDAAqD;IACrD,MAAMC,SAAS,MAAMC,WAAWC,MAAM,CAACC,MAAM,CAACH,MAAM,CAClD,WACAxB,YAAY4B,MAAM,CAACL;IAErB,OAAOrB,8BACL,IAAI2B,WAAWL,QAAQM,QAAQ,CAAC,GAAG/B;AAEvC;AAEO,eAAegC,+BACpBb,cAAiD,EACjDC,qBAAoD,EACpDC,eAA8C,EAC9CC,aAA4C;IAE5C,MAAME,QAAQN,mCACZC,gBACAC,uBACAC,iBACAC;IAEF,IAAIE,UAAU,MAAM;QAClB,OAAO;IACT;IAEA,OAAOD,wCAAwCC;AACjD;AAEO,SAASS,qCACdd,cAAiD,EACjDC,qBAAoD,EACpDC,eAA8C,EAC9CC,aAA4C;IAE5C,MAAME,QAAQN,mCACZC,gBACAC,uBACAC,iBACAC;IAEF,IAAIE,UAAU,MAAM;QAClB,OAAO;IACT;IAEA,WAAOzB,gKAAAA,EAAQyB;AACjB","ignoreList":[0]}},
|
||||
{"offset": {"line": 5855, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/format-next-pathname-info.ts"],"sourcesContent":["import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n"],"names":["removeTrailingSlash","addPathPrefix","addPathSuffix","addLocale","formatNextPathnameInfo","info","pathname","locale","buildId","undefined","defaultLocale","ignorePrefix","trailingSlash","basePath","endsWith"],"mappings":";;;;AACA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,SAAS,QAAQ,eAAc;;;;;AAOjC,SAASC,uBAAuBC,IAAkB;IACvD,IAAIC,eAAWH,8LAAAA,EACbE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,eAAWN,sNAAAA,EAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,eAAWJ,0MAAAA,MACTD,0MAAAA,EAAcK,UAAU,CAAC,YAAY,EAAED,KAAKG,OAAO,EAAE,GACrDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,eAAWL,0MAAAA,EAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,WACjBZ,0MAAAA,EAAcI,UAAU,OACxBA,eACFN,sNAAAA,EAAoBM;AAC1B","ignoreList":[0]}},
|
||||
{"offset": {"line": 5882, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/format-url.ts"],"sourcesContent":["// Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { UrlObject } from 'url'\nimport type { ParsedUrlQuery } from 'querystring'\nimport * as querystring from './querystring'\n\nconst slashedProtocols = /https?|ftp|gopher|file/\n\nexport function formatUrl(urlObj: UrlObject) {\n let { auth, hostname } = urlObj\n let protocol = urlObj.protocol || ''\n let pathname = urlObj.pathname || ''\n let hash = urlObj.hash || ''\n let query = urlObj.query || ''\n let host: string | false = false\n\n auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : ''\n\n if (urlObj.host) {\n host = auth + urlObj.host\n } else if (hostname) {\n host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname)\n if (urlObj.port) {\n host += ':' + urlObj.port\n }\n }\n\n if (query && typeof query === 'object') {\n query = String(querystring.urlQueryToSearchParams(query as ParsedUrlQuery))\n }\n\n let search = urlObj.search || (query && `?${query}`) || ''\n\n if (protocol && !protocol.endsWith(':')) protocol += ':'\n\n if (\n urlObj.slashes ||\n ((!protocol || slashedProtocols.test(protocol)) && host !== false)\n ) {\n host = '//' + (host || '')\n if (pathname && pathname[0] !== '/') pathname = '/' + pathname\n } else if (!host) {\n host = ''\n }\n\n if (hash && hash[0] !== '#') hash = '#' + hash\n if (search && search[0] !== '?') search = '?' + search\n\n pathname = pathname.replace(/[?#]/g, encodeURIComponent)\n search = search.replace('#', '%23')\n\n return `${protocol}${host}${pathname}${search}${hash}`\n}\n\nexport const urlObjectKeys = [\n 'auth',\n 'hash',\n 'host',\n 'hostname',\n 'href',\n 'path',\n 'pathname',\n 'port',\n 'protocol',\n 'query',\n 'search',\n 'slashes',\n]\n\nexport function formatWithValidation(url: UrlObject): string {\n if (process.env.NODE_ENV === 'development') {\n if (url !== null && typeof url === 'object') {\n Object.keys(url).forEach((key) => {\n if (!urlObjectKeys.includes(key)) {\n console.warn(\n `Unknown key passed via urlObject into url.format: ${key}`\n )\n }\n })\n }\n }\n\n return formatUrl(url)\n}\n"],"names":["querystring","slashedProtocols","formatUrl","urlObj","auth","hostname","protocol","pathname","hash","query","host","encodeURIComponent","replace","indexOf","port","String","urlQueryToSearchParams","search","endsWith","slashes","test","urlObjectKeys","formatWithValidation","url","process","env","NODE_ENV","Object","keys","forEach","key","includes","console","warn"],"mappings":";;;;;;;;AAAA,uCAAuC;AACvC,sDAAsD;AACtD,EAAE;AACF,0EAA0E;AAC1E,gEAAgE;AAChE,sEAAsE;AACtE,sEAAsE;AACtE,4EAA4E;AAC5E,qEAAqE;AACrE,wBAAwB;AACxB,EAAE;AACF,0EAA0E;AAC1E,yDAAyD;AACzD,EAAE;AACF,0EAA0E;AAC1E,6DAA6D;AAC7D,4EAA4E;AAC5E,2EAA2E;AAC3E,wEAAwE;AACxE,4EAA4E;AAC5E,yCAAyC;AAIzC,YAAYA,iBAAiB,gBAAe;;AAE5C,MAAMC,mBAAmB;AAElB,SAASC,UAAUC,MAAiB;IACzC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGF;IACzB,IAAIG,WAAWH,OAAOG,QAAQ,IAAI;IAClC,IAAIC,WAAWJ,OAAOI,QAAQ,IAAI;IAClC,IAAIC,OAAOL,OAAOK,IAAI,IAAI;IAC1B,IAAIC,QAAQN,OAAOM,KAAK,IAAI;IAC5B,IAAIC,OAAuB;IAE3BN,OAAOA,OAAOO,mBAAmBP,MAAMQ,OAAO,CAAC,QAAQ,OAAO,MAAM;IAEpE,IAAIT,OAAOO,IAAI,EAAE;QACfA,OAAON,OAAOD,OAAOO,IAAI;IAC3B,OAAO,IAAIL,UAAU;QACnBK,OAAON,OAAQ,CAAA,CAACC,SAASQ,OAAO,CAAC,OAAO,CAAC,CAAC,EAAER,SAAS,CAAC,CAAC,GAAGA,QAAO;QACjE,IAAIF,OAAOW,IAAI,EAAE;YACfJ,QAAQ,MAAMP,OAAOW,IAAI;QAC3B;IACF;IAEA,IAAIL,SAAS,OAAOA,UAAU,UAAU;QACtCA,QAAQM,OAAOf,YAAYgB,6LAAsB,CAACP;IACpD;IAEA,IAAIQ,SAASd,OAAOc,MAAM,IAAKR,SAAS,CAAC,CAAC,EAAEA,OAAO,IAAK;IAExD,IAAIH,YAAY,CAACA,SAASY,QAAQ,CAAC,MAAMZ,YAAY;IAErD,IACEH,OAAOgB,OAAO,IACZ,Line truncated
|
||||
{"offset": {"line": 5977, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/get-next-pathname-info.ts"],"sourcesContent":["import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n"],"names":["normalizeLocalePath","removePathPrefix","pathHasPrefix","getNextPathnameInfo","pathname","options","basePath","i18n","trailingSlash","nextConfig","info","endsWith","pathnameNoDataPrefix","startsWith","paths","replace","split","buildId","slice","join","parseData","result","i18nProvider","analyze","locales","locale","detectedLocale"],"mappings":";;;;AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,SAASC,aAAa,QAAQ,oBAAmB;;;;AAkD1C,SAASC,oBACdC,QAAgB,EAChBC,OAAgB;IAEhB,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,aAAa,EAAE,GAAGH,QAAQI,UAAU,IAAI,CAAC;IACjE,MAAMC,OAAyB;QAC7BN;QACAI,eAAeJ,aAAa,MAAMA,SAASO,QAAQ,CAAC,OAAOH;IAC7D;IAEA,IAAIF,gBAAYJ,0MAAAA,EAAcQ,KAAKN,QAAQ,EAAEE,WAAW;QACtDI,KAAKN,QAAQ,OAAGH,gNAAAA,EAAiBS,KAAKN,QAAQ,EAAEE;QAChDI,KAAKJ,QAAQ,GAAGA;IAClB;IACA,IAAIM,uBAAuBF,KAAKN,QAAQ;IAExC,IACEM,KAAKN,QAAQ,CAACS,UAAU,CAAC,mBACzBH,KAAKN,QAAQ,CAACO,QAAQ,CAAC,UACvB;QACA,MAAMG,QAAQJ,KAAKN,QAAQ,CACxBW,OAAO,CAAC,oBAAoB,IAC5BA,OAAO,CAAC,WAAW,IACnBC,KAAK,CAAC;QAET,MAAMC,UAAUH,KAAK,CAAC,EAAE;QACxBJ,KAAKO,OAAO,GAAGA;QACfL,uBACEE,KAAK,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,EAAEA,MAAMI,KAAK,CAAC,GAAGC,IAAI,CAAC,MAAM,GAAG;QAE1D,sDAAsD;QACtD,kDAAkD;QAClD,IAAId,QAAQe,SAAS,KAAK,MAAM;YAC9BV,KAAKN,QAAQ,GAAGQ;QAClB;IACF;IAEA,4EAA4E;IAC5E,yBAAyB;IACzB,IAAIL,MAAM;QACR,IAAIc,SAAShB,QAAQiB,YAAY,GAC7BjB,QAAQiB,YAAY,CAACC,OAAO,CAACb,KAAKN,QAAQ,QAC1CJ,2MAAAA,EAAoBU,KAAKN,QAAQ,EAAEG,KAAKiB,OAAO;QAEnDd,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;QACnChB,KAAKN,QAAQ,GAAGiB,OAAOjB,QAAQ,IAAIM,KAAKN,QAAQ;QAEhD,IAAI,CAACiB,OAAOLine truncated
|
||||
{"offset": {"line": 6028, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/html-bots.ts"],"sourcesContent":["// This regex contains the bots that we need to do a blocking render for and can't safely stream the response\n// due to how they parse the DOM. For example, they might explicitly check for metadata in the `head` tag, so we can't stream metadata tags after the `head` was sent.\n// Note: The pattern [\\w-]+-Google captures all Google crawlers with \"-Google\" suffix (e.g., Mediapartners-Google, AdsBot-Google, Storebot-Google)\n// as well as crawlers starting with \"Google-\" (e.g., Google-PageRenderer, Google-InspectionTool)\nexport const HTML_LIMITED_BOT_UA_RE =\n /[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight/i\n"],"names":["HTML_LIMITED_BOT_UA_RE"],"mappings":"AAAA,6GAA6G;AAC7G,sKAAsK;AACtK,kJAAkJ;AAClJ,iGAAiG;;;;;AAC1F,MAAMA,yBACX,sTAAqT","ignoreList":[0]}},
|
||||
{"offset": {"line": 6041, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/is-bot.ts"],"sourcesContent":["import { HTML_LIMITED_BOT_UA_RE } from './html-bots'\n\n// Bot crawler that will spin up a headless browser and execute JS.\n// Only the main Googlebot search crawler executes JavaScript, not other Google crawlers.\n// x-ref: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers\n// This regex specifically matches \"Googlebot\" but NOT \"Mediapartners-Google\", \"AdsBot-Google\", etc.\nconst HEADLESS_BROWSER_BOT_UA_RE = /Googlebot(?!-)|Googlebot$/i\n\nexport const HTML_LIMITED_BOT_UA_RE_STRING = HTML_LIMITED_BOT_UA_RE.source\n\nexport { HTML_LIMITED_BOT_UA_RE }\n\nfunction isDomBotUA(userAgent: string) {\n return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent)\n}\n\nfunction isHtmlLimitedBotUA(userAgent: string) {\n return HTML_LIMITED_BOT_UA_RE.test(userAgent)\n}\n\nexport function isBot(userAgent: string): boolean {\n return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent)\n}\n\nexport function getBotType(userAgent: string): 'dom' | 'html' | undefined {\n if (isDomBotUA(userAgent)) {\n return 'dom'\n }\n if (isHtmlLimitedBotUA(userAgent)) {\n return 'html'\n }\n return undefined\n}\n"],"names":["HTML_LIMITED_BOT_UA_RE","HEADLESS_BROWSER_BOT_UA_RE","HTML_LIMITED_BOT_UA_RE_STRING","source","isDomBotUA","userAgent","test","isHtmlLimitedBotUA","isBot","getBotType","undefined"],"mappings":";;;;;;;;AAAA,SAASA,sBAAsB,QAAQ,cAAa;;AAEpD,mEAAmE;AACnE,yFAAyF;AACzF,4FAA4F;AAC5F,oGAAoG;AACpG,MAAMC,6BAA6B;AAE5B,MAAMC,gCAAgCF,0MAAAA,CAAuBG,MAAM,CAAA;;AAI1E,SAASC,WAAWC,SAAiB;IACnC,OAAOJ,2BAA2BK,IAAI,CAACD;AACzC;AAEA,SAASE,mBAAmBF,SAAiB;IAC3C,OAAOL,0MAAAA,CAAuBM,IAAI,CAACD;AACrC;AAEO,SAASG,MAAMH,SAAiB;IACrC,OAAOD,WAAWC,cAAcE,mBAAmBF;AACrD;AAEO,SAASI,WAAWJ,SAAiB;IAC1C,IAAID,WAAWC,YAAY;QACzB,OAAO;IACT;IACA,IAAIE,mBAAmBF,YAAY;QACjC,OAAO;IACT;IACA,OAAOK;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 6080, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD;;;;AAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0]}},
|
||||
{"offset": {"line": 6109, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":";;;;AAAA,SAASA,SAAS,QAAQ,eAAc;;AASjC,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,OAAGJ,8LAAAA,EAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0]}},
|
||||
{"offset": {"line": 6126, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/querystring.ts"],"sourcesContent":["import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n searchParams: URLSearchParams\n): ParsedUrlQuery {\n const query: ParsedUrlQuery = {}\n for (const [key, value] of searchParams.entries()) {\n const existing = query[key]\n if (typeof existing === 'undefined') {\n query[key] = value\n } else if (Array.isArray(existing)) {\n existing.push(value)\n } else {\n query[key] = [existing, value]\n }\n }\n return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n if (typeof param === 'string') {\n return param\n }\n\n if (\n (typeof param === 'number' && !isNaN(param)) ||\n typeof param === 'boolean'\n ) {\n return String(param)\n } else {\n return ''\n }\n}\n\nexport function urlQueryToSearchParams(query: ParsedUrlQuery): URLSearchParams {\n const searchParams = new URLSearchParams()\n for (const [key, value] of Object.entries(query)) {\n if (Array.isArray(value)) {\n for (const item of value) {\n searchParams.append(key, stringifyUrlQueryParam(item))\n }\n } else {\n searchParams.set(key, stringifyUrlQueryParam(value))\n }\n }\n return searchParams\n}\n\nexport function assign(\n target: URLSearchParams,\n ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n for (const searchParams of searchParamsList) {\n for (const key of searchParams.keys()) {\n target.delete(key)\n }\n\n for (const [key, value] of searchParams.entries()) {\n target.append(key, value)\n }\n }\n\n return target\n}\n"],"names":["searchParamsToUrlQuery","searchParams","query","key","value","entries","existing","Array","isArray","push","stringifyUrlQueryParam","param","isNaN","String","urlQueryToSearchParams","URLSearchParams","Object","item","append","set","assign","target","searchParamsList","keys","delete"],"mappings":";;;;;;;;AAEO,SAASA,uBACdC,YAA6B;IAE7B,MAAMC,QAAwB,CAAC;IAC/B,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIH,aAAaI,OAAO,GAAI;QACjD,MAAMC,WAAWJ,KAAK,CAACC,IAAI;QAC3B,IAAI,OAAOG,aAAa,aAAa;YACnCJ,KAAK,CAACC,IAAI,GAAGC;QACf,OAAO,IAAIG,MAAMC,OAAO,CAACF,WAAW;YAClCA,SAASG,IAAI,CAACL;QAChB,OAAO;YACLF,KAAK,CAACC,IAAI,GAAG;gBAACG;gBAAUF;aAAM;QAChC;IACF;IACA,OAAOF;AACT;AAEA,SAASQ,uBAAuBC,KAAc;IAC5C,IAAI,OAAOA,UAAU,UAAU;QAC7B,OAAOA;IACT;IAEA,IACG,OAAOA,UAAU,YAAY,CAACC,MAAMD,UACrC,OAAOA,UAAU,WACjB;QACA,OAAOE,OAAOF;IAChB,OAAO;QACL,OAAO;IACT;AACF;AAEO,SAASG,uBAAuBZ,KAAqB;IAC1D,MAAMD,eAAe,IAAIc;IACzB,KAAK,MAAM,CAACZ,KAAKC,MAAM,IAAIY,OAAOX,OAAO,CAACH,OAAQ;QAChD,IAAIK,MAAMC,OAAO,CAACJ,QAAQ;YACxB,KAAK,MAAMa,QAAQb,MAAO;gBACxBH,aAAaiB,MAAM,CAACf,KAAKO,uBAAuBO;YAClD;QACF,OAAO;YACLhB,aAAakB,GAAG,CAAChB,KAAKO,uBAAuBN;QAC/C;IACF;IACA,OAAOH;AACT;AAEO,SAASmB,OACdC,MAAuB,EACvB,GAAGC,gBAAmC;IAEtC,KAAK,MAAMrB,gBAAgBqB,iBAAkB;QAC3C,KAAK,MAAMnB,OAAOF,aAAasB,IAAI,GAAI;YACrCF,OAAOG,MAAM,CAACrB;QAChB;QAEA,KAAK,MAAM,CAACA,KAAKC,MAAM,IAAIH,aAAaI,OAAO,GAAI;YACjDgB,OAAOH,MAAM,CAACf,KAAKC;QACrB;IACF;IAEA,OAAOiB;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 6189, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/remove-path-prefix.ts"],"sourcesContent":["import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n"],"names":["pathHasPrefix","removePathPrefix","path","prefix","withoutPrefix","slice","length","startsWith"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,oBAAmB;;AAU1C,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,KAACH,0MAAAA,EAAcE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAO,CAAC,CAAC,EAAEA,eAAe;AAC5B","ignoreList":[0]}},
|
||||
{"offset": {"line": 6225, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n *\n * Uses charCodeAt (47 === '/') instead of regex to avoid the overhead of\n * compiling and executing a RegExp on every call (~3-5x faster).\n */\nexport function removeTrailingSlash(route: string) {\n return route.charCodeAt(route.length - 1) === 47 && route.length > 1\n ? route.slice(0, -1)\n : route\n}\n"],"names":["removeTrailingSlash","route","charCodeAt","length","slice"],"mappings":"AAAA;;;;;;;CAOC,GACD;;;;AAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,UAAU,CAACD,MAAME,MAAM,GAAG,OAAO,MAAMF,MAAME,MAAM,GAAG,IAC/DF,MAAMG,KAAK,CAAC,GAAG,CAAC,KAChBH;AACN","ignoreList":[0]}},
|
||||
{"offset": {"line": 6243, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/utils.ts"],"sourcesContent":["import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n Context extends BaseContext = NextPageContext,\n InitialProps = {},\n Props = {},\n> = ComponentType<Props> & {\n /**\n * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n * @param context Context of `page`\n */\n getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n DocumentContext,\n DocumentInitialProps,\n DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n AppContextType,\n P,\n AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n id: string\n startTime: number\n value: number\n attribution?: { [key: string]: unknown }\n} & (\n | {\n label: 'web-vital'\n name: (typeof WEB_VITALS)[number]\n }\n | {\n label: 'custom'\n name:\n | 'Next.js-hydration'\n | 'Next.js-route-change-to-render'\n | 'Next.js-render'\n }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n | {\n enhanceApp?: Enhancer<AppType>\n enhanceComponent?: Enhancer<NextComponentType>\n }\n | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n html: string\n head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n res?: ServerResponse\n [k: string]: any\n}\n\nexport type NEXT_DATA = {\n props: Record<string, any>\n page: string\n query: ParsedUrlQuery\n buildId: string\n assetPrefix?: string\n nextExport?: boolean\n autoExport?: boolean\n isFallback?: boolean\n isExperimentalCompile?: boolean\n dynamicIds?: (string | number)[]\n err?: Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n __NEXT_ERROR_CODE?: string\n }\n gsp?: boolean\n gssp?: boolean\n customServer?: boolean\n gip?: boolean\n appGip?: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n scriptLoader?: any[]\n isPreview?: boolean\n notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n /**\n * Error object if encountered during rendering\n */\n err?: (Error & { statusCode?: number }) | null\n /**\n * `HTTP` request object.\n */\n req?: IncomingMessage\n /**\n * `HTTP` response object.\n */\n res?: ServerResponse\n /**\n * Path section of `URL`.\n */\n pathname: string\n /**\n * Query string section of `URL` parsed as an object.\n */\n query: ParsedUrlQuery\n /**\n * `String` of the actual path including query.\n */\n asPath?: string\n /**\n * The currently active locale\n */\n locale?: string\n /**\n * All configured locales\n */\n locales?: readonly string[]\n /**\n * The configured default locale\n */\n defaultLocale?: string\n /**\n * `Component` the tree of the App to use if needing to render separately\n */\n AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n Component: NextComponentType<NextPageContext>\n AppTree: AppTreeType\n ctx: NextPageContext\n router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n pageProps: PageProps\n}\n\nexport type AppPropsType<\n Router extends NextRouter = NextRouter,\n PageProps = {},\n> = AppInitialProps<PageProps> & {\n Component: NextComponentType<NextPageContext, any, any>\n router: Router\n __N_SSG?: boolean\n __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n renderPage: RenderPage\n defaultGetInitialProps(\n ctx: DocumentContext,\n options?: { nonce?: string }\n ): Promise<DocumentInitialProps>\n}\n\nexport typLine truncated
|
||||
{"offset": {"line": 6418, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/pages/_error.tsx"],"sourcesContent":["import React from 'react'\nimport Head from '../shared/lib/head'\nimport type { NextPageContext } from '../shared/lib/utils'\n\nconst statusCodes: { [code: number]: string } = {\n 400: 'Bad Request',\n 404: 'This page could not be found',\n 405: 'Method Not Allowed',\n 500: 'Internal Server Error',\n}\n\nexport type ErrorProps = {\n statusCode: number\n hostname?: string\n title?: string\n withDarkMode?: boolean\n}\n\nfunction _getInitialProps({\n req,\n res,\n err,\n}: NextPageContext): Promise<ErrorProps> | ErrorProps {\n const statusCode =\n res && res.statusCode ? res.statusCode : err ? err.statusCode! : 404\n\n let hostname\n\n if (typeof window !== 'undefined') {\n hostname = window.location.hostname\n } else if (req) {\n const { getRequestMeta } =\n // TODO(browser-variant): migrate to a .ts/.browser.ts split so the browser bundle drops the server branch; see scripts/generate-browser-variant-aliases.mjs\n // ast-grep-ignore: no-typeof-window-require-tsx\n require('../server/request-meta') as typeof import('../server/request-meta')\n\n const initUrl = getRequestMeta(req, 'initURL')\n if (initUrl) {\n const url = new URL(initUrl)\n hostname = url.hostname\n }\n }\n\n return { statusCode, hostname }\n}\n\nconst styles: Record<string, React.CSSProperties> = {\n error: {\n // https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52\n fontFamily:\n 'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n height: '100vh',\n textAlign: 'center',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n desc: {\n lineHeight: '48px',\n },\n h1: {\n display: 'inline-block',\n margin: '0 20px 0 0',\n paddingRight: 23,\n fontSize: 24,\n fontWeight: 500,\n verticalAlign: 'top',\n },\n h2: {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: '28px',\n },\n wrap: {\n display: 'inline-block',\n },\n}\n\n/**\n * `Error` component used for handling errors.\n */\nexport default class Error<P = {}> extends React.Component<P & ErrorProps> {\n static displayName = 'ErrorPage'\n\n static getInitialProps = _getInitialProps\n static origGetInitialProps = _getInitialProps\n\n render() {\n const { statusCode, withDarkMode = true } = this.props\n const title =\n this.props.title ||\n statusCodes[statusCode] ||\n 'An unexpected error has occurred'\n\n return (\n <div style={styles.error}>\n <Head>\n <title>\n {statusCode\n ? `${statusCode}: ${title}`\n : 'Application error: a client-side exception has occurred'}\n </title>\n </Head>\n <div style={styles.desc}>\n <style\n dangerouslySetInnerHTML={{\n /* CSS minified from\n body { margin: 0; color: #000; background: #fff; }\n .next-error-h1 {\n border-right: 1px solid rgba(0, 0, 0, .3);\n }\n\n ${\n withDarkMode\n ? `@media (prefers-color-scheme: dark) {\n body { color: #fff; background: #000; }\n .next-error-h1 {\n border-right: 1px solid rgba(255, 255, 255, .3);\n }\n }`\n : ''\n }\n */\n __html: `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}${\n withDarkMode\n ? '@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}'\n : ''\n }`,\n }}\n />\n\n {statusCode ? (\n <h1 className=\"next-error-h1\" style={styles.h1}>\n {statusCode}\n </h1>\n ) : null}\n <div style={styles.wrap}>\n <h2 style={styles.h2}>\n {this.props.title || statusCode ? (\n title\n ) : (\n <>\n Application error: a client-side exception has occurred{' '}\n {Boolean(this.props.hostname) && (\n <>while loading {this.props.hostname}</>\n )}{' '}\n (see the browser console for more information)\n </>\n )}\n .\n </h2>\n </div>\n </div>\n </div>\n )\n }\n}\n"],"names":["Error","statusCodes","_getInitialProps","req","res","err","statusCode","hostname","window","location","getRequestMeta","require","initUrl","url","URL","Line truncated
|
||||
{"offset": {"line": 6578, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request-meta.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'http'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { UrlWithParsedQuery } from 'url'\nimport type { BaseNextRequest } from './base-http'\nimport type { CloneableBody } from './body-streams'\nimport type { RouteMatch } from './route-matches/route-match'\nimport type { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\nimport type {\n ResponseCacheEntry,\n ServerComponentsHmrCache,\n} from './response-cache'\nimport type { PagesDevOverlayBridgeType } from '../next-devtools/userspace/pages/pages-dev-overlay-setup'\nimport type { OpaqueFallbackRouteParams } from './request/fallback-params'\nimport type { IncrementalCache } from './lib/incremental-cache'\nimport type { RevalidateFn } from './lib/router-utils/router-server-context'\nimport type { NextRequest } from './web/exports'\n\n// FIXME: (wyattjoh) this is a temporary solution to allow us to pass data between bundled modules\nexport const NEXT_REQUEST_META = Symbol.for('NextInternalRequestMeta')\n\nexport type NextIncomingMessage = (\n | BaseNextRequest\n | IncomingMessage\n | NextRequest\n) & {\n [NEXT_REQUEST_META]?: RequestMeta\n}\n\n/**\n * The callback function to call when a response cache entry was generated or\n * looked up in the cache. When it returns true, the server assumes that the\n * handler has already responded to the request and will not do so itself.\n */\nexport type OnCacheEntryHandler = (\n /**\n * The response cache entry that was generated or looked up in the cache.\n */\n cacheEntry: ResponseCacheEntry,\n\n /**\n * The request metadata.\n */\n requestMeta: {\n /**\n * The URL that was used to make the request.\n */\n url: string | undefined\n }\n) => Promise<boolean | void> | boolean | void\n\nexport interface RequestMeta {\n /**\n * The query that was used to make the request.\n */\n initQuery?: ParsedUrlQuery\n\n /**\n * The URL that was used to make the request.\n */\n initURL?: string\n\n /**\n * The protocol that was used to make the request.\n */\n initProtocol?: string\n\n /**\n * The body that was read from the request. This is used to allow the body to\n * be read multiple times.\n */\n clonableBody?: CloneableBody\n\n /**\n * True when the request matched a locale domain that was configured in the\n * next.config.js file.\n */\n isLocaleDomain?: boolean\n\n /**\n * True when the request had locale information stripped from the pathname\n * part of the URL.\n */\n didStripLocale?: boolean\n\n /**\n * If the request had its URL rewritten, this is the pathname it was rewritten\n * to (not a full URL, just the pathname).\n */\n rewrittenPathname?: string\n\n /**\n * The resolved pathname for the request. Dynamic route params are\n * interpolated, the pathname is decoded, and the trailing slash is removed.\n */\n resolvedPathname?: string\n\n /**\n * The cookies that were added by middleware and were added to the response.\n */\n middlewareCookie?: string[]\n\n /**\n * The match on the request for a given route.\n */\n match?: RouteMatch\n\n /**\n * The incremental cache to use for the request.\n */\n incrementalCache?: IncrementalCache\n\n /**\n * The server components HMR cache, only for dev.\n */\n serverComponentsHmrCache?: ServerComponentsHmrCache\n\n /**\n * The hash of the most recent server component change (dev only), set by the\n * router-server from the hot-reloader. Included in `\"use cache\"` cache keys\n * so that cached entries are revalidated after an edit, for every client,\n * regardless of whether it runs the HMR client.\n */\n hmrRefreshHash?: string\n\n /**\n * Equals the segment path that was used for the prefetch RSC request.\n */\n segmentPrefetchRSCRequest?: string\n\n /**\n * True when the request is for the prefetch flight data.\n */\n isPrefetchRSCRequest?: true\n\n /**\n * True when the request is for the flight data.\n */\n isRSCRequest?: true\n\n /**\n * A search param set by the Next.js client when performing RSC requests.\n * Because some CDNs do not vary their cache entries on our custom headers,\n * this search param represents a hash of the header values. For any cached\n * RSC request, we should verify that the hash matches before responding.\n * Otherwise this can lead to cache poisoning.\n * TODO: Consider not using custom request headers at all, and instead encode\n * everything into the search param.\n */\n cacheBustingSearchParam?: string\n\n /**\n * True when the request is for the `/_next/data` route using the pages\n * router.\n */\n isNextDataReq?: true\n\n /**\n * Postponed state to use for resumption. When absent, the request is not a\n * Line truncated
|
||||
{"offset": {"line": 6634, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/pages/vendored/contexts/head-manager-context.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HeadManagerContext\n"],"names":["module","exports","require","vendored","HeadManagerContext"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,qHACRC,QAAQ,CAAC,WAAW,CAACC,kBAAkB","ignoreList":[0]}},
|
||||
{"offset": {"line": 6639, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/head.tsx"],"sourcesContent":["'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport Effect from './side-effect'\nimport { HeadManagerContext } from './head-manager-context.shared-runtime'\n\nexport function defaultHead(): JSX.Element[] {\n const head = [\n <meta charSet=\"utf-8\" key=\"charset\" />,\n <meta name=\"viewport\" content=\"width=device-width\" key=\"viewport\" />,\n ]\n return head\n}\n\nfunction onlyReactElement(\n list: Array<React.ReactElement<any>>,\n child: React.ReactElement | number | string\n): Array<React.ReactElement<any>> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n React.Children.toArray(child.props.children).reduce(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n (\n fragmentList: Array<React.ReactElement<any>>,\n fragmentChild: React.ReactElement | number | string\n ): Array<React.ReactElement<any>> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like <title/>\n Also adds support for deduplicated `key` properties\n*/\nfunction unique() {\n const keys = new Set()\n const tags = new Set()\n const metaTypes = new Set()\n const metaCategories: { [metatype: string]: Set<string> } = {}\n\n return (h: React.ReactElement<any>) => {\n let isUnique = true\n let hasKey = false\n\n if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {\n hasKey = true\n const key = h.key.slice(h.key.indexOf('$') + 1)\n if (keys.has(key)) {\n isUnique = false\n } else {\n keys.add(key)\n }\n }\n\n switch (h.type) {\n case 'title':\n case 'base':\n if (tags.has(h.type)) {\n isUnique = false\n } else {\n tags.add(h.type)\n }\n break\n case 'meta':\n for (let i = 0, len = METATYPES.length; i < len; i++) {\n const metatype = METATYPES[i]\n if (!h.props.hasOwnProperty(metatype)) continue\n\n if (metatype === 'charSet') {\n if (metaTypes.has(metatype)) {\n isUnique = false\n } else {\n metaTypes.add(metatype)\n }\n } else {\n const category = h.props[metatype]\n const categories = metaCategories[metatype] || new Set()\n if ((metatype !== 'name' || !hasKey) && categories.has(category)) {\n isUnique = false\n } else {\n categories.add(category)\n metaCategories[metatype] = categories\n }\n }\n }\n break\n default:\n break\n }\n\n return isUnique\n }\n}\n\n/**\n *\n * @param headChildrenElements List of children of <Head>\n */\nfunction reduceComponents(\n headChildrenElements: Array<React.ReactElement<any>>\n) {\n return headChildrenElements\n .reduce(onlyReactElement, [])\n .reverse()\n .concat(defaultHead().reverse())\n .filter(unique())\n .reverse()\n .map((c: React.ReactElement<any>, i: number) => {\n const key = c.key || i\n if (process.env.NODE_ENV === 'development') {\n const { warnOnce } =\n require('./utils/warn-once') as typeof import('./utils/warn-once')\n // omit JSON-LD structured data snippets from the warning\n if (c.type === 'script' && c.props['type'] !== 'application/ld+json') {\n const srcMessage = c.props['src']\n ? `<script> tag with src=\"${c.props['src']}\"`\n : `inline <script>`\n warnOnce(\n `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`\n )\n } else if (c.type === 'link' && c.props['rel'] === 'stylesheet') {\n warnOnce(\n `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-stylesheLine truncated
|
||||
{"offset": {"line": 6802, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/side-effect.tsx"],"sourcesContent":["import type React from 'react'\nimport { Children, useEffect, useLayoutEffect, type JSX } from 'react'\n\ntype State = JSX.Element[] | undefined\n\nexport type SideEffectProps = {\n reduceComponentsToState: (components: Array<React.ReactElement<any>>) => State\n handleStateChange?: (state: State) => void\n headManager: any\n children: React.ReactNode\n}\n\nconst isServer = typeof window === 'undefined'\nconst useClientOnlyLayoutEffect = isServer ? () => {} : useLayoutEffect\nconst useClientOnlyEffect = isServer ? () => {} : useEffect\n\nexport default function SideEffect(props: SideEffectProps) {\n const { headManager, reduceComponentsToState } = props\n\n function emitChange() {\n if (headManager && headManager.mountedInstances) {\n const headElements = Children.toArray(\n Array.from(headManager.mountedInstances as Set<React.ReactNode>).filter(\n Boolean\n )\n ) as React.ReactElement[]\n headManager.updateHead(reduceComponentsToState(headElements))\n }\n }\n\n if (isServer) {\n headManager?.mountedInstances?.add(props.children)\n emitChange()\n }\n\n useClientOnlyLayoutEffect(() => {\n headManager?.mountedInstances?.add(props.children)\n return () => {\n headManager?.mountedInstances?.delete(props.children)\n }\n })\n\n // We need to call `updateHead` method whenever the `SideEffect` is trigger in all\n // life-cycles: mount, update, unmount. However, if there are multiple `SideEffect`s\n // being rendered, we only trigger the method from the last one.\n // This is ensured by keeping the last unflushed `updateHead` in the `_pendingUpdate`\n // singleton in the layout effect pass, and actually trigger it in the effect pass.\n useClientOnlyLayoutEffect(() => {\n if (headManager) {\n headManager._pendingUpdate = emitChange\n }\n return () => {\n if (headManager) {\n headManager._pendingUpdate = emitChange\n }\n }\n })\n\n useClientOnlyEffect(() => {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate()\n headManager._pendingUpdate = null\n }\n return () => {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate()\n headManager._pendingUpdate = null\n }\n }\n })\n\n return null\n}\n"],"names":["SideEffect","isServer","window","useClientOnlyLayoutEffect","useLayoutEffect","useClientOnlyEffect","useEffect","props","headManager","reduceComponentsToState","emitChange","mountedInstances","headElements","Children","toArray","Array","from","filter","Boolean","updateHead","add","children","delete","_pendingUpdate"],"mappings":";;;+BAgBA,WAAA;;;eAAwBA;;;uBAfuC;AAW/D,MAAMC,WAAW,OAAOC,2CAAW;AACnC,MAAMC,4BAA4BF,uCAAW,KAAO,IAAIG,sBAAe;AACvE,MAAMC,sBAAsBJ,uCAAW,KAAO,IAAIK,gBAAS;AAE5C,SAASN,WAAWO,KAAsB;IACvD,MAAM,EAAEC,WAAW,EAAEC,uBAAuB,EAAE,GAAGF;IAEjD,SAASG;QACP,IAAIF,eAAeA,YAAYG,gBAAgB,EAAE;YAC/C,MAAMC,eAAeC,OAAAA,QAAQ,CAACC,OAAO,CACnCC,MAAMC,IAAI,CAACR,YAAYG,gBAAgB,EAA0BM,MAAM,CACrEC;YAGJV,YAAYW,UAAU,CAACV,wBAAwBG;QACjD;IACF;IAEA,IAAIX,oCAAU;QACZO,aAAaG,kBAAkBS,IAAIb,MAAMc,QAAQ;QACjDX;IACF;IAEAP,0BAA0B;QACxBK,aAAaG,kBAAkBS,IAAIb,MAAMc,QAAQ;QACjD,OAAO;YACLb,aAAaG,kBAAkBW,OAAOf,MAAMc,QAAQ;QACtD;IACF;IAEA,kFAAkF;IAClF,oFAAoF;IACpF,gEAAgE;IAChE,qFAAqF;IACrF,mFAAmF;IACnFlB,0BAA0B;QACxB,IAAIK,aAAa;YACfA,YAAYe,cAAc,GAAGb;QAC/B;QACA,OAAO;YACL,IAAIF,aAAa;gBACfA,YAAYe,cAAc,GAAGb;YAC/B;QACF;IACF;IAEAL,oBAAoB;QAClB,IAAIG,eAAeA,YAAYe,cAAc,EAAE;YAC7Cf,YAAYe,cAAc;YAC1Bf,YAAYe,cAAc,GAAG;QAC/B;QACA,OAAO;YACL,IAAIf,eAAeA,YAAYe,cAAc,EAAE;gBAC7Cf,YAAYe,cAAc;gBAC1Bf,YAAYe,cAAc,GAAG;YAC/B;QACF;IACF;IAEA,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 6866, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/utils/warn-once.ts"],"sourcesContent":["let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n"],"names":["warnOnce","_","process","env","NODE_ENV","warnings","Set","msg","has","console","warn","add"],"mappings":";;;+BAWSA,YAAAA;;;eAAAA;;;AAXT,IAAIA,WAAW,CAACC,KAAe;AAC/B,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,WAAc;IACzC,MAAMC,WAAW,IAAIC;IACrBN,WAAW,CAACO;QACV,IAAI,CAACF,SAASG,GAAG,CAACD,MAAM;YACtBE,QAAQC,IAAI,CAACH;QACf;QACAF,SAASM,GAAG,CAACJ;IACf;AACF","ignoreList":[0]}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js"],"sourcesContent":["// inlined from the former `void-elements` dependency, so the package has\n// zero runtime dependencies. `!doctype`/`!DOCTYPE` are treated as void so a\n// doctype parses as a childless node instead of swallowing the document.\nconst voidElements = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true,\n '!doctype': true,\n '!DOCTYPE': true,\n};\n\nconst attrRE = /\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\"[^\"]*\"|'[^']*')/g;\n\nfunction parseTag(tag) {\n const res = {\n type: 'tag',\n name: '',\n voidElement: false,\n attrs: {},\n children: [],\n };\n\n const tagMatch = tag.match(/<\\/?([^\\s]+?)[/\\s>]/);\n if (tagMatch) {\n res.name = tagMatch[1];\n // void-element lookup stays case sensitive on purpose: react-i18next\n // relies on `<Br>` NOT being treated as a void `<br>` (see 1df0f9d)\n if (voidElements[tagMatch[1]] || tag.charAt(tag.length - 2) === '/') {\n res.voidElement = true;\n }\n\n // handle comment tag\n if (res.name.startsWith('!--')) {\n const endIndex = tag.indexOf('-->');\n return {\n type: 'comment',\n comment: endIndex !== -1 ? tag.slice(4, endIndex) : '',\n }\n }\n }\n\n const reg = new RegExp(attrRE);\n let result = null;\n for (;;) {\n result = reg.exec(tag);\n\n if (result === null) {\n break\n }\n\n if (!result[0].trim()) {\n continue\n }\n\n if (result[1]) {\n const attr = result[1].trim();\n // boolean attributes carry `null` so stringify can render them bare\n // (`<input disabled/>` instead of `<input disabled=\"\"/>`)\n let arr = [attr, null];\n\n const eq = attr.indexOf('=');\n if (eq > -1) {\n // split at the first `=` only, so `data-x=a=b` keeps its full value\n arr = [attr.slice(0, eq), attr.slice(eq + 1)];\n }\n\n res.attrs[arr[0]] = arr[1];\n reg.lastIndex--;\n } else if (result[2]) {\n res.attrs[result[2]] = result[3].trim().substring(1, result[3].length - 1);\n }\n }\n\n return res\n}\n\n// comments are matched as a whole (so `>` inside them is fine), everything\n// else tag-shaped is matched by the second alternative\nconst tagRE = /<!--[\\s\\S]*?-->|<[a-zA-Z0-9\\-!/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g;\nconst tagNameRE = /<\\/?([^\\s]+?)[/\\s>]/;\nconst whitespaceRE = /^\\s*$/;\n// tags whose content is raw text: nothing inside them is markup\nconst rawTextRE = /^(script|style)$/i;\n\n// placeholder for `<` of tags rejected by options.allowedTags; restored to a\n// literal `<` in text/attr/comment content after parsing (U+0000 cannot appear\n// in sane input, and a collision would merely render as an extra `<`)\nconst sentinel = '\\u0000';\n\n// re-used obj for quick lookups of components\nconst empty = Object.create(null);\n\nfunction restoreSentinels(nodes) {\n nodes.forEach(function (node) {\n if (node.type === 'text') {\n node.content = node.content.split(sentinel).join('<');\n return\n }\n if (node.type === 'comment') {\n node.comment = node.comment.split(sentinel).join('<');\n return\n }\n for (const key in node.attrs) {\n const value = node.attrs[key];\n if (typeof value === 'string' && value.indexOf(sentinel) > -1) {\n node.attrs[key] = value.split(sentinel).join('<');\n }\n }\n if (node.children.length) {\n restoreSentinels(node.children);\n }\n });\n}\n\nfunction parse(html, options) {\n const components = (options && options.components) || empty;\n const allowedTags = options && options.allowedTags;\n let restoreNeeded = false;\n if (allowedTags) {\n const isAllowed =\n typeof allowedTags === 'function'\n ? allowedTags\n : function (name) {\n return allowedTags.indexOf(name) > -1\n };\n // neutralize tags whose name is not allowed, so they parse as text.\n // on a disallowed match only the leading `<` is escaped and scanning\n // resumes right after it, so a valid tag glued into the same match\n // (e.g. `<bold>` inside `<10, <20, and <bold>`) still gets recognized\n let out = '';\n let pos = 0;\n tagRE.lastIndex = 0;\n let am;\n while ((am = tagRE.exec(html))) {\n const tag = am[0];\n out += html.slice(pos, am.index);\n const nameMatch = tag.match(tagNameRE);\n if (tag.startsWith('<!--') || (nameMatch && isAllowed(nameMatch[1]))) {\n out += tag;\n pos = am.index + tag.length;\n } else {\n restoreNeeded = true;\n out += sentinel;\n pos = am.index + 1;\n tagRE.lastIndex = pos;\n }\n }\n html = out + html.slLine truncated
|
||||
{"offset": {"line": 390, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/i18next/dist/esm/i18next.js"],"sourcesContent":["const isString = obj => typeof obj === 'string';\nconst defer = () => {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n};\nconst makeString = object => {\n if (object == null) return '';\n return String(object);\n};\nconst copy = (a, s, t) => {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n const stack = !isString(path) ? path : path.split('.');\n let stackIndex = 0;\n while (stackIndex < stack.length - 1) {\n if (canNotTraverseDeeper(object)) return {};\n const key = cleanKey(stack[stackIndex]);\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n ++stackIndex;\n }\n if (canNotTraverseDeeper(object)) return {};\n return {\n obj: object,\n k: cleanKey(stack[stackIndex])\n };\n};\nconst setPath = (object, path, newValue) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n if (obj !== undefined || path.length === 1) {\n obj[k] = newValue;\n return;\n }\n let e = path[path.length - 1];\n let p = path.slice(0, path.length - 1);\n let last = getLastOfPath(object, p, Object);\n while (last.obj === undefined && p.length) {\n e = `${p[p.length - 1]}.${e}`;\n p = p.slice(0, p.length - 1);\n last = getLastOfPath(object, p, Object);\n if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n last.obj = undefined;\n }\n }\n last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (Object.prototype.hasOwnProperty.call(target, prop)) {\n if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nconst _entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n};\nconst escape = data => {\n if (isString(data)) {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n};\nclass RegExpCache {\n constructor(capacity) {\n this.capacity = capacity;\n this.regExpMap = new Map();\n this.regExpQueue = [];\n }\n getRegExp(pattern) {\n const regExpFromCache = this.regExpMap.get(pattern);\n if (regExpFromCache !== undefined) {\n return regExpFromCache;\n }\n const regExpNew = new RegExp(pattern);\n if (this.regExpQueue.length === this.capacity) {\n this.regExpMap.delete(this.regExpQueue.shift());\n }\n this.regExpMap.set(pattern, regExpNew);\n this.regExpQueue.push(pattern);\n return regExpNew;\n }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));\n if (possibleChars.length === 0) return true;\n const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n};\nconst deepFind = (obj, Line truncated
|
||||
{"offset": {"line": 2818, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/I18nextProvider.js"],"sourcesContent":["import { createElement, useMemo } from 'react';\nimport { I18nContext } from './context.js';\nexport function I18nextProvider({\n i18n,\n defaultNS,\n children\n}) {\n const value = useMemo(() => ({\n i18n,\n defaultNS\n }), [i18n, defaultNS]);\n return createElement(I18nContext.Provider, {\n value\n }, children);\n}"],"names":["I18nextProvider","i18n","defaultNS","children","value","Provider"],"mappings":";;;;AAAA;AACA;;;AACO,SAASA,gBAAgB,EAC9BC,IAAI,EACJC,SAAS,EACTC,QAAQ,EACT;IACC,MAAMC,QAAQ,IAAA,gNAAO,EAAC,IAAM,CAAC;YAC3BH;YACAC;QACF,CAAC,GAAG;QAACD;QAAMC;KAAU;IACrB,OAAO,IAAA,sNAAa,EAAC,wLAAW,CAACG,QAAQ,EAAE;QACzCD;IACF,GAAGD;AACL","ignoreList":[0]}},
|
||||
{"offset": {"line": 2842, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/IcuTrans.js"],"sourcesContent":["import { useContext } from 'react';\nimport { IcuTransWithoutContext } from './IcuTransWithoutContext.js';\nimport { getI18n, I18nContext } from './context.js';\nexport function IcuTrans({\n i18nKey,\n defaultTranslation,\n content,\n ns,\n values = {},\n i18n: i18nFromProps,\n t: tFromProps\n}) {\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n const t = tFromProps || i18n?.t.bind(i18n);\n return IcuTransWithoutContext({\n i18nKey,\n defaultTranslation,\n content,\n ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,\n values,\n i18n,\n t: tFromProps\n });\n}\nIcuTrans.displayName = 'IcuTrans';"],"names":["IcuTrans","i18nKey","defaultTranslation","content","ns","values","i18n","i18nFromProps","t","tFromProps","i18nFromContext","defaultNS","defaultNSFromContext","bind","options","displayName"],"mappings":";;;;AAAA;AACA;AACA;AAAA;;;;AACO,SAASA,SAAS,EACvBC,OAAO,EACPC,kBAAkB,EAClBC,OAAO,EACPC,EAAE,EACFC,SAAS,CAAC,CAAC,EACXC,MAAMC,aAAa,EACnBC,GAAGC,UAAU,EACd;IACC,MAAM,EACJH,MAAMI,eAAe,EACrBC,WAAWC,oBAAoB,EAChC,GAAG,IAAA,mNAAU,EAAC,wLAAW,KAAK,CAAC;IAChC,MAAMN,OAAOC,iBAAiBG,mBAAmB,IAAA,yKAAO;IACxD,MAAMF,IAAIC,cAAcH,MAAME,EAAEK,KAAKP;IACrC,OAAO,IAAA,kMAAsB,EAAC;QAC5BL;QACAC;QACAC;QACAC,IAAIA,MAAMI,GAAGJ,MAAMQ,wBAAwBN,MAAMQ,SAASH;QAC1DN;QACAC;QACAE,GAAGC;IACL;AACF;AACAT,SAASe,WAAW,GAAG","ignoreList":[0]}},
|
||||
{"offset": {"line": 2872, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/IcuTransUtils/TranslationParserError.js"],"sourcesContent":["export class TranslationParserError extends Error {\n constructor(message, position, translationString) {\n super(message);\n this.name = 'TranslationParserError';\n this.position = position;\n this.translationString = translationString;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, TranslationParserError);\n }\n }\n}"],"names":["TranslationParserError","Error","message","position","translationString","name","captureStackTrace"],"mappings":";;;;AAAO,MAAMA,+BAA+BC;IAC1CD,YAAYE,OAAO,EAAEC,QAAQ,EAAEC,iBAAiB,CAAE;QAChD,KAAK,CAACF;QACN,IAAI,CAACG,IAAI,GAAG;QACZ,IAAI,CAACF,QAAQ,GAAGA;QAChB,IAAI,CAACC,iBAAiB,GAAGA;QACzB,IAAIH,MAAMK,iBAAiB,EAAE;YAC3BL,MAAMK,iBAAiB,CAAC,IAAI,EAAEN;QAChC;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 2891, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/IcuTransUtils/htmlEntityDecoder.js"],"sourcesContent":["const commonEntities = {\n ' ': '\\u00A0',\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '©': '©',\n '®': '®',\n '™': '™',\n '…': '…',\n '–': '–',\n '—': '—',\n '‘': '\\u2018',\n '’': '\\u2019',\n '‚': '\\u201A',\n '“': '\\u201C',\n '”': '\\u201D',\n '„': '\\u201E',\n '†': '†',\n '‡': '‡',\n '•': '•',\n '′': '′',\n '″': '″',\n '‹': '‹',\n '›': '›',\n '§': '§',\n '¶': '¶',\n '·': '·',\n ' ': '\\u2002',\n ' ': '\\u2003',\n ' ': '\\u2009',\n '€': '€',\n '£': '£',\n '¥': '¥',\n '¢': '¢',\n '¤': '¤',\n '×': '×',\n '÷': '÷',\n '−': '−',\n '±': '±',\n '≠': '≠',\n '≤': '≤',\n '≥': '≥',\n '≈': '≈',\n '≡': '≡',\n '∞': '∞',\n '∫': '∫',\n '∑': '∑',\n '∏': '∏',\n '√': '√',\n '∂': '∂',\n '‰': '‰',\n '°': '°',\n 'µ': 'µ',\n '←': '←',\n '↑': '↑',\n '→': '→',\n '↓': '↓',\n '↔': '↔',\n '↵': '↵',\n '⇐': '⇐',\n '⇑': '⇑',\n '⇒': '⇒',\n '⇓': '⇓',\n '⇔': '⇔',\n 'α': 'α',\n 'β': 'β',\n 'γ': 'γ',\n 'δ': 'δ',\n 'ε': 'ε',\n 'ζ': 'ζ',\n 'η': 'η',\n 'θ': 'θ',\n 'ι': 'ι',\n 'κ': 'κ',\n 'λ': 'λ',\n 'μ': 'μ',\n 'ν': 'ν',\n 'ξ': 'ξ',\n 'ο': 'ο',\n 'π': 'π',\n 'ρ': 'ρ',\n 'σ': 'σ',\n 'τ': 'τ',\n 'υ': 'υ',\n 'φ': 'φ',\n 'χ': 'χ',\n 'ψ': 'ψ',\n 'ω': 'ω',\n 'Α': 'Α',\n 'Β': 'Β',\n 'Γ': 'Γ',\n 'Δ': 'Δ',\n 'Ε': 'Ε',\n 'Ζ': 'Ζ',\n 'Η': 'Η',\n 'Θ': 'Θ',\n 'Ι': 'Ι',\n 'Κ': 'Κ',\n 'Λ': 'Λ',\n 'Μ': 'Μ',\n 'Ν': 'Ν',\n 'Ξ': 'Ξ',\n 'Ο': 'Ο',\n 'Π': 'Π',\n 'Ρ': 'Ρ',\n 'Σ': 'Σ',\n 'Τ': 'Τ',\n 'Υ': 'Υ',\n 'Φ': 'Φ',\n 'Χ': 'Χ',\n 'Ψ': 'Ψ',\n 'Ω': 'Ω',\n 'À': 'À',\n 'Á': 'Á',\n 'Â': 'Â',\n 'Ã': 'Ã',\n 'Ä': 'Ä',\n 'Å': 'Å',\n 'Æ': 'Æ',\n 'Ç': 'Ç',\n 'È': 'È',\n 'É': 'É',\n 'Ê': 'Ê',\n 'Ë': 'Ë',\n 'Ì': 'Ì',\n 'Í': 'Í',\n 'Î': 'Î',\n 'Ï': 'Ï',\n 'Ð': 'Ð',\n 'Ñ': 'Ñ',\n 'Ò': 'Ò',\n 'Ó': 'Ó',\n 'Ô': 'Ô',\n 'Õ': 'Õ',\n 'Ö': 'Ö',\n 'Ø': 'Ø',\n 'Ù': 'Ù',\n 'Ú': 'Ú',\n 'Û': 'Û',\n 'Ü': 'Ü',\n 'Ý': 'Ý',\n 'Þ': 'Þ',\n 'ß': 'ß',\n 'à': 'à',\n 'á': 'á',\n 'â': 'â',\n 'ã': 'ã',\n 'ä': 'ä',\n 'å': 'å',\n 'æ': 'æ',\n 'ç': 'ç',\n 'è': 'è',\n 'é': 'é',\n 'ê': 'ê',\n 'ë': 'ë',\n 'ì': 'ì',\n 'í': 'í',\n 'î': 'î',\n 'ï': 'ï',\n 'ð': 'ð',\n 'ñ': 'ñ',\n 'ò': 'ò',\n 'ó': 'ó',\n 'ô': 'ô',\n 'õ': 'õ',\n 'ö': 'ö',\n 'ø': 'ø',\n 'ù': 'ù',\n 'ú': 'ú',\n 'û': 'û',\n 'ü': 'ü',\n 'ý': 'ý',\n 'þ': 'þ',\n 'ÿ': 'ÿ',\n '¡': '¡',\n '¿': '¿',\n 'ƒ': 'ƒ',\n 'ˆ': 'ˆ',\n '˜': '˜',\n 'Œ': 'Œ',\n 'œ': 'œ',\n 'Š': 'Š',\n 'š': 'š',\n 'Ÿ': 'Ÿ',\n 'ª': 'ª',\n 'º': 'º',\n '¯': '¯',\n '´': '´',\n '¸': '¸',\n '¹': '¹',\n '²': '²',\n '³': '³',\n '¼': '¼',\n '½': '½',\n '¾': '¾',\n '♠': '♠',\n '♣': '♣',\n '♥': '♥',\n '♦': '♦',\n '◊': '◊',\n '‾': '‾',\n '⁄': '⁄',\n '℘': '℘',\n 'ℑ': 'ℑ',\n 'ℜ': 'ℜ',\n 'ℵ': 'ℵ'\n};\nconst entityPattern = new RegExp(Object.keys(commonEntities).map(entity => entity.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')).join('|'), 'g');\nexport const decodeHtmlEntities = text => text.replace(entityPattern, match => commonEntities[match]).replace(/&#(\\d+);/g, (_, num) => String.fromCharCode(parseInt(num, 10))).replace(/&#x([0-9a-fA-F]+);/g, (_, hex) => String.fromCharCode(parseInt(hex, 16)));"],"names":["commonEntities","entityPattern","RegExp","Object","keys","map","entity","replace","join","decodeHtmlEntities","text","match","_","num","String","fromCharCode","parseInt","hex"]Line truncated
|
||||
{"offset": {"line": 3110, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/IcuTransUtils/index.js"],"sourcesContent":["export * from './TranslationParserError.js';\nexport * from './htmlEntityDecoder.js';\nexport * from './tokenizer.js';\nexport * from './renderTranslation.js';"],"names":[],"mappings":";AACA;AAEA","ignoreList":[0]}},
|
||||
{"offset": {"line": 3121, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/IcuTransUtils/renderTranslation.js"],"sourcesContent":["import React from 'react';\nimport { TranslationParserError } from './TranslationParserError.js';\nimport { tokenize } from './tokenizer.js';\nimport { decodeHtmlEntities } from './htmlEntityDecoder.js';\nconst renderDeclarationNode = (declaration, children, childDeclarations) => {\n const {\n type,\n props = {}\n } = declaration;\n if (props.children && Array.isArray(props.children) && childDeclarations) {\n const {\n children: _childrenToRemove,\n ...propsWithoutChildren\n } = props;\n return React.createElement(type, propsWithoutChildren, ...children);\n }\n if (children.length === 0) {\n return React.createElement(type, props);\n }\n if (children.length === 1) {\n return React.createElement(type, props, children[0]);\n }\n return React.createElement(type, props, ...children);\n};\nexport const renderTranslation = (translation, declarations = []) => {\n if (!translation) {\n return [];\n }\n const tokens = tokenize(translation);\n const result = [];\n const stack = [];\n const literalTagNumbers = new Set();\n const getCurrentDeclarations = () => {\n if (stack.length === 0) {\n return declarations;\n }\n const parentFrame = stack[stack.length - 1];\n if (parentFrame.declaration.props?.children && Array.isArray(parentFrame.declaration.props.children)) {\n return parentFrame.declaration.props.children;\n }\n return parentFrame.declarations;\n };\n tokens.forEach(token => {\n switch (token.type) {\n case 'Text':\n {\n const decoded = decodeHtmlEntities(token.value);\n const targetArray = stack.length > 0 ? stack[stack.length - 1].children : result;\n targetArray.push(decoded);\n }\n break;\n case 'TagOpen':\n {\n const {\n tagNumber\n } = token;\n const currentDeclarations = getCurrentDeclarations();\n const declaration = currentDeclarations[tagNumber];\n if (!declaration) {\n literalTagNumbers.add(tagNumber);\n const literalText = `<${tagNumber}>`;\n const targetArray = stack.length > 0 ? stack[stack.length - 1].children : result;\n targetArray.push(literalText);\n break;\n }\n stack.push({\n tagNumber,\n children: [],\n position: token.position,\n declaration,\n declarations: currentDeclarations\n });\n }\n break;\n case 'TagClose':\n {\n const {\n tagNumber\n } = token;\n if (literalTagNumbers.has(tagNumber)) {\n const literalText = `</${tagNumber}>`;\n const literalTargetArray = stack.length > 0 ? stack[stack.length - 1].children : result;\n literalTargetArray.push(literalText);\n literalTagNumbers.delete(tagNumber);\n break;\n }\n if (stack.length === 0) {\n throw new TranslationParserError(`Unexpected closing tag </${tagNumber}> at position ${token.position}`, token.position, translation);\n }\n const frame = stack.pop();\n if (frame.tagNumber !== tagNumber) {\n throw new TranslationParserError(`Mismatched tags: expected </${frame.tagNumber}> but got </${tagNumber}> at position ${token.position}`, token.position, translation);\n }\n const element = renderDeclarationNode(frame.declaration, frame.children, frame.declarations);\n const elementTargetArray = stack.length > 0 ? stack[stack.length - 1].children : result;\n elementTargetArray.push(element);\n }\n break;\n }\n });\n if (stack.length > 0) {\n const unclosed = stack[stack.length - 1];\n throw new TranslationParserError(`Unclosed tag <${unclosed.tagNumber}> at position ${unclosed.position}`, unclosed.position, translation);\n }\n return result;\n};"],"names":["renderDeclarationNode","declaration","children","childDeclarations","type","props","Array","isArray","_childrenToRemove","propsWithoutChildren","createElement","length","renderTranslation","translation","declarations","tokens","result","stack","literalTagNumbers","Set","getCurrentDeclarations","parentFrame","forEach","token","decoded","value","targetArray","push","tagNumber","currentDeclarations","add","literalText","position","has","literalTargetArray","delete","frame","pop","element","elementTargetArray","unclosed"],"mappings":";;;;AAAA;AACA;AACA;AACA;;;;;AACA,MAAMA,wBAAwB,CAACC,aAAaC,UAAUC;IACpD,MAAM,EACJC,IAAI,EACJC,QAAQ,CAAC,CAAC,EACX,GAAGJ;IACJ,IAAII,MAAMH,QAAQ,IAAII,MAAMC,OAAO,CAACF,MAAMH,QAAQ,KAAKC,mBAAmB;QACxE,MAAM,EACJD,UAAUM,iBAAiB,EAC3B,GAAGC,sBACJ,GAAGJ;QACJ,OAAO,gNAAK,CAACK,aAAa,CAACN,MAAMK,yBAAyBLine truncated
|
||||
{"offset": {"line": 3229, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/IcuTransUtils/tokenizer.js"],"sourcesContent":["export const tokenize = translation => {\n const tokens = [];\n let position = 0;\n let currentText = '';\n const flushText = () => {\n if (currentText) {\n tokens.push({\n type: 'Text',\n value: currentText,\n position: position - currentText.length\n });\n currentText = '';\n }\n };\n while (position < translation.length) {\n const char = translation[position];\n if (char === '<') {\n const tagMatch = translation.slice(position).match(/^<(\\d+)>/);\n if (tagMatch) {\n flushText();\n tokens.push({\n type: 'TagOpen',\n value: tagMatch[0],\n position,\n tagNumber: parseInt(tagMatch[1], 10)\n });\n position += tagMatch[0].length;\n } else {\n const closeTagMatch = translation.slice(position).match(/^<\\/(\\d+)>/);\n if (closeTagMatch) {\n flushText();\n tokens.push({\n type: 'TagClose',\n value: closeTagMatch[0],\n position,\n tagNumber: parseInt(closeTagMatch[1], 10)\n });\n position += closeTagMatch[0].length;\n } else {\n currentText += char;\n position += 1;\n }\n }\n } else {\n currentText += char;\n position += 1;\n }\n }\n flushText();\n return tokens;\n};"],"names":["tokenize","translation","tokens","position","currentText","flushText","push","type","value","length","char","tagMatch","slice","match","tagNumber","parseInt","closeTagMatch"],"mappings":";;;;AAAO,MAAMA,WAAWC,CAAAA;IACtB,MAAMC,SAAS,EAAE;IACjB,IAAIC,WAAW;IACf,IAAIC,cAAc;IAClB,MAAMC,YAAY;QAChB,IAAID,aAAa;YACfF,OAAOI,IAAI,CAAC;gBACVC,MAAM;gBACNC,OAAOJ;gBACPD,UAAUA,WAAWC,YAAYK,MAAM;YACzC;YACAL,cAAc;QAChB;IACF;IACA,MAAOD,WAAWF,YAAYQ,MAAM,CAAE;QACpC,MAAMC,OAAOT,WAAW,CAACE,SAAS;QAClC,IAAIO,SAAS,KAAK;YAChB,MAAMC,WAAWV,YAAYW,KAAK,CAACT,UAAUU,KAAK,CAAC;YACnD,IAAIF,UAAU;gBACZN;gBACAH,OAAOI,IAAI,CAAC;oBACVC,MAAM;oBACNC,OAAOG,QAAQ,CAAC,EAAE;oBAClBR;oBACAW,WAAWC,SAASJ,QAAQ,CAAC,EAAE,EAAE;gBACnC;gBACAR,YAAYQ,QAAQ,CAAC,EAAE,CAACF,MAAM;YAChC,OAAO;gBACL,MAAMO,gBAAgBf,YAAYW,KAAK,CAACT,UAAUU,KAAK,CAAC;gBACxD,IAAIG,eAAe;oBACjBX;oBACAH,OAAOI,IAAI,CAAC;wBACVC,MAAM;wBACNC,OAAOQ,aAAa,CAAC,EAAE;wBACvBb;wBACAW,WAAWC,SAASC,aAAa,CAAC,EAAE,EAAE;oBACxC;oBACAb,YAAYa,aAAa,CAAC,EAAE,CAACP,MAAM;gBACrC,OAAO;oBACLL,eAAeM;oBACfP,YAAY;gBACd;YACF;QACF,OAAO;YACLC,eAAeM;YACfP,YAAY;QACd;IACF;IACAE;IACA,OAAOH;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 3288, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/IcuTransWithoutContext.js"],"sourcesContent":["import React from 'react';\nimport { warn, warnOnce, isString } from './utils.js';\nimport { getI18n } from './i18nInstance.js';\nimport { renderTranslation } from './IcuTransUtils/index.js';\nexport function IcuTransWithoutContext({\n i18nKey,\n defaultTranslation,\n content,\n ns,\n values = {},\n i18n: i18nFromProps,\n t: tFromProps\n}) {\n const i18n = i18nFromProps || getI18n();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `IcuTrans: You need to pass in an i18next instance using i18nextReactModule`, {\n i18nKey\n });\n return React.createElement(React.Fragment, {}, defaultTranslation);\n }\n const t = tFromProps || i18n.t?.bind(i18n) || (k => k);\n let namespaces = ns || t.ns || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n let mergedValues = values;\n if (i18n.options?.interpolation?.defaultVariables) {\n mergedValues = values && Object.keys(values).length > 0 ? {\n ...values,\n ...i18n.options.interpolation.defaultVariables\n } : {\n ...i18n.options.interpolation.defaultVariables\n };\n }\n const translation = t(i18nKey, {\n defaultValue: defaultTranslation,\n ...mergedValues,\n ns: namespaces\n });\n try {\n const rendered = renderTranslation(translation, content);\n return React.createElement(React.Fragment, {}, ...rendered);\n } catch (error) {\n warn(i18n, 'ICU_TRANS_RENDER_ERROR', `IcuTrans component error for key \"${i18nKey}\": ${error.message}`, {\n i18nKey,\n error\n });\n return React.createElement(React.Fragment, {}, translation);\n }\n}\nIcuTransWithoutContext.displayName = 'IcuTransWithoutContext';"],"names":["IcuTransWithoutContext","i18nKey","defaultTranslation","content","ns","values","i18n","i18nFromProps","t","tFromProps","createElement","Fragment","bind","k","namespaces","options","defaultNS","mergedValues","interpolation","defaultVariables","Object","keys","length","translation","defaultValue","rendered","error","message","displayName"],"mappings":";;;;AAAA;AACA;AACA;AACA;AAAA;;;;;AACO,SAASA,uBAAuB,EACrCC,OAAO,EACPC,kBAAkB,EAClBC,OAAO,EACPC,EAAE,EACFC,SAAS,CAAC,CAAC,EACXC,MAAMC,aAAa,EACnBC,GAAGC,UAAU,EACd;IACC,MAAMH,OAAOC,iBAAiB,IAAA,yKAAO;IACrC,IAAI,CAACD,MAAM;QACT,IAAA,mKAAQ,EAACA,MAAM,uBAAuB,CAAC,0EAA0E,CAAC,EAAE;YAClHL;QACF;QACA,OAAO,gNAAK,CAACS,aAAa,CAAC,gNAAK,CAACC,QAAQ,EAAE,CAAC,GAAGT;IACjD;IACA,MAAMM,IAAIC,cAAcH,KAAKE,CAAC,EAAEI,KAAKN,SAAS,CAACO,CAAAA,IAAKA,CAAC;IACrD,IAAIC,aAAaV,MAAMI,EAAEJ,EAAE,IAAIE,KAAKS,OAAO,EAAEC;IAC7CF,aAAa,IAAA,mKAAQ,EAACA,cAAc;QAACA;KAAW,GAAGA,cAAc;QAAC;KAAc;IAChF,IAAIG,eAAeZ;IACnB,IAAIC,KAAKS,OAAO,EAAEG,eAAeC,kBAAkB;QACjDF,eAAeZ,UAAUe,OAAOC,IAAI,CAAChB,QAAQiB,MAAM,GAAG,IAAI;YACxD,GAAGjB,MAAM;YACT,GAAGC,KAAKS,OAAO,CAACG,aAAa,CAACC,gBAAgB;QAChD,IAAI;YACF,GAAGb,KAAKS,OAAO,CAACG,aAAa,CAACC,gBAAgB;QAChD;IACF;IACA,MAAMI,cAAcf,EAAEP,SAAS;QAC7BuB,cAActB;QACd,GAAGe,YAAY;QACfb,IAAIU;IACN;IACA,IAAI;QACF,MAAMW,WAAW,IAAA,yMAAiB,EAACF,aAAapB;QAChD,OAAO,gNAAK,CAACO,aAAa,CAAC,gNAAK,CAACC,QAAQ,EAAE,CAAC,MAAMc;IACpD,EAAE,OAAOC,OAAO;QACd,IAAA,+JAAI,EAACpB,MAAM,0BAA0B,CAAC,kCAAkC,EAAEL,QAAQ,GAAG,EAAEyB,MAAMC,OAAO,EAAE,EAAE;YACtG1B;YACAyB;QACF;QACA,OAAO,gNAAK,CAAChB,aAAa,CAAC,gNAAK,CAACC,QAAQ,EAAE,CAAC,GAAGY;IACjD;AACF;AACAvB,uBAAuB4B,WAAW,GAAG","ignoreList":[0]}},
|
||||
{"offset": {"line": 3346, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/Trans.js"],"sourcesContent":["import { useContext } from 'react';\nimport { nodesToString, Trans as TransWithoutContext } from './TransWithoutContext.js';\nimport { getI18n, I18nContext } from './context.js';\nexport { nodesToString };\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n const t = tFromProps || i18n?.t.bind(i18n);\n return TransWithoutContext({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions,\n values,\n defaults,\n components,\n ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,\n i18n,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n });\n}"],"names":["Trans","children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","i18nFromProps","t","tFromProps","shouldUnescape","additionalProps","i18nFromContext","defaultNS","defaultNSFromContext","bind","options"],"mappings":";;;;AAAA;AACA;AACA;AAAA;;;;;AAEO,SAASA,MAAM,EACpBC,QAAQ,EACRC,KAAK,EACLC,MAAM,EACNC,OAAO,EACPC,OAAO,EACPC,WAAW,CAAC,CAAC,EACbC,MAAM,EACNC,QAAQ,EACRC,UAAU,EACVC,EAAE,EACFC,MAAMC,aAAa,EACnBC,GAAGC,UAAU,EACbC,cAAc,EACd,GAAGC,iBACJ;IACC,MAAM,EACJL,MAAMM,eAAe,EACrBC,WAAWC,oBAAoB,EAChC,GAAG,IAAA,mNAAU,EAAC,wLAAW,KAAK,CAAC;IAChC,MAAMR,OAAOC,iBAAiBK,mBAAmB,IAAA,yKAAO;IACxD,MAAMJ,IAAIC,cAAcH,MAAME,EAAEO,KAAKT;IACrC,OAAO,IAAA,8KAAmB,EAAC;QACzBV;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC,IAAIA,MAAMG,GAAGH,MAAMS,wBAAwBR,MAAMU,SAASH;QAC1DP;QACAE,GAAGC;QACHC;QACA,GAAGC,eAAe;IACpB;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 3383, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/TransWithoutContext.js"],"sourcesContent":["import { Fragment, isValidElement, cloneElement, createElement, Children } from 'react';\nimport { keyFromSelector } from 'i18next';\nimport HTML from 'html-parse-stringify';\nimport { isObject, isString, warn, warnOnce } from './utils.js';\nimport { getDefaults } from './defaults.js';\nimport { getI18n } from './i18nInstance.js';\nimport { unescape } from './unescape.js';\nconst hasChildren = (node, checkLength) => {\n if (!node) return false;\n const base = node.props?.children ?? node.children;\n if (checkLength) return base.length > 0;\n return !!base;\n};\nconst getChildren = node => {\n if (!node) return [];\n const children = node.props?.children ?? node.children;\n return node.props?.i18nIsDynamicList ? getAsArray(children) : children;\n};\nconst hasValidReactChildren = children => Array.isArray(children) && children.every(isValidElement);\nconst getAsArray = data => Array.isArray(data) ? data : [data];\nconst mergeProps = (source, target) => {\n const newTarget = {\n ...target\n };\n newTarget.props = {\n ...target.props,\n ...source.props\n };\n return newTarget;\n};\nconst getValuesFromChildren = children => {\n const values = {};\n if (!children) return values;\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(values, child);\n });\n };\n getData(children);\n return values;\n};\nexport const nodesToString = (children, i18nOptions, i18n, i18nKey) => {\n if (!children) return '';\n let stringNode = '';\n const childrenArray = getAsArray(children);\n const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];\n childrenArray.forEach((child, childIndex) => {\n if (isString(child)) {\n stringNode += `${child}`;\n return;\n }\n if (isValidElement(child)) {\n const {\n props,\n type\n } = child;\n const childPropsCount = Object.keys(props).length;\n const shouldKeepChild = keepArray.indexOf(type) > -1;\n const childChildren = props.children;\n if (!childChildren && shouldKeepChild && !childPropsCount) {\n stringNode += `<${type}/>`;\n return;\n }\n if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {\n stringNode += `<${childIndex}></${childIndex}>`;\n return;\n }\n if (shouldKeepChild && childPropsCount <= 1) {\n const cnt = isString(childChildren) ? childChildren : nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${type}>${cnt}</${type}>`;\n return;\n }\n const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${childIndex}>${content}</${childIndex}>`;\n return;\n }\n if (child === null) {\n warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {\n i18nKey\n });\n return;\n }\n if (isObject(child)) {\n const {\n format,\n ...clone\n } = child;\n const keys = Object.keys(clone);\n if (keys.length === 1) {\n const value = format ? `${keys[0]}, ${format}` : keys[0];\n stringNode += `{{${value}}}`;\n return;\n }\n warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {\n i18nKey,\n child\n });\n return;\n }\n warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {\n i18nKey,\n child\n });\n });\n return stringNode;\n};\nconst renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {\n if (targetString === '') return [];\n const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];\n const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);\n if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];\n const data = knownComponentsMap ?? {};\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);\n });\n };\n getData(children);\n const knownNames = Object.keys(data);\n const allowedTags = name => /^\\d+$/.test(name) || keepArray.indexOLine truncated
|
||||
{"offset": {"line": 3797, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/Translation.js"],"sourcesContent":["import { useTranslation } from './useTranslation.js';\nexport const Translation = ({\n ns,\n children,\n ...options\n}) => {\n const [t, i18n, ready] = useTranslation(ns, options);\n return children(t, {\n i18n,\n lng: i18n?.language\n }, ready);\n};"],"names":["Translation","ns","children","options","t","i18n","ready","lng","language"],"mappings":";;;;AAAA;;AACO,MAAMA,cAAc,CAAC,EAC1BC,EAAE,EACFC,QAAQ,EACR,GAAGC,SACJ;IACC,MAAM,CAACC,GAAGC,MAAMC,MAAM,GAAG,IAAA,kLAAc,EAACL,IAAIE;IAC5C,OAAOD,SAASE,GAAG;QACjBC;QACAE,KAAKF,MAAMG;IACb,GAAGF;AACL","ignoreList":[0]}},
|
||||
{"offset": {"line": 3814, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/context.js"],"sourcesContent":["import { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport const I18nContext = createContext();\nexport class ReportNamespaces {\n constructor() {\n this.usedNamespaces = {};\n }\n addUsedNamespaces(namespaces) {\n namespaces.forEach(ns => {\n if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;\n });\n }\n getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n}\nexport const composeInitialProps = ForComponent => async ctx => {\n const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};\n const i18nInitialProps = getInitialProps();\n return {\n ...componentsInitialProps,\n ...i18nInitialProps\n };\n};\nexport const getInitialProps = () => {\n const i18n = getI18n();\n if (!i18n) {\n console.warn('react-i18next:: getInitialProps: You will need to pass in an i18next instance by using initReactI18next');\n return {};\n }\n const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];\n const ret = {};\n const initialI18nStore = {};\n i18n.languages.forEach(l => {\n initialI18nStore[l] = {};\n namespaces.forEach(ns => {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n};"],"names":["I18nContext","ReportNamespaces","usedNamespaces","addUsedNamespaces","namespaces","forEach","ns","getUsedNamespaces","Object","keys","composeInitialProps","ForComponent","ctx","componentsInitialProps","getInitialProps","i18nInitialProps","i18n","console","warn","reportNamespaces","ret","initialI18nStore","languages","l","getResourceBundle","initialLanguage","language"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;;;;;;AAEO,MAAMA,cAAc,IAAA,sNAAa;AACjC,MAAMC;IACXA,aAAc;QACZ,IAAI,CAACC,cAAc,GAAG,CAAC;IACzB;IACAC,kBAAkBC,UAAU,EAAE;QAC5BA,WAAWC,OAAO,CAACC,CAAAA;YACjB,IAAI,CAAC,IAAI,CAACJ,cAAc,CAACI,GAAG,EAAE,IAAI,CAACJ,cAAc,CAACI,GAAG,GAAG;QAC1D;IACF;IACAC,oBAAoB;QAClB,OAAOC,OAAOC,IAAI,CAAC,IAAI,CAACP,cAAc;IACxC;AACF;AACO,MAAMQ,sBAAsBC,CAAAA,eAAgB,OAAMC;QACvD,MAAMC,yBAAyB,AAAC,MAAMF,aAAaG,eAAe,GAAGF,QAAS,CAAC;QAC/E,MAAMG,mBAAmBD;QACzB,OAAO;YACL,GAAGD,sBAAsB;YACzB,GAAGE,gBAAgB;QACrB;IACF;AACO,MAAMD,kBAAkB;IAC7B,MAAME,OAAO,IAAA,yKAAO;IACpB,IAAI,CAACA,MAAM;QACTC,QAAQC,IAAI,CAAC;QACb,OAAO,CAAC;IACV;IACA,MAAMd,aAAaY,KAAKG,gBAAgB,EAAEZ,uBAAuB,EAAE;IACnE,MAAMa,MAAM,CAAC;IACb,MAAMC,mBAAmB,CAAC;IAC1BL,KAAKM,SAAS,CAACjB,OAAO,CAACkB,CAAAA;QACrBF,gBAAgB,CAACE,EAAE,GAAG,CAAC;QACvBnB,WAAWC,OAAO,CAACC,CAAAA;YACjBe,gBAAgB,CAACE,EAAE,CAACjB,GAAG,GAAGU,KAAKQ,iBAAiB,CAACD,GAAGjB,OAAO,CAAC;QAC9D;IACF;IACAc,IAAIC,gBAAgB,GAAGA;IACvBD,IAAIK,eAAe,GAAGT,KAAKU,QAAQ;IACnC,OAAON;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 3878, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/defaults.js"],"sourcesContent":["import { unescape } from './unescape.js';\nlet defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape,\n transDefaultProps: undefined\n};\nexport const setDefaults = (options = {}) => {\n defaultOptions = {\n ...defaultOptions,\n ...options\n };\n};\nexport const getDefaults = () => defaultOptions;"],"names":["defaultOptions","bindI18n","bindI18nStore","transEmptyNodeValue","transSupportBasicHtmlNodes","transWrapTextNodes","transKeepBasicHtmlNodesFor","useSuspense","unescape","transDefaultProps","undefined","setDefaults","options","getDefaults"],"mappings":";;;;;;AAAA;;AACA,IAAIA,iBAAiB;IACnBC,UAAU;IACVC,eAAe;IACfC,qBAAqB;IACrBC,4BAA4B;IAC5BC,oBAAoB;IACpBC,4BAA4B;QAAC;QAAM;QAAU;QAAK;KAAI;IACtDC,aAAa;IACbC,UAAAA,sKAAQ;IACRC,mBAAmBC;AACrB;AACO,MAAMC,cAAc,CAACC,UAAU,CAAC,CAAC;IACtCZ,iBAAiB;QACf,GAAGA,cAAc;QACjB,GAAGY,OAAO;IACZ;AACF;AACO,MAAMC,cAAc,IAAMb","ignoreList":[0]}},
|
||||
{"offset": {"line": 3913, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/i18nInstance.js"],"sourcesContent":["let i18nInstance;\nexport const setI18n = instance => {\n i18nInstance = instance;\n};\nexport const getI18n = () => i18nInstance;"],"names":["i18nInstance","setI18n","instance","getI18n"],"mappings":";;;;;;AAAA,IAAIA;AACG,MAAMC,UAAUC,CAAAA;IACrBF,eAAeE;AACjB;AACO,MAAMC,UAAU,IAAMH","ignoreList":[0]}},
|
||||
{"offset": {"line": 3928, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/index.js"],"sourcesContent":["export { Trans } from './Trans.js';\nexport { Trans as TransWithoutContext } from './TransWithoutContext.js';\nexport { IcuTrans } from './IcuTrans.js';\nexport { IcuTransWithoutContext } from './IcuTransWithoutContext.js';\nexport { useTranslation } from './useTranslation.js';\nexport { withTranslation } from './withTranslation.js';\nexport { Translation } from './Translation.js';\nexport { I18nextProvider } from './I18nextProvider.js';\nexport { withSSR } from './withSSR.js';\nexport { useSSR } from './useSSR.js';\nexport { initReactI18next } from './initReactI18next.js';\nexport { setDefaults, getDefaults } from './defaults.js';\nexport { setI18n, getI18n } from './i18nInstance.js';\nexport { nodesToString } from './Trans.js';\nexport { I18nContext, composeInitialProps, getInitialProps } from './context.js';\nexport const date = () => '';\nexport const time = () => '';\nexport const number = () => '';\nexport const select = () => '';\nexport const plural = () => '';\nexport const selectOrdinal = () => '';"],"names":["date","time","number","select","plural","selectOrdinal"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;;;;;;;;;AACO,MAAMA,OAAO,IAAM;AACnB,MAAMC,OAAO,IAAM;AACnB,MAAMC,SAAS,IAAM;AACrB,MAAMC,SAAS,IAAM;AACrB,MAAMC,SAAS,IAAM;AACrB,MAAMC,gBAAgB,IAAM","ignoreList":[0]}},
|
||||
{"offset": {"line": 3980, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/initReactI18next.js"],"sourcesContent":["import { setDefaults } from './defaults.js';\nimport { setI18n } from './i18nInstance.js';\nexport const initReactI18next = {\n type: '3rdParty',\n init(instance) {\n setDefaults(instance.options.react);\n setI18n(instance);\n }\n};"],"names":["initReactI18next","type","init","instance","options","react"],"mappings":";;;;AAAA;AACA;;;AACO,MAAMA,mBAAmB;IAC9BC,MAAM;IACNC,MAAKC,QAAQ;QACX,IAAA,yKAAW,EAACA,SAASC,OAAO,CAACC,KAAK;QAClC,IAAA,yKAAO,EAACF;IACV;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 3999, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/unescape.js"],"sourcesContent":["const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nconst htmlEntities = {\n '&': '&',\n '&': '&',\n '<': '<',\n '<': '<',\n '>': '>',\n '>': '>',\n ''': \"'\",\n ''': \"'\",\n '"': '\"',\n '"': '\"',\n ' ': ' ',\n ' ': ' ',\n '©': '©',\n '©': '©',\n '®': '®',\n '®': '®',\n '…': '…',\n '…': '…',\n '/': '/',\n '/': '/'\n};\nconst unescapeHtmlEntity = m => htmlEntities[m];\nexport const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);"],"names":["matchHtmlEntity","htmlEntities","unescapeHtmlEntity","m","unescape","text","replace"],"mappings":";;;;AAAA,MAAMA,kBAAkB;AACxB,MAAMC,eAAe;IACnB,SAAS;IACT,SAAS;IACT,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,SAAS;IACT,UAAU;IACV,SAAS;IACT,UAAU;IACV,SAAS;IACT,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,SAAS;IACT,UAAU;IACV,YAAY;IACZ,WAAW;IACX,UAAU;IACV,SAAS;AACX;AACA,MAAMC,qBAAqBC,CAAAA,IAAKF,YAAY,CAACE,EAAE;AACxC,MAAMC,WAAWC,CAAAA,OAAQA,KAAKC,OAAO,CAACN,iBAAiBE","ignoreList":[0]}},
|
||||
{"offset": {"line": 4032, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/useSSR.js"],"sourcesContent":["import { useContext } from 'react';\nimport { getI18n, I18nContext } from './context.js';\nimport { warnOnce } from './utils.js';\nexport const useSSR = (initialI18nStore, initialLanguage, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useSSR: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.');\n return;\n }\n if (i18n.options?.isClone) return;\n if (initialI18nStore && !i18n.initializedStoreOnce) {\n if (!i18n.services?.resourceStore) {\n warnOnce(i18n, 'I18N_NOT_INITIALIZED', 'useSSR: i18n instance was found but not initialized (services.resourceStore is missing). Make sure you call i18next.init() before using useSSR — e.g. at module level, not only in getStaticProps/getServerSideProps.');\n return;\n }\n i18n.services.resourceStore.data = initialI18nStore;\n i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {\n Object.keys(lngResources).forEach(ns => {\n if (mem.indexOf(ns) < 0) mem.push(ns);\n });\n return mem;\n }, i18n.options.ns);\n i18n.initializedStoreOnce = true;\n i18n.isInitialized = true;\n }\n if (initialLanguage && !i18n.initializedLanguageOnce) {\n i18n.changeLanguage(initialLanguage);\n i18n.initializedLanguageOnce = true;\n }\n};"],"names":["useSSR","initialI18nStore","initialLanguage","props","i18n","i18nFromProps","i18nFromContext","options","isClone","initializedStoreOnce","services","resourceStore","data","ns","Object","values","reduce","mem","lngResources","keys","forEach","indexOf","push","isInitialized","initializedLanguageOnce","changeLanguage"],"mappings":";;;;AAAA;AACA;AAAA;AACA;;;;AACO,MAAMA,SAAS,CAACC,kBAAkBC,iBAAiBC,QAAQ,CAAC,CAAC;IAClE,MAAM,EACJC,MAAMC,aAAa,EACpB,GAAGF;IACJ,MAAM,EACJC,MAAME,eAAe,EACtB,GAAG,IAAA,mNAAU,EAAC,wLAAW,KAAK,CAAC;IAChC,MAAMF,OAAOC,iBAAiBC,mBAAmB,IAAA,yKAAO;IACxD,IAAI,CAACF,MAAM;QACT,IAAA,mKAAQ,EAACA,MAAM,uBAAuB;QACtC;IACF;IACA,IAAIA,KAAKG,OAAO,EAAEC,SAAS;IAC3B,IAAIP,oBAAoB,CAACG,KAAKK,oBAAoB,EAAE;QAClD,IAAI,CAACL,KAAKM,QAAQ,EAAEC,eAAe;YACjC,IAAA,mKAAQ,EAACP,MAAM,wBAAwB;YACvC;QACF;QACAA,KAAKM,QAAQ,CAACC,aAAa,CAACC,IAAI,GAAGX;QACnCG,KAAKG,OAAO,CAACM,EAAE,GAAGC,OAAOC,MAAM,CAACd,kBAAkBe,MAAM,CAAC,CAACC,KAAKC;YAC7DJ,OAAOK,IAAI,CAACD,cAAcE,OAAO,CAACP,CAAAA;gBAChC,IAAII,IAAII,OAAO,CAACR,MAAM,GAAGI,IAAIK,IAAI,CAACT;YACpC;YACA,OAAOI;QACT,GAAGb,KAAKG,OAAO,CAACM,EAAE;QAClBT,KAAKK,oBAAoB,GAAG;QAC5BL,KAAKmB,aAAa,GAAG;IACvB;IACA,IAAIrB,mBAAmB,CAACE,KAAKoB,uBAAuB,EAAE;QACpDpB,KAAKqB,cAAc,CAACvB;QACpBE,KAAKoB,uBAAuB,GAAG;IACjC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 4076, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/useTranslation.js"],"sourcesContent":["import { useContext, useCallback, useMemo, useEffect, useRef, useState } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n if (typeof k === 'function') return '';\n if (Array.isArray(k)) {\n const last = k[k.length - 1];\n return typeof last === 'function' ? '' : last;\n }\n return k;\n};\nconst notReadySnapshot = {\n t: notReadyT,\n ready: false\n};\nconst dummySubscribe = () => () => {};\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.');\n }\n const i18nOptions = useMemo(() => ({\n ...getDefaults(),\n ...i18n?.options?.react,\n ...props\n }), [i18n, props]);\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n const nsOrContext = ns || defaultNSFromContext || i18n?.options?.defaultNS;\n const unstableNamespaces = isString(nsOrContext) ? [nsOrContext] : nsOrContext || ['translation'];\n const namespaces = useMemo(() => unstableNamespaces, unstableNamespaces);\n i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);\n const revisionRef = useRef(0);\n const subscribe = useCallback(callback => {\n if (!i18n) return dummySubscribe;\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n const wrappedCallback = () => {\n revisionRef.current += 1;\n callback();\n };\n if (bindI18n) i18n.on(bindI18n, wrappedCallback);\n if (bindI18nStore) i18n.store.on(bindI18nStore, wrappedCallback);\n return () => {\n if (bindI18n) bindI18n.split(' ').forEach(e => i18n.off(e, wrappedCallback));\n if (bindI18nStore) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, wrappedCallback));\n };\n }, [i18n, i18nOptions]);\n const snapshotRef = useRef();\n const getSnapshot = useCallback(() => {\n if (!i18n) {\n return notReadySnapshot;\n }\n const calculatedReady = !!(i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const currentLng = props.lng || i18n.language;\n const currentRevision = revisionRef.current;\n const lastSnapshot = snapshotRef.current;\n if (lastSnapshot && lastSnapshot.ready === calculatedReady && lastSnapshot.lng === currentLng && lastSnapshot.keyPrefix === keyPrefix && lastSnapshot.revision === currentRevision) {\n return lastSnapshot;\n }\n const calculatedT = i18n.getFixedT(currentLng, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix, {\n scopeNs: namespaces\n });\n const newSnapshot = {\n t: calculatedT,\n ready: calculatedReady,\n lng: currentLng,\n keyPrefix,\n revision: currentRevision\n };\n snapshotRef.current = newSnapshot;\n return newSnapshot;\n }, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);\n const [loadCount, setLoadCount] = useState(0);\n const {\n t,\n ready\n } = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n useEffect(() => {\n if (i18n && !ready && !useSuspense) {\n const onLoaded = () => setLoadCount(c => c + 1);\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n }\n }, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);\n const finalI18n = i18n || {};\n const wrapperRef = useRef(null);\n const wrapperLangRef = useRef();\n const createI18nWrapper = original => {\n const descriptors = Object.getOwnPropertyDescriptors(original);\n if (descriptors.__original) delete descriptors.__original;\n const wrapper = Object.create(Object.getPrototypeOf(original), descriptors);\n if (!Object.prototype.hasOwnProperty.call(wrapper, '__original')) {\n try {\n Object.defineProperty(wrapper, '__original', {\n vaLine truncated
|
||||
{"offset": {"line": 4280, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/utils.js"],"sourcesContent":["export const warn = (i18n, code, msg, rest) => {\n const args = [msg, {\n code,\n ...(rest || {})\n }];\n if (i18n?.services?.logger?.forward) {\n return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);\n }\n if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;\n if (i18n?.services?.logger?.warn) {\n i18n.services.logger.warn(...args);\n } else if (console?.warn) {\n console.warn(...args);\n }\n};\nconst alreadyWarned = {};\nexport const warnOnce = (i18n, code, msg, rest) => {\n if (isString(msg) && alreadyWarned[msg]) return;\n if (isString(msg)) alreadyWarned[msg] = new Date();\n warn(i18n, code, msg, rest);\n};\nconst loadedClb = (i18n, cb) => () => {\n if (i18n.isInitialized) {\n cb();\n } else {\n const initialized = () => {\n setTimeout(() => {\n i18n.off('initialized', initialized);\n }, 0);\n cb();\n };\n i18n.on('initialized', initialized);\n }\n};\nexport const loadNamespaces = (i18n, ns, cb) => {\n i18n.loadNamespaces(ns, loadedClb(i18n, cb));\n};\nexport const loadLanguages = (i18n, lng, ns, cb) => {\n if (isString(ns)) ns = [ns];\n if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);\n ns.forEach(n => {\n if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);\n });\n i18n.loadLanguages(lng, loadedClb(i18n, cb));\n};\nexport const hasLoadedNamespace = (ns, i18n, options = {}) => {\n if (!i18n.languages || !i18n.languages.length) {\n warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {\n languages: i18n.languages\n });\n return true;\n }\n return i18n.hasLoadedNamespace(ns, {\n lng: options.lng,\n precheck: (i18nInstance, loadNotPending) => {\n if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;\n }\n });\n};\nexport const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');\nexport const isString = obj => typeof obj === 'string';\nexport const isObject = obj => typeof obj === 'object' && obj !== null;"],"names":["warn","i18n","code","msg","rest","args","services","logger","forward","isString","console","alreadyWarned","warnOnce","Date","loadedClb","cb","isInitialized","initialized","setTimeout","off","on","loadNamespaces","ns","loadLanguages","lng","options","preload","indexOf","forEach","n","push","hasLoadedNamespace","languages","length","precheck","i18nInstance","loadNotPending","bindI18n","backendConnector","backend","isLanguageChangingTo","getDisplayName","Component","displayName","name","obj","isObject"],"mappings":";;;;;;;;;;;;;;;;;;AAAO,MAAMA,OAAO,CAACC,MAAMC,MAAMC,KAAKC;IACpC,MAAMC,OAAO;QAACF;QAAK;YACjBD;YACA,GAAIE,QAAQ,CAAC,CAAC;QAChB;KAAE;IACF,IAAIH,MAAMK,UAAUC,QAAQC,SAAS;QACnC,OAAOP,KAAKK,QAAQ,CAACC,MAAM,CAACC,OAAO,CAACH,MAAM,QAAQ,mBAAmB;IACvE;IACA,IAAII,SAASJ,IAAI,CAAC,EAAE,GAAGA,IAAI,CAAC,EAAE,GAAG,CAAC,gBAAgB,EAAEA,IAAI,CAAC,EAAE,EAAE;IAC7D,IAAIJ,MAAMK,UAAUC,QAAQP,MAAM;QAChCC,KAAKK,QAAQ,CAACC,MAAM,CAACP,IAAI,IAAIK;IAC/B,OAAO,IAAIK,SAASV,MAAM;QACxBU,QAAQV,IAAI,IAAIK;IAClB;AACF;AACA,MAAMM,gBAAgB,CAAC;AAChB,MAAMC,WAAW,CAACX,MAAMC,MAAMC,KAAKC;IACxC,IAAIK,SAASN,QAAQQ,aAAa,CAACR,IAAI,EAAE;IACzC,IAAIM,SAASN,MAAMQ,aAAa,CAACR,IAAI,GAAG,IAAIU;IAC5Cb,KAAKC,MAAMC,MAAMC,KAAKC;AACxB;AACA,MAAMU,YAAY,CAACb,MAAMc,KAAO;QAC9B,IAAId,KAAKe,aAAa,EAAE;YACtBD;QACF,OAAO;YACL,MAAME,cAAc;gBAClBC,WAAW;oBACTjB,KAAKkB,GAAG,CAAC,eAAeF;gBAC1B,GAAG;gBACHF;YACF;YACAd,KAAKmB,EAAE,CAAC,eAAeH;QACzB;IACF;AACO,MAAMI,iBAAiB,CAACpB,MAAMqB,IAAIP;IACvCd,KAAKoB,cAAc,CAACC,IAAIR,UAAUb,MAAMc;AAC1C;AACO,MAAMQ,gBAAgB,CAACtB,MAAMuB,KAAKF,IAAIP;IAC3C,IAAIN,SAASa,KAAKA,KAAK;QAACA;KAAG;IAC3B,IAAIrB,KAAKwB,OAAO,CAACC,OAAO,IAAIzB,KAAKwB,OAAO,CAACC,OAAO,CAACC,OAAO,CAACH,OAAO,CAAC,GAAG,OAAOH,eAAepB,MAAMqB,IAAIP;IACpGO,GAAGM,OAAO,CAACC,CAAAA;QACT,IAAI5B,KAAKwB,OAAO,CAACH,EAAE,CAACK,OAAO,CAACE,KAAK,GAAG5B,KAAKwB,OAAO,CAACH,EAAE,CAACQ,IAAI,CAACD;IAC3D;IACA5B,KAAKsB,aAAa,CAACC,KAAKV,UAAUb,MAAMc;AAC1C;AACO,MAAMgB,qBAAqB,CAACT,IAAIrB,MAAMwB,UAAU,CAAC,CAAC;IACvD,IAAI,CAACxB,KAAK+B,SAAS,IAAI,CAAC/B,KAAK+B,SAAS,CAACC,MAAM,EAAE;QAC7CrB,SAASX,MAAM,gBAAgB,0CAA0C;YACvE+B,WAAW/B,KAAK+B,SAAS;QAC3B;QACA,OAAO;IACT;IACA,OAAO/B,KAAK8B,kBAAkB,CAACT,IAAI;QACjCE,KAAKC,QAAQD,GAAG;QAChBU,UAAU,CAACC,cAAcC;YACvB,IAAIX,QAAQY,QAAQ,IAAIZ,QAAQY,QAAQ,CAACV,OAAO,CAAC,sBAAsB,CAAC,KAAKQ,aAAa7B,QAAQ,CAACgC,gBAAgB,CAACC,OAAO,IAAIJ,aAAaK,oBAAoB,IAAI,CAACJ,eAAeD,aAAaK,oBAAoB,EAAElB,KAAK,OAAO;QACrO;IACF;AACF;AACO,MAAMmB,iBAAiBC,CAAAA,YAAaA,UAAUC,WAAW,IAAID,UAAUE,IAAI,IAAI,CAACnC,SAASiC,cAAcA,UAAUT,MAAM,GAAG,IAAIS,YAAY,SLine truncated
|
||||
{"offset": {"line": 4369, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/withSSR.js"],"sourcesContent":["import { createElement } from 'react';\nimport { useSSR } from './useSSR.js';\nimport { composeInitialProps } from './context.js';\nimport { getDisplayName } from './utils.js';\nexport const withSSR = () => function Extend(WrappedComponent) {\n function I18nextWithSSR({\n initialI18nStore,\n initialLanguage,\n ...rest\n }) {\n useSSR(initialI18nStore, initialLanguage);\n return createElement(WrappedComponent, {\n ...rest\n });\n }\n I18nextWithSSR.getInitialProps = composeInitialProps(WrappedComponent);\n I18nextWithSSR.displayName = `withI18nextSSR(${getDisplayName(WrappedComponent)})`;\n I18nextWithSSR.WrappedComponent = WrappedComponent;\n return I18nextWithSSR;\n};"],"names":["withSSR","Extend","WrappedComponent","I18nextWithSSR","initialI18nStore","initialLanguage","rest","getInitialProps","displayName"],"mappings":";;;;AAAA;AACA;AACA;AACA;;;;;AACO,MAAMA,UAAU,IAAM,SAASC,OAAOC,gBAAgB;QAC3D,SAASC,eAAe,EACtBC,gBAAgB,EAChBC,eAAe,EACf,GAAGC,MACJ;YACC,IAAA,kKAAM,EAACF,kBAAkBC;YACzB,OAAO,IAAA,sNAAa,EAACH,kBAAkB;gBACrC,GAAGI,IAAI;YACT;QACF;QACAH,eAAeI,eAAe,GAAG,IAAA,gMAAmB,EAACL;QACrDC,eAAeK,WAAW,GAAG,CAAC,eAAe,EAAE,IAAA,yKAAc,EAACN,kBAAkB,CAAC,CAAC;QAClFC,eAAeD,gBAAgB,GAAGA;QAClC,OAAOC;IACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 4397, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/react-i18next/dist/es/withTranslation.js"],"sourcesContent":["import { createElement, forwardRef as forwardRefReact } from 'react';\nimport { useTranslation } from './useTranslation.js';\nimport { getDisplayName } from './utils.js';\nexport const withTranslation = (ns, options = {}) => function Extend(WrappedComponent) {\n function I18nextWithTranslation({\n forwardedRef,\n ...rest\n }) {\n const [t, i18n, ready] = useTranslation(ns, {\n ...rest,\n keyPrefix: options.keyPrefix\n });\n const passDownProps = {\n ...rest,\n t,\n i18n,\n tReady: ready\n };\n if (options.withRef && forwardedRef) {\n passDownProps.ref = forwardedRef;\n } else if (!options.withRef && forwardedRef) {\n passDownProps.forwardedRef = forwardedRef;\n }\n return createElement(WrappedComponent, passDownProps);\n }\n I18nextWithTranslation.displayName = `withI18nextTranslation(${getDisplayName(WrappedComponent)})`;\n I18nextWithTranslation.WrappedComponent = WrappedComponent;\n const forwardRef = (props, ref) => createElement(I18nextWithTranslation, Object.assign({}, props, {\n forwardedRef: ref\n }));\n return options.withRef ? forwardRefReact(forwardRef) : I18nextWithTranslation;\n};"],"names":["withTranslation","ns","options","Extend","WrappedComponent","I18nextWithTranslation","forwardedRef","rest","t","i18n","ready","keyPrefix","passDownProps","tReady","withRef","ref","displayName","forwardRef","props","Object","assign"],"mappings":";;;;AAAA;AACA;AACA;;;;AACO,MAAMA,kBAAkB,CAACC,IAAIC,UAAU,CAAC,CAAC,GAAK,SAASC,OAAOC,gBAAgB;QACnF,SAASC,uBAAuB,EAC9BC,YAAY,EACZ,GAAGC,MACJ;YACC,MAAM,CAACC,GAAGC,MAAMC,MAAM,GAAG,IAAA,kLAAc,EAACT,IAAI;gBAC1C,GAAGM,IAAI;gBACPI,WAAWT,QAAQS,SAAS;YAC9B;YACA,MAAMC,gBAAgB;gBACpB,GAAGL,IAAI;gBACPC;gBACAC;gBACAI,QAAQH;YACV;YACA,IAAIR,QAAQY,OAAO,IAAIR,cAAc;gBACnCM,cAAcG,GAAG,GAAGT;YACtB,OAAO,IAAI,CAACJ,QAAQY,OAAO,IAAIR,cAAc;gBAC3CM,cAAcN,YAAY,GAAGA;YAC/B;YACA,OAAO,IAAA,sNAAa,EAACF,kBAAkBQ;QACzC;QACAP,uBAAuBW,WAAW,GAAG,CAAC,uBAAuB,EAAE,IAAA,yKAAc,EAACZ,kBAAkB,CAAC,CAAC;QAClGC,uBAAuBD,gBAAgB,GAAGA;QAC1C,MAAMa,aAAa,CAACC,OAAOH,MAAQ,IAAA,sNAAa,EAACV,wBAAwBc,OAAOC,MAAM,CAAC,CAAC,GAAGF,OAAO;gBAChGZ,cAAcS;YAChB;QACA,OAAOb,QAAQY,OAAO,GAAG,IAAA,mNAAe,EAACG,cAAcZ;IACzD","ignoreList":[0]}},
|
||||
{"offset": {"line": 4437, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n"],"names":["is","x","y","useSyncExternalStore$2","subscribe","getSnapshot","didWarnOld18Alpha","React","startTransition","console","error","value","didWarnUncachedGetSnapshot","cachedValue","objectIs","useState","inst","forceUpdate","useLayoutEffect","checkIfSnapshotChanged","useEffect","useDebugValue","latestGetSnapshot","nextValue","useSyncExternalStore$1","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","Object","shim","exports","useSyncExternalStore","registerInternalModuleStop"],"mappings":"AAAA;;;;;;;;CAQC,GAGD,oEACE,AAAC;IACC,SAASA,GAAGC,CAAC,EAAEC,CAAC;QACd,OAAO,AAACD,MAAMC,KAAK,CAAC,MAAMD,KAAK,IAAIA,MAAM,IAAIC,CAAC,KAAOD,MAAMA,KAAKC,MAAMA;IACxE;IACA,SAASC,uBAAuBC,SAAS,EAAEC,WAAW;QACpDC,qBACE,KAAK,MAAMC,MAAMC,eAAe,IAChC,CAAC,AAACF,oBAAoB,CAAC,GACvBG,QAAQC,KAAK,CACX,iMACD;QACH,IAAIC,QAAQN;QACZ,IAAI,CAACO,4BAA4B;YAC/B,IAAIC,cAAcR;YAClBS,SAASH,OAAOE,gBACd,CAACJ,QAAQC,KAAK,CACZ,yEAEDE,6BAA6B,CAAC,CAAE;QACrC;QACAC,cAAcE,SAAS;YACrBC,MAAM;gBAAEL,OAAOA;gBAAON,aAAaA;YAAY;QACjD;QACA,IAAIW,OAAOH,WAAW,CAAC,EAAE,CAACG,IAAI,EAC5BC,cAAcJ,WAAW,CAAC,EAAE;QAC9BK,gBACE;YACEF,KAAKL,KAAK,GAAGA;YACbK,KAAKX,WAAW,GAAGA;YACnBc,uBAAuBH,SAASC,YAAY;gBAAED,MAAMA;YAAK;QAC3D,GACA;YALine truncated
|
||||
{"offset": {"line": 4511, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/use-sync-external-store/shim/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n"],"names":["module","exports"],"mappings":"AAEA;;KAEO;IACLA,OAAOC,OAAO;AAChB","ignoreList":[0]}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/@swc/helpers/cjs/_interop_require_default.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nexports._ = _interop_require_default;\n"],"names":["_interop_require_default","obj","__esModule","default","exports","_"],"mappings":"AAEA,SAASA,yBAAyBC,GAAG;IACjC,OAAOA,OAAOA,IAAIC,UAAU,GAAGD,MAAM;QAAEE,SAASF;IAAI;AACxD;AACAG,QAAQC,CAAC,GAAGL","ignoreList":[0]}},
|
||||
{"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/@opentelemetry/api/index.js"],"sourcesContent":["(()=>{\"use strict\";var e={912:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ContextAPI=void 0;const n=r(108);const a=r(221);const o=r(44);const i=\"context\";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},44:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagAPI=void 0;const n=r(757);const a=r(412);const o=r(711);const i=r(221);const c=\"diag\";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)(\"diag\");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r===\"number\"){r={logLevel:r}}const u=(0,i.getGlobal)(\"diag\");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:\"<failed to generate stacktrace>\";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)(\"diag\",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy(\"verbose\");e.debug=_logProxy(\"debug\");e.info=_logProxy(\"info\");e.warn=_logProxy(\"warn\");e.error=_logProxy(\"error\")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},262:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.MetricsAPI=void 0;const n=r(586);const a=r(221);const o=r(44);const i=\"metrics\";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},25:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.PropagationAPI=void 0;const n=r(221);const a=r(19);const o=r(92);const i=r(398);const c=r(504);const s=r(44);const u=\"propagation\";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},397:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceAPI=void 0;const n=r(221);const a=r(498);const o=r(477);const i=r(793);const c=r(44);const s=\"trace\";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},398:(e,Line truncated
|
||||
{"offset": {"line": 1499, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/is-error.ts"],"sourcesContent":["import { isPlainObject } from '../shared/lib/is-plain-object'\n\n// We allow some additional attached properties for Next.js errors\nexport interface NextError extends Error {\n type?: string\n page?: string\n code?: string | number\n cancelled?: boolean\n digest?: string\n}\n\n/**\n * This is a safe stringify function that handles circular references.\n * We're using a simpler version here to avoid introducing\n * the dependency `safe-stable-stringify` into production bundle.\n *\n * This helper is used both in development and production.\n */\nfunction safeStringifyLite(obj: any) {\n const seen = new WeakSet()\n\n return JSON.stringify(obj, (_key, value) => {\n // If value is an object and already seen, replace with \"[Circular]\"\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return '[Circular]'\n }\n seen.add(value)\n }\n return value\n })\n}\n\n/**\n * Checks whether the given value is a NextError.\n * This can be used to print a more detailed error message with properties like `code` & `digest`.\n */\nexport default function isError(err: unknown): err is NextError {\n return (\n typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n )\n}\n\nexport function getProperError(err: unknown): Error {\n if (isError(err)) {\n return err\n }\n\n if (process.env.NODE_ENV === 'development') {\n // provide better error for case where `throw undefined`\n // is called in development\n if (typeof err === 'undefined') {\n return new Error(\n 'An undefined error was thrown, ' +\n 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n )\n }\n\n if (err === null) {\n return new Error(\n 'A null error was thrown, ' +\n 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n )\n }\n }\n\n return new Error(isPlainObject(err) ? safeStringifyLite(err) : err + '')\n}\n"],"names":["isError","getProperError","safeStringifyLite","obj","seen","WeakSet","JSON","stringify","_key","value","has","add","err","process","env","NODE_ENV","Error","isPlainObject"],"mappings":";;;;;;;;;;;;;;IAiCA;;;CAGC,GACD,OAIC,EAAA;eAJuBA;;IAMRC,cAAc,EAAA;eAAdA;;;+BA3Cc;AAW9B;;;;;;CAMC,GACD,SAASC,kBAAkBC,GAAQ;IACjC,MAAMC,OAAO,IAAIC;IAEjB,OAAOC,KAAKC,SAAS,CAACJ,KAAK,CAACK,MAAMC;QAChC,oEAAoE;QACpE,IAAI,OAAOA,UAAU,YAAYA,UAAU,MAAM;YAC/C,IAAIL,KAAKM,GAAG,CAACD,QAAQ;gBACnB,OAAO;YACT;YACAL,KAAKO,GAAG,CAACF;QACX;QACA,OAAOA;IACT;AACF;AAMe,SAAST,QAAQY,GAAY;IAC1C,OACE,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,UAAUA,OAAO,aAAaA;AAE7E;AAEO,SAASX,eAAeW,GAAY;IACzC,IAAIZ,QAAQY,MAAM;QAChB,OAAOA;IACT;IAEA,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,WAAe;QAC1C,wDAAwD;QACxD,2BAA2B;QAC3B,IAAI,OAAOH,QAAQ,aAAa;YAC9B,OAAO,OAAA,cAGN,CAHM,IAAII,MACT,oCACE,6EAFG,qBAAA;uBAAA;4BAAA;8BAAA;YAGP;QACF;QAEA,IAAIJ,QAAQ,MAAM;YAChB,OAAO,OAAA,cAGN,CAHM,IAAII,MACT,8BACE,6EAFG,qBAAA;uBAAA;4BAAA;8BAAA;YAGP;QACF;IACF;IAEA,OAAO,OAAA,cAAiE,CAAjE,IAAIA,MAAMC,CAAAA,GAAAA,eAAAA,aAAa,EAACL,OAAOV,kBAAkBU,OAAOA,MAAM,KAA9D,qBAAA;eAAA;oBAAA;sBAAA;IAAgE;AACzE","ignoreList":[0]}},
|
||||
{"offset": {"line": 1578, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/pretty-bytes.ts"],"sourcesContent":["/*\nMIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n*/\n\nconst UNITS = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n\n/*\nFormats the given number using `Number#toLocaleString`.\n- If locale is a string, the value is expected to be a locale-key (for example: `de`).\n- If locale is true, the system default locale is used for translation.\n- If no value for locale is specified, the number is returned unmodified.\n*/\nconst toLocaleString = (number: number, locale: any) => {\n let result: any = number\n if (typeof locale === 'string') {\n result = number.toLocaleString(locale)\n } else if (locale === true) {\n result = number.toLocaleString()\n }\n\n return result\n}\n\nexport default function prettyBytes(number: number, options?: any): string {\n if (!Number.isFinite(number)) {\n throw new TypeError(\n `Expected a finite number, got ${typeof number}: ${number}`\n )\n }\n\n options = Object.assign({}, options)\n\n if (options.signed && number === 0) {\n return ' 0 B'\n }\n\n const isNegative = number < 0\n const prefix = isNegative ? '-' : options.signed ? '+' : ''\n\n if (isNegative) {\n number = -number\n }\n\n if (number < 1) {\n const numberString = toLocaleString(number, options.locale)\n return prefix + numberString + ' B'\n }\n\n const exponent = Math.min(\n Math.floor(Math.log10(number) / 3),\n UNITS.length - 1\n )\n\n number = Number((number / Math.pow(1000, exponent)).toPrecision(3))\n const numberString = toLocaleString(number, options.locale)\n\n const unit = UNITS[exponent]\n\n return prefix + numberString + ' ' + unit\n}\n"],"names":["prettyBytes","UNITS","toLocaleString","number","locale","result","options","Number","isFinite","TypeError","Object","assign","signed","isNegative","prefix","numberString","exponent","Math","min","floor","log10","length","pow","toPrecision","unit"],"mappings":"AAAA;;;;;;;;;;AAUA;;;+BAqBA,WAAA;;;eAAwBA;;;AAnBxB,MAAMC,QAAQ;IAAC;IAAK;IAAM;IAAM;IAAM;IAAM;IAAM;IAAM;IAAM;CAAK;AAEnE;;;;;AAKA,GACA,MAAMC,iBAAiB,CAACC,QAAgBC;IACtC,IAAIC,SAAcF;IAClB,IAAI,OAAOC,WAAW,UAAU;QAC9BC,SAASF,OAAOD,cAAc,CAACE;IACjC,OAAO,IAAIA,WAAW,MAAM;QAC1BC,SAASF,OAAOD,cAAc;IAChC;IAEA,OAAOG;AACT;AAEe,SAASL,YAAYG,MAAc,EAAEG,OAAa;IAC/D,IAAI,CAACC,OAAOC,QAAQ,CAACL,SAAS;QAC5B,MAAM,OAAA,cAEL,CAFK,IAAIM,UACR,CAAC,8BAA8B,EAAE,OAAON,OAAO,EAAE,EAAEA,QAAQ,GADvD,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEAG,UAAUI,OAAOC,MAAM,CAAC,CAAC,GAAGL;IAE5B,IAAIA,QAAQM,MAAM,IAAIT,WAAW,GAAG;QAClC,OAAO;IACT;IAEA,MAAMU,aAAaV,SAAS;IAC5B,MAAMW,SAASD,aAAa,MAAMP,QAAQM,MAAM,GAAG,MAAM;IAEzD,IAAIC,YAAY;QACdV,SAAS,CAACA;IACZ;IAEA,IAAIA,SAAS,GAAG;QACd,MAAMY,eAAeb,eAAeC,QAAQG,QAAQF,MAAM;QAC1D,OAAOU,SAASC,eAAe;IACjC;IAEA,MAAMC,WAAWC,KAAKC,GAAG,CACvBD,KAAKE,KAAK,CAACF,KAAKG,KAAK,CAACjB,UAAU,IAChCF,MAAMoB,MAAM,GAAG;IAGjBlB,SAASI,OAAQJ,CAAAA,SAASc,KAAKK,GAAG,CAAC,MAAMN,SAAQ,EAAGO,WAAW,CAAC;IAChE,MAAMR,eAAeb,eAAeC,QAAQG,QAAQF,MAAM;IAE1D,MAAMoB,OAAOvB,KAAK,CAACe,SAAS;IAE5B,OAAOF,SAASC,eAAe,MAAMS;AACvC","ignoreList":[0]}},
|
||||
{"offset": {"line": 1653, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/pages/_document.tsx"],"sourcesContent":["/// <reference types=\"webpack/module.d.ts\" />\n\nimport React, { type JSX } from 'react'\nimport { NEXT_BUILTIN_DOCUMENT } from '../shared/lib/constants'\nimport type {\n DocumentContext,\n DocumentInitialProps,\n DocumentProps,\n DocumentType,\n NEXT_DATA,\n} from '../shared/lib/utils'\nimport type { ScriptProps } from '../client/script'\nimport type { NextFontManifest } from '../build/webpack/plugins/next-font-manifest-plugin'\n\nimport {\n getPageFiles,\n getTurbopackChunkGroupBootstrap,\n} from '../server/get-page-files'\nimport type { BuildManifest } from '../server/get-page-files'\nimport { htmlEscapeJsonString } from '../shared/lib/htmlescape'\nimport isError from '../lib/is-error'\n\nimport {\n HtmlContext,\n useHtmlContext,\n} from '../shared/lib/html-context.shared-runtime'\nimport type { HtmlProps } from '../shared/lib/html-context.shared-runtime'\nimport { encodeURIPath } from '../shared/lib/encode-uri-path'\nimport type { DeepReadonly } from '../shared/lib/deep-readonly'\nimport { getTracer } from '../server/lib/trace/tracer'\nimport { getTracedMetadata } from '../server/lib/trace/utils'\n\nexport type { DocumentContext, DocumentInitialProps, DocumentProps }\n\nexport type OriginProps = {\n nonce?: string\n crossOrigin?: 'anonymous' | 'use-credentials' | '' | undefined\n children?: React.ReactNode\n}\n\ntype DocumentFiles = {\n sharedFiles: readonly string[]\n pageFiles: readonly string[]\n allFiles: readonly string[]\n}\n\ntype HeadHTMLProps = React.DetailedHTMLProps<\n React.HTMLAttributes<HTMLHeadElement>,\n HTMLHeadElement\n>\n\ntype HeadProps = OriginProps & HeadHTMLProps\n\n/** Set of pages that have triggered a large data warning on production mode. */\nconst largePageDataWarnings = new Set<string>()\n\nfunction getDocumentFiles(\n buildManifest: BuildManifest,\n pathname: string\n): DocumentFiles {\n const sharedFiles: readonly string[] = getPageFiles(buildManifest, '/_app')\n const pageFiles: readonly string[] = getPageFiles(buildManifest, pathname)\n\n return {\n sharedFiles,\n pageFiles,\n allFiles: [...new Set([...sharedFiles, ...pageFiles])],\n }\n}\n\nfunction getPolyfillScripts(context: HtmlProps, props: OriginProps) {\n // polyfills.js has to be rendered as nomodule without async\n // It also has to be the first script to load\n const {\n assetPrefix,\n buildManifest,\n assetQueryString,\n disableOptimizedLoading,\n crossOrigin,\n } = context\n\n return buildManifest.polyfillFiles\n .filter(\n (polyfill) => polyfill.endsWith('.js') && !polyfill.endsWith('.module.js')\n )\n .map((polyfill) => (\n <script\n key={polyfill}\n defer={!disableOptimizedLoading}\n nonce={props.nonce}\n crossOrigin={props.crossOrigin || crossOrigin}\n noModule={true}\n src={`${assetPrefix}/_next/${encodeURIPath(\n polyfill\n )}${assetQueryString}`}\n />\n ))\n}\n\nfunction hasComponentProps(child: any): child is React.ReactElement<any> {\n return !!child && !!child.props\n}\n\nfunction getDynamicChunks(\n context: HtmlProps,\n props: OriginProps,\n files: DocumentFiles\n) {\n const {\n dynamicImports,\n assetPrefix,\n isDevelopment,\n assetQueryString,\n disableOptimizedLoading,\n crossOrigin,\n } = context\n\n return dynamicImports.map((file) => {\n if (!file.endsWith('.js') || files.allFiles.includes(file)) return null\n\n return (\n <script\n async={!isDevelopment && disableOptimizedLoading}\n defer={!disableOptimizedLoading}\n key={file}\n src={`${assetPrefix}/_next/${encodeURIPath(file)}${assetQueryString}`}\n nonce={props.nonce}\n crossOrigin={props.crossOrigin || crossOrigin}\n />\n )\n })\n}\n\n// Builds one inline <script> seeding the runtime queue with the shared (`/_app`) and\n// current route's bootstrap params, before the shared runtime chunk drains it.\nfunction getInlineBootstrapScript(context: HtmlProps, props: OriginProps) {\n const { buildManifest, __NEXT_DATA__, crossOrigin } = context\n // Only Turbopack production builds populate these; nothing to inline otherwise.\n if (\n !buildManifest.pagesChunkGroupBootstrapParams ||\n !buildManifest.chunkLoadingGlobal\n ) {\n return null\n }\n const bootstrap = getTurbopackChunkGroupBootstrap(\n buildManifest.pagesChunkGroupBootstrapParams,\n buildManifest.chunkLoadingGlobal,\n ['/_app', __NEXT_DATA__.page]\n )\n if (!bootstrap) return null\n\n const html = htmlEscapeJsonString(bootstrap)\n return (\n <script\n key=\"turbopack-bootstrap\"\n nonce={props.nonce}\n crossOrigin={props.crossOrigin || crossOrigin}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n}\n\nfunction getScripts(\n conLine truncated
|
||||
{"offset": {"line": 2371, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/get-page-files.ts"],"sourcesContent":["import { denormalizePagePath } from '../shared/lib/page-path/denormalize-page-path'\nimport { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'\n\nexport type BuildManifest = {\n devFiles: readonly string[]\n polyfillFiles: readonly string[]\n lowPriorityFiles: readonly string[]\n rootMainFiles: readonly string[]\n // this is a separate field for flying shuttle to allow\n // different root main files per entries/build (ideally temporary)\n // until we can stitch the runtime chunks together safely\n rootMainFilesTree: { [appRoute: string]: readonly string[] }\n pages: {\n '/_app': readonly string[]\n [page: string]: readonly string[]\n }\n // Per-page Turbopack chunk-group bootstrap params, stored as raw JSON.\n pagesChunkGroupBootstrapParams?: { [page: string]: object }\n // The chunk-loading global the runtime drains (default \"TURBOPACK\").\n chunkLoadingGlobal?: string\n}\n\n/**\n * Builds inline `globalThis[<global>].push(<params>)` bootstrap content for the given\n * pages, seeding the runtime queue before the shared runtime chunk drains it. Only call\n * this for Turbopack production builds (the only builds that populate\n * `pagesChunkGroupBootstrapParams` / `chunkLoadingGlobal`). Returns undefined when none\n * of the given pages have inlined params.\n */\nexport function getTurbopackChunkGroupBootstrap(\n paramsByPage: { [page: string]: object },\n chunkLoadingGlobal: string,\n pages: readonly string[]\n): string | undefined {\n const g = JSON.stringify(chunkLoadingGlobal)\n const statements = pages\n .map((page) => paramsByPage[page])\n .filter(Boolean)\n .map(\n (params) =>\n `(globalThis[${g}] || (globalThis[${g}] = [])).push(${JSON.stringify(\n params\n )});`\n )\n\n return statements.length > 0 ? statements.join('\\n') : undefined\n}\n\nexport function getPageFiles(\n buildManifest: BuildManifest,\n page: string\n): readonly string[] {\n const normalizedPage = denormalizePagePath(normalizePagePath(page))\n let files = buildManifest.pages[normalizedPage]\n\n if (!files) {\n console.warn(\n `Could not find files for ${normalizedPage} in .next/build-manifest.json`\n )\n return []\n }\n\n return files\n}\n"],"names":["getPageFiles","getTurbopackChunkGroupBootstrap","paramsByPage","chunkLoadingGlobal","pages","g","JSON","stringify","statements","map","page","filter","Boolean","params","length","join","undefined","buildManifest","normalizedPage","denormalizePagePath","normalizePagePath","files","console","warn"],"mappings":";;;;;;;;;;;;;;IAgDgBA,YAAY,EAAA;eAAZA;;IAnBAC,+BAA+B,EAAA;eAA/BA;;;qCA7BoB;mCACF;AA4B3B,SAASA,gCACdC,YAAwC,EACxCC,kBAA0B,EAC1BC,KAAwB;IAExB,MAAMC,IAAIC,KAAKC,SAAS,CAACJ;IACzB,MAAMK,aAAaJ,MAChBK,GAAG,CAAC,CAACC,OAASR,YAAY,CAACQ,KAAK,EAChCC,MAAM,CAACC,SACPH,GAAG,CACF,CAACI,SACC,CAAC,YAAY,EAAER,EAAE,iBAAiB,EAAEA,EAAE,cAAc,EAAEC,KAAKC,SAAS,CAClEM,QACA,EAAE,CAAC;IAGX,OAAOL,WAAWM,MAAM,GAAG,IAAIN,WAAWO,IAAI,CAAC,QAAQC;AACzD;AAEO,SAAShB,aACdiB,aAA4B,EAC5BP,IAAY;IAEZ,MAAMQ,iBAAiBC,CAAAA,GAAAA,qBAAAA,mBAAmB,EAACC,CAAAA,GAAAA,mBAAAA,iBAAiB,EAACV;IAC7D,IAAIW,QAAQJ,cAAcb,KAAK,CAACc,eAAe;IAE/C,IAAI,CAACG,OAAO;QACVC,QAAQC,IAAI,CACV,CAAC,yBAAyB,EAAEL,eAAe,6BAA6B,CAAC;QAE3E,OAAO,EAAE;IACX;IAEA,OAAOG;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 2412, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/constants.ts"],"sourcesContent":["/**\n * Contains predefined constants for the trace span name in next/server.\n *\n * Currently, next/server/tracer is internal implementation only for tracking\n * next.js's implementation only with known span names defined here.\n **/\n\n// eslint typescript has a bug with TS enums\n\nenum BaseServerSpan {\n handleRequest = 'BaseServer.handleRequest',\n run = 'BaseServer.run',\n pipe = 'BaseServer.pipe',\n getStaticHTML = 'BaseServer.getStaticHTML',\n render = 'BaseServer.render',\n renderToResponseWithComponents = 'BaseServer.renderToResponseWithComponents',\n renderToResponse = 'BaseServer.renderToResponse',\n renderToHTML = 'BaseServer.renderToHTML',\n renderError = 'BaseServer.renderError',\n renderErrorToResponse = 'BaseServer.renderErrorToResponse',\n renderErrorToHTML = 'BaseServer.renderErrorToHTML',\n render404 = 'BaseServer.render404',\n}\n\nenum LoadComponentsSpan {\n loadDefaultErrorComponents = 'LoadComponents.loadDefaultErrorComponents',\n loadComponents = 'LoadComponents.loadComponents',\n}\n\nenum NextServerSpan {\n getRequestHandler = 'NextServer.getRequestHandler',\n getRequestHandlerWithMetadata = 'NextServer.getRequestHandlerWithMetadata',\n getServer = 'NextServer.getServer',\n getServerRequestHandler = 'NextServer.getServerRequestHandler',\n createServer = 'createServer.createServer',\n}\n\nenum NextNodeServerSpan {\n compression = 'NextNodeServer.compression',\n getBuildId = 'NextNodeServer.getBuildId',\n createComponentTree = 'NextNodeServer.createComponentTree',\n clientComponentLoading = 'NextNodeServer.clientComponentLoading',\n getLayoutOrPageModule = 'NextNodeServer.getLayoutOrPageModule',\n generateStaticRoutes = 'NextNodeServer.generateStaticRoutes',\n generateFsStaticRoutes = 'NextNodeServer.generateFsStaticRoutes',\n generatePublicRoutes = 'NextNodeServer.generatePublicRoutes',\n generateImageRoutes = 'NextNodeServer.generateImageRoutes.route',\n sendRenderResult = 'NextNodeServer.sendRenderResult',\n proxyRequest = 'NextNodeServer.proxyRequest',\n runApi = 'NextNodeServer.runApi',\n render = 'NextNodeServer.render',\n renderHTML = 'NextNodeServer.renderHTML',\n imageOptimizer = 'NextNodeServer.imageOptimizer',\n getPagePath = 'NextNodeServer.getPagePath',\n getRoutesManifest = 'NextNodeServer.getRoutesManifest',\n findPageComponents = 'NextNodeServer.findPageComponents',\n getFontManifest = 'NextNodeServer.getFontManifest',\n getServerComponentManifest = 'NextNodeServer.getServerComponentManifest',\n getRequestHandler = 'NextNodeServer.getRequestHandler',\n renderToHTML = 'NextNodeServer.renderToHTML',\n renderError = 'NextNodeServer.renderError',\n renderErrorToHTML = 'NextNodeServer.renderErrorToHTML',\n render404 = 'NextNodeServer.render404',\n startResponse = 'NextNodeServer.startResponse',\n\n // nested inner span, does not require parent scope name\n route = 'route',\n onProxyReq = 'onProxyReq',\n apiResolver = 'apiResolver',\n internalFetch = 'internalFetch',\n}\n\nenum StartServerSpan {\n startServer = 'startServer.startServer',\n}\n\nenum RenderSpan {\n getServerSideProps = 'Render.getServerSideProps',\n getStaticProps = 'Render.getStaticProps',\n renderToString = 'Render.renderToString',\n renderDocument = 'Render.renderDocument',\n createBodyResult = 'Render.createBodyResult',\n}\n\nenum AppRenderSpan {\n renderToString = 'AppRender.renderToString',\n renderToReadableStream = 'AppRender.renderToReadableStream',\n getBodyResult = 'AppRender.getBodyResult',\n fetch = 'AppRender.fetch',\n waitShellReady = 'AppRender.waitShellReady',\n renderToNodeFizzStream = 'AppRender.renderToNodeFizzStream',\n instantInsights = 'AppRender.instantInsights',\n instantInsightsPrepareValidation = 'AppRender.instantInsights.prepareValidation',\n instantInsightsRunValidation = 'AppRender.instantInsights.runValidation',\n}\n\nenum RouterSpan {\n executeRoute = 'Router.executeRoute',\n}\n\nenum NodeSpan {\n runHandler = 'Node.runHandler',\n}\n\nenum AppRouteRouteHandlersSpan {\n runHandler = 'AppRouteRouteHandlers.runHandler',\n}\n\nenum ResolveMetadataSpan {\n generateMetadata = 'ResolveMetadata.generateMetadata',\n generateViewport = 'ResolveMetadata.generateViewport',\n}\n\nenum MiddlewareSpan {\n execute = 'Middleware.execute',\n}\n\ntype SpanTypes =\n | `${BaseServerSpan}`\n | `${LoadComponentsSpan}`\n | `${NextServerSpan}`\n | `${StartServerSpan}`\n | `${NextNodeServerSpan}`\n | `${RenderSpan}`\n | `${RouterSpan}`\n | `${AppRenderSpan}`\n | `${NodeSpan}`\n | `${AppRouteRouteHandlersSpan}`\n | `${ResolveMetadataSpan}`\n | `${MiddlewareSpan}`\n\n// This list is used to filter out spans that are not relevant to the user\nexport const NextVanillaSpanAllowlist = new Set([\n MiddlewareSpan.execute,\n BaseServerSpan.haLine truncated
|
||||
{"offset": {"line": 2621, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/tracer.ts"],"sourcesContent":["import type { FetchEventResult } from '../../web/types'\nimport type { TextMapSetter } from '@opentelemetry/api'\nimport type { SpanTypes } from './constants'\nimport type { LocalSpanRecorder } from './local-span-recorder'\nimport { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'\n\nimport type {\n Context,\n ContextAPI,\n Span,\n SpanOptions,\n Tracer,\n AttributeValue,\n TextMapGetter,\n} from 'next/dist/compiled/@opentelemetry/api'\nimport { isThenable } from '../../../shared/lib/is-thenable'\n\nconst NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX\nconst LOCAL_SPAN_RECORDER_KEY = Symbol.for('@next/local-span-recorder')\n\ntype GlobalWithLocalSpanRecorder = typeof globalThis & {\n [LOCAL_SPAN_RECORDER_KEY]?: LocalSpanRecorder\n}\n\nlet api: typeof import('next/dist/compiled/@opentelemetry/api')\n\nfunction getLocalSpanRecorder() {\n if (process.env.__NEXT_DEV_SERVER) {\n return (globalThis as GlobalWithLocalSpanRecorder)[LOCAL_SPAN_RECORDER_KEY]\n } else {\n return undefined\n }\n}\n\n// we want to allow users to use their own version of @opentelemetry/api if they\n// want to, so we try to require it first, and if it fails we fall back to the\n// version that is bundled with Next.js\n// this is because @opentelemetry/api has to be synced with the version of\n// @opentelemetry/tracing that is used, and we don't want to force users to use\n// the version that is bundled with Next.js.\n// the API is ~stable, so this should be fine\nif (process.env.NEXT_RUNTIME === 'edge') {\n api = require('@opentelemetry/api') as typeof import('@opentelemetry/api')\n} else {\n try {\n api = require('@opentelemetry/api') as typeof import('@opentelemetry/api')\n } catch (err) {\n api =\n require('next/dist/compiled/@opentelemetry/api') as typeof import('next/dist/compiled/@opentelemetry/api')\n }\n}\n\nconst { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } =\n api\n\nexport class BubbledError extends Error {\n constructor(\n public readonly bubble?: boolean,\n public readonly result?: FetchEventResult\n ) {\n super()\n }\n}\n\nexport function isBubbledError(error: unknown): error is BubbledError {\n if (typeof error !== 'object' || error === null) return false\n return error instanceof BubbledError\n}\n\nconst closeSpanWithError = (span: Span, error?: Error) => {\n if (isBubbledError(error) && error.bubble) {\n span.setAttribute('next.bubble', true)\n } else {\n if (error) {\n span.recordException(error)\n span.setAttribute('error.type', error.name)\n }\n span.setStatus({ code: SpanStatusCode.ERROR, message: error?.message })\n }\n span.end()\n}\n\ntype TracerSpanOptions = Omit<SpanOptions, 'attributes'> & {\n parentSpan?: Span\n spanName?: string\n attributes?: Partial<Record<AttributeNames, AttributeValue | undefined>>\n hideSpan?: boolean\n}\n\ninterface NextTracer {\n getContext(): ContextAPI\n\n /**\n * Instruments a function by automatically creating a span activated on its\n * scope.\n *\n * The span will automatically be finished when one of these conditions is\n * met:\n *\n * * The function returns a promise, in which case the span will finish when\n * the promise is resolved or rejected.\n * * The function takes a callback as its second parameter, in which case the\n * span will finish when that callback is called.\n * * The function doesn't accept a callback and doesn't return a promise, in\n * which case the span will finish at the end of the function execution.\n *\n */\n trace<T>(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise<T>\n ): Promise<T>\n trace<T>(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => T\n ): T\n trace<T>(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise<T>\n ): Promise<T>\n trace<T>(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: (span?: Span, done?: (error?: Error) => any) => T\n ): T\n\n /**\n * Wrap a function to automatically create a span activated on its\n * scope when it's called.\n *\n * The span will automatically be finished when one of these conditions is\n * met:\n *\n * * The function returns a promise, in which case the span will finish when\n * the promise is resolved or rejected.\n * * The function takes a callback as its last parameter, in which case the\n * span will finish when that callback is called.\n * * The function doesn't accept a callback and doesn't return a promise, in\n * which case the span will finish at the end of the function execution.\n */\n wrap<T = (...args: Array<any>) => any>(type: SpanTypes, fn: T): T\n wrap<TLine truncated
|
||||
{"offset": {"line": 3012, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/utils.ts"],"sourcesContent":["import type { ClientTraceDataEntry } from './tracer'\n\n/**\n * Takes OpenTelemetry client trace data and the `clientTraceMetadata` option configured in the Next.js config (currently\n * experimental) and returns a filtered/allowed list of client trace data entries.\n */\nexport function getTracedMetadata(\n traceData: ClientTraceDataEntry[],\n clientTraceMetadata: string[] | undefined\n): ClientTraceDataEntry[] | undefined {\n if (!clientTraceMetadata) return undefined\n return traceData.filter(({ key }) => clientTraceMetadata.includes(key))\n}\n"],"names":["getTracedMetadata","traceData","clientTraceMetadata","undefined","filter","key","includes"],"mappings":";;;+BAMgBA,qBAAAA;;;eAAAA;;;AAAT,SAASA,kBACdC,SAAiC,EACjCC,mBAAyC;IAEzC,IAAI,CAACA,qBAAqB,OAAOC;IACjC,OAAOF,UAAUG,MAAM,CAAC,CAAC,EAAEC,GAAG,EAAE,GAAKH,oBAAoBI,QAAQ,CAACD;AACpE","ignoreList":[0]}},
|
||||
{"offset": {"line": 3029, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/pages/module.compiled.js"],"sourcesContent":["if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/pages/module.js')\n} else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/pages-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/pages.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/pages-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/pages.runtime.prod.js')\n }\n }\n}\n"],"names":["process","env","NEXT_RUNTIME","module","exports","require","NODE_ENV","TURBOPACK"],"mappings":"AAAA,IAAIA,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;KAElC;IACL,IAAIF,QAAQC,GAAG,CAACK,QAAQ,KAAK,WAAe;QAC1C,IAAIN,QAAQC,GAAG,CAACM,SAAS,eAAE;YACzBJ,OAAOC,OAAO,GAAGC,QAAQ;QAC3B,OAAO;;IAGT,OAAO;;AAOT","ignoreList":[0]}},
|
||||
{"offset": {"line": 3044, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/pages/vendored/contexts/html-context.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HtmlContext\n"],"names":["module","exports","require","vendored","HtmlContext"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,qHACRC,QAAQ,CAAC,WAAW,CAACC,WAAW","ignoreList":[0]}},
|
||||
{"offset": {"line": 3049, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/constants.ts"],"sourcesContent":["import MODERN_BROWSERSLIST_TARGET from './modern-browserslist-target'\n\nexport { MODERN_BROWSERSLIST_TARGET }\n\nexport type ValueOf<T> = Required<T>[keyof T]\n\nexport const COMPILER_NAMES = {\n client: 'client',\n server: 'server',\n edgeServer: 'edge-server',\n} as const\n\nexport type CompilerNameValues = ValueOf<typeof COMPILER_NAMES>\n\nexport const COMPILER_INDEXES: {\n [compilerKey in CompilerNameValues]: number\n} = {\n [COMPILER_NAMES.client]: 0,\n [COMPILER_NAMES.server]: 1,\n [COMPILER_NAMES.edgeServer]: 2,\n} as const\n\n// Re-export entry constants for backward compatibility\nexport {\n UNDERSCORE_NOT_FOUND_ROUTE,\n UNDERSCORE_NOT_FOUND_ROUTE_ENTRY,\n UNDERSCORE_GLOBAL_ERROR_ROUTE,\n UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY,\n} from './entry-constants'\n\nexport enum AdapterOutputType {\n /**\n * `PAGES` represents all the React pages that are under `pages/`.\n */\n PAGES = 'PAGES',\n\n /**\n * `PAGES_API` represents all the API routes under `pages/api/`.\n */\n PAGES_API = 'PAGES_API',\n /**\n * `APP_PAGE` represents all the React pages that are under `app/` with the\n * filename of `page.{j,t}s{,x}`.\n */\n APP_PAGE = 'APP_PAGE',\n\n /**\n * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n * filename of `route.{j,t}s{,x}`.\n */\n APP_ROUTE = 'APP_ROUTE',\n\n /**\n * `PRERENDER` represents an ISR enabled route that might\n * have a seeded cache entry or fallback generated during build\n */\n PRERENDER = 'PRERENDER',\n\n /**\n * `STATIC_FILE` represents a static file (ie /_next/static)\n */\n STATIC_FILE = 'STATIC_FILE',\n\n /**\n * `MIDDLEWARE` represents the middleware output if present\n */\n MIDDLEWARE = 'MIDDLEWARE',\n}\n\nexport const PHASE_EXPORT = 'phase-export'\nexport const PHASE_ANALYZE = 'phase-analyze'\nexport const PHASE_PRODUCTION_BUILD = 'phase-production-build'\nexport const PHASE_PRODUCTION_SERVER = 'phase-production-server'\nexport const PHASE_DEVELOPMENT_SERVER = 'phase-development-server'\nexport const PHASE_TEST = 'phase-test'\nexport const PHASE_INFO = 'phase-info'\n\nexport type PHASE_TYPE =\n | typeof PHASE_INFO\n | typeof PHASE_TEST\n | typeof PHASE_EXPORT\n | typeof PHASE_ANALYZE\n | typeof PHASE_PRODUCTION_BUILD\n | typeof PHASE_PRODUCTION_SERVER\n | typeof PHASE_DEVELOPMENT_SERVER\n\nexport const PAGES_MANIFEST = 'pages-manifest.json'\nexport const APP_PATHS_MANIFEST = 'app-paths-manifest.json'\nexport const APP_PATH_ROUTES_MANIFEST = 'app-path-routes-manifest.json'\nexport const BUILD_MANIFEST = 'build-manifest.json'\nexport const FUNCTIONS_CONFIG_MANIFEST = 'functions-config-manifest.json'\nexport const SUBRESOURCE_INTEGRITY_MANIFEST = 'subresource-integrity-manifest'\nexport const NEXT_FONT_MANIFEST = 'next-font-manifest'\nexport const EXPORT_MARKER = 'export-marker.json'\nexport const EXPORT_DETAIL = 'export-detail.json'\nexport const PRERENDER_MANIFEST = 'prerender-manifest.json'\nexport const PREFETCH_HINTS = 'prefetch-hints.json'\nexport const ROUTES_MANIFEST = 'routes-manifest.json'\nexport const IMAGES_MANIFEST = 'images-manifest.json'\nexport const SERVER_FILES_MANIFEST = 'required-server-files'\nexport const DEV_CLIENT_PAGES_MANIFEST = '_devPagesManifest.json'\nexport const REQUEST_INSIGHTS_DEV_ENDPOINT =\n '/_next/development/request-insights'\nexport const MIDDLEWARE_MANIFEST = 'middleware-manifest.json'\nexport const TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST =\n '_clientMiddlewareManifest.js'\nexport const TURBOPACK_CLIENT_BUILD_MANIFEST = 'client-build-manifest.json'\nexport const DEV_CLIENT_MIDDLEWARE_MANIFEST = '_devMiddlewareManifest.json'\nexport const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json'\nexport const SERVER_DIRECTORY = 'server'\nexport const CONFIG_FILES = [\n 'next.config.js',\n 'next.config.mjs',\n 'next.config.ts',\n // process.features can be undefined on Edge runtime\n // TODO: Remove `as any` once we bump @types/node to v22.10.0+\n ...((process?.features as any)?.typescript ? ['next.config.mts'] : []),\n]\nexport const BUILD_ID_FILE = 'BUILD_ID'\nexport const BLOCKED_PAGES = ['/_document', '/_app', '/_error']\nexport const CLIENT_PUBLIC_FILES_PATH = 'public'\nexport const CLIENT_STATIC_FILES_PATH = 'static'\nexport const STRING_LITERAL_DROP_BUNDLE = '__NEXT_DROP_CLIENT_FILE__'\nexport const NEXT_BUILTIN_DOCUMENT = '__NEXT_BUILTIN_DOCUMENT__'\nexport const BARREL_OPTIMIZATION_PREFIX = '__barrel_optimize__'\n\n// server/[entry]/page_client-reference-manifest.js\nexport const CLIENT_REFERENCE_MANIFEST = 'client-reference-manifest'\n// server/server-reference-manifest\nexport const SERVER_REFERENCE_MANIFEST = 'server-reference-manifest'\n// server/middleware-build-manifest.js\nexport const MIDDLEWARE_BUILD_MANIFEST = 'middleware-build-Line truncated
|
||||
{"offset": {"line": 3504, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/encode-uri-path.ts"],"sourcesContent":["export function encodeURIPath(file: string) {\n return file\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')\n}\n"],"names":["encodeURIPath","file","split","map","p","encodeURIComponent","join"],"mappings":";;;+BAAgBA,iBAAAA;;;eAAAA;;;AAAT,SAASA,cAAcC,IAAY;IACxC,OAAOA,KACJC,KAAK,CAAC,KACNC,GAAG,CAAC,CAACC,IAAMC,mBAAmBD,IAC9BE,IAAI,CAAC;AACV","ignoreList":[0]}},
|
||||
{"offset": {"line": 3520, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/entry-constants.ts"],"sourcesContent":["export const UNDERSCORE_NOT_FOUND_ROUTE = '/_not-found'\nexport const UNDERSCORE_NOT_FOUND_ROUTE_ENTRY = `${UNDERSCORE_NOT_FOUND_ROUTE}/page`\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE = '/_global-error'\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY = `${UNDERSCORE_GLOBAL_ERROR_ROUTE}/page`\n"],"names":["UNDERSCORE_GLOBAL_ERROR_ROUTE","UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY","UNDERSCORE_NOT_FOUND_ROUTE","UNDERSCORE_NOT_FOUND_ROUTE_ENTRY"],"mappings":";;;;;;;;;;;;;;;;IAEaA,6BAA6B,EAAA;eAA7BA;;IACAC,mCAAmC,EAAA;eAAnCA;;IAHAC,0BAA0B,EAAA;eAA1BA;;IACAC,gCAAgC,EAAA;eAAhCA;;;AADN,MAAMD,6BAA6B;AACnC,MAAMC,mCAAmC,GAAGD,2BAA2B,KAAK,CAAC;AAC7E,MAAMF,gCAAgC;AACtC,MAAMC,sCAAsC,GAAGD,8BAA8B,KAAK,CAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 3557, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/htmlescape.ts"],"sourcesContent":["// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\nconst ESCAPE_LOOKUP: { [match: string]: string } = {\n '&': '\\\\u0026',\n '>': '\\\\u003e',\n '<': '\\\\u003c',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n}\n\nexport const ESCAPE_REGEX = /[&><\\u2028\\u2029]/g\n\nconst ATTRIBUTE_ESCAPE_LOOKUP: { [match: string]: string } = {\n '&': '&',\n '\"': '"',\n \"'\": ''',\n '<': '<',\n '>': '>',\n}\n\nconst ATTRIBUTE_ESCAPE_REGEX = /[&\"'<>]/g\n\nexport function htmlEscapeJsonString(str: string): string {\n return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match])\n}\n\nexport function htmlEscapeAttributeString(str: string): string {\n return str.replace(\n ATTRIBUTE_ESCAPE_REGEX,\n (match) => ATTRIBUTE_ESCAPE_LOOKUP[match]\n )\n}\n"],"names":["ESCAPE_REGEX","htmlEscapeAttributeString","htmlEscapeJsonString","ESCAPE_LOOKUP","ATTRIBUTE_ESCAPE_LOOKUP","ATTRIBUTE_ESCAPE_REGEX","str","replace","match"],"mappings":"AAAA,iEAAiE;AACjE,uGAAuG;;;;;;;;;;;;;;;;IAU1FA,YAAY,EAAA;eAAZA;;IAgBGC,yBAAyB,EAAA;eAAzBA;;IAJAC,oBAAoB,EAAA;eAApBA;;;AApBhB,MAAMC,gBAA6C;IACjD,KAAK;IACL,KAAK;IACL,KAAK;IACL,UAAU;IACV,UAAU;AACZ;AAEO,MAAMH,eAAe;AAE5B,MAAMI,0BAAuD;IAC3D,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACP;AAEA,MAAMC,yBAAyB;AAExB,SAASH,qBAAqBI,GAAW;IAC9C,OAAOA,IAAIC,OAAO,CAACP,cAAc,CAACQ,QAAUL,aAAa,CAACK,MAAM;AAClE;AAEO,SAASP,0BAA0BK,GAAW;IACnD,OAAOA,IAAIC,OAAO,CAChBF,wBACA,CAACG,QAAUJ,uBAAuB,CAACI,MAAM;AAE7C","ignoreList":[0]}},
|
||||
{"offset": {"line": 3610, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/is-plain-object.ts"],"sourcesContent":["export function getObjectClassLabel(value: any): string {\n return Object.prototype.toString.call(value)\n}\n\nexport function isPlainObject(value: any): boolean {\n if (getObjectClassLabel(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n\n /**\n * this used to be previously:\n *\n * `return prototype === null || prototype === Object.prototype`\n *\n * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n *\n * It was changed to the current implementation since it's resilient to serialization.\n */\n return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n"],"names":["getObjectClassLabel","isPlainObject","value","Object","prototype","toString","call","getPrototypeOf","hasOwnProperty"],"mappings":";;;;;;;;;;;;;;IAAgBA,mBAAmB,EAAA;eAAnBA;;IAIAC,aAAa,EAAA;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","ignoreList":[0]}},
|
||||
{"offset": {"line": 3653, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC;;;+BACeA,cAAAA;;;eAAAA;;;AAAT,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0]}},
|
||||
{"offset": {"line": 3674, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/modern-browserslist-target.js"],"sourcesContent":["// Note: This file is JS because it's used by the taskfile-swc.js file, which is JS.\n// Keep file changes in sync with the corresponding `.d.ts` files.\n\n/**\n * These are the minimum browser versions that we consider \"modern\" and thus compile for by default.\n * This list was generated using `pnpm browserslist \"baseline widely available\"` on 2025-10-01.\n */\nconst MODERN_BROWSERSLIST_TARGET = [\n 'chrome 111',\n 'edge 111',\n 'firefox 111',\n 'safari 16.4',\n]\n\nmodule.exports = MODERN_BROWSERSLIST_TARGET\n"],"names":["MODERN_BROWSERSLIST_TARGET","module","exports"],"mappings":"AAAA,oFAAoF;AACpF,kEAAkE;AAElE;;;CAGC,GACD,MAAMA,6BAA6B;IACjC;IACA;IACA;IACA;CACD;AAEDC,OAAOC,OAAO,GAAGF","ignoreList":[0]}},
|
||||
{"offset": {"line": 3690, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/page-path/denormalize-page-path.ts"],"sourcesContent":["import { isDynamicRoute } from '../router/utils'\nimport { normalizePathSep } from './normalize-path-sep'\n\n/**\n * Performs the opposite transformation of `normalizePagePath`. Note that\n * this function is not idempotent either in cases where there are multiple\n * leading `/index` for the page. Examples:\n * - `/index` -> `/`\n * - `/index/foo` -> `/foo`\n * - `/index/index` -> `/index`\n */\nexport function denormalizePagePath(page: string) {\n let _page = normalizePathSep(page)\n return _page.startsWith('/index/') && !isDynamicRoute(_page)\n ? _page.slice(6)\n : _page !== '/index'\n ? _page\n : '/'\n}\n"],"names":["denormalizePagePath","page","_page","normalizePathSep","startsWith","isDynamicRoute","slice"],"mappings":";;;+BAWgBA,uBAAAA;;;eAAAA;;;uBAXe;kCACE;AAU1B,SAASA,oBAAoBC,IAAY;IAC9C,IAAIC,QAAQC,CAAAA,GAAAA,kBAAAA,gBAAgB,EAACF;IAC7B,OAAOC,MAAME,UAAU,CAAC,cAAc,CAACC,CAAAA,GAAAA,OAAAA,cAAc,EAACH,SAClDA,MAAMI,KAAK,CAAC,KACZJ,UAAU,WACRA,QACA;AACR","ignoreList":[0]}},
|
||||
{"offset": {"line": 3709, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC;;;+BACeA,sBAAAA;;;eAAAA;;;AAAT,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAO,CAAC,CAAC,EAAEA,MAAM;AACjD","ignoreList":[0]}},
|
||||
{"offset": {"line": 3728, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/page-path/normalize-page-path.ts"],"sourcesContent":["import { ensureLeadingSlash } from './ensure-leading-slash'\nimport { isDynamicRoute } from '../router/utils'\nimport { NormalizeError } from '../utils'\n\n/**\n * Takes a page and transforms it into its file counterpart ensuring that the\n * output is normalized. Note this function is not idempotent because a page\n * `/index` can be referencing `/index/index.js` and `/index/index` could be\n * referencing `/index/index/index.js`. Examples:\n * - `/` -> `/index`\n * - `/index/foo` -> `/index/index/foo`\n * - `/index` -> `/index/index`\n */\nexport function normalizePagePath(page: string): string {\n const normalized =\n /^\\/index(\\/|$)/.test(page) && !isDynamicRoute(page)\n ? `/index${page}`\n : page === '/'\n ? '/index'\n : ensureLeadingSlash(page)\n\n if (process.env.NEXT_RUNTIME !== 'edge') {\n const { posix } = require('path') as typeof import('path')\n const resolvedPage = posix.normalize(normalized)\n if (resolvedPage !== normalized) {\n throw new NormalizeError(\n `Requested and resolved page mismatch: ${normalized} ${resolvedPage}`\n )\n }\n }\n\n return normalized\n}\n"],"names":["normalizePagePath","page","normalized","test","isDynamicRoute","ensureLeadingSlash","process","env","NEXT_RUNTIME","posix","require","resolvedPage","normalize","NormalizeError"],"mappings":";;;+BAagBA,qBAAAA;;;eAAAA;;;oCAbmB;uBACJ;wBACA;AAWxB,SAASA,kBAAkBC,IAAY;IAC5C,MAAMC,aACJ,iBAAiBC,IAAI,CAACF,SAAS,CAACG,CAAAA,GAAAA,OAAAA,cAAc,EAACH,QAC3C,CAAC,MAAM,EAAEA,MAAM,GACfA,SAAS,MACP,WACAI,CAAAA,GAAAA,oBAAAA,kBAAkB,EAACJ;IAE3B,IAAIK,QAAQC,GAAG,CAACC,YAAY,KAAK,OAAQ;QACvC,MAAM,EAAEC,KAAK,EAAE,GAAGC,QAAQ;QAC1B,MAAMC,eAAeF,MAAMG,SAAS,CAACV;QACrC,IAAIS,iBAAiBT,YAAY;YAC/B,MAAM,IAAIW,QAAAA,cAAc,CACtB,CAAC,sCAAsC,EAAEX,WAAW,CAAC,EAAES,cAAc;QAEzE;IACF;IAEA,OAAOT;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 3755, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/page-path/normalize-path-sep.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is no backslash\n * escaping slashes in the path. Example:\n * - `foo\\/bar\\/baz` -> `foo/bar/baz`\n */\nexport function normalizePathSep(path: string): string {\n return path.replace(/\\\\/g, '/')\n}\n"],"names":["normalizePathSep","path","replace"],"mappings":"AAAA;;;;CAIC;;;+BACeA,oBAAAA;;;eAAAA;;;AAAT,SAASA,iBAAiBC,IAAY;IAC3C,OAAOA,KAAKC,OAAO,CAAC,OAAO;AAC7B","ignoreList":[0]}},
|
||||
{"offset": {"line": 3775, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Comparator for sorting app paths so that parallel slot paths (containing\n * `/@`) come before the children/root page path. This ensures the last item\n * is always the children page, which is what `renderPageComponent` reads via\n * `appPaths[appPaths.length - 1]`.\n *\n * Without this, route group prefixes like `(group)` (char code 0x28) sort\n * before `@` (0x40), causing the children page to sort first instead of last\n * and leading to a manifest mismatch / 404 in webpack dev mode.\n */\nexport function compareAppPaths(a: string, b: string): number {\n const aHasSlot = a.includes('/@')\n const bHasSlot = b.includes('/@')\n if (aHasSlot && !bHasSlot) return -1\n if (!aHasSlot && bHasSlot) return 1\n return a.localeCompare(b)\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["compareAppPaths","normalizeAppPath","normalizeRscURL","route","ensureLeadingSlash","split","reduce","pathname","segment","index","segments","isGroupSegment","length","a","b","aHasSlot","includes","bHasSlot","localeCompare","url","replace"],"mappings":";;;;;;;;;;;;;;;IA+DgBA,eAAe,EAAA;eAAfA;;IAzCAC,gBAAgB,EAAA;eAAhBA;;IAqDAC,eAAe,EAAA;eAAfA;;;oCA3EmB;yBACJ;AAqBxB,SAASD,iBAAiBE,KAAa;IAC5C,OAAOC,CAAAA,GAAAA,oBAAAA,kBAAkB,EACvBD,MAAME,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,IAAII,CAAAA,GAAAA,SAAAA,cAAc,EAACH,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAM,KACzCC,UAAUC,SAASE,MAAM,GAAG,GAC5B;YACA,OAAOL;QACT;QAEA,OAAO,GAAGA,SAAS,CAAC,EAAEC,SAAS;IACjC,GAAG;AAEP;AAYO,SAASR,gBAAgBa,CAAS,EAAEC,CAAS;IAClD,MAAMC,WAAWF,EAAEG,QAAQ,CAAC;IAC5B,MAAMC,WAAWH,EAAEE,QAAQ,CAAC;IAC5B,IAAID,YAAY,CAACE,UAAU,OAAO,CAAC;IACnC,IAAI,CAACF,YAAYE,UAAU,OAAO;IAClC,OAAOJ,EAAEK,aAAa,CAACJ;AACzB;AAMO,SAASZ,gBAAgBiB,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0]}},
|
||||
{"offset": {"line": 3837, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/index.ts"],"sourcesContent":["export { getSortedRoutes, getSortedRouteObjects } from './sorted-routes'\nexport { isDynamicRoute } from './is-dynamic'\n"],"names":["getSortedRouteObjects","getSortedRoutes","isDynamicRoute"],"mappings":";;;;;;;;;;;;;;;IAA0BA,qBAAqB,EAAA;eAArBA,cAAAA,qBAAqB;;IAAtCC,eAAe,EAAA;eAAfA,cAAAA,eAAe;;IACfC,cAAc,EAAA;eAAdA,WAAAA,cAAc;;;8BADgC;2BACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 3868, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/interception-routes.ts"],"sourcesContent":["import { normalizeAppPath } from './app-paths'\n\n// order matters here, the first match will be used\nexport const INTERCEPTION_ROUTE_MARKERS = [\n '(..)(..)',\n '(.)',\n '(..)',\n '(...)',\n] as const\n\nexport type InterceptionMarker = (typeof INTERCEPTION_ROUTE_MARKERS)[number]\n\nexport function isInterceptionRouteAppPath(path: string): boolean {\n // TODO-APP: add more serious validation\n return (\n path\n .split('/')\n .find((segment) =>\n INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n ) !== undefined\n )\n}\n\ntype InterceptionRouteInformation = {\n /**\n * The intercepting route. This is the route that is being intercepted or the\n * route that the user was coming from. This is matched by the Next-Url\n * header.\n */\n interceptingRoute: string\n\n /**\n * The intercepted route. This is the route that is being intercepted or the\n * route that the user is going to. This is matched by the request pathname.\n */\n interceptedRoute: string\n}\n\nexport function extractInterceptionRouteInformation(\n path: string\n): InterceptionRouteInformation {\n let interceptingRoute: string | undefined\n let marker: (typeof INTERCEPTION_ROUTE_MARKERS)[number] | undefined\n let interceptedRoute: string | undefined\n\n for (const segment of path.split('/')) {\n marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n if (marker) {\n ;[interceptingRoute, interceptedRoute] = path.split(marker, 2)\n break\n }\n }\n\n if (!interceptingRoute || !marker || !interceptedRoute) {\n throw new Error(\n `Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`\n )\n }\n\n interceptingRoute = normalizeAppPath(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed\n\n switch (marker) {\n case '(.)':\n // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route\n if (interceptingRoute === '/') {\n interceptedRoute = `/${interceptedRoute}`\n } else {\n interceptedRoute = interceptingRoute + '/' + interceptedRoute\n }\n break\n case '(..)':\n // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route\n if (interceptingRoute === '/') {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`\n )\n }\n interceptedRoute = interceptingRoute\n .split('/')\n .slice(0, -1)\n .concat(interceptedRoute)\n .join('/')\n break\n case '(...)':\n // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route\n interceptedRoute = '/' + interceptedRoute\n break\n case '(..)(..)':\n // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route\n\n const splitInterceptingRoute = interceptingRoute.split('/')\n if (splitInterceptingRoute.length <= 2) {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`\n )\n }\n\n interceptedRoute = splitInterceptingRoute\n .slice(0, -2)\n .concat(interceptedRoute)\n .join('/')\n break\n default:\n throw new Error('Invariant: unexpected marker')\n }\n\n return { interceptingRoute, interceptedRoute }\n}\n"],"names":["INTERCEPTION_ROUTE_MARKERS","extractInterceptionRouteInformation","isInterceptionRouteAppPath","path","split","find","segment","m","startsWith","undefined","interceptingRoute","marker","interceptedRoute","Error","normalizeAppPath","slice","concat","join","splitInterceptingRoute","length"],"mappings":";;;;;;;;;;;;;;;IAGaA,0BAA0B,EAAA;eAA1BA;;IAmCGC,mCAAmC,EAAA;eAAnCA;;IA1BAC,0BAA0B,EAAA;eAA1BA;;;0BAZiB;AAG1B,MAAMF,6BAA6B;IACxC;IACA;IACA;IACA;CACD;AAIM,SAASE,2BAA2BC,IAAY;IACrD,wCAAwC;IACxC,OACEA,KACGC,KAAK,CAAC,KACNC,IAAI,CAAC,CAACC,UACLN,2BAA2BK,IAAI,CAAC,CAACE,IAAMD,QAAQE,UAAU,CAACD,SACtDE;AAEZ;AAiBO,SAASR,oCACdE,IAAY;IAEZ,IAAIO;IACJ,IAAIC;IACJ,IAAIC;IAEJ,KAAK,MAAMN,WAAWH,KAAKC,KAAK,CAAC,KAAM;QACrCO,SAASX,2BAA2BK,IAAI,CAAC,CAACE,IAAMD,QAAQE,UAAU,CAACD;QACnE,IAAII,QAAQ;;YACT,CAACD,mBAAmBE,iBAAiB,GAAGT,KAAKC,KAAK,CAACO,QAAQ;YAC5D;QACF;IACF;IAEA,IAAI,CAACD,qBAAqB,CAACC,UAAU,CAACC,kBAAkB;QACtD,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,4BAA4B,EAAEV,KAAK,iFAAiF,CAAC,GADlH,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEAO,oBAAoBI,CAAAA,GAAAA,UAAAA,gBAAgB,EAACJ,mBAAmB,iDAAiD;;IAEzG,OAAQC;QACN,KAAK;YACH,oIAAoI;YACpI,IALine truncated
|
||||
{"offset": {"line": 3977, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/is-dynamic.ts"],"sourcesContent":["import {\n extractInterceptionRouteInformation,\n isInterceptionRouteAppPath,\n} from './interception-routes'\n\n// Identify /.*[param].*/ in route string\nconst TEST_ROUTE = /\\/[^/]*\\[[^/]+\\][^/]*(?=\\/|$)/\n\n// Identify /[param]/ in route string\nconst TEST_STRICT_ROUTE = /\\/\\[[^/]+\\](?=\\/|$)/\n\n/**\n * Check if a route is dynamic.\n *\n * @param route - The route to check.\n * @param strict - Whether to use strict mode which prohibits segments with prefixes/suffixes (default: true).\n * @returns Whether the route is dynamic.\n */\nexport function isDynamicRoute(route: string, strict: boolean = true): boolean {\n if (isInterceptionRouteAppPath(route)) {\n route = extractInterceptionRouteInformation(route).interceptedRoute\n }\n\n if (strict) {\n return TEST_STRICT_ROUTE.test(route)\n }\n\n return TEST_ROUTE.test(route)\n}\n"],"names":["isDynamicRoute","TEST_ROUTE","TEST_STRICT_ROUTE","route","strict","isInterceptionRouteAppPath","extractInterceptionRouteInformation","interceptedRoute","test"],"mappings":";;;+BAkBgBA,kBAAAA;;;eAAAA;;;oCAfT;AAEP,yCAAyC;AACzC,MAAMC,aAAa;AAEnB,qCAAqC;AACrC,MAAMC,oBAAoB;AASnB,SAASF,eAAeG,KAAa,EAAEC,SAAkB,IAAI;IAClE,IAAIC,CAAAA,GAAAA,oBAAAA,0BAA0B,EAACF,QAAQ;QACrCA,QAAQG,CAAAA,GAAAA,oBAAAA,mCAAmC,EAACH,OAAOI,gBAAgB;IACrE;IAEA,IAAIH,QAAQ;QACV,OAAOF,kBAAkBM,IAAI,CAACL;IAChC;IAEA,OAAOF,WAAWO,IAAI,CAACL;AACzB","ignoreList":[0]}},
|
||||
{"offset": {"line": 4004, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/sorted-routes.ts"],"sourcesContent":["class UrlNode {\n placeholder: boolean = true\n children: Map<string, UrlNode> = new Map()\n slugName: string | null = null\n restSlugName: string | null = null\n optionalRestSlugName: string | null = null\n\n insert(urlPath: string): void {\n this._insert(urlPath.split('/').filter(Boolean), [], false)\n }\n\n smoosh(): string[] {\n return this._smoosh()\n }\n\n private _smoosh(prefix: string = '/'): string[] {\n const childrenPaths = [...this.children.keys()].sort()\n if (this.slugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[]'), 1)\n }\n if (this.restSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[...]'), 1)\n }\n if (this.optionalRestSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[[...]]'), 1)\n }\n\n const routes = childrenPaths\n .map((c) => this.children.get(c)!._smoosh(`${prefix}${c}/`))\n .reduce((prev, curr) => [...prev, ...curr], [])\n\n if (this.slugName !== null) {\n routes.push(\n ...this.children.get('[]')!._smoosh(`${prefix}[${this.slugName}]/`)\n )\n }\n\n if (!this.placeholder) {\n const r = prefix === '/' ? '/' : prefix.slice(0, -1)\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot define a route with the same specificity as a optional catch-all route (\"${r}\" and \"${r}[[...${this.optionalRestSlugName}]]\").`\n )\n }\n\n routes.unshift(r)\n }\n\n if (this.restSlugName !== null) {\n routes.push(\n ...this.children\n .get('[...]')!\n ._smoosh(`${prefix}[...${this.restSlugName}]/`)\n )\n }\n\n if (this.optionalRestSlugName !== null) {\n routes.push(\n ...this.children\n .get('[[...]]')!\n ._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`)\n )\n }\n\n return routes\n }\n\n private _insert(\n urlPaths: string[],\n slugNames: string[],\n isCatchAll: boolean\n ): void {\n if (urlPaths.length === 0) {\n this.placeholder = false\n return\n }\n\n if (isCatchAll) {\n throw new Error(`Catch-all must be the last part of the URL.`)\n }\n\n // The next segment in the urlPaths list\n let nextSegment = urlPaths[0]\n\n // Check if the segment matches `[something]`\n if (nextSegment.startsWith('[') && nextSegment.endsWith(']')) {\n // Strip `[` and `]`, leaving only `something`\n let segmentName = nextSegment.slice(1, -1)\n\n let isOptional = false\n if (segmentName.startsWith('[') && segmentName.endsWith(']')) {\n // Strip optional `[` and `]`, leaving only `something`\n segmentName = segmentName.slice(1, -1)\n isOptional = true\n }\n\n if (segmentName.startsWith('…')) {\n throw new Error(\n `Detected a three-dot character ('…') at ('${segmentName}'). Did you mean ('...')?`\n )\n }\n\n if (segmentName.startsWith('...')) {\n // Strip `...`, leaving only `something`\n segmentName = segmentName.substring(3)\n isCatchAll = true\n }\n\n if (segmentName.startsWith('[') || segmentName.endsWith(']')) {\n throw new Error(\n `Segment names may not start or end with extra brackets ('${segmentName}').`\n )\n }\n\n if (segmentName.startsWith('.')) {\n throw new Error(\n `Segment names may not start with erroneous periods ('${segmentName}').`\n )\n }\n\n function handleSlug(previousSlug: string | null, nextSlug: string) {\n if (previousSlug !== null) {\n // If the specific segment already has a slug but the slug is not `something`\n // This prevents collisions like:\n // pages/[post]/index.js\n // pages/[id]/index.js\n // Because currently multiple dynamic params on the same segment level are not supported\n if (previousSlug !== nextSlug) {\n // TODO: This error seems to be confusing for users, needs an error link, the description can be based on above comment.\n throw new Error(\n `You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`\n )\n }\n }\n\n slugNames.forEach((slug) => {\n if (slug === nextSlug) {\n throw new Error(\n `You cannot have the same slug name \"${nextSlug}\" repeat within a single dynamic path`\n )\n }\n\n if (slug.replace(/\\W/g, '') === nextSegment.replace(/\\W/g, '')) {\n throw new Error(\n `You cannot have the slug names \"${slug}\" and \"${nextSlug}\" differ only by non-word symbols within a single dLine truncated
|
||||
{"offset": {"line": 4249, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/segment.ts"],"sourcesContent":["import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record<string, string | string[] | undefined>\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport function computeSelectedLayoutSegment(\n segments: string[] | null,\n parallelRouteKey: string\n): string | null {\n if (!segments || segments.length === 0) {\n return null\n }\n\n // For 'children', use first segment; for other parallel routes, use last segment\n const rawSegment =\n parallelRouteKey === 'children'\n ? segments[0]\n : segments[segments.length - 1]\n\n // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n // Returning an internal value like `__DEFAULT__` would be confusing\n return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n tree: FlightRouterState,\n parallelRouteKey: string,\n first = true,\n segmentPath: string[] = []\n): string[] {\n let node: FlightRouterState\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey]\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1]\n node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n }\n\n if (!node) return segmentPath\n const segment = node[0]\n\n let segmentValue = getSegmentValue(segment)\n\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath\n }\n\n segmentPath.push(segmentValue)\n\n return getSelectedLayoutSegmentPath(\n node,\n parallelRouteKey,\n false,\n segmentPath\n )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n"],"names":["DEFAULT_SEGMENT_KEY","NOT_FOUND_SEGMENT_KEY","PAGE_SEGMENT_KEY","addSearchParamsIfPageSegment","computeSelectedLayoutSegment","getSegmentValue","getSelectedLayoutSegmentPath","isGroupSegment","isParallelRouteSegment","segment","Array","isArray","endsWith","startsWith","searchParams","isPageSegment","includes","stringifiedQuery","JSON","stringify","segments","parallelRouteKey","length","rawSegment","tree","first","segmentPath","node","parallelRoutes","children","Object","values","segmentValue","push"],"mappings":";;;;;;;;;;;;;;;;;;;;;IAuFaA,mBAAmB,EAAA;eAAnBA;;IACAC,qBAAqB,EAAA;eAArBA;;IAFAC,gBAAgB,EAAA;eAAhBA;;IAvEGC,4BAA4B,EAAA;eAA5BA;;IAgBAC,4BAA4B,EAAA;eAA5BA;;IA7BAC,eAAe,EAAA;eAAfA;;IAiDAC,4BAA4B,EAAA;eAA5BA;;IA7CAC,cAAc,EAAA;eAAdA;;IAKAC,sBAAsB,EAAA;eAAtBA;;;AATT,SAASH,gBAAgBI,OAAgB;IAC9C,OAAOC,MAAMC,OAAO,CAACF,WAAWA,OAAO,CAAC,EAAE,GAAGA;AAC/C;AAEO,SAASF,eAAeE,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQG,QAAQ,CAAC;AAChD;AAEO,SAASJ,uBAAuBC,OAAe;IACpD,OAAOA,QAAQI,UAAU,CAAC,QAAQJ,YAAY;AAChD;AAEO,SAASN,6BACdM,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACd;IAEvC,IAAIa,eAAe;QACjB,MAAME,mBAAmBC,KAAKC,SAAS,CAACL;QACxC,OAAOG,qBAAqB,OACxBf,mBAAmB,MAAMe,mBACzBf;IACN;IAEA,OAAOO;AACT;AAEO,SAASL,6BACdgB,QAAyB,EACzBC,gBAAwB;IAExB,IAAI,CAACD,YAAYA,SAASE,MAAM,KAAK,GAAG;QACtC,OAAO;IACT;IAEA,iFAAiF;IACjF,MAAMC,aACJF,qBAAqB,aACjBD,QAAQ,CAAC,EAAE,GACXA,QAAQ,CAACA,SAASE,MAAM,GAAG,EAAE;IAEnC,sGAAsG;IACtG,oEAAoE;IACpE,OAAOC,eAAevB,sBAAsB,OAAOuB;AACrD;AAGO,SAASjB,6BACdkB,IAAuB,EACvBH,gBAAwB,EACxBI,QAAQ,IAAI,EACZC,cAAwB,EAAE;IAE1B,IAAIC;IACJ,IAAIF,OAAO;QACT,kEAAkE;QAClEE,OAAOH,IAAI,CAAC,EAAE,CAACH,iBAAiB;IAClC,OAAO;QACL,oGAAoG;QACpG,MAAMO,iBAAiBJ,IAAI,CAAC,EAAE;QAC9BG,OAAOC,eAAeC,QAAQ,IAAIC,OAAOC,MAAM,CAACH,eAAe,CAAC,EAAE;IACpE;IAEA,IAAI,CAACD,MAAM,OAAOD;IAClB,MAAMjB,UAAUkB,IAAI,CAAC,EAAE;IAEvB,IAAIK,eAAe3B,gBAAgBI;IAEnC,IAAI,CAACuB,gBAAgBA,aAAanB,UAAU,CAACX,mBAAmB;QAC9D,OAAOwB;IACT;IAEAA,YAAYO,IAAI,CAACD;IAEjB,OAAO1B,6BACLqB,MACAN,kBACA,OACAK;AAEJ;AAEO,MAAMxB,mBAAmB;AACzB,MAAMF,sBAAsB;AAC5B,MAAMC,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 4352, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/utils.ts"],"sourcesContent":["import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n Context extends BaseContext = NextPageContext,\n InitialProps = {},\n Props = {},\n> = ComponentType<Props> & {\n /**\n * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n * @param context Context of `page`\n */\n getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n DocumentContext,\n DocumentInitialProps,\n DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n AppContextType,\n P,\n AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n id: string\n startTime: number\n value: number\n attribution?: { [key: string]: unknown }\n} & (\n | {\n label: 'web-vital'\n name: (typeof WEB_VITALS)[number]\n }\n | {\n label: 'custom'\n name:\n | 'Next.js-hydration'\n | 'Next.js-route-change-to-render'\n | 'Next.js-render'\n }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n | {\n enhanceApp?: Enhancer<AppType>\n enhanceComponent?: Enhancer<NextComponentType>\n }\n | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n html: string\n head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n res?: ServerResponse\n [k: string]: any\n}\n\nexport type NEXT_DATA = {\n props: Record<string, any>\n page: string\n query: ParsedUrlQuery\n buildId: string\n assetPrefix?: string\n nextExport?: boolean\n autoExport?: boolean\n isFallback?: boolean\n isExperimentalCompile?: boolean\n dynamicIds?: (string | number)[]\n err?: Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n __NEXT_ERROR_CODE?: string\n }\n gsp?: boolean\n gssp?: boolean\n customServer?: boolean\n gip?: boolean\n appGip?: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n scriptLoader?: any[]\n isPreview?: boolean\n notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n /**\n * Error object if encountered during rendering\n */\n err?: (Error & { statusCode?: number }) | null\n /**\n * `HTTP` request object.\n */\n req?: IncomingMessage\n /**\n * `HTTP` response object.\n */\n res?: ServerResponse\n /**\n * Path section of `URL`.\n */\n pathname: string\n /**\n * Query string section of `URL` parsed as an object.\n */\n query: ParsedUrlQuery\n /**\n * `String` of the actual path including query.\n */\n asPath?: string\n /**\n * The currently active locale\n */\n locale?: string\n /**\n * All configured locales\n */\n locales?: readonly string[]\n /**\n * The configured default locale\n */\n defaultLocale?: string\n /**\n * `Component` the tree of the App to use if needing to render separately\n */\n AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n Component: NextComponentType<NextPageContext>\n AppTree: AppTreeType\n ctx: NextPageContext\n router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n pageProps: PageProps\n}\n\nexport type AppPropsType<\n Router extends NextRouter = NextRouter,\n PageProps = {},\n> = AppInitialProps<PageProps> & {\n Component: NextComponentType<NextPageContext, any, any>\n router: Router\n __N_SSG?: boolean\n __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n renderPage: RenderPage\n defaultGetInitialProps(\n ctx: DocumentContext,\n options?: { nonce?: string }\n ): Promise<DocumentInitialProps>\n}\n\nexport typLine truncated
|
||||
{"offset": {"line": 4568, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/document.js"],"sourcesContent":["module.exports = require('./dist/pages/_document')\n"],"names":["module","exports"],"mappings":"AAAAA,OAAOC,OAAO","ignoreList":[0]}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DynamicServerError","isDynamicServerError","DYNAMIC_ERROR_CODE","Error","constructor","description","digest","err"],"mappings":";;;;;;;;;;;;;;IAEaA,kBAAkB,EAAA;eAAlBA;;IAQGC,oBAAoB,EAAA;eAApBA;;;AAVhB,MAAMC,qBAAqB;AAEpB,MAAMF,2BAA2BG;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAC,CAAC,sBAAsB,EAAEA,aAAa,GAAA,IAAA,CADlBA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCJ;IAIpC;AACF;AAEO,SAASD,qBAAqBM,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAE,KAChB,OAAOA,IAAID,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOC,IAAID,MAAM,KAAKJ;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 48, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["StaticGenBailoutError","isStaticGenBailoutError","NEXT_STATIC_GEN_BAILOUT","Error","code","error"],"mappings":";;;;;;;;;;;;;;IAEaA,qBAAqB,EAAA;eAArBA;;IAIGC,uBAAuB,EAAA;eAAvBA;;;AANhB,MAAMC,0BAA0B;AAEzB,MAAMF,8BAA8BG;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOF;;AACzB;AAEO,SAASD,wBACdI,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAI,GAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMD,IAAI,KAAKF;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 92, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/templates/app-page-runtime.ts"],"sourcesContent":["import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport type { FallbackRouteParam } from '../static-paths/types'\n\nimport {\n AppPageRouteModule,\n type AppPageRouteHandlerContext,\n} from '../../server/route-modules/app-page/module.compiled' with { 'turbopack-transition': 'next-ssr' }\n\nimport { RouteKind } from '../../server/route-kind' with { 'turbopack-transition': 'next-server-utility' }\n\nimport { getRevalidateReason } from '../../server/instrumentation/utils' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n getTracer,\n SpanKind,\n SpanStatusCode,\n type Span,\n} from '../../server/lib/trace/tracer' with { 'turbopack-transition': 'next-server-utility' }\nimport type { RequestMeta } from '../../server/request-meta'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n} from '../../server/request-meta' with { 'turbopack-transition': 'next-server-utility' }\nimport { BaseServerSpan } from '../../server/lib/trace/constants' with { 'turbopack-transition': 'next-server-utility' }\nimport { stripFlightHeaders } from '../../server/app-render/strip-flight-headers' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n NodeNextRequest,\n NodeNextResponse,\n} from '../../server/base-http/node' with { 'turbopack-transition': 'next-server-utility' }\nimport { checkIsAppPPREnabled } from '../../server/lib/experimental/ppr' with { 'turbopack-transition': 'next-server-utility' }\nimport { isRSCRequestHeader } from '../../server/lib/is-rsc-request' with { 'turbopack-transition': 'next-server-utility' }\nimport { isNonHtmlSecFetchDest } from '../../server/lib/is-non-html-sec-fetch-dest' with { 'turbopack-transition': 'next-server-utility' }\nimport { UNDERSCORE_NOT_FOUND_ROUTE } from '../../shared/lib/entry-constants' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n getFallbackRouteParams,\n getPlaceholderFallbackRouteParams,\n buildDynamicSegmentPlaceholder,\n createOpaqueFallbackRouteParams,\n type OpaqueFallbackRouteParams,\n} from '../../server/request/fallback-params' with { 'turbopack-transition': 'next-server-utility' }\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton' with { 'turbopack-transition': 'next-server-utility' }\nimport { shouldServeStreamingMetadata } from '../../server/lib/streaming-metadata' with { 'turbopack-transition': 'next-server-utility' }\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths' with { 'turbopack-transition': 'next-server-utility' }\nimport { getIsPossibleServerAction } from '../../server/lib/server-action-request-meta' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n RSC_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_INSTANT_TEST_COOKIE,\n NEXT_IS_PRERENDER_HEADER,\n NEXT_DID_POSTPONE_HEADER,\n RSC_CONTENT_TYPE_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n} from '../../client/components/app-router-headers' with { 'turbopack-transition': 'next-server-utility' }\nimport { getBotType } from '../../shared/lib/router/utils/is-bot' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n CachedRouteKind,\n IncrementalCacheKind,\n type CachedAppPageValue,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n FallbackMode,\n parseFallbackField,\n} from '../../lib/fallback' with { 'turbopack-transition': 'next-server-utility' }\nimport RenderResult from '../../server/render-result' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n CACHE_ONE_YEAR_SECONDS,\n HTML_CONTENT_TYPE_HEADER,\n NEXT_CACHE_TAGS_HEADER,\n NEXT_NAV_DEPLOYMENT_ID_HEADER,\n NEXT_RESUME_HEADER,\n NEXT_RESUME_STATE_LENGTH_HEADER,\n} from '../../lib/constants' with { 'turbopack-transition': 'next-server-utility' }\nimport type { CacheControl } from '../../server/lib/cache-control'\nimport { ENCODED_TAGS } from '../../server/stream-utils/encoded-tags' with { 'turbopack-transition': 'next-server-utility' }\nimport { sendRenderResult } from '../../server/send-payload' with { 'turbopack-transition': 'next-server-utility' }\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external' with { 'turbopack-transition': 'next-server-utility' }\nimport { parseMaxPostponedStateSize } from '../../shared/lib/size-limit' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n getMaxPostponedStateSize,\n getPostponedStateExceededErrorMessage,\n readBodyWithSizeLimit,\n} from '../../server/lib/postponed-request-body' with { 'turbopack-transition': 'next-server-utility' }\nimport { parseUrl } from '../../lib/Line truncated
|
||||
{"offset": {"line": 1664, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/templates/app-page.ts"],"sourcesContent":["import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport { createAppPageEntrypoint } from './app-page-runtime'\nimport { interopDefault } from '../../server/app-render/interop-default' with { 'turbopack-transition': 'next-server-utility' }\n\n// Keep this route-specific template small. Turbopack gives every route a\n// distinct module identity, while app-page-runtime is shared across routes.\n// The injected loader tree references interopDefault when loading metadata, so\n// that binding must remain in this module.\n\n/**\n * The tree created in next-app-loader that holds component segments and modules.\n */\ndeclare const tree: LoaderTree\n\ndeclare const __next_app_require__: (id: string | number) => unknown\ndeclare const __next_app_load_chunk__: (id: string | number) => Promise<unknown>\n\n// INJECT:tree\n// INJECT:__next_app_require__\n// INJECT:__next_app_load_chunk__\n\nconst entrypoint = createAppPageEntrypoint({\n tree,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n require: __next_app_require__,\n loadChunk: __next_app_load_chunk__,\n interopDefault,\n})\n\nexport const __next_app__ = entrypoint.__next_app__\nexport const routeModule = entrypoint.routeModule\nexport const handler = entrypoint.handler\n\nexport * from '../../server/app-render/entry-base' with { 'turbopack-transition': 'next-server-utility' }\n"],"names":["createAppPageEntrypoint","interopDefault","entrypoint","tree","page","pathname","require","__next_app_require__","loadChunk","__next_app_load_chunk__","__next_app__","routeModule","handler"],"mappings":";;;;;;;;AACA,SAASA,uBAAuB,QAAQ,qBAAoB;AAoB5D,MAAME,aAAaF,wBAAwB;IACzCG;;;AApBF,MAAA,GAASF,cAAc,QAAQ,MAAA,IAAA,wOAAA,EAAA,kBAA+C;IAAE,EAAA,sBAAwB,eAAA,IAAA,wOAAA,EAAA;AAAsB,EAAC,IAAA,kCAAA,IAAA,wOAAA,EAAA;AAe/H,MAAA,QAAc,6BAAA,IAAA,wOAAA,EAAA;AACd,MAAA,wBAA8B,gBAAA,IAAA,wOAAA,EAAA;AAC9B,MAAA,2BAAiC,EAAA,IAAA,wOAAA,EAAA;;;IAM/BK,EAAAA,OAASC;IAAAA;IAAAA;YACTC,QAAAA;YAAAA,EAAWC;YAAAA;aACXR;gBACF,UAAA,CAAA;gBAAA,QAAA;oBAAA;oBAAA;iBAAA;YAEA;YAAA,EAAA;SAAA,CAAO,MAAMS,eAAeR,WAAWQ,YAAY,CAAA;IACnD;IAAA,IAAO,MAAMC,cAAcT,WAAWS,WAAW,CAAA;QACjD,KAAO,KAAA;YAAMC,UAAUV,WAAWU,OAAO,CAAA;YAAA;SAAA;QAEzC,YAAc,CAAA;YAAA;YAAA,IAA0C;SAAA;UAAE,WAAA;YAAA,YAAwB;YAAA;SAAA;QAAuB,gBAAA;YAAA;YAAA;SAAA","ignoreList":[0]}},
|
||||
{"offset": {"line": 1850, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/module.compiled.js"],"sourcesContent":["if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n"],"names":["process","env","NEXT_RUNTIME","module","exports","require","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK"],"mappings":"AAAA,IAAIA,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;KAElC;IACL,IAAIF,QAAQC,GAAG,CAACK,yBAAyB,EAAE;;SAcpC;QACL,IAAIN,QAAQC,GAAG,CAACM,QAAQ,KAAK,WAAe;YAC1C,IAAIP,QAAQC,GAAG,CAACO,SAAS,eAAE;gBACzBL,OAAOC,OAAO,GAAGC,QAAQ;YAC3B,OAAO;;QAGT,OAAO;;IAOT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 1905, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/framework/boundary-constants.tsx"],"sourcesContent":["export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'\n"],"names":["METADATA_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME"],"mappings":";;;;;;;;;;;;;;;;IAAaA,sBAAsB,EAAA;eAAtBA;;IAEAC,oBAAoB,EAAA;eAApBA;;IACAC,yBAAyB,EAAA;eAAzBA;;IAFAC,sBAAsB,EAAA;eAAtBA;;;AADN,MAAMH,yBAAyB;AAC/B,MAAMG,yBAAyB;AAC/B,MAAMF,uBAAuB;AAC7B,MAAMC,4BAA4B","ignoreList":[0]}},
|
||||
{"offset": {"line": 1942, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/scheduler.ts"],"sourcesContent":["export type ScheduledFn<T = void> = () => T | PromiseLike<T>\nexport type SchedulerFn<T = void> = (cb: ScheduledFn<T>) => void\n\n/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */\nexport const scheduleOnNextTick = (cb: ScheduledFn<void>) => {\n // We use Promise.resolve().then() here so that the operation is scheduled at\n // the end of the promise job queue, we then add it to the next process tick\n // to ensure it's evaluated afterwards.\n //\n // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n //\n Promise.resolve().then(() => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n process.nextTick(cb)\n }\n })\n}\n\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */\nexport const scheduleImmediate = (cb: ScheduledFn<void>): void => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n setImmediate(cb)\n }\n}\n\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */\nexport function atLeastOneTask() {\n return new Promise<void>((resolve) => scheduleImmediate(resolve))\n}\n\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */\nexport function waitAtLeastOneReactRenderTask(): Promise<void> {\n if (process.env.NEXT_RUNTIME === 'edge') {\n return new Promise((r) => setTimeout(r, 0))\n } else {\n return new Promise((r) => setImmediate(r))\n }\n}\n"],"names":["atLeastOneTask","scheduleImmediate","scheduleOnNextTick","waitAtLeastOneReactRenderTask","cb","Promise","resolve","then","process","env","NEXT_RUNTIME","setTimeout","nextTick","setImmediate","r"],"mappings":";;;;;;;;;;;;;;;;IA4CgBA,cAAc,EAAA;eAAdA;;IAbHC,iBAAiB,EAAA;eAAjBA;;IAtBAC,kBAAkB,EAAA;eAAlBA;;IAgDGC,6BAA6B,EAAA;eAA7BA;;;AAhDT,MAAMD,qBAAqB,CAACE;IACjC,6EAA6E;IAC7E,4EAA4E;IAC5E,uCAAuC;IACvC,EAAE;IACF,kLAAkL;IAClL,EAAE;IACFC,QAAQC,OAAO,GAAGC,IAAI,CAAC;QACrB,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;aAElC;YACLF,QAAQI,QAAQ,CAACR;QACnB;IACF;AACF;AAQO,MAAMH,oBAAoB,CAACG;IAChC,IAAII,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACLG,aAAaT;IACf;AACF;AAOO,SAASJ;IACd,OAAO,IAAIK,QAAc,CAACC,UAAYL,kBAAkBK;AAC1D;AAWO,SAASH;IACd,IAAIK,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACL,OAAO,IAAIL,QAAQ,CAACS,IAAMD,aAAaC;IACzC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 2007, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/blocking-route-messages.ts"],"sourcesContent":["export function createRuntimeBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered runtime data during prerendering.\\n\\n` +\n `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n )\n}\n\nexport function createDynamicBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached data during prerendering.\\n\\n` +\n `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n )\n}\n\nexport function createRuntimeBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered runtime data during prerendering or a navigation.\\n\\n` +\n `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n )\n}\n\nexport function createLinkBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered URL data during prerendering or a navigation.\\n\\n` +\n `\\`params\\` or \\`searchParams\\` accessed outside of \\`<Suspense>\\` may prevent the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/instant-shell-url-data`\n )\n}\n\nexport function createDynamicBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached data during prerendering or a navigation.\\n\\n` +\n `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n )\n}\n\n/**\n * NOTE: Prefer `createRuntimeBodyError` or `createDynamicBodyError`.\n * Only use this in situations like build-time static validation, where\n * we can't pinpoint a more specific reason.\n */\nexport function createDynamicOrRuntimeBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached or runtime data during prerendering.\\n\\n` +\n `\\`fetch(...)\\`, \\`cookies()\\`, \\`headers()\\`, \\`params\\`, \\`searchParams\\`, or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] For uncached data (\\`fetch\\`, database calls): cache the access with \\`\"use cache\"\\` (does not apply to \\`connecLine truncated
|
||||
{"offset": {"line": 2188, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n ValidationStoreClient,\n PrerenderStoreModernServer,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getStagedRenderingController,\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n ClientHookDynamicError,\n isClientHookDynamicError,\n makeClientHookHangingPromise,\n trackRuntimeDataAccessed,\n} from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport {\n createRuntimeBodyError,\n createDynamicBodyError,\n createRuntimeBodyErrorInNavigation,\n createDynamicBodyErrorInNavigation,\n createDynamicOrRuntimeBodyError,\n createRuntimeMetadataError,\n createDynamicMetadataError,\n createRuntimeViewportError,\n createDynamicViewportError,\n createDynamicOrRuntimeViewportError,\n createDynamicOrRuntimeMetadataError,\n logBuildDebugHint,\n createLinkBodyErrorInNavigation,\n createLinkMetadataError,\n createLinkViewportError,\n} from './blocking-route-messages'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n INSTANT_VALIDATION_BOUNDARY_NAME,\n INSTANT_SLOT_MARKER_PREFIX,\n INSTANT_SLOT_MARKER_SUFFIX,\n} from './instant-validation/boundary-constants'\nimport {\n type ValidationBoundaryTracking,\n allRequiredBoundariesRendered,\n} from './instant-validation/boundary-tracking'\nimport type { InstantValidationSampleTracking } from './instant-validation/instant-samples'\nimport { createUnrenderedSegmentError } from '../../shared/lib/instant-messages'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array<DynamicAccess>\n\n syncDynamicErrorWithStack: null | Error\n syncDynamicErrorWithStackPostMicrotask: boolean\n}\n\n// Stores dynamic reasons used during an SSR render.\nexportLine truncated
|
||||
{"offset": {"line": 3390, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/boundary-constants.ts"],"sourcesContent":["export const INSTANT_VALIDATION_BOUNDARY_NAME =\n '__next_instant_validation_boundary__'\n\nexport const INSTANT_SLOT_MARKER_PREFIX = '__next_instant_slot_'\nexport const INSTANT_SLOT_MARKER_SUFFIX = '__'\n"],"names":["INSTANT_SLOT_MARKER_PREFIX","INSTANT_SLOT_MARKER_SUFFIX","INSTANT_VALIDATION_BOUNDARY_NAME"],"mappings":";;;;;;;;;;;;;;;IAGaA,0BAA0B,EAAA;eAA1BA;;IACAC,0BAA0B,EAAA;eAA1BA;;IAJAC,gCAAgC,EAAA;eAAhCA;;;AAAN,MAAMA,mCACX;AAEK,MAAMF,6BAA6B;AACnC,MAAMC,6BAA6B","ignoreList":[0]}},
|
||||
{"offset": {"line": 3422, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/boundary-tracking.tsx"],"sourcesContent":["export type ValidationBoundaryTracking = {\n /**\n * Map from boundary id (the SegmentPath where a validation boundary is\n * placed) to the file paths of modules inside that boundary's subtree.\n * When the boundary spans multiple parallel slots, each slot contributes\n * its own first-found module path so all unrendered segments can be\n * reported together.\n */\n requiredIds: Map<string, string[]>\n renderedIds: Set<string>\n}\n\nexport function createValidationBoundaryTracking(): ValidationBoundaryTracking {\n return {\n requiredIds: new Map(),\n renderedIds: new Set(),\n }\n}\n\nexport function allRequiredBoundariesRendered(\n state: ValidationBoundaryTracking\n): boolean {\n for (const id of state.requiredIds.keys()) {\n if (!state.renderedIds.has(id)) {\n return false\n }\n }\n return true\n}\n"],"names":["allRequiredBoundariesRendered","createValidationBoundaryTracking","requiredIds","Map","renderedIds","Set","state","id","keys","has"],"mappings":";;;;;;;;;;;;;;IAmBgBA,6BAA6B,EAAA;eAA7BA;;IAPAC,gCAAgC,EAAA;eAAhCA;;;AAAT,SAASA;IACd,OAAO;QACLC,aAAa,IAAIC;QACjBC,aAAa,IAAIC;IACnB;AACF;AAEO,SAASL,8BACdM,KAAiC;IAEjC,KAAK,MAAMC,MAAMD,MAAMJ,WAAW,CAACM,IAAI,GAAI;QACzC,IAAI,CAACF,MAAMF,WAAW,CAACK,GAAG,CAACF,KAAK;YAC9B,OAAO;QACT;IACF;IACA,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 3461, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/module-loading/instrument-module-getter.ts"],"sourcesContent":["/**\n * Wraps a module getter from the generated loader tree code so that the\n * result of an async module (e.g. due to a top-level await) is tracked as a\n * pending import, which the cache warming phase of a prerender waits for.\n * Both bundlers emit this around every module getter in the loader tree.\n */\nexport function instrumentModuleGetter<TModule>(\n getter: () => TModule\n): () => TModule {\n if (\n process.env.NEXT_RUNTIME === 'edge' ||\n !process.env.__NEXT_CACHE_COMPONENTS\n ) {\n // The tracking is only consumed when prerendering with Cache Components,\n // which is not supported in the edge runtime (and the tracking relies on\n // Node.js APIs).\n return getter\n } else {\n return () => {\n const { trackPendingImport } =\n require('./track-module-loading.external') as typeof import('./track-module-loading.external')\n\n const exportsOrPromise = getter()\n trackPendingImport(exportsOrPromise)\n return exportsOrPromise\n }\n }\n}\n"],"names":["instrumentModuleGetter","getter","process","env","NEXT_RUNTIME","__NEXT_CACHE_COMPONENTS","trackPendingImport","require","exportsOrPromise"],"mappings":"AAAA;;;;;CAKC;;;+BACeA,0BAAAA;;;eAAAA;;;AAAT,SAASA,uBACdC,MAAqB;IAErB,IACEC,QAAQC,GAAG,CAACC,YAAY,KAAK,OAE7B,GADA,CAACF,QAAQC,GAAG,CAACE,uBAAuB;QAEpC,yEAAyE;QACzE,yEAAyE;QACzE,iBAAiB;QACjB,OAAOJ;IACT,OAAO;;AAUT","ignoreList":[0]}},
|
||||
{"offset": {"line": 3488, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/staged-rendering.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers'\n\nexport enum RenderStage {\n Before = 1,\n //\n ShellStatic = 11,\n Static = 13,\n //\n ShellRuntime = 21,\n Runtime = 23,\n //\n Dynamic = 30,\n //\n Abandoned = 40,\n}\n\nexport type AdvanceableRenderStage = Exclude<\n RenderStage,\n RenderStage.Before | RenderStage.Abandoned\n>\n\nexport const RENDER_STAGE_ADVANCE_ORDER: AdvanceableRenderStage[] = [\n RenderStage.ShellStatic,\n RenderStage.Static,\n //\n RenderStage.ShellRuntime,\n RenderStage.Runtime,\n //\n RenderStage.Dynamic,\n]\n\nexport function getNextStage(\n stage: Exclude<AdvanceableRenderStage, RenderStage.Dynamic>\n) {\n return RENDER_STAGE_ADVANCE_ORDER[\n RENDER_STAGE_ADVANCE_ORDER.indexOf(stage) + 1\n ]\n}\n\nexport function isAdvanceableRenderStage(\n stage: RenderStage\n): stage is AdvanceableRenderStage {\n return RenderStage.Before < stage && stage <= RenderStage.Dynamic\n}\n\nexport enum SyncIOMode {\n /** Sync IO does not error in any stage. */\n Untracked = 1,\n /** Before `partialPrefetching`: Sync IO errors in static stages, and is allowed otherwise. */\n AllowedInRuntimeOrDynamic = 2,\n /** After `partialPrefetching`: Sync IO errors in all stages other than dynamic. */\n AllowedInDynamic = 3,\n}\n\nexport class StagedRenderingController {\n private abortSignal: AbortSignal | null\n private abandonController: AbortController | null\n private syncIOMode: SyncIOMode\n public readonly finalStage: AdvanceableRenderStage | null\n\n currentStage: RenderStage = RenderStage.Before\n\n syncInterruptReason: Error | null = null\n\n triggers: Record<AdvanceableRenderStage, StageTrigger> = {\n [RenderStage.ShellStatic]: createStageTrigger(),\n [RenderStage.Static]: createStageTrigger(),\n //\n [RenderStage.ShellRuntime]: createStageTrigger(),\n [RenderStage.Runtime]: createStageTrigger(),\n //\n [RenderStage.Dynamic]: createStageTrigger(),\n }\n\n constructor({\n abortSignal,\n abandonController,\n syncIO,\n finalStage,\n }: {\n abortSignal: AbortSignal | null\n abandonController: AbortController | null\n syncIO: SyncIOMode\n finalStage: AdvanceableRenderStage | null\n }) {\n this.abortSignal = abortSignal\n this.abandonController = abandonController\n this.syncIOMode = syncIO\n this.finalStage = finalStage\n\n if (abortSignal) {\n abortSignal.addEventListener(\n 'abort',\n () => {\n // Reject all stage promises that haven't already been resolved.\n // `cancelStageTrigger` is a noop if the trigger already resolved.\n const { reason } = abortSignal\n for (const trigger of Object.values(this.triggers)) {\n cancelStageTrigger(trigger, reason)\n }\n },\n { once: true }\n )\n }\n\n if (abandonController) {\n abandonController.signal.addEventListener(\n 'abort',\n () => {\n this.abandonRender()\n },\n { once: true }\n )\n }\n }\n\n onStage(stage: AdvanceableRenderStage, callback: () => void) {\n addSyncTriggerListener(this.triggers[stage], callback)\n }\n\n shouldTrackSyncInterrupt(): boolean {\n if (this.syncIOMode === SyncIOMode.Untracked) {\n return false\n }\n\n switch (this.currentStage) {\n case RenderStage.Before:\n // If we haven't started the render yet, it can't be interrupted.\n return false\n case RenderStage.ShellStatic:\n case RenderStage.Static:\n return true\n case RenderStage.ShellRuntime:\n case RenderStage.Runtime: {\n switch (this.syncIOMode) {\n case SyncIOMode.AllowedInRuntimeOrDynamic: {\n // Before `partialPrefetching`: Sync IO only errors in static stages.\n return false\n }\n case SyncIOMode.AllowedInDynamic: {\n return true\n }\n }\n // NOT a fallthrough, but eslint doesn't understand that\n }\n case RenderStage.Dynamic:\n case RenderStage.Abandoned:\n return false\n default:\n this.currentStage satisfies never\n return false\n }\n }\n\n /** Note: only call this if `shouldTrackSyncInterrupt()` returned true */\n syncInterruptCurrentStageWithReason(reason: Error) {\n const { currentStage } = this\n if (\n currentStage === RenderStage.Before ||\n currentStage === RenderStage.Dynamic ||\n currentStage === RenderStage.Abandoned\n ) {\n // Not interruptible. Defensive noop.\n return\n }\n\n // If Sync IO occurs during an abandonable render, we trigger the abandon.\n // The abandon listener wiLine truncated
|
||||
{"offset": {"line": 3813, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/create-deduped-by-callsite-server-error-logger.ts"],"sourcesContent":["import * as React from 'react'\n\nconst errorRef: { current: null | Error } = { current: null }\n\n// React.cache is currently only available in canary/experimental React channels.\nconst cache =\n typeof React.cache === 'function'\n ? React.cache\n : (fn: (key: unknown) => void) => fn\n\n// When Cache Components is enabled, we record these as errors so that they\n// are captured by the dev overlay as it's more critical to fix these\n// when enabled.\nconst logErrorOrWarn = process.env.__NEXT_CACHE_COMPONENTS\n ? console.error\n : console.warn\n\n// We don't want to dedupe across requests.\n// The developer might've just attempted to fix the warning so we should warn again if it still happens.\nconst flushCurrentErrorIfNew = cache(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- cache key\n (key: unknown) => {\n try {\n logErrorOrWarn(errorRef.current)\n } finally {\n errorRef.current = null\n }\n }\n)\n\n/**\n * Creates a function that logs an error message that is deduped by the userland\n * callsite.\n * This requires no indirection between the call of this function and the userland\n * callsite i.e. there's only a single library frame above this.\n * Do not use on the Client where sourcemaps and ignore listing might be enabled.\n * Only use that for warnings need a fix independent of the callstack.\n *\n * @param getMessage\n * @returns\n */\nexport function createDedupedByCallsiteServerErrorLoggerDev<Args extends any[]>(\n getMessage: (...args: Args) => Error\n) {\n return function logDedupedError(...args: Args) {\n const message = getMessage(...args)\n\n if (process.env.NODE_ENV !== 'production') {\n const callStackFrames = new Error().stack?.split('\\n')\n if (callStackFrames === undefined || callStackFrames.length < 4) {\n logErrorOrWarn(message)\n } else {\n // Error:\n // logDedupedError\n // asyncApiBeingAccessedSynchronously\n // <userland callsite>\n // TODO: This breaks if sourcemaps with ignore lists are enabled.\n const key = callStackFrames[4]\n errorRef.current = message\n flushCurrentErrorIfNew(key)\n }\n } else {\n logErrorOrWarn(message)\n }\n }\n}\n"],"names":["createDedupedByCallsiteServerErrorLoggerDev","errorRef","current","cache","React","fn","logErrorOrWarn","process","env","__NEXT_CACHE_COMPONENTS","console","error","warn","flushCurrentErrorIfNew","key","getMessage","logDedupedError","args","message","NODE_ENV","callStackFrames","Error","stack","split","undefined","length"],"mappings":";;;+BAyCgBA,+CAAAA;;;eAAAA;;;+DAzCO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvB,MAAMC,WAAsC;IAAEC,SAAS;AAAK;AAE5D,iFAAiF;AACjF,MAAMC,QACJ,OAAOC,OAAMD,KAAK,KAAK,aACnBC,OAAMD,KAAK,GACX,CAACE,KAA+BA;AAEtC,2EAA2E;AAC3E,qEAAqE;AACrE,gBAAgB;AAChB,MAAMC,iBAAiBC,QAAQC,GAAG,CAACC,uBAAuB,GACtDC,QAAQC,KAAK,aACbD,QAAQE,IAAI;AAEhB,2CAA2C;AAC3C,wGAAwG;AACxG,MAAMC,yBAAyBV,MAC7B,AACA,CAACW,yEADyE;IAExE,IAAI;QACFR,eAAeL,SAASC,OAAO;IACjC,SAAU;QACRD,SAASC,OAAO,GAAG;IACrB;AACF;AAcK,SAASF,4CACde,UAAoC;IAEpC,OAAO,SAASC,gBAAgB,GAAGC,IAAU;QAC3C,MAAMC,UAAUH,cAAcE;QAE9B,IAAIV,QAAQC,GAAG,CAACW,QAAQ,KAAK,WAAc;gBACjB;YAAxB,MAAMC,kBAAAA,CAAkB,SAAA,IAAIC,QAAQC,KAAK,KAAA,OAAA,KAAA,IAAjB,OAAmBC,KAAK,CAAC;YACjD,IAAIH,oBAAoBI,aAAaJ,gBAAgBK,MAAM,GAAG,GAAG;gBAC/DnB,eAAeY;YACjB,OAAO;gBACL,SAAS;gBACT,oBAAoB;gBACpB,uCAAuC;gBACvC,wBAAwB;gBACxB,iEAAiE;gBACjE,MAAMJ,MAAMM,eAAe,CAAC,EAAE;gBAC9BnB,SAASC,OAAO,GAAGgB;gBACnBL,uBAAuBC;YACzB;QACF,OAAO;;IAGT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 3908, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/dynamic-rendering-utils.ts"],"sourcesContent":["import {\n RenderStage,\n type AdvanceableRenderStage,\n} from './app-render/staged-rendering'\nimport type {\n RequestStore,\n WorkUnitStore,\n} from './app-render/work-unit-async-storage.external'\nimport { workUnitAsyncStorage } from './app-render/work-unit-async-storage.external'\nimport { getServerReact, getClientReact } from './runtime-reacts.external'\n\nexport function isHangingPromiseRejectionError(\n err: unknown\n): err is HangingPromiseRejectionError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === HANGING_PROMISE_REJECTION\n}\n\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'\n\nclass HangingPromiseRejectionError extends Error {\n public readonly digest = HANGING_PROMISE_REJECTION\n\n constructor(\n public readonly route: string,\n public readonly expression: string\n ) {\n super(\n `During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`\n )\n }\n}\n\nconst CLIENT_HOOK_DYNAMIC = 'CLIENT_HOOK_DYNAMIC'\n\nexport class ClientHookDynamicError extends Error {\n public readonly digest = CLIENT_HOOK_DYNAMIC\n\n constructor(route: string, expression: string) {\n super(\n `Route \"${route}\": Next.js encountered URL data \\`${expression}\\` in a Client Component outside of \\`<Suspense>\\`.\\n\\n` +\n `This blocks prerendering because the value is only available at runtime.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Wrap the component in \\`<Suspense fallback={...}>\\` so the hook value streams in after prerendering\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-client-hook`\n )\n }\n}\n\nexport function isClientHookDynamicError(\n err: unknown\n): err is ClientHookDynamicError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === CLIENT_HOOK_DYNAMIC\n}\n\ntype AbortListeners = Array<() => void>\nconst abortListenersBySignal = new WeakMap<AbortSignal, AbortListeners>()\n\n/**\n * Constructs a promise that never resolves, standing in for *dynamic* data:\n * data that is only available during a real dynamic request and hangs in\n * every kind of prerender — `io()`, `connection()`, uncached `fetch()`.\n *\n * This is primarily useful for cacheComponents where we use promise\n * resolution timing to determine which parts of a render can be included in a\n * prerender.\n *\n * Records nothing on the prerender store: the promise's holes are only ever\n * filled by a real dynamic request, so a runtime prefetch response would have\n * the same holes as the static one. If the data source would resolve during a\n * runtime prerender, use `makeRuntimeHangingPromise` instead.\n *\n * @internal\n */\nexport function makeDynamicHangingPromise<T>(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise<T> {\n return makeHangingPromiseWithError(\n signal,\n new HangingPromiseRejectionError(route, expression)\n )\n}\n\nexport function makeUntrackedHangingPromise<T>(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise<T> {\n return makeHangingPromiseWithError(\n signal,\n new HangingPromiseRejectionError(route, expression)\n )\n}\n\n/**\n * Constructs a promise that never resolves, standing in for *runtime* data:\n * data that hangs during a static prerender but is available during a runtime\n * prerender (the kind that backs a runtime prefetch request: request data\n * like cookies and headers is available, but the render is still not a real\n * dynamic request). Examples: cookies, headers, fallback params,\n * searchParams, and cache entries that are excluded only from static\n * prerenders.\n *\n * Creating one of these during a static prerender records on the prerender\n * store that a runtime prefetch would produce more content than the static\n * response (`runtimeDataAccessed`), which the segment prefetch encoding uses\n * to tell the client whether a runtime prefetch request could be skipped.\n *\n * When unsure whether data is dynamic or runtime, prefer this method — the\n * cost of over-recording is a redundant runtime prefetch request; the cost of\n * under-recording is a permanently missing one.\n *\n * `workUnitStore` may be null ONLY when the caller tracks the access itself\n * at observation time instead of creation time. TLine truncated
|
||||
{"offset": {"line": 4193, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/cookies.ts"],"sourcesContent":["import {\n type ReadonlyRequestCookies,\n areCookiesMutableInCurrentPhase,\n RequestCookiesAdapter,\n} from '../web/spec-extension/adapters/request-cookies'\nimport { RequestCookies } from '../web/spec-extension/cookies'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n type PrerenderStoreModern,\n type RequestStore,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeDevtoolsIOAwarePromise,\n makeRuntimeHangingPromise,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport { isRequestApiAllowedInCurrentPhase } from './utils'\nimport { applyOwnerStack } from '../dynamic-rendering-utils'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport function cookies(): Promise<ReadonlyRequestCookies> {\n const callingExpression = 'cookies'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (workUnitStore && !isRequestApiAllowedInCurrentPhase(workUnitStore)) {\n throw new Error(\n `Route ${workStore.route} used \\`cookies()\\` inside \\`after()\\` while rendering. This is not supported. If you need this data inside an \\`after()\\` callback, use \\`cookies()\\` outside of the callback. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic we override all other logic and always just return an empty\n // cookies object without tracking\n const underlyingCookies = createEmptyCookies()\n return makeUntrackedCookies(underlyingCookies)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`cookies()\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n const error = new Error(\n `Route ${workStore.route} used \\`cookies()\\` inside \"use cache\". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \\`cookies()\\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, cookies)\n applyOwnerStack(error)\n workStore.invalidDynamicUsageError ??= error\n throw error\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \\`cookies()\\` inside a function cached with \\`unstable_cache()\\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \\`cookies()\\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'generate-static-params':\n throw new Error(\n `Route ${workStore.route} used \\`cookies()\\` inside \\`generateStaticParams\\`. This is not supported because \\`generateStaticParams\\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`\n )\n case 'prerender':\n return makeHangingCookies(workStore, workUnitStore)\n case 'prerender-client':\n case 'validation-client':\n const exportName = '`cookies`'\n throw new InvariantError(\n `${exportName} must not be used within a Client Component. Next.js should be preventing ${exportName} from being included in Client Components statically, but did not in this case.`\n )\n case 'prerender-ppr':\n // We need track dynamic access here eagerly to keep continuity with\n // how cookies has worked in PPR without cacheComponents.\n return postponeWithTracking(\n workStore.route,\n callingExpression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-leLine truncated
|
||||
{"offset": {"line": 4426, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/draft-mode.ts"],"sourcesContent":["import {\n getDraftModeProviderForCacheScope,\n throwForMissingRequestStore,\n} from '../app-render/work-unit-async-storage.external'\n\nimport type { DraftModeProvider } from '../async-storage/draft-mode-provider'\n\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'\nimport {\n abortAndThrowOnSynchronousRequestDataAccess,\n postponeWithTracking,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { ReflectAdapter } from '../web/spec-extension/adapters/reflect'\nimport {\n applyOwnerStack,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\n\nexport function draftMode(): Promise<DraftMode> {\n const callingExpression = 'draftMode'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workStore || !workUnitStore) {\n throwForMissingRequestStore(callingExpression)\n }\n\n switch (workUnitStore.type) {\n case 'prerender-runtime': {\n // TODO(runtime-ppr): does it make sense to delay this? normally it's always microtasky\n const { stagedRendering } = workUnitStore\n if (stagedRendering) {\n return stagedRendering.delayUntilStage(\n RENDER_STAGES_BY_DATA_KIND.sessionData,\n 'draftMode',\n new DraftMode(workUnitStore.draftMode)\n )\n } else {\n return createOrGetCachedDraftMode(workUnitStore.draftMode, workStore)\n }\n }\n case 'request':\n return createOrGetCachedDraftMode(workUnitStore.draftMode, workStore)\n\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n // Inside of `\"use cache\"` or `unstable_cache`, draft mode is available if\n // the outmost work unit store is a request store (or a runtime prerender),\n // and if draft mode is enabled.\n const draftModeProvider = getDraftModeProviderForCacheScope(\n workStore,\n workUnitStore\n )\n\n if (draftModeProvider) {\n return createOrGetCachedDraftMode(draftModeProvider, workStore)\n }\n\n // Otherwise, we fall through to providing an empty draft mode.\n // eslint-disable-next-line no-fallthrough\n case 'prerender':\n case 'prerender-ppr':\n case 'prerender-legacy':\n // Return empty draft mode\n return createOrGetCachedDraftMode(null, workStore)\n case 'prerender-client':\n case 'validation-client': {\n const exportName = '`draftMode`'\n throw new InvariantError(\n `${exportName} must not be used within a Client Component. Next.js should be preventing ${exportName} from being included in Client Components statically, but did not in this case.`\n )\n }\n case 'generate-static-params':\n throw new Error(\n `Route ${workStore.route} used \\`${callingExpression}()\\` inside \\`generateStaticParams\\`. This is not supported because \\`generateStaticParams\\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`\n )\n\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createOrGetCachedDraftMode(\n draftModeProvider: DraftModeProvider | null,\n workStore: WorkStore | undefined\n): Promise<DraftMode> {\n const cacheKey = draftModeProvider ?? NullDraftMode\n const cachedDraftMode = CachedDraftModes.get(cacheKey)\n\n if (cachedDraftMode) {\n return cachedDraftMode\n }\n\n if (process.env.NODE_ENV === 'development' && !workStore?.isPrefetchRequest) {\n const route = workStore?.route\n return createDraftModeWithDevWarnings(draftModeProvider, route)\n } else {\n return Promise.resolve(new DraftMode(draftModeProvider))\n }\n}\n\ninterface CacheLifetime {}\nconst NullDraftMode = {}\nconst CachedDraftModes = new WeakMap<CacheLifetime, Promise<DraftMode>>()\n\nfunction createDraftModeWithDevWarnings(\n underlyingProvider: null | DraftModeProvider,\n route: undefined | string\n): Promise<DraftMode> {\n const instance = new DraftMode(underlyingProvider)\n const promise = Promise.resolve(instance)\n\n const proxiedPromise = new Proxy(promise, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'isEnabled':\n warnForSyncAccess(route, `\\`draftMode().${prop}\\``)\n break\n case 'enable':\n Line truncated
|
||||
{"offset": {"line": 4665, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/headers.ts"],"sourcesContent":["import {\n HeadersAdapter,\n type ReadonlyHeaders,\n} from '../web/spec-extension/adapters/headers'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n type PrerenderStoreModern,\n type RequestStore,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeDevtoolsIOAwarePromise,\n makeRuntimeHangingPromise,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport { isRequestApiAllowedInCurrentPhase } from './utils'\nimport { applyOwnerStack } from '../dynamic-rendering-utils'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\n/**\n * This function allows you to read the HTTP incoming request headers in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers) and\n * [Middleware](https://nextjs.org/docs/app/building-your-application/routing/middleware).\n *\n * Read more: [Next.js Docs: `headers`](https://nextjs.org/docs/app/api-reference/functions/headers)\n */\nexport function headers(): Promise<ReadonlyHeaders> {\n const callingExpression = 'headers'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (workUnitStore && !isRequestApiAllowedInCurrentPhase(workUnitStore)) {\n throw new Error(\n `Route ${workStore.route} used \\`headers()\\` inside \\`after()\\` while rendering. This is not supported. If you need this data inside an \\`after()\\` callback, use \\`headers()\\` outside of the callback. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic we override all other logic and always just return an empty\n // headers object without tracking\n const underlyingHeaders = HeadersAdapter.seal(new Headers({}))\n return makeUntrackedHeaders(underlyingHeaders)\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \\`headers()\\` inside \"use cache\". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \\`headers()\\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, headers)\n applyOwnerStack(error)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \\`headers()\\` inside a function cached with \\`unstable_cache()\\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \\`headers()\\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'generate-static-params':\n throw new Error(\n `Route ${workStore.route} used \\`headers()\\` inside \\`generateStaticParams\\`. This is not supported because \\`generateStaticParams\\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`\n )\n case 'prerender':\n case 'prerender-client':\n case 'validation-client':\n case 'private-cache':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`headers()\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-aLine truncated
|
||||
{"offset": {"line": 4899, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type { WorkUnitStore } from '../app-render/work-unit-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \\`searchParams\\` inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \\`searchParams\\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestApiAllowedInCurrentPhase(\n workUnitStore: WorkUnitStore\n): boolean {\n switch (workUnitStore.phase) {\n case 'action':\n case 'render': {\n // The request is still in progress. The API may be disallowed for other reasons,\n // but not because of phase.\n return true\n }\n case 'after': {\n // The request has finished.\n\n // If we're in a Route Handler or a Server Action,\n // request APIs can be called everywhere, even in after().\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore && (actionStore.isAppRoute || actionStore.isAction)) {\n return true\n }\n\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n if (afterTaskStore) {\n // We're in an `after` callback. Request APIs are callable if\n // the `after()` call happened in an action phase:\n // - in a Route Handler\n // - in a Server Action's body (but not the render after)\n //\n // TODO(after): Is it even possible to have `phase === 'action'` but no `actionStore`?\n // We should revisit this setup and simplify this.\n return afterTaskStore.rootTaskSpawnPhase === 'action'\n }\n\n // Otherwise, we must be in a page, in the `after` phase.\n // We don't allow calling request APIs here because we'd miss\n // them during prerendering and wouldn't know that the page is dynamic.\n return false\n }\n }\n}\n"],"names":["isRequestApiAllowedInCurrentPhase","throwForSearchParamsAccessInUseCache","throwWithStaticGenerationBailoutErrorWithDynamicError","route","expression","StaticGenBailoutError","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","workUnitStore","phase","actionStore","actionAsyncStorage","getStore","isAppRoute","isAction","afterTaskStore","afterTaskAsyncStorage","rootTaskSpawnPhase"],"mappings":";;;;;;;;;;;;;;;IA6BgBA,iCAAiC,EAAA;eAAjCA;;IAdAC,oCAAoC,EAAA;eAApCA;;IATAC,qDAAqD,EAAA;eAArDA;;;yCANsB;4CACH;+CACG;AAI/B,SAASA,sDACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIC,yBAAAA,qBAAqB,CAC7B,CAAC,MAAM,EAAEF,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASH,qCACdK,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUH,KAAK,CAAC,2XAA2X,CAAC,GADzY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAM,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEO,SAASR,kCACdY,aAA4B;IAE5B,OAAQA,cAAcC,KAAK;QACzB,KAAK;QACL,KAAK;YAAU;gBACb,iFAAiF;gBACjF,4BAA4B;gBAC5B,OAAO;YACT;QACA,KAAK;YAAS;gBACZ,4BAA4B;gBAE5B,kDAAkD;gBAClD,0DAA0D;gBAC1D,MAAMC,cAAcC,4BAAAA,kBAAkB,CAACC,QAAQ;gBAC/C,IAAIF,eAAgBA,CAAAA,YAAYG,UAAU,IAAIH,YAAYI,QAAO,GAAI;oBACnE,OAAO;gBACT;gBAEA,MAAMC,iBAAiBC,+BAAAA,qBAAqB,CAACJ,QAAQ;gBACrD,IAAIG,gBAAgB;oBAClB,6DAA6D;oBAC7D,kDAAkD;oBAClD,uBAAuB;oBACvB,yDAAyD;oBACzD,EAAE;oBACF,sFAAsF;oBACtF,kDAAkD;oBAClD,OAAOA,eAAeE,kBAAkB,KAAK;gBAC/C;gBAEA,yDAAyD;gBACzD,6DAA6D;gBAC7D,uEAAuE;gBACvE,OAAO;YACT;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 4984, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/headers.ts"],"sourcesContent":["import type { IncomingHttpHeaders } from 'http'\n\nimport { ReflectAdapter } from './reflect'\n\n/**\n * @internal\n */\nexport class ReadonlyHeadersError extends Error {\n constructor() {\n super(\n 'Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'\n )\n }\n\n public static callable() {\n throw new ReadonlyHeadersError()\n }\n}\n\nexport type ReadonlyHeaders = Headers & {\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n append(...args: any[]): void\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n set(...args: any[]): void\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n delete(...args: any[]): void\n}\nexport class HeadersAdapter extends Headers {\n private readonly headers: IncomingHttpHeaders\n\n constructor(headers: IncomingHttpHeaders) {\n // We've already overridden the methods that would be called, so we're just\n // calling the super constructor to ensure that the instanceof check works.\n super()\n\n this.headers = new Proxy(headers, {\n get(target, prop, receiver) {\n // Because this is just an object, we expect that all \"get\" operations\n // are for properties. If it's a \"get\" for a symbol, we'll just return\n // the symbol.\n if (typeof prop === 'symbol') {\n return ReflectAdapter.get(target, prop, receiver)\n }\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return undefined.\n if (typeof original === 'undefined') return\n\n // If the original casing exists, return the value.\n return ReflectAdapter.get(target, original, receiver)\n },\n set(target, prop, value, receiver) {\n if (typeof prop === 'symbol') {\n return ReflectAdapter.set(target, prop, value, receiver)\n }\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, use the prop as the key.\n return ReflectAdapter.set(target, original ?? prop, value, receiver)\n },\n has(target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop)\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return false.\n if (typeof original === 'undefined') return false\n\n // If the original casing exists, return true.\n return ReflectAdapter.has(target, original)\n },\n deleteProperty(target, prop) {\n if (typeof prop === 'symbol')\n return ReflectAdapter.deleteProperty(target, prop)\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return true.\n if (typeof original === 'undefined') return true\n\n // If the original casing exists, delete the property.\n return ReflectAdapter.deleteProperty(target, original)\n },\n })\n }\n\n /**\n * Seals a Headers instance to prevent modification by throwing an error when\n * any mutating method is called.\n */\n public static seal(headers: Headers): ReadonlyHeaders {\n return new Proxy<ReadonlyHeaders>(headers, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'append':\n case 'delete':\n cLine truncated
|
||||
{"offset": {"line": 5192, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/reflect.ts"],"sourcesContent":["export class ReflectAdapter {\n static get<T extends object>(\n target: T,\n prop: string | symbol,\n receiver: unknown\n ): any {\n const value = Reflect.get(target, prop, receiver)\n if (typeof value === 'function') {\n return value.bind(target)\n }\n\n return value\n }\n\n static set<T extends object>(\n target: T,\n prop: string | symbol,\n value: any,\n receiver: any\n ): boolean {\n return Reflect.set(target, prop, value, receiver)\n }\n\n static has<T extends object>(target: T, prop: string | symbol): boolean {\n return Reflect.has(target, prop)\n }\n\n static deleteProperty<T extends object>(\n target: T,\n prop: string | symbol\n ): boolean {\n return Reflect.deleteProperty(target, prop)\n }\n}\n"],"names":["ReflectAdapter","get","target","prop","receiver","value","Reflect","bind","set","has","deleteProperty"],"mappings":";;;+BAAaA,kBAAAA;;;eAAAA;;;AAAN,MAAMA;IACX,OAAOC,IACLC,MAAS,EACTC,IAAqB,EACrBC,QAAiB,EACZ;QACL,MAAMC,QAAQC,QAAQL,GAAG,CAACC,QAAQC,MAAMC;QACxC,IAAI,OAAOC,UAAU,YAAY;YAC/B,OAAOA,MAAME,IAAI,CAACL;QACpB;QAEA,OAAOG;IACT;IAEA,OAAOG,IACLN,MAAS,EACTC,IAAqB,EACrBE,KAAU,EACVD,QAAa,EACJ;QACT,OAAOE,QAAQE,GAAG,CAACN,QAAQC,MAAME,OAAOD;IAC1C;IAEA,OAAOK,IAAsBP,MAAS,EAAEC,IAAqB,EAAW;QACtE,OAAOG,QAAQG,GAAG,CAACP,QAAQC;IAC7B;IAEA,OAAOO,eACLR,MAAS,EACTC,IAAqB,EACZ;QACT,OAAOG,QAAQI,cAAc,CAACR,QAAQC;IACxC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 5223, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/request-cookies.ts"],"sourcesContent":["import { RequestCookies } from '../cookies'\n\nimport { ResponseCookies } from '../cookies'\nimport { ReflectAdapter } from './reflect'\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external'\nimport type { RequestStore } from '../../../app-render/work-unit-async-storage.external'\nimport { ActionDidRevalidateStaticAndDynamic } from '../../../../shared/lib/action-revalidation-kind'\n\n/**\n * @internal\n */\nexport class ReadonlyRequestCookiesError extends Error {\n constructor() {\n super(\n 'Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'\n )\n }\n\n public static callable() {\n throw new ReadonlyRequestCookiesError()\n }\n}\n\n// We use this to type some APIs but we don't construct instances directly\nexport type { ResponseCookies }\n\n// The `cookies()` API is a mix of request and response cookies. For `.get()` methods,\n// we want to return the request cookie if it exists. For mutative methods like `.set()`,\n// we want to return the response cookie.\nexport type ReadonlyRequestCookies = Omit<\n RequestCookies,\n 'set' | 'clear' | 'delete'\n> &\n Pick<ResponseCookies, 'set' | 'delete'>\n\nexport class RequestCookiesAdapter {\n public static seal(cookies: RequestCookies): ReadonlyRequestCookies {\n return new Proxy(cookies as any, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'clear':\n case 'delete':\n case 'set':\n return ReadonlyRequestCookiesError.callable\n default:\n return ReflectAdapter.get(target, prop, receiver)\n }\n },\n })\n }\n\n /**\n * @param cookies\n * @returns A fresh object identity backed by the original value\n */\n public static fresh(cookies: ReadonlyRequestCookies): ReadonlyRequestCookies {\n return new Proxy(cookies, {\n get(target, prop, receiver) {\n return ReflectAdapter.get(target, prop, receiver)\n },\n })\n }\n}\n\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies')\n\nexport function getModifiedCookieValues(\n cookies: ResponseCookies\n): ResponseCookie[] {\n const modified: ResponseCookie[] | undefined = (cookies as unknown as any)[\n SYMBOL_MODIFY_COOKIE_VALUES\n ]\n if (!modified || !Array.isArray(modified) || modified.length === 0) {\n return []\n }\n\n return modified\n}\n\ntype SetCookieArgs =\n | [key: string, value: string, cookie?: Partial<ResponseCookie>]\n | [options: ResponseCookie]\n\nexport function appendMutableCookies(\n headers: Headers,\n mutableCookies: ResponseCookies\n): boolean {\n const modifiedCookieValues = getModifiedCookieValues(mutableCookies)\n if (modifiedCookieValues.length === 0) {\n return false\n }\n\n // Return a new response that extends the response with\n // the modified cookies as fallbacks. `res` cookies\n // will still take precedence.\n const resCookies = new ResponseCookies(headers)\n const returnedCookies = resCookies.getAll()\n\n // Set the modified cookies as fallbacks.\n for (const cookie of modifiedCookieValues) {\n resCookies.set(cookie)\n }\n\n // Set the original cookies as the final values.\n for (const cookie of returnedCookies) {\n resCookies.set(cookie)\n }\n\n return true\n}\n\ntype ResponseCookie = NonNullable<\n ReturnType<InstanceType<typeof ResponseCookies>['get']>\n>\n\nexport class MutableRequestCookiesAdapter {\n public static wrap(\n cookies: RequestCookies,\n onUpdateCookies?: (cookies: string[]) => void\n ): ResponseCookies {\n const responseCookies = new ResponseCookies(new Headers())\n for (const cookie of cookies.getAll()) {\n responseCookies.set(cookie)\n }\n\n let modifiedValues: ResponseCookie[] = []\n const modifiedCookies = new Set<string>()\n const updateResponseCookies = () => {\n // TODO-APP: change method of getting workStore\n const workStore = workAsyncStorage.getStore()\n if (workStore) {\n workStore.pathWasRevalidated = ActionDidRevalidateStaticAndDynamic\n }\n\n const allCookies = responseCookies.getAll()\n modifiedValues = allCookies.filter((c) => modifiedCookies.has(c.name))\n if (onUpdateCookies) {\n const serializedCookies: string[] = []\n for (const cookie of modifiedValues) {\n const tempCookies = new ResponseCookies(new Headers())\n tempCookies.set(cookie)\n serializedCookies.push(tempCookies.toString())\n }\n\n onUpdateCookies(serializedCookies)\n }\n }\n\n const wrappedCookies = new Proxy(responseCookies, {\n get(target, prop, receiver) {\n switch (prop) {\n // A special symbol toLine truncated
|
||||
{"offset": {"line": 5450, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/cookies.ts"],"sourcesContent":["export {\n RequestCookies,\n ResponseCookies,\n stringifyCookie,\n} from 'next/dist/compiled/@edge-runtime/cookies'\n"],"names":["RequestCookies","ResponseCookies","stringifyCookie"],"mappings":";;;;;;;;;;;;;;;IACEA,cAAc,EAAA;eAAdA,SAAAA,cAAc;;IACdC,eAAe,EAAA;eAAfA,SAAAA,eAAe;;IACfC,eAAe,EAAA;eAAfA,SAAAA,eAAe;;;yBACV","ignoreList":[0]}},
|
||||
{"offset": {"line": 5480, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/action-revalidation-kind.ts"],"sourcesContent":["export type ActionRevalidationKind = 0 | 1 | 2\n\nexport const ActionDidNotRevalidate = 0\nexport const ActionDidRevalidateStaticAndDynamic = 1\nexport const ActionDidRevalidateDynamicOnly = 2\n"],"names":["ActionDidNotRevalidate","ActionDidRevalidateDynamicOnly","ActionDidRevalidateStaticAndDynamic"],"mappings":";;;;;;;;;;;;;;;IAEaA,sBAAsB,EAAA;eAAtBA;;IAEAC,8BAA8B,EAAA;eAA9BA;;IADAC,mCAAmC,EAAA;eAAnCA;;;AADN,MAAMF,yBAAyB;AAC/B,MAAME,sCAAsC;AAC5C,MAAMD,iCAAiC","ignoreList":[0]}},
|
||||
{"offset": {"line": 5512, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/instant-messages.ts"],"sourcesContent":["export function createUnrenderedSegmentError(\n route: string,\n missingFiles: readonly string[]\n): Error {\n let message = `Route \"${route}\": Could not validate that a segment in your UI has instant navigation.`\n if (missingFiles.length > 0) {\n const label =\n missingFiles.length === 1 ? 'Dropped segment' : 'Dropped segments'\n message +=\n `\\n\\nThis segment was dropped from rendering. Issues that would prevent instant navigation will go undetected.` +\n `\\n\\n${label}:\\n${missingFiles.map((p) => ` ${p}`).join('\\n')}` +\n `\\n\\nWays to fix this:` +\n `\\n - [render] Render the dropped segment` +\n `\\n - [ignore] Set \\`export const instant = false\\` to opt the dropped segment out of instant-navigation validation` +\n `\\n\\nLearn more: https://nextjs.org/docs/messages/instant-unrendered-segment`\n }\n return new Error(message)\n}\n\nexport function createLinkPrefetchPartialError(pathname: string): Error {\n return new Error(\n `Next.js encountered dynamic data during prefetching for \"${pathname}\".\\n\\n` +\n `This will lead to slower, more expensive prefetches.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [upgrade] Opt into Partial Prefetching by exporting \\`const prefetch = 'partial'\\` from the page or layout, or by setting \\`partialPrefetching: true\\` in next.config to opt the whole app in\\n` +\n ` - [disable] Remove \\`prefetch={true}\\` from the <Link> to use the default prefetch\\n` +\n ` - [ignore] Set \\`export const instant = false\\` to opt the route out of instant-navigation validation\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/instant-link-prefetch-partial`\n )\n}\n"],"names":["createLinkPrefetchPartialError","createUnrenderedSegmentError","route","missingFiles","message","length","label","map","p","join","Error","pathname"],"mappings":";;;;;;;;;;;;;;IAmBgBA,8BAA8B,EAAA;eAA9BA;;IAnBAC,4BAA4B,EAAA;eAA5BA;;;AAAT,SAASA,6BACdC,KAAa,EACbC,YAA+B;IAE/B,IAAIC,UAAU,CAAC,OAAO,EAAEF,MAAM,uEAAuE,CAAC;IACtG,IAAIC,aAAaE,MAAM,GAAG,GAAG;QAC3B,MAAMC,QACJH,aAAaE,MAAM,KAAK,IAAI,oBAAoB;QAClDD,WACE,CAAC,6GAA6G,CAAC,GAC/G,CAAC,IAAI,EAAEE,MAAM,GAAG,EAAEH,aAAaI,GAAG,CAAC,CAACC,IAAM,CAAC,EAAE,EAAEA,GAAG,EAAEC,IAAI,CAAC,OAAO,GAChE,CAAC,qBAAqB,CAAC,GACvB,CAAC,yCAAyC,CAAC,GAC3C,CAAC,mHAAmH,CAAC,GACrH,CAAC,2EAA2E,CAAC;IACjF;IACA,OAAO,OAAA,cAAkB,CAAlB,IAAIC,MAAMN,UAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAiB;AAC1B;AAEO,SAASJ,+BAA+BW,QAAgB;IAC7D,OAAO,OAAA,cAQN,CARM,IAAID,MACT,CAAC,yDAAyD,EAAEC,SAAS,MAAM,CAAC,GAC1E,CAAC,wDAAwD,CAAC,GAC1D,CAAC,mBAAmB,CAAC,GACrB,CAAC,mMAAmM,CAAC,GACrM,CAAC,sFAAsF,CAAC,GACxF,CAAC,2GAA2G,CAAC,GAC7G,CAAC,0EAA0E,CAAC,GAPzE,qBAAA;eAAA;oBAAA;sBAAA;IAQP;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 5556, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":";;;+BAAaA,kBAAAA;;;eAAAA;;;AAAN,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACH,CAAC,WAAW,EAAED,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,IAAI,0BAA0B,CAAC,EACzFC;QAFF,OAAA,cAGC,CAHD,IAGC,EAHD,qBAAA;mBAAA;wBAAA;0BAAA;QAGA;QACA,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 5580, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BailoutToCSRError","isBailoutToCSRError","BAILOUT_TO_CSR","Error","constructor","reason","digest","err"],"mappings":"AAAA,+GAA+G;;;;;;;;;;;;;;;IAIlGA,iBAAiB,EAAA;eAAjBA;;IASGC,mBAAmB,EAAA;eAAnBA;;;AAZhB,MAAMC,iBAAiB;AAGhB,MAAMF,0BAA0BG;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAC,CAAC,mCAAmC,EAAEA,QAAQ,GAAA,IAAA,CAD1BA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASJ;IAIzB;AACF;AAGO,SAASD,oBAAoBM,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAE,GAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAID,MAAM,KAAKJ;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 5618, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/promise-with-resolvers.ts"],"sourcesContent":["export function createPromiseWithResolvers<T>(): PromiseWithResolvers<T> {\n // Shim of Stage 4 Promise.withResolvers proposal\n let resolve: (value: T | PromiseLike<T>) => void\n let reject: (reason: any) => void\n const promise = new Promise<T>((res, rej) => {\n resolve = res\n reject = rej\n })\n return { resolve: resolve!, reject: reject!, promise }\n}\n"],"names":["createPromiseWithResolvers","resolve","reject","promise","Promise","res","rej"],"mappings":";;;+BAAgBA,8BAAAA;;;eAAAA;;;AAAT,SAASA;IACd,iDAAiD;IACjD,IAAIC;IACJ,IAAIC;IACJ,MAAMC,UAAU,IAAIC,QAAW,CAACC,KAAKC;QACnCL,UAAUI;QACVH,SAASI;IACX;IACA,OAAO;QAAEL,SAASA;QAAUC,QAAQA;QAASC;IAAQ;AACvD","ignoreList":[0]}},
|
||||
{"offset": {"line": 5644, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/headers.js"],"sourcesContent":["module.exports.cookies = require('./dist/server/request/cookies').cookies\nmodule.exports.headers = require('./dist/server/request/headers').headers\nmodule.exports.draftMode = require('./dist/server/request/draft-mode').draftMode\n"],"names":["module","exports","cookies","headers","draftMode"],"mappings":"AAAAA,OAAOC,OAAO,CAACC,OAAO,GAAG,6GAAyCA,OAAO;AACzEF,OAAOC,OAAO,CAACE,OAAO,GAAG,6GAAyCA,OAAO;AACzEH,OAAOC,OAAO,CAACG,SAAS,GAAG,gHAA4CA,SAAS","ignoreList":[0]}}]
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
module.exports = [
|
||||
"[project]/node_modules/next/app.js [ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/pages/_app.js [ssr] (ecmascript)");
|
||||
}),
|
||||
"[project]/node_modules/next/dist/pages/_app.js [ssr] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return App;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [ssr] (ecmascript)");
|
||||
const _jsxruntime = __turbopack_context__.r("[externals]/react/jsx-runtime [external] (react/jsx-runtime, cjs)");
|
||||
const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[externals]/react [external] (react, cjs)"));
|
||||
const _utils = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils.js [ssr] (ecmascript)");
|
||||
/**
|
||||
* `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.
|
||||
* This allows for keeping state between navigation, custom error handling, injecting additional data.
|
||||
*/ async function appGetInitialProps({ Component, ctx }) {
|
||||
const pageProps = await (0, _utils.loadGetInitialProps)(Component, ctx);
|
||||
return {
|
||||
pageProps
|
||||
};
|
||||
}
|
||||
class App extends _react.default.Component {
|
||||
static{
|
||||
this.origGetInitialProps = appGetInitialProps;
|
||||
}
|
||||
static{
|
||||
this.getInitialProps = appGetInitialProps;
|
||||
}
|
||||
render() {
|
||||
const { Component, pageProps } = this.props;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Component, {
|
||||
...pageProps
|
||||
});
|
||||
}
|
||||
}
|
||||
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=node_modules_next_1_o5zxs._.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/app.js"],"sourcesContent":["module.exports = require('./dist/pages/_app')\n"],"names":["module","exports"],"mappings":"AAAAA,OAAOC,OAAO","ignoreList":[0]}},
|
||||
{"offset": {"line": 8, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/pages/_app.tsx"],"sourcesContent":["import React from 'react'\n\nimport type {\n AppContextType,\n AppInitialProps,\n AppPropsType,\n NextWebVitalsMetric,\n AppType,\n} from '../shared/lib/utils'\nimport type { Router } from '../client/router'\n\nimport { loadGetInitialProps } from '../shared/lib/utils'\n\nexport type { AppInitialProps, AppType }\n\nexport type { NextWebVitalsMetric }\n\nexport type AppContext = AppContextType<Router>\n\nexport type AppProps<P = any> = AppPropsType<Router, P>\n\n/**\n * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.\n * This allows for keeping state between navigation, custom error handling, injecting additional data.\n */\nasync function appGetInitialProps({\n Component,\n ctx,\n}: AppContext): Promise<AppInitialProps> {\n const pageProps = await loadGetInitialProps(Component, ctx)\n return { pageProps }\n}\n\nexport default class App<P = any, CP = {}, S = {}> extends React.Component<\n P & AppProps<CP>,\n S\n> {\n static origGetInitialProps = appGetInitialProps\n static getInitialProps = appGetInitialProps\n\n render() {\n const { Component, pageProps } = this.props as AppProps<CP>\n\n return <Component {...pageProps} />\n }\n}\n"],"names":["App","appGetInitialProps","Component","ctx","pageProps","loadGetInitialProps","React","origGetInitialProps","getInitialProps","render","props"],"mappings":";;;+BAiCA,WAAA;;;eAAqBA;;;;;gEAjCH;uBAWkB;AAUpC;;;CAGC,GACD,eAAeC,mBAAmB,EAChCC,SAAS,EACTC,GAAG,EACQ;IACX,MAAMC,YAAY,MAAMC,CAAAA,GAAAA,OAAAA,mBAAmB,EAACH,WAAWC;IACvD,OAAO;QAAEC;IAAU;AACrB;AAEe,MAAMJ,YAAsCM,OAAAA,OAAK,CAACJ,SAAS;;aAIjEK,mBAAAA,GAAsBN;;;aACtBO,eAAAA,GAAkBP;;IAEzBQ,SAAS;QACP,MAAM,EAAEP,SAAS,EAAEE,SAAS,EAAE,GAAG,IAAI,CAACM,KAAK;QAE3C,OAAA,WAAA,GAAO,CAAA,GAAA,YAAA,GAAA,EAACR,WAAAA;YAAW,GAAGE,SAAS;;IACjC;AACF","ignoreList":[0]}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DynamicServerError","isDynamicServerError","DYNAMIC_ERROR_CODE","Error","constructor","description","digest","err"],"mappings":";;;;;;;;;;;;;;IAEaA,kBAAkB,EAAA;eAAlBA;;IAQGC,oBAAoB,EAAA;eAApBA;;;AAVhB,MAAMC,qBAAqB;AAEpB,MAAMF,2BAA2BG;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAC,CAAC,sBAAsB,EAAEA,aAAa,GAAA,IAAA,CADlBA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCJ;IAIpC;AACF;AAEO,SAASD,qBAAqBM,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAE,KAChB,OAAOA,IAAID,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOC,IAAID,MAAM,KAAKJ;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 48, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["StaticGenBailoutError","isStaticGenBailoutError","NEXT_STATIC_GEN_BAILOUT","Error","code","error"],"mappings":";;;;;;;;;;;;;;IAEaA,qBAAqB,EAAA;eAArBA;;IAIGC,uBAAuB,EAAA;eAAvBA;;;AANhB,MAAMC,0BAA0B;AAEzB,MAAMF,8BAA8BG;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOF;;AACzB;AAEO,SAASD,wBACdI,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAI,GAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMD,IAAI,KAAKF;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 92, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/framework/boundary-constants.tsx"],"sourcesContent":["export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'\n"],"names":["METADATA_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME"],"mappings":";;;;;;;;;;;;;;;;IAAaA,sBAAsB,EAAA;eAAtBA;;IAEAC,oBAAoB,EAAA;eAApBA;;IACAC,yBAAyB,EAAA;eAAzBA;;IAFAC,sBAAsB,EAAA;eAAtBA;;;AADN,MAAMH,yBAAyB;AAC/B,MAAMG,yBAAyB;AAC/B,MAAMF,uBAAuB;AAC7B,MAAMC,4BAA4B","ignoreList":[0]}},
|
||||
{"offset": {"line": 129, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/scheduler.ts"],"sourcesContent":["export type ScheduledFn<T = void> = () => T | PromiseLike<T>\nexport type SchedulerFn<T = void> = (cb: ScheduledFn<T>) => void\n\n/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */\nexport const scheduleOnNextTick = (cb: ScheduledFn<void>) => {\n // We use Promise.resolve().then() here so that the operation is scheduled at\n // the end of the promise job queue, we then add it to the next process tick\n // to ensure it's evaluated afterwards.\n //\n // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n //\n Promise.resolve().then(() => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n process.nextTick(cb)\n }\n })\n}\n\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */\nexport const scheduleImmediate = (cb: ScheduledFn<void>): void => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n setImmediate(cb)\n }\n}\n\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */\nexport function atLeastOneTask() {\n return new Promise<void>((resolve) => scheduleImmediate(resolve))\n}\n\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */\nexport function waitAtLeastOneReactRenderTask(): Promise<void> {\n if (process.env.NEXT_RUNTIME === 'edge') {\n return new Promise((r) => setTimeout(r, 0))\n } else {\n return new Promise((r) => setImmediate(r))\n }\n}\n"],"names":["atLeastOneTask","scheduleImmediate","scheduleOnNextTick","waitAtLeastOneReactRenderTask","cb","Promise","resolve","then","process","env","NEXT_RUNTIME","setTimeout","nextTick","setImmediate","r"],"mappings":";;;;;;;;;;;;;;;;IA4CgBA,cAAc,EAAA;eAAdA;;IAbHC,iBAAiB,EAAA;eAAjBA;;IAtBAC,kBAAkB,EAAA;eAAlBA;;IAgDGC,6BAA6B,EAAA;eAA7BA;;;AAhDT,MAAMD,qBAAqB,CAACE;IACjC,6EAA6E;IAC7E,4EAA4E;IAC5E,uCAAuC;IACvC,EAAE;IACF,kLAAkL;IAClL,EAAE;IACFC,QAAQC,OAAO,GAAGC,IAAI,CAAC;QACrB,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;aAElC;YACLF,QAAQI,QAAQ,CAACR;QACnB;IACF;AACF;AAQO,MAAMH,oBAAoB,CAACG;IAChC,IAAII,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACLG,aAAaT;IACf;AACF;AAOO,SAASJ;IACd,OAAO,IAAIK,QAAc,CAACC,UAAYL,kBAAkBK;AAC1D;AAWO,SAASH;IACd,IAAIK,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACL,OAAO,IAAIL,QAAQ,CAACS,IAAMD,aAAaC;IACzC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 194, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/blocking-route-messages.ts"],"sourcesContent":["export function createRuntimeBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered runtime data during prerendering.\\n\\n` +\n `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n )\n}\n\nexport function createDynamicBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached data during prerendering.\\n\\n` +\n `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n )\n}\n\nexport function createRuntimeBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered runtime data during prerendering or a navigation.\\n\\n` +\n `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n )\n}\n\nexport function createLinkBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered URL data during prerendering or a navigation.\\n\\n` +\n `\\`params\\` or \\`searchParams\\` accessed outside of \\`<Suspense>\\` may prevent the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/instant-shell-url-data`\n )\n}\n\nexport function createDynamicBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached data during prerendering or a navigation.\\n\\n` +\n `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n )\n}\n\n/**\n * NOTE: Prefer `createRuntimeBodyError` or `createDynamicBodyError`.\n * Only use this in situations like build-time static validation, where\n * we can't pinpoint a more specific reason.\n */\nexport function createDynamicOrRuntimeBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached or runtime data during prerendering.\\n\\n` +\n `\\`fetch(...)\\`, \\`cookies()\\`, \\`headers()\\`, \\`params\\`, \\`searchParams\\`, or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] For uncached data (\\`fetch\\`, database calls): cache the access with \\`\"use cache\"\\` (does not apply to \\`connectLine truncated
|
||||
{"offset": {"line": 375, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n ValidationStoreClient,\n PrerenderStoreModernServer,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getStagedRenderingController,\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n ClientHookDynamicError,\n isClientHookDynamicError,\n makeClientHookHangingPromise,\n trackRuntimeDataAccessed,\n} from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport {\n createRuntimeBodyError,\n createDynamicBodyError,\n createRuntimeBodyErrorInNavigation,\n createDynamicBodyErrorInNavigation,\n createDynamicOrRuntimeBodyError,\n createRuntimeMetadataError,\n createDynamicMetadataError,\n createRuntimeViewportError,\n createDynamicViewportError,\n createDynamicOrRuntimeViewportError,\n createDynamicOrRuntimeMetadataError,\n logBuildDebugHint,\n createLinkBodyErrorInNavigation,\n createLinkMetadataError,\n createLinkViewportError,\n} from './blocking-route-messages'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n INSTANT_VALIDATION_BOUNDARY_NAME,\n INSTANT_SLOT_MARKER_PREFIX,\n INSTANT_SLOT_MARKER_SUFFIX,\n} from './instant-validation/boundary-constants'\nimport {\n type ValidationBoundaryTracking,\n allRequiredBoundariesRendered,\n} from './instant-validation/boundary-tracking'\nimport type { InstantValidationSampleTracking } from './instant-validation/instant-samples'\nimport { createUnrenderedSegmentError } from '../../shared/lib/instant-messages'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array<DynamicAccess>\n\n syncDynamicErrorWithStack: null | Error\n syncDynamicErrorWithStackPostMicrotask: boolean\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport Line truncated
|
||||
{"offset": {"line": 1577, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/boundary-constants.ts"],"sourcesContent":["export const INSTANT_VALIDATION_BOUNDARY_NAME =\n '__next_instant_validation_boundary__'\n\nexport const INSTANT_SLOT_MARKER_PREFIX = '__next_instant_slot_'\nexport const INSTANT_SLOT_MARKER_SUFFIX = '__'\n"],"names":["INSTANT_SLOT_MARKER_PREFIX","INSTANT_SLOT_MARKER_SUFFIX","INSTANT_VALIDATION_BOUNDARY_NAME"],"mappings":";;;;;;;;;;;;;;;IAGaA,0BAA0B,EAAA;eAA1BA;;IACAC,0BAA0B,EAAA;eAA1BA;;IAJAC,gCAAgC,EAAA;eAAhCA;;;AAAN,MAAMA,mCACX;AAEK,MAAMF,6BAA6B;AACnC,MAAMC,6BAA6B","ignoreList":[0]}},
|
||||
{"offset": {"line": 1609, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/boundary-tracking.tsx"],"sourcesContent":["export type ValidationBoundaryTracking = {\n /**\n * Map from boundary id (the SegmentPath where a validation boundary is\n * placed) to the file paths of modules inside that boundary's subtree.\n * When the boundary spans multiple parallel slots, each slot contributes\n * its own first-found module path so all unrendered segments can be\n * reported together.\n */\n requiredIds: Map<string, string[]>\n renderedIds: Set<string>\n}\n\nexport function createValidationBoundaryTracking(): ValidationBoundaryTracking {\n return {\n requiredIds: new Map(),\n renderedIds: new Set(),\n }\n}\n\nexport function allRequiredBoundariesRendered(\n state: ValidationBoundaryTracking\n): boolean {\n for (const id of state.requiredIds.keys()) {\n if (!state.renderedIds.has(id)) {\n return false\n }\n }\n return true\n}\n"],"names":["allRequiredBoundariesRendered","createValidationBoundaryTracking","requiredIds","Map","renderedIds","Set","state","id","keys","has"],"mappings":";;;;;;;;;;;;;;IAmBgBA,6BAA6B,EAAA;eAA7BA;;IAPAC,gCAAgC,EAAA;eAAhCA;;;AAAT,SAASA;IACd,OAAO;QACLC,aAAa,IAAIC;QACjBC,aAAa,IAAIC;IACnB;AACF;AAEO,SAASL,8BACdM,KAAiC;IAEjC,KAAK,MAAMC,MAAMD,MAAMJ,WAAW,CAACM,IAAI,GAAI;QACzC,IAAI,CAACF,MAAMF,WAAW,CAACK,GAAG,CAACF,KAAK;YAC9B,OAAO;QACT;IACF;IACA,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 1648, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/staged-rendering.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers'\n\nexport enum RenderStage {\n Before = 1,\n //\n ShellStatic = 11,\n Static = 13,\n //\n ShellRuntime = 21,\n Runtime = 23,\n //\n Dynamic = 30,\n //\n Abandoned = 40,\n}\n\nexport type AdvanceableRenderStage = Exclude<\n RenderStage,\n RenderStage.Before | RenderStage.Abandoned\n>\n\nexport const RENDER_STAGE_ADVANCE_ORDER: AdvanceableRenderStage[] = [\n RenderStage.ShellStatic,\n RenderStage.Static,\n //\n RenderStage.ShellRuntime,\n RenderStage.Runtime,\n //\n RenderStage.Dynamic,\n]\n\nexport function getNextStage(\n stage: Exclude<AdvanceableRenderStage, RenderStage.Dynamic>\n) {\n return RENDER_STAGE_ADVANCE_ORDER[\n RENDER_STAGE_ADVANCE_ORDER.indexOf(stage) + 1\n ]\n}\n\nexport function isAdvanceableRenderStage(\n stage: RenderStage\n): stage is AdvanceableRenderStage {\n return RenderStage.Before < stage && stage <= RenderStage.Dynamic\n}\n\nexport enum SyncIOMode {\n /** Sync IO does not error in any stage. */\n Untracked = 1,\n /** Before `partialPrefetching`: Sync IO errors in static stages, and is allowed otherwise. */\n AllowedInRuntimeOrDynamic = 2,\n /** After `partialPrefetching`: Sync IO errors in all stages other than dynamic. */\n AllowedInDynamic = 3,\n}\n\nexport class StagedRenderingController {\n private abortSignal: AbortSignal | null\n private abandonController: AbortController | null\n private syncIOMode: SyncIOMode\n public readonly finalStage: AdvanceableRenderStage | null\n\n currentStage: RenderStage = RenderStage.Before\n\n syncInterruptReason: Error | null = null\n\n triggers: Record<AdvanceableRenderStage, StageTrigger> = {\n [RenderStage.ShellStatic]: createStageTrigger(),\n [RenderStage.Static]: createStageTrigger(),\n //\n [RenderStage.ShellRuntime]: createStageTrigger(),\n [RenderStage.Runtime]: createStageTrigger(),\n //\n [RenderStage.Dynamic]: createStageTrigger(),\n }\n\n constructor({\n abortSignal,\n abandonController,\n syncIO,\n finalStage,\n }: {\n abortSignal: AbortSignal | null\n abandonController: AbortController | null\n syncIO: SyncIOMode\n finalStage: AdvanceableRenderStage | null\n }) {\n this.abortSignal = abortSignal\n this.abandonController = abandonController\n this.syncIOMode = syncIO\n this.finalStage = finalStage\n\n if (abortSignal) {\n abortSignal.addEventListener(\n 'abort',\n () => {\n // Reject all stage promises that haven't already been resolved.\n // `cancelStageTrigger` is a noop if the trigger already resolved.\n const { reason } = abortSignal\n for (const trigger of Object.values(this.triggers)) {\n cancelStageTrigger(trigger, reason)\n }\n },\n { once: true }\n )\n }\n\n if (abandonController) {\n abandonController.signal.addEventListener(\n 'abort',\n () => {\n this.abandonRender()\n },\n { once: true }\n )\n }\n }\n\n onStage(stage: AdvanceableRenderStage, callback: () => void) {\n addSyncTriggerListener(this.triggers[stage], callback)\n }\n\n shouldTrackSyncInterrupt(): boolean {\n if (this.syncIOMode === SyncIOMode.Untracked) {\n return false\n }\n\n switch (this.currentStage) {\n case RenderStage.Before:\n // If we haven't started the render yet, it can't be interrupted.\n return false\n case RenderStage.ShellStatic:\n case RenderStage.Static:\n return true\n case RenderStage.ShellRuntime:\n case RenderStage.Runtime: {\n switch (this.syncIOMode) {\n case SyncIOMode.AllowedInRuntimeOrDynamic: {\n // Before `partialPrefetching`: Sync IO only errors in static stages.\n return false\n }\n case SyncIOMode.AllowedInDynamic: {\n return true\n }\n }\n // NOT a fallthrough, but eslint doesn't understand that\n }\n case RenderStage.Dynamic:\n case RenderStage.Abandoned:\n return false\n default:\n this.currentStage satisfies never\n return false\n }\n }\n\n /** Note: only call this if `shouldTrackSyncInterrupt()` returned true */\n syncInterruptCurrentStageWithReason(reason: Error) {\n const { currentStage } = this\n if (\n currentStage === RenderStage.Before ||\n currentStage === RenderStage.Dynamic ||\n currentStage === RenderStage.Abandoned\n ) {\n // Not interruptible. Defensive noop.\n return\n }\n\n // If Sync IO occurs during an abandonable render, we trigger the abandon.\n // The abandon listener wiLine truncated
|
||||
{"offset": {"line": 1973, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/create-deduped-by-callsite-server-error-logger.ts"],"sourcesContent":["import * as React from 'react'\n\nconst errorRef: { current: null | Error } = { current: null }\n\n// React.cache is currently only available in canary/experimental React channels.\nconst cache =\n typeof React.cache === 'function'\n ? React.cache\n : (fn: (key: unknown) => void) => fn\n\n// When Cache Components is enabled, we record these as errors so that they\n// are captured by the dev overlay as it's more critical to fix these\n// when enabled.\nconst logErrorOrWarn = process.env.__NEXT_CACHE_COMPONENTS\n ? console.error\n : console.warn\n\n// We don't want to dedupe across requests.\n// The developer might've just attempted to fix the warning so we should warn again if it still happens.\nconst flushCurrentErrorIfNew = cache(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- cache key\n (key: unknown) => {\n try {\n logErrorOrWarn(errorRef.current)\n } finally {\n errorRef.current = null\n }\n }\n)\n\n/**\n * Creates a function that logs an error message that is deduped by the userland\n * callsite.\n * This requires no indirection between the call of this function and the userland\n * callsite i.e. there's only a single library frame above this.\n * Do not use on the Client where sourcemaps and ignore listing might be enabled.\n * Only use that for warnings need a fix independent of the callstack.\n *\n * @param getMessage\n * @returns\n */\nexport function createDedupedByCallsiteServerErrorLoggerDev<Args extends any[]>(\n getMessage: (...args: Args) => Error\n) {\n return function logDedupedError(...args: Args) {\n const message = getMessage(...args)\n\n if (process.env.NODE_ENV !== 'production') {\n const callStackFrames = new Error().stack?.split('\\n')\n if (callStackFrames === undefined || callStackFrames.length < 4) {\n logErrorOrWarn(message)\n } else {\n // Error:\n // logDedupedError\n // asyncApiBeingAccessedSynchronously\n // <userland callsite>\n // TODO: This breaks if sourcemaps with ignore lists are enabled.\n const key = callStackFrames[4]\n errorRef.current = message\n flushCurrentErrorIfNew(key)\n }\n } else {\n logErrorOrWarn(message)\n }\n }\n}\n"],"names":["createDedupedByCallsiteServerErrorLoggerDev","errorRef","current","cache","React","fn","logErrorOrWarn","process","env","__NEXT_CACHE_COMPONENTS","console","error","warn","flushCurrentErrorIfNew","key","getMessage","logDedupedError","args","message","NODE_ENV","callStackFrames","Error","stack","split","undefined","length"],"mappings":";;;+BAyCgBA,+CAAAA;;;eAAAA;;;+DAzCO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvB,MAAMC,WAAsC;IAAEC,SAAS;AAAK;AAE5D,iFAAiF;AACjF,MAAMC,QACJ,OAAOC,OAAMD,KAAK,KAAK,aACnBC,OAAMD,KAAK,GACX,CAACE,KAA+BA;AAEtC,2EAA2E;AAC3E,qEAAqE;AACrE,gBAAgB;AAChB,MAAMC,iBAAiBC,QAAQC,GAAG,CAACC,uBAAuB,GACtDC,QAAQC,KAAK,aACbD,QAAQE,IAAI;AAEhB,2CAA2C;AAC3C,wGAAwG;AACxG,MAAMC,yBAAyBV,MAC7B,AACA,CAACW,yEADyE;IAExE,IAAI;QACFR,eAAeL,SAASC,OAAO;IACjC,SAAU;QACRD,SAASC,OAAO,GAAG;IACrB;AACF;AAcK,SAASF,4CACde,UAAoC;IAEpC,OAAO,SAASC,gBAAgB,GAAGC,IAAU;QAC3C,MAAMC,UAAUH,cAAcE;QAE9B,IAAIV,QAAQC,GAAG,CAACW,QAAQ,KAAK,WAAc;gBACjB;YAAxB,MAAMC,kBAAAA,CAAkB,SAAA,IAAIC,QAAQC,KAAK,KAAA,OAAA,KAAA,IAAjB,OAAmBC,KAAK,CAAC;YACjD,IAAIH,oBAAoBI,aAAaJ,gBAAgBK,MAAM,GAAG,GAAG;gBAC/DnB,eAAeY;YACjB,OAAO;gBACL,SAAS;gBACT,oBAAoB;gBACpB,uCAAuC;gBACvC,wBAAwB;gBACxB,iEAAiE;gBACjE,MAAMJ,MAAMM,eAAe,CAAC,EAAE;gBAC9BnB,SAASC,OAAO,GAAGgB;gBACnBL,uBAAuBC;YACzB;QACF,OAAO;;IAGT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 2068, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/dynamic-rendering-utils.ts"],"sourcesContent":["import {\n RenderStage,\n type AdvanceableRenderStage,\n} from './app-render/staged-rendering'\nimport type {\n RequestStore,\n WorkUnitStore,\n} from './app-render/work-unit-async-storage.external'\nimport { workUnitAsyncStorage } from './app-render/work-unit-async-storage.external'\nimport { getServerReact, getClientReact } from './runtime-reacts.external'\n\nexport function isHangingPromiseRejectionError(\n err: unknown\n): err is HangingPromiseRejectionError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === HANGING_PROMISE_REJECTION\n}\n\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'\n\nclass HangingPromiseRejectionError extends Error {\n public readonly digest = HANGING_PROMISE_REJECTION\n\n constructor(\n public readonly route: string,\n public readonly expression: string\n ) {\n super(\n `During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`\n )\n }\n}\n\nconst CLIENT_HOOK_DYNAMIC = 'CLIENT_HOOK_DYNAMIC'\n\nexport class ClientHookDynamicError extends Error {\n public readonly digest = CLIENT_HOOK_DYNAMIC\n\n constructor(route: string, expression: string) {\n super(\n `Route \"${route}\": Next.js encountered URL data \\`${expression}\\` in a Client Component outside of \\`<Suspense>\\`.\\n\\n` +\n `This blocks prerendering because the value is only available at runtime.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Wrap the component in \\`<Suspense fallback={...}>\\` so the hook value streams in after prerendering\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-client-hook`\n )\n }\n}\n\nexport function isClientHookDynamicError(\n err: unknown\n): err is ClientHookDynamicError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === CLIENT_HOOK_DYNAMIC\n}\n\ntype AbortListeners = Array<() => void>\nconst abortListenersBySignal = new WeakMap<AbortSignal, AbortListeners>()\n\n/**\n * Constructs a promise that never resolves, standing in for *dynamic* data:\n * data that is only available during a real dynamic request and hangs in\n * every kind of prerender — `io()`, `connection()`, uncached `fetch()`.\n *\n * This is primarily useful for cacheComponents where we use promise\n * resolution timing to determine which parts of a render can be included in a\n * prerender.\n *\n * Records nothing on the prerender store: the promise's holes are only ever\n * filled by a real dynamic request, so a runtime prefetch response would have\n * the same holes as the static one. If the data source would resolve during a\n * runtime prerender, use `makeRuntimeHangingPromise` instead.\n *\n * @internal\n */\nexport function makeDynamicHangingPromise<T>(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise<T> {\n return makeHangingPromiseWithError(\n signal,\n new HangingPromiseRejectionError(route, expression)\n )\n}\n\nexport function makeUntrackedHangingPromise<T>(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise<T> {\n return makeHangingPromiseWithError(\n signal,\n new HangingPromiseRejectionError(route, expression)\n )\n}\n\n/**\n * Constructs a promise that never resolves, standing in for *runtime* data:\n * data that hangs during a static prerender but is available during a runtime\n * prerender (the kind that backs a runtime prefetch request: request data\n * like cookies and headers is available, but the render is still not a real\n * dynamic request). Examples: cookies, headers, fallback params,\n * searchParams, and cache entries that are excluded only from static\n * prerenders.\n *\n * Creating one of these during a static prerender records on the prerender\n * store that a runtime prefetch would produce more content than the static\n * response (`runtimeDataAccessed`), which the segment prefetch encoding uses\n * to tell the client whether a runtime prefetch request could be skipped.\n *\n * When unsure whether data is dynamic or runtime, prefer this method — the\n * cost of over-recording is a redundant runtime prefetch request; the cost of\n * under-recording is a permanently missing one.\n *\n * `workUnitStore` may be null ONLY when the caller tracks the access itself\n * at observation time instead of creation time. TLine truncated
|
||||
{"offset": {"line": 2353, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/cookies.ts"],"sourcesContent":["import {\n type ReadonlyRequestCookies,\n areCookiesMutableInCurrentPhase,\n RequestCookiesAdapter,\n} from '../web/spec-extension/adapters/request-cookies'\nimport { RequestCookies } from '../web/spec-extension/cookies'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n type PrerenderStoreModern,\n type RequestStore,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeDevtoolsIOAwarePromise,\n makeRuntimeHangingPromise,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport { isRequestApiAllowedInCurrentPhase } from './utils'\nimport { applyOwnerStack } from '../dynamic-rendering-utils'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport function cookies(): Promise<ReadonlyRequestCookies> {\n const callingExpression = 'cookies'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (workUnitStore && !isRequestApiAllowedInCurrentPhase(workUnitStore)) {\n throw new Error(\n `Route ${workStore.route} used \\`cookies()\\` inside \\`after()\\` while rendering. This is not supported. If you need this data inside an \\`after()\\` callback, use \\`cookies()\\` outside of the callback. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic we override all other logic and always just return an empty\n // cookies object without tracking\n const underlyingCookies = createEmptyCookies()\n return makeUntrackedCookies(underlyingCookies)\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`cookies()\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n const error = new Error(\n `Route ${workStore.route} used \\`cookies()\\` inside \"use cache\". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \\`cookies()\\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, cookies)\n applyOwnerStack(error)\n workStore.invalidDynamicUsageError ??= error\n throw error\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \\`cookies()\\` inside a function cached with \\`unstable_cache()\\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \\`cookies()\\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'generate-static-params':\n throw new Error(\n `Route ${workStore.route} used \\`cookies()\\` inside \\`generateStaticParams\\`. This is not supported because \\`generateStaticParams\\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`\n )\n case 'prerender':\n return makeHangingCookies(workStore, workUnitStore)\n case 'prerender-client':\n case 'validation-client':\n const exportName = '`cookies`'\n throw new InvariantError(\n `${exportName} must not be used within a Client Component. Next.js should be preventing ${exportName} from being included in Client Components statically, but did not in this case.`\n )\n case 'prerender-ppr':\n // We need track dynamic access here eagerly to keep continuity with\n // how cookies has worked in PPR without cacheComponents.\n return postponeWithTracking(\n workStore.route,\n callingExpression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-leLine truncated
|
||||
{"offset": {"line": 2586, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/draft-mode.ts"],"sourcesContent":["import {\n getDraftModeProviderForCacheScope,\n throwForMissingRequestStore,\n} from '../app-render/work-unit-async-storage.external'\n\nimport type { DraftModeProvider } from '../async-storage/draft-mode-provider'\n\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'\nimport {\n abortAndThrowOnSynchronousRequestDataAccess,\n postponeWithTracking,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { ReflectAdapter } from '../web/spec-extension/adapters/reflect'\nimport {\n applyOwnerStack,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\n\nexport function draftMode(): Promise<DraftMode> {\n const callingExpression = 'draftMode'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workStore || !workUnitStore) {\n throwForMissingRequestStore(callingExpression)\n }\n\n switch (workUnitStore.type) {\n case 'prerender-runtime': {\n // TODO(runtime-ppr): does it make sense to delay this? normally it's always microtasky\n const { stagedRendering } = workUnitStore\n if (stagedRendering) {\n return stagedRendering.delayUntilStage(\n RENDER_STAGES_BY_DATA_KIND.sessionData,\n 'draftMode',\n new DraftMode(workUnitStore.draftMode)\n )\n } else {\n return createOrGetCachedDraftMode(workUnitStore.draftMode, workStore)\n }\n }\n case 'request':\n return createOrGetCachedDraftMode(workUnitStore.draftMode, workStore)\n\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n // Inside of `\"use cache\"` or `unstable_cache`, draft mode is available if\n // the outmost work unit store is a request store (or a runtime prerender),\n // and if draft mode is enabled.\n const draftModeProvider = getDraftModeProviderForCacheScope(\n workStore,\n workUnitStore\n )\n\n if (draftModeProvider) {\n return createOrGetCachedDraftMode(draftModeProvider, workStore)\n }\n\n // Otherwise, we fall through to providing an empty draft mode.\n // eslint-disable-next-line no-fallthrough\n case 'prerender':\n case 'prerender-ppr':\n case 'prerender-legacy':\n // Return empty draft mode\n return createOrGetCachedDraftMode(null, workStore)\n case 'prerender-client':\n case 'validation-client': {\n const exportName = '`draftMode`'\n throw new InvariantError(\n `${exportName} must not be used within a Client Component. Next.js should be preventing ${exportName} from being included in Client Components statically, but did not in this case.`\n )\n }\n case 'generate-static-params':\n throw new Error(\n `Route ${workStore.route} used \\`${callingExpression}()\\` inside \\`generateStaticParams\\`. This is not supported because \\`generateStaticParams\\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`\n )\n\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createOrGetCachedDraftMode(\n draftModeProvider: DraftModeProvider | null,\n workStore: WorkStore | undefined\n): Promise<DraftMode> {\n const cacheKey = draftModeProvider ?? NullDraftMode\n const cachedDraftMode = CachedDraftModes.get(cacheKey)\n\n if (cachedDraftMode) {\n return cachedDraftMode\n }\n\n if (process.env.NODE_ENV === 'development' && !workStore?.isPrefetchRequest) {\n const route = workStore?.route\n return createDraftModeWithDevWarnings(draftModeProvider, route)\n } else {\n return Promise.resolve(new DraftMode(draftModeProvider))\n }\n}\n\ninterface CacheLifetime {}\nconst NullDraftMode = {}\nconst CachedDraftModes = new WeakMap<CacheLifetime, Promise<DraftMode>>()\n\nfunction createDraftModeWithDevWarnings(\n underlyingProvider: null | DraftModeProvider,\n route: undefined | string\n): Promise<DraftMode> {\n const instance = new DraftMode(underlyingProvider)\n const promise = Promise.resolve(instance)\n\n const proxiedPromise = new Proxy(promise, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'isEnabled':\n warnForSyncAccess(route, `\\`draftMode().${prop}\\``)\n break\n case 'enable':\n Line truncated
|
||||
{"offset": {"line": 2825, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/headers.ts"],"sourcesContent":["import {\n HeadersAdapter,\n type ReadonlyHeaders,\n} from '../web/spec-extension/adapters/headers'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n type PrerenderStoreModern,\n type RequestStore,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n trackDynamicDataInDynamicRender,\n} from '../app-render/dynamic-rendering'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n makeDevtoolsIOAwarePromise,\n makeRuntimeHangingPromise,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport { isRequestApiAllowedInCurrentPhase } from './utils'\nimport { applyOwnerStack } from '../dynamic-rendering-utils'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\n/**\n * This function allows you to read the HTTP incoming request headers in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers) and\n * [Middleware](https://nextjs.org/docs/app/building-your-application/routing/middleware).\n *\n * Read more: [Next.js Docs: `headers`](https://nextjs.org/docs/app/api-reference/functions/headers)\n */\nexport function headers(): Promise<ReadonlyHeaders> {\n const callingExpression = 'headers'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (workUnitStore && !isRequestApiAllowedInCurrentPhase(workUnitStore)) {\n throw new Error(\n `Route ${workStore.route} used \\`headers()\\` inside \\`after()\\` while rendering. This is not supported. If you need this data inside an \\`after()\\` callback, use \\`headers()\\` outside of the callback. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic we override all other logic and always just return an empty\n // headers object without tracking\n const underlyingHeaders = HeadersAdapter.seal(new Headers({}))\n return makeUntrackedHeaders(underlyingHeaders)\n }\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache': {\n const error = new Error(\n `Route ${workStore.route} used \\`headers()\\` inside \"use cache\". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \\`headers()\\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, headers)\n applyOwnerStack(error)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \\`headers()\\` inside a function cached with \\`unstable_cache()\\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \\`headers()\\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'generate-static-params':\n throw new Error(\n `Route ${workStore.route} used \\`headers()\\` inside \\`generateStaticParams\\`. This is not supported because \\`generateStaticParams\\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`\n )\n case 'prerender':\n case 'prerender-client':\n case 'validation-client':\n case 'private-cache':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n if (workStore.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${workStore.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`headers()\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-aLine truncated
|
||||
{"offset": {"line": 3059, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type { WorkUnitStore } from '../app-render/work-unit-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \\`searchParams\\` inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \\`searchParams\\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestApiAllowedInCurrentPhase(\n workUnitStore: WorkUnitStore\n): boolean {\n switch (workUnitStore.phase) {\n case 'action':\n case 'render': {\n // The request is still in progress. The API may be disallowed for other reasons,\n // but not because of phase.\n return true\n }\n case 'after': {\n // The request has finished.\n\n // If we're in a Route Handler or a Server Action,\n // request APIs can be called everywhere, even in after().\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore && (actionStore.isAppRoute || actionStore.isAction)) {\n return true\n }\n\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n if (afterTaskStore) {\n // We're in an `after` callback. Request APIs are callable if\n // the `after()` call happened in an action phase:\n // - in a Route Handler\n // - in a Server Action's body (but not the render after)\n //\n // TODO(after): Is it even possible to have `phase === 'action'` but no `actionStore`?\n // We should revisit this setup and simplify this.\n return afterTaskStore.rootTaskSpawnPhase === 'action'\n }\n\n // Otherwise, we must be in a page, in the `after` phase.\n // We don't allow calling request APIs here because we'd miss\n // them during prerendering and wouldn't know that the page is dynamic.\n return false\n }\n }\n}\n"],"names":["isRequestApiAllowedInCurrentPhase","throwForSearchParamsAccessInUseCache","throwWithStaticGenerationBailoutErrorWithDynamicError","route","expression","StaticGenBailoutError","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","workUnitStore","phase","actionStore","actionAsyncStorage","getStore","isAppRoute","isAction","afterTaskStore","afterTaskAsyncStorage","rootTaskSpawnPhase"],"mappings":";;;;;;;;;;;;;;;IA6BgBA,iCAAiC,EAAA;eAAjCA;;IAdAC,oCAAoC,EAAA;eAApCA;;IATAC,qDAAqD,EAAA;eAArDA;;;yCANsB;4CACH;+CACG;AAI/B,SAASA,sDACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIC,yBAAAA,qBAAqB,CAC7B,CAAC,MAAM,EAAEF,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASH,qCACdK,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUH,KAAK,CAAC,2XAA2X,CAAC,GADzY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAM,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEO,SAASR,kCACdY,aAA4B;IAE5B,OAAQA,cAAcC,KAAK;QACzB,KAAK;QACL,KAAK;YAAU;gBACb,iFAAiF;gBACjF,4BAA4B;gBAC5B,OAAO;YACT;QACA,KAAK;YAAS;gBACZ,4BAA4B;gBAE5B,kDAAkD;gBAClD,0DAA0D;gBAC1D,MAAMC,cAAcC,4BAAAA,kBAAkB,CAACC,QAAQ;gBAC/C,IAAIF,eAAgBA,CAAAA,YAAYG,UAAU,IAAIH,YAAYI,QAAO,GAAI;oBACnE,OAAO;gBACT;gBAEA,MAAMC,iBAAiBC,+BAAAA,qBAAqB,CAACJ,QAAQ;gBACrD,IAAIG,gBAAgB;oBAClB,6DAA6D;oBAC7D,kDAAkD;oBAClD,uBAAuB;oBACvB,yDAAyD;oBACzD,EAAE;oBACF,sFAAsF;oBACtF,kDAAkD;oBAClD,OAAOA,eAAeE,kBAAkB,KAAK;gBAC/C;gBAEA,yDAAyD;gBACzD,6DAA6D;gBAC7D,uEAAuE;gBACvE,OAAO;YACT;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 3144, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.ReactJsxDevRuntime\n"],"names":["module","exports","require","vendored","ReactJsxDevRuntime"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,kBAAkB","ignoreList":[0]}},
|
||||
{"offset": {"line": 3149, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/headers.ts"],"sourcesContent":["import type { IncomingHttpHeaders } from 'http'\n\nimport { ReflectAdapter } from './reflect'\n\n/**\n * @internal\n */\nexport class ReadonlyHeadersError extends Error {\n constructor() {\n super(\n 'Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'\n )\n }\n\n public static callable() {\n throw new ReadonlyHeadersError()\n }\n}\n\nexport type ReadonlyHeaders = Headers & {\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n append(...args: any[]): void\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n set(...args: any[]): void\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n delete(...args: any[]): void\n}\nexport class HeadersAdapter extends Headers {\n private readonly headers: IncomingHttpHeaders\n\n constructor(headers: IncomingHttpHeaders) {\n // We've already overridden the methods that would be called, so we're just\n // calling the super constructor to ensure that the instanceof check works.\n super()\n\n this.headers = new Proxy(headers, {\n get(target, prop, receiver) {\n // Because this is just an object, we expect that all \"get\" operations\n // are for properties. If it's a \"get\" for a symbol, we'll just return\n // the symbol.\n if (typeof prop === 'symbol') {\n return ReflectAdapter.get(target, prop, receiver)\n }\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return undefined.\n if (typeof original === 'undefined') return\n\n // If the original casing exists, return the value.\n return ReflectAdapter.get(target, original, receiver)\n },\n set(target, prop, value, receiver) {\n if (typeof prop === 'symbol') {\n return ReflectAdapter.set(target, prop, value, receiver)\n }\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, use the prop as the key.\n return ReflectAdapter.set(target, original ?? prop, value, receiver)\n },\n has(target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop)\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return false.\n if (typeof original === 'undefined') return false\n\n // If the original casing exists, return true.\n return ReflectAdapter.has(target, original)\n },\n deleteProperty(target, prop) {\n if (typeof prop === 'symbol')\n return ReflectAdapter.deleteProperty(target, prop)\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return true.\n if (typeof original === 'undefined') return true\n\n // If the original casing exists, delete the property.\n return ReflectAdapter.deleteProperty(target, original)\n },\n })\n }\n\n /**\n * Seals a Headers instance to prevent modification by throwing an error when\n * any mutating method is called.\n */\n public static seal(headers: Headers): ReadonlyHeaders {\n return new Proxy<ReadonlyHeaders>(headers, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'append':\n case 'delete':\n cLine truncated
|
||||
{"offset": {"line": 3357, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/reflect.ts"],"sourcesContent":["export class ReflectAdapter {\n static get<T extends object>(\n target: T,\n prop: string | symbol,\n receiver: unknown\n ): any {\n const value = Reflect.get(target, prop, receiver)\n if (typeof value === 'function') {\n return value.bind(target)\n }\n\n return value\n }\n\n static set<T extends object>(\n target: T,\n prop: string | symbol,\n value: any,\n receiver: any\n ): boolean {\n return Reflect.set(target, prop, value, receiver)\n }\n\n static has<T extends object>(target: T, prop: string | symbol): boolean {\n return Reflect.has(target, prop)\n }\n\n static deleteProperty<T extends object>(\n target: T,\n prop: string | symbol\n ): boolean {\n return Reflect.deleteProperty(target, prop)\n }\n}\n"],"names":["ReflectAdapter","get","target","prop","receiver","value","Reflect","bind","set","has","deleteProperty"],"mappings":";;;+BAAaA,kBAAAA;;;eAAAA;;;AAAN,MAAMA;IACX,OAAOC,IACLC,MAAS,EACTC,IAAqB,EACrBC,QAAiB,EACZ;QACL,MAAMC,QAAQC,QAAQL,GAAG,CAACC,QAAQC,MAAMC;QACxC,IAAI,OAAOC,UAAU,YAAY;YAC/B,OAAOA,MAAME,IAAI,CAACL;QACpB;QAEA,OAAOG;IACT;IAEA,OAAOG,IACLN,MAAS,EACTC,IAAqB,EACrBE,KAAU,EACVD,QAAa,EACJ;QACT,OAAOE,QAAQE,GAAG,CAACN,QAAQC,MAAME,OAAOD;IAC1C;IAEA,OAAOK,IAAsBP,MAAS,EAAEC,IAAqB,EAAW;QACtE,OAAOG,QAAQG,GAAG,CAACP,QAAQC;IAC7B;IAEA,OAAOO,eACLR,MAAS,EACTC,IAAqB,EACZ;QACT,OAAOG,QAAQI,cAAc,CAACR,QAAQC;IACxC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 3388, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/request-cookies.ts"],"sourcesContent":["import { RequestCookies } from '../cookies'\n\nimport { ResponseCookies } from '../cookies'\nimport { ReflectAdapter } from './reflect'\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external'\nimport type { RequestStore } from '../../../app-render/work-unit-async-storage.external'\nimport { ActionDidRevalidateStaticAndDynamic } from '../../../../shared/lib/action-revalidation-kind'\n\n/**\n * @internal\n */\nexport class ReadonlyRequestCookiesError extends Error {\n constructor() {\n super(\n 'Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'\n )\n }\n\n public static callable() {\n throw new ReadonlyRequestCookiesError()\n }\n}\n\n// We use this to type some APIs but we don't construct instances directly\nexport type { ResponseCookies }\n\n// The `cookies()` API is a mix of request and response cookies. For `.get()` methods,\n// we want to return the request cookie if it exists. For mutative methods like `.set()`,\n// we want to return the response cookie.\nexport type ReadonlyRequestCookies = Omit<\n RequestCookies,\n 'set' | 'clear' | 'delete'\n> &\n Pick<ResponseCookies, 'set' | 'delete'>\n\nexport class RequestCookiesAdapter {\n public static seal(cookies: RequestCookies): ReadonlyRequestCookies {\n return new Proxy(cookies as any, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'clear':\n case 'delete':\n case 'set':\n return ReadonlyRequestCookiesError.callable\n default:\n return ReflectAdapter.get(target, prop, receiver)\n }\n },\n })\n }\n\n /**\n * @param cookies\n * @returns A fresh object identity backed by the original value\n */\n public static fresh(cookies: ReadonlyRequestCookies): ReadonlyRequestCookies {\n return new Proxy(cookies, {\n get(target, prop, receiver) {\n return ReflectAdapter.get(target, prop, receiver)\n },\n })\n }\n}\n\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies')\n\nexport function getModifiedCookieValues(\n cookies: ResponseCookies\n): ResponseCookie[] {\n const modified: ResponseCookie[] | undefined = (cookies as unknown as any)[\n SYMBOL_MODIFY_COOKIE_VALUES\n ]\n if (!modified || !Array.isArray(modified) || modified.length === 0) {\n return []\n }\n\n return modified\n}\n\ntype SetCookieArgs =\n | [key: string, value: string, cookie?: Partial<ResponseCookie>]\n | [options: ResponseCookie]\n\nexport function appendMutableCookies(\n headers: Headers,\n mutableCookies: ResponseCookies\n): boolean {\n const modifiedCookieValues = getModifiedCookieValues(mutableCookies)\n if (modifiedCookieValues.length === 0) {\n return false\n }\n\n // Return a new response that extends the response with\n // the modified cookies as fallbacks. `res` cookies\n // will still take precedence.\n const resCookies = new ResponseCookies(headers)\n const returnedCookies = resCookies.getAll()\n\n // Set the modified cookies as fallbacks.\n for (const cookie of modifiedCookieValues) {\n resCookies.set(cookie)\n }\n\n // Set the original cookies as the final values.\n for (const cookie of returnedCookies) {\n resCookies.set(cookie)\n }\n\n return true\n}\n\ntype ResponseCookie = NonNullable<\n ReturnType<InstanceType<typeof ResponseCookies>['get']>\n>\n\nexport class MutableRequestCookiesAdapter {\n public static wrap(\n cookies: RequestCookies,\n onUpdateCookies?: (cookies: string[]) => void\n ): ResponseCookies {\n const responseCookies = new ResponseCookies(new Headers())\n for (const cookie of cookies.getAll()) {\n responseCookies.set(cookie)\n }\n\n let modifiedValues: ResponseCookie[] = []\n const modifiedCookies = new Set<string>()\n const updateResponseCookies = () => {\n // TODO-APP: change method of getting workStore\n const workStore = workAsyncStorage.getStore()\n if (workStore) {\n workStore.pathWasRevalidated = ActionDidRevalidateStaticAndDynamic\n }\n\n const allCookies = responseCookies.getAll()\n modifiedValues = allCookies.filter((c) => modifiedCookies.has(c.name))\n if (onUpdateCookies) {\n const serializedCookies: string[] = []\n for (const cookie of modifiedValues) {\n const tempCookies = new ResponseCookies(new Headers())\n tempCookies.set(cookie)\n serializedCookies.push(tempCookies.toString())\n }\n\n onUpdateCookies(serializedCookies)\n }\n }\n\n const wrappedCookies = new Proxy(responseCookies, {\n get(target, prop, receiver) {\n switch (prop) {\n // A special symbol toLine truncated
|
||||
{"offset": {"line": 3615, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/cookies.ts"],"sourcesContent":["export {\n RequestCookies,\n ResponseCookies,\n stringifyCookie,\n} from 'next/dist/compiled/@edge-runtime/cookies'\n"],"names":["RequestCookies","ResponseCookies","stringifyCookie"],"mappings":";;;;;;;;;;;;;;;IACEA,cAAc,EAAA;eAAdA,SAAAA,cAAc;;IACdC,eAAe,EAAA;eAAfA,SAAAA,eAAe;;IACfC,eAAe,EAAA;eAAfA,SAAAA,eAAe;;;yBACV","ignoreList":[0]}},
|
||||
{"offset": {"line": 3645, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/action-revalidation-kind.ts"],"sourcesContent":["export type ActionRevalidationKind = 0 | 1 | 2\n\nexport const ActionDidNotRevalidate = 0\nexport const ActionDidRevalidateStaticAndDynamic = 1\nexport const ActionDidRevalidateDynamicOnly = 2\n"],"names":["ActionDidNotRevalidate","ActionDidRevalidateDynamicOnly","ActionDidRevalidateStaticAndDynamic"],"mappings":";;;;;;;;;;;;;;;IAEaA,sBAAsB,EAAA;eAAtBA;;IAEAC,8BAA8B,EAAA;eAA9BA;;IADAC,mCAAmC,EAAA;eAAnCA;;;AADN,MAAMF,yBAAyB;AAC/B,MAAME,sCAAsC;AAC5C,MAAMD,iCAAiC","ignoreList":[0]}},
|
||||
{"offset": {"line": 3677, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/instant-messages.ts"],"sourcesContent":["export function createUnrenderedSegmentError(\n route: string,\n missingFiles: readonly string[]\n): Error {\n let message = `Route \"${route}\": Could not validate that a segment in your UI has instant navigation.`\n if (missingFiles.length > 0) {\n const label =\n missingFiles.length === 1 ? 'Dropped segment' : 'Dropped segments'\n message +=\n `\\n\\nThis segment was dropped from rendering. Issues that would prevent instant navigation will go undetected.` +\n `\\n\\n${label}:\\n${missingFiles.map((p) => ` ${p}`).join('\\n')}` +\n `\\n\\nWays to fix this:` +\n `\\n - [render] Render the dropped segment` +\n `\\n - [ignore] Set \\`export const instant = false\\` to opt the dropped segment out of instant-navigation validation` +\n `\\n\\nLearn more: https://nextjs.org/docs/messages/instant-unrendered-segment`\n }\n return new Error(message)\n}\n\nexport function createLinkPrefetchPartialError(pathname: string): Error {\n return new Error(\n `Next.js encountered dynamic data during prefetching for \"${pathname}\".\\n\\n` +\n `This will lead to slower, more expensive prefetches.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [upgrade] Opt into Partial Prefetching by exporting \\`const prefetch = 'partial'\\` from the page or layout, or by setting \\`partialPrefetching: true\\` in next.config to opt the whole app in\\n` +\n ` - [disable] Remove \\`prefetch={true}\\` from the <Link> to use the default prefetch\\n` +\n ` - [ignore] Set \\`export const instant = false\\` to opt the route out of instant-navigation validation\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/instant-link-prefetch-partial`\n )\n}\n"],"names":["createLinkPrefetchPartialError","createUnrenderedSegmentError","route","missingFiles","message","length","label","map","p","join","Error","pathname"],"mappings":";;;;;;;;;;;;;;IAmBgBA,8BAA8B,EAAA;eAA9BA;;IAnBAC,4BAA4B,EAAA;eAA5BA;;;AAAT,SAASA,6BACdC,KAAa,EACbC,YAA+B;IAE/B,IAAIC,UAAU,CAAC,OAAO,EAAEF,MAAM,uEAAuE,CAAC;IACtG,IAAIC,aAAaE,MAAM,GAAG,GAAG;QAC3B,MAAMC,QACJH,aAAaE,MAAM,KAAK,IAAI,oBAAoB;QAClDD,WACE,CAAC,6GAA6G,CAAC,GAC/G,CAAC,IAAI,EAAEE,MAAM,GAAG,EAAEH,aAAaI,GAAG,CAAC,CAACC,IAAM,CAAC,EAAE,EAAEA,GAAG,EAAEC,IAAI,CAAC,OAAO,GAChE,CAAC,qBAAqB,CAAC,GACvB,CAAC,yCAAyC,CAAC,GAC3C,CAAC,mHAAmH,CAAC,GACrH,CAAC,2EAA2E,CAAC;IACjF;IACA,OAAO,OAAA,cAAkB,CAAlB,IAAIC,MAAMN,UAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAiB;AAC1B;AAEO,SAASJ,+BAA+BW,QAAgB;IAC7D,OAAO,OAAA,cAQN,CARM,IAAID,MACT,CAAC,yDAAyD,EAAEC,SAAS,MAAM,CAAC,GAC1E,CAAC,wDAAwD,CAAC,GAC1D,CAAC,mBAAmB,CAAC,GACrB,CAAC,mMAAmM,CAAC,GACrM,CAAC,sFAAsF,CAAC,GACxF,CAAC,2GAA2G,CAAC,GAC7G,CAAC,0EAA0E,CAAC,GAPzE,qBAAA;eAAA;oBAAA;sBAAA;IAQP;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 3721, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":";;;+BAAaA,kBAAAA;;;eAAAA;;;AAAN,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACH,CAAC,WAAW,EAAED,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,IAAI,0BAA0B,CAAC,EACzFC;QAFF,OAAA,cAGC,CAHD,IAGC,EAHD,qBAAA;mBAAA;wBAAA;0BAAA;QAGA;QACA,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 3745, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BailoutToCSRError","isBailoutToCSRError","BAILOUT_TO_CSR","Error","constructor","reason","digest","err"],"mappings":"AAAA,+GAA+G;;;;;;;;;;;;;;;IAIlGA,iBAAiB,EAAA;eAAjBA;;IASGC,mBAAmB,EAAA;eAAnBA;;;AAZhB,MAAMC,iBAAiB;AAGhB,MAAMF,0BAA0BG;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAC,CAAC,mCAAmC,EAAEA,QAAQ,GAAA,IAAA,CAD1BA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASJ;IAIzB;AACF;AAGO,SAASD,oBAAoBM,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAE,GAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAID,MAAM,KAAKJ;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 3783, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/promise-with-resolvers.ts"],"sourcesContent":["export function createPromiseWithResolvers<T>(): PromiseWithResolvers<T> {\n // Shim of Stage 4 Promise.withResolvers proposal\n let resolve: (value: T | PromiseLike<T>) => void\n let reject: (reason: any) => void\n const promise = new Promise<T>((res, rej) => {\n resolve = res\n reject = rej\n })\n return { resolve: resolve!, reject: reject!, promise }\n}\n"],"names":["createPromiseWithResolvers","resolve","reject","promise","Promise","res","rej"],"mappings":";;;+BAAgBA,8BAAAA;;;eAAAA;;;AAAT,SAASA;IACd,iDAAiD;IACjD,IAAIC;IACJ,IAAIC;IACJ,MAAMC,UAAU,IAAIC,QAAW,CAACC,KAAKC;QACnCL,UAAUI;QACVH,SAASI;IACX;IACA,OAAO;QAAEL,SAASA;QAAUC,QAAQA;QAASC;IAAQ;AACvD","ignoreList":[0]}},
|
||||
{"offset": {"line": 3809, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/headers.js"],"sourcesContent":["module.exports.cookies = require('./dist/server/request/cookies').cookies\nmodule.exports.headers = require('./dist/server/request/headers').headers\nmodule.exports.draftMode = require('./dist/server/request/draft-mode').draftMode\n"],"names":["module","exports","cookies","headers","draftMode"],"mappings":"AAAAA,OAAOC,OAAO,CAACC,OAAO,GAAG,6GAAyCA,OAAO;AACzEF,OAAOC,OAAO,CAACE,OAAO,GAAG,6GAAyCA,OAAO;AACzEH,OAAOC,OAAO,CAACG,SAAS,GAAG,gHAA4CA,SAAS","ignoreList":[0]}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n RequestCookies: () => RequestCookies,\n ResponseCookies: () => ResponseCookies,\n parseCookie: () => parseCookie,\n parseSetCookie: () => parseSetCookie,\n stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n var _a;\n const attrs = [\n \"path\" in c && c.path && `Path=${c.path}`,\n \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n \"domain\" in c && c.domain && `Domain=${c.domain}`,\n \"secure\" in c && c.secure && \"Secure\",\n \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n \"partitioned\" in c && c.partitioned && \"Partitioned\",\n \"priority\" in c && c.priority && `Priority=${c.priority}`\n ].filter(Boolean);\n const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n const map = /* @__PURE__ */ new Map();\n for (const pair of cookie.split(/; */)) {\n if (!pair)\n continue;\n const splitAt = pair.indexOf(\"=\");\n if (splitAt === -1) {\n map.set(pair, \"true\");\n continue;\n }\n const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n try {\n map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n } catch {\n }\n }\n return map;\n}\nfunction parseSetCookie(setCookie) {\n if (!setCookie) {\n return void 0;\n }\n const [[name, value], ...attributes] = parseCookie(setCookie);\n const {\n domain,\n expires,\n httponly,\n maxage,\n path,\n samesite,\n secure,\n partitioned,\n priority\n } = Object.fromEntries(\n attributes.map(([key, value2]) => [\n key.toLowerCase().replace(/-/g, \"\"),\n value2\n ])\n );\n const cookie = {\n name,\n value: decodeURIComponent(value),\n domain,\n ...expires && { expires: new Date(expires) },\n ...httponly && { httpOnly: true },\n ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n path,\n ...samesite && { sameSite: parseSameSite(samesite) },\n ...secure && { secure: true },\n ...priority && { priority: parsePriority(priority) },\n ...partitioned && { partitioned: true }\n };\n return compact(cookie);\n}\nfunction compact(t) {\n const newT = {};\n for (const key in t) {\n if (t[key]) {\n newT[key] = t[key];\n }\n }\n return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n string = string.toLowerCase();\n return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n string = string.toLowerCase();\n return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n if (!cookiesString)\n return [];\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n }\n while (pos < cookiesString.length) {\n start = pos;\n cookiesSeparatorFound = false;\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos);\n if (ch === \",\") {\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n Line truncated
|
||||
{"offset": {"line": 374, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/app-call-server.ts"],"sourcesContent":["import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n return new Promise((resolve, reject) => {\n startTransition(() => {\n dispatchAppRouterAction({\n type: ACTION_SERVER_ACTION,\n actionId,\n actionArgs,\n resolve,\n reject,\n })\n })\n })\n}\n"],"names":["startTransition","ACTION_SERVER_ACTION","dispatchAppRouterAction","callServer","actionId","actionArgs","Promise","resolve","reject","type"],"mappings":";;;;AAAA,SAASA,eAAe,QAAQ,QAAO;AACvC,SAASC,oBAAoB,QAAQ,mDAAkD;AACvF,SAASC,uBAAuB,QAAQ,gCAA+B;;;;AAEhE,eAAeC,WAAWC,QAAgB,EAAEC,UAAiB;IAClE,OAAO,IAAIC,QAAQ,CAACC,SAASC;YAC3BR,wNAAAA,EAAgB;gBACdE,gNAAAA,EAAwB;gBACtBO,MAAMR,sOAAAA;gBACNG;gBACAC;gBACAE;gBACAC;YACF;QACF;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 401, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/app-find-source-map-url.ts"],"sourcesContent":["const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n // Source maps are only served by the dev server.\n process.env.__NEXT_DEV_SERVER\n ? function findSourceMapURL(filename: string): string | null {\n if (filename === '') {\n return null\n }\n\n if (\n filename.startsWith(document.location.origin) &&\n filename.includes('/_next/static')\n ) {\n // This is a request for a client chunk. This can only happen when\n // using Turbopack. In this case, since we control how those source\n // maps are generated, we can safely assume that the sourceMappingURL\n // is relative to the filename, with an added `.map` extension. The\n // browser can just request this file, and it gets served through the\n // normal dev server, without the need to route this through\n // the `/__nextjs_source-map` dev middleware.\n return `${filename}.map`\n }\n\n const url = new URL(pathname, document.location.origin)\n url.searchParams.set('filename', filename)\n\n return url.href\n }\n : undefined\n"],"names":["basePath","process","env","__NEXT_ROUTER_BASEPATH","pathname","findSourceMapURL","__NEXT_DEV_SERVER","filename","startsWith","document","location","origin","includes","url","URL","searchParams","set","href","undefined"],"mappings":";;;;AAAA,MAAMA,WAAWC,QAAQC,GAAG,CAACC,sBAAsB,MAAI;AACvD,MAAMC,WAAW,GAAGJ,SAAS,oBAAoB,CAAC;AAE3C,MAAMK,mBACX,AACAJ,QAAQC,GAAG,CAACI,iBAAiB,UACzB,SAASD,CAFoC,gBAEnBE,QAAgB;IACxC,IAAIA,aAAa,IAAI;QACnB,OAAO;IACT;IAEA,IACEA,SAASC,UAAU,CAACC,SAASC,QAAQ,CAACC,MAAM,KAC5CJ,SAASK,QAAQ,CAAC,kBAClB;QACA,kEAAkE;QAClE,mEAAmE;QACnE,qEAAqE;QACrE,mEAAmE;QACnE,qEAAqE;QACrE,4DAA4D;QAC5D,6CAA6C;QAC7C,OAAO,GAAGL,SAAS,IAAI,CAAC;IAC1B;IAEA,MAAMM,MAAM,IAAIC,IAAIV,UAAUK,SAASC,QAAQ,CAACC,MAAM;IACtDE,IAAIE,YAAY,CAACC,GAAG,CAAC,YAAYT;IAEjC,OAAOM,IAAII,IAAI;AACjB,IACAC,UAAS","ignoreList":[0]}},
|
||||
{"offset": {"line": 429, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\n// Cookie for the Instant Navigation Testing API. Sent automatically with all\n// requests while a navigation lock is held; the server uses its presence to\n// render only the shell. Not exposed in production builds by default.\nexport const NEXT_INSTANT_TEST_COOKIE =\n 'next-instant-navigation-testing' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\nexport const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id' as const\nexport const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id' as const\n\n// TODO: Should this include nextjs in the name, like the others?\nexport const NEXT_ACTION_REVALIDATED_HEADER = 'x-action-revalidated' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_URL","RSC_CONTENT_TYPE_HEADER","NEXT_INSTANT_TEST_COOKIE","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER","NEXT_REQUEST_ID_HEADER","NEXT_HTML_REQUEST_ID_HEADER","NEXT_ACTION_REVALIDATED_HEADER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,aAAa,MAAc;AACjC,MAAMC,gBAAgB,cAAsB;AAI5C,MAAMC,gCAAgC,yBAAiC;AACvE,MAAMC,8BAA8B,uBAA+B;AAKnE,MAAMC,sCACX,+BAAuC;AAClC,MAAMC,0BAA0B,mBAA2B;AAC3D,MAAMC,WAAW,WAAmB;AACpC,MAAMC,0BAA0B,mBAA2B;AAK3D,MAAMC,2BACX,kCAA0C;AAErC,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEH,MAAMM,uBAAuB,OAAe;AAE5C,MAAMC,gCAAgC,sBAA8B;AACpE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,6BAA6B,0BAAkC;AACrE,MAAMC,8BAA8B,2BAAmC;AACvE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,+BAA+B,4BAAoC;AACzE,MAAMC,yBAAyB,sBAA8B;AAC7D,MAAMC,8BAA8B,2BAAmC;AAGvE,MAAMC,iCAAiC,uBAA+B","ignoreList":[0]}},
|
||||
{"offset": {"line": 501, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/bfcache-state-manager.ts"],"sourcesContent":["import type {\n CacheNode,\n FlightRouterState,\n} from '../../shared/lib/app-router-types'\nimport { useState } from 'react'\n\n// When the flag is disabled, only track the currently active tree\nconst MAX_BF_CACHE_ENTRIES = process.env.__NEXT_CACHE_COMPONENTS ? 3 : 1\n\nexport type RouterBFCacheEntry = {\n tree: FlightRouterState\n cacheNode: CacheNode\n stateKey: string\n // The entries form a linked list, sorted in order of most recently active.\n next: RouterBFCacheEntry | null\n}\n\n/**\n * Keeps track of the most recent N trees (FlightRouterStates) that were active\n * at a certain segment level. E.g. for a segment \"/a/b/[param]\", this hook\n * tracks the last N param values that the router rendered for N.\n *\n * The result of this hook precisely determines the number and order of\n * trees that are rendered in parallel at their segment level.\n *\n * The purpose of this cache is to we can preserve the React and DOM state of\n * some number of inactive trees, by rendering them in an <Activity> boundary.\n * That means it would not make sense for the the lifetime of the cache to be\n * any longer than the lifetime of the React tree; e.g. if the hook were\n * unmounted, then the React tree would be, too. So, we use React state to\n * manage it.\n *\n * Note that we don't store the RSC data for the cache entries in this hook —\n * the data for inactive segments is stored in the parent CacheNode, which\n * *does* have a longer lifetime than the React tree. This hook only determines\n * which of those trees should have their *state* preserved, by <Activity>.\n */\nexport function useRouterBFCache(\n activeTree: FlightRouterState,\n activeCacheNode: CacheNode,\n activeStateKey: string\n): RouterBFCacheEntry {\n // The currently active entry. The entries form a linked list, sorted in\n // order of most recently active. This allows us to reuse parts of the list\n // without cloning, unless there's a reordering or removal.\n // TODO: Once we start tracking back/forward history at each route level,\n // we should use the history order instead. In other words, when traversing\n // to an existing entry as a result of a popstate event, we should maintain\n // the existing order instead of moving it to the front of the list. I think\n // an initial implementation of this could be to pass an incrementing id\n // to history.pushState/replaceState, then use that here for ordering.\n const [prevActiveEntry, setPrevActiveEntry] = useState<RouterBFCacheEntry>(\n () => {\n const initialEntry: RouterBFCacheEntry = {\n tree: activeTree,\n cacheNode: activeCacheNode,\n stateKey: activeStateKey,\n next: null,\n }\n return initialEntry\n }\n )\n\n if (prevActiveEntry.tree === activeTree) {\n // Fast path. The active tree hasn't changed, so we can reuse the\n // existing state.\n return prevActiveEntry\n }\n\n // The route tree changed. Note that this doesn't mean that the tree changed\n // *at this level* — the change may be due to a child route. Either way, we\n // need to either add or update the router tree in the bfcache.\n //\n // The rest of the code looks more complicated than it actually is because we\n // can't mutate the state in place; we have to copy-on-write.\n\n // Create a new entry for the active cache key. This is the head of the new\n // linked list.\n const newActiveEntry: RouterBFCacheEntry = {\n tree: activeTree,\n cacheNode: activeCacheNode,\n stateKey: activeStateKey,\n next: null,\n }\n\n // We need to append the old list onto the new list. If the head of the new\n // list was already present in the cache, then we'll need to clone everything\n // that came before it. Then we can reuse the rest.\n let n = 1\n let oldEntry: RouterBFCacheEntry | null = prevActiveEntry\n let clonedEntry: RouterBFCacheEntry = newActiveEntry\n while (oldEntry !== null && n < MAX_BF_CACHE_ENTRIES) {\n if (oldEntry.stateKey === activeStateKey) {\n // Fast path. This entry in the old list that corresponds to the key that\n // is now active. We've already placed a clone of this entry at the front\n // of the new list. We can reuse the rest of the old list without cloning.\n // NOTE: We don't need to worry about eviction in this case because we\n // haven't increased the size of the cache, and we assume the max size\n // is constant across renders. If we were to change it to a dynamic limit,\n // then the implementation would need to account for that.\n clonedEntry.next = oldEntry.next\n break\n } else {\n // Clone the entry and append it to the list.\n n++\n const entry: RouterBFCacheEntry = {\n tree: oldEntry.tree,\n cacheNode: oldEntry.cLine truncated
|
||||
{"offset": {"line": 585, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/client-boundary-params.ts"],"sourcesContent":["// Client-safe creation of the params/searchParams passed to client Page and\n// Segment components. On the server these produce dynamically-tracked values;\n// in the browser bundle this module is aliased to\n// `./client-boundary-params.browser` (see\n// scripts/generate-browser-variant-aliases.mjs), which produces the render-time\n// values. Both variants share the same call signature, so consumers call them\n// without branching on `typeof window`.\nexport { createParamsFromClient as createClientParams } from '../../server/request/params'\nexport { createSearchParamsFromClient as createClientSearchParams } from '../../server/request/search-params'\n"],"names":["createParamsFromClient","createClientParams","createSearchParamsFromClient","createClientSearchParams"],"mappings":";AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,kDAAkD;AAClD,0CAA0C;AAC1C,gFAAgF;AAChF,8EAA8E;AAC9E,wCAAwC;AACxC,SAASA,0BAA0BC,kBAAkB,QAAQ,8BAA6B;AAC1F,SAASC,gCAAgCC,wBAAwB,QAAQ,qCAAoC","ignoreList":[0]}},
|
||||
{"offset": {"line": 601, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/client-page.tsx"],"sourcesContent":["'use client'\n\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { Params } from '../../server/request/params'\nimport { LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { use } from 'react'\nimport { urlSearchParamsToParsedUrlQuery } from '../route-params'\nimport { SearchParamsContext } from '../../shared/lib/hooks-client-context.shared-runtime'\nimport {\n createClientParams,\n createClientSearchParams,\n} from './client-boundary-params'\n\n/**\n * When the Page is a client component we send the params and searchParams to this client wrapper\n * where they are turned into dynamically tracked values before being passed to the actual Page component.\n *\n * additionally we may send promises representing the params and searchParams. We don't ever use these passed\n * values but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations.\n * It is up to the caller to decide if the promises are needed.\n */\nexport function ClientPageRoot({\n Component,\n serverProvidedParams,\n}: {\n Component: React.ComponentType<any>\n serverProvidedParams: null | {\n searchParams: ParsedUrlQuery\n params: Params\n promises: Array<Promise<any>> | null\n }\n}) {\n let searchParams: ParsedUrlQuery\n let params: Params\n if (serverProvidedParams !== null) {\n searchParams = serverProvidedParams.searchParams\n params = serverProvidedParams.params\n } else {\n // When Cache Components is enabled, the server does not pass the params as\n // props; they are parsed on the client and passed via context.\n const layoutRouterContext = use(LayoutRouterContext)\n params =\n layoutRouterContext !== null ? layoutRouterContext.parentParams : {}\n\n // This is an intentional behavior change: when Cache Components is enabled,\n // client segments receive the \"canonical\" search params, not the\n // rewritten ones. Users should either call useSearchParams directly or pass\n // the rewritten ones in from a Server Component.\n // TODO: Log a deprecation error when this object is accessed\n searchParams = urlSearchParamsToParsedUrlQuery(use(SearchParamsContext)!)\n }\n\n const clientSearchParams = createClientSearchParams(searchParams)\n const clientParams = createClientParams(params)\n\n return <Component params={clientParams} searchParams={clientSearchParams} />\n}\n"],"names":["LayoutRouterContext","use","urlSearchParamsToParsedUrlQuery","SearchParamsContext","createClientParams","createClientSearchParams","ClientPageRoot","Component","serverProvidedParams","searchParams","params","layoutRouterContext","parentParams","clientSearchParams","clientParams"],"mappings":";;;;;AAIA,SAASA,mBAAmB,QAAQ,qDAAoD;AACxF,SAASC,GAAG,QAAQ,QAAO;AAC3B,SAASC,+BAA+B,QAAQ,kBAAiB;AACjE,SAASC,mBAAmB,QAAQ,uDAAsD;;;AAC1F,SACEC,kBAAkB,EAClBC,wBAAwB,QACnB,2BAA0B;AAXjC;;;;;;;AAqBO,SAASC,eAAe,EAC7BC,SAAS,EACTC,oBAAoB,EAQrB;IACC,IAAIC;IACJ,IAAIC;IACJ,IAAIF,yBAAyB,MAAM;QACjCC,eAAeD,qBAAqBC,YAAY;QAChDC,SAASF,qBAAqBE,MAAM;IACtC,OAAO;QACL,2EAA2E;QAC3E,+DAA+D;QAC/D,MAAMC,0BAAsBV,4MAAAA,EAAID,oPAAAA;QAChCU,SACEC,wBAAwB,OAAOA,oBAAoBC,YAAY,GAAG,CAAC;QAErE,4EAA4E;QAC5E,iEAAiE;QACjE,4EAA4E;QAC5E,iDAAiD;QACjD,6DAA6D;QAC7DH,mBAAeP,mMAAAA,MAAgCD,4MAAAA,EAAIE,sPAAAA;IACrD;IAEA,MAAMU,yBAAqBR,oRAAAA,EAAyBI;IACpD,MAAMK,mBAAeV,wPAAAA,EAAmBM;IAExC,OAAA,WAAA,OAAO,8NAAA,EAACH,WAAAA;QAAUG,QAAQI;QAAcL,cAAcI;;AACxD","ignoreList":[0]}},
|
||||
{"offset": {"line": 649, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/client-segment.tsx"],"sourcesContent":["'use client'\n\nimport type { Params } from '../../server/request/params'\nimport { LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { use } from 'react'\nimport { createClientParams } from './client-boundary-params'\n\n/**\n * When the Page is a client component we send the params to this client wrapper\n * where they are turned into dynamically tracked values before being passed to the actual Segment component.\n *\n * additionally we may send a promise representing params. We don't ever use this passed\n * value but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations\n * such as when cacheComponents is enabled. It is up to the caller to decide if the promises are needed.\n */\nexport function ClientSegmentRoot({\n Component,\n slots,\n serverProvidedParams,\n}: {\n Component: React.ComponentType<any>\n slots: { [key: string]: React.ReactNode }\n serverProvidedParams: null | {\n params: Params\n promises: Array<Promise<any>> | null\n }\n}) {\n let params: Params\n if (serverProvidedParams !== null) {\n params = serverProvidedParams.params\n } else {\n // When Cache Components is enabled, the server does not pass the params\n // as props; they are parsed on the client and passed via context.\n const layoutRouterContext = use(LayoutRouterContext)\n params =\n layoutRouterContext !== null ? layoutRouterContext.parentParams : {}\n }\n\n const clientParams = createClientParams(params)\n\n return <Component {...slots} params={clientParams} />\n}\n"],"names":["LayoutRouterContext","use","createClientParams","ClientSegmentRoot","Component","slots","serverProvidedParams","params","layoutRouterContext","parentParams","clientParams"],"mappings":";;;;;AAGA,SAASA,mBAAmB,QAAQ,qDAAoD;AACxF,SAASC,GAAG,QAAQ,QAAO;;AAC3B,SAASC,kBAAkB,QAAQ,2BAA0B;AAL7D;;;;;AAeO,SAASC,kBAAkB,EAChCC,SAAS,EACTC,KAAK,EACLC,oBAAoB,EAQrB;IACC,IAAIC;IACJ,IAAID,yBAAyB,MAAM;QACjCC,SAASD,qBAAqBC,MAAM;IACtC,OAAO;QACL,wEAAwE;QACxE,kEAAkE;QAClE,MAAMC,0BAAsBP,4MAAAA,EAAID,oPAAAA;QAChCO,SACEC,wBAAwB,OAAOA,oBAAoBC,YAAY,GAAG,CAAC;IACvE;IAEA,MAAMC,mBAAeR,wPAAAA,EAAmBK;IAExC,OAAA,WAAA,OAAO,8NAAA,EAACH,WAAAA;QAAW,GAAGC,KAAK;QAAEE,QAAQG;;AACvC","ignoreList":[0]}},
|
||||
{"offset": {"line": 683, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/error-boundary.tsx"],"sourcesContent":["'use client'\n\nimport React, { startTransition, type JSX } from 'react'\nimport { useUntrackedPathname } from './navigation-untracked'\nimport { isNextRouterError } from './is-next-router-error'\nimport { handleHardNavError } from './nav-failure-handler'\nimport { handleISRError } from './handle-isr-error'\nimport { isBot } from '../../shared/lib/router/utils/is-bot'\nimport {\n AppRouterContext,\n type AppRouterInstance,\n} from '../../shared/lib/app-router-context.shared-runtime'\n\nconst isBotUserAgent =\n typeof window !== 'undefined' && isBot(window.navigator.userAgent)\n\nexport type ErrorInfo = {\n error: unknown\n reset: () => void\n retry: () => void\n}\n\nexport type ErrorComponent = React.ComponentType<ErrorInfo>\n\nexport interface ErrorBoundaryProps {\n children?: React.ReactNode\n errorComponent: ErrorComponent | undefined\n errorStyles?: React.ReactNode | undefined\n errorScripts?: React.ReactNode | undefined\n}\n\ninterface ErrorBoundaryHandlerProps extends ErrorBoundaryProps {\n pathname: string | null\n errorComponent: ErrorComponent\n}\n\ninterface ErrorBoundaryHandlerState {\n error: null | { thrownValue: unknown }\n previousPathname: string | null\n}\n\nexport class ErrorBoundaryHandler extends React.Component<\n ErrorBoundaryHandlerProps,\n ErrorBoundaryHandlerState\n> {\n static contextType = AppRouterContext\n declare context: AppRouterInstance | null\n\n constructor(props: ErrorBoundaryHandlerProps) {\n super(props)\n this.state = {\n error: null,\n previousPathname: this.props.pathname,\n }\n }\n\n static getDerivedStateFromError(\n thrownValue: unknown\n ): Partial<ErrorBoundaryHandlerState> {\n if (isNextRouterError(thrownValue)) {\n // Re-throw if an expected internal Next.js router error occurs\n // this means it should be handled by a different boundary (such as a NotFound boundary in a parent segment)\n throw thrownValue\n }\n\n return { error: { thrownValue } }\n }\n\n static getDerivedStateFromProps(\n props: ErrorBoundaryHandlerProps,\n state: ErrorBoundaryHandlerState\n ): ErrorBoundaryHandlerState | null {\n const { error } = state\n\n // if we encounter an error while\n // a navigation is pending we shouldn't render\n // the error boundary and instead should fallback\n // to a hard navigation to attempt recovering\n if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n if (error && handleHardNavError(error.thrownValue)) {\n // clear error so we don't render anything\n return {\n error: null,\n previousPathname: props.pathname,\n }\n }\n }\n\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\n if (props.pathname !== state.previousPathname && state.error) {\n return {\n error: null,\n previousPathname: props.pathname,\n }\n }\n return {\n error: state.error,\n previousPathname: props.pathname,\n }\n }\n\n reset = () => {\n this.setState({ error: null })\n }\n\n retry = () => {\n startTransition(() => {\n this.context?.refresh()\n this.reset()\n })\n }\n\n // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.\n render(): React.ReactNode {\n //When it's bot request, segment level error boundary will keep rendering the children,\n // the final error will be caught by the root error boundary and determine wether need to apply graceful degrade.\n if (this.state.error && !isBotUserAgent) {\n const thrownValue = this.state.error.thrownValue\n handleISRError({ error: thrownValue })\n\n return (\n <>\n {this.props.errorStyles}\n {this.props.errorScripts}\n <this.props.errorComponent\n // TODO(NAR-804): Docs say this is an Error object, but we don't guarantee that\n error={thrownValue}\n reset={this.reset}\n retry={this.retry}\n />\n </>\n )\n }\n\n return this.props.children\n }\n}\n\n/**\n * Handles errors through `getDerivedStateFromError`.\n * Renders the provided error component and provides a way to `reset` the error boundary state.\n */\n\n/**\n * Renders error boundary with the provided \"errorComponent\" property as the fallback.\n * If no \"errorComponent\" property is provided it renders the children without an error boundary.\Line truncated
|
||||
{"offset": {"line": 811, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/forbidden.ts"],"sourcesContent":["import {\n HTTP_ERROR_FALLBACK_ERROR_CODE,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n// TODO: Add `forbidden` docs\n/**\n * @experimental\n * This function allows you to render the [forbidden.js file](https://nextjs.org/docs/app/api-reference/file-conventions/forbidden)\n * within a route segment as well as inject a tag.\n *\n * `forbidden()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * Read more: [Next.js Docs: `forbidden`](https://nextjs.org/docs/app/api-reference/functions/forbidden)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};403`\n\nexport function forbidden(): never {\n if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {\n throw new Error(\n `\\`forbidden()\\` is experimental and only allowed to be enabled when \\`experimental.authInterrupts\\` is enabled.`\n )\n }\n\n const error = new Error(DIGEST) as HTTPAccessFallbackError\n ;(error as HTTPAccessFallbackError).digest = DIGEST\n throw error\n}\n"],"names":["HTTP_ERROR_FALLBACK_ERROR_CODE","DIGEST","forbidden","process","env","__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS","Error","error","digest"],"mappings":";;;;AAAA,SACEA,8BAA8B,QAEzB,8CAA6C;;AAEpD,6BAA6B;AAC7B;;;;;;;;;;;CAWC,GAED,MAAMC,SAAS,GAAGD,yPAAAA,CAA+B,IAAI,CAAC;AAE/C,SAASE;IACd,IAAI,CAACC,QAAQC,GAAG,CAACC,uBAAqC,YAAF;QAClD,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,+GAA+G,CAAC,GAD7G,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,MAAMC,QAAQ,OAAA,cAAiB,CAAjB,IAAID,MAAML,SAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAgB;IAC5BM,MAAkCC,MAAM,GAAGP;IAC7C,MAAMM;AACR","ignoreList":[0]}},
|
||||
{"offset": {"line": 850, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/handle-isr-error.tsx"],"sourcesContent":["import { workAsyncStorage } from './server-async-storage'\n\n// if we are revalidating we want to re-throw the error so the\n// function crashes so we can maintain our previous cache\n// instead of caching the error page\nexport function handleISRError({ error }: { error: any }) {\n if (workAsyncStorage) {\n const store = workAsyncStorage.getStore()\n if (store?.isStaticGeneration) {\n if (error) {\n console.error(error)\n }\n throw error\n }\n }\n}\n"],"names":["workAsyncStorage","handleISRError","error","store","getStore","isStaticGeneration","console"],"mappings":";;;;;AAAA,SAASA,gBAAgB,QAAQ,yBAAwB;;AAKlD,SAASC,eAAe,EAAEC,KAAK,EAAkB;IACtD,IAAIF,uRAAAA,EAAkB;QACpB,MAAMG,QAAQH,uRAAAA,CAAiBI,QAAQ;QACvC,IAAID,OAAOE,oBAAoB;YAC7B,IAAIH,OAAO;gBACTI,QAAQJ,KAAK,CAACA;YAChB;YACA,MAAMA;QACR;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 872, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":";;;;;;AAAA,MAAMA,qBAAqB;AAEpB,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAC,CAAC,sBAAsB,EAAEA,aAAa,GAAA,IAAA,CADlBA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAE,KAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 894, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/http-access-fallback/error-boundary.tsx"],"sourcesContent":["'use client'\n\n/**\n * HTTPAccessFallbackBoundary is a boundary that catches errors and renders a\n * fallback component for HTTP errors.\n *\n * It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors.\n *\n * e.g. 404\n * 404 represents not found, and the fallback component pair contains the component and its styles.\n *\n */\n\nimport React, { useContext } from 'react'\nimport { useUntrackedPathname } from '../navigation-untracked'\nimport {\n HTTPAccessErrorStatus,\n getAccessFallbackHTTPStatus,\n getAccessFallbackErrorTypeByStatus,\n isHTTPAccessFallbackError,\n} from './http-access-fallback'\nimport { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime'\n\ninterface HTTPAccessFallbackBoundaryProps {\n notFound?: React.ReactNode\n forbidden?: React.ReactNode\n unauthorized?: React.ReactNode\n // TODO: Make this required once `React.createElement` understands that positional args go into children\n children?: React.ReactNode\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessFallbackErrorBoundaryProps\n extends HTTPAccessFallbackBoundaryProps {\n pathname: string | null\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessBoundaryState {\n triggeredStatus: number | undefined\n previousPathname: string | null\n}\n\nclass HTTPAccessFallbackErrorBoundary extends React.Component<\n HTTPAccessFallbackErrorBoundaryProps,\n HTTPAccessBoundaryState\n> {\n constructor(props: HTTPAccessFallbackErrorBoundaryProps) {\n super(props)\n this.state = {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n\n componentDidCatch(): void {\n if (\n process.env.NODE_ENV === 'development' &&\n this.props.missingSlots &&\n this.props.missingSlots.size > 0 &&\n // A missing children slot is the typical not-found case, so no need to warn\n !this.props.missingSlots.has('children')\n ) {\n const { warnOnce } =\n require('../../../shared/lib/utils/warn-once') as typeof import('../../../shared/lib/utils/warn-once')\n let warningMessage =\n 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\\n\\n'\n\n const formattedSlots = Array.from(this.props.missingSlots)\n .sort((a, b) => a.localeCompare(b))\n .map((slot) => `@${slot}`)\n .join(', ')\n\n warningMessage += 'Missing slots: ' + formattedSlots\n\n warnOnce(warningMessage)\n }\n }\n\n static getDerivedStateFromError(error: unknown) {\n if (isHTTPAccessFallbackError(error)) {\n const httpStatus = getAccessFallbackHTTPStatus(error)\n return {\n triggeredStatus: httpStatus,\n }\n }\n // Re-throw if error is not for 404\n throw error\n }\n\n static getDerivedStateFromProps(\n props: HTTPAccessFallbackErrorBoundaryProps,\n state: HTTPAccessBoundaryState\n ): HTTPAccessBoundaryState | null {\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\n if (props.pathname !== state.previousPathname && state.triggeredStatus) {\n return {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n return {\n triggeredStatus: state.triggeredStatus,\n previousPathname: props.pathname,\n }\n }\n\n render() {\n const { notFound, forbidden, unauthorized, children } = this.props\n const { triggeredStatus } = this.state\n const errorComponents = {\n [HTTPAccessErrorStatus.NOT_FOUND]: notFound,\n [HTTPAccessErrorStatus.FORBIDDEN]: forbidden,\n [HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized,\n }\n\n if (triggeredStatus) {\n const isNotFound =\n triggeredStatus === HTTPAccessErrorStatus.NOT_FOUND && notFound\n const isForbidden =\n triggeredStatus === HTTPAccessErrorStatus.FORBIDDEN && forbidden\n const isUnauthorized =\n triggeredStatus === HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized\n\n // If there's no matched boundary in this layer, keep throwing the error by rendering the children\n if (!(isNotFound || isForbidden || isUnauthorized)) {\n return children\n }\n\n return (\n <>\n <meta name=\"robots\" content=\"noindex\" />\n Line truncated
|
||||
{"offset": {"line": 1022, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAErC,MAAMQ,iCAAiC,2BAA0B;AAajE,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAI,KAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 1068, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/instant-validation/boundary.tsx"],"sourcesContent":["'use client'\n// We can't fork a `use client` boundary based on node-client vs browser-client.\n// We need to fork one level deeper.\nexport {\n InstantValidationBoundaryContext,\n PlaceValidationBoundaryBelowThisLevel,\n RenderValidationBoundaryAtThisLevel,\n SlotMarker,\n} from './impl'\n"],"names":["InstantValidationBoundaryContext","PlaceValidationBoundaryBelowThisLevel","RenderValidationBoundaryAtThisLevel","SlotMarker"],"mappings":";AACA,gFAAgF;AAChF,oCAAoC;AACpC,SACEA,gCAAgC,EAChCC,qCAAqC,EACrCC,mCAAmC,EACnCC,UAAU,QACL,SAAQ;AARf","ignoreList":[0]}},
|
||||
{"offset": {"line": 1078, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/instant-validation/impl.tsx"],"sourcesContent":["export {\n InstantValidationBoundaryContext,\n PlaceValidationBoundaryBelowThisLevel,\n RenderValidationBoundaryAtThisLevel,\n SlotMarker,\n} from '../../../server/app-render/instant-validation/boundary-impl'\n"],"names":["InstantValidationBoundaryContext","PlaceValidationBoundaryBelowThisLevel","RenderValidationBoundaryAtThisLevel","SlotMarker"],"mappings":";AAAA,SACEA,gCAAgC,EAChCC,qCAAqC,EACrCC,mCAAmC,EACnCC,UAAU,QACL,8DAA6D","ignoreList":[0]}},
|
||||
{"offset": {"line": 1085, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":";;;;AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;;;AAO/D,SAASC,kBACdC,KAAc;IAEd,WAAOF,mMAAAA,EAAgBE,cAAUH,oPAAAA,EAA0BG;AAC7D","ignoreList":[0]}},
|
||||
{"offset": {"line": 1100, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/layout-router.tsx"],"sourcesContent":["'use client'\n\nimport type { CacheNode } from '../../shared/lib/app-router-types'\nimport type { LoadingModuleData } from '../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n Segment,\n} from '../../shared/lib/app-router-types'\nimport type { ErrorComponent } from './error-boundary'\nimport type { FocusAndScrollRef } from './router-reducer/router-reducer-types'\n\nimport React, {\n Activity,\n Fragment,\n useContext,\n use,\n Suspense,\n useDeferredValue,\n useLayoutEffect,\n type FragmentInstance,\n type JSX,\n type ActivityProps,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport {\n LayoutRouterContext,\n GlobalLayoutRouterContext,\n TemplateContext,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport { unresolvedThenable } from './unresolved-thenable'\nimport { ErrorBoundary } from './error-boundary'\nimport { disableSmoothScrollDuringRouteTransition } from '../../shared/lib/router/utils/disable-smooth-scroll'\nimport { RedirectBoundary } from './redirect-boundary'\nimport { HTTPAccessFallbackBoundary } from './http-access-fallback/error-boundary'\nimport {\n InstantValidationBoundaryContext,\n RenderValidationBoundaryAtThisLevel,\n} from './instant-validation/boundary'\nimport { createRouterCacheKey } from './router-reducer/create-router-cache-key'\nimport {\n useRouterBFCache,\n type RouterBFCacheEntry,\n} from './bfcache-state-manager'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport {\n NavigationPromisesContext,\n type NavigationPromises,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport { getParamValueFromCacheKey } from '../route-params'\nimport type { Params } from '../../server/request/params'\nimport { isDeferredRsc } from './router-reducer/ppr-navigations'\n\nconst enableNewScrollHandler = process.env.__NEXT_APP_NEW_SCROLL_HANDLER\n\nconst __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = (\n ReactDOM as any\n).__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE\n\n// TODO-APP: Replace with new React API for finding dom nodes without a `ref` when available\n/**\n * Wraps ReactDOM.findDOMNode with additional logic to hide React Strict Mode warning\n */\nfunction findDOMNode(\n instance: React.ReactInstance | null | undefined\n): Element | Text | null {\n // Tree-shake for server bundle\n if (typeof window === 'undefined') return null\n\n // __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode is null during module init.\n // We need to lazily reference it.\n const internal_reactDOMfindDOMNode =\n __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode\n return internal_reactDOMfindDOMNode(instance)\n}\n\nconst rectProperties = [\n 'bottom',\n 'height',\n 'left',\n 'right',\n 'top',\n 'width',\n 'x',\n 'y',\n] as const\n/**\n * Check if a HTMLElement is hidden or fixed/sticky position\n */\nfunction shouldSkipElement(element: HTMLElement) {\n // we ignore fixed or sticky positioned elements since they'll likely pass the \"in-viewport\" check\n // and will result in a situation we bail on scroll because of something like a fixed nav,\n // even though the actual page content is offscreen\n if (['sticky', 'fixed'].includes(getComputedStyle(element).position)) {\n return true\n }\n\n // Uses `getBoundingClientRect` to check if the element is hidden instead of `offsetParent`\n // because `offsetParent` doesn't consider document/body\n const rect = element.getBoundingClientRect()\n return rectProperties.every((item) => rect[item] === 0)\n}\n\nconst enum ScrollTargetState {\n NoClientRects,\n InViewport,\n OutOfViewport,\n}\n\n/**\n * Resolve the root scroll padding used by the viewport check.\n *\n * Computed lengths serialize as pixels, but percentages remain relative to\n * the scrollport. Preserve the existing behavior for values that still\n * contain unresolved CSS math.\n */\nfunction getScrollPaddingTopInPixels(\n htmlElement: HTMLElement,\n viewportHeight: number\n): number {\n const scrollPaddingTop = getComputedStyle(htmlElement).scrollPaddingTop\n const value = Number.parseFloat(scrollPaddingTop)\n\n if (!Number.isFinite(value) || value < 0) {\n return 0\n }\n\n if (scrollPaddingTop.endsWith('px')) {\n return value\n }\n\n if (scrollPaddingTop.endsWith('%')) {\n return (value / 100) * viewportHeight\n }\n\n return 0\n}\n\n/**\n * Check where the top corner of the HTMLElement is relative to the usable\n * viewport.\n *\n * Scroll padding is resolved lazily so an empty Fragment does not trigger a\n * computed style read. The caller caches the value for the second check.\n */\nfunction getScrollTargetState(\n instance: HTMLElement | FragmentInstancLine truncated
|
||||
{"offset": {"line": 1800, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/links.ts"],"sourcesContent":["import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n PrefetchPriority,\n} from './segment-cache/types'\nimport { createCacheKey } from './segment-cache/cache-key'\nimport {\n type PrefetchTask,\n schedulePrefetchTask as scheduleSegmentPrefetchTask,\n cancelPrefetchTask,\n reschedulePrefetchTask,\n isPrefetchTaskDirty,\n} from './segment-cache/scheduler'\nimport { startTransition } from 'react'\n\ntype LinkElement = HTMLAnchorElement | SVGAElement\n\ntype Element = LinkElement | HTMLFormElement\n\n// Properties that are shared between Link and Form instances. We use the same\n// shape for both to prevent a polymorphic de-opt in the VM.\ntype LinkOrFormInstanceShared = {\n router: AppRouterInstance\n fetchStrategy: PrefetchTaskFetchStrategy\n\n isVisible: boolean\n\n // The most recently initiated prefetch task. It may or may not have\n // already completed. The same prefetch task object can be reused across\n // multiple prefetches of the same link.\n prefetchTask: PrefetchTask | null\n}\n\nexport type FormInstance = LinkOrFormInstanceShared & {\n prefetchHref: string\n setOptimisticLinkStatus: null\n}\n\ntype PrefetchableLinkInstance = LinkOrFormInstanceShared & {\n // In dev, the Owner Stack captured at the time this Link was rendered, for\n // configurations where a warning might later fire.\n // `undefined` means we opted out of capturing the stack.\n // If you issue a warning, handle the `undefined` case separately\n // so it's clear in the logs when a warning is missing its source location.\n // A warning with an undefined ownerStack is considered a bug though so make\n // sure reaching the log site is a subset of codepaths that lead to capturing\n // the stack\n ownerStack: string | null | undefined\n prefetchHref: string\n setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype NonPrefetchableLinkInstance = LinkOrFormInstanceShared & {\n ownerStack: string | null | undefined\n prefetchHref: null\n setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype PrefetchableInstance = PrefetchableLinkInstance | FormInstance\n\nexport type LinkInstance =\n | PrefetchableLinkInstance\n | NonPrefetchableLinkInstance\n\n// Tracks the most recently navigated link instance. When null, indicates\n// the current navigation was not initiated by a link click.\nlet linkForMostRecentNavigation: LinkInstance | null = null\n\n// Status object indicating link is pending\nexport const PENDING_LINK_STATUS = { pending: true }\n\n// Status object indicating link is idle\nexport const IDLE_LINK_STATUS = { pending: false }\n\n// Updates the loading state when navigating between links\n// - Resets the previous link's loading state\n// - Sets the new link's loading state\n// - Updates tracking of current navigation\nexport function setLinkForCurrentNavigation(link: LinkInstance | null) {\n startTransition(() => {\n linkForMostRecentNavigation?.setOptimisticLinkStatus(IDLE_LINK_STATUS)\n link?.setOptimisticLinkStatus(PENDING_LINK_STATUS)\n linkForMostRecentNavigation = link\n })\n}\n\n// Unmounts the current link instance from navigation tracking\nexport function unmountLinkForCurrentNavigation(link: LinkInstance) {\n if (linkForMostRecentNavigation === link) {\n linkForMostRecentNavigation = null\n }\n}\n\n/**\n * Returns the link instance that initiated the most recent navigation.\n * Returns null if the navigation was not initiated by a link click.\n *\n * Used by the Instant Navigation Testing API in dev mode to match the\n * fetch strategy of the link during cache-miss navigations.\n */\nexport function getLinkForCurrentNavigation(): LinkInstance | null {\n return linkForMostRecentNavigation\n}\n\n// Use a WeakMap to associate a Link instance with its DOM element. This is\n// used by the IntersectionObserver to track the link's visibility.\nconst prefetchable:\n | WeakMap<Element, PrefetchableInstance>\n | Map<Element, PrefetchableInstance> =\n typeof WeakMap === 'function' ? new WeakMap() : new Map()\n\n// A Set of the currently visible links. We re-prefetch visible links after a\n// cache invalidation, or when the current URL changes. It's a separate data\n// structure from the WeakMap above because only the visible links need to\n// be enumerated.\nconst prefetchableAndVisible: Set<PrefetchableInstance> = new Set()\n\n// A single IntersectionObserver instance shared by all <Link> components.\nconst observer: IntersectionObserver | null =\n typeof IntersectionObserver === 'function'\n ? new IntersectionObserver(handleIntersect, {\n rootMargin: '200px',\n })\n : nLine truncated
|
||||
{"offset": {"line": 2027, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/match-segments.ts"],"sourcesContent":["import type { Segment } from '../../shared/lib/app-router-types'\n\nexport const matchSegment = (\n existingSegment: Segment,\n segment: Segment\n): boolean => {\n // segment is either Array or string\n if (typeof existingSegment === 'string') {\n if (typeof segment === 'string') {\n // Common case: segment is just a string\n return existingSegment === segment\n }\n return false\n }\n\n if (typeof segment === 'string') {\n return false\n }\n return existingSegment[0] === segment[0] && existingSegment[1] === segment[1]\n}\n"],"names":["matchSegment","existingSegment","segment"],"mappings":";;;;AAEO,MAAMA,eAAe,CAC1BC,iBACAC;IAEA,oCAAoC;IACpC,IAAI,OAAOD,oBAAoB,UAAU;QACvC,IAAI,OAAOC,YAAY,UAAU;YAC/B,wCAAwC;YACxC,OAAOD,oBAAoBC;QAC7B;QACA,OAAO;IACT;IAEA,IAAI,OAAOA,YAAY,UAAU;QAC/B,OAAO;IACT;IACA,OAAOD,eAAe,CAAC,EAAE,KAAKC,OAAO,CAAC,EAAE,IAAID,eAAe,CAAC,EAAE,KAAKC,OAAO,CAAC,EAAE;AAC/E,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 2049, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/nav-failure-handler.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport { createHrefFromUrl } from './router-reducer/create-href-from-url'\n\nexport function handleHardNavError(error: unknown): boolean {\n if (\n typeof window !== 'undefined' &&\n window.next.__pendingUrl &&\n createHrefFromUrl(new URL(window.location.href)) !==\n createHrefFromUrl(window.next.__pendingUrl)\n ) {\n console.error(\n `Error occurred during navigation, falling back to hard navigation`,\n error\n )\n window.location.href = window.next.__pendingUrl.toString()\n return true\n }\n return false\n}\n\nexport function useNavFailureHandler() {\n if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n // this if is only for DCE of the feature flag not conditional\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n const uncaughtExceptionHandler = (\n evt: ErrorEvent | PromiseRejectionEvent\n ) => {\n const error = 'reason' in evt ? evt.reason : evt.error\n // if we have an unhandled exception/rejection during\n // a navigation we fall back to a hard navigation to\n // attempt recovering to a good state\n handleHardNavError(error)\n }\n window.addEventListener('unhandledrejection', uncaughtExceptionHandler)\n window.addEventListener('error', uncaughtExceptionHandler)\n return () => {\n window.removeEventListener('error', uncaughtExceptionHandler)\n window.removeEventListener(\n 'unhandledrejection',\n uncaughtExceptionHandler\n )\n }\n }, [])\n }\n}\n"],"names":["useEffect","createHrefFromUrl","handleHardNavError","error","window","next","__pendingUrl","URL","location","href","console","toString","useNavFailureHandler","process","env","__NEXT_APP_NAV_FAIL_HANDLING","uncaughtExceptionHandler","evt","reason","addEventListener","removeEventListener"],"mappings":";;;;;;AAAA,SAASA,SAAS,QAAQ,QAAO;AACjC,SAASC,iBAAiB,QAAQ,wCAAuC;;;AAElE,SAASC,mBAAmBC,KAAc;IAC/C,IACE,OAAOC,2CAAW,eAClBA,OAAOC,IAAI,CAACC,YAAY,QACxBL,sOAAAA,EAAkB,IAAIM,IAAIH,OAAOI,QAAQ,CAACC,IAAI,WAC5CR,sOAAAA,EAAkBG,OAAOC,IAAI,CAACC,YAAY,GAC5C;;IAQF,OAAO;AACT;AAEO,SAASM;IACd,IAAIC,QAAQC,GAAG,CAACC,4BAA4B,EAAE;;AAwBhD","ignoreList":[0]}},
|
||||
{"offset": {"line": 2072, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/navigation-devtools.ts"],"sourcesContent":["import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport type { Params } from '../../server/request/params'\nimport {\n createDevToolsInstrumentedPromise,\n ReadonlyURLSearchParams,\n type InstrumentedPromise,\n type NavigationPromises,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport {\n computeSelectedLayoutSegment,\n getSelectedLayoutSegmentPath,\n} from '../../shared/lib/segment'\n\n/**\n * Promises are cached by tree to ensure stability across suspense retries.\n */\ntype LayoutSegmentPromisesCache = {\n selectedLayoutSegmentPromises: Map<string, InstrumentedPromise<string | null>>\n selectedLayoutSegmentsPromises: Map<string, InstrumentedPromise<string[]>>\n}\n\nconst layoutSegmentPromisesCache = new WeakMap<\n FlightRouterState,\n LayoutSegmentPromisesCache\n>()\n\n/**\n * Creates instrumented promises for layout segment hooks at a given tree level.\n * This is dev-only code for React Suspense DevTools instrumentation.\n */\nfunction createLayoutSegmentPromises(\n tree: FlightRouterState\n): LayoutSegmentPromisesCache | null {\n if (process.env.NODE_ENV === 'production') {\n return null\n }\n\n // Check if we already have cached promises for this tree\n const cached = layoutSegmentPromisesCache.get(tree)\n if (cached) {\n return cached\n }\n\n // Create new promises and cache them\n const segmentPromises = new Map<string, InstrumentedPromise<string | null>>()\n const segmentsPromises = new Map<string, InstrumentedPromise<string[]>>()\n\n const parallelRoutes = tree[1]\n for (const parallelRouteKey of Object.keys(parallelRoutes)) {\n const segments = getSelectedLayoutSegmentPath(tree, parallelRouteKey)\n\n // Use the shared logic to compute the segment value\n const segment = computeSelectedLayoutSegment(segments, parallelRouteKey)\n\n segmentPromises.set(\n parallelRouteKey,\n createDevToolsInstrumentedPromise('useSelectedLayoutSegment', segment)\n )\n segmentsPromises.set(\n parallelRouteKey,\n createDevToolsInstrumentedPromise('useSelectedLayoutSegments', segments)\n )\n }\n\n const result: LayoutSegmentPromisesCache = {\n selectedLayoutSegmentPromises: segmentPromises,\n selectedLayoutSegmentsPromises: segmentsPromises,\n }\n\n // Cache the result for future renders\n layoutSegmentPromisesCache.set(tree, result)\n\n return result\n}\n\nconst rootNavigationPromisesCache = new WeakMap<\n FlightRouterState,\n Map<string, NavigationPromises>\n>()\n\n/**\n * Creates instrumented navigation promises for the root app-router.\n */\nexport function createRootNavigationPromises(\n tree: FlightRouterState,\n pathname: string,\n searchParams: URLSearchParams,\n pathParams: Params\n): NavigationPromises | null {\n if (process.env.NODE_ENV === 'production') {\n return null\n }\n\n // Create stable cache keys from the values\n const searchParamsString = searchParams.toString()\n const pathParamsString = JSON.stringify(pathParams)\n const cacheKey = `${pathname}:${searchParamsString}:${pathParamsString}`\n\n // Get or create the cache for this tree\n let treeCache = rootNavigationPromisesCache.get(tree)\n if (!treeCache) {\n treeCache = new Map<string, NavigationPromises>()\n rootNavigationPromisesCache.set(tree, treeCache)\n }\n\n // Check if we have cached promises for this combination\n const cached = treeCache.get(cacheKey)\n if (cached) {\n return cached\n }\n\n const readonlySearchParams = new ReadonlyURLSearchParams(searchParams)\n\n const layoutSegmentPromises = createLayoutSegmentPromises(tree)\n\n const promises: NavigationPromises = {\n pathname: createDevToolsInstrumentedPromise('usePathname', pathname),\n searchParams: createDevToolsInstrumentedPromise(\n 'useSearchParams',\n readonlySearchParams\n ),\n params: createDevToolsInstrumentedPromise('useParams', pathParams),\n ...layoutSegmentPromises,\n }\n\n treeCache.set(cacheKey, promises)\n\n return promises\n}\n\nconst nestedLayoutPromisesCache = new WeakMap<\n FlightRouterState,\n Map<NavigationPromises | null, NavigationPromises>\n>()\n\n/**\n * Creates merged navigation promises for nested layouts.\n * Merges parent promises with layout-specific segment promises.\n */\nexport function createNestedLayoutNavigationPromises(\n tree: FlightRouterState,\n parentNavPromises: NavigationPromises | null\n): NavigationPromises | null {\n if (process.env.NODE_ENV === 'production') {\n return null\n }\n\n const parallelRoutes = tree[1]\n const parallelRouteKeys = Object.keys(parallelRoutes)\n\n // Only create promises if there are parallel routes at this level\n if (parallelRouteKeys.length === 0) {\n return null\n }\n\n // Get or create the cache for this Line truncated
|
||||
{"offset": {"line": 2177, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/navigation-dynamic-rendering.ts"],"sourcesContent":["// Client-safe access to the server-only dynamic-rendering hooks used by the\n// navigation hooks. On the server these re-export the real implementations; in\n// the browser bundle this module is aliased to\n// `./navigation-dynamic-rendering.browser` (see\n// scripts/generate-browser-variant-aliases.mjs), which exports `undefined` so\n// the server module is not bundled into the client. Callers use optional calls\n// (`useDynamicRouteParams?.(...)`), so the browser stub is a no-op.\nexport {\n useDynamicRouteParams,\n useDynamicSearchParams,\n} from '../../server/app-render/dynamic-rendering'\n"],"names":["useDynamicRouteParams","useDynamicSearchParams"],"mappings":";AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,+CAA+C;AAC/C,gDAAgD;AAChD,8EAA8E;AAC9E,+EAA+E;AAC/E,oEAAoE;AACpE,SACEA,qBAAqB,EACrBC,sBAAsB,QACjB,4CAA2C","ignoreList":[0]}},
|
||||
{"offset": {"line": 2191, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/navigation-untracked.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { PathnameContext } from '../../shared/lib/hooks-client-context.shared-runtime'\nimport { workUnitAsyncStorage } from './server-async-storage'\n\n/**\n * This checks to see if the current render has any unknown route parameters that\n * would cause the pathname to be dynamic. It's used to trigger a different\n * render path in the error boundary.\n *\n * @returns true if there are any unknown route parameters, false otherwise\n */\nfunction hasFallbackRouteParams(): boolean {\n // The AsyncLocalStorage module is kept out of the client bundle via the\n // `./server-async-storage` browser alias; the guard ensures the stub is never\n // dereferenced in the browser.\n if (typeof window === 'undefined') {\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) return false\n\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'validation-client':\n const fallbackParams = workUnitStore.fallbackRouteParams\n return fallbackParams ? fallbackParams.size > 0 : false\n case 'prerender-legacy':\n case 'request':\n case 'prerender-runtime':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'generate-static-params':\n break\n default:\n workUnitStore satisfies never\n }\n\n return false\n }\n\n return false\n}\n\n/**\n * This returns a `null` value if there are any unknown route parameters, and\n * otherwise returns the pathname from the context. This is an alternative to\n * `usePathname` that is used in the error boundary to avoid rendering the\n * error boundary when there are unknown route parameters. This doesn't throw\n * when accessed with unknown route parameters.\n *\n * @returns\n *\n * @internal\n */\nexport function useUntrackedPathname(): string | null {\n // If there are any unknown route parameters we would typically throw\n // an error, but this internal method allows us to return a null value instead\n // for components that do not propagate the pathname to the static shell (like\n // the error boundary).\n if (hasFallbackRouteParams()) {\n return null\n }\n\n // This shouldn't cause any issues related to conditional rendering because\n // the environment will be consistent for the render.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useContext(PathnameContext)\n}\n"],"names":["useContext","PathnameContext","workUnitAsyncStorage","hasFallbackRouteParams","window","workUnitStore","getStore","type","fallbackParams","fallbackRouteParams","size","useUntrackedPathname"],"mappings":";;;;AAAA,SAASA,UAAU,QAAQ,QAAO;AAClC,SAASC,eAAe,QAAQ,uDAAsD;;AACtF,SAASC,oBAAoB,QAAQ,yBAAwB;;;;AAE7D;;;;;;CAMC,GACD,SAASC;IACP,wEAAwE;IACxE,8EAA8E;IAC9E,+BAA+B;IAC/B,IAAI,OAAOC,WAAW,kBAAa;QACjC,MAAMC,gBAAgBH,2SAAAA,CAAqBI,QAAQ;QACnD,IAAI,CAACD,eAAe,OAAO;QAE3B,OAAQA,cAAcE,IAAI;YACxB,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;gBACH,MAAMC,iBAAiBH,cAAcI,mBAAmB;gBACxD,OAAOD,iBAAiBA,eAAeE,IAAI,GAAG,IAAI;YACpD,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;gBACH;YACF;gBACEL;QACJ;QAEA,OAAO;IACT;;;AAGF;AAaO,SAASM;IACd,qEAAqE;IACrE,8EAA8E;IAC9E,8EAA8E;IAC9E,uBAAuB;IACvB,IAAIR,0BAA0B;QAC5B,OAAO;IACT;IAEA,2EAA2E;IAC3E,qDAAqD;IACrD,sDAAsD;IACtD,WAAOH,mNAAAA,EAAWC,kPAAAA;AACpB","ignoreList":[0]}},
|
||||
{"offset": {"line": 2255, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/navigation.ts"],"sourcesContent":["import type { Params } from '../../server/request/params'\n\nimport React, { useContext, useMemo, use } from 'react'\nimport {\n AppRouterContext,\n LayoutRouterContext,\n type AppRouterInstance,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport {\n SearchParamsContext,\n PathnameContext,\n PathParamsContext,\n NavigationPromisesContext,\n ReadonlyURLSearchParams,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport {\n computeSelectedLayoutSegment,\n getSelectedLayoutSegmentPath,\n} from '../../shared/lib/segment'\n\nimport {\n useDynamicRouteParams,\n useDynamicSearchParams,\n} from './navigation-dynamic-rendering'\n\nconst {\n instrumentParamsForClientValidation,\n instrumentSearchParamsForClientValidation,\n expectCompleteParamsInClientValidation,\n} = process.env.__NEXT_CACHE_COMPONENTS\n ? (require('./instant-samples') as typeof import('./instant-samples'))\n : {}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you *read* the current URL's search parameters.\n *\n * Learn more about [`URLSearchParams` on MDN](https://developer.mozilla.org/docs/Web/API/URLSearchParams)\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useSearchParams } from 'next/navigation'\n *\n * export default function Page() {\n * const searchParams = useSearchParams()\n * searchParams.get('foo') // returns 'bar' when ?foo=bar\n * // ...\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSearchParams`](https://nextjs.org/docs/app/api-reference/functions/use-search-params)\n */\n// Client components API\nexport function useSearchParams(): ReadonlyURLSearchParams {\n useDynamicSearchParams?.('useSearchParams()')\n\n const searchParams = useContext(SearchParamsContext)\n\n // In the case where this is `null`, the compat types added in\n // `next-env.d.ts` will add a new overload that changes the return type to\n // include `null`.\n const readonlySearchParams = useMemo((): ReadonlyURLSearchParams => {\n if (!searchParams) {\n // When the router is not ready in pages, we won't have the search params\n // available.\n return null!\n }\n\n return new ReadonlyURLSearchParams(searchParams)\n }, [searchParams])\n\n // During build-time instant validation, wrap with an proxy\n // so that accessing undeclared search params throws an error.\n if (\n typeof window === 'undefined' &&\n process.env.__NEXT_CACHE_COMPONENTS &&\n readonlySearchParams\n ) {\n return instrumentSearchParamsForClientValidation!(readonlySearchParams)\n }\n\n // Instrument with Suspense DevTools (dev-only)\n if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n const navigationPromises = use(NavigationPromisesContext)\n if (navigationPromises) {\n return use(navigationPromises.searchParams)\n }\n }\n\n return readonlySearchParams\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the current URL's pathname.\n *\n * @example\n * ```ts\n * \"use client\"\n * import { usePathname } from 'next/navigation'\n *\n * export default function Page() {\n * const pathname = usePathname() // returns \"/dashboard\" on /dashboard?foo=bar\n * // ...\n * }\n * ```\n *\n * Read more: [Next.js Docs: `usePathname`](https://nextjs.org/docs/app/api-reference/functions/use-pathname)\n */\n// Client components API\nexport function usePathname(): string {\n useDynamicRouteParams?.('usePathname()')\n\n // In the case where this is `null`, the compat types added in `next-env.d.ts`\n // will add a new overload that changes the return type to include `null`.\n const pathname = useContext(PathnameContext) as string\n\n // During build-time instant validation, error if fallback params exist\n // because usePathname() can't return a sensible value without all params.\n if (\n typeof window === 'undefined' &&\n process.env.__NEXT_CACHE_COMPONENTS &&\n pathname\n ) {\n expectCompleteParamsInClientValidation!('usePathname()')\n return pathname\n }\n\n // Instrument with Suspense DevTools (dev-only)\n if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n const navigationPromises = use(NavigationPromisesContext)\n if (navigationPromises) {\n return use(navigationPromises.pathname)\n }\n }\n\n return pathname\n}\n\n// Client components API\nexport {\n ServerInsertedHTMLContext,\n useServerInsertedHTML,\n} from '../../shared/lib/server-inserted-html.shared-runtime'\n\n/**\n *\n * This hook allows you to programmatically change routes inside [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components).\n *Line truncated
|
||||
{"offset": {"line": 2430, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/navigation.react-server.ts"],"sourcesContent":["import { ReadonlyURLSearchParams } from './readonly-url-search-params'\n\nexport function unstable_isUnrecognizedActionError(): boolean {\n throw new Error(\n '`unstable_isUnrecognizedActionError` can only be used on the client.'\n )\n}\n\nexport { redirect, permanentRedirect } from './redirect'\nexport { notFound } from './not-found'\nexport { forbidden } from './forbidden'\nexport { unauthorized } from './unauthorized'\nexport { unstable_rethrow } from './unstable-rethrow'\nexport { ReadonlyURLSearchParams }\n\nexport const RedirectType = {\n push: 'push',\n replace: 'replace',\n} as const\n"],"names":["ReadonlyURLSearchParams","unstable_isUnrecognizedActionError","Error","redirect","permanentRedirect","notFound","forbidden","unauthorized","unstable_rethrow","RedirectType","push","replace"],"mappings":";;;;;;AAAA,SAASA,uBAAuB,QAAQ,+BAA8B;AAQtE,SAASG,QAAQ,EAAEC,iBAAiB,QAAQ,aAAY;AACxD,SAASC,QAAQ,QAAQ,cAAa;AACtC,SAASC,SAAS,QAAQ,cAAa;AACvC,SAASC,YAAY,QAAQ,iBAAgB;AAC7C,SAASC,gBAAgB,QAAQ,qBAAoB;;AAV9C,SAASP;IACd,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,yEADI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;;;;;;;AASO,MAAMO,eAAe;IAC1BC,MAAM;IACNC,SAAS;AACX,EAAU","ignoreList":[0]}},
|
||||
{"offset": {"line": 2464, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/not-found.ts"],"sourcesContent":["import {\n HTTP_ERROR_FALLBACK_ERROR_CODE,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n/**\n * This function allows you to render the [not-found.js file](https://nextjs.org/docs/app/api-reference/file-conventions/not-found)\n * within a route segment as well as inject a tag.\n *\n * `notFound()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a `<meta name=\"robots\" content=\"noindex\" />` meta tag and set the status code to 404.\n * - In a Route Handler or Server Action, it will serve a 404 to the caller.\n *\n * Read more: [Next.js Docs: `notFound`](https://nextjs.org/docs/app/api-reference/functions/not-found)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};404`\n\nexport function notFound(): never {\n const error = new Error(DIGEST) as HTTPAccessFallbackError\n ;(error as HTTPAccessFallbackError).digest = DIGEST\n\n throw error\n}\n"],"names":["HTTP_ERROR_FALLBACK_ERROR_CODE","DIGEST","notFound","error","Error","digest"],"mappings":";;;;AAAA,SACEA,8BAA8B,QAEzB,8CAA6C;;AAEpD;;;;;;;;;;;;;CAaC,GAED,MAAMC,SAAS,GAAGD,yPAAAA,CAA+B,IAAI,CAAC;AAE/C,SAASE;IACd,MAAMC,QAAQ,OAAA,cAAiB,CAAjB,IAAIC,MAAMH,SAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAgB;IAC5BE,MAAkCE,MAAM,GAAGJ;IAE7C,MAAME;AACR","ignoreList":[0]}},
|
||||
{"offset": {"line": 2497, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/readonly-url-search-params.ts"],"sourcesContent":["/**\n * ReadonlyURLSearchParams implementation shared between client and server.\n * This file is intentionally not marked as 'use client' or 'use server'\n * so it can be imported by both environments.\n */\n\n/** @internal */\nclass ReadonlyURLSearchParamsError extends Error {\n constructor() {\n super(\n 'Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams'\n )\n }\n}\n\n/**\n * A read-only version of URLSearchParams that throws errors when mutation methods are called.\n * This ensures that the URLSearchParams returned by useSearchParams() cannot be mutated.\n */\nexport class ReadonlyURLSearchParams extends URLSearchParams {\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n append() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n delete() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n set() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n sort() {\n throw new ReadonlyURLSearchParamsError()\n }\n}\n"],"names":["ReadonlyURLSearchParamsError","Error","constructor","ReadonlyURLSearchParams","URLSearchParams","append","delete","set","sort"],"mappings":";;;;AAAA;;;;CAIC,GAED,cAAc,GACd,MAAMA,qCAAqCC;IACzCC,aAAc;QACZ,KAAK,CACH;QADF,OAAA,cAEC,CAFD,IAEC,EAFD,qBAAA;mBAAA;wBAAA;0BAAA;QAEA;IACF;AACF;AAMO,MAAMC,gCAAgCC;IAC3C,wKAAwK,GACxKC,SAAS;QACP,MAAM,IAAIL;IACZ;IACA,wKAAwK,GACxKM,SAAS;QACP,MAAM,IAAIN;IACZ;IACA,wKAAwK,GACxKO,MAAM;QACJ,MAAM,IAAIP;IACZ;IACA,wKAAwK,GACxKQ,OAAO;QACL,MAAM,IAAIR;IACZ;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 2533, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/redirect-boundary.tsx"],"sourcesContent":["'use client'\nimport React, { useEffect } from 'react'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useRouter } from './navigation'\nimport { getRedirectTypeFromError, getURLFromRedirectError } from './redirect'\nimport { type RedirectType, isRedirectError } from './redirect-error'\n\ninterface RedirectBoundaryProps {\n router: AppRouterInstance\n children: React.ReactNode\n}\n\nfunction HandleRedirect({\n redirect,\n reset,\n redirectType,\n}: {\n redirect: string\n redirectType: RedirectType\n reset: () => void\n}) {\n const router = useRouter()\n\n useEffect(() => {\n React.startTransition(() => {\n if (redirectType === 'push') {\n router.push(redirect, {})\n } else {\n router.replace(redirect, {})\n }\n reset()\n })\n }, [redirect, redirectType, reset, router])\n\n return null\n}\n\nexport class RedirectErrorBoundary extends React.Component<\n RedirectBoundaryProps,\n { redirect: string | null; redirectType: RedirectType | null }\n> {\n constructor(props: RedirectBoundaryProps) {\n super(props)\n this.state = { redirect: null, redirectType: null }\n }\n\n static getDerivedStateFromError(error: unknown) {\n if (isRedirectError(error)) {\n const url = getURLFromRedirectError(error)\n const redirectType = getRedirectTypeFromError(error)\n if ('handled' in error) {\n // The redirect was already handled. We'll still catch the redirect error\n // so that we can remount the subtree, but we don't actually need to trigger the\n // router.push.\n return { redirect: null, redirectType: null }\n }\n\n return { redirect: url, redirectType }\n }\n // Re-throw if error is not for redirect\n throw error\n }\n\n // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.\n render(): React.ReactNode {\n const { redirect, redirectType } = this.state\n if (redirect !== null && redirectType !== null) {\n return (\n <HandleRedirect\n redirect={redirect}\n redirectType={redirectType}\n reset={() => this.setState({ redirect: null })}\n />\n )\n }\n\n return this.props.children\n }\n}\n\nexport function RedirectBoundary({ children }: { children: React.ReactNode }) {\n const router = useRouter()\n return (\n <RedirectErrorBoundary router={router}>{children}</RedirectErrorBoundary>\n )\n}\n"],"names":["React","useEffect","useRouter","getRedirectTypeFromError","getURLFromRedirectError","isRedirectError","HandleRedirect","redirect","reset","redirectType","router","startTransition","push","replace","RedirectErrorBoundary","Component","constructor","props","state","getDerivedStateFromError","error","url","render","setState","children","RedirectBoundary"],"mappings":";;;;;;;AACA,OAAOA,SAASC,SAAS,QAAQ,QAAO;AAExC,SAASC,SAAS,QAAQ,eAAc;AACxC,SAASC,wBAAwB,EAAEC,uBAAuB,QAAQ,aAAY;AAC9E,SAA4BC,eAAe,QAAQ,mBAAkB;AALrE;;;;;;AAYA,SAASC,eAAe,EACtBC,QAAQ,EACRC,KAAK,EACLC,YAAY,EAKb;IACC,MAAMC,SAASR,0MAAAA;IAEfD,sNAAAA,EAAU;QACRD,gNAAAA,CAAMW,eAAe,CAAC;YACpB,IAAIF,iBAAiB,QAAQ;gBAC3BC,OAAOE,IAAI,CAACL,UAAU,CAAC;YACzB,OAAO;gBACLG,OAAOG,OAAO,CAACN,UAAU,CAAC;YAC5B;YACAC;QACF;IACF,GAAG;QAACD;QAAUE;QAAcD;QAAOE;KAAO;IAE1C,OAAO;AACT;AAEO,MAAMI,8BAA8Bd,gNAAAA,CAAMe,SAAS;IAIxDC,YAAYC,KAA4B,CAAE;QACxC,KAAK,CAACA;QACN,IAAI,CAACC,KAAK,GAAG;YAAEX,UAAU;YAAME,cAAc;QAAK;IACpD;IAEA,OAAOU,yBAAyBC,KAAc,EAAE;QAC9C,QAAIf,mMAAAA,EAAgBe,QAAQ;YAC1B,MAAMC,UAAMjB,kMAAAA,EAAwBgB;YACpC,MAAMX,mBAAeN,mMAAAA,EAAyBiB;YAC9C,IAAI,aAAaA,OAAO;gBACtB,yEAAyE;gBACzE,gFAAgF;gBAChF,eAAe;gBACf,OAAO;oBAAEb,UAAU;oBAAME,cAAc;gBAAK;YAC9C;YAEA,OAAO;gBAAEF,UAAUc;gBAAKZ;YAAa;QACvC;QACA,wCAAwC;QACxC,MAAMW;IACR;IAEA,yIAAyI;IACzIE,SAA0B;QACxB,MAAM,EAAEf,QAAQ,EAAEE,YAAY,EAAE,GAAG,IAAI,CAACS,KAAK;QAC7C,IAAIX,aAAa,QAAQE,iBAAiB,MAAM;YAC9C,OAAA,WAAA,OACE,8NAAA,EAACH,gBAAAA;gBACCC,UAAUA;gBACVE,cAAcA;gBACdD,OAAO,IAAM,IAAI,CAACe,QAAQ,CAAC;wBAAEhB,UAAU;oBAAK;;QAGlD;QAEA,OAAO,IAAI,CAACU,KAAK,CAACO,QAAQ;IAC5B;AACF;AAEO,SAASC,iBAAiB,EAAED,QAAQ,EAAiC;IAC1E,MAAMd,aAASR,sMAAAA;IACf,OAAA,WAAA,OACE,8NAAA,EAACY,uBAAAA;QAAsBJ,QAAQA;kBAASc;;AAE5C","ignoreList":[0]}},
|
||||
{"offset": {"line": 2624, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport type RedirectType = 'push' | 'replace'\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":";;;;;;AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;;AAEpD,MAAMC,sBAAsB,gBAAe;AAe3C,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAI,KAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcL,uBACbM,CAAAA,SAAS,aAAaA,SAAS,MAAK,KACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcb,+MAAAA;AAElB","ignoreList":[0]}},
|
||||
{"offset": {"line": 2648, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":";;;;AAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0]}},
|
||||
{"offset": {"line": 2662, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/redirect.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\nimport {\n type RedirectType,\n type RedirectError,\n isRedirectError,\n REDIRECT_ERROR_CODE,\n} from './redirect-error'\nimport { actionAsyncStorage } from './server-async-storage'\n\nexport function getRedirectError(\n url: string,\n type: RedirectType,\n statusCode: RedirectStatusCode = RedirectStatusCode.TemporaryRedirect\n): RedirectError {\n const error = new Error(REDIRECT_ERROR_CODE) as RedirectError\n error.digest = `${REDIRECT_ERROR_CODE};${type};${url};${statusCode};`\n return error\n}\n\n/**\n * This function allows you to redirect the user to another URL. It can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a meta tag to redirect the user to the target page.\n * - In a Route Handler, it will serve a 307 to the caller.\n * - In a Server Action, it will perform a client-side navigation when JavaScript is available or serve a 303 for a progressive enhancement form submission.\n * - In a Server Action, type defaults to 'push' and 'replace' elsewhere.\n *\n * Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)\n */\nexport function redirect(\n /** The URL to redirect to */\n url: string,\n type?: RedirectType\n): never {\n type ??= actionAsyncStorage?.getStore()?.isAction ? 'push' : 'replace'\n\n throw getRedirectError(url, type, RedirectStatusCode.TemporaryRedirect)\n}\n\n/**\n * This function allows you to redirect the user to another URL. It can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a meta tag to redirect the user to the target page.\n * - In a Route Handler, it will serve a 308 to the caller.\n * - In a Server Action, it will perform a client-side navigation when JavaScript is available or serve a 303 for a progressive enhancement form submission.\n *\n * Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)\n */\nexport function permanentRedirect(\n /** The URL to redirect to */\n url: string,\n type: RedirectType = 'replace'\n): never {\n throw getRedirectError(url, type, RedirectStatusCode.PermanentRedirect)\n}\n\n/**\n * Returns the encoded URL from the error if it's a RedirectError, null\n * otherwise. Note that this does not validate the URL returned.\n *\n * @param error the error that may be a redirect error\n * @return the url if the error was a redirect error\n */\nexport function getURLFromRedirectError(error: RedirectError): string\nexport function getURLFromRedirectError(error: unknown): string | null {\n if (!isRedirectError(error)) return null\n\n // Slices off the beginning of the digest that contains the code and the\n // separating ';'.\n return error.digest.split(';').slice(2, -2).join(';')\n}\n\nexport function getRedirectTypeFromError(error: RedirectError): RedirectType {\n if (!isRedirectError(error)) {\n throw new Error('Not a redirect error')\n }\n\n return error.digest.split(';', 2)[1] as RedirectType\n}\n\nexport function getRedirectStatusCodeFromError(error: RedirectError): number {\n if (!isRedirectError(error)) {\n throw new Error('Not a redirect error')\n }\n\n return Number(error.digest.split(';').at(-2))\n}\n"],"names":["RedirectStatusCode","isRedirectError","REDIRECT_ERROR_CODE","actionAsyncStorage","getRedirectError","url","type","statusCode","TemporaryRedirect","error","Error","digest","redirect","getStore","isAction","permanentRedirect","PermanentRedirect","getURLFromRedirectError","split","slice","join","getRedirectTypeFromError","getRedirectStatusCodeFromError","Number","at"],"mappings":";;;;;;;;;;;;;;AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAC3D,SAGEC,eAAe,EACfC,mBAAmB,QACd,mBAAkB;;AACzB,SAASC,kBAAkB,QAAQ,yBAAwB;;;;AAEpD,SAASC,iBACdC,GAAW,EACXC,IAAkB,EAClBC,aAAiCP,+MAAAA,CAAmBQ,iBAAiB;IAErE,MAAMC,QAAQ,OAAA,cAA8B,CAA9B,IAAIC,MAAMR,uMAAAA,GAAV,qBAAA;eAAA;oBAAA;sBAAA;IAA6B;IAC3CO,MAAME,MAAM,GAAG,GAAGT,uMAAAA,CAAoB,CAAC,EAAEI,KAAK,CAAC,EAAED,IAAI,CAAC,EAAEE,WAAW,CAAC,CAAC;IACrE,OAAOE;AACT;AAeO,SAASG,SACd,2BAA2B,GAC3BP,GAAW,EACXC,IAAmB;IAEnBA,SAASH,6RAAAA,EAAoBU,YAAYC,WAAW,SAAS;IAE7D,MAAMV,iBAAiBC,KAAKC,MAAMN,+MALine truncated
|
||||
{"offset": {"line": 2729, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/render-from-template-context.tsx"],"sourcesContent":["'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport { TemplateContext } from '../../shared/lib/app-router-context.shared-runtime'\n\nexport default function RenderFromTemplateContext(): JSX.Element {\n const children = useContext(TemplateContext)\n return <>{children}</>\n}\n"],"names":["React","useContext","TemplateContext","RenderFromTemplateContext","children"],"mappings":";;;;;AAEA,OAAOA,SAASC,UAAU,QAAkB,QAAO;AACnD,SAASC,eAAe,QAAQ,qDAAoD;AAHpF;;;;AAKe,SAASC;IACtB,MAAMC,eAAWH,mNAAAA,EAAWC,gPAAAA;IAC5B,OAAA,WAAA,OAAO,8NAAA,EAAA,mOAAA,EAAA;kBAAGE;;AACZ","ignoreList":[0]}},
|
||||
{"offset": {"line": 2750, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/compute-changed-path.ts"],"sourcesContent":["import type {\n FlightRouterState,\n Segment,\n} from '../../../shared/lib/app-router-types'\nimport { INTERCEPTION_ROUTE_MARKERS } from '../../../shared/lib/router/utils/interception-routes'\nimport type { Params } from '../../../server/request/params'\nimport {\n isGroupSegment,\n DEFAULT_SEGMENT_KEY,\n PAGE_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport { matchSegment } from '../match-segments'\n\nconst removeLeadingSlash = (segment: string): string => {\n return segment[0] === '/' ? segment.slice(1) : segment\n}\n\nconst segmentToPathname = (segment: Segment): string => {\n if (typeof segment === 'string') {\n // 'children' is not a valid path -- it's technically a parallel route that corresponds with the current segment's page\n // if we don't skip it, then the computed pathname might be something like `/children` which doesn't make sense.\n if (segment === 'children') return ''\n\n return segment\n }\n\n return segment[1]\n}\n\nexport const segmentToSourcePagePathname = (segment: Segment): string => {\n if (typeof segment === 'string') {\n if (segment === 'children') return ''\n if (segment.startsWith(PAGE_SEGMENT_KEY)) return 'page'\n return segment\n }\n\n const [paramName, , dynamicParamType] = segment\n\n switch (dynamicParamType) {\n case 'c':\n return `[...${paramName}]`\n case 'ci(..)(..)':\n return `(..)(..)[...${paramName}]`\n case 'ci(.)':\n return `(.)[...${paramName}]`\n case 'ci(..)':\n return `(..)[...${paramName}]`\n case 'ci(...)':\n return `(...)[...${paramName}]`\n case 'oc':\n return `[[...${paramName}]]`\n case 'd':\n return `[${paramName}]`\n case 'di(..)(..)':\n return `(..)(..)[${paramName}]`\n case 'di(.)':\n return `(.)[${paramName}]`\n case 'di(..)':\n return `(..)[${paramName}]`\n case 'di(...)':\n return `(...)[${paramName}]`\n default:\n dynamicParamType satisfies never\n return `[${paramName}]`\n }\n}\n\nfunction normalizeSegments(segments: string[]): string {\n return (\n segments.reduce((acc, segment) => {\n segment = removeLeadingSlash(segment)\n if (segment === '' || isGroupSegment(segment)) {\n return acc\n }\n\n return `${acc}/${segment}`\n }, '') || '/'\n )\n}\n\nexport function extractPathFromFlightRouterState(\n flightRouterState: FlightRouterState\n): string | undefined {\n const segment = Array.isArray(flightRouterState[0])\n ? flightRouterState[0][1]\n : flightRouterState[0]\n\n if (\n segment === DEFAULT_SEGMENT_KEY ||\n INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m))\n )\n return undefined\n\n if (segment.startsWith(PAGE_SEGMENT_KEY)) return ''\n\n const segments = [segmentToPathname(segment)]\n const parallelRoutes = flightRouterState[1] ?? {}\n\n const childrenPath = parallelRoutes.children\n ? extractPathFromFlightRouterState(parallelRoutes.children)\n : undefined\n\n if (childrenPath !== undefined) {\n segments.push(childrenPath)\n } else {\n for (const [key, value] of Object.entries(parallelRoutes)) {\n if (key === 'children') continue\n\n const childPath = extractPathFromFlightRouterState(value)\n\n if (childPath !== undefined) {\n segments.push(childPath)\n }\n }\n }\n\n return normalizeSegments(segments)\n}\n\nfunction extractSourcePageSegmentsFromFlightRouterState(\n flightRouterState: FlightRouterState\n): string[] | undefined {\n const segment = segmentToSourcePagePathname(flightRouterState[0])\n\n if (segment === DEFAULT_SEGMENT_KEY) {\n return undefined\n }\n\n if (segment === 'page') {\n return [segment]\n }\n\n const parallelRoutes = flightRouterState[1] ?? {}\n\n const childrenPath = parallelRoutes.children\n ? extractSourcePageSegmentsFromFlightRouterState(parallelRoutes.children)\n : undefined\n\n if (childrenPath !== undefined) {\n return segment === ''\n ? childrenPath\n : [removeLeadingSlash(segment), ...childrenPath]\n }\n\n for (const [key, value] of Object.entries(parallelRoutes)) {\n if (key === 'children') continue\n\n const childPath = extractSourcePageSegmentsFromFlightRouterState(value)\n\n if (childPath !== undefined) {\n return segment === ''\n ? childPath\n : [removeLeadingSlash(segment), ...childPath]\n }\n }\n\n return undefined\n}\n\nexport function extractSourcePageFromFlightRouterState(\n flightRouterState: FlightRouterState\n): string | undefined {\n const sourcePageSegments =\n extractSourcePageSegmentsFromFlightRouterState(flightRouterState)\n\n return sourcePageSegments ? `/${sourcePageSegments.join('/')}` : undefined\n}\n\nfunction computeChangedPathImpl(\n treeA: FlightLine truncated
|
||||
{"offset": {"line": 2932, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/create-href-from-url.ts"],"sourcesContent":["export function createHrefFromUrl(\n url: Pick<URL, 'pathname' | 'search' | 'hash'>,\n includeHash: boolean = true\n): string {\n return url.pathname + url.search + (includeHash ? url.hash : '')\n}\n"],"names":["createHrefFromUrl","url","includeHash","pathname","search","hash"],"mappings":";;;;AAAO,SAASA,kBACdC,GAA8C,EAC9CC,cAAuB,IAAI;IAE3B,OAAOD,IAAIE,QAAQ,GAAGF,IAAIG,MAAM,GAAIF,CAAAA,cAAcD,IAAII,IAAI,GAAG,EAAC;AAChE","ignoreList":[0]}},
|
||||
{"offset": {"line": 2943, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/create-router-cache-key.ts"],"sourcesContent":["import type { Segment } from '../../../shared/lib/app-router-types'\nimport { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment'\n\nexport function createRouterCacheKey(\n segment: Segment,\n withoutSearchParameters: boolean = false\n) {\n // if the segment is an array, it means it's a dynamic segment\n // for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key.\n if (Array.isArray(segment)) {\n return `${segment[0]}|${segment[1]}|${segment[2]}`\n }\n\n // Page segments might have search parameters, ie __PAGE__?foo=bar\n // When `withoutSearchParameters` is true, we only want to return the page segment\n if (withoutSearchParameters && segment.startsWith(PAGE_SEGMENT_KEY)) {\n return PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n"],"names":["PAGE_SEGMENT_KEY","createRouterCacheKey","segment","withoutSearchParameters","Array","isArray","startsWith"],"mappings":";;;;AACA,SAASA,gBAAgB,QAAQ,8BAA6B;;AAEvD,SAASC,qBACdC,OAAgB,EAChBC,0BAAmC,KAAK;IAExC,8DAA8D;IAC9D,uGAAuG;IACvG,IAAIC,MAAMC,OAAO,CAACH,UAAU;QAC1B,OAAO,GAAGA,OAAO,CAAC,EAAE,CAAC,CAAC,EAAEA,OAAO,CAAC,EAAE,CAAC,CAAC,EAAEA,OAAO,CAAC,EAAE,EAAE;IACpD;IAEA,kEAAkE;IAClE,kFAAkF;IAClF,IAAIC,2BAA2BD,QAAQI,UAAU,CAACN,mLAAAA,GAAmB;QACnE,OAAOA,mLAAAA;IACT;IAEA,OAAOE;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 2966, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/fetch-server-response.ts"],"sourcesContent":["'use client'\n\n// TODO: Explicitly import from client.browser\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n createFromReadableStream as createFromReadableStreamBrowser,\n createFromFetch as createFromFetchBrowser,\n} from 'react-server-dom-webpack/client'\n\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport { fetch } from '../segment-cache/fetch'\nimport type {\n FlightRouterState,\n InitialRSCPayload,\n NavigationFlightResponse,\n} from '../../../shared/lib/app-router-types'\n\nimport {\n type NEXT_ROUTER_PREFETCH_HEADER,\n type NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_RSC_UNION_QUERY,\n NEXT_URL,\n RSC_HEADER,\n RSC_CONTENT_TYPE_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_DID_POSTPONE_HEADER,\n NEXT_HTML_REQUEST_ID_HEADER,\n NEXT_REQUEST_ID_HEADER,\n} from '../app-router-headers'\nimport { callServer } from '../../app-call-server'\nimport { findSourceMapURL } from '../../app-find-source-map-url'\nimport {\n normalizeFlightData,\n prepareFlightRouterStateForRequest,\n type NormalizedFlightData,\n} from '../../flight-data-helpers'\nimport { setCacheBustingSearchParam } from './set-cache-busting-search-param'\nimport { urlToUrlWithoutFlightMarker } from '../../route-params'\nimport type { NormalizedSearch } from '../segment-cache/cache-key'\nimport { getDeploymentId } from '../../../shared/lib/deployment-id'\nimport { getNavigationBuildId } from '../../navigation-build-id'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\nimport {\n stripIsPartialByte,\n createNonTaskyPrefetchResponseStream,\n} from '../segment-cache/cache'\nimport { UnknownDynamicStaleTime } from '../segment-cache/bfcache'\n\nconst createFromReadableStream =\n createFromReadableStreamBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromReadableStream']\nconst createFromFetch =\n createFromFetchBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromFetch']\n\nlet createDebugChannel:\n | typeof import('../../dev/debug-channel').createDebugChannel\n | undefined\n\nif (process.env.__NEXT_DEV_SERVER && process.env.__NEXT_REACT_DEBUG_CHANNEL) {\n createDebugChannel = (\n require('../../dev/debug-channel') as typeof import('../../dev/debug-channel')\n ).createDebugChannel\n}\n\nexport interface FetchServerResponseOptions {\n readonly flightRouterState: FlightRouterState\n readonly nextUrl: string | null\n readonly isHmrRefresh?: boolean\n readonly signal?: AbortSignal\n}\n\nexport type StaticStageData<\n T extends\n | NavigationFlightResponse\n | InitialRSCPayload = NavigationFlightResponse,\n> = {\n readonly response: T\n readonly isResponsePartial: boolean\n}\n\ntype SpaFetchServerResponseResult = {\n flightData: NormalizedFlightData[]\n canonicalUrl: URL\n renderedSearch: NormalizedSearch\n couldBeIntercepted: boolean\n supportsPerSegmentPrefetching: boolean\n postponed: boolean\n dynamicStaleTime: number\n staticStageData: StaticStageData | null\n runtimePrefetchStream: ReadableStream<Uint8Array> | null\n responseHeaders: Headers\n debugInfo: Array<any> | null\n /**\n * Dev only: resolves once the server has flushed the shell-stage content to\n * the stream (or earlier, on a cache miss). The navigation defers revealing\n * the response (resolving its deferred RSCs) until this settles, so React\n * doesn't render a boundary's children before their row has been decoded and\n * commit a premature Suspense fallback. `null` outside the streaming dev\n * render.\n */\n revealAfter: Promise<void> | null\n}\n\ntype MpaFetchServerResponseResult = string\n\nexport type FetchServerResponseResult =\n | MpaFetchServerResponseResult\n | SpaFetchServerResponseResult\n\nexport type RequestHeaders = {\n [RSC_HEADER]?: '1'\n [NEXT_ROUTER_STATE_TREE_HEADER]?: string\n [NEXT_URL]?: string\n [NEXT_ROUTER_PREFETCH_HEADER]?: '1' | '2' | '3'\n [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]?: string\n 'x-deployment-id'?: string\n [NEXT_HMR_REFRESH_HEADER]?: '1'\n // A header that is only added in test mode to assert on fetch priority\n 'Next-Test-Fetch-Priority'?: RequestInit['priority']\n [NEXT_HTML_REQUEST_ID_HEADER]?: string // dev-only\n [NEXT_REQUEST_ID_HEADER]?: string // dev-only\n}\n\nfunction doMpaNavigation(url: string): FetchServerResponseResult {\n return urlToUrlWithoutFlightMarker(new URL(url, location.origin)).toString()\n}\n\nlet isPageUnloading = false\n\nif (typeof window !== 'undefined') {\n // Track when the page is unloading, e.g. due to reloading the page or\n // performing hard navigations. This allows us to suppress error logging when\n // the browser cancels in-flight requests during page uLine truncated
|
||||
{"offset": {"line": 3467, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/is-navigating-to-new-root-layout.ts"],"sourcesContent":["import type { FlightRouterState } from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport type { RouteTree } from '../segment-cache/cache'\n\nexport function isNavigatingToNewRootLayout(\n currentTree: FlightRouterState,\n nextTree: RouteTree\n): boolean {\n // Decides whether navigating from currentTree to nextTree crosses into a\n // different root layout, which requires a full-page (MPA-style) navigation.\n //\n // The \"root layout\" is the highest-level layout in the tree. The segments at\n // or above it form the \"root layout prefix\", which the server marks with the\n // IsRootLayoutOrAbove hint. Two routes share a root layout iff their root\n // layout prefixes are structurally identical — same segments (ignoring\n // dynamic param *values*) for the same depth. So we walk the prefix in\n // lockstep and report a change as soon as the prefixes diverge.\n const currentInPrefix =\n ((currentTree[4] ?? 0) & PrefetchHint.IsRootLayoutOrAbove) !== 0\n const nextInPrefix =\n (nextTree.prefetchHints & PrefetchHint.IsRootLayoutOrAbove) !== 0\n\n // Both trees have descended past the root layout with everything above\n // matching — same root layout.\n if (!currentInPrefix && !nextInPrefix) {\n return false\n }\n\n // One tree's root layout prefix is deeper than the other's, so the root\n // layout boundary moved — it must have changed.\n // E.g. /[lang]/layout.js -> /[lang]/[region]/layout.js\n if (currentInPrefix !== nextInPrefix) {\n return true\n }\n\n // Both segments are still inside the root layout prefix. They must match.\n // Compare dynamic param name and type but ignore the value: different values\n // (e.g. /[name] for slug1 vs slug2) still resolve to the same /[name]/layout.\n // E.g. /same/(group1)/layout.js -> /same/(group2)/layout.js: (group1) changed\n // to (group2) inside the prefix, so the root layout changed.\n const currentTreeSegment = currentTree[0]\n const nextTreeSegment = nextTree.segment\n if (Array.isArray(currentTreeSegment) && Array.isArray(nextTreeSegment)) {\n if (\n currentTreeSegment[0] !== nextTreeSegment[0] ||\n currentTreeSegment[2] !== nextTreeSegment[2]\n ) {\n return true\n }\n } else if (currentTreeSegment !== nextTreeSegment) {\n return true\n }\n\n // Keep walking the prefix. (Above the root layout there is only a `children`\n // slot, but we traverse all slots defensively.)\n const slots = nextTree.slots\n const currentTreeChildren = currentTree[1]\n if (slots !== null) {\n for (const [slot, nextTreeChild] of slots) {\n const currentTreeChild = currentTreeChildren[slot]\n if (\n currentTreeChild === undefined ||\n isNavigatingToNewRootLayout(currentTreeChild, nextTreeChild)\n ) {\n return true\n }\n }\n }\n return false\n}\n"],"names":["PrefetchHint","isNavigatingToNewRootLayout","currentTree","nextTree","currentInPrefix","IsRootLayoutOrAbove","nextInPrefix","prefetchHints","currentTreeSegment","nextTreeSegment","segment","Array","isArray","slots","currentTreeChildren","slot","nextTreeChild","currentTreeChild","undefined"],"mappings":";;;;AACA,SAASA,YAAY,QAAQ,uCAAsC;;AAG5D,SAASC,4BACdC,WAA8B,EAC9BC,QAAmB;IAEnB,yEAAyE;IACzE,4EAA4E;IAC5E,EAAE;IACF,6EAA6E;IAC7E,6EAA6E;IAC7E,0EAA0E;IAC1E,uEAAuE;IACvE,uEAAuE;IACvE,gEAAgE;IAChE,MAAMC,kBACH,CAACF,CAAAA,WAAW,CAAC,EAAE,IAAI,CAAA,IAAKF,8LAAAA,CAAaK,mBAAkB,MAAO;IACjE,MAAMC,eACHH,CAAAA,SAASI,aAAa,GAAGP,8LAAAA,CAAaK,mBAAkB,MAAO;IAElE,uEAAuE;IACvE,+BAA+B;IAC/B,IAAI,CAACD,mBAAmB,CAACE,cAAc;QACrC,OAAO;IACT;IAEA,wEAAwE;IACxE,gDAAgD;IAChD,uDAAuD;IACvD,IAAIF,oBAAoBE,cAAc;QACpC,OAAO;IACT;IAEA,0EAA0E;IAC1E,6EAA6E;IAC7E,8EAA8E;IAC9E,8EAA8E;IAC9E,6DAA6D;IAC7D,MAAME,qBAAqBN,WAAW,CAAC,EAAE;IACzC,MAAMO,kBAAkBN,SAASO,OAAO;IACxC,IAAIC,MAAMC,OAAO,CAACJ,uBAAuBG,MAAMC,OAAO,CAACH,kBAAkB;QACvE,IACED,kBAAkB,CAAC,EAAE,KAAKC,eAAe,CAAC,EAAE,IAC5CD,kBAAkB,CAAC,EAAE,KAAKC,eAAe,CAAC,EAAE,EAC5C;YACA,OAAO;QACT;IACF,OAAO,IAAID,uBAAuBC,iBAAiB;QACjD,OAAO;IACT;IAEA,6EAA6E;IAC7E,gDAAgD;IAChD,MAAMI,QAAQV,SAASU,KAAK;IAC5B,MAAMC,sBAAsBZ,WAAW,CAAC,EAAE;IAC1C,IAAIW,UAAU,MAAM;QAClB,KAAK,MAAM,CAACE,MAAMC,cAAc,IAAIH,MAAO;YACzC,MAAMI,mBAAmBH,mBAAmB,CAACC,KAAK;YAClD,IACEE,qBAAqBC,aACrBjB,4BAA4BgB,kBAAkBD,gBAC9C;gBACA,OAAO;YACT;QACF;IACF;IACA,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 3528, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/ppr-navigations.ts"],"sourcesContent":["import type {\n CacheNodeSeedData,\n FlightRouterState,\n Segment,\n} from '../../../shared/lib/app-router-types'\nimport type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type { HeadData, ScrollRef } from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport {\n PAGE_SEGMENT_KEY,\n DEFAULT_SEGMENT_KEY,\n NOT_FOUND_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport { matchSegment } from '../match-segments'\nimport { createHrefFromUrl } from './create-href-from-url'\nimport { fetchServerResponse } from './fetch-server-response'\nimport { dispatchAppRouterAction } from '../use-action-queue'\nimport {\n ACTION_SERVER_PATCH,\n type ServerPatchAction,\n} from './router-reducer-types'\nimport { isNavigatingToNewRootLayout } from './is-navigating-to-new-root-layout'\nimport { getLastCommittedTree } from './reducers/committed-state'\nimport {\n convertServerPatchToFullTree,\n type NavigationSeed,\n} from '../segment-cache/navigation'\nimport {\n type RouteTree,\n type RefreshState,\n type FulfilledRouteCacheEntry,\n convertReusedFlightRouterStateToRouteTree,\n readSegmentCacheEntryForNavigation,\n waitForSegmentCacheEntry,\n markRouteEntryAsDynamicRewrite,\n invalidateRouteCacheEntries,\n resolveStaleAt,\n writePrerenderResponseIntoCache,\n processRuntimePrefetchStream,\n writeDynamicRenderResponseIntoCache,\n EntryStatus,\n} from '../segment-cache/cache'\nimport { FetchStrategy } from '../segment-cache/types'\nimport { discoverKnownRoute } from '../segment-cache/optimistic-routes'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\nimport { urlSearchParamsToParsedUrlQuery } from '../../route-params'\nimport type { NormalizedSearch } from '../segment-cache/cache-key'\nimport {\n getRenderedSearchFromVaryPath,\n type PageVaryPath,\n} from '../segment-cache/vary-path'\nimport {\n readFromBFCache,\n readFromBFCacheDuringRegularNavigation,\n writeToBFCache,\n writeHeadToBFCache,\n updateBFCacheEntryStaleAt,\n computeDynamicStaleAt,\n} from '../segment-cache/bfcache'\n\n// This is yet another tree type that is used to track pending promises that\n// need to be fulfilled once the dynamic data is received. The terminal nodes of\n// this tree represent the new Cache Node trees that were created during this\n// request. We can't use the Cache Node tree or Route State tree directly\n// because those include reused nodes, too. This tree is discarded as soon as\n// the navigation response is received.\nexport type NavigationTask = {\n status: NavigationTaskStatus\n // The router state that corresponds to the tree that this Task represents.\n route: FlightRouterState\n // The CacheNode that corresponds to the tree that this Task represents.\n node: CacheNode\n // The tree sent to the server during the dynamic request. If all the segments\n // are static, then this will be null, and no server request is required.\n // Otherwise, this is the same as `route`, except with the `refetch` marker\n // set on the top-most segment that needs to be fetched.\n dynamicRequestTree: FlightRouterState | null\n // The URL that should be used to fetch the dynamic data. This is only set\n // when the segment cannot be refetched from the current route, because it's\n // part of a \"default\" parallel slot that was reused during a navigation.\n refreshState: RefreshState | null\n children: Map<string, NavigationTask> | null\n}\n\nexport const enum FreshnessPolicy {\n Default,\n Hydration,\n HistoryTraversal,\n RefreshAll,\n HMRRefresh,\n Gesture,\n}\n\nconst enum NavigationTaskStatus {\n Pending,\n Fulfilled,\n Rejected,\n}\n\n/**\n * When a NavigationTask finishes, there may or may not be data still missing,\n * necessitating a retry.\n */\nconst enum NavigationTaskExitStatus {\n /**\n * The request was superseded by a newer navigation and aborted. No retry is\n * needed; the newer request owns the tree from here.\n */\n Canceled = -1,\n /**\n * No additional navigation is required.\n */\n Done = 0,\n /**\n * Some data failed to load, presumably due to a route tree mismatch. Perform\n * a soft retry to reload the entire tree (re-fetching the dynamic data).\n */\n SoftRetry = 1,\n /**\n * Some data failed to load in an unrecoverable way, e.g. in an inactive\n * parallel route. Fall back to a hard (MPA-style) retry.\n */\n HardRetry = 2,\n /**\n * The route tree matched, but the request was redirected, so the navigation\n * committed the wrong canonical URL. The route cache is no longer reliable\n * (the redirect implies a server change the prediction couldn't account for),\n * so we re-resolve the route — but the data we already received Line truncated
|
||||
{"offset": {"line": 4970, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/reducers/committed-state.ts"],"sourcesContent":["import type { FlightRouterState } from '../../../../shared/lib/app-router-types'\n\n// The tree from the last state that was committed to the browser history\n// (i.e., the last state for which HistoryUpdater's useInsertionEffect ran).\n// This lets the server-patch reducer distinguish between retrying a\n// navigation that already pushed a history entry vs one whose transition\n// suspended and never committed.\n//\n// Currently only used by the server-patch retry logic, but this module is a\n// stepping stone toward a broader refactor of the navigation queue. The\n// existing AppRouter action queue will eventually be replaced by a more\n// reactive model that explicitly tracks pending vs committed navigation\n// state. This file will likely evolve into (or be subsumed by) that new\n// implementation.\nlet lastCommittedTree: FlightRouterState | null = null\n\nexport function getLastCommittedTree(): FlightRouterState | null {\n return lastCommittedTree\n}\n\nexport function setLastCommittedTree(tree: FlightRouterState): void {\n lastCommittedTree = tree\n}\n"],"names":["lastCommittedTree","getLastCommittedTree","setLastCommittedTree","tree"],"mappings":";;;;;;AAEA,yEAAyE;AACzE,4EAA4E;AAC5E,oEAAoE;AACpE,yEAAyE;AACzE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,kBAAkB;AAClB,IAAIA,oBAA8C;AAE3C,SAASC;IACd,OAAOD;AACT;AAEO,SAASE,qBAAqBC,IAAuB;IAC1DH,oBAAoBG;AACtB","ignoreList":[0]}},
|
||||
{"offset": {"line": 4999, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/reducers/navigate-reducer.ts"],"sourcesContent":["import type {\n NavigateAction,\n ReadonlyReducerState,\n ReducerState,\n} from '../router-reducer-types'\n\nimport {\n completeHardNavigation,\n navigate as navigateUsingSegmentCache,\n} from '../../segment-cache/navigation'\nimport { getStaleTimeMs } from '../../segment-cache/cache'\nimport { FreshnessPolicy } from '../ppr-navigations'\n\n// These values are set by `define-env-plugin` (based on `nextConfig.experimental.staleTimes`)\n// and default to 5 minutes (static) / 0 seconds (dynamic)\nexport const DYNAMIC_STALETIME_MS =\n Number(process.env.__NEXT_CLIENT_ROUTER_DYNAMIC_STALETIME) * 1000\n\nexport const STATIC_STALETIME_MS = getStaleTimeMs(\n Number(process.env.__NEXT_CLIENT_ROUTER_STATIC_STALETIME)\n)\n\nexport function navigateReducer(\n state: ReadonlyReducerState,\n action: NavigateAction\n): ReducerState {\n const { url, isExternalUrl, navigateType, scrollBehavior } = action\n\n if (isExternalUrl) {\n return completeHardNavigation(state, url, navigateType)\n }\n\n // Handles case where `<meta http-equiv=\"refresh\">` tag is present,\n // which will trigger an MPA navigation.\n if (document.getElementById('__next-page-redirect')) {\n return completeHardNavigation(state, url, navigateType)\n }\n\n // Temporary glue code between the router reducer and the new navigation\n // implementation. Eventually we'll rewrite the router reducer to a\n // state machine.\n const currentUrl = new URL(state.canonicalUrl, location.origin)\n const currentRenderedSearch = state.renderedSearch\n return navigateUsingSegmentCache(\n state,\n url,\n currentUrl,\n currentRenderedSearch,\n state.cache,\n state.tree,\n state.nextUrl,\n FreshnessPolicy.Default,\n scrollBehavior,\n navigateType\n )\n}\n"],"names":["completeHardNavigation","navigate","navigateUsingSegmentCache","getStaleTimeMs","FreshnessPolicy","DYNAMIC_STALETIME_MS","Number","process","env","__NEXT_CLIENT_ROUTER_DYNAMIC_STALETIME","STATIC_STALETIME_MS","__NEXT_CLIENT_ROUTER_STATIC_STALETIME","navigateReducer","state","action","url","isExternalUrl","navigateType","scrollBehavior","document","getElementById","currentUrl","URL","canonicalUrl","location","origin","currentRenderedSearch","renderedSearch","cache","tree","nextUrl","Default"],"mappings":";;;;;;;;AAMA,SACEA,sBAAsB,EACtBC,YAAYC,yBAAyB,QAChC,iCAAgC;AACvC,SAASC,cAAc,QAAQ,4BAA2B;AAC1D,SAASC,eAAe,QAAQ,qBAAoB;;;;AAI7C,MAAMC,uBACXC,OAAOC,QAAQC,GAAG,CAACC,6BAA0C,KAAI,IAAR;AAEpD,MAAMC,0BAAsBP,0NAAAA,EACjCG,OAAOC,QAAQC,GAAG,CAACG,qCAAqC,GACzD;AAEM,SAASC,gBACdC,KAA2B,EAC3BC,MAAsB;IAEtB,MAAM,EAAEC,GAAG,EAAEC,aAAa,EAAEC,YAAY,EAAEC,cAAc,EAAE,GAAGJ;IAE7D,IAAIE,eAAe;QACjB,WAAOhB,uNAAAA,EAAuBa,OAAOE,KAAKE;IAC5C;IAEA,mEAAmE;IACnE,wCAAwC;IACxC,IAAIE,SAASC,cAAc,CAAC,yBAAyB;QACnD,WAAOpB,uNAAAA,EAAuBa,OAAOE,KAAKE;IAC5C;IAEA,wEAAwE;IACxE,mEAAmE;IACnE,iBAAiB;IACjB,MAAMI,aAAa,IAAIC,IAAIT,MAAMU,YAAY,EAAEC,SAASC,MAAM;IAC9D,MAAMC,wBAAwBb,MAAMc,cAAc;IAClD,WAAOzB,yMAAAA,EACLW,OACAE,KACAM,YACAK,uBACAb,MAAMe,KAAK,EACXf,MAAMgB,IAAI,EACVhB,MAAMiB,OAAO,EACb1B,yNAAAA,CAAgB2B,OAAO,EACvBb,gBACAD;AAEJ","ignoreList":[0]}},
|
||||
{"offset": {"line": 5036, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/router-reducer-types.ts"],"sourcesContent":["import type { CacheNode, ScrollRef } from '../../../shared/lib/app-router-types'\nimport type { FlightRouterState } from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\nimport type { FreshnessPolicy } from './ppr-navigations'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n navigatedAt,\n previousTree,\n serverResponse,\n}: {\n navigatedAt: number\n previousTree: FlightRouterState\n serverResponse: FetchServerResponseResult\n}) => void\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n type: typeof ACTION_REFRESH\n /**\n * Bypass invalidating the segment cache. Used by the Instant Navigation\n * Testing API to preserve prefetched data when refreshing after an MPA\n * navigation. Not exposed in production builds by default.\n */\n bypassCacheInvalidation?: boolean\n}\n\nexport interface HmrRefreshAction {\n type: typeof ACTION_HMR_REFRESH\n signal?: AbortSignal\n}\n\nexport type ServerActionDispatcher = (\n args: Omit<\n ServerActionAction,\n 'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n >\n) => void\n\nexport interface ServerActionAction {\n type: typeof ACTION_SERVER_ACTION\n actionId: string\n actionArgs: any[]\n resolve: (value: any) => void\n reject: (reason?: any) => void\n didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n * - Apply router state tree from prefetch\n * - Apply Flight data from prefetch to the cache\n * - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n * - Check if hard navigation is needed\n * - Hard navigation happens when a dynamic parameter below the common layout changed\n * - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n * - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n * - If hard navigation is not needed\n * - The cache is reused\n * - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n * - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n * - Flight data is fetched in the reducer (suspends the reducer)\n * - Router state tree is created based on Flight data\n * - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n type: typeof ACTION_NAVIGATE\n url: URL\n isExternalUrl: boolean\n locationSearch: Location['search']\n navigateType: 'push' | 'replace'\n scrollBehavior: ScrollBehavior\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n type: typeof ACTION_RESTORE\n url: URL\n historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n tree: FlightRouterState\n renderedSearch: string\n}\n\n/Line truncated
|
||||
{"offset": {"line": 5074, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/router-reducer/set-cache-busting-search-param.ts"],"sourcesContent":["'use client'\n\nimport {\n computeCacheBustingSearchParam,\n computeLegacyCacheBustingSearchParam,\n} from '../../../shared/lib/router/utils/cache-busting-search-param'\nimport {\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_URL,\n NEXT_RSC_UNION_QUERY,\n} from '../app-router-headers'\nimport type { RequestHeaders } from './fetch-server-response'\n\nasync function computeClientCacheBustingSearchParam(\n headers: RequestHeaders\n): Promise<string> {\n if (typeof globalThis.crypto?.subtle?.digest === 'function') {\n return computeCacheBustingSearchParam(\n headers[NEXT_ROUTER_PREFETCH_HEADER],\n headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER],\n headers[NEXT_ROUTER_STATE_TREE_HEADER],\n headers[NEXT_URL]\n )\n }\n\n return computeLegacyCacheBustingSearchParam(\n headers[NEXT_ROUTER_PREFETCH_HEADER],\n headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER],\n headers[NEXT_ROUTER_STATE_TREE_HEADER],\n headers[NEXT_URL]\n )\n}\n\n/**\n * Mutates the provided URL by adding a cache-busting search parameter for CDNs that don't\n * support custom headers. This helps avoid caching conflicts by making each request unique.\n *\n * Rather than relying on the Vary header which some CDNs ignore, we append a search param\n * to create a unique URL that forces a fresh request.\n *\n * Example:\n * URL before: https://example.com/path?query=1\n * URL after: https://example.com/path?query=1&_rsc=abc123\n *\n * Note: This function mutates the input URL directly and resolves once the\n * cache-busting value has been computed and applied.\n *\n * TODO: Since we need to use a search param anyway, we could simplify by removing the custom\n * headers approach entirely and just use search params.\n */\nexport const setCacheBustingSearchParam = async (\n url: URL,\n headers: RequestHeaders\n): Promise<void> => {\n const uniqueCacheKey = await computeClientCacheBustingSearchParam(headers)\n setCacheBustingSearchParamWithHash(url, uniqueCacheKey)\n}\n\n/**\n * Sets a cache-busting search parameter on a URL using a provided hash value.\n *\n * This function performs the same logic as `setCacheBustingSearchParam` but accepts\n * a pre-computed hash instead of computing it from headers.\n *\n * Example:\n * URL before: https://example.com/path?query=1\n * hash: \"abc123\"\n * URL after: https://example.com/path?query=1&_rsc=abc123\n *\n * If the hash is empty, we will set `_rsc` search param without a value.\n * Like this: https://example.com/path?query=1&_rsc\n *\n * Note: This function mutates the input URL directly and does not return anything.\n */\nexport const setCacheBustingSearchParamWithHash = (\n url: URL,\n hash: string\n): void => {\n /**\n * Note that we intentionally do not use `url.searchParams.set` here:\n *\n * const url = new URL('https://example.com/search?q=custom%20spacing');\n * url.searchParams.set('_rsc', 'abc123');\n * console.log(url.toString()); // Outputs: https://example.com/search?q=custom+spacing&_rsc=abc123\n * ^ <--- this is causing confusion\n * This is in fact intended based on https://url.spec.whatwg.org/#interface-urlsearchparams, but\n * we want to preserve the %20 as %20 if that's what the user passed in, hence the custom\n * logic below.\n */\n const existingSearch = url.search\n const rawQuery = existingSearch.startsWith('?')\n ? existingSearch.slice(1)\n : existingSearch\n\n // Always remove any existing cache busting param and add a fresh one to ensure\n // we have the correct value based on current request headers\n const pairs = rawQuery\n .split('&')\n .filter((pair) => pair && !pair.startsWith(`${NEXT_RSC_UNION_QUERY}=`))\n\n if (hash.length > 0) {\n pairs.push(`${NEXT_RSC_UNION_QUERY}=${hash}`)\n } else {\n pairs.push(`${NEXT_RSC_UNION_QUERY}`)\n }\n url.search = pairs.length ? `?${pairs.join('&')}` : ''\n}\n"],"names":["computeCacheBustingSearchParam","computeLegacyCacheBustingSearchParam","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_URL","NEXT_RSC_UNION_QUERY","computeClientCacheBustingSearchParam","headers","globalThis","crypto","subtle","digest","setCacheBustingSearchParam","url","uniqueCacheKey","setCacheBustingSearchParamWithHash","hash","existingSearch","search","rawQuery","startsWith","slice","pairs","split","filter","pair","length","push","join"],"mappings":";;;;;;AAEA,SACEA,8BAA8B,EAC9BC,oCAAoC,QAC/B,8DAA6D;AACpE,SACEC,2BAA2B,EAC3BC,mCAAmC,EACnCC,6BAA6B,EAC7BC,QAAQ,EACRC,oBAAoB,QACf,wBAAuB;AAZ9B;;;AAeA,eAAeC,qCACbC,OAAuB;IAEvB,IAAI,OAAOC,WAAWC,MAAM,EAAEC,QAAQC,WAAW,YAAY;QAC3Line truncated
|
||||
{"offset": {"line": 5122, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/bfcache.ts"],"sourcesContent":["import { DYNAMIC_STALETIME_MS } from '../router-reducer/reducers/navigate-reducer'\nimport type { SegmentVaryPath } from './vary-path'\n\n/**\n * Sentinel value indicating that no per-page dynamic stale time was provided.\n * When this is the dynamicStaleTime, the default DYNAMIC_STALETIME_MS is used.\n */\nexport const UnknownDynamicStaleTime = -1\n\n/**\n * Converts a dynamic stale time (in seconds, as sent by the server in the `d`\n * field of the Flight response) to an absolute staleAt timestamp. When the\n * value is unknown, falls back to the global DYNAMIC_STALETIME_MS.\n */\nexport function computeDynamicStaleAt(\n now: number,\n dynamicStaleTimeSeconds: number\n): number {\n return dynamicStaleTimeSeconds !== UnknownDynamicStaleTime\n ? now + dynamicStaleTimeSeconds * 1000\n : now + DYNAMIC_STALETIME_MS\n}\nimport {\n setInCacheMap,\n getFromCacheMap,\n EntryStatus,\n type UnknownMapEntry,\n type CacheMap,\n createCacheMap,\n} from './cache-map'\n\nexport type BFCacheEntry = {\n rsc: React.ReactNode | null\n prefetchRsc: React.ReactNode | null\n head: React.ReactNode | null\n prefetchHead: React.ReactNode | null\n\n // The bfcacheId of the CacheNode that wrote this entry. Restored on\n // history-traversal navigations so that `useRouter().bfcacheId` is stable\n // across back/forward, even without `cacheComponents` Activity preservation.\n bfcacheId: number\n\n ref: UnknownMapEntry | null\n size: number\n // The time at which this data was received. Used to compute the stale time\n // for dynamic prefetches (which use STATIC_STALETIME_MS instead of\n // DYNAMIC_STALETIME_MS). Stored explicitly because staleAt may be\n // overridden by a per-page unstable_dynamicStaleTime, which would break\n // any reverse calculation from staleAt.\n navigatedAt: number\n staleAt: number\n version: number\n // A BFCacheEntry always represents a completed navigation, so the status is\n // always Fulfilled. The field exists so that BFCacheEntry conforms to the\n // MapValue protocol.\n status: EntryStatus.Fulfilled\n}\n\nconst bfcacheMap: CacheMap<BFCacheEntry> = createCacheMap()\n\nlet currentBfCacheVersion = 0\n\nexport function invalidateBfCache(): void {\n if (typeof window === 'undefined') {\n return\n }\n currentBfCacheVersion++\n}\n\nexport function writeToBFCache(\n now: number,\n varyPath: SegmentVaryPath,\n rsc: React.ReactNode,\n prefetchRsc: React.ReactNode,\n head: React.ReactNode,\n prefetchHead: React.ReactNode,\n dynamicStaleAt: number,\n bfcacheId: number\n): void {\n if (typeof window === 'undefined') {\n return\n }\n\n const entry: BFCacheEntry = {\n rsc,\n prefetchRsc,\n\n // TODO: These fields will be removed from both BFCacheEntry and\n // SegmentCacheEntry. The head has its own separate cache entry.\n head,\n prefetchHead,\n\n bfcacheId,\n\n ref: null,\n // TODO: This is just a heuristic. Getting the actual size of the segment\n // isn't feasible because it's part of a larger streaming response. The\n // LRU will still evict it, we just won't have a fully accurate total\n // LRU size. However, we'll probably remove the size tracking from the LRU\n // entirely and use memory pressure events instead.\n size: 100,\n\n navigatedAt: now,\n\n // A back/forward navigation will disregard the stale time. This field is\n // only relevant when staleTimes.dynamic is enabled or unstable_dynamicStaleTime\n // is exported by a page.\n staleAt: dynamicStaleAt,\n version: currentBfCacheVersion,\n status: EntryStatus.Fulfilled,\n }\n const isRevalidation = false\n setInCacheMap(bfcacheMap, varyPath, entry, isRevalidation)\n}\n\nexport function writeHeadToBFCache(\n now: number,\n varyPath: SegmentVaryPath,\n head: React.ReactNode,\n prefetchHead: React.ReactNode,\n dynamicStaleAt: number,\n bfcacheId: number\n): void {\n // Read the special \"segment\" that represents the head data.\n writeToBFCache(\n now,\n varyPath,\n head,\n prefetchHead,\n null,\n null,\n dynamicStaleAt,\n bfcacheId\n )\n}\n\n/**\n * Update the staleAt of an existing BFCache entry. Used after a dynamic\n * response arrives with a per-page stale time from `unstable_dynamicStaleTime`.\n * The per-page value is authoritative — it overrides whatever staleAt was set\n * by the default DYNAMIC_STALETIME_MS.\n */\nexport function updateBFCacheEntryStaleAt(\n varyPath: SegmentVaryPath,\n newStaleAt: number\n): void {\n if (typeof window === 'undefined') {\n return\n }\n const isRevalidation = false\n // Read with staleness bypass (-1) so we can update even stale entries\n const entry = getFromCacheMap(\n -1,\n currentBfCacheVersion,\n bfcacheMap,\n varyPath,\n isRevalidatLine truncated
|
||||
{"offset": {"line": 5200, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/cache-key.ts"],"sourcesContent":["// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\n// Only functions in this module should be allowed to create CacheKeys.\nexport type NormalizedPathname = Opaque<'NormalizedPathname', string>\nexport type NormalizedSearch = Opaque<'NormalizedSearch', string>\nexport type NormalizedNextUrl = Opaque<'NormalizedNextUrl', string>\n\nexport type RouteCacheKey = Opaque<\n 'RouteCacheKey',\n {\n pathname: NormalizedPathname\n search: NormalizedSearch\n nextUrl: NormalizedNextUrl | null\n\n // TODO: Eventually the dynamic params will be added here, too.\n }\n>\n\nexport function createCacheKey(\n originalHref: string,\n nextUrl: string | null\n): RouteCacheKey {\n const originalUrl = new URL(originalHref)\n const cacheKey = {\n pathname: originalUrl.pathname as NormalizedPathname,\n search: originalUrl.search as NormalizedSearch,\n nextUrl: nextUrl as NormalizedNextUrl | null,\n } as RouteCacheKey\n return cacheKey\n}\n\n/**\n * Splits a pathname into its non-empty parts. Equivalent to\n * `pathname.split('/').filter((p) => p !== '')` — empty tokens produced by\n * leading, trailing, or consecutive slashes are skipped.\n *\n * We use a manual loop instead of `split` + `filter` because\n * `String.prototype.split` can return arrays with either the packed or holey\n * elements kind depending on internal fast paths, and `filter`/`slice`\n * propagate the kind. Mixing holey and packed arrays at the same call sites\n * makes downstream array method loads (`slice`, `join`, `length`) polymorphic\n * and causes repeated \"wrong map\" deoptimizations in hot route-matching code.\n * Pushing into an array literal guarantees a packed elements kind.\n */\nexport function splitPathnameIntoParts(pathname: string): Array<string> {\n const parts: Array<string> = []\n let start = 0\n for (let i = 0; i < pathname.length; i++) {\n if (pathname.charCodeAt(i) === 47 /* '/' */) {\n if (i > start) {\n parts.push(pathname.slice(start, i))\n }\n start = i + 1\n }\n }\n if (start < pathname.length) {\n parts.push(pathname.slice(start))\n }\n return parts\n}\n"],"names":["createCacheKey","originalHref","nextUrl","originalUrl","URL","cacheKey","pathname","search","splitPathnameIntoParts","parts","start","i","length","charCodeAt","push","slice"],"mappings":"AAAA,2DAA2D;;;;;;;AAmBpD,SAASA,eACdC,YAAoB,EACpBC,OAAsB;IAEtB,MAAMC,cAAc,IAAIC,IAAIH;IAC5B,MAAMI,WAAW;QACfC,UAAUH,YAAYG,QAAQ;QAC9BC,QAAQJ,YAAYI,MAAM;QAC1BL,SAASA;IACX;IACA,OAAOG;AACT;AAeO,SAASG,uBAAuBF,QAAgB;IACrD,MAAMG,QAAuB,EAAE;IAC/B,IAAIC,QAAQ;IACZ,IAAK,IAAIC,IAAI,GAAGA,IAAIL,SAASM,MAAM,EAAED,IAAK;QACxC,IAAIL,SAASO,UAAU,CAACF,OAAO,GAAG,OAAO,KAAI;YAC3C,IAAIA,IAAID,OAAO;gBACbD,MAAMK,IAAI,CAACR,SAASS,KAAK,CAACL,OAAOC;YACnC;YACAD,QAAQC,IAAI;QACd;IACF;IACA,IAAID,QAAQJ,SAASM,MAAM,EAAE;QAC3BH,MAAMK,IAAI,CAACR,SAASS,KAAK,CAACL;IAC5B;IACA,OAAOD;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 5236, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/cache-map.ts"],"sourcesContent":["import type { VaryPath } from './vary-path'\nimport { lruPut, updateLruSize, deleteFromLru } from './lru'\n\n/**\n * A specialized data type for storing multi-key cache entries.\n *\n * The basic structure is a map whose keys are tuples, called the keypath.\n * When querying the cache, keypaths are compared per-element.\n *\n * Example:\n * set(map, ['https://localhost', 'foo/bar/baz'], 'yay');\n * get(map, ['https://localhost', 'foo/bar/baz']) -> 'yay'\n *\n * NOTE: Array syntax is used in these examples for illustration purposes, but\n * in reality the paths are lists.\n * \n * The parts of the keypath represent the different inputs that contribute\n * to the entry value. To illustrate, if you were to use this data type to store\n * HTTP responses, the keypath would include the URL and everything listed by\n * the Vary header.\n * \n * See vary-path.ts for more details.\n *\n * The order of elements in a keypath must be consistent between lookups to\n * be considered the same, but besides that, the order of the keys is not\n * semantically meaningful.\n *\n * Keypaths may include a special kind of key called Fallback. When an entry is\n * stored with Fallback as part of its keypath, it means that the entry does not\n * vary by that key. When querying the cache, if an exact match is not found for\n * a keypath, the cache will check for a Fallback match instead. Each element of\n * the keypath may have a Fallback, so retrieval is an O(n ^ 2) operation, but\n * it's expected that keypaths are relatively short.\n *\n * Example:\n * set(cacheMap, ['store', 'product', 1], PRODUCT_PAGE_1);\n * set(cacheMap, ['store', 'product', Fallback], GENERIC_PRODUCT_PAGE);\n *\n * // Exact match\n * get(cacheMap, ['store', 'product', 1]) -> PRODUCT_PAGE_1\n *\n * // Fallback match\n * get(cacheMap, ['store', 'product', 2]) -> GENERIC_PRODUCT_PAGE\n *\n * Because we have the Fallback mechanism, we can impose a constraint that\n * regular JS maps do not have: a value cannot be stored at multiple keypaths\n * simultaneously. These cases should be expressed with Fallback keys instead.\n *\n * Additionally, because values only exist at a single keypath at a time, we\n * can optimize successive lookups by caching the internal map entry on the\n * value itself, using the `ref` field. This is especially useful because it\n * lets us skip the O(n ^ 2) lookup that occurs when Fallback entries\n * are present.\n *\n\n * How to decide if stuff belongs in here, or in cache.ts?\n * -------------------------------------------------------\n * \n * Anything to do with retrival, lifetimes, or eviction needs to go in this\n * module because it affects the fallback algorithm. For example, when\n * performing a lookup, if an entry is stale, it needs to be treated as\n * semantically equivalent to if the entry was not present at all.\n * \n * If there's logic that's not related to the fallback algorithm, though, we\n * should prefer to put it in cache.ts.\n */\n\n/**\n * Tracks the status of a cache entry as it progresses from no data (Empty),\n * waiting for server data (Pending), and finished (either Fulfilled or\n * Rejected depending on the response from the server.\n *\n * This is defined here, rather than in cache.ts, because cache-map.ts needs to\n * inspect the status when performing a `onlyMatchFulfilled` lookup.\n */\nexport const enum EntryStatus {\n Empty = 0,\n Pending = 1,\n Fulfilled = 2,\n Rejected = 3,\n}\n\n// The protocol that values must implement. In practice, the only types that\n// we ever actually deal with in this module are RouteCacheEntry,\n// SegmentCacheEntry, and BFCacheEntry; this is just to keep track of the\n// coupling so we don't leak concerns between the modules unnecessarily.\nexport interface MapValue {\n ref: UnknownMapEntry | null\n size: number\n staleAt: number\n version: number\n status: EntryStatus\n}\n\n/**\n * Represents a node in the cache map and LRU.\n * MapEntry<V> structurally satisfies this interface for any V extends MapValue.\n *\n * The LRU can contain entries of different value types\n * (e.g., both RouteCacheEntry and SegmentCacheEntry). This interface captures\n * the common structure needed for cache map and LRU operations without\n * requiring knowledge of the specific value type.\n */\nexport interface MapEntry<V extends MapValue> {\n // Cache map structure fields\n parent: MapEntry<V> | null\n key: unknown\n map: Map<unknown, MapEntry<V>> | null\n value: V | null\n\n // LRU linked list fields\n prev: MapEntry<V> | null\n next: MapEntry<V> | null\n size: number\n}\n\n/**\n * A looser type for MapEntry\n * This allows the LRU to work with entries of different\n * value types while still providing type safety.\n *\n * The `map` field lets Map<unknown, MapLine truncated
|
||||
{"offset": {"line": 5528, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/cache.ts"],"sourcesContent":["import type {\n TreePrefetch,\n RootTreePrefetch,\n SegmentPrefetchResponse,\n} from '../../../server/app-render/collect-segment-data'\nimport type {\n CacheNodeSeedData,\n FlightData,\n Segment as FlightRouterStateSegment,\n} from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport {\n readVaryParams,\n type VaryParams,\n type VaryParamsIterable,\n} from '../../../shared/lib/segment-cache/vary-params-decoding'\nimport {\n NEXT_DID_POSTPONE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_ROUTER_STALE_TIME_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_URL,\n RSC_CONTENT_TYPE_HEADER,\n RSC_HEADER,\n} from '../app-router-headers'\nimport {\n createFetch,\n createFromNextReadableStream,\n decodeBufferedStage,\n resolveShellStageData,\n type RSCResponse,\n type RequestHeaders,\n} from '../router-reducer/fetch-server-response'\nimport { fetch } from './fetch'\nimport {\n pingPrefetchTask,\n isPrefetchTaskDirty,\n type PrefetchTask,\n type PrefetchSubtaskResult,\n} from './scheduler'\nimport type { NavigationLockPrefetch } from './navigation-testing-lock'\nimport {\n type RouteVaryPath,\n type SegmentVaryPath,\n type PartialSegmentVaryPath,\n getRouteVaryPath,\n getFulfilledRouteVaryPath,\n getFulfilledSegmentVaryPath,\n getSegmentVaryPathForRequest,\n getShellSegmentVaryPath,\n appendLayoutVaryPath,\n finalizeLayoutVaryPath,\n finalizePageVaryPath,\n clonePageVaryPathWithNewSearchParams,\n type PageVaryPath,\n type LayoutVaryPath,\n finalizeMetadataVaryPath,\n getPartialPageVaryPath,\n getPartialLayoutVaryPath,\n getRenderedSearchFromVaryPath,\n} from './vary-path'\nimport { createHrefFromUrl } from '../router-reducer/create-href-from-url'\nimport type {\n NormalizedPathname,\n NormalizedSearch,\n NormalizedNextUrl,\n RouteCacheKey,\n} from './cache-key'\nimport { createCacheKey as createPrefetchRequestKey } from './cache-key'\nimport { splitPathnameIntoParts } from './cache-key'\nimport {\n doesStaticSegmentAppearInURL,\n getCacheKeyForDynamicParam,\n getRenderedPathname,\n getRenderedSearch,\n parseDynamicParamFromURLPart,\n} from '../../route-params'\nimport {\n createCacheMap,\n getFromCacheMap,\n setInCacheMap,\n setSizeInCacheMap,\n deleteFromCacheMap,\n isValueExpired,\n EntryStatus,\n type CacheMap,\n type UnknownMapEntry,\n} from './cache-map'\nexport { EntryStatus } from './cache-map'\nimport {\n appendSegmentRequestKeyPart,\n convertSegmentPathToStaticExportFilename,\n createSegmentRequestKeyPart,\n HEAD_REQUEST_KEY,\n ROOT_SEGMENT_REQUEST_KEY,\n type SegmentRequestKey,\n} from '../../../shared/lib/segment-cache/segment-value-encoding'\nimport type {\n FlightRouterState,\n NavigationFlightResponse,\n} from '../../../shared/lib/app-router-types'\nimport {\n type NormalizedFlightData,\n normalizeFlightData,\n prepareFlightRouterStateForRequest,\n} from '../../flight-data-helpers'\nimport { STATIC_STALETIME_MS } from '../router-reducer/reducers/navigate-reducer'\nimport { pingVisibleLinks } from '../links'\nimport { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment'\nimport { FetchStrategy } from './types'\nimport { createPromiseWithResolvers } from '../../../shared/lib/promise-with-resolvers'\nimport { readFromBFCache, UnknownDynamicStaleTime } from './bfcache'\nimport { discoverKnownRoute, matchKnownRoute } from './optimistic-routes'\nimport { convertServerPatchToFullTree, type NavigationSeed } from './navigation'\nimport { getNavigationBuildId } from '../../navigation-build-id'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\n\n/**\n * Ensures a minimum stale time of 30s to avoid issues where the server sends a too\n * short-lived stale time, which would prevent anything from being prefetched.\n */\nexport function getStaleTimeMs(staleTimeSeconds: number): number {\n return Math.max(staleTimeSeconds, 30) * 1000\n}\n\n// A note on async/await when working in the prefetch cache:\n//\n// Most async operations in the prefetch cache should *not* use async/await,\n// Instead, spawn a subtask that writes the results to a cache entry, and attach\n// a \"ping\" listener to notify the prefetch queue to try again.\n//\n// The reason is we need to be able to access the segment cache and traverse its\n// data structures synchronously. For example, if there's a synchronous update\n// we can take an immediate snapshot of the cache to produce something we can\n// render. Limiting the use of async/await also makes it easier to avoid race\n// conditions, which is especially important because is cache is mutable.\n//\n// Another reason is that while we're performing async work, it's possible for\n// existing entries to becomLine truncated
|
||||
{"offset": {"line": 8065, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/fetch.ts"],"sourcesContent":["import { getPreLockFetch } from './navigation-testing-lock'\n\n/**\n * Internal `fetch` used by the Next.js client router.\n *\n * When the Instant Navigation Testing API is enabled, the navigation lock may\n * install a blocking override on `window.fetch` for the duration of a lock\n * scope. To let internal fetches bypass the lock, callers go through a wrapper\n * that falls back to the pre-lock fetch captured at lock-acquire time.\n *\n * When the testing API is not enabled, this calls window.fetch directly.\n */\nfunction fetchInternal(\n input: RequestInfo | URL,\n init?: RequestInit\n): Promise<Response> {\n if (process.env.__NEXT_EXPOSE_TESTING_API) {\n const preLockFetch = getPreLockFetch()\n if (preLockFetch !== null) {\n return preLockFetch(input, init)\n }\n }\n return fetch(input, init)\n}\n\nexport { fetchInternal as fetch }\n"],"names":["getPreLockFetch","fetchInternal","input","init","process","env","__NEXT_EXPOSE_TESTING_API","preLockFetch","fetch"],"mappings":";;;;AAAA,SAASA,eAAe,QAAQ,4BAA2B;;AAE3D;;;;;;;;;CASC,GACD,SAASC,cACPC,KAAwB,EACxBC,IAAkB;IAElB,IAAIC,QAAQC,GAAG,CAACC,wBAA2B,CAAF;QACvC,MAAMC,mBAAeP,mOAAAA;QACrB,IAAIO,iBAAiB,MAAM;YACzB,OAAOA,aAAaL,OAAOC;QAC7B;IACF;IACA,OAAOK,MAAMN,OAAOC;AACtB","ignoreList":[0]}},
|
||||
{"offset": {"line": 8094, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/lru.ts"],"sourcesContent":["import { deleteMapEntry } from './cache-map'\nimport type { UnknownMapEntry } from './cache-map'\nimport { pingPrefetchScheduler } from './scheduler'\n\n// We use an LRU for memory management. We must update this whenever we add or\n// remove a new cache entry, or when an entry changes size.\n\nlet head: UnknownMapEntry | null = null\nlet lruSize: number = 0\n\n// TODO: I chose the max size somewhat arbitrarily. Consider setting this based\n// on navigator.deviceMemory, or some other heuristic. We should make this\n// customizable via the Next.js config, too.\nconst maxLruSize = 50 * 1024 * 1024 // 50 MB\n\nexport function lruPut(node: UnknownMapEntry) {\n if (head === node) {\n // Already at the head\n return\n }\n const prev = node.prev\n const next = node.next\n if (next === null || prev === null) {\n // This is an insertion\n lruSize += node.size\n // Whenever we add an entry, we need to check if we've exceeded the\n // max size. We don't evict entries immediately; they're evicted later in\n // an asynchronous task.\n ensureCleanupIsScheduled()\n } else {\n // This is a move. Remove from its current position.\n prev.next = next\n next.prev = prev\n }\n\n // Move to the front of the list\n if (head === null) {\n // This is the first entry\n node.prev = node\n node.next = node\n } else {\n // Add to the front of the list\n const tail = head.prev\n node.prev = tail\n // In practice, this is never null, but that isn't encoded in the type\n if (tail !== null) {\n tail.next = node\n }\n node.next = head\n head.prev = node\n }\n head = node\n}\n\nexport function updateLruSize(node: UnknownMapEntry, newNodeSize: number) {\n // This is a separate function from `put` so that we can resize the entry\n // regardless of whether it's currently being tracked by the LRU.\n const prevNodeSize = node.size\n node.size = newNodeSize\n if (node.next === null) {\n // This entry is not currently being tracked by the LRU.\n return\n }\n // Update the total LRU size\n lruSize = lruSize - prevNodeSize + newNodeSize\n ensureCleanupIsScheduled()\n}\n\nexport function deleteFromLru(deleted: UnknownMapEntry) {\n const next = deleted.next\n const prev = deleted.prev\n if (next !== null && prev !== null) {\n lruSize -= deleted.size\n\n deleted.next = null\n deleted.prev = null\n\n // Remove from the list\n if (head === deleted) {\n // Update the head\n if (next === head) {\n // This was the last entry\n head = null\n } else {\n head = next\n prev.next = next\n next.prev = prev\n }\n } else {\n prev.next = next\n next.prev = prev\n }\n } else {\n // Already deleted\n }\n}\n\nfunction ensureCleanupIsScheduled() {\n if (lruSize <= maxLruSize) {\n return\n }\n\n // To schedule cleanup, ping the prefetch scheduler. At the end of its work\n // loop, once there are no queued tasks and no in-progress requests, it will\n // call cleanup().\n pingPrefetchScheduler()\n}\n\nexport function cleanup() {\n if (lruSize <= maxLruSize) {\n return\n }\n\n // Evict entries until we're at 90% capacity. We can assume this won't\n // infinite loop because even if `maxLruSize` were 0, eventually\n // `deleteFromLru` sets `head` to `null` when we run out entries.\n const ninetyPercentMax = maxLruSize * 0.9\n while (lruSize > ninetyPercentMax && head !== null) {\n const tail = head.prev\n // In practice, this is never null, but that isn't encoded in the type\n if (tail !== null) {\n // Delete the entry from the map. In turn, this will remove it from\n // the LRU.\n deleteMapEntry(tail)\n }\n }\n}\n"],"names":["deleteMapEntry","pingPrefetchScheduler","head","lruSize","maxLruSize","lruPut","node","prev","next","size","ensureCleanupIsScheduled","tail","updateLruSize","newNodeSize","prevNodeSize","deleteFromLru","deleted","cleanup","ninetyPercentMax"],"mappings":";;;;;;;;;;AAAA,SAASA,cAAc,QAAQ,cAAa;AAE5C,SAASC,qBAAqB,QAAQ,cAAa;;;AAEnD,8EAA8E;AAC9E,2DAA2D;AAE3D,IAAIC,OAA+B;AACnC,IAAIC,UAAkB;AAEtB,+EAA+E;AAC/E,0EAA0E;AAC1E,4CAA4C;AAC5C,MAAMC,aAAa,KAAK,OAAO,KAAK,QAAQ;;AAErC,SAASC,OAAOC,IAAqB;IAC1C,IAAIJ,SAASI,MAAM;QACjB,sBAAsB;QACtB;IACF;IACA,MAAMC,OAAOD,KAAKC,IAAI;IACtB,MAAMC,OAAOF,KAAKE,IAAI;IACtB,IAAIA,SAAS,QAAQD,SAAS,MAAM;QAClC,uBAAuB;QACvBJ,WAAWG,KAAKG,IAAI;QACpB,mEAAmE;QACnE,yEAAyE;QACzE,wBAAwB;QACxBC;IACF,OAAO;QACL,oDAAoD;QACpDH,KAAKC,IAAI,GAAGA;QACZA,KAAKD,IAAI,GAAGA;IACd;IAEA,gCAAgC;IAChC,IAAIL,SAAS,MAAM;QACjB,0BAA0B;QAC1BI,KAAKC,IAAI,GAAGD;QACZA,KAAKE,IAAI,GAAGF;IACd,OAAO;QACL,+BAA+B;QAC/B,MAAMK,OAAOT,KAAKK,IAAI;QACtBD,KAAKC,IAAI,GAAGI;QACZ,sEAAsE;QACtE,IAAIA,SAAS,MAAM;YACjBA,KAAKH,IAAI,GAAGF;QACd;QACAA,KAAKE,IAAI,GAAGN;QACZA,KAALine truncated
|
||||
{"offset": {"line": 8224, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/navigation-testing-lock.ts"],"sourcesContent":["/**\n * Navigation lock for the Instant Navigation Testing API.\n *\n * Manages the in-memory lock (a promise) that gates dynamic data writes\n * during instant navigation captures, and owns all cookie state\n * transitions (pending → captured-MPA, pending → captured-SPA).\n *\n * External actors (Playwright, devtools) set [0] to start a lock scope\n * and delete the cookie to end one. Next.js writes captured values.\n * The CookieStore handler distinguishes them by value: pending = external,\n * captured = self-write (ignored).\n *\n * This module assumes the Instant Navigation Testing API is enabled. When it\n * is disabled, the bundler resolves this module to\n * `./navigation-testing-lock.disabled` instead (see\n * `create-compiler-aliases.ts` for webpack and\n * `crates/next-core/src/next_import_map.rs` for Turbopack), so none of this\n * code ships in the browser bundle.\n */\n\nimport {\n PrefetchHint,\n type FlightRouterState,\n type InstantCookie,\n} from '../../../shared/lib/app-router-types'\nimport { NEXT_INSTANT_TEST_COOKIE } from '../app-router-headers'\nimport { refreshOnInstantNavigationUnlock } from '../use-action-queue'\nimport { subtreeHasSpeculativePrefetch } from './scheduler'\nimport {\n waitForSegmentCacheEntry,\n type PendingSegmentCacheEntry,\n type SegmentCacheEntry,\n} from './cache'\nimport type { FetchStrategy } from './types'\n\ntype InstantNavCookieState = 'empty' | 'pending' | 'mpa' | 'spa'\n\nfunction parseCookieValue(raw: string): InstantNavCookieState {\n if (raw === '') {\n return 'empty'\n }\n try {\n const parsed = JSON.parse(raw)\n if (Array.isArray(parsed)) {\n if (parsed.length >= 3) {\n const rawState = parsed[2]\n return rawState === null ? 'mpa' : 'spa'\n }\n }\n } catch {}\n return 'pending'\n}\n\nfunction writeDocumentCookie(\n value: InstantCookie,\n options: { domain?: string | null; path?: string | null }\n): void {\n if (typeof document === 'undefined') {\n return\n }\n let cookie = `${NEXT_INSTANT_TEST_COOKIE}=${JSON.stringify(value)}; Path=${\n options.path ?? '/'\n }`\n if (options.domain) {\n cookie += `; Domain=${options.domain}`\n }\n document.cookie = cookie\n}\n\nfunction writeCookieValue(value: InstantCookie): void {\n if (typeof cookieStore === 'undefined') {\n return\n }\n // Read the existing cookie to preserve its attributes (domain, path), then\n // write back with the new value. This updates the same cookie entry that the\n // external actor created, regardless of how it was scoped. The read goes\n // through `cookieStore.get` because `document.cookie` exposes only names and\n // values, not the domain/path we need to preserve. The write goes through\n // document.cookie because WebKit exposes Cookie Store on localhost but does\n // not commit cookies written through cookieStore.set() there.\n //\n // Capture the current lockState and compare it in the callback so we only\n // write if the lock we observed at call time is still held. This guards\n // against two races: (a) the scope ended between get and set (lockState is\n // now null), and (b) the scope ended and a new one was acquired in the same\n // gap (lockState is a different object). In either case we must not write —\n // doing so would leak stale state into the next scope or outlive the current\n // one. It cannot close one window, though: the callback can run after an\n // external delete but before the deleted-event handler nulls lockState, so\n // the guard still passes and we resurrect the cookie. The deleted handler\n // clears any such entry once the lock is released (see the `event.deleted`\n // loop below).\n const lockAtCall = lockState\n cookieStore.get(NEXT_INSTANT_TEST_COOKIE).then((existing: any) => {\n if (existing && lockState === lockAtCall && lockAtCall !== null) {\n writeDocumentCookie(value, existing)\n }\n })\n}\n\n/**\n * The \"wait for the locked navigation's prefetch to fulfill\" state for a single\n * locked navigation. `promise` resolves once that prefetch has spawned every\n * request and all of them have fulfilled, so the navigation reads present data\n * rather than a still-in-flight entry. Owned by the prefetch task (one per\n * navigation, so successive navigations in a scope resolve independently) and\n * also tracked in `NavigationLockState.activePrefetches` so the lock can\n * force-resolve any that are still pending when it's released.\n *\n * `pendingCount` holds one reference for the scheduler while it is still\n * spawning, plus one per in-flight entry; `promise` resolves when it drains to\n * 0. `trackedEntries` dedupes entry registration.\n */\nexport type NavigationLockPrefetch = {\n promise: Promise<void>\n resolve: () =Line truncated
|
||||
{"offset": {"line": 8640, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/navigation.ts"],"sourcesContent":["import type {\n CacheNodeSeedData,\n FlightRouterState,\n FlightSegmentPath,\n ScrollRef,\n} from '../../../shared/lib/app-router-types'\nimport type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type { HeadData } from '../../../shared/lib/app-router-types'\nimport {\n PrefetchHint,\n SubtreePrefetchHints,\n propagateSubtreeBits,\n} from '../../../shared/lib/app-router-types'\nimport type { NormalizedFlightData } from '../../flight-data-helpers'\nimport { fetchServerResponse } from '../router-reducer/fetch-server-response'\nimport {\n startPPRNavigation,\n spawnDynamicRequests,\n FreshnessPolicy,\n beginLockedNavigation,\n type NavigationLock,\n type NavigationRequestAccumulation,\n} from '../router-reducer/ppr-navigations'\nimport { createHrefFromUrl } from '../router-reducer/create-href-from-url'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\nimport {\n EntryStatus,\n readRouteCacheEntry,\n deprecated_requestOptimisticRouteCacheEntry,\n convertRootFlightRouterStateToRouteTree,\n resolveStaleAt,\n writePrerenderResponseIntoCache,\n processRuntimePrefetchStream,\n writeDynamicRenderResponseIntoCache,\n type RouteTree,\n type FulfilledRouteCacheEntry,\n} from './cache'\nimport { discoverKnownRoute } from './optimistic-routes'\nimport { createCacheKey, type NormalizedSearch } from './cache-key'\nimport { schedulePrefetchTask } from './scheduler'\nimport { PrefetchPriority, FetchStrategy } from './types'\nimport { getLinkForCurrentNavigation } from '../links'\nimport type { PageVaryPath } from './vary-path'\nimport type { AppRouterState } from '../router-reducer/router-reducer-types'\nimport { ScrollBehavior } from '../router-reducer/router-reducer-types'\nimport { computeChangedPath } from '../router-reducer/compute-changed-path'\nimport { isJavaScriptURLString } from '../../lib/javascript-url'\nimport { UnknownDynamicStaleTime, computeDynamicStaleAt } from './bfcache'\nimport { createLinkPrefetchPartialError } from '../../../shared/lib/instant-messages'\n\n/**\n * Navigate to a new URL, using the Segment Cache to construct a response.\n *\n * To allow for synchronous navigations whenever possible, this is not an async\n * function. It returns a promise only if there's no matching prefetch in\n * the cache. Otherwise it returns an immediate result and uses Suspense/RSC to\n * stream in any missing data.\n */\nexport function navigate(\n state: AppRouterState,\n url: URL,\n currentUrl: URL,\n currentRenderedSearch: string,\n currentCacheNode: CacheNode | null,\n currentFlightRouterState: FlightRouterState,\n nextUrl: string | null,\n freshnessPolicy: FreshnessPolicy,\n scrollBehavior: ScrollBehavior,\n navigateType: 'push' | 'replace'\n): AppRouterState | Promise<AppRouterState> {\n let navigationLock: NavigationLock | null = null\n\n // Instant Navigation Testing API: when the lock is active, ensure a\n // prefetch task has been initiated before proceeding with the navigation.\n // This guarantees that segment data requests are at least pending, even\n // for routes that already have a cached route tree. Without this, the\n // shell might be incomplete because some segments were never\n // requested.\n if (process.env.__NEXT_EXPOSE_TESTING_API) {\n const { isNavigationLocked } =\n require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n if (isNavigationLocked()) {\n // Signal that a new locked navigation is starting. This force-resolves the\n // previous locked navigation's withheld data (so a reused shared segment\n // no longer carries a pending deferred rsc) and returns this navigation's\n // own withheld-data gate.\n navigationLock = beginLockedNavigation()\n return ensurePrefetchThenNavigate(\n state,\n url,\n currentUrl,\n currentRenderedSearch,\n currentCacheNode,\n currentFlightRouterState,\n nextUrl,\n freshnessPolicy,\n scrollBehavior,\n navigateType,\n navigationLock\n )\n }\n }\n\n return navigateImpl(\n state,\n url,\n currentUrl,\n currentRenderedSearch,\n currentCacheNode,\n currentFlightRouterState,\n nextUrl,\n freshnessPolicy,\n scrollBehavior,\n navigateType,\n navigationLock\n )\n}\n\nfunction navigateImpl(\n state: AppRouterState,\n url: URL,\n currentUrl: URL,\n currentRenderedSearch: string,\n currentCacheNode: CacheNode | null,\n currentFlightRouterState: FlightRouterState,\n nextUrl: string | null,\n freshnessPolicy: FreshnessPolicy,\n scrollBehavior: ScrollBehavior,\n navigateType: 'push' | 'replace',\n navigationLock: NavigationLock | null\n): AppRouterState | Promise<AppRouterState> {\n const now =Line truncated
|
||||
{"offset": {"line": 9265, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/optimistic-routes.ts"],"sourcesContent":["/**\n * Optimistic Routing (Known Routes)\n *\n * This module enables the client to predict route structure for URLs that\n * haven't been prefetched yet, based on previously learned route patterns.\n * When successful, this allows skipping the route tree prefetch request\n * entirely.\n *\n * The core idea is that many URLs map to the same route structure. For example,\n * /blog/post-1 and /blog/post-2 both resolve to /blog/[slug]. Once we've\n * prefetched one, we can predict the structure of the other.\n *\n * However, we can't always make this prediction. Static siblings (like\n * /blog/featured alongside /blog/[slug]) have different route structures.\n * When we learn a dynamic route, we also learn its static siblings so we\n * know when NOT to apply the prediction.\n *\n * Main entry points:\n *\n * 1. discoverKnownRoute: Called after receiving a route tree from the server.\n * Traverses the route tree, compares URL parts to segments, and populates\n * the known route tree if they match. Routes are always inserted into the\n * cache.\n *\n * 2. matchKnownRoute: Called when looking up a route with no cache entry.\n * Matches the candidate URL against learned patterns. Returns a synthetic\n * cache entry if successful, or null to fall back to server resolution.\n *\n * Rewrite detection happens during traversal: if a URL path part doesn't match\n * the corresponding route segment, we stop populating the known route tree\n * (since the mapping is incorrect) but still insert the route into the cache.\n *\n * The known route tree is append-only with no eviction. Route patterns are\n * derived from the filesystem, so they don't become stale within a session.\n * Cache invalidation on deploy clears everything anyway.\n *\n * Current limitations (deopt to server resolution):\n * - Rewrites: Detected during traversal (tree not populated, but route cached)\n * - Intercepted routes: The route tree varies by referrer (Next-Url header),\n * so we can't predict the correct structure from the URL alone. Patterns are\n * still stored during discovery (so the trie stays populated for non-\n * intercepted siblings), but matching bails out when the pattern is marked\n * as interceptable.\n */\n\nimport type { DynamicParamTypesShort } from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport type { RouteTree, FulfilledRouteCacheEntry } from './cache'\nimport {\n EntryStatus,\n writeRouteIntoCache,\n fulfillRouteCacheEntry,\n getCurrentRouteCacheVersion,\n type PendingRouteCacheEntry,\n createMetadataRouteTree,\n} from './cache'\nimport { isValueExpired } from './cache-map'\nimport { doesStaticSegmentAppearInURL } from '../../route-params'\nimport type { NormalizedPathname, NormalizedSearch } from './cache-key'\nimport { splitPathnameIntoParts } from './cache-key'\nimport {\n appendLayoutVaryPath,\n finalizeLayoutVaryPath,\n finalizePageVaryPath,\n finalizeMetadataVaryPath,\n getShellSegmentVaryPath,\n type PartialSegmentVaryPath,\n type PageVaryPath,\n} from './vary-path'\n\n/**\n * The known route tree is analogous to a route table. A different routing\n * implementation might use regexes or URLPattern; ours uses a trie indexed\n * by URL path segments.\n *\n * Each node (KnownRoutePart) represents a position in the URL and can have:\n * - staticChildren: Map of literal segments to child nodes\n * - dynamicChild: A single dynamic segment node ([slug], [...params], etc.)\n * - pattern: A cache entry template for routes that terminate here\n *\n * This tree only contains segments that correspond to actual filesystem routes.\n * Route groups like (marketing) and parallel routes like @modal are not\n * included since they don't appear in URLs. Similarly, if a URL is rewritten\n * to a different filesystem path, the original URL segments don't appear here\n * — only the resolved filesystem route structure is stored.\n *\n * Example tree after learning /blog/[slug], /blog/featured, and /about:\n *\n * ├── about\n * └── blog\n * ├── featured\n * └── [slug]\n *\n * When matching /blog/hello:\n * 1. \"blog\" matches static child\n * 2. \"hello\" doesn't match \"featured\", falls through to [slug]\n * 3. Returns [slug]'s pattern with resolved param { slug: \"hello\" }\n */\ntype KnownRoutePartBase = {\n // Known static paths at this level. The null vs Map distinction is\n // semantically meaningful:\n // - null: Static siblings are UNKNOWN at this level (e.g., webpack dev mode\n // where routes are compiled on-demand). If there's a dynamicChild, we\n // can't safely match it because the URL might be an unknown static sibling.\n // - Map (even if empty): Static siblingsLine truncated
|
||||
{"offset": {"line": 9841, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/scheduler.ts"],"sourcesContent":["import type {\n FlightRouterState,\n Segment as FlightRouterStateSegment,\n Segment,\n} from '../../../shared/lib/app-router-types'\nimport {\n PrefetchHint,\n StaticPrefetchDisabled,\n} from '../../../shared/lib/app-router-types'\nimport { matchSegment } from '../match-segments'\nimport {\n readOrCreateRouteCacheEntry,\n readRouteCacheEntry,\n readOrCreateSegmentCacheEntry,\n fetchRouteOnCacheMiss,\n fetchSegmentsOnCacheMiss,\n EntryStatus,\n type FulfilledRouteCacheEntry,\n type RouteCacheEntry,\n type RouteTree,\n fetchSegmentPrefetchesUsingDynamicRequest,\n type PendingSegmentCacheEntry,\n type SegmentCacheEntry,\n type SegmentBundle,\n convertRouteTreeToFlightRouterState,\n readOrCreateRevalidatingSegmentEntry,\n upgradeToPendingSegment,\n overwriteRevalidatingSegmentCacheEntry,\n canNewFetchStrategyProvideMoreContent,\n attemptToFulfillDynamicSegmentFromBFCache,\n attemptToUpgradeSegmentFromBFCache,\n} from './cache'\nimport type { RouteCacheKey } from './cache-key'\nimport { createCacheKey } from './cache-key'\nimport { urlSearchParamsToParsedUrlQuery } from '../../route-params'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n PrefetchPriority,\n} from './types'\nimport {\n getCurrentRouteCacheVersion,\n getCurrentSegmentCacheVersion,\n} from './cache'\nimport type { NavigationLockPrefetch } from './navigation-testing-lock'\nimport {\n addSearchParamsIfPageSegment,\n PAGE_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport type { SegmentRequestKey } from '../../../shared/lib/segment-cache/segment-value-encoding'\nimport { cleanup } from './lru'\n\nconst scheduleMicrotask =\n typeof queueMicrotask === 'function'\n ? queueMicrotask\n : (fn: () => unknown) =>\n Promise.resolve()\n .then(fn)\n .catch((error) =>\n setTimeout(() => {\n throw error\n })\n )\n\nexport type PrefetchTask = {\n key: RouteCacheKey\n\n /**\n * The FlightRouterState at the time the task was initiated. This is needed\n * when falling back to the non-PPR behavior, which only prefetches up to\n * the first loading boundary.\n */\n treeAtTimeOfPrefetch: FlightRouterState\n\n /**\n * The cache versions at the time the task was initiated. Used to determine\n * if the cache was invalidated since the task was initiated. Route and\n * segment caches have separate versions so they can be invalidated\n * independently.\n */\n routeCacheVersion: number\n segmentCacheVersion: number\n\n /**\n * Whether to prefetch dynamic data, in addition to static data. This is\n * used by `<Link prefetch={true}>`.\n *\n * Note that a task with `FetchStrategy.PPR` might need to use\n * `FetchStrategy.LoadingBoundary` instead if we find out that a route\n * does not support PPR after doing the initial route prefetch.\n */\n fetchStrategy: PrefetchTaskFetchStrategy\n\n /**\n * sortId is an incrementing counter\n *\n * Newer prefetches are prioritized over older ones, so that as new links\n * enter the viewport, they are not starved by older links that are no\n * longer relevant. In the future, we can add additional prioritization\n * heuristics, like removing prefetches once a link leaves the viewport.\n *\n * The sortId is assigned when the prefetch is initiated, and reassigned if\n * the same task is prefetched again (effectively bumping it to the top of\n * the queue).\n *\n * TODO: We can add additional fields here to indicate what kind of prefetch\n * it is. For example, was it initiated by a link? Or was it an imperative\n * call? If it was initiated by a link, we can remove it from the queue when\n * the link leaves the viewport, but if it was an imperative call, then we\n * should keep it in the queue until it's fulfilled.\n *\n * We can also add priority levels. For example, hovering over a link could\n * increase the priority of its prefetch.\n */\n sortId: number\n\n /**\n * The priority of the task. Like sortId, this affects the task's position in\n * the queue, so it must never be updated without resifting the heap.\n */\n priority: PrefetchPriority\n\n /**\n * The phase of the task. Tasks are split into multiple phases so that their\n * priority can be adjusted based on what kind of work they're doing.\n * Concretely, prefetching the route tree is higher priority than prefetching\n * segment data.\n */\n phase: PrefetchPhase\n\n /**\n * These fields are temporary state for tracking the currently running task.\n * They are reset after each iteration of the task queue.\n */\n hasBackgroundWork: boolean\n /**\n * Set during a pass when the task spawned a segment request, or encountered\n * one that was already Line truncated
|
||||
{"offset": {"line": 11551, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/types.ts"],"sourcesContent":["/**\n * Shared types and constants for the Segment Cache.\n */\n\nexport const enum NavigationResultTag {\n MPA,\n Success,\n NoOp,\n Async,\n}\n\n/**\n * The priority of the prefetch task. Higher numbers are higher priority.\n */\nexport const enum PrefetchPriority {\n /**\n * Assigned to the most recently hovered/touched link. Special network\n * bandwidth is reserved for this task only. There's only ever one Intent-\n * priority task at a time; when a new Intent task is scheduled, the previous\n * one is bumped down to Default.\n */\n Intent = 2,\n /**\n * The default priority for prefetch tasks.\n */\n Default = 1,\n /**\n * Assigned to tasks when they spawn non-blocking background work, like\n * revalidating a partially cached entry to see if more data is available.\n */\n Background = 0,\n}\n\nexport const enum FetchStrategy {\n // Deliberately ordered so we can easily compare two segments\n // and determine if one segment is \"more specific\" than another\n // (i.e. if it's likely that it contains more data). See\n // canNewFetchStrategyProvideMoreContent in cache.ts for what each tier can\n // contain relative to the others.\n //\n // These numeric values are client-internal and never cross the wire — the\n // `next-router-prefetch` request header values are mapped explicitly in\n // fetchSegmentPrefetchesUsingDynamicRequest (cache.ts) — so the members can\n // be renumbered freely as long as the relative order is preserved.\n LoadingBoundary = 0,\n // The App Shell variant extracted from a static per-segment prefetch\n // response: every segment's param-dependent content is reduced to pending\n // references that render as the param fallback. Less complete than\n // RuntimeShell — a static response can't include content that depends on\n // session data (cookies, headers) — and less complete than PPR at concrete\n // paths, which includes prerendered param-dependent content.\n StaticShell = 1,\n RuntimeShell = 2,\n PPR = 3,\n PPRRuntime = 4,\n Full = 5,\n}\n\n/**\n * A subset of fetch strategies used for prefetch tasks.\n * A prefetch task can't know if it should use `PPR` or `LoadingBoundary`\n * until we complete the initial tree prefetch request, so we use `PPR` to signal both cases\n * and adjust it based on the route when actually fetching.\n * */\nexport type PrefetchTaskFetchStrategy =\n | FetchStrategy.PPR\n | FetchStrategy.PPRRuntime\n | FetchStrategy.Full\n"],"names":["NavigationResultTag","PrefetchPriority","FetchStrategy"],"mappings":"AAAA;;CAEC,GAED;;;;;;;;AAAO,IAAWA,sBAAAA,WAAAA,GAAAA,SAAAA,mBAAAA;;;;;WAAAA;MAKjB;AAKM,IAAWC,mBAAAA,WAAAA,GAAAA,SAAAA,gBAAAA;IAChB;;;;;GAKC,GAAA,gBAAA,CAAA,gBAAA,CAAA,SAAA,GAAA,EAAA,GAAA;IAED;;GAEC,GAAA,gBAAA,CAAA,gBAAA,CAAA,UAAA,GAAA,EAAA,GAAA;IAED;;;GAGC,GAAA,gBAAA,CAAA,gBAAA,CAAA,aAAA,GAAA,EAAA,GAAA;WAfeA;MAiBjB;AAEM,IAAWC,gBAAAA,WAAAA,GAAAA,SAAAA,aAAAA;IAChB,6DAA6D;IAC7D,+DAA+D;IAC/D,wDAAwD;IACxD,2EAA2E;IAC3E,kCAAkC;IAClC,EAAE;IACF,0EAA0E;IAC1E,wEAAwE;IACxE,4EAA4E;IAC5E,mEAAmE;;IAEnE,qEAAqE;IACrE,0EAA0E;IAC1E,mEAAmE;IACnE,yEAAyE;IACzE,2EAA2E;IAC3E,6DAA6D;;;;;;WAjB7CA;MAuBjB","ignoreList":[0]}},
|
||||
{"offset": {"line": 11613, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/segment-cache/vary-path.ts"],"sourcesContent":["import { FetchStrategy } from './types'\nimport type {\n NormalizedPathname,\n NormalizedSearch,\n NormalizedNextUrl,\n} from './cache-key'\nimport type { RouteTree } from './cache'\nimport { Fallback, type FallbackType } from './cache-map'\nimport { HEAD_REQUEST_KEY } from '../../../shared/lib/segment-cache/segment-value-encoding'\n\ntype Opaque<T, K> = T & { __brand: K }\n\n/**\n * A linked-list of all the params (or other param-like) inputs that a cache\n * entry may vary by. This is used by the CacheMap module to reuse cache entries\n * across different param values. If a param has a value of Fallback, it means\n * the cache entry is reusable for all possible values of that param. See\n * cache-map.ts for details.\n *\n * A segment's vary path is a pure function of a segment's position in a\n * particular route tree and the (post-rewrite) URL that is being queried. More\n * concretely, successive queries of the cache for the same segment always use\n * the same vary path.\n *\n * A route's vary path is simpler: it's comprised of the pathname, search\n * string, and Next-URL header.\n */\nexport type VaryPath = {\n /**\n * Identifies which param this vary path node corresponds to. Used by\n * getFulfilledSegmentVaryPath to determine which params to replace with\n * Fallback based on the varyParams set from the server.\n *\n * - For path params: the param name (e.g., 'slug')\n * - For search params: '?'\n * - For non-param nodes (request keys, etc.): null\n */\n id: string | null\n value: string | null | FallbackType\n /**\n * Whether this node corresponds to a root param — a path param at or above\n * the application's root layout. Root params may appear in the App Shell, so\n * the shell vary path keeps their concrete value instead of replacing it with\n * Fallback. See getShellSegmentVaryPath. Only ever true on path param nodes;\n * false for structural and search param nodes.\n *\n * Always a boolean (never undefined) so that every VaryPath node shares a\n * single hidden class, keeping the cache hot paths monomorphic.\n */\n isRootParam: boolean\n parent: VaryPath | null\n}\n\n// Because it's so important for vary paths to line up across cache accesses,\n// we use opaque type aliases to ensure these are only created within\n// this module.\n\n// requestKey -> searchParams -> nextUrl\nexport type RouteVaryPath = Opaque<\n {\n id: null\n value: NormalizedPathname\n isRootParam: false\n parent: {\n id: '?'\n value: NormalizedSearch\n isRootParam: false\n parent: {\n id: null\n value: NormalizedNextUrl | null | FallbackType\n isRootParam: false\n parent: null\n }\n }\n },\n 'RouteVaryPath'\n>\n\n// requestKey -> pathParams\nexport type LayoutVaryPath = Opaque<\n {\n id: null\n value: string\n isRootParam: false\n parent: PartialSegmentVaryPath | null\n },\n 'LayoutVaryPath'\n>\n\n// requestKey -> searchParams -> pathParams\nexport type PageVaryPath = Opaque<\n {\n id: null\n value: string\n isRootParam: false\n parent: {\n id: '?'\n value: NormalizedSearch | FallbackType\n isRootParam: false\n parent: PartialSegmentVaryPath | null\n }\n },\n 'PageVaryPath'\n>\n\nexport type SegmentVaryPath = LayoutVaryPath | PageVaryPath\n\n// Intermediate type used when building a vary path during a recursive traversal\n// of the route tree.\nexport type PartialSegmentVaryPath = Opaque<VaryPath, 'PartialSegmentVaryPath'>\n\nexport function getRouteVaryPath(\n pathname: NormalizedPathname,\n search: NormalizedSearch,\n nextUrl: NormalizedNextUrl | null\n): RouteVaryPath {\n // requestKey -> searchParams -> nextUrl\n const varyPath: VaryPath = {\n id: null,\n value: pathname,\n isRootParam: false,\n parent: {\n id: '?',\n value: search,\n isRootParam: false,\n parent: {\n id: null,\n value: nextUrl,\n isRootParam: false,\n parent: null,\n },\n },\n }\n return varyPath as RouteVaryPath\n}\n\nexport function getFulfilledRouteVaryPath(\n pathname: NormalizedPathname,\n search: NormalizedSearch,\n nextUrl: NormalizedNextUrl | null,\n couldBeIntercepted: boolean\n): RouteVaryPath {\n // This is called when a route's data is fulfilled. The cache entry will be\n // re-keyed based on which inputs the response varies by.\n // requestKey -> searchParams -> nextUrl\n const varyPath: VaryPath = {\n id: null,\n value: pathname,\n isRootParam: false,\n parent: {\n id: '?',\n value: search,\n isRootParam: false,\n parent: {\n id: null,\n value: couldBeIntercepted ? nextUrl : Fallback,\n isRootParam: false,\n parent: null,\n }Line truncated
|
||||
{"offset": {"line": 11900, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/server-async-storage.ts"],"sourcesContent":["// Client-safe access to the server-only async-storage singletons. On the\n// server these re-export the real storages; in the browser bundle this module\n// is aliased to `./server-async-storage.browser` (see\n// scripts/generate-browser-variant-aliases.mjs), which exports `undefined`\n// stubs so the AsyncLocalStorage modules are never bundled into the client.\n// Consumers must guard usage so the stubs are not dereferenced in the browser.\nexport { actionAsyncStorage } from '../../server/app-render/action-async-storage.external'\nexport { workAsyncStorage } from '../../server/app-render/work-async-storage.external'\nexport { workUnitAsyncStorage } from '../../server/app-render/work-unit-async-storage.external'\n"],"names":["actionAsyncStorage","workAsyncStorage","workUnitAsyncStorage"],"mappings":";AAAA,yEAAyE;AACzE,8EAA8E;AAC9E,sDAAsD;AACtD,2EAA2E;AAC3E,4EAA4E;AAC5E,+EAA+E;AAC/E,SAASA,kBAAkB,QAAQ,wDAAuD;AAC1F,SAASC,gBAAgB,QAAQ,sDAAqD;AACtF,SAASC,oBAAoB,QAAQ,2DAA0D","ignoreList":[0]}},
|
||||
{"offset": {"line": 11917, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","Error","code","isStaticGenBailoutError","error"],"mappings":";;;;;;AAAA,MAAMA,0BAA0B;AAEzB,MAAMC,8BAA8BC;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOH;;AACzB;AAEO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAI,GAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 11939, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/unauthorized.ts"],"sourcesContent":["import {\n HTTP_ERROR_FALLBACK_ERROR_CODE,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n// TODO: Add `unauthorized` docs\n/**\n * @experimental\n * This function allows you to render the [unauthorized.js file](https://nextjs.org/docs/app/api-reference/file-conventions/unauthorized)\n * within a route segment as well as inject a tag.\n *\n * `unauthorized()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n *\n * Read more: [Next.js Docs: `unauthorized`](https://nextjs.org/docs/app/api-reference/functions/unauthorized)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};401`\n\nexport function unauthorized(): never {\n if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {\n throw new Error(\n `\\`unauthorized()\\` is experimental and only allowed to be used when \\`experimental.authInterrupts\\` is enabled.`\n )\n }\n\n const error = new Error(DIGEST) as HTTPAccessFallbackError\n ;(error as HTTPAccessFallbackError).digest = DIGEST\n throw error\n}\n"],"names":["HTTP_ERROR_FALLBACK_ERROR_CODE","DIGEST","unauthorized","process","env","__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS","Error","error","digest"],"mappings":";;;;AAAA,SACEA,8BAA8B,QAEzB,8CAA6C;;AAEpD,gCAAgC;AAChC;;;;;;;;;;;;CAYC,GAED,MAAMC,SAAS,GAAGD,yPAAAA,CAA+B,IAAI,CAAC;AAE/C,SAASE;IACd,IAAI,CAACC,QAAQC,GAAG,CAACC,uBAAqC,YAAF;QAClD,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,+GAA+G,CAAC,GAD7G,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,MAAMC,QAAQ,OAAA,cAAiB,CAAjB,IAAID,MAAML,SAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAgB;IAC5BM,MAAkCC,MAAM,GAAGP;IAC7C,MAAMM;AACR","ignoreList":[0]}},
|
||||
{"offset": {"line": 11979, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/unresolved-thenable.ts"],"sourcesContent":["/**\n * Create a \"Thenable\" that does not resolve. This is used to suspend indefinitely when data is not available yet.\n */\nexport const unresolvedThenable = {\n then: () => {},\n} as PromiseLike<void>\n"],"names":["unresolvedThenable","then"],"mappings":"AAAA;;CAEC,GACD;;;;AAAO,MAAMA,qBAAqB;IAChCC,MAAM,KAAO;AACf,EAAsB","ignoreList":[0]}},
|
||||
{"offset": {"line": 11992, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/unstable-rethrow.ts"],"sourcesContent":["import { isHangingPromiseRejectionError } from '../../server/dynamic-rendering-utils'\nimport { isPostpone } from '../../server/lib/router-utils/is-postpone'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { isNextRouterError } from './is-next-router-error'\nimport {\n isDynamicPostpone,\n isPrerenderInterruptedError,\n} from '../../server/app-render/dynamic-rendering'\nimport { isDynamicServerError } from './hooks-server-context'\n\n/**\n * This function should be used to rethrow internal Next.js errors so that they can be handled by the framework.\n * When wrapping an API that uses errors to interrupt control flow, you should use this function before you do any error handling.\n * This function will rethrow the error if it is a Next.js error so it can be handled, otherwise it will do nothing.\n *\n * In the browser bundle this module is aliased to `./unstable-rethrow.browser`, which performs a\n * subset of these checks (the server-only ones can never occur in the browser). This default\n * module holds the full server logic and is used on every server runtime (Node, edge) and in any\n * context where the alias does not apply.\n *\n * Read more: [Next.js Docs: `unstable_rethrow`](https://nextjs.org/docs/app/api-reference/functions/unstable_rethrow)\n */\nexport function unstable_rethrow(error: unknown): void {\n if (\n isNextRouterError(error) ||\n isBailoutToCSRError(error) ||\n isDynamicServerError(error) ||\n isDynamicPostpone(error) ||\n isPostpone(error) ||\n isHangingPromiseRejectionError(error) ||\n isPrerenderInterruptedError(error)\n ) {\n throw error\n }\n\n if (error instanceof Error && 'cause' in error) {\n unstable_rethrow(error.cause)\n }\n}\n"],"names":["isHangingPromiseRejectionError","isPostpone","isBailoutToCSRError","isNextRouterError","isDynamicPostpone","isPrerenderInterruptedError","isDynamicServerError","unstable_rethrow","error","Error","cause"],"mappings":";;;;AAAA,SAASA,8BAA8B,QAAQ,uCAAsC;AACrF,SAASC,UAAU,QAAQ,4CAA2C;AACtE,SAASC,mBAAmB,QAAQ,+CAA8C;AAClF,SAASC,iBAAiB,QAAQ,yBAAwB;AAC1D,SACEC,iBAAiB,EACjBC,2BAA2B,QACtB,4CAA2C;AAClD,SAASC,oBAAoB,QAAQ,yBAAwB;;;;;;;AActD,SAASC,iBAAiBC,KAAc;IAC7C,QACEL,iNAAAA,EAAkBK,cAClBN,sNAAAA,EAAoBM,cACpBF,iNAAAA,EAAqBE,cACrBJ,2MAAAA,EAAkBI,cAClBP,uMAAAA,EAAWO,cACXR,gNAAAA,EAA+BQ,cAC/BH,qNAAAA,EAA4BG,QAC5B;QACA,MAAMA;IACR;IAEA,IAAIA,iBAAiBC,SAAS,WAAWD,OAAO;QAC9CD,iBAAiBC,MAAME,KAAK;IAC9B;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 12020, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/use-action-queue.ts"],"sourcesContent":["import type { Dispatch } from 'react'\nimport React, { use, useMemo, useOptimistic } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport {\n ACTION_REFRESH,\n type AppRouterState,\n type ReducerActions,\n type ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\n/**\n * Called when the instant navigation test lock is released. If the router\n * is initialized, dispatches a soft refresh to fetch dynamic data. If not\n * (e.g. the lock was released before hydration finished), falls back to a\n * hard reload.\n */\nexport function refreshOnInstantNavigationUnlock() {\n if (process.env.__NEXT_EXPOSE_TESTING_API) {\n if (dispatch !== null) {\n dispatch({ type: ACTION_REFRESH, bypassCacheInvalidation: true })\n } else {\n window.location.reload()\n }\n }\n}\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n if (dispatch === null) {\n throw new Error(\n 'Internal Next.js error: Router action dispatched before initialization.'\n )\n }\n dispatch(action)\n}\n\n// Optimistic state setter for experimental_gesturePush. Only should be used\n// during a gesture transition.\nlet setGestureRouterState: ((state: ReducerState) => void) | null = null\n\nexport function dispatchGestureState(state: ReducerState) {\n if (setGestureRouterState === null) {\n throw new Error(\n 'Internal Next.js error: Router action dispatched before initialization.'\n )\n }\n setGestureRouterState(state)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n Promise<AppRouterState>,\n Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n actionQueue: AppRouterActionQueue\n): AppRouterState {\n const [canonicalState, setState] = React.useState<ReducerState>(\n actionQueue.state\n )\n\n // Wrap the canonical state in useOptimistic to support\n // experimental_gesturePush. During a gesture transition, this returns a fork\n // of the router state that represents the eventual target if/when the gesture\n // completes. Otherwise it returns the canonical state.\n const [state, setGesture] = useOptimistic(canonicalState)\n if (typeof window !== 'undefined') {\n setGestureRouterState = setGesture\n }\n\n // Because of a known issue that requires to decode Flight streams inside the\n // render phase, we have to be a bit clever and assign the dispatch method to\n // a module-level variable upon initialization. The useState hook in this\n // module only exists to synchronize state that lives outside of React.\n // Ideally, what we'd do instead is pass the state as a prop to root.render;\n // this is conceptually how we're modeling the app router state, despite the\n // weird implementation details.\n let nextDispatch: Dispatch<ReducerActions>\n\n if (process.env.NODE_ENV !== 'production') {\n const { useAppDevRenderingIndicator } =\n require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n nextDispatch = (action: ReducerActions) => {\n appDevRenderingIndicator(() => {\n actionQueue.dispatch(action, setState)\n })\n }\n } else {\n nextDispatch = (action: ReducerActions) =>\n actionQueue.dispatch(action, setState)\n }\n\n if (typeof window !== 'undefined') {\n dispatch = nextDispatch\n }\n\n // When navigating to a non-prefetched route, then App Router state will be\n // blocked until the server responds. We need to transfer the `_debugInfo`\n // from the underlying Flight response onto the top-level promise that is\n // passed to React (via `use`) so that the latency is accurately represented\n // in the React DevTools.\n const stateWithDebugInfo = useMemo(() => {\n if (!__DEV__) {\n return state\n }\n\n if (isThenable(state)) {\n // useMemo can't be used to cache a Promise since the memoized value is thrown\n // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n if (promiseWithDebugInfo === undefined) {\n const debugInfo: Array<unknown> = []\n promiseWithDebugInfo = Promise.resolve(state).thLine truncated
|
||||
{"offset": {"line": 12144, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/dev/debug-channel.ts"],"sourcesContent":["import { NEXT_REQUEST_ID_HEADER } from '../components/app-router-headers'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport interface DebugChannelReadableWriterPair {\n /**\n * The remaining, not-yet-handed-out copy of the request's debug stream. A\n * request can be decoded more than once (the primary decode plus any stage\n * extractions that re-parse a slice of the same response, see\n * `decodeStageUntilBoundary`), and each decode needs its own reader. Every\n * time a consumer asks for the readable we tee it and reassign this field to\n * the remainder, so each consumer gets an independent branch. The remainder\n * is only ever tee'd again, never read directly, so it retains every chunk\n * from the start and replays the full stream into each new branch.\n */\n readable: ReadableStream<Uint8Array>\n readonly writer: WritableStreamDefaultWriter<Uint8Array>\n}\n\nconst pairs = new Map<string, DebugChannelReadableWriterPair>()\n\n/**\n * Upper bound on the number of in-memory debug-channel pairs we retain, evicted\n * least-recently-used, bounding the live per-request map.\n *\n * A pair must outlive its stream's close so a late decode of the same response\n * (the primary decode plus stage extractions via `decodeStageUntilBoundary`,\n * which can run after the channel closed over the WebSocket) still finds the\n * buffered data. The cap only needs to exceed the pairs live or recently closed\n * at once (bounded by how many prefetch/navigation requests are in flight\n * together), so a few dozen leaves ample headroom even for the segment-heavy\n * bursts the Instant Navs DevTools capture can produce.\n */\nconst MAX_DEBUG_CHANNEL_PAIRS = 64\n\nconst DB_NAME = '__next_debug_channel'\nconst STORE_NAME = 'channels'\nconst CREATED_AT_INDEX = 'createdAt'\n/**\n * Upper bound on persisted document debug channels in IndexedDB (one per\n * document, kept for HTTP-cache restore), evicted oldest-first.\n */\nconst MAX_PERSISTED_DOCUMENT_CHANNELS = 10\n\ninterface DebugChannelEntry {\n readonly requestId: string\n readonly createdAt: number\n readonly chunks: Uint8Array[]\n}\n\nfunction openDebugChannelDB(): Promise<IDBDatabase> {\n return new Promise((resolve, reject) => {\n const openRequest = indexedDB.open(DB_NAME, 1)\n openRequest.onupgradeneeded = () => {\n const store = openRequest.result.createObjectStore(STORE_NAME, {\n keyPath: 'requestId',\n })\n store.createIndex(CREATED_AT_INDEX, 'createdAt')\n }\n openRequest.onsuccess = () => resolve(openRequest.result)\n openRequest.onerror = () => reject(openRequest.error)\n openRequest.onblocked = () => reject(openRequest.error)\n })\n}\n\n/**\n * Resolves on the next idle period via `requestIdleCallback`, falling back to a\n * `setTimeout` where `requestIdleCallback` is unavailable.\n */\nfunction whenIdle(): Promise<void> {\n return new Promise((resolve) => {\n if (typeof requestIdleCallback === 'function') {\n requestIdleCallback(() => resolve())\n } else {\n setTimeout(resolve, 0)\n }\n })\n}\n\nasync function persistDebugChannelToIndexedDB(\n requestId: string,\n chunks: Uint8Array[]\n): Promise<void> {\n let db: IDBDatabase\n try {\n db = await openDebugChannelDB()\n } catch (error) {\n console.debug('Failed to open debug channel IndexedDB for write', error)\n return\n }\n\n try {\n await new Promise<void>((resolve, reject) => {\n const transaction = db.transaction(STORE_NAME, 'readwrite')\n const store = transaction.objectStore(STORE_NAME)\n\n store.put({\n requestId,\n createdAt: Date.now(),\n chunks,\n } satisfies DebugChannelEntry)\n\n // Prune oldest entries beyond the cap to bound storage growth across tabs\n // and/or page loads. The createdAt index gives ordered traversal without\n // scanning, and the cursor deletes commit atomically with the put above.\n const countReq = store.count()\n countReq.onsuccess = () => {\n let entriesToDelete = countReq.result - MAX_PERSISTED_DOCUMENT_CHANNELS\n if (entriesToDelete <= 0) {\n return\n }\n const cursorReq = store.index(CREATED_AT_INDEX).openCursor()\n cursorReq.onsuccess = () => {\n const cursor = cursorReq.result\n if (!cursor || entriesToDelete === 0) {\n return\n }\n cursor.delete()\n entriesToDelete--\n cursor.continue()\n }\n }\n\n transaction.oncomplete = () => {\n if (process.env.__NEXT_TEST_MODE) {\n // Test-only flag, set once this document's debug channel entry is\n // durably committed. Persistence is deferred to an idle callback and\n // the IndexedDB write isLine truncated
|
||||
{"offset": {"line": 12544, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/flight-data-helpers.ts"],"sourcesContent":["import type {\n CacheNodeSeedData,\n FlightData,\n FlightDataPath,\n FlightRouterState,\n FlightSegmentPath,\n Segment,\n HeadData,\n InitialRSCPayload,\n} from '../shared/lib/app-router-types'\nimport { PAGE_SEGMENT_KEY } from '../shared/lib/segment'\nimport type { NormalizedSearch } from './components/segment-cache/cache-key'\nimport {\n getCacheKeyForDynamicParam,\n parseDynamicParamFromURLPart,\n doesStaticSegmentAppearInURL,\n getRenderedPathname,\n getRenderedSearch,\n} from './route-params'\nimport { createHrefFromUrl } from './components/router-reducer/create-href-from-url'\n\nexport type NormalizedFlightData = {\n /**\n * The full `FlightSegmentPath` inclusive of the final `Segment`\n */\n segmentPath: FlightSegmentPath\n /**\n * The `FlightSegmentPath` exclusive of the final `Segment`\n */\n pathToSegment: FlightSegmentPath\n segment: Segment\n tree: FlightRouterState\n seedData: CacheNodeSeedData | null\n head: HeadData\n isHeadPartial: boolean\n isRootRender: boolean\n}\n\n// TODO: We should only have to export `normalizeFlightData`, however because the initial flight data\n// that gets passed to `createInitialRouterState` doesn't conform to the `FlightDataPath` type (it's missing the root segment)\n// we're currently exporting it so we can use it directly. This should be fixed as part of the unification of\n// the different ways we express `FlightSegmentPath`.\nexport function getFlightDataPartsFromPath(\n flightDataPath: FlightDataPath\n): NormalizedFlightData {\n // Pick the last 4 items from the `FlightDataPath` to get the [tree, seedData, viewport, isHeadPartial].\n const flightDataPathLength = 4\n // tree, seedData, and head are *always* the last three items in the `FlightDataPath`.\n const [tree, seedData, head, isHeadPartial] =\n flightDataPath.slice(-flightDataPathLength)\n // The `FlightSegmentPath` is everything except the last three items. For a root render, it won't be present.\n const segmentPath = flightDataPath.slice(0, -flightDataPathLength)\n\n return {\n // TODO: Unify these two segment path helpers. We are inconsistently pushing an empty segment (\"\")\n // to the start of the segment path in some places which makes it hard to use solely the segment path.\n // Look for \"// TODO-APP: remove ''\" in the codebase.\n pathToSegment: segmentPath.slice(0, -1),\n segmentPath,\n // if the `FlightDataPath` corresponds with the root, there'll be no segment path,\n // in which case we default to ''.\n segment: segmentPath[segmentPath.length - 1] ?? '',\n tree,\n seedData,\n head,\n isHeadPartial,\n isRootRender: flightDataPath.length === flightDataPathLength,\n }\n}\n\nexport function createInitialRSCPayloadFromFallbackPrerender(\n response: Response,\n fallbackInitialRSCPayload: InitialRSCPayload\n): InitialRSCPayload {\n // This is a static fallback page. In order to hydrate the page, we need to\n // parse the client params from the URL, but to account for the possibility\n // that the page was rewritten, we need to check the response headers\n // for x-nextjs-rewritten-path or x-nextjs-rewritten-query headers. Since\n // we can't access the headers of the initial document response, the client\n // performs a fetch request to the current location. Since it's possible that\n // the fetch request will be dynamically rewritten to a different path than\n // the initial document, this fetch request delivers _all_ the hydration data\n // for the page; it was not inlined into the document, like it normally\n // would be.\n //\n // TODO: Consider treating the case where fetch is rewritten to a different\n // path from the document as a special deopt case. We should optimistically\n // assume this won't happen, inline the data into the document, and perform\n // a minimal request (like a HEAD or range request) to verify that the\n // response matches. Tricky to get right because we need to account for\n // all the different deployment environments we support, like output:\n // \"export\" mode, where we currently don't assume that custom response\n // headers are present.\n\n // Patch the Flight data sent by the server with the correct params parsed\n // from the URL + response object.\n const renderedPathname = getRenderedPathname(response)\n const renderedSearch = getRenderedSearch(response)\n const canonicalUrl = createHrefFromUrl(new URL(location.href))\n const originalFlightDataPath = fallbackInitialRSCPayload.f[0]\n const originalFlightRouterState = originalFlightDataPath[0]\n const payload: InitialRSCPayload = {\n c: canonicalUrl.split('/'),\n q: renderedSearch,\n i: fallbackInitialRSCPayload.i,\n f: [\n [\n fillInFallbackFlightRouterState(\n originalFlightRoutLine truncated
|
||||
{"offset": {"line": 12756, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/has-base-path.ts"],"sourcesContent":["import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function hasBasePath(path: string): boolean {\n return pathHasPrefix(path, basePath)\n}\n"],"names":["pathHasPrefix","basePath","process","env","__NEXT_ROUTER_BASEPATH","hasBasePath","path"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,6CAA4C;;AAE1E,MAAMC,WAAYC,QAAQC,GAAG,CAACC,sBAAsB,MAAe;AAE5D,SAASC,YAAYC,IAAY;IACtC,WAAON,iNAAAA,EAAcM,MAAML;AAC7B","ignoreList":[0]}},
|
||||
{"offset": {"line": 12770, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/lib/javascript-url.ts"],"sourcesContent":["// Adapted from React's sanitizeURL function found here: https://github.com/facebook/react/blob/b565373afd0cc1988497e1107106e851e8cfb261/packages/react-dom-bindings/src/shared/sanitizeURL.js\n\n// A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\nconst isJavaScriptProtocol =\n // eslint-disable-next-line no-control-regex\n /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i\n\nexport function isJavaScriptURLString(url: string): boolean {\n return isJavaScriptProtocol.test('' + (url as unknown as string))\n}\n"],"names":["isJavaScriptProtocol","isJavaScriptURLString","url","test"],"mappings":";;;;AAAA,8LAA8L;AAE9L,oEAAoE;AACpE,6EAA6E;AAC7E,2CAA2C;AAC3C,wCAAwC;AACxC,sDAAsD;AACtD,kEAAkE;AAClE,wCAAwC;AACxC,qDAAqD;AAErD,MAAMA,uBACJ,AACA,4CAD4C;AAGvC,SAASC,sBAAsBC,GAAW;IAC/C,OAAOF,qBAAqBG,IAAI,CAAC,KAAMD;AACzC","ignoreList":[0]}},
|
||||
{"offset": {"line": 12791, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/navigation-build-id.ts"],"sourcesContent":["// This gets assigned as a side-effect during app initialization. Because it\n// represents the build used to create the JS bundle, it should never change\n// after being set, so we store it in a global variable.\n//\n// When performing RSC requests, if the incoming data has a different build ID,\n// we perform an MPA navigation/refresh to load the updated build and ensure\n// that the client and server in sync.\n//\n// Starts as an empty string. In practice, because setNavigationBuildId is called during initialization\n// before hydration starts, this will always get reassigned to the actual ID before it's ever needed\n// by a navigation. If for some reasons it didn't, due to a bug or race condition, then on\n// navigation the build comparision would fail and trigger an MPA navigation.\n//\n// Note that this can also be initialized with the deployment id instead (if available). So it's not\n// the same as \"the build id\", but we are running out of alternative names for \"build id or\n// deployment id\".\nlet globalBuildId: string = ''\n\nexport function setNavigationBuildId(buildId: string) {\n globalBuildId = buildId\n}\n\nexport function getNavigationBuildId(): string {\n return globalBuildId\n}\n"],"names":["globalBuildId","setNavigationBuildId","buildId","getNavigationBuildId"],"mappings":";;;;;;AAAA,4EAA4E;AAC5E,4EAA4E;AAC5E,wDAAwD;AACxD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,sCAAsC;AACtC,EAAE;AACF,uGAAuG;AACvG,oGAAoG;AACpG,0FAA0F;AAC1F,6EAA6E;AAC7E,EAAE;AACF,oGAAoG;AACpG,2FAA2F;AAC3F,kBAAkB;AAClB,IAAIA,gBAAwB;AAErB,SAASC,qBAAqBC,OAAe;IAClDF,gBAAgBE;AAClB;AAEO,SAASC;IACd,OAAOH;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 12824, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/remove-base-path.ts"],"sourcesContent":["import { hasBasePath } from './has-base-path'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function removeBasePath(path: string): string {\n if (process.env.__NEXT_MANUAL_CLIENT_BASE_PATH) {\n if (!hasBasePath(path)) {\n return path\n }\n }\n\n // Can't trim the basePath if it has zero length!\n if (basePath.length === 0) return path\n\n path = path.slice(basePath.length)\n if (!path.startsWith('/')) path = `/${path}`\n return path\n}\n"],"names":["hasBasePath","basePath","process","env","__NEXT_ROUTER_BASEPATH","removeBasePath","path","__NEXT_MANUAL_CLIENT_BASE_PATH","length","slice","startsWith"],"mappings":";;;;AAAA,SAASA,WAAW,QAAQ,kBAAiB;;AAE7C,MAAMC,WAAYC,QAAQC,GAAG,CAACC,sBAAsB,MAAe;AAE5D,SAASC,eAAeC,IAAY;IACzC,IAAIJ,QAAQC,GAAG,CAACI,8BAA8B,EAAE;;IAMhD,iDAAiD;IACjD,IAAIN,SAASO,MAAM,KAAK,GAAG,OAAOF;IAElCA,OAAOA,KAAKG,KAAK,CAACR,SAASO,MAAM;IACjC,IAAI,CAACF,KAAKI,UAAU,CAAC,MAAMJ,OAAO,CAAC,CAAC,EAAEA,MAAM;IAC5C,OAAOA;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 12844, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/route-params.ts"],"sourcesContent":["import type { DynamicParamTypesShort } from '../shared/lib/app-router-types'\nimport {\n addSearchParamsIfPageSegment,\n DEFAULT_SEGMENT_KEY,\n PAGE_SEGMENT_KEY,\n} from '../shared/lib/segment'\nimport { ROOT_SEGMENT_REQUEST_KEY } from '../shared/lib/segment-cache/segment-value-encoding'\nimport {\n NEXT_REWRITTEN_PATH_HEADER,\n NEXT_REWRITTEN_QUERY_HEADER,\n NEXT_RSC_UNION_QUERY,\n} from './components/app-router-headers'\nimport { hasBasePath } from './has-base-path'\nimport { removeBasePath } from './remove-base-path'\nimport type {\n NormalizedPathname,\n NormalizedSearch,\n} from './components/segment-cache/cache-key'\nimport type { RSCResponse } from './components/router-reducer/fetch-server-response'\nimport type { ParsedUrlQuery } from 'querystring'\n\nexport type RouteParamValue = string | Array<string> | null\n\nexport function getRenderedSearch(\n response: RSCResponse<unknown> | Response\n): NormalizedSearch {\n // If the server performed a rewrite, the search params used to render the\n // page will be different from the params in the request URL. In this case,\n // the response will include a header that gives the rewritten search query.\n const rewrittenQuery = response.headers.get(NEXT_REWRITTEN_QUERY_HEADER)\n if (rewrittenQuery !== null) {\n return (\n rewrittenQuery === '' ? '' : '?' + rewrittenQuery\n ) as NormalizedSearch\n }\n // If the header is not present, there was no rewrite, so we use the search\n // query of the response URL.\n return urlToUrlWithoutFlightMarker(new URL(response.url))\n .search as NormalizedSearch\n}\n\nexport function getRenderedPathname(\n response: RSCResponse<unknown> | Response\n): NormalizedPathname {\n // If the server performed a rewrite, the pathname used to render the\n // page will be different from the pathname in the request URL. In this case,\n // the response will include a header that gives the rewritten pathname.\n const rewrittenPath = response.headers.get(NEXT_REWRITTEN_PATH_HEADER)\n if (rewrittenPath !== null) {\n return rewrittenPath as NormalizedPathname\n }\n\n const pathname = urlToUrlWithoutFlightMarker(new URL(response.url)).pathname\n return (\n hasBasePath(pathname) ? removeBasePath(pathname) : pathname\n ) as NormalizedPathname\n}\n\n// Pathname parts come from `URL.pathname.split('/')`, so they are already\n// in the encoded form the URL parser produces. The server-side equivalent\n// (`get-dynamic-param.ts`) starts from a decoded param value and applies\n// `encodeURIComponent` once. The two encodings are not the same — for\n// example, the URL parser leaves `,` and `:` untouched while\n// `encodeURIComponent` percent-encodes them. To produce the same canonical\n// form on the client (and avoid double-encoding `%xx` sequences such as\n// `%2F` → `%252F`), we decode the URL part first and re-encode it.\nfunction canonicalizeURLPart(part: string): string {\n try {\n return encodeURIComponent(decodeURIComponent(part))\n } catch {\n // `decodeURIComponent` throws on malformed sequences. Fall back to the\n // already-encoded form rather than failing the navigation.\n return part\n }\n}\n\nexport function parseDynamicParamFromURLPart(\n paramType: DynamicParamTypesShort,\n pathnameParts: Array<string>,\n partIndex: number\n): RouteParamValue {\n // This needs to match the behavior in get-dynamic-param.ts.\n switch (paramType) {\n // Catchalls\n case 'c': {\n // Catchalls receive all the remaining URL parts. If there are no\n // remaining pathname parts, return an empty array.\n return partIndex < pathnameParts.length\n ? pathnameParts.slice(partIndex).map((s) => canonicalizeURLPart(s))\n : []\n }\n // Catchall intercepted\n case 'ci(..)(..)':\n case 'ci(.)':\n case 'ci(..)':\n case 'ci(...)': {\n const prefix = paramType.length - 2\n return partIndex < pathnameParts.length\n ? pathnameParts.slice(partIndex).map((s, i) => {\n if (i === 0) {\n return canonicalizeURLPart(s.slice(prefix))\n }\n\n return canonicalizeURLPart(s)\n })\n : []\n }\n // Optional catchalls\n case 'oc': {\n // Optional catchalls receive all the remaining URL parts, unless this is\n // the end of the pathname, in which case they return null.\n return partIndex < pathnameParts.length\n ? pathnameParts.slice(partIndex).map((s) => canonicalizeURLPart(s))\n : null\n }\n // Dynamic\n case 'd': {\n if (partIndex >= pathnameParts.length) {\n // The route tree expected there to be more parts in the URL than there\n // actually are. This could happen if the x-nextjs-rewritten-path header\n // is incorrectly set, or potentiallyLine truncated
|
||||
{"offset": {"line": 13064, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/constants.ts"],"sourcesContent":["import type { ServerRuntime } from '../types'\n\nexport const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP'\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'\n\nexport const MATCHED_PATH_HEADER = 'x-matched-path'\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER =\n 'x-prerender-revalidate-if-generated'\n\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments'\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc'\nexport const RSC_SUFFIX = '.rsc'\nexport const ACTION_SUFFIX = '.action'\nexport const NEXT_DATA_SUFFIX = '.json'\nexport const NEXT_META_SUFFIX = '.meta'\nexport const NEXT_BODY_SUFFIX = '.body'\n\nexport const NEXT_NAV_DEPLOYMENT_ID_HEADER = 'x-nextjs-deployment-id'\n\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER =\n 'x-next-revalidate-tag-token'\n\nexport const NEXT_RESUME_HEADER = 'next-resume'\nexport const NEXT_RESUME_STATE_LENGTH_HEADER = 'x-next-resume-state-length'\n\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'\nexport const NEXT_CACHE_ROOT_PARAM_TAG_ID = '_N_RP_'\n\n// in seconds\nexport const CACHE_ONE_YEAR_SECONDS = 31536000\n\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe\n\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware'\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`\n\n// Patterns to detect proxy files (replacement for middleware)\nexport const PROXY_FILENAME = 'proxy'\nexport const PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`\n\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'\n\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages'\nexport const DOT_NEXT_ALIAS = 'private-dot-next'\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir'\nexport const APP_DIR_ALIAS = 'private-next-app-dir'\nexport const RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy'\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS =\n 'private-next-rsc-track-dynamic-import'\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS =\n 'private-next-rsc-action-client-wrapper'\n\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`\n\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`\n\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`\n\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`\n\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`\n\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`\n\nexport const GSP_NO_RETURNED_VALUE =\n 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'\nexport const GSSP_NO_RETURNED_VALUE =\n 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'\n\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR =\n 'The `unstable_revalidate` property is available for general use.\\n' +\n 'Please use `revalidate` instead.'\n\nexpLine truncated
|
||||
{"offset": {"line": 13353, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/framework/boundary-components.tsx"],"sourcesContent":["'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from './boundary-constants'\n\n// We use a namespace object to allow us to recover the name of the function\n// at runtime even when production bundling/minification is used.\nconst NameSpace = {\n [METADATA_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n return children\n },\n [VIEWPORT_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n return children\n },\n [OUTLET_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n return children\n },\n [ROOT_LAYOUT_BOUNDARY_NAME]: function ({\n children,\n }: {\n children: ReactNode\n }) {\n return children\n },\n}\n\nexport const MetadataBoundary =\n // We use slice(0) to trick the bundler into not inlining/minifying the function\n // so it retains the name inferred from the namespace object\n NameSpace[METADATA_BOUNDARY_NAME.slice(0) as typeof METADATA_BOUNDARY_NAME]\n\nexport const ViewportBoundary =\n // We use slice(0) to trick the bundler into not inlining/minifying the function\n // so it retains the name inferred from the namespace object\n NameSpace[VIEWPORT_BOUNDARY_NAME.slice(0) as typeof VIEWPORT_BOUNDARY_NAME]\n\nexport const OutletBoundary =\n // We use slice(0) to trick the bundler into not inlining/minifying the function\n // so it retains the name inferred from the namespace object\n NameSpace[OUTLET_BOUNDARY_NAME.slice(0) as typeof OUTLET_BOUNDARY_NAME]\n\nexport const RootLayoutBoundary =\n // We use slice(0) to trick the bundler into not inlining/minifying the function\n // so it retains the name inferred from the namespace object\n NameSpace[\n ROOT_LAYOUT_BOUNDARY_NAME.slice(0) as typeof ROOT_LAYOUT_BOUNDARY_NAME\n ]\n"],"names":["METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","NameSpace","children","MetadataBoundary","slice","ViewportBoundary","OutletBoundary","RootLayoutBoundary"],"mappings":";;;;;;;;;;AAGA,SACEA,sBAAsB,EACtBC,sBAAsB,EACtBC,oBAAoB,EACpBC,yBAAyB,QACpB,uBAAsB;AAR7B;;AAUA,4EAA4E;AAC5E,iEAAiE;AACjE,MAAMC,YAAY;IAChB,CAACJ,0MAAAA,CAAuB,EAAE,SAAU,EAAEK,QAAQ,EAA2B;QACvE,OAAOA;IACT;IACA,CAACJ,0MAAAA,CAAuB,EAAE,SAAU,EAAEI,QAAQ,EAA2B;QACvE,OAAOA;IACT;IACA,CAACH,wMAAAA,CAAqB,EAAE,SAAU,EAAEG,QAAQ,EAA2B;QACrE,OAAOA;IACT;IACA,CAACF,6MAAAA,CAA0B,EAAE,SAAU,EACrCE,QAAQ,EAGT;QACC,OAAOA;IACT;AACF;AAEO,MAAMC,mBAEX,AADA,4DAC4D,oBADoB;AAEhFF,SAAS,CAACJ,0MAAAA,CAAuBO,KAAK,CAAC,GAAoC,CAAA;AAEtE,MAAMC,mBACX,AACA,4DAA4D,oBADoB;AAEhFJ,SAAS,CAACH,0MAAAA,CAAuBM,KAAK,CAAC,GAAoC,CAAA;AAEtE,MAAME,iBACX,AACA,4DAA4D,oBADoB;AAEhFL,SAAS,CAACF,wMAAAA,CAAqBK,KAAK,CAAC,GAAkC,CAAA;AAElE,MAAMG,qBACX,AACA,4DAA4D,oBADoB;AAEhFN,SAAS,CACPD,6MAAAA,CAA0BI,KAAK,CAAC,GACjC,CAAA","ignoreList":[0]}},
|
||||
{"offset": {"line": 13394, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/framework/boundary-constants.tsx"],"sourcesContent":["export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'\n"],"names":["METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME"],"mappings":";;;;;;;;;;AAAO,MAAMA,yBAAyB,6BAA4B;AAC3D,MAAMC,yBAAyB,6BAA4B;AAC3D,MAAMC,uBAAuB,2BAA0B;AACvD,MAAMC,4BAA4B,gCAA+B","ignoreList":[0]}},
|
||||
{"offset": {"line": 13412, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/generate/icon-mark.tsx"],"sourcesContent":["'use client'\n\n// This is a client component that only renders during SSR,\n// but will be replaced during streaming with an icon insertion script tag.\n// We don't want it to be presented anywhere so it's only visible during streaming,\n// right after the icon meta tags so that browser can pick it up as soon as it's rendered.\n// Note: we don't just emit the script here because we only need the script if it's not in the head,\n// and we need it to be hoistable alongside the other metadata but sync scripts are not hoistable.\nexport const IconMark = () => {\n if (typeof window !== 'undefined') {\n return null\n }\n return <meta name=\"«nxt-icon»\" />\n}\n"],"names":["IconMark","window","meta","name"],"mappings":";;;;;AAAA;;AAQO,MAAMA,WAAW;IACtB,IAAI,OAAOC,WAAW,aAAa;;IAGnC,OAAA,WAAA,OAAO,8NAAA,EAACC,QAAAA;QAAKC,MAAK;;AACpB,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 13430, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/scheduler.ts"],"sourcesContent":["export type ScheduledFn<T = void> = () => T | PromiseLike<T>\nexport type SchedulerFn<T = void> = (cb: ScheduledFn<T>) => void\n\n/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */\nexport const scheduleOnNextTick = (cb: ScheduledFn<void>) => {\n // We use Promise.resolve().then() here so that the operation is scheduled at\n // the end of the promise job queue, we then add it to the next process tick\n // to ensure it's evaluated afterwards.\n //\n // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n //\n Promise.resolve().then(() => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n process.nextTick(cb)\n }\n })\n}\n\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */\nexport const scheduleImmediate = (cb: ScheduledFn<void>): void => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n setImmediate(cb)\n }\n}\n\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */\nexport function atLeastOneTask() {\n return new Promise<void>((resolve) => scheduleImmediate(resolve))\n}\n\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */\nexport function waitAtLeastOneReactRenderTask(): Promise<void> {\n if (process.env.NEXT_RUNTIME === 'edge') {\n return new Promise((r) => setTimeout(r, 0))\n } else {\n return new Promise((r) => setImmediate(r))\n }\n}\n"],"names":["scheduleOnNextTick","cb","Promise","resolve","then","process","env","NEXT_RUNTIME","setTimeout","nextTick","scheduleImmediate","setImmediate","atLeastOneTask","waitAtLeastOneReactRenderTask","r"],"mappings":"AAGA;;;;;CAKC,GACD;;;;;;;;;;AAAO,MAAMA,qBAAqB,CAACC;IACjC,6EAA6E;IAC7E,4EAA4E;IAC5E,uCAAuC;IACvC,EAAE;IACF,kLAAkL;IAClL,EAAE;IACFC,QAAQC,OAAO,GAAGC,IAAI,CAAC;QACrB,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;aAElC;YACLF,QAAQI,QAAQ,CAACR;QACnB;IACF;AACF,EAAC;AAQM,MAAMS,oBAAoB,CAACT;IAChC,IAAII,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACLI,aAAaV;IACf;AACF,EAAC;AAOM,SAASW;IACd,OAAO,IAAIV,QAAc,CAACC,UAAYO,kBAAkBP;AAC1D;AAWO,SAASU;IACd,IAAIR,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACL,OAAO,IAAIL,QAAQ,CAACY,IAAMH,aAAaG;IACzC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 13481, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/next-devtools/userspace/app/segment-explorer-node.tsx"],"sourcesContent":["'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n useState,\n createContext,\n useContext,\n use,\n useMemo,\n useCallback,\n} from 'react'\nimport { useLayoutEffect } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport { GlobalLayoutRouterContext } from '../../../shared/lib/app-router-context.shared-runtime'\nimport { notFound } from '../../../client/components/not-found'\n\nexport type SegmentBoundaryType =\n | 'not-found'\n | 'error'\n | 'loading'\n | 'global-error'\n\nexport const SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE =\n 'NEXT_DEVTOOLS_SIMULATED_ERROR'\n\nexport type SegmentNodeState = {\n type: string\n pagePath: string\n boundaryType: string | null\n setBoundaryType: (type: SegmentBoundaryType | null) => void\n}\n\nfunction SegmentTrieNode({\n type,\n pagePath,\n}: {\n type: string\n pagePath: string\n}): React.ReactNode {\n const { boundaryType, setBoundaryType } = useSegmentState()\n const nodeState: SegmentNodeState = useMemo(() => {\n return {\n type,\n pagePath,\n boundaryType,\n setBoundaryType,\n }\n }, [type, pagePath, boundaryType, setBoundaryType])\n\n // Use `useLayoutEffect` to ensure the state is updated during suspense.\n // `useEffect` won't work as the state is preserved during suspense.\n useLayoutEffect(() => {\n dispatcher.segmentExplorerNodeAdd(nodeState)\n return () => {\n dispatcher.segmentExplorerNodeRemove(nodeState)\n }\n }, [nodeState])\n\n return null\n}\n\nfunction NotFoundSegmentNode(): React.ReactNode {\n notFound()\n}\n\nfunction ErrorSegmentNode(): React.ReactNode {\n throw new Error(SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE)\n}\n\nconst forever = new Promise(() => {})\nfunction LoadingSegmentNode(): React.ReactNode {\n use(forever)\n return null\n}\n\nexport function SegmentViewStateNode({ page }: { page: string }) {\n const { tree } = useContext(GlobalLayoutRouterContext)\n useLayoutEffect(() => {\n dispatcher.segmentExplorerUpdateRouteState(page, tree)\n return () => {\n dispatcher.segmentExplorerUpdateRouteState('', null)\n }\n }, [page, tree])\n return null\n}\n\nexport function SegmentBoundaryTriggerNode() {\n const { boundaryType } = useSegmentState()\n let segmentNode: React.ReactNode = null\n if (boundaryType === 'loading') {\n segmentNode = <LoadingSegmentNode />\n } else if (boundaryType === 'not-found') {\n segmentNode = <NotFoundSegmentNode />\n } else if (boundaryType === 'error') {\n segmentNode = <ErrorSegmentNode />\n }\n return segmentNode\n}\n\nexport function SegmentViewNode({\n type,\n pagePath,\n children,\n}: {\n type: string\n pagePath: string\n children?: ReactNode\n}): React.ReactNode {\n const segmentNode = (\n <SegmentTrieNode key={type} type={type} pagePath={pagePath} />\n )\n\n return (\n <>\n {segmentNode}\n {children}\n </>\n )\n}\n\nconst SegmentStateContext = createContext<{\n boundaryType: SegmentBoundaryType | null\n setBoundaryType: (type: SegmentBoundaryType | null) => void\n}>({\n boundaryType: null,\n setBoundaryType: () => {},\n})\n\nexport function SegmentStateProvider({ children }: { children: ReactNode }) {\n const [boundaryType, setBoundaryType] = useState<SegmentBoundaryType | null>(\n null\n )\n\n const [errorBoundaryKey, setErrorBoundaryKey] = useState(0)\n const reloadBoundary = useCallback(\n () => setErrorBoundaryKey((prev) => prev + 1),\n []\n )\n\n const setBoundaryTypeAndReload = useCallback(\n (type: SegmentBoundaryType | null) => {\n if (type === null) {\n reloadBoundary()\n }\n setBoundaryType(type)\n },\n [reloadBoundary]\n )\n\n return (\n <SegmentStateContext.Provider\n key={errorBoundaryKey}\n value={{\n boundaryType,\n setBoundaryType: setBoundaryTypeAndReload,\n }}\n >\n {children}\n </SegmentStateContext.Provider>\n )\n}\n\nexport function useSegmentState() {\n return useContext(SegmentStateContext)\n}\n"],"names":["useState","createContext","useContext","use","useMemo","useCallback","useLayoutEffect","dispatcher","GlobalLayoutRouterContext","notFound","SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE","SegmentTrieNode","type","pagePath","boundaryType","setBoundaryType","useSegmentState","nodeState","segmentExplorerNodeAdd","segmentExplorerNodeRemove","NotFoundSegmentNode","ErrorSegmentNode","Error","forever","Promise","LoadingSegmentNode","SegmentViewStateNode","page","tree","segmentExplorerUpdateRouteState","SegmentBoundaryTriggerNode","segmentNode","SegmentViewNode","children","SegmentStateContext","SegmentStateProvider","errorBoundaryKey","setErrorBoundaryKey","reloadBoundary","prev","setBoundaryTypeAndReload","Provider","vaLine truncated
|
||||
{"offset": {"line": 13618, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/next-devtools/userspace/use-app-dev-rendering-indicator.tsx"],"sourcesContent":["'use client'\n\nimport { useEffect, useTransition } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\n\nexport const useAppDevRenderingIndicator = () => {\n const [isPending, startTransition] = useTransition()\n\n useEffect(() => {\n if (isPending) {\n dispatcher.renderingIndicatorShow()\n } else {\n dispatcher.renderingIndicatorHide()\n }\n }, [isPending])\n\n return startTransition\n}\n"],"names":["useEffect","useTransition","dispatcher","useAppDevRenderingIndicator","isPending","startTransition","renderingIndicatorShow","renderingIndicatorHide"],"mappings":";;;;AAEA,SAASA,SAAS,EAAEC,aAAa,QAAQ,QAAO;AAChD,SAASC,UAAU,QAAQ,mCAAkC;AAH7D;;;AAKO,MAAMC,8BAA8B;IACzC,MAAM,CAACC,WAAWC,gBAAgB,OAAGJ,sNAAAA;QAErCD,kNAAAA,EAAU;QACR,IAAII,WAAW;YACbF,wLAAAA,CAAWI,sBAAsB;QACnC,OAAO;YACLJ,wLAAAA,CAAWK,sBAAsB;QACnC;IACF,GAAG;QAACH;KAAU;IAEd,OAAOC;AACT,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 13644, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/blocking-route-messages.ts"],"sourcesContent":["export function createRuntimeBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered runtime data during prerendering.\\n\\n` +\n `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n )\n}\n\nexport function createDynamicBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached data during prerendering.\\n\\n` +\n `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n )\n}\n\nexport function createRuntimeBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered runtime data during prerendering or a navigation.\\n\\n` +\n `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n )\n}\n\nexport function createLinkBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered URL data during prerendering or a navigation.\\n\\n` +\n `\\`params\\` or \\`searchParams\\` accessed outside of \\`<Suspense>\\` may prevent the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/instant-shell-url-data`\n )\n}\n\nexport function createDynamicBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached data during prerendering or a navigation.\\n\\n` +\n `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n )\n}\n\n/**\n * NOTE: Prefer `createRuntimeBodyError` or `createDynamicBodyError`.\n * Only use this in situations like build-time static validation, where\n * we can't pinpoint a more specific reason.\n */\nexport function createDynamicOrRuntimeBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached or runtime data during prerendering.\\n\\n` +\n `\\`fetch(...)\\`, \\`cookies()\\`, \\`headers()\\`, \\`params\\`, \\`searchParams\\`, or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] For uncached data (\\`fetch\\`, database calls): cache the access with \\`\"use cache\"\\` (does not apply to \\`conneLine truncated
|
||||
{"offset": {"line": 13784, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n ValidationStoreClient,\n PrerenderStoreModernServer,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getStagedRenderingController,\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n ClientHookDynamicError,\n isClientHookDynamicError,\n makeClientHookHangingPromise,\n trackRuntimeDataAccessed,\n} from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport {\n createRuntimeBodyError,\n createDynamicBodyError,\n createRuntimeBodyErrorInNavigation,\n createDynamicBodyErrorInNavigation,\n createDynamicOrRuntimeBodyError,\n createRuntimeMetadataError,\n createDynamicMetadataError,\n createRuntimeViewportError,\n createDynamicViewportError,\n createDynamicOrRuntimeViewportError,\n createDynamicOrRuntimeMetadataError,\n logBuildDebugHint,\n createLinkBodyErrorInNavigation,\n createLinkMetadataError,\n createLinkViewportError,\n} from './blocking-route-messages'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n INSTANT_VALIDATION_BOUNDARY_NAME,\n INSTANT_SLOT_MARKER_PREFIX,\n INSTANT_SLOT_MARKER_SUFFIX,\n} from './instant-validation/boundary-constants'\nimport {\n type ValidationBoundaryTracking,\n allRequiredBoundariesRendered,\n} from './instant-validation/boundary-tracking'\nimport type { InstantValidationSampleTracking } from './instant-validation/instant-samples'\nimport { createUnrenderedSegmentError } from '../../shared/lib/instant-messages'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array<DynamicAccess>\n\n syncDynamicErrorWithStack: null | Error\n syncDynamicErrorWithStackPostMicrotask: boolean\n}\n\n// Stores dynamic reasons used during an SSR render.\nexporLine truncated
|
||||
{"offset": {"line": 14919, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/boundary-constants.ts"],"sourcesContent":["export const INSTANT_VALIDATION_BOUNDARY_NAME =\n '__next_instant_validation_boundary__'\n\nexport const INSTANT_SLOT_MARKER_PREFIX = '__next_instant_slot_'\nexport const INSTANT_SLOT_MARKER_SUFFIX = '__'\n"],"names":["INSTANT_VALIDATION_BOUNDARY_NAME","INSTANT_SLOT_MARKER_PREFIX","INSTANT_SLOT_MARKER_SUFFIX"],"mappings":";;;;;;;;AAAO,MAAMA,mCACX,uCAAsC;AAEjC,MAAMC,6BAA6B,uBAAsB;AACzD,MAAMC,6BAA6B,KAAI","ignoreList":[0]}},
|
||||
{"offset": {"line": 14934, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/boundary-impl.tsx"],"sourcesContent":["/* eslint-disable @next/internal/no-ambiguous-jsx -- React Client */\n\n// Do not put a \"use client\" directive here. Import this module via the shim in\n// `packages/next/src/client/components/instant-validation/boundary.tsx` instead.\n// 'use client'\n\nimport { createContext, type ReactNode } from 'react'\nimport { INSTANT_VALIDATION_BOUNDARY_NAME } from './boundary-constants'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport type { ValidationBoundaryTracking } from './boundary-tracking'\nimport { workUnitAsyncStorage } from '../work-unit-async-storage.external'\n\nif (typeof window !== 'undefined') {\n throw new InvariantError(\n 'Instant validation boundaries should never appear in browser bundles.'\n )\n}\n\nfunction getValidationBoundaryTracking(): ValidationBoundaryTracking | null {\n const store = workUnitAsyncStorage.getStore()\n if (!store) return null\n switch (store.type) {\n case 'validation-client':\n return store.boundaryState\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'prerender-runtime':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'generate-static-params':\n break\n default:\n store satisfies never\n }\n return null\n}\n\n// We use a namespace object to allow us to recover the name of the function\n// at runtime even when production bundling/minification is used.\nconst NameSpace = {\n [INSTANT_VALIDATION_BOUNDARY_NAME]: function ({\n id,\n children,\n }: {\n id: string\n children: ReactNode\n }) {\n // Track which boundaries we actually managed to render.\n const state = getValidationBoundaryTracking()\n if (state === null) {\n throw new InvariantError('Missing boundary tracking state')\n }\n state.renderedIds.add(id)\n\n return children\n },\n}\n\ntype BoundaryPlacement =\n | null // do not place here\n | string // boundaryId -- place here\n\nexport const InstantValidationBoundaryContext =\n createContext<BoundaryPlacement>(null)\n\nexport function PlaceValidationBoundaryBelowThisLevel({\n id,\n children,\n}: {\n id: string\n children: ReactNode\n}) {\n return (\n // OuterLayoutRouter will see this and render a `RenderValidationBoundaryAtThisLevel`.\n <InstantValidationBoundaryContext value={id}>\n {children}\n </InstantValidationBoundaryContext>\n )\n}\n\nexport function RenderValidationBoundaryAtThisLevel({\n id,\n children,\n}: {\n id: string\n children: ReactNode\n}) {\n // We got a boundaryId from the context. Clear the context so that the children don't render another boundary.\n return (\n <InstantValidationBoundary id={id}>\n <InstantValidationBoundaryContext value={null}>\n {children}\n </InstantValidationBoundaryContext>\n </InstantValidationBoundary>\n )\n}\n\nconst InstantValidationBoundary =\n // We use slice(0) to trick the bundler into not inlining/minifying the function\n // so it retains the name inferred from the namespace object\n NameSpace[\n INSTANT_VALIDATION_BOUNDARY_NAME.slice(\n 0\n ) as typeof INSTANT_VALIDATION_BOUNDARY_NAME\n ]\n\n// Slot marker component for attributing validation errors to the\n// correct config when a boundary spans multiple parallel slots.\n// Renders a dynamically-named inner component so the slot index\n// appears in the SSR component stack (__next_instant_slot_N__).\nconst slotMarkerCache = new Map<\n string,\n (props: { children: ReactNode }) => ReactNode\n>()\n\nexport function SlotMarker({\n name,\n children,\n}: {\n name: string\n children: ReactNode\n}) {\n let Marker = slotMarkerCache.get(name)\n if (!Marker) {\n const ns = {\n [name]: function ({ children: c }: { children: ReactNode }) {\n return c\n },\n }\n Marker = ns[name]\n slotMarkerCache.set(name, Marker)\n }\n return <Marker>{children}</Marker>\n}\n"],"names":["createContext","INSTANT_VALIDATION_BOUNDARY_NAME","InvariantError","workUnitAsyncStorage","window","getValidationBoundaryTracking","store","getStore","type","boundaryState","NameSpace","id","children","state","renderedIds","add","InstantValidationBoundaryContext","PlaceValidationBoundaryBelowThisLevel","value","RenderValidationBoundaryAtThisLevel","InstantValidationBoundary","slice","slotMarkerCache","Map","SlotMarker","name","Marker","get","ns","c","set"],"mappings":";;;;;;;;;;AAAA,kEAAkE,GAElE,+EAA+E;AAC/E,iFAAiF;AACjF,eAAe;;AAEf,SAASA,aAAa,QAAwB,QAAO;AACrD,SAASC,gCAAgC,QAAQ,uBAAsB;AACvE,SAASC,cAAc,QAAQ,sCAAqC;AAEpE,SAASC,oBAAoB,QAAQ,sCAAqC;;;;;;AAE1E,IAAI,OAAOC,WAAW,aAAa;;AAMnC,SAASC;IACP,MAAMC,QAAQH,2SAAAA,CAAqBI,QAAQ;IAC3C,IAAI,CAACD,OAAO,OAAO;IACnB,OAAQA,MAAME,ILine truncated
|
||||
{"offset": {"line": 15041, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/boundary-tracking.tsx"],"sourcesContent":["export type ValidationBoundaryTracking = {\n /**\n * Map from boundary id (the SegmentPath where a validation boundary is\n * placed) to the file paths of modules inside that boundary's subtree.\n * When the boundary spans multiple parallel slots, each slot contributes\n * its own first-found module path so all unrendered segments can be\n * reported together.\n */\n requiredIds: Map<string, string[]>\n renderedIds: Set<string>\n}\n\nexport function createValidationBoundaryTracking(): ValidationBoundaryTracking {\n return {\n requiredIds: new Map(),\n renderedIds: new Set(),\n }\n}\n\nexport function allRequiredBoundariesRendered(\n state: ValidationBoundaryTracking\n): boolean {\n for (const id of state.requiredIds.keys()) {\n if (!state.renderedIds.has(id)) {\n return false\n }\n }\n return true\n}\n"],"names":["createValidationBoundaryTracking","requiredIds","Map","renderedIds","Set","allRequiredBoundariesRendered","state","id","keys","has"],"mappings":";;;;;;AAYO,SAASA;IACd,OAAO;QACLC,aAAa,IAAIC;QACjBC,aAAa,IAAIC;IACnB;AACF;AAEO,SAASC,8BACdC,KAAiC;IAEjC,KAAK,MAAMC,MAAMD,MAAML,WAAW,CAACO,IAAI,GAAI;QACzC,IAAI,CAACF,MAAMH,WAAW,CAACM,GAAG,CAACF,KAAK;YAC9B,OAAO;QACT;IACF;IACA,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 15065, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/instant-samples.ts"],"sourcesContent":["import type { InstantSample } from '../../../build/segment-config/app/app-segment-config'\nimport type { ReadonlyRequestCookies } from '../../web/spec-extension/adapters/request-cookies'\nimport type { ReadonlyHeaders } from '../../web/spec-extension/adapters/headers'\nimport type { DraftModeProvider } from '../../async-storage/draft-mode-provider'\nimport type { Params } from '../../request/params'\n\nimport { RequestCookies } from '../../web/spec-extension/cookies'\nimport { RequestCookiesAdapter } from '../../web/spec-extension/adapters/request-cookies'\nimport { HeadersAdapter } from '../../web/spec-extension/adapters/headers'\nimport type { SearchParams } from '../../request/search-params'\nimport { getSegmentParam } from '../../../shared/lib/router/utils/get-segment-param'\nimport { parseRelativeUrl } from '../../../shared/lib/router/utils/parse-relative-url'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport { InstantValidationError } from './instant-validation-error'\nimport { workUnitAsyncStorage } from '../work-unit-async-storage.external'\nimport { wellKnownProperties } from '../../../shared/lib/utils/reflect-utils'\nimport type { WorkStore } from '../work-async-storage.external'\n\nexport type InstantValidationSampleTracking = {\n // TODO(instant-validation-build): track which samples config we used and attribute errors\n missingSampleErrors: InstantValidationError[]\n}\n\nexport function createValidationSampleTracking(): InstantValidationSampleTracking {\n return {\n missingSampleErrors: [],\n }\n}\n\nfunction getExpectedSampleTracking(): InstantValidationSampleTracking {\n let validationSampleTracking: InstantValidationSampleTracking | null = null\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'request':\n case 'validation-client':\n // TODO(instant-validation-build): do we need any special handling for caches?\n validationSampleTracking =\n workUnitStore.validationSampleTracking ?? null\n break\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n case 'prerender':\n case 'prerender-runtime':\n case 'generate-static-params':\n break\n default:\n workUnitStore satisfies never\n }\n }\n if (!validationSampleTracking) {\n throw new InvariantError(\n 'Expected to have a workUnitStore that provides validationSampleTracking'\n )\n }\n return validationSampleTracking\n}\n\nexport function trackMissingSampleError(error: InstantValidationError): void {\n const validationSampleTracking = getExpectedSampleTracking()\n validationSampleTracking.missingSampleErrors.push(error)\n}\n\nexport function trackMissingSampleErrorAndThrow(\n error: InstantValidationError\n): never {\n // TODO(instant-validation-build): this should abort the render\n trackMissingSampleError(error)\n throw error\n}\n\n/**\n * Creates ReadonlyRequestCookies from sample cookie data.\n * Accessing a cookie not declared in the sample will throw an error.\n * Cookies with `value: null` are declared (allowed to access) but return no value.\n */\nexport function createCookiesFromSample(\n sampleCookies: InstantSample['cookies'],\n route: string\n): ReadonlyRequestCookies {\n const declaredNames = new Set<string>()\n\n const cookies = new RequestCookies(new Headers())\n if (sampleCookies) {\n for (const cookie of sampleCookies) {\n declaredNames.add(cookie.name)\n if (cookie.value !== null) {\n cookies.set(cookie.name, cookie.value)\n }\n }\n }\n\n const sealed = RequestCookiesAdapter.seal(cookies)\n\n return new Proxy(sealed, {\n get(target, prop, receiver) {\n if (prop === 'has') {\n const originalMethod = Reflect.get(target, prop, receiver)\n const wrappedMethod: typeof originalMethod = function (name) {\n if (!declaredNames.has(name)) {\n trackMissingSampleErrorAndThrow(\n createMissingCookieSampleError(route, name)\n )\n }\n return originalMethod.call(target, name)\n }\n return wrappedMethod\n }\n if (prop === 'get') {\n const originalMethod = Reflect.get(target, prop, receiver)\n const wrappedMethod: typeof originalMethod = function (nameOrCookie) {\n let name: string\n if (typeof nameOrCookie === 'string') {\n name = nameOrCookie\n } else if (\n nameOrCookie &&\n typeof nameOrCookie === 'object' &&\n typeof nameOrCookie.name === 'string'\n ) {\n name = namLine truncated
|
||||
{"offset": {"line": 15475, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/instant-validation-error.ts"],"sourcesContent":["const INSTANT_VALIDATION_ERROR_DIGEST = 'INSTANT_VALIDATION_ERROR'\n\n/** Check if an error is an exhaustive samples validation error (by digest). */\nexport function isInstantValidationError(\n err: unknown\n): err is InstantValidationError {\n return !!(\n err &&\n typeof err === 'object' &&\n err instanceof Error &&\n (err as any).digest === INSTANT_VALIDATION_ERROR_DIGEST\n )\n}\n\nexport class InstantValidationError extends Error {\n digest = INSTANT_VALIDATION_ERROR_DIGEST\n}\n"],"names":["INSTANT_VALIDATION_ERROR_DIGEST","isInstantValidationError","err","Error","digest","InstantValidationError"],"mappings":";;;;;;AAAA,MAAMA,kCAAkC;AAGjC,SAASC,yBACdC,GAAY;IAEZ,OAAO,CAAC,CACNA,CAAAA,OACA,OAAOA,QAAQ,YACfA,eAAeC,SACdD,IAAYE,MAAM,KAAKJ,+BAA8B;AAE1D;AAEO,MAAMK,+BAA+BF;;QAArC,KAAA,IAAA,OAAA,IAAA,CACLC,MAAAA,GAASJ;;AACX","ignoreList":[0]}},
|
||||
{"offset": {"line": 15494, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/staged-rendering.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers'\n\nexport enum RenderStage {\n Before = 1,\n //\n ShellStatic = 11,\n Static = 13,\n //\n ShellRuntime = 21,\n Runtime = 23,\n //\n Dynamic = 30,\n //\n Abandoned = 40,\n}\n\nexport type AdvanceableRenderStage = Exclude<\n RenderStage,\n RenderStage.Before | RenderStage.Abandoned\n>\n\nexport const RENDER_STAGE_ADVANCE_ORDER: AdvanceableRenderStage[] = [\n RenderStage.ShellStatic,\n RenderStage.Static,\n //\n RenderStage.ShellRuntime,\n RenderStage.Runtime,\n //\n RenderStage.Dynamic,\n]\n\nexport function getNextStage(\n stage: Exclude<AdvanceableRenderStage, RenderStage.Dynamic>\n) {\n return RENDER_STAGE_ADVANCE_ORDER[\n RENDER_STAGE_ADVANCE_ORDER.indexOf(stage) + 1\n ]\n}\n\nexport function isAdvanceableRenderStage(\n stage: RenderStage\n): stage is AdvanceableRenderStage {\n return RenderStage.Before < stage && stage <= RenderStage.Dynamic\n}\n\nexport enum SyncIOMode {\n /** Sync IO does not error in any stage. */\n Untracked = 1,\n /** Before `partialPrefetching`: Sync IO errors in static stages, and is allowed otherwise. */\n AllowedInRuntimeOrDynamic = 2,\n /** After `partialPrefetching`: Sync IO errors in all stages other than dynamic. */\n AllowedInDynamic = 3,\n}\n\nexport class StagedRenderingController {\n private abortSignal: AbortSignal | null\n private abandonController: AbortController | null\n private syncIOMode: SyncIOMode\n public readonly finalStage: AdvanceableRenderStage | null\n\n currentStage: RenderStage = RenderStage.Before\n\n syncInterruptReason: Error | null = null\n\n triggers: Record<AdvanceableRenderStage, StageTrigger> = {\n [RenderStage.ShellStatic]: createStageTrigger(),\n [RenderStage.Static]: createStageTrigger(),\n //\n [RenderStage.ShellRuntime]: createStageTrigger(),\n [RenderStage.Runtime]: createStageTrigger(),\n //\n [RenderStage.Dynamic]: createStageTrigger(),\n }\n\n constructor({\n abortSignal,\n abandonController,\n syncIO,\n finalStage,\n }: {\n abortSignal: AbortSignal | null\n abandonController: AbortController | null\n syncIO: SyncIOMode\n finalStage: AdvanceableRenderStage | null\n }) {\n this.abortSignal = abortSignal\n this.abandonController = abandonController\n this.syncIOMode = syncIO\n this.finalStage = finalStage\n\n if (abortSignal) {\n abortSignal.addEventListener(\n 'abort',\n () => {\n // Reject all stage promises that haven't already been resolved.\n // `cancelStageTrigger` is a noop if the trigger already resolved.\n const { reason } = abortSignal\n for (const trigger of Object.values(this.triggers)) {\n cancelStageTrigger(trigger, reason)\n }\n },\n { once: true }\n )\n }\n\n if (abandonController) {\n abandonController.signal.addEventListener(\n 'abort',\n () => {\n this.abandonRender()\n },\n { once: true }\n )\n }\n }\n\n onStage(stage: AdvanceableRenderStage, callback: () => void) {\n addSyncTriggerListener(this.triggers[stage], callback)\n }\n\n shouldTrackSyncInterrupt(): boolean {\n if (this.syncIOMode === SyncIOMode.Untracked) {\n return false\n }\n\n switch (this.currentStage) {\n case RenderStage.Before:\n // If we haven't started the render yet, it can't be interrupted.\n return false\n case RenderStage.ShellStatic:\n case RenderStage.Static:\n return true\n case RenderStage.ShellRuntime:\n case RenderStage.Runtime: {\n switch (this.syncIOMode) {\n case SyncIOMode.AllowedInRuntimeOrDynamic: {\n // Before `partialPrefetching`: Sync IO only errors in static stages.\n return false\n }\n case SyncIOMode.AllowedInDynamic: {\n return true\n }\n }\n // NOT a fallthrough, but eslint doesn't understand that\n }\n case RenderStage.Dynamic:\n case RenderStage.Abandoned:\n return false\n default:\n this.currentStage satisfies never\n return false\n }\n }\n\n /** Note: only call this if `shouldTrackSyncInterrupt()` returned true */\n syncInterruptCurrentStageWithReason(reason: Error) {\n const { currentStage } = this\n if (\n currentStage === RenderStage.Before ||\n currentStage === RenderStage.Dynamic ||\n currentStage === RenderStage.Abandoned\n ) {\n // Not interruptible. Defensive noop.\n return\n }\n\n // If Sync IO occurs during an abandonable render, we trigger the abandon.\n // The abandon listener wLine truncated
|
||||
{"offset": {"line": 15798, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/vary-params.ts"],"sourcesContent":["import type { Params } from '../request/params'\nimport type { SearchParams } from '../request/search-params'\nimport {\n getVaryParamsAccumulator,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\n\n/**\n * Accumulates vary params for a single segment (or for metadata/rootParams).\n *\n * A VaryParamsAccumulator is an `AsyncIterable<string>` that can be serialized\n * by React Flight. As params are accessed during render, each newly-seen param\n * name is `add`ed, which yields it into the Flight stream immediately. After\n * rendering, call `close()` (via `finishAccumulatingVaryParams`) to end the\n * iteration.\n *\n * Because each access is flushed into the stream as it happens, the set of\n * accessed params is built up incrementally, with no step at the end of the\n * render that has to run for the client to read anything. If the prerender is\n * aborted by sync I/O, the params yielded before the abort are already in the\n * stream — and they're exactly the params the partial response depends on.\n * This mirrors how `StaleTimeIterable` works (see stale-time.ts).\n *\n * Each name is emitted at most once: `add` dedupes against the set of\n * already-yielded names, so the stream never contains a duplicate.\n *\n * NOTE: like `StaleTimeIterable`, this supports a single concurrent iteration\n * (Flight iterates it exactly once). The shared empty singleton below is the\n * only instance referenced by more than one segment, and it only ever yields\n * \"done\", so concurrent iteration of it is safe.\n */\nexport class VaryParamsAccumulator implements AsyncIterable<string> {\n private _resolve: ((result: IteratorResult<string>) => void) | null = null\n private _done = false\n private _buffer: string[] = []\n // The set of param names already yielded. Doubles as the dedupe guard so the\n // same name is never emitted twice.\n private _seen: Set<string> = new Set()\n\n /**\n * Records that a param was accessed. Yields the name into the stream the\n * first time it's seen; subsequent accesses of the same name are no-ops.\n */\n add(paramName: string): void {\n if (this._done || this._seen.has(paramName)) {\n return\n }\n this._seen.add(paramName)\n if (this._resolve !== null) {\n this._resolve({ value: paramName, done: false })\n this._resolve = null\n } else {\n this._buffer.push(paramName)\n }\n }\n\n /** Ends the iteration. Best-effort: if skipped (e.g. on a sync-I/O abort),\n * the consumer simply reads the params yielded so far. */\n close(): void {\n if (this._done) {\n return\n }\n this._done = true\n if (this._resolve !== null) {\n this._resolve({ value: undefined, done: true })\n this._resolve = null\n }\n }\n\n [Symbol.asyncIterator](): AsyncIterator<string> {\n return {\n next: () => {\n if (this._buffer.length > 0) {\n return Promise.resolve({ value: this._buffer.shift()!, done: false })\n }\n if (this._done) {\n return Promise.resolve({ value: undefined, done: true })\n }\n return new Promise<IteratorResult<string>>((resolve) => {\n this._resolve = resolve\n })\n },\n }\n }\n}\n\n/**\n * A mutable data structure for accumulating per-segment vary params for an\n * entire server response. It's only used during prerenders. It describes\n * metadata about the response itself.\n */\nexport type ResponseVaryParamsAccumulator = {\n /** Vary params accumulator for metadata/viewport (the \"head\" segment) */\n head: VaryParamsAccumulator\n /** Vary params accumulator for root params access */\n rootParams: VaryParamsAccumulator\n /** Vary params accumulators for each route segment */\n segments: Set<VaryParamsAccumulator>\n}\n\n/**\n * A singleton accumulator that's already closed with no params. Use this for\n * segments where we know upfront that no params will be accessed, such as\n * client components or segments without user code.\n *\n * Benefits:\n * - No need to accumulate or close later\n * - Resilient: reads as an empty set even if other tracking fails\n * - Memory efficient: reuses the same object\n *\n * It's never added to `ResponseVaryParamsAccumulator.segments` (callers pass it\n * directly), so `finishAccumulatingVaryParams` doesn't touch it.\n */\nexport const emptyVaryParamsAccumulator: VaryParamsAccumulator =\n new VaryParamsAccumulator()\nemptyVaryParamsAccumulator.close()\n\nexport function createResponseVaryParamsAccumulator(): ResponseVaryParamsAccumulator {\n // Create the head and rootParams accumulators as top-level fields.\n // Segment accumulators are added to the segments set as they are created.\n const head = new VaryParamsAccumulator()\n const rootParams = new VaryParamsAccumulatorLine truncated
|
||||
{"offset": {"line": 16026, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/create-deduped-by-callsite-server-error-logger.ts"],"sourcesContent":["import * as React from 'react'\n\nconst errorRef: { current: null | Error } = { current: null }\n\n// React.cache is currently only available in canary/experimental React channels.\nconst cache =\n typeof React.cache === 'function'\n ? React.cache\n : (fn: (key: unknown) => void) => fn\n\n// When Cache Components is enabled, we record these as errors so that they\n// are captured by the dev overlay as it's more critical to fix these\n// when enabled.\nconst logErrorOrWarn = process.env.__NEXT_CACHE_COMPONENTS\n ? console.error\n : console.warn\n\n// We don't want to dedupe across requests.\n// The developer might've just attempted to fix the warning so we should warn again if it still happens.\nconst flushCurrentErrorIfNew = cache(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- cache key\n (key: unknown) => {\n try {\n logErrorOrWarn(errorRef.current)\n } finally {\n errorRef.current = null\n }\n }\n)\n\n/**\n * Creates a function that logs an error message that is deduped by the userland\n * callsite.\n * This requires no indirection between the call of this function and the userland\n * callsite i.e. there's only a single library frame above this.\n * Do not use on the Client where sourcemaps and ignore listing might be enabled.\n * Only use that for warnings need a fix independent of the callstack.\n *\n * @param getMessage\n * @returns\n */\nexport function createDedupedByCallsiteServerErrorLoggerDev<Args extends any[]>(\n getMessage: (...args: Args) => Error\n) {\n return function logDedupedError(...args: Args) {\n const message = getMessage(...args)\n\n if (process.env.NODE_ENV !== 'production') {\n const callStackFrames = new Error().stack?.split('\\n')\n if (callStackFrames === undefined || callStackFrames.length < 4) {\n logErrorOrWarn(message)\n } else {\n // Error:\n // logDedupedError\n // asyncApiBeingAccessedSynchronously\n // <userland callsite>\n // TODO: This breaks if sourcemaps with ignore lists are enabled.\n const key = callStackFrames[4]\n errorRef.current = message\n flushCurrentErrorIfNew(key)\n }\n } else {\n logErrorOrWarn(message)\n }\n }\n}\n"],"names":["React","errorRef","current","cache","fn","logErrorOrWarn","process","env","__NEXT_CACHE_COMPONENTS","console","error","warn","flushCurrentErrorIfNew","key","createDedupedByCallsiteServerErrorLoggerDev","getMessage","logDedupedError","args","message","NODE_ENV","callStackFrames","Error","stack","split","undefined","length"],"mappings":";;;;AAAA,YAAYA,WAAW,QAAO;;AAE9B,MAAMC,WAAsC;IAAEC,SAAS;AAAK;AAE5D,iFAAiF;AACjF,MAAMC,QACJ,OAAOH,MAAMG,wMAAK,KAAK,aACnBH,MAAMG,wMAAK,GACX,CAACC,KAA+BA;AAEtC,2EAA2E;AAC3E,qEAAqE;AACrE,gBAAgB;AAChB,MAAMC,iBAAiBC,QAAQC,GAAG,CAACC,uBAAuB,GACtDC,QAAQC,KAAK,aACbD,QAAQE,IAAI;AAEhB,2CAA2C;AAC3C,wGAAwG;AACxG,MAAMC,yBAAyBT,MAC7B,AACA,CAACU,yEADyE;IAExE,IAAI;QACFR,eAAeJ,SAASC,OAAO;IACjC,SAAU;QACRD,SAASC,OAAO,GAAG;IACrB;AACF;AAcK,SAASY,4CACdC,UAAoC;IAEpC,OAAO,SAASC,gBAAgB,GAAGC,IAAU;QAC3C,MAAMC,UAAUH,cAAcE;QAE9B,IAAIX,QAAQC,GAAG,CAACY,QAAQ,KAAK,WAAc;gBACjB;YAAxB,MAAMC,kBAAAA,CAAkB,SAAA,IAAIC,QAAQC,KAAK,KAAA,OAAA,KAAA,IAAjB,OAAmBC,KAAK,CAAC;YACjD,IAAIH,oBAAoBI,aAAaJ,gBAAgBK,MAAM,GAAG,GAAG;gBAC/DpB,eAAea;YACjB,OAAO;gBACL,SAAS;gBACT,oBAAoB;gBACpB,uCAAuC;gBACvC,wBAAwB;gBACxB,iEAAiE;gBACjE,MAAML,MAAMO,eAAe,CAAC,EAAE;gBAC9BnB,SAASC,OAAO,GAAGgB;gBACnBN,uBAAuBC;YACzB;QACF,OAAO;;IAGT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 16076, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/dynamic-rendering-utils.ts"],"sourcesContent":["import {\n RenderStage,\n type AdvanceableRenderStage,\n} from './app-render/staged-rendering'\nimport type {\n RequestStore,\n WorkUnitStore,\n} from './app-render/work-unit-async-storage.external'\nimport { workUnitAsyncStorage } from './app-render/work-unit-async-storage.external'\nimport { getServerReact, getClientReact } from './runtime-reacts.external'\n\nexport function isHangingPromiseRejectionError(\n err: unknown\n): err is HangingPromiseRejectionError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === HANGING_PROMISE_REJECTION\n}\n\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'\n\nclass HangingPromiseRejectionError extends Error {\n public readonly digest = HANGING_PROMISE_REJECTION\n\n constructor(\n public readonly route: string,\n public readonly expression: string\n ) {\n super(\n `During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`\n )\n }\n}\n\nconst CLIENT_HOOK_DYNAMIC = 'CLIENT_HOOK_DYNAMIC'\n\nexport class ClientHookDynamicError extends Error {\n public readonly digest = CLIENT_HOOK_DYNAMIC\n\n constructor(route: string, expression: string) {\n super(\n `Route \"${route}\": Next.js encountered URL data \\`${expression}\\` in a Client Component outside of \\`<Suspense>\\`.\\n\\n` +\n `This blocks prerendering because the value is only available at runtime.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Wrap the component in \\`<Suspense fallback={...}>\\` so the hook value streams in after prerendering\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-client-hook`\n )\n }\n}\n\nexport function isClientHookDynamicError(\n err: unknown\n): err is ClientHookDynamicError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === CLIENT_HOOK_DYNAMIC\n}\n\ntype AbortListeners = Array<() => void>\nconst abortListenersBySignal = new WeakMap<AbortSignal, AbortListeners>()\n\n/**\n * Constructs a promise that never resolves, standing in for *dynamic* data:\n * data that is only available during a real dynamic request and hangs in\n * every kind of prerender — `io()`, `connection()`, uncached `fetch()`.\n *\n * This is primarily useful for cacheComponents where we use promise\n * resolution timing to determine which parts of a render can be included in a\n * prerender.\n *\n * Records nothing on the prerender store: the promise's holes are only ever\n * filled by a real dynamic request, so a runtime prefetch response would have\n * the same holes as the static one. If the data source would resolve during a\n * runtime prerender, use `makeRuntimeHangingPromise` instead.\n *\n * @internal\n */\nexport function makeDynamicHangingPromise<T>(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise<T> {\n return makeHangingPromiseWithError(\n signal,\n new HangingPromiseRejectionError(route, expression)\n )\n}\n\nexport function makeUntrackedHangingPromise<T>(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise<T> {\n return makeHangingPromiseWithError(\n signal,\n new HangingPromiseRejectionError(route, expression)\n )\n}\n\n/**\n * Constructs a promise that never resolves, standing in for *runtime* data:\n * data that hangs during a static prerender but is available during a runtime\n * prerender (the kind that backs a runtime prefetch request: request data\n * like cookies and headers is available, but the render is still not a real\n * dynamic request). Examples: cookies, headers, fallback params,\n * searchParams, and cache entries that are excluded only from static\n * prerenders.\n *\n * Creating one of these during a static prerender records on the prerender\n * store that a runtime prefetch would produce more content than the static\n * response (`runtimeDataAccessed`), which the segment prefetch encoding uses\n * to tell the client whether a runtime prefetch request could be skipped.\n *\n * When unsure whether data is dynamic or runtime, prefer this method — the\n * cost of over-recording is a redundant runtime prefetch request; the cost of\n * under-recording is a permanently missing one.\n *\n * `workUnitStore` may be null ONLY when the caller tracks the access itself\n * at observation time instead of creation time. Line truncated
|
||||
{"offset": {"line": 16323, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/params-utils.ts"],"sourcesContent":["import type { OpaqueFallbackRouteParams } from '../request/fallback-params'\nimport type { Params } from '../request/params'\n\nexport function hasNonRootStaticParams(\n params: Params,\n rootParams: Params,\n fallbackParams: OpaqueFallbackRouteParams | null | undefined\n) {\n for (const paramName in params) {\n if (\n !Object.hasOwn(rootParams, paramName) &&\n isStaticParam(paramName, fallbackParams)\n ) {\n return true\n }\n }\n return false\n}\n\nfunction isStaticParam(\n paramName: string,\n fallbackParams: OpaqueFallbackRouteParams | null | undefined\n) {\n // NOTE: Assume that undefined fallback params mean that all of the params are static.\n if (!fallbackParams) return true\n // If the param isn't a fallback param, it must be static.\n return !fallbackParams.has(paramName)\n}\n\nexport function allParamsAreRootParams(\n underlyingParams: Params,\n rootParams: Params\n) {\n for (const paramName in underlyingParams) {\n if (!Object.hasOwn(rootParams, paramName)) {\n return false\n }\n }\n return true\n}\n\nexport function isEmptyParams(params: Params): boolean {\n for (const _paramKey in params) {\n return false\n }\n return true\n}\n\nexport function hasFallbackRouteParams(\n underlyingParams: Params,\n fallbackParams: OpaqueFallbackRouteParams | null | undefined\n): boolean {\n if (fallbackParams) {\n for (let key in underlyingParams) {\n if (fallbackParams.has(key)) {\n return true\n }\n }\n }\n return false\n}\n"],"names":["hasNonRootStaticParams","params","rootParams","fallbackParams","paramName","Object","hasOwn","isStaticParam","has","allParamsAreRootParams","underlyingParams","isEmptyParams","_paramKey","hasFallbackRouteParams","key"],"mappings":";;;;;;;;;;AAGO,SAASA,uBACdC,MAAc,EACdC,UAAkB,EAClBC,cAA4D;IAE5D,IAAK,MAAMC,aAAaH,OAAQ;QAC9B,IACE,CAACI,OAAOC,MAAM,CAACJ,YAAYE,cAC3BG,cAAcH,WAAWD,iBACzB;YACA,OAAO;QACT;IACF;IACA,OAAO;AACT;AAEA,SAASI,cACPH,SAAiB,EACjBD,cAA4D;IAE5D,sFAAsF;IACtF,IAAI,CAACA,gBAAgB,OAAO;IAC5B,0DAA0D;IAC1D,OAAO,CAACA,eAAeK,GAAG,CAACJ;AAC7B;AAEO,SAASK,uBACdC,gBAAwB,EACxBR,UAAkB;IAElB,IAAK,MAAME,aAAaM,iBAAkB;QACxC,IAAI,CAACL,OAAOC,MAAM,CAACJ,YAAYE,YAAY;YACzC,OAAO;QACT;IACF;IACA,OAAO;AACT;AAEO,SAASO,cAAcV,MAAc;IAC1C,IAAK,MAAMW,aAAaX,OAAQ;QAC9B,OAAO;IACT;IACA,OAAO;AACT;AAEO,SAASY,uBACdH,gBAAwB,EACxBP,cAA4D;IAE5D,IAAIA,gBAAgB;QAClB,IAAK,IAAIW,OAAOJ,iBAAkB;YAChC,IAAIP,eAAeK,GAAG,CAACM,MAAM;gBAC3B,OAAO;YACT;QACF;IACF;IACA,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 16375, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/router-utils/is-postpone.ts"],"sourcesContent":["const REACT_POSTPONE_TYPE: symbol = Symbol.for('react.postpone')\n\nexport function isPostpone(error: any): boolean {\n return (\n typeof error === 'object' &&\n error !== null &&\n error.$$typeof === REACT_POSTPONE_TYPE\n )\n}\n"],"names":["REACT_POSTPONE_TYPE","Symbol","for","isPostpone","error","$$typeof"],"mappings":";;;;AAAA,MAAMA,sBAA8BC,OAAOC,GAAG,CAAC;AAExC,SAASC,WAAWC,KAAU;IACnC,OACE,OAAOA,UAAU,YACjBA,UAAU,QACVA,MAAMC,QAAQ,KAAKL;AAEvB","ignoreList":[0]}},
|
||||
{"offset": {"line": 16387, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/params.ts"],"sourcesContent":["import {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport type { OpaqueFallbackRouteParams } from './fallback-params'\nimport type { VaryParamsAccumulator } from '../app-render/vary-params'\nimport {\n createVaryingParams,\n getMetadataVaryParamsAccumulator,\n} from '../app-render/vary-params'\n\nimport { ReflectAdapter } from '../web/spec-extension/adapters/reflect'\nimport {\n throwToInterruptStaticGeneration,\n postponeWithTracking,\n} from '../app-render/dynamic-rendering'\n\nimport {\n workUnitAsyncStorage,\n type PrerenderStorePPR,\n type PrerenderStoreLegacy,\n type StaticPrerenderStoreModern,\n type StaticPrerenderStore,\n throwInvariantForMissingStore,\n type PrerenderStoreModernRuntime,\n type RequestStore,\n type ValidationStoreClient,\n} from '../app-render/work-unit-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport {\n makeDevtoolsIOAwarePromise,\n makeFallbackParamsHangingPromise,\n makePromiseFromTrigger,\n trackFallbackParamsAccessed,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport { dynamicAccessAsyncStorage } from '../app-render/dynamic-access-async-storage.external'\nimport {\n isEmptyParams,\n hasFallbackRouteParams,\n allParamsAreRootParams,\n} from '../lib/params-utils'\n\nexport type ParamValue = string | Array<string> | undefined\nexport type Params = Record<string, ParamValue>\n\nexport function createParamsFromClient(\n underlyingParams: Params\n): Promise<Params> {\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Expected workStore to be initialized')\n }\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n // Client params don't need additional vary tracking because by the\n // time they reach the client, the access would have already been\n // tracked by the server.\n const varyParamsAccumulator = null\n return createStaticPrerenderParams(\n underlyingParams,\n null,\n workStore,\n workUnitStore,\n varyParamsAccumulator\n )\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw new InvariantError(\n 'createParamsFromClient should not be called in cache contexts.'\n )\n case 'prerender-runtime':\n throw new InvariantError(\n 'createParamsFromClient should not be called in a runtime prerender.'\n )\n case 'generate-static-params':\n throw new InvariantError(\n 'createParamsFromClient should not be called inside generateStaticParams.'\n )\n case 'validation-client': {\n if (workUnitStore.validationSamples) {\n return createClientParamsInInstantValidation(\n underlyingParams,\n workStore,\n workUnitStore.validationSamples\n )\n }\n return makeUntrackedParams(underlyingParams)\n }\n case 'request': {\n if (workUnitStore.validationSamples) {\n return createClientParamsInInstantValidation(\n underlyingParams,\n workStore,\n workUnitStore.validationSamples\n )\n }\n if (process.env.NODE_ENV === 'development') {\n const fallbackParams = workUnitStore.fallbackParams\n const userspaceParams = underlyingParams\n return createRenderParamsInDev(\n underlyingParams,\n userspaceParams,\n fallbackParams,\n workStore,\n workUnitStore\n )\n } else {\n return createRenderParamsInProd(underlyingParams)\n }\n }\n default:\n workUnitStore satisfies never\n }\n }\n throwInvariantForMissingStore()\n}\n\n// generateMetadata always runs in RSC context so it is equivalent to a Server Page Component\nexport type CreateServerParamsForMetadata = typeof createServerParamsForMetadata\nexport function createServerParamsForMetadata(\n underlyingParams: Params,\n optionalCatchAllParamName: string | null\n): Promise<Params> {\n const metadataVaryParamsAccumulator = getMetadataVaryParamsAccumulator()\n return createServerParamsForServerSegment(\n underlyingParams,\n optionalCatchAllParamName,\n metadataVaryParamsAccumulator\n )\n}\n\n// Line truncated
|
||||
{"offset": {"line": 17014, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/search-params.ts"],"sourcesContent":["import {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport type { VaryParamsAccumulator } from '../app-render/vary-params'\nimport {\n createVaryingSearchParams,\n getMetadataVaryParamsAccumulator,\n} from '../app-render/vary-params'\n\nimport { ReflectAdapter } from '../web/spec-extension/adapters/reflect'\nimport {\n throwToInterruptStaticGeneration,\n postponeWithTracking,\n annotateDynamicAccess,\n} from '../app-render/dynamic-rendering'\nimport { dynamicAccessAsyncStorage } from '../app-render/dynamic-access-async-storage.external'\n\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type PrerenderStoreModern,\n type PrerenderStoreModernRuntime,\n type StaticPrerenderStore,\n throwInvariantForMissingStore,\n type RequestStore,\n type ValidationStoreClient,\n} from '../app-render/work-unit-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n makeDevtoolsIOAwarePromise,\n makeRuntimeHangingPromise,\n makePromiseFromTrigger,\n trackRuntimeDataAccessed,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport {\n describeStringPropertyAccess,\n describeHasCheckingStringProperty,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport {\n throwWithStaticGenerationBailoutErrorWithDynamicError,\n throwForSearchParamsAccessInUseCache,\n} from './utils'\n\nexport type SearchParams = { [key: string]: string | string[] | undefined }\n\nexport function createSearchParamsFromClient(\n underlyingSearchParams: SearchParams\n): Promise<SearchParams> {\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Expected workStore to be initialized')\n }\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createStaticPrerenderSearchParams(workStore, workUnitStore)\n case 'prerender-runtime':\n throw new InvariantError(\n 'createSearchParamsFromClient should not be called in a runtime prerender.'\n )\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw new InvariantError(\n 'createSearchParamsFromClient should not be called in cache contexts.'\n )\n case 'generate-static-params':\n throw new InvariantError(\n 'createSearchParamsFromClient should not be called inside generateStaticParams.'\n )\n case 'validation-client': {\n if (workUnitStore.validationSamples) {\n return createClientSearchParamsInValidation(\n underlyingSearchParams,\n workStore,\n workUnitStore\n )\n }\n return makeUntrackedSearchParams(underlyingSearchParams)\n }\n case 'request':\n return createRenderSearchParams(\n underlyingSearchParams,\n workStore,\n workUnitStore\n )\n default:\n workUnitStore satisfies never\n }\n }\n throwInvariantForMissingStore()\n}\n\n// generateMetadata always runs in RSC context so it is equivalent to a Server Page Component\nexport function createServerSearchParamsForMetadata(\n underlyingSearchParams: SearchParams\n): Promise<SearchParams> {\n const metadataVaryParamsAccumulator = getMetadataVaryParamsAccumulator()\n return createServerSearchParamsForServerPage(\n underlyingSearchParams,\n metadataVaryParamsAccumulator\n )\n}\n\nexport function createServerSearchParamsForServerPage(\n underlyingSearchParams: SearchParams,\n varyParamsAccumulator: VaryParamsAccumulator | null\n): Promise<SearchParams> {\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Expected workStore to be initialized')\n }\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createStaticPrerenderSearchParams(workStore, workUnitStore)\n case 'validation-client':\n throw new InvariantError(\n 'createServerSearchParamsForServerPage should not be called in a client validation.'\n )\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw new InvariantError(\n 'createServerSearchParamsForServerPage should not be called in cache contexts.Line truncated
|
||||
{"offset": {"line": 17592, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type { WorkUnitStore } from '../app-render/work-unit-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \\`searchParams\\` inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \\`searchParams\\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestApiAllowedInCurrentPhase(\n workUnitStore: WorkUnitStore\n): boolean {\n switch (workUnitStore.phase) {\n case 'action':\n case 'render': {\n // The request is still in progress. The API may be disallowed for other reasons,\n // but not because of phase.\n return true\n }\n case 'after': {\n // The request has finished.\n\n // If we're in a Route Handler or a Server Action,\n // request APIs can be called everywhere, even in after().\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore && (actionStore.isAppRoute || actionStore.isAction)) {\n return true\n }\n\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n if (afterTaskStore) {\n // We're in an `after` callback. Request APIs are callable if\n // the `after()` call happened in an action phase:\n // - in a Route Handler\n // - in a Server Action's body (but not the render after)\n //\n // TODO(after): Is it even possible to have `phase === 'action'` but no `actionStore`?\n // We should revisit this setup and simplify this.\n return afterTaskStore.rootTaskSpawnPhase === 'action'\n }\n\n // Otherwise, we must be in a page, in the `after` phase.\n // We don't allow calling request APIs here because we'd miss\n // them during prerendering and wouldn't know that the page is dynamic.\n return false\n }\n }\n}\n"],"names":["StaticGenBailoutError","actionAsyncStorage","afterTaskAsyncStorage","throwWithStaticGenerationBailoutErrorWithDynamicError","route","expression","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestApiAllowedInCurrentPhase","workUnitStore","phase","actionStore","getStore","isAppRoute","isAction","afterTaskStore","rootTaskSpawnPhase"],"mappings":";;;;;;;;AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;AACzF,SAASC,kBAAkB,QAAQ,8CAA6C;AAChF,SAASC,qBAAqB,QAAQ,kDAAiD;;;;AAIhF,SAASC,sDACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIL,uNAAAA,CACR,CAAC,MAAM,EAAEI,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASC,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUH,KAAK,CAAC,2XAA2X,CAAC,GADzY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAM,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEO,SAASI,kCACdC,aAA4B;IAE5B,OAAQA,cAAcC,KAAK;QACzB,KAAK;QACL,KAAK;YAAU;gBACb,iFAAiF;gBACjF,4BAA4B;gBAC5B,OAAO;YACT;QACA,KAAK;YAAS;gBACZ,4BAA4B;gBAE5B,kDAAkD;gBAClD,0DAA0D;gBAC1D,MAAMC,cAAcf,6RAAAA,CAAmBgB,QAAQ;gBAC/C,IAAID,eAAgBA,CAAAA,YAAYE,UAAU,IAAIF,YAAYG,QAAO,GAAI;oBACnE,OAAO;gBACT;gBAEA,MAAMC,iBAAiBlB,8SAAAA,CAAsBe,QAAQ;gBACrD,IAAIG,gBAAgB;oBAClB,6DAA6D;oBAC7D,kDAAkD;oBAClD,uBAAuB;oBACvB,yDAAyD;oBACzD,EAAE;oBACF,sFAAsF;oBACtF,kDAAkD;oBAClD,OAAOA,eAAeC,kBAAkB,KAAK;gBAC/C;gBAEA,yDAAyD;gBACzD,6DAA6D;gBAC7D,uEAAuE;gBACvE,OAAO;YACT;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 17663, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/headers.ts"],"sourcesContent":["import type { IncomingHttpHeaders } from 'http'\n\nimport { ReflectAdapter } from './reflect'\n\n/**\n * @internal\n */\nexport class ReadonlyHeadersError extends Error {\n constructor() {\n super(\n 'Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'\n )\n }\n\n public static callable() {\n throw new ReadonlyHeadersError()\n }\n}\n\nexport type ReadonlyHeaders = Headers & {\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n append(...args: any[]): void\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n set(...args: any[]): void\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n delete(...args: any[]): void\n}\nexport class HeadersAdapter extends Headers {\n private readonly headers: IncomingHttpHeaders\n\n constructor(headers: IncomingHttpHeaders) {\n // We've already overridden the methods that would be called, so we're just\n // calling the super constructor to ensure that the instanceof check works.\n super()\n\n this.headers = new Proxy(headers, {\n get(target, prop, receiver) {\n // Because this is just an object, we expect that all \"get\" operations\n // are for properties. If it's a \"get\" for a symbol, we'll just return\n // the symbol.\n if (typeof prop === 'symbol') {\n return ReflectAdapter.get(target, prop, receiver)\n }\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return undefined.\n if (typeof original === 'undefined') return\n\n // If the original casing exists, return the value.\n return ReflectAdapter.get(target, original, receiver)\n },\n set(target, prop, value, receiver) {\n if (typeof prop === 'symbol') {\n return ReflectAdapter.set(target, prop, value, receiver)\n }\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, use the prop as the key.\n return ReflectAdapter.set(target, original ?? prop, value, receiver)\n },\n has(target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop)\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return false.\n if (typeof original === 'undefined') return false\n\n // If the original casing exists, return true.\n return ReflectAdapter.has(target, original)\n },\n deleteProperty(target, prop) {\n if (typeof prop === 'symbol')\n return ReflectAdapter.deleteProperty(target, prop)\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return true.\n if (typeof original === 'undefined') return true\n\n // If the original casing exists, delete the property.\n return ReflectAdapter.deleteProperty(target, original)\n },\n })\n }\n\n /**\n * Seals a Headers instance to prevent modification by throwing an error when\n * any mutating method is called.\n */\n public static seal(headers: Headers): ReadonlyHeaders {\n return new Proxy<ReadonlyHeaders>(headers, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'append':\n case 'delete':\n Line truncated
|
||||
{"offset": {"line": 17857, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/reflect.ts"],"sourcesContent":["export class ReflectAdapter {\n static get<T extends object>(\n target: T,\n prop: string | symbol,\n receiver: unknown\n ): any {\n const value = Reflect.get(target, prop, receiver)\n if (typeof value === 'function') {\n return value.bind(target)\n }\n\n return value\n }\n\n static set<T extends object>(\n target: T,\n prop: string | symbol,\n value: any,\n receiver: any\n ): boolean {\n return Reflect.set(target, prop, value, receiver)\n }\n\n static has<T extends object>(target: T, prop: string | symbol): boolean {\n return Reflect.has(target, prop)\n }\n\n static deleteProperty<T extends object>(\n target: T,\n prop: string | symbol\n ): boolean {\n return Reflect.deleteProperty(target, prop)\n }\n}\n"],"names":["ReflectAdapter","get","target","prop","receiver","value","Reflect","bind","set","has","deleteProperty"],"mappings":";;;;AAAO,MAAMA;IACX,OAAOC,IACLC,MAAS,EACTC,IAAqB,EACrBC,QAAiB,EACZ;QACL,MAAMC,QAAQC,QAAQL,GAAG,CAACC,QAAQC,MAAMC;QACxC,IAAI,OAAOC,UAAU,YAAY;YAC/B,OAAOA,MAAME,IAAI,CAACL;QACpB;QAEA,OAAOG;IACT;IAEA,OAAOG,IACLN,MAAS,EACTC,IAAqB,EACrBE,KAAU,EACVD,QAAa,EACJ;QACT,OAAOE,QAAQE,GAAG,CAACN,QAAQC,MAAME,OAAOD;IAC1C;IAEA,OAAOK,IAAsBP,MAAS,EAAEC,IAAqB,EAAW;QACtE,OAAOG,QAAQG,GAAG,CAACP,QAAQC;IAC7B;IAEA,OAAOO,eACLR,MAAS,EACTC,IAAqB,EACZ;QACT,OAAOG,QAAQI,cAAc,CAACR,QAAQC;IACxC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 17883, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/request-cookies.ts"],"sourcesContent":["import { RequestCookies } from '../cookies'\n\nimport { ResponseCookies } from '../cookies'\nimport { ReflectAdapter } from './reflect'\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external'\nimport type { RequestStore } from '../../../app-render/work-unit-async-storage.external'\nimport { ActionDidRevalidateStaticAndDynamic } from '../../../../shared/lib/action-revalidation-kind'\n\n/**\n * @internal\n */\nexport class ReadonlyRequestCookiesError extends Error {\n constructor() {\n super(\n 'Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'\n )\n }\n\n public static callable() {\n throw new ReadonlyRequestCookiesError()\n }\n}\n\n// We use this to type some APIs but we don't construct instances directly\nexport type { ResponseCookies }\n\n// The `cookies()` API is a mix of request and response cookies. For `.get()` methods,\n// we want to return the request cookie if it exists. For mutative methods like `.set()`,\n// we want to return the response cookie.\nexport type ReadonlyRequestCookies = Omit<\n RequestCookies,\n 'set' | 'clear' | 'delete'\n> &\n Pick<ResponseCookies, 'set' | 'delete'>\n\nexport class RequestCookiesAdapter {\n public static seal(cookies: RequestCookies): ReadonlyRequestCookies {\n return new Proxy(cookies as any, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'clear':\n case 'delete':\n case 'set':\n return ReadonlyRequestCookiesError.callable\n default:\n return ReflectAdapter.get(target, prop, receiver)\n }\n },\n })\n }\n\n /**\n * @param cookies\n * @returns A fresh object identity backed by the original value\n */\n public static fresh(cookies: ReadonlyRequestCookies): ReadonlyRequestCookies {\n return new Proxy(cookies, {\n get(target, prop, receiver) {\n return ReflectAdapter.get(target, prop, receiver)\n },\n })\n }\n}\n\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies')\n\nexport function getModifiedCookieValues(\n cookies: ResponseCookies\n): ResponseCookie[] {\n const modified: ResponseCookie[] | undefined = (cookies as unknown as any)[\n SYMBOL_MODIFY_COOKIE_VALUES\n ]\n if (!modified || !Array.isArray(modified) || modified.length === 0) {\n return []\n }\n\n return modified\n}\n\ntype SetCookieArgs =\n | [key: string, value: string, cookie?: Partial<ResponseCookie>]\n | [options: ResponseCookie]\n\nexport function appendMutableCookies(\n headers: Headers,\n mutableCookies: ResponseCookies\n): boolean {\n const modifiedCookieValues = getModifiedCookieValues(mutableCookies)\n if (modifiedCookieValues.length === 0) {\n return false\n }\n\n // Return a new response that extends the response with\n // the modified cookies as fallbacks. `res` cookies\n // will still take precedence.\n const resCookies = new ResponseCookies(headers)\n const returnedCookies = resCookies.getAll()\n\n // Set the modified cookies as fallbacks.\n for (const cookie of modifiedCookieValues) {\n resCookies.set(cookie)\n }\n\n // Set the original cookies as the final values.\n for (const cookie of returnedCookies) {\n resCookies.set(cookie)\n }\n\n return true\n}\n\ntype ResponseCookie = NonNullable<\n ReturnType<InstanceType<typeof ResponseCookies>['get']>\n>\n\nexport class MutableRequestCookiesAdapter {\n public static wrap(\n cookies: RequestCookies,\n onUpdateCookies?: (cookies: string[]) => void\n ): ResponseCookies {\n const responseCookies = new ResponseCookies(new Headers())\n for (const cookie of cookies.getAll()) {\n responseCookies.set(cookie)\n }\n\n let modifiedValues: ResponseCookie[] = []\n const modifiedCookies = new Set<string>()\n const updateResponseCookies = () => {\n // TODO-APP: change method of getting workStore\n const workStore = workAsyncStorage.getStore()\n if (workStore) {\n workStore.pathWasRevalidated = ActionDidRevalidateStaticAndDynamic\n }\n\n const allCookies = responseCookies.getAll()\n modifiedValues = allCookies.filter((c) => modifiedCookies.has(c.name))\n if (onUpdateCookies) {\n const serializedCookies: string[] = []\n for (const cookie of modifiedValues) {\n const tempCookies = new ResponseCookies(new Headers())\n tempCookies.set(cookie)\n serializedCookies.push(tempCookies.toString())\n }\n\n onUpdateCookies(serializedCookies)\n }\n }\n\n const wrappedCookies = new Proxy(responseCookies, {\n get(target, prop, receiver) {\n switch (prop) {\n // A special symbol tLine truncated
|
||||
{"offset": {"line": 18089, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/cookies.ts"],"sourcesContent":["export {\n RequestCookies,\n ResponseCookies,\n stringifyCookie,\n} from 'next/dist/compiled/@edge-runtime/cookies'\n"],"names":["RequestCookies","ResponseCookies","stringifyCookie"],"mappings":";AAAA,SACEA,cAAc,EACdC,eAAe,EACfC,eAAe,QACV,2CAA0C","ignoreList":[0]}},
|
||||
{"offset": {"line": 18096, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/action-revalidation-kind.ts"],"sourcesContent":["export type ActionRevalidationKind = 0 | 1 | 2\n\nexport const ActionDidNotRevalidate = 0\nexport const ActionDidRevalidateStaticAndDynamic = 1\nexport const ActionDidRevalidateDynamicOnly = 2\n"],"names":["ActionDidNotRevalidate","ActionDidRevalidateStaticAndDynamic","ActionDidRevalidateDynamicOnly"],"mappings":";;;;;;;;AAEO,MAAMA,yBAAyB,EAAC;AAChC,MAAMC,sCAAsC,EAAC;AAC7C,MAAMC,iCAAiC,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 18111, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/app-router-types.ts"],"sourcesContent":["/**\n * App Router types - Client-safe types for the Next.js App Router\n *\n * This file contains type definitions that can be safely imported\n * by both client-side and server-side code without circular dependencies.\n */\n\nimport type React from 'react'\n\nexport type LoadingModuleData =\n | [React.JSX.Element, React.ReactNode, React.ReactNode]\n | null\n\nimport type { VaryParamsIterable } from './segment-cache/vary-params-decoding'\n\n/** viewport metadata node */\nexport type HeadData = React.ReactNode\n\n/**\n * Cache node used in app-router / layout-router.\n */\n\nexport type CacheNode = {\n /**\n * When rsc is not null, it represents the RSC data for the\n * corresponding segment.\n *\n * `null` is a valid React Node but because segment data is always a\n * <LayoutRouter> component, we can use `null` to represent empty. When it is\n * null, it represents missing data, and rendering should suspend.\n */\n rsc: React.ReactNode\n\n /**\n * Represents a static version of the segment that can be shown immediately,\n * and may or may not contain dynamic holes. It's prefetched before a\n * navigation occurs.\n *\n * During rendering, we will choose whether to render `rsc` or `prefetchRsc`\n * with `useDeferredValue`. As with the `rsc` field, a value of `null` means\n * no value was provided. In this case, the LayoutRouter will go straight to\n * rendering the `rsc` value; if that one is also missing, it will suspend and\n * trigger a lazy fetch.\n */\n prefetchRsc: React.ReactNode\n\n prefetchHead: HeadData | null\n\n head: HeadData\n\n slots: Record<string, CacheNode> | null\n\n /**\n * A shared mutable ref that tracks whether this segment should be scrolled\n * to. All new segments created during a single navigation share the same\n * ref. When any segment's scroll handler fires, it sets `current` to\n * `false` so no other segment scrolls for the same navigation.\n *\n * `null` means this segment is not a scroll target (e.g., a reused shared\n * layout segment).\n */\n scrollRef: ScrollRef | null\n\n /**\n * Globally-unique identifier minted from a monotonic counter when the\n * CacheNode is freshly created. Surfaced to user code as a string via\n * `useRouter().bfcacheId` and intended to be used as a React `key` to\n * opt out of Activity-based state preservation on fresh navigations.\n *\n * Preserved when the CacheNode is reused (shared layouts, refresh,\n * search/hash-only navigations) or restored from the BFCache during a\n * back/forward navigation.\n */\n bfcacheId: number\n}\n\n/**\n * A mutable ref shared across all new segments created during a single\n * navigation. Used to ensure that only one segment scrolls per navigation.\n */\nexport type ScrollRef = { current: boolean }\n\nexport type DynamicParamTypes =\n | 'catchall'\n | 'catchall-intercepted-(..)(..)'\n | 'catchall-intercepted-(.)'\n | 'catchall-intercepted-(..)'\n | 'catchall-intercepted-(...)'\n | 'optional-catchall'\n | 'dynamic'\n | 'dynamic-intercepted-(..)(..)'\n | 'dynamic-intercepted-(.)'\n | 'dynamic-intercepted-(..)'\n | 'dynamic-intercepted-(...)'\n\nexport type DynamicParamTypesShort =\n | 'c'\n | 'ci(..)(..)'\n | 'ci(.)'\n | 'ci(..)'\n | 'ci(...)'\n | 'oc'\n | 'd'\n | 'di(..)(..)'\n | 'di(.)'\n | 'di(..)'\n | 'di(...)'\n\n// The tuple form of a segment, used for dynamic route params\nexport type DynamicSegmentTuple = [\n // Param name\n paramName: string,\n // Param cache key (almost the same as the value, but arrays are\n // concatenated into strings)\n // TODO: We should change this to just be the value. Currently we convert\n // it back to a value when passing to useParams. It only needs to be\n // a string when converted to a a cache key, but that doesn't mean we\n // need to store it as that representation.\n paramCacheKey: string,\n // Dynamic param type\n dynamicParamType: DynamicParamTypesShort,\n // Static sibling segments at the same URL level. Used by the client\n // router to determine if a prefetch can be reused when navigating to\n // a static sibling of a dynamic route. For example, if the route is\n // /products/[id] and there's also /products/sale, then staticSiblings\n // would be ['sale']. null means the siblings are unknown (e.g. in\n // webpack dev mode).\n staticSiblings: readonly string[] | null,\n]\n\nexport type Segment = string | DynamicSegmentTuple\n\n/**\n * Router state\n */\nexport type FlightRouterState = [\n segment: Segment,\n parallelRoutes: { [parallelRouterKey: string]: FlightRouterState },\n refreshState?: CompressedRefreshState | null,\n /**\n * - \"refetch\" is used during a request to inform the server where rendering\n * should start from.\n *\n * - \"insidLine truncated
|
||||
{"offset": {"line": 18252, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/deployment-id.ts"],"sourcesContent":["let deploymentId: string | undefined\n\nif (typeof window !== 'undefined') {\n deploymentId = document.documentElement.dataset.dplId\n // Immediately remove the attribute to prevent hydration errors (the dplId was inserted into the\n // HTML only), React isn't aware of it at all.\n delete document.documentElement.dataset.dplId\n} else {\n // Client side: replaced with globalThis.NEXT_DEPLOYMENT_ID\n // Server side: left as is or replaced with a string or replaced with false\n deploymentId = process.env.NEXT_DEPLOYMENT_ID || undefined\n}\n\nexport function getDeploymentId(): string | undefined {\n return deploymentId\n}\n\nexport function getDeploymentIdQuery(ampersand = false): string {\n let id = getDeploymentId()\n if (id) {\n return `${ampersand ? '&' : '?'}dpl=${id}`\n }\n return ''\n}\n\nexport function getAssetToken(): string | undefined {\n return process.env.NEXT_SUPPORTS_IMMUTABLE_ASSETS\n ? undefined\n : process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getAssetTokenQuery(ampersand = false): string {\n let id = getAssetToken()\n if (id) {\n return `${ampersand ? '&' : '?'}dpl=${id}`\n }\n return ''\n}\n"],"names":["deploymentId","window","document","documentElement","dataset","dplId","process","env","NEXT_DEPLOYMENT_ID","undefined","getDeploymentId","getDeploymentIdQuery","ampersand","id","getAssetToken","NEXT_SUPPORTS_IMMUTABLE_ASSETS","getAssetTokenQuery"],"mappings":";;;;;;;;;;AAAA,IAAIA;AAEJ,IAAI,OAAOC,WAAW,aAAa;;KAK5B;IACL,2DAA2D;IAC3D,2EAA2E;IAC3ED,eAAeM,QAAQC,GAAG,CAACC,kBAAkB,aAAIC;AACnD;AAEO,SAASC;IACd,OAAOV;AACT;AAEO,SAASW,qBAAqBC,YAAY,KAAK;IACpD,IAAIC,KAAKH;IACT,IAAIG,IAAI;QACN,OAAO,GAAGD,YAAY,MAAM,IAAI,IAAI,EAAEC,IAAI;IAC5C;IACA,OAAO;AACT;AAEO,SAASC;IACd,OAAOR,QAAQC,GAAG,CAACQ,0BACfN,IAD6C,QAE7CH,QAAQC,GAAG,CAACC,kBAAkB;AACpC;AAEO,SAASQ,mBAAmBJ,YAAY,KAAK;IAClD,IAAIC,KAAKC;IACT,IAAID,IAAI;;IAGR,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 18293, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/hash.ts"],"sourcesContent":["// http://www.cse.yorku.ca/~oz/hash.html\n// More specifically, 32-bit hash via djbxor\n// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)\n// This is due to number type differences between rust for turbopack to js number types,\n// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching\n// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation\n// as can gaurantee determinstic output from 32bit hash.\nexport function djb2Hash(str: string) {\n let hash = 5381\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = ((hash << 5) + hash + char) & 0xffffffff\n }\n return hash >>> 0\n}\n\nexport function hexHash(str: string) {\n return djb2Hash(str).toString(36).slice(0, 5)\n}\n"],"names":["djb2Hash","str","hash","i","length","char","charCodeAt","hexHash","toString","slice"],"mappings":"AAAA,wCAAwC;AACxC,4CAA4C;AAC5C,iHAAiH;AACjH,wFAAwF;AACxF,gGAAgG;AAChG,wHAAwH;AACxH,wDAAwD;;;;;;;AACjD,SAASA,SAASC,GAAW;IAClC,IAAIC,OAAO;IACX,IAAK,IAAIC,IAAI,GAAGA,IAAIF,IAAIG,MAAM,EAAED,IAAK;QACnC,MAAME,OAAOJ,IAAIK,UAAU,CAACH;QAC5BD,OAASA,CAAAA,QAAQ,CAAA,IAAKA,OAAOG,OAAQ;IACvC;IACA,OAAOH,SAAS;AAClB;AAEO,SAASK,QAAQN,GAAW;IACjC,OAAOD,SAASC,KAAKO,QAAQ,CAAC,IAAIC,KAAK,CAAC,GAAG;AAC7C","ignoreList":[0]}},
|
||||
{"offset": {"line": 18321, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/instant-messages.ts"],"sourcesContent":["export function createUnrenderedSegmentError(\n route: string,\n missingFiles: readonly string[]\n): Error {\n let message = `Route \"${route}\": Could not validate that a segment in your UI has instant navigation.`\n if (missingFiles.length > 0) {\n const label =\n missingFiles.length === 1 ? 'Dropped segment' : 'Dropped segments'\n message +=\n `\\n\\nThis segment was dropped from rendering. Issues that would prevent instant navigation will go undetected.` +\n `\\n\\n${label}:\\n${missingFiles.map((p) => ` ${p}`).join('\\n')}` +\n `\\n\\nWays to fix this:` +\n `\\n - [render] Render the dropped segment` +\n `\\n - [ignore] Set \\`export const instant = false\\` to opt the dropped segment out of instant-navigation validation` +\n `\\n\\nLearn more: https://nextjs.org/docs/messages/instant-unrendered-segment`\n }\n return new Error(message)\n}\n\nexport function createLinkPrefetchPartialError(pathname: string): Error {\n return new Error(\n `Next.js encountered dynamic data during prefetching for \"${pathname}\".\\n\\n` +\n `This will lead to slower, more expensive prefetches.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [upgrade] Opt into Partial Prefetching by exporting \\`const prefetch = 'partial'\\` from the page or layout, or by setting \\`partialPrefetching: true\\` in next.config to opt the whole app in\\n` +\n ` - [disable] Remove \\`prefetch={true}\\` from the <Link> to use the default prefetch\\n` +\n ` - [ignore] Set \\`export const instant = false\\` to opt the route out of instant-navigation validation\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/instant-link-prefetch-partial`\n )\n}\n"],"names":["createUnrenderedSegmentError","route","missingFiles","message","length","label","map","p","join","Error","createLinkPrefetchPartialError","pathname"],"mappings":";;;;;;AAAO,SAASA,6BACdC,KAAa,EACbC,YAA+B;IAE/B,IAAIC,UAAU,CAAC,OAAO,EAAEF,MAAM,uEAAuE,CAAC;IACtG,IAAIC,aAAaE,MAAM,GAAG,GAAG;QAC3B,MAAMC,QACJH,aAAaE,MAAM,KAAK,IAAI,oBAAoB;QAClDD,WACE,CAAC,6GAA6G,CAAC,GAC/G,CAAC,IAAI,EAAEE,MAAM,GAAG,EAAEH,aAAaI,GAAG,CAAC,CAACC,IAAM,CAAC,EAAE,EAAEA,GAAG,EAAEC,IAAI,CAAC,OAAO,GAChE,CAAC,qBAAqB,CAAC,GACvB,CAAC,yCAAyC,CAAC,GAC3C,CAAC,mHAAmH,CAAC,GACrH,CAAC,2EAA2E,CAAC;IACjF;IACA,OAAO,OAAA,cAAkB,CAAlB,IAAIC,MAAMN,UAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAiB;AAC1B;AAEO,SAASO,+BAA+BC,QAAgB;IAC7D,OAAO,OAAA,cAQN,CARM,IAAIF,MACT,CAAC,yDAAyD,EAAEE,SAAS,MAAM,CAAC,GAC1E,CAAC,wDAAwD,CAAC,GAC1D,CAAC,mBAAmB,CAAC,GACrB,CAAC,mMAAmM,CAAC,GACrM,CAAC,sFAAsF,CAAC,GACxF,CAAC,2GAA2G,CAAC,GAC7G,CAAC,0EAA0E,CAAC,GAPzE,qBAAA;eAAA;oBAAA;sBAAA;IAQP;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 18350, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":";;;;AAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACH,CAAC,WAAW,EAAED,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,IAAI,0BAA0B,CAAC,EACzFC;QAFF,OAAA,cAGC,CAHD,IAGC,EAHD,qBAAA;mBAAA;wBAAA;0BAAA;QAGA;QACA,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 18369, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD;;;;AAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0]}},
|
||||
{"offset": {"line": 18385, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":";;;;;;AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAGhB,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAC,CAAC,mCAAmC,EAAEA,QAAQ,GAAA,IAAA,CAD1BA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAGO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAE,GAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 18408, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD;;;;AAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAO,CAAC,CAAC,EAAEA,MAAM;AACjD","ignoreList":[0]}},
|
||||
{"offset": {"line": 18422, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/promise-with-resolvers.ts"],"sourcesContent":["export function createPromiseWithResolvers<T>(): PromiseWithResolvers<T> {\n // Shim of Stage 4 Promise.withResolvers proposal\n let resolve: (value: T | PromiseLike<T>) => void\n let reject: (reason: any) => void\n const promise = new Promise<T>((res, rej) => {\n resolve = res\n reject = rej\n })\n return { resolve: resolve!, reject: reject!, promise }\n}\n"],"names":["createPromiseWithResolvers","resolve","reject","promise","Promise","res","rej"],"mappings":";;;;AAAO,SAASA;IACd,iDAAiD;IACjD,IAAIC;IACJ,IAAIC;IACJ,MAAMC,UAAU,IAAIC,QAAW,CAACC,KAAKC;QACnCL,UAAUI;QACVH,SAASI;IACX;IACA,OAAO;QAAEL,SAASA;QAAUC,QAAQA;QAASC;IAAQ;AACvD","ignoreList":[0]}},
|
||||
{"offset": {"line": 18444, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Comparator for sorting app paths so that parallel slot paths (containing\n * `/@`) come before the children/root page path. This ensures the last item\n * is always the children page, which is what `renderPageComponent` reads via\n * `appPaths[appPaths.length - 1]`.\n *\n * Without this, route group prefixes like `(group)` (char code 0x28) sort\n * before `@` (0x40), causing the children page to sort first instead of last\n * and leading to a manifest mismatch / 404 in webpack dev mode.\n */\nexport function compareAppPaths(a: string, b: string): number {\n const aHasSlot = a.includes('/@')\n const bHasSlot = b.includes('/@')\n if (aHasSlot && !bHasSlot) return -1\n if (!aHasSlot && bHasSlot) return 1\n return a.localeCompare(b)\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["ensureLeadingSlash","isGroupSegment","normalizeAppPath","route","split","reduce","pathname","segment","index","segments","length","compareAppPaths","a","b","aHasSlot","includes","bHasSlot","localeCompare","normalizeRscURL","url","replace"],"mappings":";;;;;;;;AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;;;AAqBvC,SAASC,iBAAiBC,KAAa;IAC5C,WAAOH,wNAAAA,EACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,QAAIL,iLAAAA,EAAeM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAM,KACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAO,GAAGA,SAAS,CAAC,EAAEC,SAAS;IACjC,GAAG;AAEP;AAYO,SAASI,gBAAgBC,CAAS,EAAEC,CAAS;IAClD,MAAMC,WAAWF,EAAEG,QAAQ,CAAC;IAC5B,MAAMC,WAAWH,EAAEE,QAAQ,CAAC;IAC5B,IAAID,YAAY,CAACE,UAAU,OAAO,CAAC;IACnC,IAAI,CAACF,YAAYE,UAAU,OAAO;IAClC,OAAOJ,EAAEK,aAAa,CAACJ;AACzB;AAMO,SAASK,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0]}},
|
||||
{"offset": {"line": 18491, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/cache-busting-search-param.ts"],"sourcesContent":["import { hexHash } from '../../hash'\n\nconst CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES = 12\nconst textEncoder = new TextEncoder()\n\nfunction encodeCacheBustingSearchParam(bytes: Uint8Array): string {\n let binary = ''\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i])\n }\n\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '')\n}\n\nfunction normalizeCacheBustingInput(\n value: string | string[] | undefined\n): string {\n if (value === undefined) {\n return '0'\n }\n return Array.isArray(value) ? value.join(',') : value\n}\n\nfunction createCacheBustingSearchParamInput(\n prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): string | null {\n if (\n (prefetchHeader === undefined || prefetchHeader === '0') &&\n segmentPrefetchHeader === undefined &&\n stateTreeHeader === undefined &&\n nextUrlHeader === undefined\n ) {\n return null\n }\n\n return [\n prefetchHeader ?? '0',\n normalizeCacheBustingInput(segmentPrefetchHeader),\n normalizeCacheBustingInput(stateTreeHeader),\n normalizeCacheBustingInput(nextUrlHeader),\n ].join(',')\n}\n\nasync function computeCacheBustingSearchParamFromInput(\n input: string\n): Promise<string> {\n // Truncate SHA-256 to 96 bits to keep `_rsc` compact\n const digest = await globalThis.crypto.subtle.digest(\n 'SHA-256',\n textEncoder.encode(input)\n )\n return encodeCacheBustingSearchParam(\n new Uint8Array(digest).subarray(0, CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES)\n )\n}\n\nexport async function computeCacheBustingSearchParam(\n prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): Promise<string> {\n const input = createCacheBustingSearchParamInput(\n prefetchHeader,\n segmentPrefetchHeader,\n stateTreeHeader,\n nextUrlHeader\n )\n if (input === null) {\n return ''\n }\n\n return computeCacheBustingSearchParamFromInput(input)\n}\n\nexport function computeLegacyCacheBustingSearchParam(\n prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): string {\n const input = createCacheBustingSearchParamInput(\n prefetchHeader,\n segmentPrefetchHeader,\n stateTreeHeader,\n nextUrlHeader\n )\n if (input === null) {\n return ''\n }\n\n return hexHash(input)\n}\n"],"names":["hexHash","CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES","textEncoder","TextEncoder","encodeCacheBustingSearchParam","bytes","binary","i","length","String","fromCharCode","btoa","replace","normalizeCacheBustingInput","value","undefined","Array","isArray","join","createCacheBustingSearchParamInput","prefetchHeader","segmentPrefetchHeader","stateTreeHeader","nextUrlHeader","computeCacheBustingSearchParamFromInput","input","digest","globalThis","crypto","subtle","encode","Uint8Array","subarray","computeCacheBustingSearchParam","computeLegacyCacheBustingSearchParam"],"mappings":";;;;;;AAAA,SAASA,OAAO,QAAQ,aAAY;;AAEpC,MAAMC,0CAA0C;AAChD,MAAMC,cAAc,IAAIC;AAExB,SAASC,8BAA8BC,KAAiB;IACtD,IAAIC,SAAS;IACb,IAAK,IAAIC,IAAI,GAAGA,IAAIF,MAAMG,MAAM,EAAED,IAAK;QACrCD,UAAUG,OAAOC,YAAY,CAACL,KAAK,CAACE,EAAE;IACxC;IAEA,OAAOI,KAAKL,QAAQM,OAAO,CAAC,OAAO,KAAKA,OAAO,CAAC,OAAO,KAAKA,OAAO,CAAC,OAAO;AAC7E;AAEA,SAASC,2BACPC,KAAoC;IAEpC,IAAIA,UAAUC,WAAW;QACvB,OAAO;IACT;IACA,OAAOC,MAAMC,OAAO,CAACH,SAASA,MAAMI,IAAI,CAAC,OAAOJ;AAClD;AAEA,SAASK,mCACPC,cAAiD,EACjDC,qBAAoD,EACpDC,eAA8C,EAC9CC,aAA4C;IAE5C,IACGH,CAAAA,mBAAmBL,aAAaK,mBAAmB,GAAE,KACtDC,0BAA0BN,aAC1BO,oBAAoBP,aACpBQ,kBAAkBR,WAClB;QACA,OAAO;IACT;IAEA,OAAO;QACLK,kBAAkB;QAClBP,2BAA2BQ;QAC3BR,2BAA2BS;QAC3BT,2BAA2BU;KAC5B,CAACL,IAAI,CAAC;AACT;AAEA,eAAeM,wCACbC,KAAa;IAEb,qDAAqD;IACrD,MAAMC,SAAS,MAAMC,WAAWC,MAAM,CAACC,MAAM,CAACH,MAAM,CAClD,WACAxB,YAAY4B,MAAM,CAACL;IAErB,OAAOrB,8BACL,IAAI2B,WAAWL,QAAQM,QAAQ,CAAC,GAAG/B;AAEvC;AAEO,eAAegC,+BACpBb,cAAiD,EACjDC,qBAAoD,EACpDC,eAA8C,EAC9CC,aAA4C;IAE5C,MAAME,QAAQN,mCACZC,gBACAC,uBACAC,iBACAC;IAEF,IAAIE,UAAU,MAAM;QAClB,OAAO;IACT;IAEA,OAAOD,wCAAwCC;AACjD;AAEO,SAASS,qCACdd,cAAiD,EACjDC,qBAAoD,EACpDC,eAA8C,EAC9CC,aAA4C;IAE5C,MAAME,QAAQN,mCACZC,gBACAC,uBACAC,iBACAC;IAEF,IAAIE,UAAU,MAAM;QAClB,OAAO;IACT;IAEA,WAAOzB,uKAAAA,EAAQyB;AACjB","ignoreList":[0]}},
|
||||
{"offset": {"line": 18548, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/disable-smooth-scroll.ts"],"sourcesContent":["/**\n * Run function with `scroll-behavior: auto` applied to `<html/>`.\n * This css change will be reverted after the function finishes.\n */\nexport function disableSmoothScrollDuringRouteTransition(\n fn: () => void,\n options: { dontForceLayout?: boolean; onlyHashChange?: boolean } = {}\n) {\n // if only the hash is changed, we don't need to disable smooth scrolling\n // we only care to prevent smooth scrolling when navigating to a new page to avoid jarring UX\n if (options.onlyHashChange) {\n fn()\n return\n }\n\n const htmlElement = document.documentElement\n const hasDataAttribute = htmlElement.dataset.scrollBehavior === 'smooth'\n\n if (!hasDataAttribute) {\n // Warn if smooth scrolling is detected but no data attribute is present\n if (\n process.env.NODE_ENV === 'development' &&\n getComputedStyle(htmlElement).scrollBehavior === 'smooth'\n ) {\n const { warnOnce } =\n require('../../utils/warn-once') as typeof import('../../utils/warn-once')\n warnOnce(\n 'Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' +\n 'add `data-scroll-behavior=\"smooth\"` to your <html> element. ' +\n 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'\n )\n }\n // No smooth scrolling configured, run directly without style manipulation\n fn()\n return\n }\n\n // Proceed with temporarily disabling smooth scrolling\n const existing = htmlElement.style.scrollBehavior\n htmlElement.style.scrollBehavior = 'auto'\n if (!options.dontForceLayout) {\n // In Chrome-based browsers we need to force reflow before calling `scrollTo`.\n // Otherwise it will not pickup the change in scrollBehavior\n // More info here: https://github.com/vercel/next.js/issues/40719#issuecomment-1336248042\n htmlElement.getClientRects()\n }\n fn()\n htmlElement.style.scrollBehavior = existing\n}\n"],"names":["disableSmoothScrollDuringRouteTransition","fn","options","onlyHashChange","htmlElement","document","documentElement","hasDataAttribute","dataset","scrollBehavior","process","env","NODE_ENV","getComputedStyle","warnOnce","require","existing","style","dontForceLayout","getClientRects"],"mappings":"AAAA;;;CAGC,GACD;;;;AAAO,SAASA,yCACdC,EAAc,EACdC,UAAmE,CAAC,CAAC;IAErE,yEAAyE;IACzE,6FAA6F;IAC7F,IAAIA,QAAQC,cAAc,EAAE;QAC1BF;QACA;IACF;IAEA,MAAMG,cAAcC,SAASC,eAAe;IAC5C,MAAMC,mBAAmBH,YAAYI,OAAO,CAACC,cAAc,KAAK;IAEhE,IAAI,CAACF,kBAAkB;QACrB,wEAAwE;QACxE,IACEG,QAAQC,GAAG,CAACC,QAAQ,gCAAK,iBACzBC,iBAAiBT,aAAaK,cAAc,KAAK,UACjD;YACA,MAAM,EAAEK,QAAQ,EAAE,GAChBC,QAAQ;YACVD,SACE,uHACE,iEACA;QAEN;QACA,0EAA0E;QAC1Eb;QACA;IACF;IAEA,sDAAsD;IACtD,MAAMe,WAAWZ,YAAYa,KAAK,CAACR,cAAc;IACjDL,YAAYa,KAAK,CAACR,cAAc,GAAG;IACnC,IAAI,CAACP,QAAQgB,eAAe,EAAE;QAC5B,8EAA8E;QAC9E,4DAA4D;QAC5D,yFAAyF;QACzFd,YAAYe,cAAc;IAC5B;IACAlB;IACAG,YAAYa,KAAK,CAACR,cAAc,GAAGO;AACrC","ignoreList":[0]}},
|
||||
{"offset": {"line": 18590, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/get-segment-param.tsx"],"sourcesContent":["import { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport type { DynamicParamTypes } from '../../app-router-types'\n\nexport type SegmentParam = {\n paramName: string\n paramType: DynamicParamTypes\n}\n\n/**\n * Parse dynamic route segment to type of parameter\n */\nexport function getSegmentParam(segment: string): SegmentParam | null {\n const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((marker) =>\n segment.startsWith(marker)\n )\n\n // if an interception marker is part of the path segment, we need to jump ahead\n // to the relevant portion for param parsing\n if (interceptionMarker) {\n segment = segment.slice(interceptionMarker.length)\n }\n\n if (segment.startsWith('[[...') && segment.endsWith(']]')) {\n return {\n // TODO-APP: Optional catchall does not currently work with parallel routes,\n // so for now aren't handling a potential interception marker.\n paramType: 'optional-catchall',\n paramName: segment.slice(5, -2),\n }\n }\n\n if (segment.startsWith('[...') && segment.endsWith(']')) {\n return {\n paramType: interceptionMarker\n ? `catchall-intercepted-${interceptionMarker}`\n : 'catchall',\n paramName: segment.slice(4, -1),\n }\n }\n\n if (segment.startsWith('[') && segment.endsWith(']')) {\n return {\n paramType: interceptionMarker\n ? `dynamic-intercepted-${interceptionMarker}`\n : 'dynamic',\n paramName: segment.slice(1, -1),\n }\n }\n\n return null\n}\n\nexport function isCatchAll(\n type: DynamicParamTypes\n): type is\n | 'catchall'\n | 'catchall-intercepted-(..)(..)'\n | 'catchall-intercepted-(.)'\n | 'catchall-intercepted-(..)'\n | 'catchall-intercepted-(...)'\n | 'optional-catchall' {\n return (\n type === 'catchall' ||\n type === 'catchall-intercepted-(..)(..)' ||\n type === 'catchall-intercepted-(.)' ||\n type === 'catchall-intercepted-(..)' ||\n type === 'catchall-intercepted-(...)' ||\n type === 'optional-catchall'\n )\n}\n\nexport function getParamProperties(paramType: DynamicParamTypes): {\n repeat: boolean\n optional: boolean\n} {\n let repeat = false\n let optional = false\n\n switch (paramType) {\n case 'catchall':\n case 'catchall-intercepted-(..)(..)':\n case 'catchall-intercepted-(.)':\n case 'catchall-intercepted-(..)':\n case 'catchall-intercepted-(...)':\n repeat = true\n break\n case 'optional-catchall':\n repeat = true\n optional = true\n break\n case 'dynamic':\n case 'dynamic-intercepted-(..)(..)':\n case 'dynamic-intercepted-(.)':\n case 'dynamic-intercepted-(..)':\n case 'dynamic-intercepted-(...)':\n break\n default:\n paramType satisfies never\n }\n\n return { repeat, optional }\n}\n"],"names":["INTERCEPTION_ROUTE_MARKERS","getSegmentParam","segment","interceptionMarker","find","marker","startsWith","slice","length","endsWith","paramType","paramName","isCatchAll","type","getParamProperties","repeat","optional"],"mappings":";;;;;;;;AAAA,SAASA,0BAA0B,QAAQ,wBAAuB;;AAW3D,SAASC,gBAAgBC,OAAe;IAC7C,MAAMC,qBAAqBH,+NAAAA,CAA2BI,IAAI,CAAC,CAACC,SAC1DH,QAAQI,UAAU,CAACD;IAGrB,+EAA+E;IAC/E,4CAA4C;IAC5C,IAAIF,oBAAoB;QACtBD,UAAUA,QAAQK,KAAK,CAACJ,mBAAmBK,MAAM;IACnD;IAEA,IAAIN,QAAQI,UAAU,CAAC,YAAYJ,QAAQO,QAAQ,CAAC,OAAO;QACzD,OAAO;YACL,4EAA4E;YAC5E,8DAA8D;YAC9DC,WAAW;YACXC,WAAWT,QAAQK,KAAK,CAAC,GAAG,CAAC;QAC/B;IACF;IAEA,IAAIL,QAAQI,UAAU,CAAC,WAAWJ,QAAQO,QAAQ,CAAC,MAAM;QACvD,OAAO;YACLC,WAAWP,qBACP,CAAC,qBAAqB,EAAEA,oBAAoB,GAC5C;YACJQ,WAAWT,QAAQK,KAAK,CAAC,GAAG,CAAC;QAC/B;IACF;IAEA,IAAIL,QAAQI,UAAU,CAAC,QAAQJ,QAAQO,QAAQ,CAAC,MAAM;QACpD,OAAO;YACLC,WAAWP,qBACP,CAAC,oBAAoB,EAAEA,oBAAoB,GAC3C;YACJQ,WAAWT,QAAQK,KAAK,CAAC,GAAG,CAAC;QAC/B;IACF;IAEA,OAAO;AACT;AAEO,SAASK,WACdC,IAAuB;IAQvB,OACEA,SAAS,cACTA,SAAS,mCACTA,SAAS,8BACTA,SAAS,+BACTA,SAAS,gCACTA,SAAS;AAEb;AAEO,SAASC,mBAAmBJ,SAA4B;IAI7D,IAAIK,SAAS;IACb,IAAIC,WAAW;IAEf,OAAQN;QACN,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACHK,SAAS;YACT;QACF,KAAK;YACHA,SAAS;YACTC,WAAW;YACX;QACF,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH;QACF;YACEN;IACJ;IAEA,OAAO;QAAEK;QAAQC;IAAS;AAC5B","ignoreList":[0]}},
|
||||
{"offset": {"line": 18665, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/html-bots.ts"],"sourcesContent":["// This regex contains the bots that we need to do a blocking render for and can't safely stream the response\n// due to how they parse the DOM. For example, they might explicitly check for metadata in the `head` tag, so we can't stream metadata tags after the `head` was sent.\n// Note: The pattern [\\w-]+-Google captures all Google crawlers with \"-Google\" suffix (e.g., Mediapartners-Google, AdsBot-Google, Storebot-Google)\n// as well as crawlers starting with \"Google-\" (e.g., Google-PageRenderer, Google-InspectionTool)\nexport const HTML_LIMITED_BOT_UA_RE =\n /[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight/i\n"],"names":["HTML_LIMITED_BOT_UA_RE"],"mappings":"AAAA,6GAA6G;AAC7G,sKAAsK;AACtK,kJAAkJ;AAClJ,iGAAiG;;;;;AAC1F,MAAMA,yBACX,sTAAqT","ignoreList":[0]}},
|
||||
{"offset": {"line": 18678, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/interception-routes.ts"],"sourcesContent":["import { normalizeAppPath } from './app-paths'\n\n// order matters here, the first match will be used\nexport const INTERCEPTION_ROUTE_MARKERS = [\n '(..)(..)',\n '(.)',\n '(..)',\n '(...)',\n] as const\n\nexport type InterceptionMarker = (typeof INTERCEPTION_ROUTE_MARKERS)[number]\n\nexport function isInterceptionRouteAppPath(path: string): boolean {\n // TODO-APP: add more serious validation\n return (\n path\n .split('/')\n .find((segment) =>\n INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n ) !== undefined\n )\n}\n\ntype InterceptionRouteInformation = {\n /**\n * The intercepting route. This is the route that is being intercepted or the\n * route that the user was coming from. This is matched by the Next-Url\n * header.\n */\n interceptingRoute: string\n\n /**\n * The intercepted route. This is the route that is being intercepted or the\n * route that the user is going to. This is matched by the request pathname.\n */\n interceptedRoute: string\n}\n\nexport function extractInterceptionRouteInformation(\n path: string\n): InterceptionRouteInformation {\n let interceptingRoute: string | undefined\n let marker: (typeof INTERCEPTION_ROUTE_MARKERS)[number] | undefined\n let interceptedRoute: string | undefined\n\n for (const segment of path.split('/')) {\n marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n if (marker) {\n ;[interceptingRoute, interceptedRoute] = path.split(marker, 2)\n break\n }\n }\n\n if (!interceptingRoute || !marker || !interceptedRoute) {\n throw new Error(\n `Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`\n )\n }\n\n interceptingRoute = normalizeAppPath(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed\n\n switch (marker) {\n case '(.)':\n // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route\n if (interceptingRoute === '/') {\n interceptedRoute = `/${interceptedRoute}`\n } else {\n interceptedRoute = interceptingRoute + '/' + interceptedRoute\n }\n break\n case '(..)':\n // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route\n if (interceptingRoute === '/') {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`\n )\n }\n interceptedRoute = interceptingRoute\n .split('/')\n .slice(0, -1)\n .concat(interceptedRoute)\n .join('/')\n break\n case '(...)':\n // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route\n interceptedRoute = '/' + interceptedRoute\n break\n case '(..)(..)':\n // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route\n\n const splitInterceptingRoute = interceptingRoute.split('/')\n if (splitInterceptingRoute.length <= 2) {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`\n )\n }\n\n interceptedRoute = splitInterceptingRoute\n .slice(0, -2)\n .concat(interceptedRoute)\n .join('/')\n break\n default:\n throw new Error('Invariant: unexpected marker')\n }\n\n return { interceptingRoute, interceptedRoute }\n}\n"],"names":["normalizeAppPath","INTERCEPTION_ROUTE_MARKERS","isInterceptionRouteAppPath","path","split","find","segment","m","startsWith","undefined","extractInterceptionRouteInformation","interceptingRoute","marker","interceptedRoute","Error","slice","concat","join","splitInterceptingRoute","length"],"mappings":";;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,cAAa;;AAGvC,MAAMC,6BAA6B;IACxC;IACA;IACA;IACA;CACD,CAAS;AAIH,SAASC,2BAA2BC,IAAY;IACrD,wCAAwC;IACxC,OACEA,KACGC,KAAK,CAAC,KACNC,IAAI,CAAC,CAACC,UACLL,2BAA2BI,IAAI,CAAC,CAACE,IAAMD,QAAQE,UAAU,CAACD,SACtDE;AAEZ;AAiBO,SAASC,oCACdP,IAAY;IAEZ,IAAIQ;IACJ,IAAIC;IACJ,IAAIC;IAEJ,KAAK,MAAMP,WAAWH,KAAKC,KAAK,CAAC,KAAM;QACrCQ,SAASX,2BAA2BI,IAAI,CAAC,CAACE,IAAMD,QAAQE,UAAU,CAACD;QACnE,IAAIK,QAAQ;;YACT,CAACD,mBAAmBE,iBAAiB,GAAGV,KAAKC,KAAK,CAACQ,QAAQ;YAC5D;QACF;IACF;IAEA,IAAI,CAACD,qBAAqB,CAACC,UAAU,CAACC,kBAAkB;QACtD,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,4BAA4B,EAAEX,KAAK,iFAAiF,CAAC,GADlH,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEAQ,wBAAoBX,2MAAAA,EAAiBW,mBAAmB,iDAAiD;;IAEzG,OAAQC;QACN,KAAK;YACH,oIAAoI;YACpI,IAAID,sBAAsB,KAAK;gBAC7BE,mBAAmB,CAAC,CAAC,EAAEA,kBAAkB;YAC3C,OAAO;gBACLA,mBAAmLine truncated
|
||||
{"offset": {"line": 18771, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/is-bot.ts"],"sourcesContent":["import { HTML_LIMITED_BOT_UA_RE } from './html-bots'\n\n// Bot crawler that will spin up a headless browser and execute JS.\n// Only the main Googlebot search crawler executes JavaScript, not other Google crawlers.\n// x-ref: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers\n// This regex specifically matches \"Googlebot\" but NOT \"Mediapartners-Google\", \"AdsBot-Google\", etc.\nconst HEADLESS_BROWSER_BOT_UA_RE = /Googlebot(?!-)|Googlebot$/i\n\nexport const HTML_LIMITED_BOT_UA_RE_STRING = HTML_LIMITED_BOT_UA_RE.source\n\nexport { HTML_LIMITED_BOT_UA_RE }\n\nfunction isDomBotUA(userAgent: string) {\n return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent)\n}\n\nfunction isHtmlLimitedBotUA(userAgent: string) {\n return HTML_LIMITED_BOT_UA_RE.test(userAgent)\n}\n\nexport function isBot(userAgent: string): boolean {\n return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent)\n}\n\nexport function getBotType(userAgent: string): 'dom' | 'html' | undefined {\n if (isDomBotUA(userAgent)) {\n return 'dom'\n }\n if (isHtmlLimitedBotUA(userAgent)) {\n return 'html'\n }\n return undefined\n}\n"],"names":["HTML_LIMITED_BOT_UA_RE","HEADLESS_BROWSER_BOT_UA_RE","HTML_LIMITED_BOT_UA_RE_STRING","source","isDomBotUA","userAgent","test","isHtmlLimitedBotUA","isBot","getBotType","undefined"],"mappings":";;;;;;;;AAAA,SAASA,sBAAsB,QAAQ,cAAa;;AAEpD,mEAAmE;AACnE,yFAAyF;AACzF,4FAA4F;AAC5F,oGAAoG;AACpG,MAAMC,6BAA6B;AAE5B,MAAMC,gCAAgCF,iNAAAA,CAAuBG,MAAM,CAAA;;AAI1E,SAASC,WAAWC,SAAiB;IACnC,OAAOJ,2BAA2BK,IAAI,CAACD;AACzC;AAEA,SAASE,mBAAmBF,SAAiB;IAC3C,OAAOL,iNAAAA,CAAuBM,IAAI,CAACD;AACrC;AAEO,SAASG,MAAMH,SAAiB;IACrC,OAAOD,WAAWC,cAAcE,mBAAmBF;AACrD;AAEO,SAASI,WAAWJ,SAAiB;IAC1C,IAAID,WAAWC,YAAY;QACzB,OAAO;IACT;IACA,IAAIE,mBAAmBF,YAAY;QACjC,OAAO;IACT;IACA,OAAOK;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 18810, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD;;;;AAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0]}},
|
||||
{"offset": {"line": 18839, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/parse-relative-url.ts"],"sourcesContent":["import type { ParsedUrlQuery } from 'querystring'\nimport { getLocationOrigin } from '../../utils'\nimport { searchParamsToUrlQuery } from './querystring'\n\nexport interface ParsedRelativeUrl {\n auth: string | null\n hash: string\n host: string | null\n hostname: string | null\n href: string\n pathname: string\n port: string | null\n protocol: string | null\n query: ParsedUrlQuery\n search: string\n slashes: null\n}\n\n/**\n * Parses path-relative urls (e.g. `/hello/world?foo=bar`). If url isn't path-relative\n * (e.g. `./hello`) then at least base must be.\n * Absolute urls are rejected with one exception, in the browser, absolute urls that are on\n * the current origin will be parsed as relative\n */\nexport function parseRelativeUrl(\n url: string,\n base?: string,\n parseQuery?: true\n): ParsedRelativeUrl\nexport function parseRelativeUrl(\n url: string,\n base: string | undefined,\n parseQuery: false\n): Omit<ParsedRelativeUrl, 'query'>\nexport function parseRelativeUrl(\n url: string,\n base?: string,\n parseQuery = true\n): ParsedRelativeUrl | Omit<ParsedRelativeUrl, 'query'> {\n const globalBase = new URL(\n typeof window === 'undefined' ? 'http://n' : getLocationOrigin()\n )\n\n const resolvedBase = base\n ? new URL(base, globalBase)\n : url.startsWith('.')\n ? new URL(\n typeof window === 'undefined' ? 'http://n' : window.location.href\n )\n : globalBase\n\n const { pathname, searchParams, search, hash, href, origin } = url.startsWith(\n '/'\n )\n ? // 'http://localhost:3000///' would be received as '///' in Node.js' IncomingMessage\n // See https://nodejs.org/api/http.html#messageurl\n // Not using `origin` to support other protocols\n new URL(`${resolvedBase.protocol}//${resolvedBase.host}${url}`)\n : new URL(url, resolvedBase)\n\n if (origin !== globalBase.origin) {\n throw new Error(`invariant: invalid relative URL, router received ${url}`)\n }\n\n return {\n auth: null,\n host: null,\n hostname: null,\n pathname,\n port: null,\n protocol: null,\n query: parseQuery ? searchParamsToUrlQuery(searchParams) : undefined,\n search,\n hash,\n href: href.slice(origin.length),\n // We don't know for relative URLs at this point since we set a custom, internal\n // base that isn't surfaced to users.\n slashes: null,\n }\n}\n"],"names":["getLocationOrigin","searchParamsToUrlQuery","parseRelativeUrl","url","base","parseQuery","globalBase","URL","window","resolvedBase","startsWith","location","href","pathname","searchParams","search","hash","origin","protocol","host","Error","auth","hostname","port","query","undefined","slice","length","slashes"],"mappings":";;;;AAEA,SAASC,sBAAsB,QAAQ,gBAAe;;;AAgC/C,SAASC,iBACdC,GAAW,EACXC,IAAa,EACbC,aAAa,IAAI;IAEjB,MAAMC,aAAa,IAAIC,IACrB,OAAOC,WAAW,qBAAc,aAAaR;IAG/C,MAAMS,eAAeL,OACjB,IAAIG,IAAIH,MAAME,cACdH,IAAIO,UAAU,CAAC,OACb,IAAIH,IACF,OAAOC,WAAW,qBAAc,aAAaA,OAAOG,QAAQ,CAACC,IAAI,OAEnEN;IAEN,MAAM,EAAEO,QAAQ,EAAEC,YAAY,EAAEC,MAAM,EAAEC,IAAI,EAAEJ,IAAI,EAAEK,MAAM,EAAE,GAAGd,IAAIO,UAAU,CAC3E,OAGE,AACA,gDAAgD,EADE;IAElD,IAAIH,IAAI,GAAGE,aAAaS,QAAQ,CAAC,EAAE,EAAET,aAAaU,IAAI,GAAGhB,KAAK,IAC9D,IAAII,IAAIJ,KAAKM;IAEjB,IAAIQ,WAAWX,WAAWW,MAAM,EAAE;QAChC,MAAM,OAAA,cAAoE,CAApE,IAAIG,MAAM,CAAC,iDAAiD,EAAEjB,KAAK,GAAnE,qBAAA;mBAAA;wBAAA;0BAAA;QAAmE;IAC3E;IAEA,OAAO;QACLkB,MAAM;QACNF,MAAM;QACNG,UAAU;QACVT;QACAU,MAAM;QACNL,UAAU;QACVM,OAAOnB,iBAAaJ,gNAAAA,EAAuBa,gBAAgBW;QAC3DV;QACAC;QACAJ,MAAMA,KAAKc,KAAK,CAACT,OAAOU,MAAM;QAC9B,gFAAgF;QAChF,qCAAqC;QACrCC,SAAS;IACX;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 18878, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":";;;;AAAA,SAASA,SAAS,QAAQ,eAAc;;AASjC,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,OAAGJ,qMAAAA,EAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0]}},
|
||||
{"offset": {"line": 18895, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/querystring.ts"],"sourcesContent":["import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n searchParams: URLSearchParams\n): ParsedUrlQuery {\n const query: ParsedUrlQuery = {}\n for (const [key, value] of searchParams.entries()) {\n const existing = query[key]\n if (typeof existing === 'undefined') {\n query[key] = value\n } else if (Array.isArray(existing)) {\n existing.push(value)\n } else {\n query[key] = [existing, value]\n }\n }\n return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n if (typeof param === 'string') {\n return param\n }\n\n if (\n (typeof param === 'number' && !isNaN(param)) ||\n typeof param === 'boolean'\n ) {\n return String(param)\n } else {\n return ''\n }\n}\n\nexport function urlQueryToSearchParams(query: ParsedUrlQuery): URLSearchParams {\n const searchParams = new URLSearchParams()\n for (const [key, value] of Object.entries(query)) {\n if (Array.isArray(value)) {\n for (const item of value) {\n searchParams.append(key, stringifyUrlQueryParam(item))\n }\n } else {\n searchParams.set(key, stringifyUrlQueryParam(value))\n }\n }\n return searchParams\n}\n\nexport function assign(\n target: URLSearchParams,\n ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n for (const searchParams of searchParamsList) {\n for (const key of searchParams.keys()) {\n target.delete(key)\n }\n\n for (const [key, value] of searchParams.entries()) {\n target.append(key, value)\n }\n }\n\n return target\n}\n"],"names":["searchParamsToUrlQuery","searchParams","query","key","value","entries","existing","Array","isArray","push","stringifyUrlQueryParam","param","isNaN","String","urlQueryToSearchParams","URLSearchParams","Object","item","append","set","assign","target","searchParamsList","keys","delete"],"mappings":";;;;;;;;AAEO,SAASA,uBACdC,YAA6B;IAE7B,MAAMC,QAAwB,CAAC;IAC/B,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIH,aAAaI,OAAO,GAAI;QACjD,MAAMC,WAAWJ,KAAK,CAACC,IAAI;QAC3B,IAAI,OAAOG,aAAa,aAAa;YACnCJ,KAAK,CAACC,IAAI,GAAGC;QACf,OAAO,IAAIG,MAAMC,OAAO,CAACF,WAAW;YAClCA,SAASG,IAAI,CAACL;QAChB,OAAO;YACLF,KAAK,CAACC,IAAI,GAAG;gBAACG;gBAAUF;aAAM;QAChC;IACF;IACA,OAAOF;AACT;AAEA,SAASQ,uBAAuBC,KAAc;IAC5C,IAAI,OAAOA,UAAU,UAAU;QAC7B,OAAOA;IACT;IAEA,IACG,OAAOA,UAAU,YAAY,CAACC,MAAMD,UACrC,OAAOA,UAAU,WACjB;QACA,OAAOE,OAAOF;IAChB,OAAO;QACL,OAAO;IACT;AACF;AAEO,SAASG,uBAAuBZ,KAAqB;IAC1D,MAAMD,eAAe,IAAIc;IACzB,KAAK,MAAM,CAACZ,KAAKC,MAAM,IAAIY,OAAOX,OAAO,CAACH,OAAQ;QAChD,IAAIK,MAAMC,OAAO,CAACJ,QAAQ;YACxB,KAAK,MAAMa,QAAQb,MAAO;gBACxBH,aAAaiB,MAAM,CAACf,KAAKO,uBAAuBO;YAClD;QACF,OAAO;YACLhB,aAAakB,GAAG,CAAChB,KAAKO,uBAAuBN;QAC/C;IACF;IACA,OAAOH;AACT;AAEO,SAASmB,OACdC,MAAuB,EACvB,GAAGC,gBAAmC;IAEtC,KAAK,MAAMrB,gBAAgBqB,iBAAkB;QAC3C,KAAK,MAAMnB,OAAOF,aAAasB,IAAI,GAAI;YACrCF,OAAOG,MAAM,CAACrB;QAChB;QAEA,KAAK,MAAM,CAACA,KAAKC,MAAM,IAAIH,aAAaI,OAAO,GAAI;YACjDgB,OAAOH,MAAM,CAACf,KAAKC;QACrB;IACF;IAEA,OAAOiB;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 18958, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/segment-cache/segment-value-encoding.ts"],"sourcesContent":["import { PAGE_SEGMENT_KEY } from '../segment'\nimport type { Segment as FlightRouterStateSegment } from '../app-router-types'\n\n// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\nexport type SegmentRequestKeyPart = Opaque<'SegmentRequestKeyPart', string>\nexport type SegmentRequestKey = Opaque<'SegmentRequestKey', string>\n\nexport const ROOT_SEGMENT_REQUEST_KEY = '' as SegmentRequestKey\n\nexport const HEAD_REQUEST_KEY = '/_head' as SegmentRequestKey\n\nexport function createSegmentRequestKeyPart(\n segment: FlightRouterStateSegment\n): SegmentRequestKeyPart {\n if (typeof segment === 'string') {\n if (segment.startsWith(PAGE_SEGMENT_KEY)) {\n // The Flight Router State type sometimes includes the search params in\n // the page segment. However, the Segment Cache tracks this as a separate\n // key. So, we strip the search params here, and then add them back when\n // the cache entry is turned back into a FlightRouterState. This is an\n // unfortunate consequence of the FlightRouteState being used both as a\n // transport type and as a cache key; we'll address this once more of the\n // Segment Cache implementation has settled.\n // TODO: We should hoist the search params out of the FlightRouterState\n // type entirely, This is our plan for dynamic route params, too.\n return PAGE_SEGMENT_KEY as SegmentRequestKeyPart\n }\n const safeName =\n // TODO: FlightRouterState encodes Not Found routes as \"/_not-found\".\n // But params typically don't include the leading slash. We should use\n // a different encoding to avoid this special case.\n segment === '/_not-found'\n ? '_not-found'\n : encodeToFilesystemAndURLSafeString(segment)\n // Since this is not a dynamic segment, it's fully encoded. It does not\n // need to be \"hydrated\" with a param value.\n return safeName as SegmentRequestKeyPart\n }\n\n const name = segment[0]\n const paramType = segment[2]\n const safeName = encodeToFilesystemAndURLSafeString(name)\n\n const encodedName = '$' + paramType + '$' + safeName\n return encodedName as SegmentRequestKeyPart\n}\n\nexport function appendSegmentRequestKeyPart(\n parentRequestKey: SegmentRequestKey,\n parallelRouteKey: string,\n childRequestKeyPart: SegmentRequestKeyPart\n): SegmentRequestKey {\n // Aside from being filesystem safe, segment keys are also designed so that\n // each segment and parallel route creates its own subdirectory. Roughly in\n // the same shape as the source app directory. This is mostly just for easier\n // debugging (you can open up the build folder and navigate the output); if\n // we wanted to do we could just use a flat structure.\n\n // Omit the parallel route key for children, since this is the most\n // common case. Saves some bytes (and it's what the app directory does).\n const slotKey =\n parallelRouteKey === 'children'\n ? childRequestKeyPart\n : `@${encodeToFilesystemAndURLSafeString(parallelRouteKey)}/${childRequestKeyPart}`\n return (parentRequestKey + '/' + slotKey) as SegmentRequestKey\n}\n\n// Define a regex pattern to match the most common characters found in a route\n// param. It excludes anything that might not be cross-platform filesystem\n// compatible, like |. It does not need to be precise because the fallback is to\n// just base64url-encode the whole parameter, which is fine; we just don't do it\n// by default for compactness, and for easier debugging.\nconst simpleParamValueRegex = /^[a-zA-Z0-9\\-_@]+$/\n\nfunction encodeToFilesystemAndURLSafeString(value: string) {\n if (simpleParamValueRegex.test(value)) {\n return value\n }\n // If there are any unsafe characters, base64url-encode the entire value.\n // We also add a ! prefix so it doesn't collide with the simple case.\n const base64url = btoa(value)\n .replace(/\\+/g, '-') // Replace '+' with '-'\n .replace(/\\//g, '_') // Replace '/' with '_'\n .replace(/=+$/, '') // Remove trailing '='\n return '!' + base64url\n}\n\nexport function convertSegmentPathToStaticExportFilename(\n segmentPath: string\n): string {\n return `__next${segmentPath.replace(/\\//g, '.')}.txt`\n}\n"],"names":["PAGE_SEGMENT_KEY","ROOT_SEGMENT_REQUEST_KEY","HEAD_REQUEST_KEY","createSegmentRequestKeyPart","segment","startsWith","safeName","encodeToFilesystemAndURLSafeString","name","paramType","encodedName","appendSegmentRequestKeyPart","parentRequestKey","parallelRouteKey","childRequestKeyPart","slotKey","simpleParamValueRegex","value","test","base64url","btoa","replace","convertSegmentPathToStaticExportFilename","segmentPath"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,aAAY;;AAStC,MAAMC,2BAA2B,GAAuB;AAExD,MAAMC,mBAAmB,Line truncated
|
||||
{"offset": {"line": 19037, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/segment-cache/vary-params-decoding.ts"],"sourcesContent":["/**\n * Vary Params Decoding\n *\n * This module is shared between server and client.\n */\n\nexport type VaryParams = Set<string>\n\n/**\n * Vary params are serialized into the Flight stream as an\n * `AsyncIterable<string>` that yields each accessed param name exactly once\n * (the server dedupes before emitting). Because each access is flushed into the\n * stream as it happens, there's no step at the end of the render that has to\n * run for the client to read anything. If a prerender is aborted by sync I/O,\n * the params yielded before the abort are already in the stream, and they're\n * exactly the params the partial response actually depends on.\n *\n * Root params are NOT included in a segment's own iterable. They're emitted\n * once at the top level of the response (as a separate iterable) and unioned in\n * by `readVaryParams`, because root params can be accessed at any point during\n * the render — folding them into every segment would otherwise require a merge\n * once the whole render is complete.\n */\nexport type VaryParamsIterable = AsyncIterable<string>\n\n/**\n * A Flight \"chunk\": when an `AsyncIterable` arrives over a fully-buffered Flight\n * stream, each `iterator.next()` returns one of these instead of a native\n * Promise. It follows the React thenable protocol — once `status` is\n * `'fulfilled'`, `value` (the `IteratorResult`) can be read synchronously.\n */\ntype IteratorResultChunk = PromiseLike<IteratorResult<string>> & {\n status?: 'pending' | 'resolved_model' | 'fulfilled' | 'rejected' | string\n value?: IteratorResult<string>\n}\n\n/**\n * Synchronously drains a vary params `AsyncIterable`, adding each yielded name\n * to `target`.\n *\n * By the time this runs (on the client, or in collectSegmentData), the Flight\n * stream has been fully buffered, so every yielded value is already\n * materialized and can be read without awaiting. We force each iterator result\n * to resolve synchronously using the same `.then(noop)` trick React uses\n * internally, then read its `status`/`value` directly.\n *\n * We add \"every param yielded up to the point the stream suspends\": a\n * normally-closed iterable drains fully, while one left hanging (a sync-I/O\n * abort, or a `close()` whose row hasn't flushed yet) drains to the prefix\n * already in the stream. Both are correct — a segment's param accesses are all\n * flushed as they happen during its render, so the prefix is exactly the set\n * the response depends on. We therefore never need the terminating `done` row\n * to be present; it's only stream hygiene.\n */\nfunction drainVaryParams(\n iterable: VaryParamsIterable,\n target: VaryParams\n): void {\n const iterator = iterable[Symbol.asyncIterator]()\n while (true) {\n const chunk = iterator.next() as IteratorResultChunk\n // Attach a no-op listener to force Flight to synchronously resolve the\n // chunk. A freshly-arrived result may be in an intermediate\n // 'resolved_model' state (data received but not unwrapped); calling\n // .then() transitions it to 'fulfilled', making the value available\n // synchronously. (A native Promise has no `status` and simply reads as\n // not-fulfilled below, so this can never hang.)\n chunk.then(noop, noop)\n if (chunk.status !== 'fulfilled' || chunk.value === undefined) {\n // The stream suspended here. Everything yielded before this point has\n // already been added.\n return\n }\n const step = chunk.value\n if (step.done) {\n return\n }\n target.add(step.value)\n }\n}\n\n/**\n * Reads a segment's (or the head's) vary params, unioning in the response-level\n * root params.\n *\n * Root params are emitted once at the top level rather than folded into every\n * segment by the server, so every read recombines them here — building the\n * merge into the read means a caller can't forget it, and it's done in a single\n * pass with no intermediate set.\n *\n * Returns null (\"unknown\", key on all params) unless BOTH iterables are\n * present. A null/absent `iterable` means the segment's own tracking wasn't\n * enabled (e.g. not a prerender). A null/absent `rootIterable` means root\n * params weren't tracked — and since a segment's own iterable never includes\n * root params (those are accessed in layouts above it), narrowing on the\n * segment set alone would wrongly assume no root params were accessed. In\n * either case we stay conservative.\n *\n * When both are present each is authoritative even when it drains to the empty\n * set — a tracked segment that read no params, with no root params accessed,\n * can be shared across all param values.\n */\nexport function readVaryParams(\n iterable: VaryParamsIterable | null | undefined,\n rootIterable: VaryParamsIteraLine truncated
|
||||
{"offset": {"line": 19099, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/segment.ts"],"sourcesContent":["import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record<string, string | string[] | undefined>\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport function computeSelectedLayoutSegment(\n segments: string[] | null,\n parallelRouteKey: string\n): string | null {\n if (!segments || segments.length === 0) {\n return null\n }\n\n // For 'children', use first segment; for other parallel routes, use last segment\n const rawSegment =\n parallelRouteKey === 'children'\n ? segments[0]\n : segments[segments.length - 1]\n\n // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n // Returning an internal value like `__DEFAULT__` would be confusing\n return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n tree: FlightRouterState,\n parallelRouteKey: string,\n first = true,\n segmentPath: string[] = []\n): string[] {\n let node: FlightRouterState\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey]\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1]\n node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n }\n\n if (!node) return segmentPath\n const segment = node[0]\n\n let segmentValue = getSegmentValue(segment)\n\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath\n }\n\n segmentPath.push(segmentValue)\n\n return getSelectedLayoutSegmentPath(\n node,\n parallelRouteKey,\n false,\n segmentPath\n )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n"],"names":["getSegmentValue","segment","Array","isArray","isGroupSegment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","computeSelectedLayoutSegment","segments","parallelRouteKey","length","rawSegment","DEFAULT_SEGMENT_KEY","getSelectedLayoutSegmentPath","tree","first","segmentPath","node","parallelRoutes","children","Object","values","segmentValue","push","NOT_FOUND_SEGMENT_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEO,SAASA,gBAAgBC,OAAgB;IAC9C,OAAOC,MAAMC,OAAO,CAACF,WAAWA,OAAO,CAAC,EAAE,GAAGA;AAC/C;AAEO,SAASG,eAAeH,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQI,QAAQ,CAAC;AAChD;AAEO,SAASC,uBAAuBL,OAAe;IACpD,OAAOA,QAAQM,UAAU,CAAC,QAAQN,YAAY;AAChD;AAEO,SAASO,6BACdP,OAAgB,EAChBQ,YAA2D;IAE3D,MAAMC,gBAAgBT,QAAQU,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOX;AACT;AAEO,SAASe,6BACdC,QAAyB,EACzBC,gBAAwB;IAExB,IAAI,CAACD,YAAYA,SAASE,MAAM,KAAK,GAAG;QACtC,OAAO;IACT;IAEA,iFAAiF;IACjF,MAAMC,aACJF,qBAAqB,aACjBD,QAAQ,CAAC,EAAE,GACXA,QAAQ,CAACA,SAASE,MAAM,GAAG,EAAE;IAEnC,sGAAsG;IACtG,oEAAoE;IACpE,OAAOC,eAAeC,sBAAsB,OAAOD;AACrD;AAGO,SAASE,6BACdC,IAAuB,EACvBL,gBAAwB,EACxBM,QAAQ,IAAI,EACZC,cAAwB,EAAE;IAE1B,IAAIC;IACJ,IAAIF,OAAO;QACT,kEAAkE;QAClEE,OAAOH,IAAI,CAAC,EAAE,CAACL,iBAAiB;IAClC,OAAO;QACL,oGAAoG;QACpG,MAAMS,iBAAiBJ,IAAI,CAAC,EAAE;QAC9BG,OAAOC,eAAeC,QAAQ,IAAIC,OAAOC,MAAM,CAACH,eAAe,CAAC,EAAE;IACpE;IAEA,IAAI,CAACD,MAAM,OAAOD;IAClB,MAAMxB,UAAUyB,IAAI,CAAC,EAAE;IAEvB,IAAIK,eAAe/B,gBAAgBC;IAEnC,IAAI,CAAC8B,gBAAgBA,aAAaxB,UAAU,CAACK,mBAAmB;QAC9D,OAAOa;IACT;IAEAA,YAAYO,IAAI,CAACD;IAEjB,OAAOT,6BACLI,MACAR,kBACA,OACAO;AAEJ;AAEO,MAAMb,mBAAmB,WAAU;AACnC,MAAMS,sBAAsB,cAAa;AACzC,MAAMY,wBAAwB,cAAa","ignoreList":[0]}},
|
||||
{"offset": {"line": 19173, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/utils/reflect-utils.ts"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n 'status',\n // 'value',\n // 'error',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n 'toJSON',\n '$$typeof',\n '__esModule',\n\n // Tested by flight when checking for iterables\n '@@iterator',\n])\n"],"names":["isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","test","JSON","stringify","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set"],"mappings":";;;;;;;;AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAE9B,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAO,CAAC,EAAE,EAAED,OAAO,CAAC,EAAEC,KAAK,EAAE,CAAC;IAChC;IACA,OAAO,CAAC,EAAE,EAAED,OAAO,CAAC,EAAEG,KAAKC,SAAS,CAACH,MAAM,GAAG,CAAC;AACjD;AAEO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAO,CAAC,cAAc,EAAED,OAAO,EAAE,EAAEM,gBAAgB,OAAO,EAAEA,gBAAgB,IAAI,EAAEN,OAAO,cAAc,CAAC;AAC1G;AAEO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB;IACA;IACA;IAEA,0BAA0B;IAC1B;IACA,WAAW;IACX,WAAW;IAEX,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B;IACA;IACA;IAEA,+CAA+C;IAC/C;CACD,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 19226, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/utils/warn-once.ts"],"sourcesContent":["let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n"],"names":["warnOnce","_","process","env","NODE_ENV","warnings","Set","msg","has","console","warn","add"],"mappings":";;;;AAAA,IAAIA,WAAW,CAACC,KAAe;AAC/B,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,WAAc;IACzC,MAAMC,WAAW,IAAIC;IACrBN,WAAW,CAACO;QACV,IAAI,CAACF,SAASG,GAAG,CAACD,MAAM;YACtBE,QAAQC,IAAI,CAACH;QACf;QACAF,SAASM,GAAG,CAACJ;IACf;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 19245, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/next-devtools/dev-overlay.shim.ts"],"sourcesContent":["export function renderAppDevOverlay() {\n throw new Error(\n \"Next DevTools: Can't render in this environment. This is a bug in Next.js\"\n )\n}\n\nexport function renderPagesDevOverlay() {\n throw new Error(\n \"Next DevTools: Can't render in this environment. This is a bug in Next.js\"\n )\n}\n\n// TODO: Extract into separate functions that are imported\nexport const dispatcher = new Proxy(\n {},\n {\n get: (_, prop) => {\n return () => {\n throw new Error(\n `Next DevTools: Can't dispatch ${String(prop)} in this environment. This is a bug in Next.js`\n )\n }\n },\n }\n)\n"],"names":["dispatcher","renderAppDevOverlay","renderPagesDevOverlay","Error","Proxy","get","_","prop","String"],"mappings":";;;;;;;;;;;;;;;IAaaA,UAAU,EAAA;eAAVA;;IAbGC,mBAAmB,EAAA;eAAnBA;;IAMAC,qBAAqB,EAAA;eAArBA;;;AANT,SAASD;IACd,MAAM,OAAA,cAEL,CAFK,IAAIE,MACR,8EADI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASD;IACd,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,8EADI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAGO,MAAMH,aAAa,IAAII,MAC5B,CAAC,GACD;IACEC,KAAK,CAACC,GAAGC;QACP,OAAO;YACL,MAAM,OAAA,cAEL,CAFK,IAAIJ,MACR,CAAC,8BAA8B,EAAEK,OAAOD,MAAM,8CAA8C,CAAC,GADzF,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 19306, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/module.compiled.js"],"sourcesContent":["if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n"],"names":["process","env","NEXT_RUNTIME","module","exports","require","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK"],"mappings":"AAAA,IAAIA,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;KAElC;IACL,IAAIF,QAAQC,GAAG,CAACK,yBAAyB,EAAE;;SAcpC;QACL,IAAIN,QAAQC,GAAG,CAACM,QAAQ,KAAK,WAAe;YAC1C,IAAIP,QAAQC,GAAG,CAACO,SAAS,eAAE;gBACzBL,OAAOC,OAAO,GAAGC,QAAQ;YAC3B,OAAO;;QAGT,OAAO;;IAOT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 19325, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/contexts/app-router-context.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].AppRouterContext\n"],"names":["module","exports","require","vendored","AppRouterContext"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,WAAW,CAACC,gBAAgB","ignoreList":[0]}},
|
||||
{"offset": {"line": 19330, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/contexts/hooks-client-context.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HooksClientContext\n"],"names":["module","exports","require","vendored","HooksClientContext"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,WAAW,CAACC,kBAAkB","ignoreList":[0]}},
|
||||
{"offset": {"line": 19335, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/contexts/server-inserted-html.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].ServerInsertedHtml\n"],"names":["module","exports","require","vendored","ServerInsertedHtml"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,WAAW,CAACC,kBAAkB","ignoreList":[0]}},
|
||||
{"offset": {"line": 19340, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n"],"names":["module","exports","require","vendored","ReactDOM"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,QAAQ","ignoreList":[0]}},
|
||||
{"offset": {"line": 19345, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxDevRuntime\n"],"names":["module","exports","require","vendored","ReactJsxDevRuntime"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,kBAAkB","ignoreList":[0]}},
|
||||
{"offset": {"line": 19350, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxRuntime\n"],"names":["module","exports","require","vendored","ReactJsxRuntime"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,eAAe","ignoreList":[0]}},
|
||||
{"offset": {"line": 19355, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n"],"names":["module","exports","require","vendored","ReactServerDOMTurbopackClient"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,6BAA6B","ignoreList":[0]}},
|
||||
{"offset": {"line": 19360, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/ssr/react.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.React\n"],"names":["module","exports","require","vendored","React"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,KAAK","ignoreList":[0]}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/templates/app-page-runtime.ts"],"sourcesContent":["import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport type { FallbackRouteParam } from '../static-paths/types'\n\nimport {\n AppPageRouteModule,\n type AppPageRouteHandlerContext,\n} from '../../server/route-modules/app-page/module.compiled' with { 'turbopack-transition': 'next-ssr' }\n\nimport { RouteKind } from '../../server/route-kind' with { 'turbopack-transition': 'next-server-utility' }\n\nimport { getRevalidateReason } from '../../server/instrumentation/utils' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n getTracer,\n SpanKind,\n SpanStatusCode,\n type Span,\n} from '../../server/lib/trace/tracer' with { 'turbopack-transition': 'next-server-utility' }\nimport type { RequestMeta } from '../../server/request-meta'\nimport {\n addRequestMeta,\n getRequestMeta,\n setRequestMeta,\n} from '../../server/request-meta' with { 'turbopack-transition': 'next-server-utility' }\nimport { BaseServerSpan } from '../../server/lib/trace/constants' with { 'turbopack-transition': 'next-server-utility' }\nimport { stripFlightHeaders } from '../../server/app-render/strip-flight-headers' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n NodeNextRequest,\n NodeNextResponse,\n} from '../../server/base-http/node' with { 'turbopack-transition': 'next-server-utility' }\nimport { checkIsAppPPREnabled } from '../../server/lib/experimental/ppr' with { 'turbopack-transition': 'next-server-utility' }\nimport { isRSCRequestHeader } from '../../server/lib/is-rsc-request' with { 'turbopack-transition': 'next-server-utility' }\nimport { isNonHtmlSecFetchDest } from '../../server/lib/is-non-html-sec-fetch-dest' with { 'turbopack-transition': 'next-server-utility' }\nimport { UNDERSCORE_NOT_FOUND_ROUTE } from '../../shared/lib/entry-constants' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n getFallbackRouteParams,\n getPlaceholderFallbackRouteParams,\n buildDynamicSegmentPlaceholder,\n createOpaqueFallbackRouteParams,\n type OpaqueFallbackRouteParams,\n} from '../../server/request/fallback-params' with { 'turbopack-transition': 'next-server-utility' }\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton' with { 'turbopack-transition': 'next-server-utility' }\nimport { shouldServeStreamingMetadata } from '../../server/lib/streaming-metadata' with { 'turbopack-transition': 'next-server-utility' }\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths' with { 'turbopack-transition': 'next-server-utility' }\nimport { getIsPossibleServerAction } from '../../server/lib/server-action-request-meta' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n RSC_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_INSTANT_TEST_COOKIE,\n NEXT_IS_PRERENDER_HEADER,\n NEXT_DID_POSTPONE_HEADER,\n RSC_CONTENT_TYPE_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n} from '../../client/components/app-router-headers' with { 'turbopack-transition': 'next-server-utility' }\nimport { getBotType } from '../../shared/lib/router/utils/is-bot' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n CachedRouteKind,\n IncrementalCacheKind,\n type CachedAppPageValue,\n type ResponseCacheEntry,\n type ResponseGenerator,\n} from '../../server/response-cache' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n FallbackMode,\n parseFallbackField,\n} from '../../lib/fallback' with { 'turbopack-transition': 'next-server-utility' }\nimport RenderResult from '../../server/render-result' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n CACHE_ONE_YEAR_SECONDS,\n HTML_CONTENT_TYPE_HEADER,\n NEXT_CACHE_TAGS_HEADER,\n NEXT_NAV_DEPLOYMENT_ID_HEADER,\n NEXT_RESUME_HEADER,\n NEXT_RESUME_STATE_LENGTH_HEADER,\n} from '../../lib/constants' with { 'turbopack-transition': 'next-server-utility' }\nimport type { CacheControl } from '../../server/lib/cache-control'\nimport { ENCODED_TAGS } from '../../server/stream-utils/encoded-tags' with { 'turbopack-transition': 'next-server-utility' }\nimport { sendRenderResult } from '../../server/send-payload' with { 'turbopack-transition': 'next-server-utility' }\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external' with { 'turbopack-transition': 'next-server-utility' }\nimport { parseMaxPostponedStateSize } from '../../shared/lib/size-limit' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n getMaxPostponedStateSize,\n getPostponedStateExceededErrorMessage,\n readBodyWithSizeLimit,\n} from '../../server/lib/postponed-request-body' with { 'turbopack-transition': 'next-server-utility' }\nimport { parseUrl } from '../../lib/uLine truncated
|
||||
{"offset": {"line": 1576, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/templates/app-page.ts"],"sourcesContent":["import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport { createAppPageEntrypoint } from './app-page-runtime'\nimport { interopDefault } from '../../server/app-render/interop-default' with { 'turbopack-transition': 'next-server-utility' }\n\n// Keep this route-specific template small. Turbopack gives every route a\n// distinct module identity, while app-page-runtime is shared across routes.\n// The injected loader tree references interopDefault when loading metadata, so\n// that binding must remain in this module.\n\n/**\n * The tree created in next-app-loader that holds component segments and modules.\n */\ndeclare const tree: LoaderTree\n\ndeclare const __next_app_require__: (id: string | number) => unknown\ndeclare const __next_app_load_chunk__: (id: string | number) => Promise<unknown>\n\n// INJECT:tree\n// INJECT:__next_app_require__\n// INJECT:__next_app_load_chunk__\n\nconst entrypoint = createAppPageEntrypoint({\n tree,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n require: __next_app_require__,\n loadChunk: __next_app_load_chunk__,\n interopDefault,\n})\n\nexport const __next_app__ = entrypoint.__next_app__\nexport const routeModule = entrypoint.routeModule\nexport const handler = entrypoint.handler\n\nexport * from '../../server/app-render/entry-base' with { 'turbopack-transition': 'next-server-utility' }\n"],"names":["createAppPageEntrypoint","interopDefault","entrypoint","tree","page","pathname","require","__next_app_require__","loadChunk","__next_app_load_chunk__","__next_app__","routeModule","handler"],"mappings":";;;;;;;;AACA,SAASA,uBAAuB,QAAQ,qBAAoB;AAoB5D,MAAME,aAAaF,wBAAwB;IACzCG;;;AApBF,MAAA,GAASF,cAAc,QAAQ,MAAA,IAAA,wOAAA,EAAA,kBAA+C;IAAE,EAAA,sBAAwB,eAAA,IAAA,wOAAA,EAAA;AAAsB,EAAC,IAAA,kCAAA,IAAA,wOAAA,EAAA;AAe/H,MAAA,QAAc,6BAAA,IAAA,wOAAA,EAAA;AACd,MAAA,wBAA8B,gBAAA,IAAA,wOAAA,EAAA;AAC9B,MAAA,2BAAiC,EAAA,IAAA,wOAAA,EAAA;;;IAM/BK,EAAAA,OAASC;IAAAA;IAAAA;YACTC,QAAAA;YAAAA,EAAWC;YAAAA;aACXR;gBACF,UAAA,CAAA;gBAAA,QAAA;oBAAA;oBAAA;iBAAA;YAEA;YAAA,EAAA;SAAA,CAAO,MAAMS,eAAeR,WAAWQ,YAAY,CAAA;IACnD;IAAA,IAAO,MAAMC,cAAcT,WAAWS,WAAW,CAAA;QACjD,KAAO,KAAA;YAAMC,UAAUV,WAAWU,OAAO,CAAA;YAAA;SAAA;QAEzC,YAAc,CAAA;YAAA;YAAA,IAA0C;SAAA;UAAE,WAAA;YAAA,YAAwB;YAAA;SAAA;QAAuB,gBAAA;YAAA;YAAA;SAAA","ignoreList":[0]}},
|
||||
{"offset": {"line": 1762, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/module.compiled.js"],"sourcesContent":["if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n"],"names":["process","env","NEXT_RUNTIME","module","exports","require","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK"],"mappings":"AAAA,IAAIA,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;KAElC;IACL,IAAIF,QAAQC,GAAG,CAACK,yBAAyB,EAAE;;SAcpC;QACL,IAAIN,QAAQC,GAAG,CAACM,QAAQ,KAAK,WAAe;YAC1C,IAAIP,QAAQC,GAAG,CAACO,SAAS,eAAE;gBACzBL,OAAOC,OAAO,GAAGC,QAAQ;YAC3B,OAAO;;QAGT,OAAO;;IAOT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 1817, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/module-loading/instrument-module-getter.ts"],"sourcesContent":["/**\n * Wraps a module getter from the generated loader tree code so that the\n * result of an async module (e.g. due to a top-level await) is tracked as a\n * pending import, which the cache warming phase of a prerender waits for.\n * Both bundlers emit this around every module getter in the loader tree.\n */\nexport function instrumentModuleGetter<TModule>(\n getter: () => TModule\n): () => TModule {\n if (\n process.env.NEXT_RUNTIME === 'edge' ||\n !process.env.__NEXT_CACHE_COMPONENTS\n ) {\n // The tracking is only consumed when prerendering with Cache Components,\n // which is not supported in the edge runtime (and the tracking relies on\n // Node.js APIs).\n return getter\n } else {\n return () => {\n const { trackPendingImport } =\n require('./track-module-loading.external') as typeof import('./track-module-loading.external')\n\n const exportsOrPromise = getter()\n trackPendingImport(exportsOrPromise)\n return exportsOrPromise\n }\n }\n}\n"],"names":["instrumentModuleGetter","getter","process","env","NEXT_RUNTIME","__NEXT_CACHE_COMPONENTS","trackPendingImport","require","exportsOrPromise"],"mappings":"AAAA;;;;;CAKC;;;+BACeA,0BAAAA;;;eAAAA;;;AAAT,SAASA,uBACdC,MAAqB;IAErB,IACEC,QAAQC,GAAG,CAACC,YAAY,KAAK,OAE7B,GADA,CAACF,QAAQC,GAAG,CAACE,uBAAuB;QAEpC,yEAAyE;QACzE,yEAAyE;QACzE,iBAAiB;QACjB,OAAOJ;IACT,OAAO;;AAUT","ignoreList":[0]}}]
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
module.exports = [
|
||||
"[project]/node_modules/next/dist/client/components/builtin/not-found.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return NotFound;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js [app-rsc] (ecmascript)");
|
||||
const _errorfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/error-fallback.js [app-rsc] (ecmascript)");
|
||||
function NotFound() {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorfallback.HTTPAccessErrorFallback, {
|
||||
status: 404,
|
||||
message: "This page could not be found."
|
||||
});
|
||||
}
|
||||
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;
|
||||
}
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/builtin/not-found.js [app-rsc] (ecmascript, Next.js Server Component)", (function(__turbopack_context__){
|
||||
|
||||
__turbopack_context__.n(__turbopack_context__.i("[project]/node_modules/next/dist/client/components/builtin/not-found.js [app-rsc] (ecmascript)"));
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/http-access-fallback/error-fallback.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "HTTPAccessErrorFallback", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return HTTPAccessErrorFallback;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js [app-rsc] (ecmascript)");
|
||||
const _accesserrorstyles = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/styles/access-error-styles.js [app-rsc] (ecmascript)");
|
||||
function HTTPAccessErrorFallback({ status, message }) {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("title", {
|
||||
children: `${status}: ${message}`
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
style: _accesserrorstyles.styles.error,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
|
||||
dangerouslySetInnerHTML: {
|
||||
/* Minified CSS from
|
||||
body { margin: 0; color: #000; background: #fff; }
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(0, 0, 0, .3);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body { color: #fff; background: #000; }
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(255, 255, 255, .3);
|
||||
}
|
||||
}
|
||||
*/ __html: `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}`
|
||||
}
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("h1", {
|
||||
className: "next-error-h1",
|
||||
style: _accesserrorstyles.styles.h1,
|
||||
children: status
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
style: _accesserrorstyles.styles.desc,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("h2", {
|
||||
style: _accesserrorstyles.styles.h2,
|
||||
children: message
|
||||
})
|
||||
})
|
||||
]
|
||||
})
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
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;
|
||||
}
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/styles/access-error-styles.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "styles", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return styles;
|
||||
}
|
||||
});
|
||||
const styles = {
|
||||
error: {
|
||||
// https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52
|
||||
fontFamily: 'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',
|
||||
height: '100vh',
|
||||
textAlign: 'center',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
},
|
||||
desc: {
|
||||
display: 'inline-block'
|
||||
},
|
||||
h1: {
|
||||
display: 'inline-block',
|
||||
margin: '0 20px 0 0',
|
||||
padding: '0 23px 0 0',
|
||||
fontSize: 24,
|
||||
fontWeight: 500,
|
||||
verticalAlign: 'top',
|
||||
lineHeight: '49px'
|
||||
},
|
||||
h2: {
|
||||
fontSize: 14,
|
||||
fontWeight: 400,
|
||||
lineHeight: '49px',
|
||||
margin: 0
|
||||
}
|
||||
};
|
||||
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=node_modules_next_dist_client_components_0wpq8j3._.js.map
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/builtin/not-found.tsx"],"sourcesContent":["import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback'\n\nexport default function NotFound() {\n return (\n <HTTPAccessErrorFallback\n status={404}\n message=\"This page could not be found.\"\n />\n )\n}\n"],"names":["NotFound","HTTPAccessErrorFallback","status","message"],"mappings":";;;+BAEA,WAAA;;;eAAwBA;;;;+BAFgB;AAEzB,SAASA;IACtB,OAAA,WAAA,GACE,CAAA,GAAA,YAAA,GAAA,EAACC,eAAAA,uBAAuB,EAAA;QACtBC,QAAQ;QACRC,SAAQ;;AAGd","ignoreList":[0]}},
|
||||
{"offset": {"line": 36, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/http-access-fallback/error-fallback.tsx"],"sourcesContent":["import { styles } from '../styles/access-error-styles'\n\nexport function HTTPAccessErrorFallback({\n status,\n message,\n}: {\n status: number\n message: string\n}) {\n return (\n <>\n {/* <head> */}\n <title>{`${status}: ${message}`}</title>\n {/* </head> */}\n <div style={styles.error}>\n <div>\n <style\n dangerouslySetInnerHTML={{\n /* Minified CSS from\n body { margin: 0; color: #000; background: #fff; }\n .next-error-h1 {\n border-right: 1px solid rgba(0, 0, 0, .3);\n }\n\n @media (prefers-color-scheme: dark) {\n body { color: #fff; background: #000; }\n .next-error-h1 {\n border-right: 1px solid rgba(255, 255, 255, .3);\n }\n }\n */\n __html: `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}`,\n }}\n />\n <h1 className=\"next-error-h1\" style={styles.h1}>\n {status}\n </h1>\n <div style={styles.desc}>\n <h2 style={styles.h2}>{message}</h2>\n </div>\n </div>\n </div>\n </>\n )\n}\n"],"names":["HTTPAccessErrorFallback","status","message","title","div","style","styles","error","dangerouslySetInnerHTML","__html","h1","className","desc","h2"],"mappings":";;;+BAEgBA,2BAAAA;;;eAAAA;;;;mCAFO;AAEhB,SAASA,wBAAwB,EACtCC,MAAM,EACNC,OAAO,EAIR;IACC,OAAA,WAAA,GACE,CAAA,GAAA,YAAA,IAAA,EAAA,YAAA,QAAA,EAAA;;0BAEE,CAAA,GAAA,YAAA,GAAA,EAACC,SAAAA;0BAAO,GAAGF,OAAO,EAAE,EAAEC,SAAS;;0BAE/B,CAAA,GAAA,YAAA,GAAA,EAACE,OAAAA;gBAAIC,OAAOC,mBAAAA,MAAM,CAACC,KAAK;0BACtB,WAAA,GAAA,CAAA,GAAA,YAAA,IAAA,EAACH,OAAAA;;sCACC,CAAA,GAAA,YAAA,GAAA,EAACC,SAAAA;4BACCG,yBAAyB;gCACvB;;;;;;;;;;;;cAYA,GACAC,QAAQ,CAAC,6NAA6N,CAAC;4BACzO;;sCAEF,CAAA,GAAA,YAAA,GAAA,EAACC,MAAAA;4BAAGC,WAAU;4BAAgBN,OAAOC,mBAAAA,MAAM,CAACI,EAAE;sCAC3CT;;sCAEH,CAAA,GAAA,YAAA,GAAA,EAACG,OAAAA;4BAAIC,OAAOC,mBAAAA,MAAM,CAACM,IAAI;sCACrB,WAAA,GAAA,CAAA,GAAA,YAAA,GAAA,EAACC,MAAAA;gCAAGR,OAAOC,mBAAAA,MAAM,CAACO,EAAE;0CAAGX;;;;;;;;AAMnC","ignoreList":[0]}},
|
||||
{"offset": {"line": 103, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/styles/access-error-styles.ts"],"sourcesContent":["export const styles: Record<string, React.CSSProperties> = {\n error: {\n // https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52\n fontFamily:\n 'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n height: '100vh',\n textAlign: 'center',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n\n desc: {\n display: 'inline-block',\n },\n\n h1: {\n display: 'inline-block',\n margin: '0 20px 0 0',\n padding: '0 23px 0 0',\n fontSize: 24,\n fontWeight: 500,\n verticalAlign: 'top',\n lineHeight: '49px',\n },\n\n h2: {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: '49px',\n margin: 0,\n },\n}\n"],"names":["styles","error","fontFamily","height","textAlign","display","flexDirection","alignItems","justifyContent","desc","h1","margin","padding","fontSize","fontWeight","verticalAlign","lineHeight","h2"],"mappings":";;;+BAAaA,UAAAA;;;eAAAA;;;AAAN,MAAMA,SAA8C;IACzDC,OAAO;QACL,0FAA0F;QAC1FC,YACE;QACFC,QAAQ;QACRC,WAAW;QACXC,SAAS;QACTC,eAAe;QACfC,YAAY;QACZC,gBAAgB;IAClB;IAEAC,MAAM;QACJJ,SAAS;IACX;IAEAK,IAAI;QACFL,SAAS;QACTM,QAAQ;QACRC,SAAS;QACTC,UAAU;QACVC,YAAY;QACZC,eAAe;QACfC,YAAY;IACd;IAEAC,IAAI;QACFJ,UAAU;QACVC,YAAY;QACZE,YAAY;QACZL,QAAQ;IACV;AACF","ignoreList":[0]}}]
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
module.exports = [
|
||||
"[project]/node_modules/next/dist/client/components/builtin/forbidden.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return Forbidden;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js [app-rsc] (ecmascript)");
|
||||
const _errorfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/error-fallback.js [app-rsc] (ecmascript)");
|
||||
function Forbidden() {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorfallback.HTTPAccessErrorFallback, {
|
||||
status: 403,
|
||||
message: "This page could not be accessed."
|
||||
});
|
||||
}
|
||||
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;
|
||||
}
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/builtin/forbidden.js [app-rsc] (ecmascript, Next.js Server Component)", (function(__turbopack_context__){
|
||||
|
||||
__turbopack_context__.n(__turbopack_context__.i("[project]/node_modules/next/dist/client/components/builtin/forbidden.js [app-rsc] (ecmascript)"));
|
||||
}),
|
||||
];
|
||||
|
||||
//# sourceMappingURL=node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js.map
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/builtin/forbidden.tsx"],"sourcesContent":["import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback'\n\nexport default function Forbidden() {\n return (\n <HTTPAccessErrorFallback\n status={403}\n message=\"This page could not be accessed.\"\n />\n )\n}\n"],"names":["Forbidden","HTTPAccessErrorFallback","status","message"],"mappings":";;;+BAEA,WAAA;;;eAAwBA;;;;+BAFgB;AAEzB,SAASA;IACtB,OAAA,WAAA,GACE,CAAA,GAAA,YAAA,GAAA,EAACC,eAAAA,uBAAuB,EAAA;QACtBC,QAAQ;QACRC,SAAQ;;AAGd","ignoreList":[0]}}]
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
module.exports = [
|
||||
"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (client reference proxy)", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
const { createClientModuleProxy } = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
__turbopack_context__.n(createClientModuleProxy("[project]/node_modules/next/dist/client/components/builtin/global-error.js"));
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (client reference proxy) <module evaluation>", ((__turbopack_context__, module, exports) => {
|
||||
|
||||
// This file is generated by next-core EcmascriptClientReferenceModule.
|
||||
const { createClientModuleProxy } = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)");
|
||||
__turbopack_context__.n(createClientModuleProxy("[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>"));
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (ecmascript)", ((__turbopack_context__) => {
|
||||
"use strict";
|
||||
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$client$2f$components$2f$builtin$2f$global$2d$error$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__$3c$module__evaluation$3e$__ = __turbopack_context__.i("[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (client reference proxy) <module evaluation>");
|
||||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$client$2f$components$2f$builtin$2f$global$2d$error$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (client reference proxy)");
|
||||
;
|
||||
__turbopack_context__.n(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$client$2f$components$2f$builtin$2f$global$2d$error$2e$js__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__);
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (ecmascript, Next.js Server Component)", (function(__turbopack_context__){
|
||||
|
||||
__turbopack_context__.n(__turbopack_context__.i("[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (ecmascript)"));
|
||||
}),
|
||||
];
|
||||
|
||||
//# sourceMappingURL=node_modules_next_dist_client_components_builtin_global-error_0-o-goa.js.map
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/client/components/builtin/global-error.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/client/components/builtin/global-error.js\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 9, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/client/components/builtin/global-error.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 16, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/builtin/global-error.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\nimport { handleISRError } from '../handle-isr-error'\nimport { errorStyles, errorThemeCss, WarningIcon } from './error-styles'\n\nexport type GlobalErrorComponent = React.ComponentType<{\n error: any\n reset: () => void\n retry: () => void\n}>\n\nfunction DefaultGlobalError({ error }: { error: any }) {\n const digest: string | undefined = error?.digest\n const isServerError = !!digest\n\n const message = isServerError\n ? 'A server error occurred. Reload to try again.'\n : 'Reload to try again, or go back.'\n\n handleISRError({ error })\n\n return (\n <html id=\"__next_error__\">\n <head>\n <style dangerouslySetInnerHTML={{ __html: errorThemeCss }} />\n </head>\n <body>\n <div style={errorStyles.container}>\n <div style={errorStyles.card}>\n <WarningIcon />\n <h1 style={errorStyles.title}>This page couldn’t load</h1>\n <p style={errorStyles.message}>{message}</p>\n <div style={errorStyles.buttonGroup}>\n <form style={errorStyles.form}>\n <button type=\"submit\" style={errorStyles.button}>\n Reload\n </button>\n </form>\n {!isServerError && (\n <button\n type=\"button\"\n style={errorStyles.buttonSecondary}\n onClick={() => {\n if (window.history.length > 1) {\n window.history.back()\n } else {\n window.location.href = '/'\n }\n }}\n >\n Back\n </button>\n )}\n </div>\n </div>\n </div>\n {digest && <p style={errorStyles.digestFooter}>ERROR {digest}</p>}\n </body>\n </html>\n )\n}\n\n// Exported so that the import signature in the loaders can be identical to user\n// supplied custom global error signatures.\nexport default DefaultGlobalError\n"],"names":["DefaultGlobalError","error","digest","isServerError","message","handleISRError","html","id","head","style","dangerouslySetInnerHTML","__html","errorThemeCss","body","div","errorStyles","container","card","WarningIcon","h1","title","p","buttonGroup","form","button","type","buttonSecondary","onClick","window","history","length","back","location","href","digestFooter"],"mappings":"","ignoreList":[0]}}]
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
module.exports = [
|
||||
"[project]/node_modules/next/dist/client/components/builtin/unauthorized.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return Unauthorized;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js [app-rsc] (ecmascript)");
|
||||
const _errorfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/error-fallback.js [app-rsc] (ecmascript)");
|
||||
function Unauthorized() {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorfallback.HTTPAccessErrorFallback, {
|
||||
status: 401,
|
||||
message: "You're not authorized to access this page."
|
||||
});
|
||||
}
|
||||
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;
|
||||
}
|
||||
}),
|
||||
"[project]/node_modules/next/dist/client/components/builtin/unauthorized.js [app-rsc] (ecmascript, Next.js Server Component)", (function(__turbopack_context__){
|
||||
|
||||
__turbopack_context__.n(__turbopack_context__.i("[project]/node_modules/next/dist/client/components/builtin/unauthorized.js [app-rsc] (ecmascript)"));
|
||||
}),
|
||||
];
|
||||
|
||||
//# sourceMappingURL=node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js.map
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/builtin/unauthorized.tsx"],"sourcesContent":["import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback'\n\nexport default function Unauthorized() {\n return (\n <HTTPAccessErrorFallback\n status={401}\n message=\"You're not authorized to access this page.\"\n />\n )\n}\n"],"names":["Unauthorized","HTTPAccessErrorFallback","status","message"],"mappings":";;;+BAEA,WAAA;;;eAAwBA;;;;+BAFgB;AAEzB,SAASA;IACtB,OAAA,WAAA,GACE,CAAA,GAAA,YAAA,GAAA,EAACC,eAAAA,uBAAuB,EAAA;QACtBC,QAAQ;QACRC,SAAQ;;AAGd","ignoreList":[0]}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n RequestCookies: () => RequestCookies,\n ResponseCookies: () => ResponseCookies,\n parseCookie: () => parseCookie,\n parseSetCookie: () => parseSetCookie,\n stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n var _a;\n const attrs = [\n \"path\" in c && c.path && `Path=${c.path}`,\n \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n \"domain\" in c && c.domain && `Domain=${c.domain}`,\n \"secure\" in c && c.secure && \"Secure\",\n \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n \"partitioned\" in c && c.partitioned && \"Partitioned\",\n \"priority\" in c && c.priority && `Priority=${c.priority}`\n ].filter(Boolean);\n const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n const map = /* @__PURE__ */ new Map();\n for (const pair of cookie.split(/; */)) {\n if (!pair)\n continue;\n const splitAt = pair.indexOf(\"=\");\n if (splitAt === -1) {\n map.set(pair, \"true\");\n continue;\n }\n const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n try {\n map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n } catch {\n }\n }\n return map;\n}\nfunction parseSetCookie(setCookie) {\n if (!setCookie) {\n return void 0;\n }\n const [[name, value], ...attributes] = parseCookie(setCookie);\n const {\n domain,\n expires,\n httponly,\n maxage,\n path,\n samesite,\n secure,\n partitioned,\n priority\n } = Object.fromEntries(\n attributes.map(([key, value2]) => [\n key.toLowerCase().replace(/-/g, \"\"),\n value2\n ])\n );\n const cookie = {\n name,\n value: decodeURIComponent(value),\n domain,\n ...expires && { expires: new Date(expires) },\n ...httponly && { httpOnly: true },\n ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n path,\n ...samesite && { sameSite: parseSameSite(samesite) },\n ...secure && { secure: true },\n ...priority && { priority: parsePriority(priority) },\n ...partitioned && { partitioned: true }\n };\n return compact(cookie);\n}\nfunction compact(t) {\n const newT = {};\n for (const key in t) {\n if (t[key]) {\n newT[key] = t[key];\n }\n }\n return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n string = string.toLowerCase();\n return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n string = string.toLowerCase();\n return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n if (!cookiesString)\n return [];\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n }\n while (pos < cookiesString.length) {\n start = pos;\n cookiesSeparatorFound = false;\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos);\n if (ch === \",\") {\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n Line truncated
|
||||
{"offset": {"line": 373, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/@opentelemetry/api/index.js"],"sourcesContent":["(()=>{\"use strict\";var e={912:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ContextAPI=void 0;const n=r(108);const a=r(221);const o=r(44);const i=\"context\";const c=new n.NoopContextManager;class ContextAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new ContextAPI}return this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||c}disable(){this._getContextManager().disable();(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=ContextAPI},44:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagAPI=void 0;const n=r(757);const a=r(412);const o=r(711);const i=r(221);const c=\"diag\";class DiagAPI{constructor(){function _logProxy(e){return function(...t){const r=(0,i.getGlobal)(\"diag\");if(!r)return;return r[e](...t)}}const e=this;const setLogger=(t,r={logLevel:o.DiagLogLevel.INFO})=>{var n,c,s;if(t===e){const t=new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");e.error((n=t.stack)!==null&&n!==void 0?n:t.message);return false}if(typeof r===\"number\"){r={logLevel:r}}const u=(0,i.getGlobal)(\"diag\");const l=(0,a.createLogLevelDiagLogger)((c=r.logLevel)!==null&&c!==void 0?c:o.DiagLogLevel.INFO,t);if(u&&!r.suppressOverrideMessage){const e=(s=(new Error).stack)!==null&&s!==void 0?s:\"<failed to generate stacktrace>\";u.warn(`Current logger will be overwritten from ${e}`);l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)(\"diag\",l,e,true)};e.setLogger=setLogger;e.disable=()=>{(0,i.unregisterGlobal)(c,e)};e.createComponentLogger=e=>new n.DiagComponentLogger(e);e.verbose=_logProxy(\"verbose\");e.debug=_logProxy(\"debug\");e.info=_logProxy(\"info\");e.warn=_logProxy(\"warn\");e.error=_logProxy(\"error\")}static instance(){if(!this._instance){this._instance=new DiagAPI}return this._instance}}t.DiagAPI=DiagAPI},262:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.MetricsAPI=void 0;const n=r(586);const a=r(221);const o=r(44);const i=\"metrics\";class MetricsAPI{constructor(){}static getInstance(){if(!this._instance){this._instance=new MetricsAPI}return this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=MetricsAPI},25:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.PropagationAPI=void 0;const n=r(221);const a=r(19);const o=r(92);const i=r(398);const c=r(504);const s=r(44);const u=\"propagation\";const l=new a.NoopTextMapPropagator;class PropagationAPI{constructor(){this.createBaggage=c.createBaggage;this.getBaggage=i.getBaggage;this.getActiveBaggage=i.getActiveBaggage;this.setBaggage=i.setBaggage;this.deleteBaggage=i.deleteBaggage}static getInstance(){if(!this._instance){this._instance=new PropagationAPI}return this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(u,e,s.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(u)||l}}t.PropagationAPI=PropagationAPI},397:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceAPI=void 0;const n=r(221);const a=r(498);const o=r(477);const i=r(793);const c=r(44);const s=\"trace\";class TraceAPI{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider;this.wrapSpanContext=o.wrapSpanContext;this.isSpanContextValid=o.isSpanContextValid;this.deleteSpan=i.deleteSpan;this.getSpan=i.getSpan;this.getActiveSpan=i.getActiveSpan;this.getSpanContext=i.getSpanContext;this.setSpan=i.setSpan;this.setSpanContext=i.setSpanContext}static getInstance(){if(!this._instance){this._instance=new TraceAPI}return this._instance}setGlobalTracerProvider(e){const t=(0,n.registerGlobal)(s,this._proxyTracerProvider,c.DiagAPI.instance());if(t){this._proxyTracerProvider.setDelegate(e)}return t}getTracerProvider(){return(0,n.getGlobal)(s)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(s,c.DiagAPI.instance());this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=TraceAPI},398:(eLine truncated
|
||||
{"offset": {"line": 1858, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/bytes/index.js"],"sourcesContent":["(()=>{\"use strict\";var e={86:e=>{\n/*!\n * bytes\n * Copyright(c) 2012-2014 TJ Holowaychuk\n * Copyright(c) 2015 Jed Watson\n * MIT Licensed\n */\ne.exports=bytes;e.exports.format=format;e.exports.parse=parse;var r=/\\B(?=(\\d{3})+(?!\\d))/g;var a=/(?:\\.0*|(\\.[^0]+)0+)$/;var t={b:1,kb:1<<10,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)};var i=/^((-|\\+)?(\\d+(?:\\.\\d+)?)) *(kb|mb|gb|tb|pb)$/i;function bytes(e,r){if(typeof e===\"string\"){return parse(e)}if(typeof e===\"number\"){return format(e,r)}return null}function format(e,i){if(!Number.isFinite(e)){return null}var n=Math.abs(e);var o=i&&i.thousandsSeparator||\"\";var s=i&&i.unitSeparator||\"\";var f=i&&i.decimalPlaces!==undefined?i.decimalPlaces:2;var u=Boolean(i&&i.fixedDecimals);var p=i&&i.unit||\"\";if(!p||!t[p.toLowerCase()]){if(n>=t.pb){p=\"PB\"}else if(n>=t.tb){p=\"TB\"}else if(n>=t.gb){p=\"GB\"}else if(n>=t.mb){p=\"MB\"}else if(n>=t.kb){p=\"KB\"}else{p=\"B\"}}var b=e/t[p.toLowerCase()];var l=b.toFixed(f);if(!u){l=l.replace(a,\"$1\")}if(o){l=l.split(\".\").map((function(e,a){return a===0?e.replace(r,o):e})).join(\".\")}return l+s+p}function parse(e){if(typeof e===\"number\"&&!isNaN(e)){return e}if(typeof e!==\"string\"){return null}var r=i.exec(e);var a;var n=\"b\";if(!r){a=parseInt(e,10);n=\"b\"}else{a=parseFloat(r[1]);n=r[4].toLowerCase()}return Math.floor(t[n]*a)}}};var r={};function __nccwpck_require__(a){var t=r[a];if(t!==undefined){return t.exports}var i=r[a]={exports:{}};var n=true;try{e[a](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete r[a]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var a=__nccwpck_require__(86);module.exports=a})();"],"names":["e","exports","bytes","format","parse","r","a","t","b","kb","mb","gb","tb","Math","pow","pb","i","Number","isFinite","n","abs","o","thousandsSeparator","s","unitSeparator","f","decimalPlaces","undefined","u","Boolean","fixedDecimals","p","unit","toLowerCase","l","toFixed","replace","split","map","join","isNaN","exec","parseInt","parseFloat","floor","__nccwpck_require__","ab","module"],"mappings":"AAAA,CAAC;IAAK;IAAa,IAAIA,IAAE;QAAC,IAAGA,CAAAA;YAC7B;;;;;CAKC,GACDA,EAAEC,OAAO,GAACC;YAAMF,EAAEC,OAAO,CAACE,MAAM,GAACA;YAAOH,EAAEC,OAAO,CAACG,KAAK,GAACA;YAAM,IAAIC,IAAE;YAAwB,IAAIC,IAAE;YAAwB,IAAIC,IAAE;gBAACC,GAAE;gBAAEC,IAAG,KAAG;gBAAGC,IAAG,KAAG;gBAAGC,IAAG,KAAG;gBAAGC,IAAGC,KAAKC,GAAG,CAAC,MAAK;gBAAGC,IAAGF,KAAKC,GAAG,CAAC,MAAK;YAAE;YAAE,IAAIE,IAAE;YAAgD,SAASd,MAAMF,CAAC,EAACK,CAAC;gBAAE,IAAG,OAAOL,MAAI,UAAS;oBAAC,OAAOI,MAAMJ;gBAAE;gBAAC,IAAG,OAAOA,MAAI,UAAS;oBAAC,OAAOG,OAAOH,GAAEK;gBAAE;gBAAC,OAAO;YAAI;YAAC,SAASF,OAAOH,CAAC,EAACgB,CAAC;gBAAE,IAAG,CAACC,OAAOC,QAAQ,CAAClB,IAAG;oBAAC,OAAO;gBAAI;gBAAC,IAAImB,IAAEN,KAAKO,GAAG,CAACpB;gBAAG,IAAIqB,IAAEL,KAAGA,EAAEM,kBAAkB,IAAE;gBAAG,IAAIC,IAAEP,KAAGA,EAAEQ,aAAa,IAAE;gBAAG,IAAIC,IAAET,KAAGA,EAAEU,aAAa,KAAGC,YAAUX,EAAEU,aAAa,GAAC;gBAAE,IAAIE,IAAEC,QAAQb,KAAGA,EAAEc,aAAa;gBAAE,IAAIC,IAAEf,KAAGA,EAAEgB,IAAI,IAAE;gBAAG,IAAG,CAACD,KAAG,CAACxB,CAAC,CAACwB,EAAEE,WAAW,GAAG,EAAC;oBAAC,IAAGd,KAAGZ,EAAEQ,EAAE,EAAC;wBAACgB,IAAE;oBAAI,OAAM,IAAGZ,KAAGZ,EAAEK,EAAE,EAAC;wBAACmB,IAAE;oBAAI,OAAM,IAAGZ,KAAGZ,EAAEI,EAAE,EAAC;wBAACoB,IAAE;oBAAI,OAAM,IAAGZ,KAAGZ,EAAEG,EAAE,EAAC;wBAACqB,IAAE;oBAAI,OAAM,IAAGZ,KAAGZ,EAAEE,EAAE,EAAC;wBAACsB,IAAE;oBAAI,OAAK;wBAACA,IAAE;oBAAG;gBAAC;gBAAC,IAAIvB,IAAER,IAAEO,CAAC,CAACwB,EAAEE,WAAW,GAAG;gBAAC,IAAIC,IAAE1B,EAAE2B,OAAO,CAACV;gBAAG,IAAG,CAACG,GAAE;oBAACM,IAAEA,EAAEE,OAAO,CAAC9B,GAAE;gBAAK;gBAAC,IAAGe,GAAE;oBAACa,IAAEA,EAAEG,KAAK,CAAC,KAAKC,GAAG,CAAE,SAAStC,CAAC,EAACM,CAAC;wBAAE,OAAOA,MAAI,IAAEN,EAAEoC,OAAO,CAAC/B,GAAEgB,KAAGrB;oBAAC,GAAIuC,IAAI,CAAC;gBAAI;gBAAC,OAAOL,IAAEX,IAAEQ;YAAC;YAAC,SAAS3B,MAAMJ,CAAC;gBAAE,IAAG,OAAOA,MAAI,YAAU,CAACwC,MAAMxC,IAAG;oBAAC,OAAOA;gBAAC;gBAAC,IAAG,OAAOA,MAAI,UAAS;oBAAC,OAAO;gBAAI;gBAAC,IAAIK,IAAEW,EAAEyB,IAAI,CAACzC;gBAAG,IAAIM;gBAAE,IAAIa,IAAE;gBAAI,IAAG,CAACd,GAAE;oBAACC,IAAEoC,SAAS1C,GAAE;oBAAImB,IAAE;gBAAG,OAAK;oBAACb,IAAEqC,WAAWtC,CAAC,CAAC,EAAE;oBAAEc,IAAEd,CAAC,CAAC,EAAE,CAAC4B,WAAW;gBAAE;gBAAC,OAAOpB,KAAK+B,KAAK,CAACrC,CAAC,CAACY,EAAE,GAACb;YAAE;QAAC;IAAC;IAAE,IAAID,IAAE,CAAC;IAAE,SAASwC,oBAAoBvC,CAAC;QAAE,IAAIC,IAAEF,CAAC,CAACC,EAAE;QAAC,IAAGC,MAAIoB,WAAU;YAAC,OAAOpB,EAAEN,OAAO;QAAA;QAAC,IAAIe,IAAEX,CAAC,CAACC,EAAE,GAAC;YAACL,SAAQ,CAAC;QAAC;QAAE,IAAIkB,IAAE;QAAK,IAAG;YAACnB,CAAC,CAACM,EAAE,CAACU,GAAEA,EAAEf,OAAO,EAAC4C;YAAqB1B,IAAE;QAAK,SAAQ;YAAC,IAAGA,GAAE,OAAOd,CAAC,CAACC,EAAE;QAAA;QAAC,OAAOU,EAAEf,OAAO;IAAA;IAAC,IAAG,OAAO4C,wBAAsB,aAAYA,oBAAoBC,EAAE,GAAC,kFAAU;IAAI,IAAIxC,IAAEuC,oBAAoB;IAAIE,OAAO9C,OAAO,GAACK;AAAC,CAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 1973, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/cookie/index.js"],"sourcesContent":["(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var r=e;\n/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;function parse(e,r){if(typeof e!==\"string\"){throw new TypeError(\"argument str must be a string\")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p<o.length;p++){var f=o[p];var u=f.indexOf(\"=\");if(u<0){continue}var v=f.substr(0,u).trim();var c=f.substr(++u,f.length).trim();if('\"'==c[0]){c=c.slice(1,-1)}if(undefined==t[v]){t[v]=tryDecode(c,s)}}return t}function serialize(e,r,i){var a=i||{};var o=a.encode||t;if(typeof o!==\"function\"){throw new TypeError(\"option encode is invalid\")}if(!n.test(e)){throw new TypeError(\"argument name is invalid\")}var s=o(r);if(s&&!n.test(s)){throw new TypeError(\"argument val is invalid\")}var p=e+\"=\"+s;if(null!=a.maxAge){var f=a.maxAge-0;if(isNaN(f)||!isFinite(f)){throw new TypeError(\"option maxAge is invalid\")}p+=\"; Max-Age=\"+Math.floor(f)}if(a.domain){if(!n.test(a.domain)){throw new TypeError(\"option domain is invalid\")}p+=\"; Domain=\"+a.domain}if(a.path){if(!n.test(a.path)){throw new TypeError(\"option path is invalid\")}p+=\"; Path=\"+a.path}if(a.expires){if(typeof a.expires.toUTCString!==\"function\"){throw new TypeError(\"option expires is invalid\")}p+=\"; Expires=\"+a.expires.toUTCString()}if(a.httpOnly){p+=\"; HttpOnly\"}if(a.secure){p+=\"; Secure\"}if(a.sameSite){var u=typeof a.sameSite===\"string\"?a.sameSite.toLowerCase():a.sameSite;switch(u){case true:p+=\"; SameSite=Strict\";break;case\"lax\":p+=\"; SameSite=Lax\";break;case\"strict\":p+=\"; SameSite=Strict\";break;case\"none\":p+=\"; SameSite=None\";break;default:throw new TypeError(\"option sameSite is invalid\")}}return p}function tryDecode(e,r){try{return r(e)}catch(r){return e}}})();module.exports=e})();"],"names":["__nccwpck_require__","ab","e","r","parse","serialize","i","decodeURIComponent","t","encodeURIComponent","a","n","TypeError","o","split","s","decode","p","length","f","u","indexOf","v","substr","trim","c","slice","undefined","tryDecode","encode","test","maxAge","isNaN","isFinite","Math","floor","domain","path","expires","toUTCString","httpOnly","secure","sameSite","toLowerCase","module","exports"],"mappings":"AAAA,CAAC;IAAK;IAAa,IAAG,OAAOA,wBAAsB,aAAYA,oBAAoBC,EAAE,GAAC,mFAAU;IAAI,IAAIC,IAAE,CAAC;IAAE,CAAC;QAAK,IAAIC,IAAED;QACzH;;;;;CAKC,GAAEC,EAAEC,KAAK,GAACA;QAAMD,EAAEE,SAAS,GAACA;QAAU,IAAIC,IAAEC;QAAmB,IAAIC,IAAEC;QAAmB,IAAIC,IAAE;QAAM,IAAIC,IAAE;QAAwC,SAASP,MAAMF,CAAC,EAACC,CAAC;YAAE,IAAG,OAAOD,MAAI,UAAS;gBAAC,MAAM,IAAIU,UAAU;YAAgC;YAAC,IAAIJ,IAAE,CAAC;YAAE,IAAIG,IAAER,KAAG,CAAC;YAAE,IAAIU,IAAEX,EAAEY,KAAK,CAACJ;YAAG,IAAIK,IAAEJ,EAAEK,MAAM,IAAEV;YAAE,IAAI,IAAIW,IAAE,GAAEA,IAAEJ,EAAEK,MAAM,EAACD,IAAI;gBAAC,IAAIE,IAAEN,CAAC,CAACI,EAAE;gBAAC,IAAIG,IAAED,EAAEE,OAAO,CAAC;gBAAK,IAAGD,IAAE,GAAE;oBAAC;gBAAQ;gBAAC,IAAIE,IAAEH,EAAEI,MAAM,CAAC,GAAEH,GAAGI,IAAI;gBAAG,IAAIC,IAAEN,EAAEI,MAAM,CAAC,EAAEH,GAAED,EAAED,MAAM,EAAEM,IAAI;gBAAG,IAAG,OAAKC,CAAC,CAAC,EAAE,EAAC;oBAACA,IAAEA,EAAEC,KAAK,CAAC,GAAE,CAAC;gBAAE;gBAAC,IAAGC,aAAWnB,CAAC,CAACc,EAAE,EAAC;oBAACd,CAAC,CAACc,EAAE,GAACM,UAAUH,GAAEV;gBAAE;YAAC;YAAC,OAAOP;QAAC;QAAC,SAASH,UAAUH,CAAC,EAACC,CAAC,EAACG,CAAC;YAAE,IAAII,IAAEJ,KAAG,CAAC;YAAE,IAAIO,IAAEH,EAAEmB,MAAM,IAAErB;YAAE,IAAG,OAAOK,MAAI,YAAW;gBAAC,MAAM,IAAID,UAAU;YAA2B;YAAC,IAAG,CAACD,EAAEmB,IAAI,CAAC5B,IAAG;gBAAC,MAAM,IAAIU,UAAU;YAA2B;YAAC,IAAIG,IAAEF,EAAEV;YAAG,IAAGY,KAAG,CAACJ,EAAEmB,IAAI,CAACf,IAAG;gBAAC,MAAM,IAAIH,UAAU;YAA0B;YAAC,IAAIK,IAAEf,IAAE,MAAIa;YAAE,IAAG,QAAML,EAAEqB,MAAM,EAAC;gBAAC,IAAIZ,IAAET,EAAEqB,MAAM,GAAC;gBAAE,IAAGC,MAAMb,MAAI,CAACc,SAASd,IAAG;oBAAC,MAAM,IAAIP,UAAU;gBAA2B;gBAACK,KAAG,eAAaiB,KAAKC,KAAK,CAAChB;YAAE;YAAC,IAAGT,EAAE0B,MAAM,EAAC;gBAAC,IAAG,CAACzB,EAAEmB,IAAI,CAACpB,EAAE0B,MAAM,GAAE;oBAAC,MAAM,IAAIxB,UAAU;gBAA2B;gBAACK,KAAG,cAAYP,EAAE0B,MAAM;YAAA;YAAC,IAAG1B,EAAE2B,IAAI,EAAC;gBAAC,IAAG,CAAC1B,EAAEmB,IAAI,CAACpB,EAAE2B,IAAI,GAAE;oBAAC,MAAM,IAAIzB,UAAU;gBAAyB;gBAACK,KAAG,YAAUP,EAAE2B,IAAI;YAAA;YAAC,IAAG3B,EAAE4B,OAAO,EAAC;gBAAC,IAAG,OAAO5B,EAAE4B,OAAO,CAACC,WAAW,KAAG,YAAW;oBAAC,MAAM,IAAI3B,UAAU;gBAA4B;gBAACK,KAAG,eAAaP,EAAE4B,OAAO,CAACC,WAAW;YAAE;YAAC,IAAG7B,EAAE8B,QAAQ,EAAC;gBAACvB,KAAG;YAAY;YAAC,IAAGP,EAAE+B,MAAM,EAAC;gBAACxB,KAAG;YAAU;YAAC,IAAGP,EAAEgC,QAAQ,EAAC;gBAAC,IAAItB,IAAE,OAAOV,EAAEgC,QAAQ,KAAG,WAAShC,EAAEgC,QAAQ,CAACC,WAAW,KAAGjC,EAAEgC,QAAQ;gBAAC,OAAOtB;oBAAG,KAAK;wBAAKH,KAAG;wBAAoB;oBAAM,KAAI;wBAAMA,KAAG;wBAAiB;oBAAM,KAAI;wBAASA,KAAG;wBAAoB;oBAAM,KAAI;wBAAOA,KAAG;wBAAkB;oBAAM;wBAAQ,MAAM,IAAIL,UAAU;gBAA6B;YAAC;YAAC,OAAOK;QAAC;QAAC,SAASW,UAAU1BLine truncated
|
||||
{"offset": {"line": 2094, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/fresh/index.js"],"sourcesContent":["(()=>{\"use strict\";var e={928:e=>{\n/*!\n * fresh\n * Copyright(c) 2012 TJ Holowaychuk\n * Copyright(c) 2016-2017 Douglas Christopher Wilson\n * MIT Licensed\n */\nvar r=/(?:^|,)\\s*?no-cache\\s*?(?:,|$)/;e.exports=fresh;function fresh(e,a){var t=e[\"if-modified-since\"];var s=e[\"if-none-match\"];if(!t&&!s){return false}var i=e[\"cache-control\"];if(i&&r.test(i)){return false}if(s&&s!==\"*\"){var f=a[\"etag\"];if(!f){return false}var n=true;var u=parseTokenList(s);for(var _=0;_<u.length;_++){var o=u[_];if(o===f||o===\"W/\"+f||\"W/\"+o===f){n=false;break}}if(n){return false}}if(t){var p=a[\"last-modified\"];var v=!p||!(parseHttpDate(p)<=parseHttpDate(t));if(v){return false}}return true}function parseHttpDate(e){var r=e&&Date.parse(e);return typeof r===\"number\"?r:NaN}function parseTokenList(e){var r=0;var a=[];var t=0;for(var s=0,i=e.length;s<i;s++){switch(e.charCodeAt(s)){case 32:if(t===r){t=r=s+1}break;case 44:a.push(e.substring(t,r));t=r=s+1;break;default:r=s+1;break}}a.push(e.substring(t,r));return a}}};var r={};function __nccwpck_require__(a){var t=r[a];if(t!==undefined){return t.exports}var s=r[a]={exports:{}};var i=true;try{e[a](s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete r[a]}return s.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var a=__nccwpck_require__(928);module.exports=a})();"],"names":["e","r","exports","fresh","a","t","s","i","test","f","n","u","parseTokenList","_","length","o","p","v","parseHttpDate","Date","parse","NaN","charCodeAt","push","substring","__nccwpck_require__","undefined","ab","module"],"mappings":"AAAA,CAAC;IAAK;IAAa,IAAIA,IAAE;QAAC,KAAIA,CAAAA;YAC9B;;;;;CAKC,GACD,IAAIC,IAAE;YAAiCD,EAAEE,OAAO,GAACC;YAAM,SAASA,MAAMH,CAAC,EAACI,CAAC;gBAAE,IAAIC,IAAEL,CAAC,CAAC,oBAAoB;gBAAC,IAAIM,IAAEN,CAAC,CAAC,gBAAgB;gBAAC,IAAG,CAACK,KAAG,CAACC,GAAE;oBAAC,OAAO;gBAAK;gBAAC,IAAIC,IAAEP,CAAC,CAAC,gBAAgB;gBAAC,IAAGO,KAAGN,EAAEO,IAAI,CAACD,IAAG;oBAAC,OAAO;gBAAK;gBAAC,IAAGD,KAAGA,MAAI,KAAI;oBAAC,IAAIG,IAAEL,CAAC,CAAC,OAAO;oBAAC,IAAG,CAACK,GAAE;wBAAC,OAAO;oBAAK;oBAAC,IAAIC,IAAE;oBAAK,IAAIC,IAAEC,eAAeN;oBAAG,IAAI,IAAIO,IAAE,GAAEA,IAAEF,EAAEG,MAAM,EAACD,IAAI;wBAAC,IAAIE,IAAEJ,CAAC,CAACE,EAAE;wBAAC,IAAGE,MAAIN,KAAGM,MAAI,OAAKN,KAAG,OAAKM,MAAIN,GAAE;4BAACC,IAAE;4BAAM;wBAAK;oBAAC;oBAAC,IAAGA,GAAE;wBAAC,OAAO;oBAAK;gBAAC;gBAAC,IAAGL,GAAE;oBAAC,IAAIW,IAAEZ,CAAC,CAAC,gBAAgB;oBAAC,IAAIa,IAAE,CAACD,KAAG,CAAC,CAACE,cAAcF,MAAIE,cAAcb,EAAE;oBAAE,IAAGY,GAAE;wBAAC,OAAO;oBAAK;gBAAC;gBAAC,OAAO;YAAI;YAAC,SAASC,cAAclB,CAAC;gBAAE,IAAIC,IAAED,KAAGmB,KAAKC,KAAK,CAACpB;gBAAG,OAAO,OAAOC,MAAI,WAASA,IAAEoB;YAAG;YAAC,SAAST,eAAeZ,CAAC;gBAAE,IAAIC,IAAE;gBAAE,IAAIG,IAAE,EAAE;gBAAC,IAAIC,IAAE;gBAAE,IAAI,IAAIC,IAAE,GAAEC,IAAEP,EAAEc,MAAM,EAACR,IAAEC,GAAED,IAAI;oBAAC,OAAON,EAAEsB,UAAU,CAAChB;wBAAI,KAAK;4BAAG,IAAGD,MAAIJ,GAAE;gCAACI,IAAEJ,IAAEK,IAAE;4BAAC;4BAAC;wBAAM,KAAK;4BAAGF,EAAEmB,IAAI,CAACvB,EAAEwB,SAAS,CAACnB,GAAEJ;4BAAII,IAAEJ,IAAEK,IAAE;4BAAE;wBAAM;4BAAQL,IAAEK,IAAE;4BAAE;oBAAK;gBAAC;gBAACF,EAAEmB,IAAI,CAACvB,EAAEwB,SAAS,CAACnB,GAAEJ;gBAAI,OAAOG;YAAC;QAAC;IAAC;IAAE,IAAIH,IAAE,CAAC;IAAE,SAASwB,oBAAoBrB,CAAC;QAAE,IAAIC,IAAEJ,CAAC,CAACG,EAAE;QAAC,IAAGC,MAAIqB,WAAU;YAAC,OAAOrB,EAAEH,OAAO;QAAA;QAAC,IAAII,IAAEL,CAAC,CAACG,EAAE,GAAC;YAACF,SAAQ,CAAC;QAAC;QAAE,IAAIK,IAAE;QAAK,IAAG;YAACP,CAAC,CAACI,EAAE,CAACE,GAAEA,EAAEJ,OAAO,EAACuB;YAAqBlB,IAAE;QAAK,SAAQ;YAAC,IAAGA,GAAE,OAAON,CAAC,CAACG,EAAE;QAAA;QAAC,OAAOE,EAAEJ,OAAO;IAAA;IAAC,IAAG,OAAOuB,wBAAsB,aAAYA,oBAAoBE,EAAE,GAAC,kFAAU;IAAI,IAAIvB,IAAEqB,oBAAoB;IAAKG,OAAO1B,OAAO,GAACE;AAAC,CAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 2197, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js"],"sourcesContent":["/**\n * @license React\n * react-server-dom-turbopack-client.node.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function checkEvalAvailabilityOnceDev() {\n if (!hasConfirmedEval) {\n hasConfirmedEval = !0;\n try {\n (0, eval)(\"null\");\n } catch ($jscomp$unused$catch) {\n console.error(\n \"eval() is not supported in this environment. This can happen if you started the Node.js process with --disallow-code-generation-from-strings, or if `eval` was patched by other means. React requires eval() in development mode for various debugging features like reconstructing callstacks from a different environment.\\nReact will never use eval() in production mode\"\n );\n }\n }\n }\n function resolveClientReference(bundlerConfig, metadata) {\n if (bundlerConfig) {\n var moduleExports = bundlerConfig[metadata[0]];\n if ((bundlerConfig = moduleExports && moduleExports[metadata[2]]))\n moduleExports = bundlerConfig.name;\n else {\n bundlerConfig = moduleExports && moduleExports[\"*\"];\n if (!bundlerConfig)\n throw Error(\n 'Could not find the module \"' +\n metadata[0] +\n '\" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.'\n );\n moduleExports = metadata[2];\n }\n return 4 === metadata.length\n ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1]\n : [bundlerConfig.id, bundlerConfig.chunks, moduleExports];\n }\n return metadata;\n }\n function resolveServerReference(bundlerConfig, id) {\n var name = \"\",\n resolvedModuleData = bundlerConfig[id];\n if (resolvedModuleData) name = resolvedModuleData.name;\n else {\n var idx = id.lastIndexOf(\"#\");\n -1 !== idx &&\n ((name = id.slice(idx + 1)),\n (resolvedModuleData = bundlerConfig[id.slice(0, idx)]));\n if (!resolvedModuleData)\n throw Error(\n 'Could not find the module \"' +\n id +\n '\" in the React Server Manifest. This is probably a bug in the React Server Components bundler.'\n );\n }\n return resolvedModuleData.async\n ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1]\n : [resolvedModuleData.id, resolvedModuleData.chunks, name];\n }\n function requireAsyncModule(id) {\n var promise = globalThis.__next_require__(id);\n if (\"function\" !== typeof promise.then || \"fulfilled\" === promise.status)\n return null;\n promise.then(\n function (value) {\n promise.status = \"fulfilled\";\n promise.value = value;\n },\n function (reason) {\n promise.status = \"rejected\";\n promise.reason = reason;\n }\n );\n return promise;\n }\n function ignoreReject() {}\n function preloadModule(metadata) {\n for (\n var chunks = metadata[1], promises = [], i = 0;\n i < chunks.length;\n i++\n ) {\n var thenable = globalThis.__next_chunk_load__(chunks[i]);\n loadedChunks.has(thenable) || promises.push(thenable);\n if (!instrumentedChunks.has(thenable)) {\n var resolve = loadedChunks.add.bind(loadedChunks, thenable);\n thenable.then(resolve, ignoreReject);\n instrumentedChunks.add(thenable);\n }\n }\n return 4 === metadata.length\n ? 0 === promises.length\n ? requireAsyncModule(metadata[0])\n : Promise.all(promises).then(function () {\n return requireAsyncModule(metadata[0]);\n })\n : 0 < promises.length\n ? Promise.all(promises)\n : null;\n }\n function requireModule(metadata) {\n var moduleExports = globalThis.__next_require__(metadata[0]);\n if (4 === metadata.length && \"function\" === typeof moduleExports.then)\n if (\"fulfilled\" === moduleExports.status)\n moduleExports = moduleExports.value;\n else throw moduleExports.reason;\n if (\"*\" === metadata[2]) return moduleExports;\n if (\"\" === metadata[2])\n return moduleExports.__esModule ? moduleExports.default : moduleExports;\n if (hasOwnProperty.call(moduleExports, metadata[2]))\n return moduleExports[metadata[2]];\n }\n funcLine truncated
|
||||
{"offset": {"line": 5187, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/react-server-dom-turbopack/client.node.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-server-dom-turbopack-client.node.production.js');\n} else {\n module.exports = require('./cjs/react-server-dom-turbopack-client.node.development.js');\n}\n"],"names":["module","exports"],"mappings":"AAEA;;KAEO;IACLA,OAAOC,OAAO;AAChB","ignoreList":[0]}},
|
||||
{"offset": {"line": 5195, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/compiled/string-hash/index.js"],"sourcesContent":["(()=>{\"use strict\";var e={36:e=>{function hash(e){var r=5381,_=e.length;while(_){r=r*33^e.charCodeAt(--_)}return r>>>0}e.exports=hash}};var r={};function __nccwpck_require__(_){var a=r[_];if(a!==undefined){return a.exports}var t=r[_]={exports:{}};var i=true;try{e[_](t,t.exports,__nccwpck_require__);i=false}finally{if(i)delete r[_]}return t.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var _=__nccwpck_require__(36);module.exports=_})();"],"names":["e","hash","r","_","length","charCodeAt","exports","__nccwpck_require__","a","undefined","t","i","ab","module"],"mappings":"AAAA,CAAC;IAAK;IAAa,IAAIA,IAAE;QAAC,IAAGA,CAAAA;YAAI,SAASC,KAAKD,CAAC;gBAAE,IAAIE,IAAE,MAAKC,IAAEH,EAAEI,MAAM;gBAAC,MAAMD,EAAE;oBAACD,IAAEA,IAAE,KAAGF,EAAEK,UAAU,CAAC,EAAEF;gBAAE;gBAAC,OAAOD,MAAI;YAAC;YAACF,EAAEM,OAAO,GAACL;QAAI;IAAC;IAAE,IAAIC,IAAE,CAAC;IAAE,SAASK,oBAAoBJ,CAAC;QAAE,IAAIK,IAAEN,CAAC,CAACC,EAAE;QAAC,IAAGK,MAAIC,WAAU;YAAC,OAAOD,EAAEF,OAAO;QAAA;QAAC,IAAII,IAAER,CAAC,CAACC,EAAE,GAAC;YAACG,SAAQ,CAAC;QAAC;QAAE,IAAIK,IAAE;QAAK,IAAG;YAACX,CAAC,CAACG,EAAE,CAACO,GAAEA,EAAEJ,OAAO,EAACC;YAAqBI,IAAE;QAAK,SAAQ;YAAC,IAAGA,GAAE,OAAOT,CAAC,CAACC,EAAE;QAAA;QAAC,OAAOO,EAAEJ,OAAO;IAAA;IAAC,IAAG,OAAOC,wBAAsB,aAAYA,oBAAoBK,EAAE,GAAC,wFAAU;IAAI,IAAIT,IAAEI,oBAAoB;IAAIM,OAAOP,OAAO,GAACH;AAAC,CAAC","ignoreList":[0]}}]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,191 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/output/log.ts"],"sourcesContent":["import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'\nimport { LRUCache } from '../../server/lib/lru-cache'\n\nexport const prefixes = {\n wait: white(bold('○')),\n error: red(bold('⨯')),\n warn: yellow(bold('⚠')),\n ready: '▲', // no color\n info: white(bold(' ')),\n event: green(bold('✓')),\n trace: magenta(bold('»')),\n} as const\n\nconst LOGGING_METHOD = {\n log: 'log',\n warn: 'warn',\n error: 'error',\n} as const\n\nfunction prefixedLog(prefixType: keyof typeof prefixes, ...message: any[]) {\n if ((message[0] === '' || message[0] === undefined) && message.length === 1) {\n message.shift()\n }\n\n const consoleMethod: keyof typeof LOGGING_METHOD =\n prefixType in LOGGING_METHOD\n ? LOGGING_METHOD[prefixType as keyof typeof LOGGING_METHOD]\n : 'log'\n\n const prefix = prefixes[prefixType]\n // If there's no message, don't print the prefix but a new line\n if (message.length === 0) {\n console[consoleMethod]('')\n } else {\n // Ensure if there's ANSI escape codes it's concatenated into one string.\n // Chrome DevTool can only handle color if it's in one string.\n if (message.length === 1 && typeof message[0] === 'string') {\n console[consoleMethod](prefix + ' ' + message[0])\n } else {\n console[consoleMethod](prefix, ...message)\n }\n }\n}\n\nexport function bootstrap(message: string) {\n console.log(message)\n}\n\nexport function wait(...message: any[]) {\n prefixedLog('wait', ...message)\n}\n\nexport function error(...message: any[]) {\n prefixedLog('error', ...message)\n}\n\nexport function warn(...message: any[]) {\n prefixedLog('warn', ...message)\n}\n\nexport function ready(...message: any[]) {\n prefixedLog('ready', ...message)\n}\n\nexport function info(...message: any[]) {\n prefixedLog('info', ...message)\n}\n\nexport function event(...message: any[]) {\n prefixedLog('event', ...message)\n}\n\nexport function trace(...message: any[]) {\n prefixedLog('trace', ...message)\n}\n\nconst warnOnceCache = new LRUCache<string>(10_000, (value) => value.length)\nexport function warnOnce(...message: any[]) {\n const key = message.join(' ')\n if (!warnOnceCache.has(key)) {\n warnOnceCache.set(key, key)\n warn(...message)\n }\n}\n\nconst errorOnceCache = new LRUCache<string>(10_000, (value) => value.length)\nexport function errorOnce(...message: any[]) {\n const key = message.join(' ')\n if (!errorOnceCache.has(key)) {\n errorOnceCache.set(key, key)\n error(...message)\n }\n}\n"],"names":["bold","green","magenta","red","yellow","white","LRUCache","prefixes","wait","error","warn","ready","info","event","trace","LOGGING_METHOD","log","prefixedLog","prefixType","message","undefined","length","shift","consoleMethod","prefix","console","bootstrap","warnOnceCache","value","warnOnce","key","join","has","set","errorOnceCache","errorOnce"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAEC,GAAG,EAAEC,MAAM,EAAEC,KAAK,QAAQ,uBAAsB;AAC/E,SAASC,QAAQ,QAAQ,6BAA4B;;;AAE9C,MAAMC,WAAW;IACtBC,UAAMH,iKAAAA,MAAML,gKAAAA,EAAK;IACjBS,WAAON,+JAAAA,MAAIH,gKAAAA,EAAK;IAChBU,UAAMN,kKAAAA,MAAOJ,gKAAAA,EAAK;IAClBW,OAAO;IACPC,UAAMP,iKAAAA,MAAML,gKAAAA,EAAK;IACjBa,WAAOZ,iKAAAA,MAAMD,gKAAAA,EAAK;IAClBc,WAAOZ,mKAAAA,MAAQF,gKAAAA,EAAK;AACtB,EAAU;AAEV,MAAMe,iBAAiB;IACrBC,KAAK;IACLN,MAAM;IACND,OAAO;AACT;AAEA,SAASQ,YAAYC,UAAiC,EAAE,GAAGC,OAAc;IACvE,IAAKA,CAAAA,OAAO,CAAC,EAAE,KAAK,MAAMA,OAAO,CAAC,EAAE,KAAKC,SAAQ,KAAMD,QAAQE,MAAM,KAAK,GAAG;QAC3EF,QAAQG,KAAK;IACf;IAEA,MAAMC,gBACJL,cAAcH,iBACVA,cAAc,CAACG,WAA0C,GACzD;IAEN,MAAMM,SAASjB,QAAQ,CAACW,WAAW;IACnC,+DAA+D;IAC/D,IAAIC,QAAQE,MAAM,KAAK,GAAG;QACxBI,OAAO,CAACF,cAAc,CAAC;IACzB,OAAO;QACL,yEAAyE;QACzE,8DAA8D;QAC9D,IAAIJ,QAAQE,MAAM,KAAK,KAAK,OAAOF,OAAO,CAAC,EAAE,KAAK,UAAU;YAC1DM,OAAO,CAACF,cAAc,CAACC,SAAS,MAAML,OAAO,CAAC,EAAE;QAClD,OAAO;YACLM,OAAO,CAACF,cAAc,CAACC,WAAWL;QACpC;IACF;AACF;AAEO,SAASO,UAAUP,OAAe;IACvCM,QAAQT,GAAG,CAACG;AACd;AAEO,SAASX,KAAK,GAAGW,OAAc;IACpCF,YAAY,WAAWE;AACzB;AAEO,SAASV,MAAM,GAAGU,OAAc;IACrCF,YAAY,YAAYE;AAC1B;AAEO,SAAST,KAAK,GAAGS,OAAc;IACpCF,YAAY,WAAWE;AACzB;AAEO,SAASR,MAAM,GAAGQ,OAAc;IACrCF,YAAY,YAAYE;AAC1B;AAEO,SAASP,KAAK,GAAGO,OAAc;IACpCF,YAAY,WAAWE;AACzB;AAEO,SAASN,MAAM,GAAGM,OAAc;IACrCF,YAAY,YAAYE;AAC1B;AAEO,SAASL,MAAM,GAAGK,OAAc;IACrCF,YAAY,YAAYE;AAC1B;AAEA,MAAMQ,gBAAgB,IAAIrB,gLAAAA,CAAiB,OAAQ,CAACsB,QAAUA,MAAMP,MAAM;AACnE,SAASQ,SAAS,GAAGV,OAAc;IACxC,MAAMW,MAAMX,QAAQY,IAAI,CAAC;IACzB,IAAI,CAACJ,cAAcK,GAAG,CAACF,MAAM;QAC3BH,cAAcM,GAAG,CAACH,KAAKA;QACvBpB,QAAQS;IACV;AACF;AAEA,MAAMe,iBAAiB,IAAI5B,gLAAAA,CAAiB,OAAQ,CAACsB,QAAUA,MAAMP,MAAM;AACpE,SAASc,UAAU,GAAGhB,OAAc;IACzC,MAAMW,MAAMX,QAAQY,IAAI,CAAC;IACzB,IAAI,CAACG,eAAeF,GAAG,CAACF,MAAM;QAC5BI,eAAeD,GAAG,CAACH,KAAKA;QACxBrB,SAASU;IACX;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 109, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.ts"],"sourcesContent":["import type { LoaderTree } from '../../../server/lib/app-dir-module'\nimport type { Params } from '../../../server/request/params'\nimport type { DynamicParamTypes } from '../../../shared/lib/app-router-types'\nimport {\n parseAppRouteSegment,\n type NormalizedAppRoute,\n type NormalizedAppRouteSegment,\n} from '../../../shared/lib/router/routes/app'\nimport { parseLoaderTree } from '../../../shared/lib/router/utils/parse-loader-tree'\nimport { resolveParamValue } from '../../../shared/lib/router/utils/resolve-param-value'\n\n/**\n * Validates that the static segments in currentPath match the corresponding\n * segments in targetSegments. This ensures we only extract dynamic parameters\n * that are part of the target pathname structure.\n *\n * Segments are compared literally - interception markers like \"(.)photo\" are\n * part of the pathname and must match exactly.\n *\n * @example\n * // Matching paths\n * currentPath: ['blog', '(.)photo']\n * targetSegments: ['blog', '(.)photo', '[id]']\n * → Returns true (both static segments match exactly)\n *\n * @example\n * // Non-matching paths\n * currentPath: ['blog', '(.)photo']\n * targetSegments: ['blog', 'photo', '[id]']\n * → Returns false (segments don't match - marker is part of pathname)\n *\n * @param currentPath - The accumulated path segments from the loader tree\n * @param targetSegments - The target pathname split into segments\n * @returns true if all static segments match, false otherwise\n */\nfunction validatePrefixMatch(\n currentPath: NormalizedAppRouteSegment[],\n route: NormalizedAppRoute\n): boolean {\n for (let i = 0; i < currentPath.length; i++) {\n const pathSegment = currentPath[i]\n const targetPathSegment = route.segments[i]\n\n // Type mismatch - one is static, one is dynamic\n if (pathSegment.type !== targetPathSegment.type) {\n return false\n }\n\n // One has an interception marker, the other doesn't.\n if (\n pathSegment.interceptionMarker !== targetPathSegment.interceptionMarker\n ) {\n return false\n }\n\n // Both are static but names don't match\n if (\n pathSegment.type === 'static' &&\n targetPathSegment.type === 'static' &&\n pathSegment.name !== targetPathSegment.name\n ) {\n return false\n }\n // Both are dynamic but param names don't match\n else if (\n pathSegment.type === 'dynamic' &&\n targetPathSegment.type === 'dynamic' &&\n pathSegment.param.paramType !== targetPathSegment.param.paramType &&\n pathSegment.param.paramName !== targetPathSegment.param.paramName\n ) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * Extracts pathname route param segments from a loader tree and resolves\n * parameter values from static segments in the route.\n *\n * @param loaderTree - The loader tree structure containing route hierarchy\n * @param route - The target route to match against\n * @returns Object containing pathname route param segments and resolved params\n */\nexport function extractPathnameRouteParamSegmentsFromLoaderTree(\n loaderTree: LoaderTree,\n route: NormalizedAppRoute\n): {\n pathnameRouteParamSegments: Array<{\n readonly name: string\n readonly paramName: string\n readonly paramType: DynamicParamTypes\n }>\n params: Params\n} {\n const pathnameRouteParamSegments: Array<{\n readonly name: string\n readonly paramName: string\n readonly paramType: DynamicParamTypes\n }> = []\n const params: Params = {}\n\n // BFS traversal with depth and path tracking\n const queue: Array<{\n tree: LoaderTree\n depth: number\n currentPath: NormalizedAppRouteSegment[]\n }> = [{ tree: loaderTree, depth: 0, currentPath: [] }]\n\n while (queue.length > 0) {\n const { tree, depth, currentPath } = queue.shift()!\n const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n // Build the path for the current node\n let updatedPath = currentPath\n let nextDepth = depth\n\n const appSegment = parseAppRouteSegment(segment)\n\n // Only add to path if it's a real segment that appears in the URL\n // Route groups and parallel markers don't contribute to URL pathname\n if (\n appSegment &&\n appSegment.type !== 'route-group' &&\n appSegment.type !== 'parallel-route'\n ) {\n updatedPath = [...currentPath, appSegment]\n nextDepth = depth + 1\n }\n\n // Check if this segment has a param and matches the target pathname at this depth\n if (appSegment?.type === 'dynamic') {\n const { paramName, paramType } = appSegment.param\n\n // Check if this segment is at the correct depth in the target pathname\n // A segment matches if:\n // 1. There's a dynamic segment at this depthLine truncated
|
||||
{"offset": {"line": 245, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/build/static-paths/utils.ts"],"sourcesContent":["import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type { Params } from '../../server/request/params'\nimport type { AppPageRouteModule } from '../../server/route-modules/app-page/module.compiled'\nimport type { AppRouteRouteModule } from '../../server/route-modules/app-route/module.compiled'\nimport { isAppPageRouteModule } from '../../server/route-modules/checks'\nimport type { DynamicParamTypes } from '../../shared/lib/app-router-types'\nimport {\n parseAppRouteSegment,\n type NormalizedAppRoute,\n} from '../../shared/lib/router/routes/app'\nimport { parseLoaderTree } from '../../shared/lib/router/utils/parse-loader-tree'\nimport type { AppSegment } from '../segment-config/app/app-segments'\nimport { extractPathnameRouteParamSegmentsFromLoaderTree } from './app/extract-pathname-route-param-segments-from-loader-tree'\nimport { resolveParamValue } from '../../shared/lib/router/utils/resolve-param-value'\nimport type { FallbackRouteParam } from './types'\n\n/**\n * Encodes a parameter value using the provided encoder.\n *\n * @param value - The value to encode.\n * @param encoder - The encoder to use.\n * @returns The encoded value.\n */\nexport function encodeParam(\n value: string | string[],\n encoder: (value: string) => string\n) {\n let replaceValue: string\n if (Array.isArray(value)) {\n replaceValue = value.map(encoder).join('/')\n } else {\n replaceValue = encoder(value)\n }\n\n return replaceValue\n}\n\n/**\n * Normalizes a pathname to a consistent format.\n *\n * @param pathname - The pathname to normalize.\n * @returns The normalized pathname.\n */\nexport function normalizePathname(pathname: string) {\n return pathname.replace(/\\\\/g, '/').replace(/(?!^)\\/$/, '')\n}\n\n/**\n * Extracts segments that contribute to the pathname by traversing the loader tree\n * based on the route module type.\n *\n * @param routeModule - The app route module (page or route handler)\n * @param segments - Array of AppSegment objects collected from the route\n * @param page - The target pathname to match against, INCLUDING interception\n * markers (e.g., \"/blog/[slug]\", \"/(.)photo/[id]\")\n * @returns Array of segments with param info that contribute to the pathname\n */\nexport function extractPathnameRouteParamSegments(\n routeModule: AppRouteRouteModule | AppPageRouteModule,\n segments: readonly Readonly<AppSegment>[],\n route: NormalizedAppRoute\n): Array<{\n readonly name: string\n readonly paramName: string\n readonly paramType: DynamicParamTypes\n}> {\n // For AppPageRouteModule, use the loaderTree traversal approach\n if (isAppPageRouteModule(routeModule)) {\n const { pathnameRouteParamSegments } =\n extractPathnameRouteParamSegmentsFromLoaderTree(\n routeModule.userland.loaderTree,\n route\n )\n return pathnameRouteParamSegments\n }\n\n return extractPathnameRouteParamSegmentsFromSegments(segments)\n}\n\nexport function extractPathnameRouteParamSegmentsFromSegments(\n segments: readonly Readonly<AppSegment>[]\n): Array<{\n readonly name: string\n readonly paramName: string\n readonly paramType: DynamicParamTypes\n}> {\n // TODO: should we consider what values are already present in the page?\n\n // For AppRouteRouteModule, filter the segments array to get the route params\n // that contribute to the pathname.\n const result: Array<{\n readonly name: string\n readonly paramName: string\n readonly paramType: DynamicParamTypes\n }> = []\n\n for (const segment of segments) {\n // Skip segments without param info.\n if (!segment.paramName || !segment.paramType) continue\n\n // Collect all the route param keys that contribute to the pathname.\n result.push({\n name: segment.name,\n paramName: segment.paramName,\n paramType: segment.paramType,\n })\n }\n\n return result\n}\n\n/**\n * Resolves all route parameters from the loader tree. This function uses\n * tree-based traversal to correctly handle the hierarchical structure of routes\n * and accurately determine parameter values based on their depth in the tree.\n *\n * This processes both regular route parameters (from the main children route) and\n * parallel route parameters (from slots like @modal, @sidebar).\n *\n * Unlike interpolateParallelRouteParams (which has a complete URL at runtime),\n * this build-time function determines which route params are unknown.\n * The pathname may contain placeholders like [slug], making it incomplete.\n *\n * @param loaderTree - The loader tree structure containing route hierarchy\n * @param params - The current route parameters object (will be mutated)\n * @param route - The current route being processed\n * @param fallbackRouteParams - Array of fallback route parameters (will be mutated)\n */\nLine truncated
|
||||
{"offset": {"line": 349, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\n// Cookie for the Instant Navigation Testing API. Sent automatically with all\n// requests while a navigation lock is held; the server uses its presence to\n// render only the shell. Not exposed in production builds by default.\nexport const NEXT_INSTANT_TEST_COOKIE =\n 'next-instant-navigation-testing' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\nexport const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id' as const\nexport const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id' as const\n\n// TODO: Should this include nextjs in the name, like the others?\nexport const NEXT_ACTION_REVALIDATED_HEADER = 'x-action-revalidated' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_URL","RSC_CONTENT_TYPE_HEADER","NEXT_INSTANT_TEST_COOKIE","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER","NEXT_REQUEST_ID_HEADER","NEXT_HTML_REQUEST_ID_HEADER","NEXT_ACTION_REVALIDATED_HEADER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,aAAa,MAAc;AACjC,MAAMC,gBAAgB,cAAsB;AAI5C,MAAMC,gCAAgC,yBAAiC;AACvE,MAAMC,8BAA8B,uBAA+B;AAKnE,MAAMC,sCACX,+BAAuC;AAClC,MAAMC,0BAA0B,mBAA2B;AAC3D,MAAMC,WAAW,WAAmB;AACpC,MAAMC,0BAA0B,mBAA2B;AAK3D,MAAMC,2BACX,kCAA0C;AAErC,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEH,MAAMM,uBAAuB,OAAe;AAE5C,MAAMC,gCAAgC,sBAA8B;AACpE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,6BAA6B,0BAAkC;AACrE,MAAMC,8BAA8B,2BAAmC;AACvE,MAAMC,2BAA2B,qBAA6B;AAC9D,MAAMC,+BAA+B,4BAAoC;AACzE,MAAMC,yBAAyB,sBAA8B;AAC7D,MAAMC,8BAA8B,2BAAmC;AAGvE,MAAMC,iCAAiC,uBAA+B","ignoreList":[0]}},
|
||||
{"offset": {"line": 420, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/client-page.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/client-page.js\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 426, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/client-page.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 433, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/client-page.tsx"],"sourcesContent":["'use client'\n\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { Params } from '../../server/request/params'\nimport { LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { use } from 'react'\nimport { urlSearchParamsToParsedUrlQuery } from '../route-params'\nimport { SearchParamsContext } from '../../shared/lib/hooks-client-context.shared-runtime'\nimport {\n createClientParams,\n createClientSearchParams,\n} from './client-boundary-params'\n\n/**\n * When the Page is a client component we send the params and searchParams to this client wrapper\n * where they are turned into dynamically tracked values before being passed to the actual Page component.\n *\n * additionally we may send promises representing the params and searchParams. We don't ever use these passed\n * values but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations.\n * It is up to the caller to decide if the promises are needed.\n */\nexport function ClientPageRoot({\n Component,\n serverProvidedParams,\n}: {\n Component: React.ComponentType<any>\n serverProvidedParams: null | {\n searchParams: ParsedUrlQuery\n params: Params\n promises: Array<Promise<any>> | null\n }\n}) {\n let searchParams: ParsedUrlQuery\n let params: Params\n if (serverProvidedParams !== null) {\n searchParams = serverProvidedParams.searchParams\n params = serverProvidedParams.params\n } else {\n // When Cache Components is enabled, the server does not pass the params as\n // props; they are parsed on the client and passed via context.\n const layoutRouterContext = use(LayoutRouterContext)\n params =\n layoutRouterContext !== null ? layoutRouterContext.parentParams : {}\n\n // This is an intentional behavior change: when Cache Components is enabled,\n // client segments receive the \"canonical\" search params, not the\n // rewritten ones. Users should either call useSearchParams directly or pass\n // the rewritten ones in from a Server Component.\n // TODO: Log a deprecation error when this object is accessed\n searchParams = urlSearchParamsToParsedUrlQuery(use(SearchParamsContext)!)\n }\n\n const clientSearchParams = createClientSearchParams(searchParams)\n const clientParams = createClientParams(params)\n\n return <Component params={clientParams} searchParams={clientSearchParams} />\n}\n"],"names":["LayoutRouterContext","use","urlSearchParamsToParsedUrlQuery","SearchParamsContext","createClientParams","createClientSearchParams","ClientPageRoot","Component","serverProvidedParams","searchParams","params","layoutRouterContext","parentParams","clientSearchParams","clientParams"],"mappings":"","ignoreList":[0]}},
|
||||
{"offset": {"line": 440, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/client-segment.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/client-segment.js\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 446, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/client-segment.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 453, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/client-segment.tsx"],"sourcesContent":["'use client'\n\nimport type { Params } from '../../server/request/params'\nimport { LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { use } from 'react'\nimport { createClientParams } from './client-boundary-params'\n\n/**\n * When the Page is a client component we send the params to this client wrapper\n * where they are turned into dynamically tracked values before being passed to the actual Segment component.\n *\n * additionally we may send a promise representing params. We don't ever use this passed\n * value but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations\n * such as when cacheComponents is enabled. It is up to the caller to decide if the promises are needed.\n */\nexport function ClientSegmentRoot({\n Component,\n slots,\n serverProvidedParams,\n}: {\n Component: React.ComponentType<any>\n slots: { [key: string]: React.ReactNode }\n serverProvidedParams: null | {\n params: Params\n promises: Array<Promise<any>> | null\n }\n}) {\n let params: Params\n if (serverProvidedParams !== null) {\n params = serverProvidedParams.params\n } else {\n // When Cache Components is enabled, the server does not pass the params\n // as props; they are parsed on the client and passed via context.\n const layoutRouterContext = use(LayoutRouterContext)\n params =\n layoutRouterContext !== null ? layoutRouterContext.parentParams : {}\n }\n\n const clientParams = createClientParams(params)\n\n return <Component {...slots} params={clientParams} />\n}\n"],"names":["LayoutRouterContext","use","createClientParams","ClientSegmentRoot","Component","slots","serverProvidedParams","params","layoutRouterContext","parentParams","clientParams"],"mappings":"","ignoreList":[0]}},
|
||||
{"offset": {"line": 461, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":";;;;;;AAAA,MAAMA,qBAAqB;AAEpB,MAAMC,2BAA2BC;IAGtCC,YAA4BC,WAAmB,CAAE;QAC/C,KAAK,CAAC,CAAC,sBAAsB,EAAEA,aAAa,GAAA,IAAA,CADlBA,WAAAA,GAAAA,aAAAA,IAAAA,CAF5BC,MAAAA,GAAoCL;IAIpC;AACF;AAEO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAE,KAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 482, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 488, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 495, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/http-access-fallback/error-boundary.tsx"],"sourcesContent":["'use client'\n\n/**\n * HTTPAccessFallbackBoundary is a boundary that catches errors and renders a\n * fallback component for HTTP errors.\n *\n * It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors.\n *\n * e.g. 404\n * 404 represents not found, and the fallback component pair contains the component and its styles.\n *\n */\n\nimport React, { useContext } from 'react'\nimport { useUntrackedPathname } from '../navigation-untracked'\nimport {\n HTTPAccessErrorStatus,\n getAccessFallbackHTTPStatus,\n getAccessFallbackErrorTypeByStatus,\n isHTTPAccessFallbackError,\n} from './http-access-fallback'\nimport { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime'\n\ninterface HTTPAccessFallbackBoundaryProps {\n notFound?: React.ReactNode\n forbidden?: React.ReactNode\n unauthorized?: React.ReactNode\n // TODO: Make this required once `React.createElement` understands that positional args go into children\n children?: React.ReactNode\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessFallbackErrorBoundaryProps\n extends HTTPAccessFallbackBoundaryProps {\n pathname: string | null\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessBoundaryState {\n triggeredStatus: number | undefined\n previousPathname: string | null\n}\n\nclass HTTPAccessFallbackErrorBoundary extends React.Component<\n HTTPAccessFallbackErrorBoundaryProps,\n HTTPAccessBoundaryState\n> {\n constructor(props: HTTPAccessFallbackErrorBoundaryProps) {\n super(props)\n this.state = {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n\n componentDidCatch(): void {\n if (\n process.env.NODE_ENV === 'development' &&\n this.props.missingSlots &&\n this.props.missingSlots.size > 0 &&\n // A missing children slot is the typical not-found case, so no need to warn\n !this.props.missingSlots.has('children')\n ) {\n const { warnOnce } =\n require('../../../shared/lib/utils/warn-once') as typeof import('../../../shared/lib/utils/warn-once')\n let warningMessage =\n 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\\n\\n'\n\n const formattedSlots = Array.from(this.props.missingSlots)\n .sort((a, b) => a.localeCompare(b))\n .map((slot) => `@${slot}`)\n .join(', ')\n\n warningMessage += 'Missing slots: ' + formattedSlots\n\n warnOnce(warningMessage)\n }\n }\n\n static getDerivedStateFromError(error: unknown) {\n if (isHTTPAccessFallbackError(error)) {\n const httpStatus = getAccessFallbackHTTPStatus(error)\n return {\n triggeredStatus: httpStatus,\n }\n }\n // Re-throw if error is not for 404\n throw error\n }\n\n static getDerivedStateFromProps(\n props: HTTPAccessFallbackErrorBoundaryProps,\n state: HTTPAccessBoundaryState\n ): HTTPAccessBoundaryState | null {\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\n if (props.pathname !== state.previousPathname && state.triggeredStatus) {\n return {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n return {\n triggeredStatus: state.triggeredStatus,\n previousPathname: props.pathname,\n }\n }\n\n render() {\n const { notFound, forbidden, unauthorized, children } = this.props\n const { triggeredStatus } = this.state\n const errorComponents = {\n [HTTPAccessErrorStatus.NOT_FOUND]: notFound,\n [HTTPAccessErrorStatus.FORBIDDEN]: forbidden,\n [HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized,\n }\n\n if (triggeredStatus) {\n const isNotFound =\n triggeredStatus === HTTPAccessErrorStatus.NOT_FOUND && notFound\n const isForbidden =\n triggeredStatus === HTTPAccessErrorStatus.FORBIDDEN && forbidden\n const isUnauthorized =\n triggeredStatus === HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized\n\n // If there's no matched boundary in this layer, keep throwing the error by rendering the children\n if (!(isNotFound || isForbidden || isUnauthorized)) {\n return children\n }\n\n return (\n <>\n <meta name=\"robots\" content=\"noindex\" />\n Line truncated
|
||||
{"offset": {"line": 503, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAErC,MAAMQ,iCAAiC,2BAA0B;AAajE,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAI,KAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 549, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":";;;;AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;;;AAO/D,SAASC,kBACdC,KAAc;IAEd,WAAOF,mMAAAA,EAAgBE,cAAUH,oPAAAA,EAA0BG;AAC7D","ignoreList":[0]}},
|
||||
{"offset": {"line": 563, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/layout-router.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/layout-router.js\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 569, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/layout-router.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 576, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/layout-router.tsx"],"sourcesContent":["'use client'\n\nimport type { CacheNode } from '../../shared/lib/app-router-types'\nimport type { LoadingModuleData } from '../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n Segment,\n} from '../../shared/lib/app-router-types'\nimport type { ErrorComponent } from './error-boundary'\nimport type { FocusAndScrollRef } from './router-reducer/router-reducer-types'\n\nimport React, {\n Activity,\n Fragment,\n useContext,\n use,\n Suspense,\n useDeferredValue,\n useLayoutEffect,\n type FragmentInstance,\n type JSX,\n type ActivityProps,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport {\n LayoutRouterContext,\n GlobalLayoutRouterContext,\n TemplateContext,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport { unresolvedThenable } from './unresolved-thenable'\nimport { ErrorBoundary } from './error-boundary'\nimport { disableSmoothScrollDuringRouteTransition } from '../../shared/lib/router/utils/disable-smooth-scroll'\nimport { RedirectBoundary } from './redirect-boundary'\nimport { HTTPAccessFallbackBoundary } from './http-access-fallback/error-boundary'\nimport {\n InstantValidationBoundaryContext,\n RenderValidationBoundaryAtThisLevel,\n} from './instant-validation/boundary'\nimport { createRouterCacheKey } from './router-reducer/create-router-cache-key'\nimport {\n useRouterBFCache,\n type RouterBFCacheEntry,\n} from './bfcache-state-manager'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport {\n NavigationPromisesContext,\n type NavigationPromises,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport { getParamValueFromCacheKey } from '../route-params'\nimport type { Params } from '../../server/request/params'\nimport { isDeferredRsc } from './router-reducer/ppr-navigations'\n\nconst enableNewScrollHandler = process.env.__NEXT_APP_NEW_SCROLL_HANDLER\n\nconst __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = (\n ReactDOM as any\n).__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE\n\n// TODO-APP: Replace with new React API for finding dom nodes without a `ref` when available\n/**\n * Wraps ReactDOM.findDOMNode with additional logic to hide React Strict Mode warning\n */\nfunction findDOMNode(\n instance: React.ReactInstance | null | undefined\n): Element | Text | null {\n // Tree-shake for server bundle\n if (typeof window === 'undefined') return null\n\n // __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode is null during module init.\n // We need to lazily reference it.\n const internal_reactDOMfindDOMNode =\n __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode\n return internal_reactDOMfindDOMNode(instance)\n}\n\nconst rectProperties = [\n 'bottom',\n 'height',\n 'left',\n 'right',\n 'top',\n 'width',\n 'x',\n 'y',\n] as const\n/**\n * Check if a HTMLElement is hidden or fixed/sticky position\n */\nfunction shouldSkipElement(element: HTMLElement) {\n // we ignore fixed or sticky positioned elements since they'll likely pass the \"in-viewport\" check\n // and will result in a situation we bail on scroll because of something like a fixed nav,\n // even though the actual page content is offscreen\n if (['sticky', 'fixed'].includes(getComputedStyle(element).position)) {\n return true\n }\n\n // Uses `getBoundingClientRect` to check if the element is hidden instead of `offsetParent`\n // because `offsetParent` doesn't consider document/body\n const rect = element.getBoundingClientRect()\n return rectProperties.every((item) => rect[item] === 0)\n}\n\nconst enum ScrollTargetState {\n NoClientRects,\n InViewport,\n OutOfViewport,\n}\n\n/**\n * Resolve the root scroll padding used by the viewport check.\n *\n * Computed lengths serialize as pixels, but percentages remain relative to\n * the scrollport. Preserve the existing behavior for values that still\n * contain unresolved CSS math.\n */\nfunction getScrollPaddingTopInPixels(\n htmlElement: HTMLElement,\n viewportHeight: number\n): number {\n const scrollPaddingTop = getComputedStyle(htmlElement).scrollPaddingTop\n const value = Number.parseFloat(scrollPaddingTop)\n\n if (!Number.isFinite(value) || value < 0) {\n return 0\n }\n\n if (scrollPaddingTop.endsWith('px')) {\n return value\n }\n\n if (scrollPaddingTop.endsWith('%')) {\n return (value / 100) * viewportHeight\n }\n\n return 0\n}\n\n/**\n * Check where the top corner of the HTMLElement is relative to the usable\n * viewport.\n *\n * Scroll padding is resolved lazily so an empty Fragment does not trigger a\n * computed style read. The caller caches the value for the second check.\n */\nfunction getScrollTargetState(\n instance: HTMLElement | FragmentInstanceLine truncated
|
||||
{"offset": {"line": 584, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport type RedirectType = 'push' | 'replace'\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":";;;;;;AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;;AAEpD,MAAMC,sBAAsB,gBAAe;AAe3C,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAI,KAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcL,uBACbM,CAAAA,SAAS,aAAaA,SAAS,MAAK,KACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcb,+MAAAA;AAElB","ignoreList":[0]}},
|
||||
{"offset": {"line": 608, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":";;;;AAAO,IAAKA,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;WAAAA;MAIX","ignoreList":[0]}},
|
||||
{"offset": {"line": 621, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/render-from-template-context.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 627, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/client/components/render-from-template-context.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 634, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/render-from-template-context.tsx"],"sourcesContent":["'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport { TemplateContext } from '../../shared/lib/app-router-context.shared-runtime'\n\nexport default function RenderFromTemplateContext(): JSX.Element {\n const children = useContext(TemplateContext)\n return <>{children}</>\n}\n"],"names":["React","useContext","TemplateContext","RenderFromTemplateContext","children"],"mappings":"","ignoreList":[0]}},
|
||||
{"offset": {"line": 642, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/client/components/static-generation-bailout.ts"],"sourcesContent":["const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n error: unknown\n): error is StaticGenBailoutError {\n if (typeof error !== 'object' || error === null || !('code' in error)) {\n return false\n }\n\n return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n"],"names":["NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","Error","code","isStaticGenBailoutError","error"],"mappings":";;;;;;AAAA,MAAMA,0BAA0B;AAEzB,MAAMC,8BAA8BC;;QAApC,KAAA,IAAA,OAAA,IAAA,CACWC,IAAAA,GAAOH;;AACzB;AAEO,SAASI,wBACdC,KAAc;IAEd,IAAI,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAAE,CAAA,UAAUA,KAAI,GAAI;QACrE,OAAO;IACT;IAEA,OAAOA,MAAMF,IAAI,KAAKH;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 664, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/batcher.ts"],"sourcesContent":["import type { SchedulerFn } from './scheduler'\n\nimport { DetachedPromise } from './detached-promise'\n\ntype CacheKeyFn<K, C extends string | number | null> = (\n key: K\n) => PromiseLike<C> | C\n\ntype BatcherOptions<K, C extends string | number | null> = {\n cacheKeyFn?: CacheKeyFn<K, C>\n schedulerFn?: SchedulerFn<void>\n}\n\ntype WorkFnContext<V, K> = {\n resolve: (value: V | PromiseLike<V>) => void\n key: K\n}\n\ntype WorkFn<V, K> = (context: WorkFnContext<V, K>) => Promise<V>\n\n/**\n * A wrapper for a function that will only allow one call to the function to\n * execute at a time.\n */\nexport class Batcher<K, V, C extends string | number | null> {\n private readonly pending = new Map<C, Promise<V>>()\n\n protected constructor(\n private readonly cacheKeyFn?: CacheKeyFn<K, C>,\n /**\n * A function that will be called to schedule the wrapped function to be\n * executed. This defaults to a function that will execute the function\n * immediately.\n */\n private readonly schedulerFn: SchedulerFn<void> = (fn) => fn()\n ) {}\n\n /**\n * Creates a new instance of PendingWrapper. If the key extends a string or\n * number, the key will be used as the cache key. If the key is an object, a\n * cache key function must be provided.\n */\n public static create<K extends string | number | null, V>(\n options?: BatcherOptions<K, K>\n ): Batcher<K, V, K>\n public static create<K, V, C extends string | number | null>(\n options: BatcherOptions<K, C> &\n Required<Pick<BatcherOptions<K, C>, 'cacheKeyFn'>>\n ): Batcher<K, V, C>\n public static create<K, V, C extends string | number | null>(\n options?: BatcherOptions<K, C>\n ): Batcher<K, V, C> {\n return new Batcher<K, V, C>(options?.cacheKeyFn, options?.schedulerFn)\n }\n\n /**\n * Wraps a function in a promise that will be resolved or rejected only once\n * for a given key. This will allow multiple calls to the function to be\n * made, but only one will be executed at a time. The result of the first\n * call will be returned to all callers.\n *\n * @param key the key to use for the cache\n * @param fn the function to wrap\n * @returns a promise that resolves to the result of the function\n */\n public async batch(key: K, fn: WorkFn<V, K>): Promise<V> {\n const cacheKey = (this.cacheKeyFn ? await this.cacheKeyFn(key) : key) as C\n if (cacheKey === null) {\n return fn({ resolve: (value) => Promise.resolve(value), key })\n }\n\n const pending = this.pending.get(cacheKey)\n if (pending) return pending\n\n const { promise, resolve, reject } = new DetachedPromise<V>()\n this.pending.set(cacheKey, promise)\n\n this.schedulerFn(async () => {\n try {\n const result = await fn({ resolve, key })\n\n // Resolving a promise multiple times is a no-op, so we can safely\n // resolve all pending promises with the same result.\n resolve(result)\n } catch (err) {\n reject(err)\n } finally {\n this.pending.delete(cacheKey)\n }\n })\n\n return promise\n }\n}\n"],"names":["DetachedPromise","Batcher","cacheKeyFn","schedulerFn","fn","pending","Map","create","options","batch","key","cacheKey","resolve","value","Promise","get","promise","reject","set","result","err","delete"],"mappings":";;;;AAEA,SAASA,eAAe,QAAQ,qBAAoB;;AAsB7C,MAAMC;IAGX,YACmBC,UAA6B,EAC9C;;;;KAIC,GACgBC,cAAiC,CAACC,KAAOA,IAAI,CAC9D;aAPiBF,UAAAA,GAAAA;aAMAC,WAAAA,GAAAA;aATFE,OAAAA,GAAU,IAAIC;IAU5B;IAcH,OAAcC,OACZC,OAA8B,EACZ;QAClB,OAAO,IAAIP,QAAiBO,WAAAA,OAAAA,KAAAA,IAAAA,QAASN,UAAU,EAAEM,WAAAA,OAAAA,KAAAA,IAAAA,QAASL,WAAW;IACvE;IAEA;;;;;;;;;GASC,GACD,MAAaM,MAAMC,GAAM,EAAEN,EAAgB,EAAc;QACvD,MAAMO,WAAY,IAAI,CAACT,UAAU,GAAG,MAAM,IAAI,CAACA,UAAU,CAACQ,OAAOA;QACjE,IAAIC,aAAa,MAAM;YACrB,OAAOP,GAAG;gBAAEQ,SAAS,CAACC,QAAUC,QAAQF,OAAO,CAACC;gBAAQH;YAAI;QAC9D;QAEA,MAAML,UAAU,IAAI,CAACA,OAAO,CAACU,GAAG,CAACJ;QACjC,IAAIN,SAAS,OAAOA;QAEpB,MAAM,EAAEW,OAAO,EAAEJ,OAAO,EAAEK,MAAM,EAAE,GAAG,IAAIjB,oLAAAA;QACzC,IAAI,CAACK,OAAO,CAACa,GAAG,CAACP,UAAUK;QAE3B,IAAI,CAACb,WAAW,CAAC;YACf,IAAI;gBACF,MAAMgB,SAAS,MAAMf,GAAG;oBAAEQ;oBAASF;gBAAI;gBAEvC,kEAAkE;gBAClE,qDAAqD;gBACrDE,QAAQO;YACV,EAAE,OAAOC,KAAK;gBACZH,OAAOG;YACT,SAAU;gBACR,IAAI,CAACf,OAAO,CAACgB,MAAM,CAACV;YACtB;QACF;QAEA,OAAOK;IACT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 726, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/client-and-server-references.ts"],"sourcesContent":["import {\n extractInfoFromServerReferenceId,\n type ServerReferenceInfo,\n} from '../shared/lib/server-reference-info'\n\n// Only contains the properties we're interested in.\nexport interface ServerReference {\n $$typeof: Symbol\n $$id: string\n}\n\nexport type ServerFunction = ServerReference &\n ((...args: unknown[]) => Promise<unknown>)\n\nexport function isServerReference<T>(\n value: T & Partial<ServerReference>\n): value is T & ServerFunction {\n return value.$$typeof === Symbol.for('react.server.reference')\n}\n\nexport function isUseCacheFunction<T>(\n value: T & Partial<ServerReference>\n): value is T & ServerFunction {\n if (!isServerReference(value)) {\n return false\n }\n\n const { type } = extractInfoFromServerReferenceId(value.$$id)\n\n return type === 'use-cache'\n}\n\nexport function getUseCacheFunctionInfo<T>(\n value: T & Partial<ServerReference>\n): ServerReferenceInfo | null {\n if (!isServerReference(value)) {\n return null\n }\n\n const info = extractInfoFromServerReferenceId(value.$$id)\n\n return info.type === 'use-cache' ? info : null\n}\n\nexport function isClientReference(mod: any): boolean {\n const defaultExport = mod?.default || mod\n return defaultExport?.$$typeof === Symbol.for('react.client.reference')\n}\n"],"names":["extractInfoFromServerReferenceId","isServerReference","value","$$typeof","Symbol","for","isUseCacheFunction","type","$$id","getUseCacheFunctionInfo","info","isClientReference","mod","defaultExport","default"],"mappings":";;;;;;;;;;AAAA,SACEA,gCAAgC,QAE3B,sCAAqC;;AAWrC,SAASC,kBACdC,KAAmC;IAEnC,OAAOA,MAAMC,QAAQ,KAAKC,OAAOC,GAAG,CAAC;AACvC;AAEO,SAASC,mBACdJ,KAAmC;IAEnC,IAAI,CAACD,kBAAkBC,QAAQ;QAC7B,OAAO;IACT;IAEA,MAAM,EAAEK,IAAI,EAAE,OAAGP,uNAAAA,EAAiCE,MAAMM,IAAI;IAE5D,OAAOD,SAAS;AAClB;AAEO,SAASE,wBACdP,KAAmC;IAEnC,IAAI,CAACD,kBAAkBC,QAAQ;QAC7B,OAAO;IACT;IAEA,MAAMQ,WAAOV,uNAAAA,EAAiCE,MAAMM,IAAI;IAExD,OAAOE,KAAKH,IAAI,KAAK,cAAcG,OAAO;AAC5C;AAEO,SAASC,kBAAkBC,GAAQ;IACxC,MAAMC,gBAAgBD,CAAAA,OAAAA,OAAAA,KAAAA,IAAAA,IAAKE,OAAO,KAAIF;IACtC,OAAOC,CAAAA,iBAAAA,OAAAA,KAAAA,IAAAA,cAAeV,QAAQ,MAAKC,OAAOC,GAAG,CAAC;AAChD","ignoreList":[0]}},
|
||||
{"offset": {"line": 763, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/constants.ts"],"sourcesContent":["import type { ServerRuntime } from '../types'\n\nexport const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP'\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'\n\nexport const MATCHED_PATH_HEADER = 'x-matched-path'\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER =\n 'x-prerender-revalidate-if-generated'\n\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments'\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc'\nexport const RSC_SUFFIX = '.rsc'\nexport const ACTION_SUFFIX = '.action'\nexport const NEXT_DATA_SUFFIX = '.json'\nexport const NEXT_META_SUFFIX = '.meta'\nexport const NEXT_BODY_SUFFIX = '.body'\n\nexport const NEXT_NAV_DEPLOYMENT_ID_HEADER = 'x-nextjs-deployment-id'\n\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER =\n 'x-next-revalidate-tag-token'\n\nexport const NEXT_RESUME_HEADER = 'next-resume'\nexport const NEXT_RESUME_STATE_LENGTH_HEADER = 'x-next-resume-state-length'\n\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'\nexport const NEXT_CACHE_ROOT_PARAM_TAG_ID = '_N_RP_'\n\n// in seconds\nexport const CACHE_ONE_YEAR_SECONDS = 31536000\n\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe\n\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware'\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`\n\n// Patterns to detect proxy files (replacement for middleware)\nexport const PROXY_FILENAME = 'proxy'\nexport const PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`\n\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'\n\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages'\nexport const DOT_NEXT_ALIAS = 'private-dot-next'\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir'\nexport const APP_DIR_ALIAS = 'private-next-app-dir'\nexport const RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy'\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS =\n 'private-next-rsc-track-dynamic-import'\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS =\n 'private-next-rsc-action-client-wrapper'\n\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`\n\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`\n\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`\n\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`\n\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`\n\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`\n\nexport const GSP_NO_RETURNED_VALUE =\n 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'\nexport const GSSP_NO_RETURNED_VALUE =\n 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'\n\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR =\n 'The `unstable_revalidate` property is available for general use.\\n' +\n 'Please use `revalidate` instead.'\n\nexporLine truncated
|
||||
{"offset": {"line": 1052, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/detached-promise.ts"],"sourcesContent":["/**\n * A `Promise.withResolvers` implementation that exposes the `resolve` and\n * `reject` functions on a `Promise`.\n *\n * @see https://tc39.es/proposal-promise-with-resolvers/\n */\nexport class DetachedPromise<T = any> {\n public readonly resolve: (value: T | PromiseLike<T>) => void\n public readonly reject: (reason: any) => void\n public readonly promise: Promise<T>\n\n constructor() {\n let resolve: (value: T | PromiseLike<T>) => void\n let reject: (reason: any) => void\n\n // Create the promise and assign the resolvers to the object.\n this.promise = new Promise<T>((res, rej) => {\n resolve = res\n reject = rej\n })\n\n // We know that resolvers is defined because the Promise constructor runs\n // synchronously.\n this.resolve = resolve!\n this.reject = reject!\n }\n}\n"],"names":["DetachedPromise","constructor","resolve","reject","promise","Promise","res","rej"],"mappings":"AAAA;;;;;CAKC,GACD;;;;AAAO,MAAMA;IAKXC,aAAc;QACZ,IAAIC;QACJ,IAAIC;QAEJ,6DAA6D;QAC7D,IAAI,CAACC,OAAO,GAAG,IAAIC,QAAW,CAACC,KAAKC;YAClCL,UAAUI;YACVH,SAASI;QACX;QAEA,yEAAyE;QACzE,iBAAiB;QACjB,IAAI,CAACL,OAAO,GAAGA;QACf,IAAI,CAACC,MAAM,GAAGA;IAChB;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 1080, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/error-telemetry-utils.ts"],"sourcesContent":["const ERROR_CODE_DELIMITER = '@'\n\n/**\n * Augments the digest field of errors thrown in React Server Components (RSC) with an error code.\n * Since RSC errors can only be serialized through the digest field, this provides a way to include\n * an additional error code that can be extracted client-side via `extractNextErrorCode`.\n *\n * The error code is appended to the digest string with a semicolon separator, allowing it to be\n * parsed out later while preserving the original digest value.\n */\nexport const createDigestWithErrorCode = (\n thrownValue: unknown,\n originalDigest: string\n): string => {\n if (\n typeof thrownValue === 'object' &&\n thrownValue !== null &&\n '__NEXT_ERROR_CODE' in thrownValue\n ) {\n return `${originalDigest}${ERROR_CODE_DELIMITER}${thrownValue.__NEXT_ERROR_CODE}`\n }\n return originalDigest\n}\n\nexport const extractNextErrorCode = (error: unknown): string | undefined => {\n if (\n typeof error === 'object' &&\n error !== null &&\n '__NEXT_ERROR_CODE' in error &&\n typeof error.__NEXT_ERROR_CODE === 'string'\n ) {\n return error.__NEXT_ERROR_CODE\n }\n\n if (\n typeof error === 'object' &&\n error !== null &&\n 'digest' in error &&\n typeof error.digest === 'string'\n ) {\n const segments = error.digest.split(ERROR_CODE_DELIMITER)\n const errorCode = segments.find((segment) => segment.startsWith('E'))\n return errorCode\n }\n\n return undefined\n}\n"],"names":["ERROR_CODE_DELIMITER","createDigestWithErrorCode","thrownValue","originalDigest","__NEXT_ERROR_CODE","extractNextErrorCode","error","digest","segments","split","errorCode","find","segment","startsWith","undefined"],"mappings":";;;;;;AAAA,MAAMA,uBAAuB;AAUtB,MAAMC,4BAA4B,CACvCC,aACAC;IAEA,IACE,OAAOD,gBAAgB,YACvBA,gBAAgB,QAChB,uBAAuBA,aACvB;QACA,OAAO,GAAGC,iBAAiBH,uBAAuBE,YAAYE,iBAAiB,EAAE;IACnF;IACA,OAAOD;AACT,EAAC;AAEM,MAAME,uBAAuB,CAACC;IACnC,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,uBAAuBA,SACvB,OAAOA,MAAMF,iBAAiB,KAAK,UACnC;QACA,OAAOE,MAAMF,iBAAiB;IAChC;IAEA,IACE,OAAOE,UAAU,YACjBA,UAAU,QACV,YAAYA,SACZ,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,MAAMC,WAAWF,MAAMC,MAAM,CAACE,KAAK,CAACT;QACpC,MAAMU,YAAYF,SAASG,IAAI,CAAC,CAACC,UAAYA,QAAQC,UAAU,CAAC;QAChE,OAAOH;IACT;IAEA,OAAOI;AACT,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 1108, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/fallback.ts"],"sourcesContent":["/**\n * Describes the different fallback modes that a given page can have.\n */\nexport const enum FallbackMode {\n /**\n * A BLOCKING_STATIC_RENDER fallback will block the request until the page is\n * generated. No fallback page will be rendered, and users will have to wait\n * to render the page.\n */\n BLOCKING_STATIC_RENDER = 'BLOCKING_STATIC_RENDER',\n\n /**\n * When set to PRERENDER, a fallback page will be sent to users in place of\n * forcing them to wait for the page to be generated. This allows the user to\n * see a rendered page earlier.\n */\n PRERENDER = 'PRERENDER',\n\n /**\n * When set to NOT_FOUND, pages that are not already prerendered will result\n * in a not found response.\n */\n NOT_FOUND = 'NOT_FOUND',\n}\n\n/**\n * The fallback value returned from the `getStaticPaths` function.\n */\nexport type GetStaticPathsFallback = boolean | 'blocking'\n\n/**\n * Parses the fallback field from the prerender manifest.\n *\n * @param fallbackField The fallback field from the prerender manifest.\n * @returns The fallback mode.\n */\nexport function parseFallbackField(\n fallbackField: string | boolean | null | undefined\n): FallbackMode | undefined {\n if (typeof fallbackField === 'string') {\n return FallbackMode.PRERENDER\n } else if (fallbackField === null) {\n return FallbackMode.BLOCKING_STATIC_RENDER\n } else if (fallbackField === false) {\n return FallbackMode.NOT_FOUND\n } else if (fallbackField === undefined) {\n return undefined\n } else {\n throw new Error(\n `Invalid fallback option: ${fallbackField}. Fallback option must be a string, null, undefined, or false.`\n )\n }\n}\n\nexport function fallbackModeToFallbackField(\n fallback: FallbackMode,\n page: string | undefined\n): string | false | null {\n switch (fallback) {\n case FallbackMode.BLOCKING_STATIC_RENDER:\n return null\n case FallbackMode.NOT_FOUND:\n return false\n case FallbackMode.PRERENDER:\n if (!page) {\n throw new Error(\n `Invariant: expected a page to be provided when fallback mode is \"${fallback}\"`\n )\n }\n\n return page\n default:\n throw new Error(`Invalid fallback mode: ${fallback}`)\n }\n}\n\n/**\n * Parses the fallback from the static paths result.\n *\n * @param result The result from the static paths function.\n * @returns The fallback mode.\n */\nexport function parseStaticPathsResult(\n result: GetStaticPathsFallback\n): FallbackMode {\n if (result === true) {\n return FallbackMode.PRERENDER\n } else if (result === 'blocking') {\n return FallbackMode.BLOCKING_STATIC_RENDER\n } else {\n return FallbackMode.NOT_FOUND\n }\n}\n"],"names":["FallbackMode","parseFallbackField","fallbackField","undefined","Error","fallbackModeToFallbackField","fallback","page","parseStaticPathsResult","result"],"mappings":"AAAA;;CAEC,GACD;;;;;;;;;;AAAO,IAAWA,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;IAChB;;;;GAIC,GAAA,YAAA,CAAA,yBAAA,GAAA;IAGD;;;;GAIC,GAAA,YAAA,CAAA,YAAA,GAAA;IAGD;;;GAGC,GAAA,YAAA,CAAA,YAAA,GAAA;WAlBeA;MAoBjB;AAaM,SAASC,mBACdC,aAAkD;IAElD,IAAI,OAAOA,kBAAkB,UAAU;QACrC,OAAA;IACF,OAAO,IAAIA,kBAAkB,MAAM;QACjC,OAAA;IACF,OAAO,IAAIA,kBAAkB,OAAO;QAClC,OAAA;IACF,OAAO,IAAIA,kBAAkBC,WAAW;QACtC,OAAOA;IACT,OAAO;QACL,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,yBAAyB,EAAEF,cAAc,8DAA8D,CAAC,GADrG,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;AACF;AAEO,SAASG,4BACdC,QAAsB,EACtBC,IAAwB;IAExB,OAAQD;QACN,KAAA;YACE,OAAO;QACT,KAAA;YACE,OAAO;QACT,KAAA;YACE,IAAI,CAACC,MAAM;gBACT,MAAM,OAAA,cAEL,CAFK,IAAIH,MACR,CAAC,iEAAiE,EAAEE,SAAS,CAAC,CAAC,GAD3E,qBAAA;2BAAA;gCAAA;kCAAA;gBAEN;YACF;YAEA,OAAOC;QACT;YACE,MAAM,OAAA,cAA+C,CAA/C,IAAIH,MAAM,CAAC,uBAAuB,EAAEE,UAAU,GAA9C,qBAAA;uBAAA;4BAAA;8BAAA;YAA8C;IACxD;AACF;AAQO,SAASE,uBACdC,MAA8B;IAE9B,IAAIA,WAAW,MAAM;QACnB,OAAA;IACF,OAAO,IAAIA,WAAW,YAAY;QAChC,OAAA;IACF,OAAO;QACL,OAAA;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 1190, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/format-server-error.ts"],"sourcesContent":["const invalidServerComponentReactHooks = [\n 'useDeferredValue',\n 'useEffect',\n 'useEffectEvent',\n 'useImperativeHandle',\n 'useInsertionEffect',\n 'useLayoutEffect',\n 'useReducer',\n 'useRef',\n 'useState',\n 'useSyncExternalStore',\n 'useTransition',\n 'experimental_useOptimistic',\n 'useOptimistic',\n]\n\nfunction setMessage(error: Error, message: string): void {\n error.message = message\n if (error.stack) {\n const lines = error.stack.split('\\n')\n lines[0] = message\n error.stack = lines.join('\\n')\n }\n}\n\n/**\n * Input:\n * Error: Something went wrong\n at funcName (/path/to/file.js:10:5)\n at anotherFunc (/path/to/file.js:15:10)\n \n * Output:\n at funcName (/path/to/file.js:10:5)\n at anotherFunc (/path/to/file.js:15:10) \n */\nexport function getStackWithoutErrorMessage(error: Error): string {\n const stack = error.stack\n if (!stack) return ''\n return stack.replace(/^[^\\n]*\\n/, '')\n}\n\nexport function formatServerError(error: Error): void {\n if (typeof error?.message !== 'string') return\n\n if (\n error.message.includes(\n 'Class extends value undefined is not a constructor or null'\n )\n ) {\n const addedMessage =\n 'This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component'\n\n // If this error instance already has the message, don't add it again\n if (error.message.includes(addedMessage)) return\n\n setMessage(\n error,\n `${error.message}\n\n${addedMessage}`\n )\n return\n }\n\n if (error.message.includes('createContext is not a function')) {\n setMessage(\n error,\n 'createContext only works in Client Components. Add the \"use client\" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component'\n )\n return\n }\n\n for (const clientHook of invalidServerComponentReactHooks) {\n const regex = new RegExp(`\\\\b${clientHook}\\\\b.*is not a function`)\n if (regex.test(error.message)) {\n setMessage(\n error,\n `${clientHook} only works in Client Components. Add the \"use client\" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component`\n )\n return\n }\n }\n}\n"],"names":["invalidServerComponentReactHooks","setMessage","error","message","stack","lines","split","join","getStackWithoutErrorMessage","replace","formatServerError","includes","addedMessage","clientHook","regex","RegExp","test"],"mappings":";;;;;;AAAA,MAAMA,mCAAmC;IACvC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,SAASC,WAAWC,KAAY,EAAEC,OAAe;IAC/CD,MAAMC,OAAO,GAAGA;IAChB,IAAID,MAAME,KAAK,EAAE;QACf,MAAMC,QAAQH,MAAME,KAAK,CAACE,KAAK,CAAC;QAChCD,KAAK,CAAC,EAAE,GAAGF;QACXD,MAAME,KAAK,GAAGC,MAAME,IAAI,CAAC;IAC3B;AACF;AAYO,SAASC,4BAA4BN,KAAY;IACtD,MAAME,QAAQF,MAAME,KAAK;IACzB,IAAI,CAACA,OAAO,OAAO;IACnB,OAAOA,MAAMK,OAAO,CAAC,aAAa;AACpC;AAEO,SAASC,kBAAkBR,KAAY;IAC5C,IAAI,OAAA,CAAOA,SAAAA,OAAAA,KAAAA,IAAAA,MAAOC,OAAO,MAAK,UAAU;IAExC,IACED,MAAMC,OAAO,CAACQ,QAAQ,CACpB,+DAEF;QACA,MAAMC,eACJ;QAEF,qEAAqE;QACrE,IAAIV,MAAMC,OAAO,CAACQ,QAAQ,CAACC,eAAe;QAE1CX,WACEC,OACA,GAAGA,MAAMC,OAAO,CAAC;;AAEvB,EAAES,cAAc;QAEZ;IACF;IAEA,IAAIV,MAAMC,OAAO,CAACQ,QAAQ,CAAC,oCAAoC;QAC7DV,WACEC,OACA;QAEF;IACF;IAEA,KAAK,MAAMW,cAAcb,iCAAkC;QACzD,MAAMc,QAAQ,IAAIC,OAAO,CAAC,GAAG,EAAEF,WAAW,sBAAsB,CAAC;QACjE,IAAIC,MAAME,IAAI,CAACd,MAAMC,OAAO,GAAG;YAC7BF,WACEC,OACA,GAAGW,WAAW,oLAAoL,CAAC;YAErM;QACF;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 1250, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/lib/framework/boundary-components.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 1256, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/lib/framework/boundary-components.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 1263, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/framework/boundary-components.tsx"],"sourcesContent":["'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from './boundary-constants'\n\n// We use a namespace object to allow us to recover the name of the function\n// at runtime even when production bundling/minification is used.\nconst NameSpace = {\n [METADATA_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n return children\n },\n [VIEWPORT_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n return children\n },\n [OUTLET_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n return children\n },\n [ROOT_LAYOUT_BOUNDARY_NAME]: function ({\n children,\n }: {\n children: ReactNode\n }) {\n return children\n },\n}\n\nexport const MetadataBoundary =\n // We use slice(0) to trick the bundler into not inlining/minifying the function\n // so it retains the name inferred from the namespace object\n NameSpace[METADATA_BOUNDARY_NAME.slice(0) as typeof METADATA_BOUNDARY_NAME]\n\nexport const ViewportBoundary =\n // We use slice(0) to trick the bundler into not inlining/minifying the function\n // so it retains the name inferred from the namespace object\n NameSpace[VIEWPORT_BOUNDARY_NAME.slice(0) as typeof VIEWPORT_BOUNDARY_NAME]\n\nexport const OutletBoundary =\n // We use slice(0) to trick the bundler into not inlining/minifying the function\n // so it retains the name inferred from the namespace object\n NameSpace[OUTLET_BOUNDARY_NAME.slice(0) as typeof OUTLET_BOUNDARY_NAME]\n\nexport const RootLayoutBoundary =\n // We use slice(0) to trick the bundler into not inlining/minifying the function\n // so it retains the name inferred from the namespace object\n NameSpace[\n ROOT_LAYOUT_BOUNDARY_NAME.slice(0) as typeof ROOT_LAYOUT_BOUNDARY_NAME\n ]\n"],"names":["METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","NameSpace","children","MetadataBoundary","slice","ViewportBoundary","OutletBoundary","RootLayoutBoundary"],"mappings":"","ignoreList":[0]}},
|
||||
{"offset": {"line": 1271, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/framework/boundary-constants.tsx"],"sourcesContent":["export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'\n"],"names":["METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME"],"mappings":";;;;;;;;;;AAAO,MAAMA,yBAAyB,6BAA4B;AAC3D,MAAMC,yBAAyB,6BAA4B;AAC3D,MAAMC,uBAAuB,2BAA0B;AACvD,MAAMC,4BAA4B,gCAA+B","ignoreList":[0]}},
|
||||
{"offset": {"line": 1289, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/is-error.ts"],"sourcesContent":["import { isPlainObject } from '../shared/lib/is-plain-object'\n\n// We allow some additional attached properties for Next.js errors\nexport interface NextError extends Error {\n type?: string\n page?: string\n code?: string | number\n cancelled?: boolean\n digest?: string\n}\n\n/**\n * This is a safe stringify function that handles circular references.\n * We're using a simpler version here to avoid introducing\n * the dependency `safe-stable-stringify` into production bundle.\n *\n * This helper is used both in development and production.\n */\nfunction safeStringifyLite(obj: any) {\n const seen = new WeakSet()\n\n return JSON.stringify(obj, (_key, value) => {\n // If value is an object and already seen, replace with \"[Circular]\"\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return '[Circular]'\n }\n seen.add(value)\n }\n return value\n })\n}\n\n/**\n * Checks whether the given value is a NextError.\n * This can be used to print a more detailed error message with properties like `code` & `digest`.\n */\nexport default function isError(err: unknown): err is NextError {\n return (\n typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n )\n}\n\nexport function getProperError(err: unknown): Error {\n if (isError(err)) {\n return err\n }\n\n if (process.env.NODE_ENV === 'development') {\n // provide better error for case where `throw undefined`\n // is called in development\n if (typeof err === 'undefined') {\n return new Error(\n 'An undefined error was thrown, ' +\n 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n )\n }\n\n if (err === null) {\n return new Error(\n 'A null error was thrown, ' +\n 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n )\n }\n }\n\n return new Error(isPlainObject(err) ? safeStringifyLite(err) : err + '')\n}\n"],"names":["isPlainObject","safeStringifyLite","obj","seen","WeakSet","JSON","stringify","_key","value","has","add","isError","err","getProperError","process","env","NODE_ENV","Error"],"mappings":";;;;;;AAAA,SAASA,aAAa,QAAQ,gCAA+B;;AAW7D;;;;;;CAMC,GACD,SAASC,kBAAkBC,GAAQ;IACjC,MAAMC,OAAO,IAAIC;IAEjB,OAAOC,KAAKC,SAAS,CAACJ,KAAK,CAACK,MAAMC;QAChC,oEAAoE;QACpE,IAAI,OAAOA,UAAU,YAAYA,UAAU,MAAM;YAC/C,IAAIL,KAAKM,GAAG,CAACD,QAAQ;gBACnB,OAAO;YACT;YACAL,KAAKO,GAAG,CAACF;QACX;QACA,OAAOA;IACT;AACF;AAMe,SAASG,QAAQC,GAAY;IAC1C,OACE,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,UAAUA,OAAO,aAAaA;AAE7E;AAEO,SAASC,eAAeD,GAAY;IACzC,IAAID,QAAQC,MAAM;QAChB,OAAOA;IACT;IAEA,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,WAAe;QAC1C,wDAAwD;QACxD,2BAA2B;QAC3B,IAAI,OAAOJ,QAAQ,aAAa;YAC9B,OAAO,OAAA,cAGN,CAHM,IAAIK,MACT,oCACE,6EAFG,qBAAA;uBAAA;4BAAA;8BAAA;YAGP;QACF;QAEA,IAAIL,QAAQ,MAAM;YAChB,OAAO,OAAA,cAGN,CAHM,IAAIK,MACT,8BACE,6EAFG,qBAAA;uBAAA;4BAAA;8BAAA;YAGP;QACF;IACF;IAEA,OAAO,OAAA,cAAiE,CAAjE,IAAIA,UAAMjB,8LAAAA,EAAcY,OAAOX,kBAAkBW,OAAOA,MAAM,KAA9D,qBAAA;eAAA;oBAAA;sBAAA;IAAgE;AACzE","ignoreList":[0]}},
|
||||
{"offset": {"line": 1351, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/constants.ts"],"sourcesContent":["import type { ViewportLayout } from './types/extra-types'\nimport type { Icons } from './types/metadata-types'\n\nexport const ViewportMetaKeys: { [k in keyof ViewportLayout]: string } = {\n width: 'width',\n height: 'height',\n initialScale: 'initial-scale',\n minimumScale: 'minimum-scale',\n maximumScale: 'maximum-scale',\n viewportFit: 'viewport-fit',\n userScalable: 'user-scalable',\n interactiveWidget: 'interactive-widget',\n} as const\n\nexport const IconKeys: (keyof Icons)[] = ['icon', 'shortcut', 'apple', 'other']\n"],"names":["ViewportMetaKeys","width","height","initialScale","minimumScale","maximumScale","viewportFit","userScalable","interactiveWidget","IconKeys"],"mappings":";;;;;;AAGO,MAAMA,mBAA4D;IACvEC,OAAO;IACPC,QAAQ;IACRC,cAAc;IACdC,cAAc;IACdC,cAAc;IACdC,aAAa;IACbC,cAAc;IACdC,mBAAmB;AACrB,EAAU;AAEH,MAAMC,WAA4B;IAAC;IAAQ;IAAY;IAAS;CAAQ,CAAA","ignoreList":[0]}},
|
||||
{"offset": {"line": 1377, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/default-metadata.tsx"],"sourcesContent":["import type {\n ResolvedMetadata,\n ResolvedViewport,\n} from './types/metadata-interface'\n\nexport function createDefaultViewport(): ResolvedViewport {\n return {\n // name=viewport\n width: 'device-width',\n initialScale: 1,\n // visual metadata\n themeColor: null,\n colorScheme: null,\n }\n}\n\nexport function createDefaultMetadata(): ResolvedMetadata {\n return {\n // Deprecated ones\n viewport: null,\n themeColor: null,\n colorScheme: null,\n\n metadataBase: null,\n // Other values are all null\n title: null,\n description: null,\n applicationName: null,\n authors: null,\n generator: null,\n keywords: null,\n referrer: null,\n creator: null,\n publisher: null,\n robots: null,\n manifest: null,\n alternates: {\n canonical: null,\n languages: null,\n media: null,\n types: null,\n },\n icons: null,\n openGraph: null,\n twitter: null,\n verification: {},\n appleWebApp: null,\n formatDetection: null,\n itunes: null,\n facebook: null,\n pinterest: null,\n abstract: null,\n appLinks: null,\n archives: null,\n assets: null,\n bookmarks: null,\n category: null,\n classification: null,\n pagination: {\n previous: null,\n next: null,\n },\n other: {},\n }\n}\n"],"names":["createDefaultViewport","width","initialScale","themeColor","colorScheme","createDefaultMetadata","viewport","metadataBase","title","description","applicationName","authors","generator","keywords","referrer","creator","publisher","robots","manifest","alternates","canonical","languages","media","types","icons","openGraph","twitter","verification","appleWebApp","formatDetection","itunes","facebook","pinterest","abstract","appLinks","archives","assets","bookmarks","category","classification","pagination","previous","next","other"],"mappings":";;;;;;AAKO,SAASA;IACd,OAAO;QACL,gBAAgB;QAChBC,OAAO;QACPC,cAAc;QACd,kBAAkB;QAClBC,YAAY;QACZC,aAAa;IACf;AACF;AAEO,SAASC;IACd,OAAO;QACL,kBAAkB;QAClBC,UAAU;QACVH,YAAY;QACZC,aAAa;QAEbG,cAAc;QACd,4BAA4B;QAC5BC,OAAO;QACPC,aAAa;QACbC,iBAAiB;QACjBC,SAAS;QACTC,WAAW;QACXC,UAAU;QACVC,UAAU;QACVC,SAAS;QACTC,WAAW;QACXC,QAAQ;QACRC,UAAU;QACVC,YAAY;YACVC,WAAW;YACXC,WAAW;YACXC,OAAO;YACPC,OAAO;QACT;QACAC,OAAO;QACPC,WAAW;QACXC,SAAS;QACTC,cAAc,CAAC;QACfC,aAAa;QACbC,iBAAiB;QACjBC,QAAQ;QACRC,UAAU;QACVC,WAAW;QACXC,UAAU;QACVC,UAAU;QACVC,UAAU;QACVC,QAAQ;QACRC,WAAW;QACXC,UAAU;QACVC,gBAAgB;QAChBC,YAAY;YACVC,UAAU;YACVC,MAAM;QACR;QACAC,OAAO,CAAC;IACV;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 1444, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 1450, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 1457, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/generate/icon-mark.tsx"],"sourcesContent":["'use client'\n\n// This is a client component that only renders during SSR,\n// but will be replaced during streaming with an icon insertion script tag.\n// We don't want it to be presented anywhere so it's only visible during streaming,\n// right after the icon meta tags so that browser can pick it up as soon as it's rendered.\n// Note: we don't just emit the script here because we only need the script if it's not in the head,\n// and we need it to be hoistable alongside the other metadata but sync scripts are not hoistable.\nexport const IconMark = () => {\n if (typeof window !== 'undefined') {\n return null\n }\n return <meta name=\"«nxt-icon»\" />\n}\n"],"names":["IconMark","window","meta","name"],"mappings":"","ignoreList":[0]}},
|
||||
{"offset": {"line": 1465, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/generate/utils.ts"],"sourcesContent":["function resolveArray<T>(value: T | T[]): T[] {\n if (Array.isArray(value)) {\n return value as any\n }\n return [value] as any\n}\n\nfunction resolveAsArrayOrUndefined<T>(\n value: T | T[] | undefined | null\n): T extends undefined | null ? undefined : T[] {\n if (typeof value === 'undefined' || value === null) {\n return undefined as any\n }\n return resolveArray(value) as any\n}\n\nfunction getOrigin(url: string | URL): string | undefined {\n let origin = undefined\n if (typeof url === 'string') {\n try {\n url = new URL(url)\n origin = url.origin\n } catch {}\n }\n return origin\n}\n\nexport { resolveAsArrayOrUndefined, resolveArray, getOrigin }\n"],"names":["resolveArray","value","Array","isArray","resolveAsArrayOrUndefined","undefined","getOrigin","url","origin","URL"],"mappings":";;;;;;;;AAAA,SAASA,aAAgBC,KAAc;IACrC,IAAIC,MAAMC,OAAO,CAACF,QAAQ;QACxB,OAAOA;IACT;IACA,OAAO;QAACA;KAAM;AAChB;AAEA,SAASG,0BACPH,KAAiC;IAEjC,IAAI,OAAOA,UAAU,eAAeA,UAAU,MAAM;QAClD,OAAOI;IACT;IACA,OAAOL,aAAaC;AACtB;AAEA,SAASK,UAAUC,GAAiB;IAClC,IAAIC,SAASH;IACb,IAAI,OAAOE,QAAQ,UAAU;QAC3B,IAAI;YACFA,MAAM,IAAIE,IAAIF;YACdC,SAASD,IAAIC,MAAM;QACrB,EAAE,OAAM,CAAC;IACX;IACA,OAAOA;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 1502, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/metadata.tsx"],"sourcesContent":["import React, { Suspense, cache } from 'react'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { Params } from '../../server/request/params'\nimport type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type { SearchParams } from '../../server/request/search-params'\nimport {\n type MetadataErrorType,\n resolveMetadata,\n resolveViewport,\n} from './resolve-metadata'\nimport type {\n ResolvedMetadata,\n ResolvedViewport,\n} from './types/metadata-interface'\nimport { isHTTPAccessFallbackError } from '../../client/components/http-access-fallback/http-access-fallback'\nimport type { MetadataContext } from './types/resolvers'\nimport { createServerSearchParamsForMetadata } from '../../server/request/search-params'\nimport { createServerPathnameForMetadata } from '../../server/request/pathname'\nimport { isPostpone } from '../../server/lib/router-utils/is-postpone'\n\nimport {\n MetadataBoundary,\n ViewportBoundary,\n OutletBoundary,\n} from '../framework/boundary-components'\n\nimport { getOrigin } from './generate/utils'\nimport { IconMark } from './generate/icon-mark'\n\n// Use a promise to share the status of the metadata resolving,\n// returning two components `MetadataTree` and `MetadataOutlet`\n// `MetadataTree` is the one that will be rendered at first in the content sequence for metadata tags.\n// `MetadataOutlet` is the one that will be rendered under error boundaries for metadata resolving errors.\n// In this way we can let the metadata tags always render successfully,\n// and the error will be caught by the error boundary and trigger fallbacks.\nexport function createMetadataComponents({\n tree,\n pathname,\n parsedQuery,\n metadataContext,\n interpolatedParams,\n errorType,\n serveStreamingMetadata,\n}: {\n tree: LoaderTree\n pathname: string\n parsedQuery: SearchParams\n metadataContext: MetadataContext\n interpolatedParams: Params\n errorType?: MetadataErrorType | 'redirect'\n serveStreamingMetadata: boolean\n}): {\n Viewport: React.ComponentType\n Metadata: React.ComponentType\n MetadataOutlet: React.ComponentType\n} {\n const searchParams = createServerSearchParamsForMetadata(parsedQuery)\n const pathnameForMetadata = createServerPathnameForMetadata(pathname)\n\n async function Viewport() {\n const tags = await getResolvedViewport(\n tree,\n searchParams,\n interpolatedParams,\n errorType\n ).catch((viewportErr) => {\n // When Legacy PPR is enabled viewport can reject with a Postpone type\n // This will go away once Legacy PPR is removed and dynamic metadata will\n // stay pending until after the prerender is complete when it is dynamic\n if (isPostpone(viewportErr)) {\n throw viewportErr\n }\n if (!errorType && isHTTPAccessFallbackError(viewportErr)) {\n return getNotFoundViewport(\n tree,\n searchParams,\n interpolatedParams\n ).catch(() => null)\n }\n // We're going to throw the error from the metadata outlet so we just render null here instead\n return null\n })\n\n return tags\n }\n Viewport.displayName = 'Next.Viewport'\n\n function ViewportWrapper() {\n return (\n <ViewportBoundary>\n <Viewport />\n </ViewportBoundary>\n )\n }\n\n async function Metadata() {\n const tags = await getResolvedMetadata(\n tree,\n pathnameForMetadata,\n searchParams,\n interpolatedParams,\n metadataContext,\n errorType\n ).catch((metadataErr) => {\n // When Legacy PPR is enabled metadata can reject with a Postpone type\n // This will go away once Legacy PPR is removed and dynamic metadata will\n // stay pending until after the prerender is complete when it is dynamic\n if (isPostpone(metadataErr)) {\n throw metadataErr\n }\n if (!errorType && isHTTPAccessFallbackError(metadataErr)) {\n return getNotFoundMetadata(\n tree,\n pathnameForMetadata,\n searchParams,\n interpolatedParams,\n metadataContext\n ).catch(() => null)\n }\n // We're going to throw the error from the metadata outlet so we just render null here instead\n return null\n })\n\n return tags\n }\n Metadata.displayName = 'Next.Metadata'\n\n function MetadataWrapper() {\n // TODO: We shouldn't change what we render based on whether we are streaming or not.\n // If we aren't streaming we should just block the response until we have resolved the\n // metadata.\n if (!serveStreamingMetadata) {\n return (\n <MetadataBoundary>\n <Metadata />\n </MetadataBoundary>\n )\n }\n return (\n <div hidden>\n <MetadataBoundary>\n <Suspense name=\"Next.MetLine truncated
|
||||
{"offset": {"line": 3127, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/resolve-metadata.ts"],"sourcesContent":["import type {\n Metadata,\n ResolvedMetadata,\n ResolvedViewport,\n ResolvingMetadata,\n ResolvingViewport,\n Viewport,\n WithStringifiedURLs,\n} from './types/metadata-interface'\nimport type { MetadataImageModule } from '../../build/webpack/loaders/metadata/types'\nimport { getSegmentParam } from '../../shared/lib/router/utils/get-segment-param'\nimport type { Twitter } from './types/twitter-types'\nimport type { OpenGraph } from './types/opengraph-types'\nimport type { AppDirModules } from '../../build/webpack/loaders/next-app-loader'\nimport type { MetadataContext } from './types/resolvers'\nimport type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type {\n AbsoluteTemplateString,\n IconDescriptor,\n ResolvedIcons,\n} from './types/metadata-types'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { StaticMetadata } from './types/icons'\nimport { workAsyncStorage } from '../../server/app-render/work-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport type { Params } from '../../server/request/params'\nimport type { SearchParams } from '../../server/request/search-params'\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport 'server-only'\n\nimport { cache } from 'react'\nimport {\n createDefaultMetadata,\n createDefaultViewport,\n} from './default-metadata'\nimport { resolveOpenGraph, resolveTwitter } from './resolvers/resolve-opengraph'\nimport { resolveTitle } from './resolvers/resolve-title'\nimport { resolveAsArrayOrUndefined } from './generate/utils'\nimport {\n getComponentTypeModule,\n getLayoutOrPageModule,\n} from '../../server/lib/app-dir-module'\nimport {\n resolveAlternates,\n resolveAppleWebApp,\n resolveAppLinks,\n resolveRobots,\n resolveThemeColor,\n resolveVerification,\n resolveItunes,\n resolveFacebook,\n resolvePagination,\n} from './resolvers/resolve-basics'\nimport { resolveIcons } from './resolvers/resolve-icons'\nimport { getTracer } from '../../server/lib/trace/tracer'\nimport { ResolveMetadataSpan } from '../../server/lib/trace/constants'\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'\nimport * as Log from '../../build/output/log'\nimport { createServerParamsForMetadata } from '../../server/request/params'\nimport type { MetadataBaseURL } from './resolvers/resolve-url'\nimport {\n getUseCacheFunctionInfo,\n isUseCacheFunction,\n} from '../client-and-server-references'\nimport type {\n UseCacheLayoutProps,\n UseCachePageProps,\n} from '../../server/use-cache/use-cache-wrapper'\nimport { createLazyResult } from '../../server/lib/lazy-result'\n\ntype StaticIcons = Pick<ResolvedIcons, 'icon' | 'apple'>\n\ntype Resolved<T> = T extends Metadata ? ResolvedMetadata : ResolvedViewport\n\ntype InstrumentedResolver<TData> = ((\n parent: Promise<Resolved<TData>>\n) => TData | Promise<TData>) & {\n $$original: (\n props: unknown,\n parent: Promise<Resolved<TData>>\n ) => TData | Promise<TData>\n}\n\ntype MetadataResolver = InstrumentedResolver<Metadata>\ntype ViewportResolver = InstrumentedResolver<Viewport>\n\nexport type MetadataErrorType = 'not-found' | 'forbidden' | 'unauthorized'\n\nexport type MetadataItems = Array<\n [Metadata | MetadataResolver | null, StaticMetadata]\n>\n\nexport type ViewportItems = Array<Viewport | ViewportResolver | null>\n\ntype TitleTemplates = {\n title: string | null\n twitter: string | null\n openGraph: string | null\n}\n\ntype BuildState = {\n warnings: Set<string>\n}\n\ntype LayoutProps = {\n params: Promise<Params>\n}\n\ntype PageProps = {\n params: Promise<Params>\n searchParams: Promise<SearchParams>\n}\n\ntype SegmentProps = LayoutProps | PageProps\ntype UseCacheSegmentProps = UseCacheLayoutProps | UseCachePageProps\n\nfunction isFavicon(icon: IconDescriptor | undefined): boolean {\n if (!icon) {\n return false\n }\n\n // turbopack appends a hash to all images\n return (\n (icon.url === '/favicon.ico' ||\n icon.url.toString().startsWith('/favicon.ico?')) &&\n icon.type === 'image/x-icon'\n )\n}\n\nfunction convertUrlsToStrings<T>(input: T): WithStringifiedURLs<T> {\n if (input instanceof URL) {\n return input.toString() as unknown as WithStringifiedURLs<T>\n } else if (Array.isArray(input)) {\n return input.map((item) =>\n convertUrlsToStrings(item)\n ) as WithStringifiedURLs<T>\n } else if (input && typeof input === 'object') {\n const result: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(input)) {\n result[key] = convertUrlsToStrings(value)\n }\n return result as WithStringifiedURLs<T>\n }\n return input as WithStringifiedURLs<T>\n}\n\nfunction normalizeMetadataBase(metadataBase: string | URL | null): URL | null {\n if (typeof metLine truncated
|
||||
{"offset": {"line": 3971, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/resolvers/resolve-basics.ts"],"sourcesContent":["import type { AlternateLinkDescriptor } from '../types/alternative-urls-types'\nimport type {\n Metadata,\n ResolvedMetadataWithURLs,\n Viewport,\n} from '../types/metadata-interface'\nimport type { ResolvedVerification } from '../types/metadata-types'\nimport type {\n FieldResolver,\n AsyncFieldResolverExtraArgs,\n MetadataContext,\n} from '../types/resolvers'\nimport { resolveAsArrayOrUndefined } from '../generate/utils'\nimport {\n resolveAbsoluteUrlWithPathname,\n type MetadataBaseURL,\n} from './resolve-url'\n\nfunction resolveAlternateUrl(\n url: string | URL,\n metadataBase: MetadataBaseURL,\n pathname: string,\n metadataContext: MetadataContext\n) {\n // If alter native url is an URL instance,\n // we treat it as a URL base and resolve with current pathname\n if (url instanceof URL) {\n const newUrl = new URL(pathname, url)\n url.searchParams.forEach((value, key) =>\n newUrl.searchParams.set(key, value)\n )\n url = newUrl\n }\n return resolveAbsoluteUrlWithPathname(\n url,\n metadataBase,\n pathname,\n metadataContext\n )\n}\n\nexport const resolveThemeColor: FieldResolver<'themeColor', Viewport> = (\n themeColor\n) => {\n if (!themeColor) return null\n const themeColorDescriptors: Viewport['themeColor'] = []\n\n resolveAsArrayOrUndefined(themeColor)?.forEach((descriptor) => {\n if (typeof descriptor === 'string')\n themeColorDescriptors.push({ color: descriptor })\n else if (typeof descriptor === 'object')\n themeColorDescriptors.push({\n color: descriptor.color,\n media: descriptor.media,\n })\n })\n\n return themeColorDescriptors\n}\n\nasync function resolveUrlValuesOfObject(\n obj:\n | Record<\n string,\n string | URL | AlternateLinkDescriptor[] | null | undefined\n >\n | null\n | undefined,\n metadataBase: MetadataBaseURL,\n pathname: Promise<string>,\n metadataContext: MetadataContext\n): Promise<null | Record<string, AlternateLinkDescriptor[]>> {\n if (!obj) return null\n\n const result: Record<string, AlternateLinkDescriptor[]> = {}\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value === 'string' || value instanceof URL) {\n const pathnameForUrl = await pathname\n result[key] = [\n {\n url: resolveAlternateUrl(\n value,\n metadataBase,\n pathnameForUrl,\n metadataContext\n ),\n },\n ]\n } else if (value && value.length) {\n result[key] = []\n const pathnameForUrl = await pathname\n value.forEach((item, index) => {\n const url = resolveAlternateUrl(\n item.url,\n metadataBase,\n pathnameForUrl,\n metadataContext\n )\n result[key][index] = {\n url,\n title: item.title,\n }\n })\n }\n }\n return result\n}\n\nasync function resolveCanonicalUrl(\n urlOrDescriptor: string | URL | null | AlternateLinkDescriptor | undefined,\n metadataBase: MetadataBaseURL,\n pathname: Promise<string>,\n metadataContext: MetadataContext\n): Promise<null | AlternateLinkDescriptor> {\n if (!urlOrDescriptor) return null\n\n const url =\n typeof urlOrDescriptor === 'string' || urlOrDescriptor instanceof URL\n ? urlOrDescriptor\n : urlOrDescriptor.url\n\n const pathnameForUrl = await pathname\n\n // Return string url because structureClone can't handle URL instance\n return {\n url: resolveAlternateUrl(\n url,\n metadataBase,\n pathnameForUrl,\n metadataContext\n ),\n }\n}\n\nexport const resolveAlternates: AsyncFieldResolverExtraArgs<\n 'alternates',\n [MetadataBaseURL, Promise<string>, MetadataContext]\n> = async (alternates, metadataBase, pathname, context) => {\n if (!alternates) return null\n\n const canonical = await resolveCanonicalUrl(\n alternates.canonical,\n metadataBase,\n pathname,\n context\n )\n const languages = await resolveUrlValuesOfObject(\n alternates.languages,\n metadataBase,\n pathname,\n context\n )\n const media = await resolveUrlValuesOfObject(\n alternates.media,\n metadataBase,\n pathname,\n context\n )\n const types = await resolveUrlValuesOfObject(\n alternates.types,\n metadataBase,\n pathname,\n context\n )\n\n return {\n canonical,\n languages,\n media,\n types,\n }\n}\n\nconst robotsKeys = [\n 'noarchive',\n 'nosnippet',\n 'noimageindex',\n 'nocache',\n 'notranslate',\n 'indexifembedded',\n 'nositelinkssearchbox',\n 'unavailable_after',\n 'max-video-preview',\n 'max-image-preview',\n 'max-snippet',\n] as const\nconst resolveRobotsValue: (robots: Metadata['robots']) => string | null = (\n robots\n) => {\n if (!robots) reLine truncated
|
||||
{"offset": {"line": 4177, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/resolvers/resolve-icons.ts"],"sourcesContent":["import type { ResolvedMetadataWithURLs } from '../types/metadata-interface'\nimport type { Icon, IconDescriptor } from '../types/metadata-types'\nimport type { FieldResolver } from '../types/resolvers'\nimport { resolveAsArrayOrUndefined } from '../generate/utils'\nimport { isStringOrURL } from './resolve-url'\nimport { IconKeys } from '../constants'\n\nexport function resolveIcon(icon: Icon): IconDescriptor {\n if (isStringOrURL(icon)) return { url: icon }\n else if (Array.isArray(icon)) return icon\n return icon\n}\n\nexport const resolveIcons: FieldResolver<'icons'> = (icons) => {\n if (!icons) {\n return null\n }\n\n const resolved: ResolvedMetadataWithURLs['icons'] = {\n icon: [],\n apple: [],\n }\n if (Array.isArray(icons)) {\n resolved.icon = icons.map(resolveIcon).filter(Boolean)\n } else if (isStringOrURL(icons)) {\n resolved.icon = [resolveIcon(icons)]\n } else {\n for (const key of IconKeys) {\n const values = resolveAsArrayOrUndefined(icons[key])\n if (values) resolved[key] = values.map(resolveIcon)\n }\n }\n return resolved\n}\n"],"names":["resolveAsArrayOrUndefined","isStringOrURL","IconKeys","resolveIcon","icon","url","Array","isArray","resolveIcons","icons","resolved","apple","map","filter","Boolean","key","values"],"mappings":";;;;;;AAGA,SAASA,yBAAyB,QAAQ,oBAAmB;AAC7D,SAASC,aAAa,QAAQ,gBAAe;AAC7C,SAASC,QAAQ,QAAQ,eAAc;;;;AAEhC,SAASC,YAAYC,IAAU;IACpC,QAAIH,sMAAAA,EAAcG,OAAO,OAAO;QAAEC,KAAKD;IAAK;SACvC,IAAIE,MAAMC,OAAO,CAACH,OAAO,OAAOA;IACrC,OAAOA;AACT;AAEO,MAAMI,eAAuC,CAACC;IACnD,IAAI,CAACA,OAAO;QACV,OAAO;IACT;IAEA,MAAMC,WAA8C;QAClDN,MAAM,EAAE;QACRO,OAAO,EAAE;IACX;IACA,IAAIL,MAAMC,OAAO,CAACE,QAAQ;QACxBC,SAASN,IAAI,GAAGK,MAAMG,GAAG,CAACT,aAAaU,MAAM,CAACC;IAChD,OAAO,QAAIb,sMAAAA,EAAcQ,QAAQ;QAC/BC,SAASN,IAAI,GAAG;YAACD,YAAYM;SAAO;IACtC,OAAO;QACL,KAAK,MAAMM,OAAOb,+KAAAA,CAAU;YAC1B,MAAMc,aAAShB,wMAAAA,EAA0BS,KAAK,CAACM,IAAI;YACnD,IAAIC,QAAQN,QAAQ,CAACK,IAAI,GAAGC,OAAOJ,GAAG,CAACT;QACzC;IACF;IACA,OAAOO;AACT,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 4222, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/resolvers/resolve-opengraph.ts"],"sourcesContent":["import type { ResolvedMetadataWithURLs } from '../types/metadata-interface'\nimport type {\n OpenGraphType,\n OpenGraph,\n ResolvedOpenGraph,\n} from '../types/opengraph-types'\nimport type {\n FieldResolverExtraArgs,\n AsyncFieldResolverExtraArgs,\n MetadataContext,\n} from '../types/resolvers'\nimport type { ResolvedTwitterMetadata, Twitter } from '../types/twitter-types'\nimport { resolveArray, resolveAsArrayOrUndefined } from '../generate/utils'\nimport {\n getSocialImageMetadataBaseFallback,\n isStringOrURL,\n resolveUrl,\n resolveAbsoluteUrlWithPathname,\n type MetadataBaseURL,\n} from './resolve-url'\nimport { resolveTitle } from './resolve-title'\nimport { isFullStringUrl } from '../../url'\nimport { warnOnce } from '../../../build/output/log'\n\ntype FlattenArray<T> = T extends (infer U)[] ? U : T\n\nconst OgTypeFields = {\n article: ['authors', 'tags'],\n song: ['albums', 'musicians'],\n playlist: ['albums', 'musicians'],\n radio: ['creators'],\n video: ['actors', 'directors', 'writers', 'tags'],\n basic: [\n 'emails',\n 'phoneNumbers',\n 'faxNumbers',\n 'alternateLocale',\n 'audio',\n 'videos',\n ],\n} as const\n\nfunction resolveAndValidateImage(\n item: FlattenArray<OpenGraph['images'] | Twitter['images']>,\n metadataBase: MetadataBaseURL,\n isStaticMetadataRouteFile: boolean | undefined\n) {\n if (!item) return undefined\n const isItemUrl = isStringOrURL(item)\n const inputUrl = isItemUrl ? item : item.url\n if (!inputUrl) return undefined\n\n // process.env.VERCEL is set to \"1\" when System Environment Variables are\n // exposed. When exposed, validation is not necessary since we are falling back to\n // process.env.VERCEL_PROJECT_PRODUCTION_URL, process.env.VERCEL_BRANCH_URL, or\n // process.env.VERCEL_URL for the `metadataBase`. process.env.VERCEL is undefined\n // when System Environment Variables are not exposed. When not exposed, we cannot\n // detect in the build environment if the deployment is a Vercel deployment or not.\n //\n // x-ref: https://vercel.com/docs/projects/environment-variables/system-environment-variables#system-environment-variables\n const isUsingVercelSystemEnvironmentVariables = Boolean(process.env.VERCEL)\n\n const isRelativeUrl =\n typeof inputUrl === 'string' && !isFullStringUrl(inputUrl)\n\n // When no explicit metadataBase is specified by the user, we'll override it with the fallback metadata\n // under the following conditions:\n // - The provided URL is relative (ie ./og-image).\n // - The image is statically generated by Next.js (such as the special `opengraph-image` route)\n // In both cases, we want to ensure that across all environments, the ogImage is a fully qualified URL.\n // In the `opengraph-image` case, since the user isn't explicitly passing a relative path, this ensures\n // the ogImage will be properly discovered across different environments without the user needing to\n // have a bunch of `process.env` checks when defining their `metadataBase`.\n if (isRelativeUrl && (!metadataBase || isStaticMetadataRouteFile)) {\n const fallbackMetadataBase =\n getSocialImageMetadataBaseFallback(metadataBase)\n\n // When not using Vercel environment variables for URL injection, we aren't able to determine\n // a fallback value for `metadataBase`. For self-hosted setups, we want to warn\n // about this since the only fallback we'll be able to generate is `localhost`.\n // In development, we'll only warn for relative metadata that isn't part of the static\n // metadata conventions (eg `opengraph-image`), as otherwise it's currently very noisy\n // for common cases. Eventually we should remove this warning all together in favor of\n // devtools.\n const shouldWarn =\n !isUsingVercelSystemEnvironmentVariables &&\n !metadataBase &&\n (process.env.NODE_ENV === 'production' || !isStaticMetadataRouteFile)\n\n if (shouldWarn) {\n warnOnce(\n `metadataBase property in metadata export is not set for resolving social open graph or twitter images, using \"${fallbackMetadataBase.origin}\". See https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase`\n )\n }\n\n metadataBase = fallbackMetadataBase\n }\n\n return isItemUrl\n ? {\n url: resolveUrl(inputUrl, metadataBase),\n }\n : {\n ...item,\n // Update image descriptor url\n url: resolveUrl(inputUrl, metadataBase),\n }\n}\n\nexport function resolveImages(\n images: Twitter['images'],\n metadataBase: MetadataBaseURL,\n isStaticMetadataRouteFile: boolean\n): NonNullable<ResolvedMetadataWithURLs['twitter']>['images']\nexport function resolveImages(\n images: OpenGraph['images'],\n metadataBase: MetadataBaseURL,\n Line truncated
|
||||
{"offset": {"line": 4410, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/resolvers/resolve-title.ts"],"sourcesContent":["import type { Metadata } from '../types/metadata-interface'\nimport type { AbsoluteTemplateString } from '../types/metadata-types'\n\nfunction resolveTitleTemplate(\n template: string | null | undefined,\n title: string\n) {\n return template ? template.replace(/%s/g, title) : title\n}\n\nexport function resolveTitle(\n title: Metadata['title'],\n stashedTemplate: string | null | undefined\n): AbsoluteTemplateString {\n let resolved\n const template =\n typeof title !== 'string' && title && 'template' in title\n ? title.template\n : null\n\n if (typeof title === 'string') {\n resolved = resolveTitleTemplate(stashedTemplate, title)\n } else if (title) {\n if ('default' in title) {\n resolved = resolveTitleTemplate(stashedTemplate, title.default)\n }\n if ('absolute' in title && title.absolute) {\n resolved = title.absolute\n }\n }\n\n if (title && typeof title !== 'string') {\n return {\n template,\n absolute: resolved || '',\n }\n } else {\n return { absolute: resolved || title || '', template }\n }\n}\n"],"names":["resolveTitleTemplate","template","title","replace","resolveTitle","stashedTemplate","resolved","default","absolute"],"mappings":";;;;AAGA,SAASA,qBACPC,QAAmC,EACnCC,KAAa;IAEb,OAAOD,WAAWA,SAASE,OAAO,CAAC,OAAOD,SAASA;AACrD;AAEO,SAASE,aACdF,KAAwB,EACxBG,eAA0C;IAE1C,IAAIC;IACJ,MAAML,WACJ,OAAOC,UAAU,YAAYA,SAAS,cAAcA,QAChDA,MAAMD,QAAQ,GACd;IAEN,IAAI,OAAOC,UAAU,UAAU;QAC7BI,WAAWN,qBAAqBK,iBAAiBH;IACnD,OAAO,IAAIA,OAAO;QAChB,IAAI,aAAaA,OAAO;YACtBI,WAAWN,qBAAqBK,iBAAiBH,MAAMK,OAAO;QAChE;QACA,IAAI,cAAcL,SAASA,MAAMM,QAAQ,EAAE;YACzCF,WAAWJ,MAAMM,QAAQ;QAC3B;IACF;IAEA,IAAIN,SAAS,OAAOA,UAAU,UAAU;QACtC,OAAO;YACLD;YACAO,UAAUF,YAAY;QACxB;IACF,OAAO;QACL,OAAO;YAAEE,UAAUF,YAAYJ,SAAS;YAAID;QAAS;IACvD;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 4446, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/metadata/resolvers/resolve-url.ts"],"sourcesContent":["import path from '../../../shared/lib/isomorphic/path'\nimport type { MetadataContext } from '../types/resolvers'\n\nexport type MetadataBaseURL = URL | null\n\nfunction isStringOrURL(icon: any): icon is string | URL {\n return typeof icon === 'string' || icon instanceof URL\n}\n\nfunction createLocalMetadataBase() {\n // Check if experimental HTTPS is enabled\n const isExperimentalHttps = Boolean(process.env.__NEXT_EXPERIMENTAL_HTTPS)\n const protocol = isExperimentalHttps ? 'https' : 'http'\n return new URL(`${protocol}://localhost:${process.env.PORT || 3000}`)\n}\n\nfunction getPreviewDeploymentUrl(): URL | undefined {\n const origin = process.env.VERCEL_BRANCH_URL || process.env.VERCEL_URL\n return origin ? new URL(`https://${origin}`) : undefined\n}\n\nfunction getProductionDeploymentUrl(): URL | undefined {\n const origin = process.env.VERCEL_PROJECT_PRODUCTION_URL\n return origin ? new URL(`https://${origin}`) : undefined\n}\n\n/**\n * Given an optional user-provided metadataBase, this determines what the metadataBase should\n * fallback to. Specifically:\n * - In dev, it should always be localhost\n * - In Vercel preview builds, it should be the preview build ID\n * - In start, it should be the user-provided metadataBase value. Otherwise,\n * it'll fall back to the Vercel production deployment, and localhost as a last resort.\n */\nexport function getSocialImageMetadataBaseFallback(\n metadataBase: MetadataBaseURL\n): URL {\n const defaultMetadataBase = createLocalMetadataBase()\n const previewDeploymentUrl = getPreviewDeploymentUrl()\n const productionDeploymentUrl = getProductionDeploymentUrl()\n\n let fallbackMetadataBase\n if (process.env.NODE_ENV === 'development') {\n fallbackMetadataBase = defaultMetadataBase\n } else {\n fallbackMetadataBase =\n process.env.NODE_ENV === 'production' &&\n previewDeploymentUrl &&\n process.env.VERCEL_ENV === 'preview'\n ? previewDeploymentUrl\n : metadataBase || productionDeploymentUrl || defaultMetadataBase\n }\n\n return fallbackMetadataBase\n}\n\nfunction resolveUrl(url: null | undefined, metadataBase: MetadataBaseURL): null\nfunction resolveUrl(url: string | URL, metadataBase: MetadataBaseURL): URL\nfunction resolveUrl(\n url: string | MetadataBaseURL | undefined,\n metadataBase: MetadataBaseURL\n): MetadataBaseURL\nfunction resolveUrl(\n url: string | MetadataBaseURL | undefined,\n metadataBase: MetadataBaseURL\n): MetadataBaseURL {\n if (url instanceof URL) return url\n if (!url) return null\n\n try {\n // If we can construct a URL instance from url, ignore metadataBase\n const parsedUrl = new URL(url)\n return parsedUrl\n } catch {}\n\n if (!metadataBase) {\n metadataBase = createLocalMetadataBase()\n }\n\n // Handle relative or absolute paths\n const pathname = metadataBase.pathname || ''\n const joinedPath = path.posix.join(pathname, url)\n\n return new URL(joinedPath, metadataBase)\n}\n\n// Resolve with `pathname` if `url` is a relative path.\nfunction resolveRelativeUrl(url: string | URL, pathname: string): string | URL {\n if (typeof url === 'string' && url.startsWith('./')) {\n return path.posix.resolve(pathname, url)\n }\n return url\n}\n\n// The regex is matching logic from packages/next/src/lib/load-custom-routes.ts\nconst FILE_REGEX =\n /^(?:\\/((?!\\.well-known(?:\\/.*)?)(?:[^/]+\\/)*[^/]+\\.\\w+))(\\/?|$)/i\nfunction isFilePattern(pathname: string): boolean {\n return FILE_REGEX.test(pathname)\n}\n\n// Resolve `pathname` if `url` is a relative path the compose with `metadataBase`.\nfunction resolveAbsoluteUrlWithPathname(\n url: string | URL,\n metadataBase: MetadataBaseURL,\n pathname: string,\n { trailingSlash }: MetadataContext\n): string {\n // Resolve url with pathname that always starts with `/`\n url = resolveRelativeUrl(url, pathname)\n\n // Convert string url or URL instance to absolute url string,\n // if there's case needs to be resolved with metadataBase\n let resolvedUrl = ''\n const result = metadataBase ? resolveUrl(url, metadataBase) : url\n if (typeof result === 'string') {\n resolvedUrl = result\n } else {\n resolvedUrl =\n result.pathname === '/' && result.searchParams.size === 0\n ? result.origin\n : result.href\n }\n\n // Add trailing slash if it's enabled for urls matches the condition\n // - Not external, same origin with metadataBase\n // - Doesn't have query\n if (trailingSlash && !resolvedUrl.endsWith('/')) {\n let isRelative = resolvedUrl.startsWith('/')\n let hasQuery = resolvedUrl.includes('?')\n let isExternal = false\n let isFileUrl = false\n\n if (!isRelative) {\n try {\n const parsedUrl = new URL(resolvedUrl)\n isExternal =\n metadataBase != null &Line truncated
|
||||
{"offset": {"line": 4556, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/picocolors.ts"],"sourcesContent":["// ISC License\n\n// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n//\n// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1\n\nconst { env, stdout } = globalThis?.process ?? {}\n\nconst enabled =\n env &&\n !env.NO_COLOR &&\n (env.FORCE_COLOR || (stdout?.isTTY && !env.CI && env.TERM !== 'dumb'))\n\nconst replaceClose = (\n str: string,\n close: string,\n replace: string,\n index: number\n): string => {\n const start = str.substring(0, index) + replace\n const end = str.substring(index + close.length)\n const nextIndex = end.indexOf(close)\n return ~nextIndex\n ? start + replaceClose(end, close, replace, nextIndex)\n : start + end\n}\n\nconst formatter = (open: string, close: string, replace = open) => {\n if (!enabled) return String\n return (input: string) => {\n const string = '' + input\n const index = string.indexOf(close, open.length)\n return ~index\n ? open + replaceClose(string, close, replace, index) + close\n : open + string + close\n }\n}\n\nexport const reset = enabled ? (s: string) => `\\x1b[0m${s}\\x1b[0m` : String\nexport const bold = formatter('\\x1b[1m', '\\x1b[22m', '\\x1b[22m\\x1b[1m')\nexport const dim = formatter('\\x1b[2m', '\\x1b[22m', '\\x1b[22m\\x1b[2m')\nexport const italic = formatter('\\x1b[3m', '\\x1b[23m')\nexport const underline = formatter('\\x1b[4m', '\\x1b[24m')\nexport const inverse = formatter('\\x1b[7m', '\\x1b[27m')\nexport const hidden = formatter('\\x1b[8m', '\\x1b[28m')\nexport const strikethrough = formatter('\\x1b[9m', '\\x1b[29m')\nexport const black = formatter('\\x1b[30m', '\\x1b[39m')\nexport const red = formatter('\\x1b[31m', '\\x1b[39m')\nexport const green = formatter('\\x1b[32m', '\\x1b[39m')\nexport const yellow = formatter('\\x1b[33m', '\\x1b[39m')\nexport const blue = formatter('\\x1b[34m', '\\x1b[39m')\nexport const magenta = formatter('\\x1b[35m', '\\x1b[39m')\nexport const purple = formatter('\\x1b[38;2;173;127;168m', '\\x1b[39m')\nexport const cyan = formatter('\\x1b[36m', '\\x1b[39m')\nexport const white = formatter('\\x1b[37m', '\\x1b[39m')\nexport const gray = formatter('\\x1b[90m', '\\x1b[39m')\nexport const bgBlack = formatter('\\x1b[40m', '\\x1b[49m')\nexport const bgRed = formatter('\\x1b[41m', '\\x1b[49m')\nexport const bgGreen = formatter('\\x1b[42m', '\\x1b[49m')\nexport const bgYellow = formatter('\\x1b[43m', '\\x1b[49m')\nexport const bgBlue = formatter('\\x1b[44m', '\\x1b[49m')\nexport const bgMagenta = formatter('\\x1b[45m', '\\x1b[49m')\nexport const bgCyan = formatter('\\x1b[46m', '\\x1b[49m')\nexport const bgWhite = formatter('\\x1b[47m', '\\x1b[49m')\n"],"names":["globalThis","env","stdout","process","enabled","NO_COLOR","FORCE_COLOR","isTTY","CI","TERM","replaceClose","str","close","replace","index","start","substring","end","length","nextIndex","indexOf","formatter","open","String","input","string","reset","s","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","purple","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AAEd,wEAAwE;AAExE,2EAA2E;AAC3E,yEAAyE;AACzE,oEAAoE;AAEpE,2EAA2E;AAC3E,mEAAmE;AACnE,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,iEAAiE;AACjE,EAAE;AACF,8GAA8G;IAEtFA;AAAxB,MAAM,EAAEC,GAAG,EAAEC,MAAM,EAAE,GAAGF,CAAAA,CAAAA,cAAAA,UAAAA,KAAAA,OAAAA,KAAAA,IAAAA,YAAYG,OAAO,KAAI,CAAC;AAEhD,MAAMC,UACJH,OACA,CAACA,IAAII,QAAQ,IACZJ,CAAAA,IAAIK,WAAW,IAAKJ,CAAAA,UAAAA,OAAAA,KAAAA,IAAAA,OAAQK,KAAK,KAAI,CAACN,IAAIO,EAAE,IAAIP,IAAIQ,IAAI,KAAK,MAAM;AAEtE,MAAMC,eAAe,CACnBC,KACAC,OACAC,SACAC;IAEA,MAAMC,QAAQJ,IAAIK,SAAS,CAAC,GAAGF,SAASD;IACxC,MAAMI,MAAMN,IAAIK,SAAS,CAACF,QAAQF,MAAMM,MAAM;IAC9C,MAAMC,YAAYF,IAAIG,OAAO,CAACR;IAC9B,OAAO,CAACO,YACJJ,QAAQL,aAAaO,KAAKL,OAAOC,SAASM,aAC1CJ,QAAQE;AACd;AAEA,MAAMI,YAAY,CAACC,MAAcV,OAAeC,UAAUS,IAAI;IAC5D,IAAI,CAAClB,SAAS,OAAOmB;IACrB,OAAO,CAACC;QACN,MAAMC,SAAS,KAAKD;QACpB,MAAMV,QAALine truncated
|
||||
{"offset": {"line": 4671, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/scheduler.ts"],"sourcesContent":["export type ScheduledFn<T = void> = () => T | PromiseLike<T>\nexport type SchedulerFn<T = void> = (cb: ScheduledFn<T>) => void\n\n/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */\nexport const scheduleOnNextTick = (cb: ScheduledFn<void>) => {\n // We use Promise.resolve().then() here so that the operation is scheduled at\n // the end of the promise job queue, we then add it to the next process tick\n // to ensure it's evaluated afterwards.\n //\n // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n //\n Promise.resolve().then(() => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n process.nextTick(cb)\n }\n })\n}\n\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */\nexport const scheduleImmediate = (cb: ScheduledFn<void>): void => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n setImmediate(cb)\n }\n}\n\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */\nexport function atLeastOneTask() {\n return new Promise<void>((resolve) => scheduleImmediate(resolve))\n}\n\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */\nexport function waitAtLeastOneReactRenderTask(): Promise<void> {\n if (process.env.NEXT_RUNTIME === 'edge') {\n return new Promise((r) => setTimeout(r, 0))\n } else {\n return new Promise((r) => setImmediate(r))\n }\n}\n"],"names":["scheduleOnNextTick","cb","Promise","resolve","then","process","env","NEXT_RUNTIME","setTimeout","nextTick","scheduleImmediate","setImmediate","atLeastOneTask","waitAtLeastOneReactRenderTask","r"],"mappings":"AAGA;;;;;CAKC,GACD;;;;;;;;;;AAAO,MAAMA,qBAAqB,CAACC;IACjC,6EAA6E;IAC7E,4EAA4E;IAC5E,uCAAuC;IACvC,EAAE;IACF,kLAAkL;IAClL,EAAE;IACFC,QAAQC,OAAO,GAAGC,IAAI,CAAC;QACrB,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;aAElC;YACLF,QAAQI,QAAQ,CAACR;QACnB;IACF;AACF,EAAC;AAQM,MAAMS,oBAAoB,CAACT;IAChC,IAAII,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACLI,aAAaV;IACf;AACF,EAAC;AAOM,SAASW;IACd,OAAO,IAAIV,QAAc,CAACC,UAAYO,kBAAkBP;AAC1D;AAWO,SAASU;IACd,IAAIR,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;SAElC;QACL,OAAO,IAAIL,QAAQ,CAACY,IAAMH,aAAaG;IACzC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 4722, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/lib/url.ts"],"sourcesContent":["import type { UrlWithParsedQuery } from 'url'\nimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\n\nconst DUMMY_ORIGIN = 'http://n'\n\nexport function isFullStringUrl(url: string) {\n return /https?:\\/\\//.test(url)\n}\n\nexport function parseUrl(url: string): URL | undefined {\n let parsed: URL | undefined = undefined\n try {\n parsed = new URL(url, DUMMY_ORIGIN)\n } catch {}\n return parsed\n}\n\nexport function parseReqUrl(url: string): UrlWithParsedQuery | undefined {\n const parsedUrl: URL | undefined = parseUrl(url)\n\n if (!parsedUrl) {\n return\n }\n\n const query: Record<string, string | string[]> = {}\n\n for (const key of parsedUrl.searchParams.keys()) {\n const values = parsedUrl.searchParams.getAll(key)\n query[key] = values.length > 1 ? values : values[0]\n }\n\n const legacyUrl: UrlWithParsedQuery = {\n query,\n hash: parsedUrl.hash,\n search: parsedUrl.search,\n path: parsedUrl.pathname,\n pathname: parsedUrl.pathname,\n href: `${parsedUrl.pathname}${parsedUrl.search}${parsedUrl.hash}`,\n host: '',\n hostname: '',\n auth: '',\n protocol: '',\n slashes: null,\n port: '',\n }\n return legacyUrl\n}\n\nexport function stripNextRscUnionQuery(relativeUrl: string): string {\n const urlInstance = new URL(relativeUrl, DUMMY_ORIGIN)\n urlInstance.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n return urlInstance.pathname + urlInstance.search\n}\n"],"names":["NEXT_RSC_UNION_QUERY","DUMMY_ORIGIN","isFullStringUrl","url","test","parseUrl","parsed","undefined","URL","parseReqUrl","parsedUrl","query","key","searchParams","keys","values","getAll","length","legacyUrl","hash","search","path","pathname","href","host","hostname","auth","protocol","slashes","port","stripNextRscUnionQuery","relativeUrl","urlInstance","delete"],"mappings":";;;;;;;;;;AACA,SAASA,oBAAoB,QAAQ,0CAAyC;;AAE9E,MAAMC,eAAe;AAEd,SAASC,gBAAgBC,GAAW;IACzC,OAAO,cAAcC,IAAI,CAACD;AAC5B;AAEO,SAASE,SAASF,GAAW;IAClC,IAAIG,SAA0BC;IAC9B,IAAI;QACFD,SAAS,IAAIE,IAAIL,KAAKF;IACxB,EAAE,OAAM,CAAC;IACT,OAAOK;AACT;AAEO,SAASG,YAAYN,GAAW;IACrC,MAAMO,YAA6BL,SAASF;IAE5C,IAAI,CAACO,WAAW;QACd;IACF;IAEA,MAAMC,QAA2C,CAAC;IAElD,KAAK,MAAMC,OAAOF,UAAUG,YAAY,CAACC,IAAI,GAAI;QAC/C,MAAMC,SAASL,UAAUG,YAAY,CAACG,MAAM,CAACJ;QAC7CD,KAAK,CAACC,IAAI,GAAGG,OAAOE,MAAM,GAAG,IAAIF,SAASA,MAAM,CAAC,EAAE;IACrD;IAEA,MAAMG,YAAgC;QACpCP;QACAQ,MAAMT,UAAUS,IAAI;QACpBC,QAAQV,UAAUU,MAAM;QACxBC,MAAMX,UAAUY,QAAQ;QACxBA,UAAUZ,UAAUY,QAAQ;QAC5BC,MAAM,GAAGb,UAAUY,QAAQ,GAAGZ,UAAUU,MAAM,GAAGV,UAAUS,IAAI,EAAE;QACjEK,MAAM;QACNC,UAAU;QACVC,MAAM;QACNC,UAAU;QACVC,SAAS;QACTC,MAAM;IACR;IACA,OAAOX;AACT;AAEO,SAASY,uBAAuBC,WAAmB;IACxD,MAAMC,cAAc,IAAIxB,IAAIuB,aAAa9B;IACzC+B,YAAYnB,YAAY,CAACoB,MAAM,CAACjC,+MAAAA;IAEhC,OAAOgC,YAAYV,QAAQ,GAAGU,YAAYZ,MAAM;AAClD","ignoreList":[0]}},
|
||||
{"offset": {"line": 4779, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 4785, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js/__nextjs-internal-proxy.cjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js <module evaluation>\"));\n"],"names":["createClientModuleProxy","__turbopack_context__","n"],"mappings":"AAAA,uEAAuE;AACvE,MAAM,EAAEA,uBAAuB,EAAE;AAEjCC,sBAAsBC,CAAC,CAACF,wBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 4792, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/next-devtools/userspace/app/segment-explorer-node.tsx"],"sourcesContent":["'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n useState,\n createContext,\n useContext,\n use,\n useMemo,\n useCallback,\n} from 'react'\nimport { useLayoutEffect } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport { GlobalLayoutRouterContext } from '../../../shared/lib/app-router-context.shared-runtime'\nimport { notFound } from '../../../client/components/not-found'\n\nexport type SegmentBoundaryType =\n | 'not-found'\n | 'error'\n | 'loading'\n | 'global-error'\n\nexport const SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE =\n 'NEXT_DEVTOOLS_SIMULATED_ERROR'\n\nexport type SegmentNodeState = {\n type: string\n pagePath: string\n boundaryType: string | null\n setBoundaryType: (type: SegmentBoundaryType | null) => void\n}\n\nfunction SegmentTrieNode({\n type,\n pagePath,\n}: {\n type: string\n pagePath: string\n}): React.ReactNode {\n const { boundaryType, setBoundaryType } = useSegmentState()\n const nodeState: SegmentNodeState = useMemo(() => {\n return {\n type,\n pagePath,\n boundaryType,\n setBoundaryType,\n }\n }, [type, pagePath, boundaryType, setBoundaryType])\n\n // Use `useLayoutEffect` to ensure the state is updated during suspense.\n // `useEffect` won't work as the state is preserved during suspense.\n useLayoutEffect(() => {\n dispatcher.segmentExplorerNodeAdd(nodeState)\n return () => {\n dispatcher.segmentExplorerNodeRemove(nodeState)\n }\n }, [nodeState])\n\n return null\n}\n\nfunction NotFoundSegmentNode(): React.ReactNode {\n notFound()\n}\n\nfunction ErrorSegmentNode(): React.ReactNode {\n throw new Error(SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE)\n}\n\nconst forever = new Promise(() => {})\nfunction LoadingSegmentNode(): React.ReactNode {\n use(forever)\n return null\n}\n\nexport function SegmentViewStateNode({ page }: { page: string }) {\n const { tree } = useContext(GlobalLayoutRouterContext)\n useLayoutEffect(() => {\n dispatcher.segmentExplorerUpdateRouteState(page, tree)\n return () => {\n dispatcher.segmentExplorerUpdateRouteState('', null)\n }\n }, [page, tree])\n return null\n}\n\nexport function SegmentBoundaryTriggerNode() {\n const { boundaryType } = useSegmentState()\n let segmentNode: React.ReactNode = null\n if (boundaryType === 'loading') {\n segmentNode = <LoadingSegmentNode />\n } else if (boundaryType === 'not-found') {\n segmentNode = <NotFoundSegmentNode />\n } else if (boundaryType === 'error') {\n segmentNode = <ErrorSegmentNode />\n }\n return segmentNode\n}\n\nexport function SegmentViewNode({\n type,\n pagePath,\n children,\n}: {\n type: string\n pagePath: string\n children?: ReactNode\n}): React.ReactNode {\n const segmentNode = (\n <SegmentTrieNode key={type} type={type} pagePath={pagePath} />\n )\n\n return (\n <>\n {segmentNode}\n {children}\n </>\n )\n}\n\nconst SegmentStateContext = createContext<{\n boundaryType: SegmentBoundaryType | null\n setBoundaryType: (type: SegmentBoundaryType | null) => void\n}>({\n boundaryType: null,\n setBoundaryType: () => {},\n})\n\nexport function SegmentStateProvider({ children }: { children: ReactNode }) {\n const [boundaryType, setBoundaryType] = useState<SegmentBoundaryType | null>(\n null\n )\n\n const [errorBoundaryKey, setErrorBoundaryKey] = useState(0)\n const reloadBoundary = useCallback(\n () => setErrorBoundaryKey((prev) => prev + 1),\n []\n )\n\n const setBoundaryTypeAndReload = useCallback(\n (type: SegmentBoundaryType | null) => {\n if (type === null) {\n reloadBoundary()\n }\n setBoundaryType(type)\n },\n [reloadBoundary]\n )\n\n return (\n <SegmentStateContext.Provider\n key={errorBoundaryKey}\n value={{\n boundaryType,\n setBoundaryType: setBoundaryTypeAndReload,\n }}\n >\n {children}\n </SegmentStateContext.Provider>\n )\n}\n\nexport function useSegmentState() {\n return useContext(SegmentStateContext)\n}\n"],"names":["useState","createContext","useContext","use","useMemo","useCallback","useLayoutEffect","dispatcher","GlobalLayoutRouterContext","notFound","SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE","SegmentTrieNode","type","pagePath","boundaryType","setBoundaryType","useSegmentState","nodeState","segmentExplorerNodeAdd","segmentExplorerNodeRemove","NotFoundSegmentNode","ErrorSegmentNode","Error","forever","Promise","LoadingSegmentNode","SegmentViewStateNode","page","tree","segmentExplorerUpdateRouteState","SegmentBoundaryTriggerNode","segmentNode","SegmentViewNode","children","SegmentStateContext","SegmentStateProvider","errorBoundaryKey","setErrorBoundaryKey","reloadBoundary","prev","setBoundaryTypeAndReload","Provider","valLine truncated
|
||||
{"offset": {"line": 4800, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/api-utils/get-cookie-parser.ts"],"sourcesContent":["import type { NextApiRequestCookies } from '.'\n\n/**\n * Parse cookies from the `headers` of request\n * @param req request object\n */\n\nexport function getCookieParser(headers: {\n [key: string]: string | string[] | null | undefined\n}): () => NextApiRequestCookies {\n return function parseCookie(): NextApiRequestCookies {\n const { cookie } = headers\n\n if (!cookie) {\n return {}\n }\n\n const { parse: parseCookieFn } =\n require('next/dist/compiled/cookie') as typeof import('next/dist/compiled/cookie')\n return parseCookieFn(Array.isArray(cookie) ? cookie.join('; ') : cookie)\n }\n}\n"],"names":["getCookieParser","headers","parseCookie","cookie","parse","parseCookieFn","require","Array","isArray","join"],"mappings":"AAEA;;;CAGC,GAED;;;;AAAO,SAASA,gBAAgBC,OAE/B;IACC,OAAO,SAASC;QACd,MAAM,EAAEC,MAAM,EAAE,GAAGF;QAEnB,IAAI,CAACE,QAAQ;YACX,OAAO,CAAC;QACV;QAEA,MAAM,EAAEC,OAAOC,aAAa,EAAE,GAC5BC,QAAQ;QACV,OAAOD,cAAcE,MAAMC,OAAO,CAACL,UAAUA,OAAOM,IAAI,CAAC,QAAQN;IACnE;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 4821, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/api-utils/index.ts"],"sourcesContent":["import type { IncomingHttpHeaders, IncomingMessage } from 'http'\nimport type { CookieSerializeOptions } from 'next/dist/compiled/cookie'\nimport type { NextApiResponse } from '../../shared/lib/utils'\n\nimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'\nimport {\n PRERENDER_REVALIDATE_HEADER,\n PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER,\n} from '../../lib/constants'\nimport { getTracer } from '../lib/trace/tracer'\nimport { NodeSpan } from '../lib/trace/constants'\n\nexport type NextApiRequestCookies = Partial<{ [key: string]: string }>\nexport type NextApiRequestQuery = Partial<{ [key: string]: string | string[] }>\n\nexport type __ApiPreviewProps = {\n previewModeId: string\n previewModeEncryptionKey: string\n previewModeSigningKey: string\n}\n\nexport function wrapApiHandler<T extends (...args: any[]) => any>(\n page: string,\n handler: T\n): T {\n return ((...args) => {\n getTracer().setRootSpanAttribute('next.route', page)\n // Call API route method\n return getTracer().trace(\n NodeSpan.runHandler,\n {\n spanName: `executing api route (pages) ${page}`,\n },\n () => handler(...args)\n )\n }) as T\n}\n\n/**\n *\n * @param res response object\n * @param statusCode `HTTP` status code of response\n */\nexport function sendStatusCode(\n res: NextApiResponse,\n statusCode: number\n): NextApiResponse<any> {\n res.statusCode = statusCode\n return res\n}\n\n/**\n *\n * @param res response object\n * @param [statusOrUrl] `HTTP` status code of redirect\n * @param url URL of redirect\n */\nexport function redirect(\n res: NextApiResponse,\n statusOrUrl: string | number,\n url?: string\n): NextApiResponse<any> {\n if (typeof statusOrUrl === 'string') {\n url = statusOrUrl\n statusOrUrl = 307\n }\n if (typeof statusOrUrl !== 'number' || typeof url !== 'string') {\n throw new Error(\n `Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`\n )\n }\n res.writeHead(statusOrUrl, { Location: url })\n res.write(url)\n res.end()\n return res\n}\n\nexport function checkIsOnDemandRevalidate(\n rawHeaders: Headers | IncomingHttpHeaders,\n previewProps: __ApiPreviewProps\n): {\n isOnDemandRevalidate: boolean\n revalidateOnlyGenerated: boolean\n} {\n // Headers is a plain object for Node.js, Headers object in Edge runtime\n if (typeof rawHeaders.get === 'function') {\n const headers = HeadersAdapter.from(rawHeaders)\n\n const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER)\n const isOnDemandRevalidate = previewModeId === previewProps.previewModeId\n\n const revalidateOnlyGenerated = headers.has(\n PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER\n )\n\n return { isOnDemandRevalidate, revalidateOnlyGenerated }\n }\n\n const headers = rawHeaders as IncomingHttpHeaders\n\n const previewModeId = headers[PRERENDER_REVALIDATE_HEADER]\n const isOnDemandRevalidate = previewModeId === previewProps.previewModeId\n\n const revalidateOnlyGenerated = headers.hasOwnProperty(\n PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER\n )\n\n return { isOnDemandRevalidate, revalidateOnlyGenerated }\n}\n\nexport const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`\nexport const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`\n\nexport const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024\n\nexport const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA)\nexport const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS)\n\nexport function clearPreviewData<T>(\n res: NextApiResponse<T>,\n options: {\n path?: string\n } = {}\n): NextApiResponse<T> {\n if (SYMBOL_CLEARED_COOKIES in res) {\n return res\n }\n\n const { serialize } =\n require('next/dist/compiled/cookie') as typeof import('next/dist/compiled/cookie')\n const previous = res.getHeader('Set-Cookie')\n res.setHeader(`Set-Cookie`, [\n ...(typeof previous === 'string'\n ? [previous]\n : Array.isArray(previous)\n ? previous\n : []),\n serialize(COOKIE_NAME_PRERENDER_BYPASS, '', {\n // To delete a cookie, set `expires` to a date in the past:\n // https://tools.ietf.org/html/rfc6265#section-4.1.1\n // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n expires: new Date(0),\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n ...(options.path !== undefined\n ? ({ path: options.path } as CookieSerializeOptions)\n : undefined),\n }),\n serialize(COOKIE_NAME_PRERENDER_DATA, '', {\n // To delete a cookie, set `expires` to a date iLine truncated
|
||||
{"offset": {"line": 5006, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/async-local-storage.ts"],"sourcesContent":["import type { AsyncLocalStorage } from 'async_hooks'\n\nconst sharedAsyncLocalStorageNotAvailableError = new Error(\n 'Invariant: AsyncLocalStorage accessed in runtime where it is not available'\n)\n\nclass FakeAsyncLocalStorage<Store extends {}>\n implements AsyncLocalStorage<Store>\n{\n disable(): void {\n throw sharedAsyncLocalStorageNotAvailableError\n }\n\n getStore(): Store | undefined {\n // This fake implementation of AsyncLocalStorage always returns `undefined`.\n return undefined\n }\n\n run<R>(): R {\n throw sharedAsyncLocalStorageNotAvailableError\n }\n\n exit<R>(): R {\n throw sharedAsyncLocalStorageNotAvailableError\n }\n\n enterWith(): void {\n throw sharedAsyncLocalStorageNotAvailableError\n }\n\n static bind<T>(fn: T): T {\n return fn\n }\n}\n\nconst maybeGlobalAsyncLocalStorage =\n typeof globalThis !== 'undefined' && (globalThis as any).AsyncLocalStorage\n\nexport function createAsyncLocalStorage<\n Store extends {},\n>(): AsyncLocalStorage<Store> {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage()\n }\n return new FakeAsyncLocalStorage()\n}\n\nexport function bindSnapshot<T>(\n // WARNING: Don't pass a named function to this argument! See: https://github.com/facebook/react/pull/34911\n fn: T\n): T {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.bind(fn)\n }\n return FakeAsyncLocalStorage.bind(fn)\n}\n\nexport function createSnapshot(): <R, TArgs extends any[]>(\n fn: (...args: TArgs) => R,\n ...args: TArgs\n) => R {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.snapshot()\n }\n return function (fn: any, ...args: any[]) {\n return fn(...args)\n }\n}\n"],"names":["sharedAsyncLocalStorageNotAvailableError","Error","FakeAsyncLocalStorage","disable","getStore","undefined","run","exit","enterWith","bind","fn","maybeGlobalAsyncLocalStorage","globalThis","AsyncLocalStorage","createAsyncLocalStorage","bindSnapshot","createSnapshot","snapshot","args"],"mappings":";;;;;;;;AAEA,MAAMA,2CAA2C,OAAA,cAEhD,CAFgD,IAAIC,MACnD,+EAD+C,qBAAA;WAAA;gBAAA;kBAAA;AAEjD;AAEA,MAAMC;IAGJC,UAAgB;QACd,MAAMH;IACR;IAEAI,WAA8B;QAC5B,4EAA4E;QAC5E,OAAOC;IACT;IAEAC,MAAY;QACV,MAAMN;IACR;IAEAO,OAAa;QACX,MAAMP;IACR;IAEAQ,YAAkB;QAChB,MAAMR;IACR;IAEA,OAAOS,KAAQC,EAAK,EAAK;QACvB,OAAOA;IACT;AACF;AAEA,MAAMC,+BACJ,OAAOC,eAAe,eAAgBA,WAAmBC,iBAAiB;AAErE,SAASC;IAGd,IAAIH,8BAA8B;QAChC,OAAO,IAAIA;IACb;IACA,OAAO,IAAIT;AACb;AAEO,SAASa,aACd,AACAL,EAAK,yGADsG;IAG3G,IAAIC,8BAA8B;QAChC,OAAOA,6BAA6BF,IAAI,CAACC;IAC3C;IACA,OAAOR,sBAAsBO,IAAI,CAACC;AACpC;AAEO,SAASM;IAId,IAAIL,8BAA8B;QAChC,OAAOA,6BAA6BM,QAAQ;IAC9C;IACA,OAAO,SAAUP,EAAO,EAAE,GAAGQ,IAAW;QACtC,OAAOR,MAAMQ;IACf;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 5065, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/blocking-route-messages.ts"],"sourcesContent":["export function createRuntimeBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered runtime data during prerendering.\\n\\n` +\n `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n )\n}\n\nexport function createDynamicBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached data during prerendering.\\n\\n` +\n `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n )\n}\n\nexport function createRuntimeBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered runtime data during prerendering or a navigation.\\n\\n` +\n `\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`\n )\n}\n\nexport function createLinkBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered URL data during prerendering or a navigation.\\n\\n` +\n `\\`params\\` or \\`searchParams\\` accessed outside of \\`<Suspense>\\` may prevent the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/instant-shell-url-data`\n )\n}\n\nexport function createDynamicBodyErrorInNavigation(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached data during prerendering or a navigation.\\n\\n` +\n `\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] Cache the data access with \\`\"use cache\"\\` (does not apply to \\`connection()\\`)\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`\n )\n}\n\n/**\n * NOTE: Prefer `createRuntimeBodyError` or `createDynamicBodyError`.\n * Only use this in situations like build-time static validation, where\n * we can't pinpoint a more specific reason.\n */\nexport function createDynamicOrRuntimeBodyError(route: string): Error {\n return new Error(\n `Route \"${route}\": Next.js encountered uncached or runtime data during prerendering.\\n\\n` +\n `\\`fetch(...)\\`, \\`cookies()\\`, \\`headers()\\`, \\`params\\`, \\`searchParams\\`, or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n` +\n ` - [cache] For uncached data (\\`fetch\\`, database calls): cache the access with \\`\"use cache\"\\` (does not apply to \\`connecLine truncated
|
||||
{"offset": {"line": 5205, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/collect-segment-data.tsx"],"sourcesContent":["/* eslint-disable @next/internal/no-ambiguous-jsx -- Bundled in entry-base so it gets the right JSX runtime. */\nimport type {\n CacheNodeSeedData,\n FlightRouterState,\n InitialRSCPayload,\n DynamicParamTypesShort,\n HeadData,\n PrefetchHints,\n} from '../../shared/lib/app-router-types'\nimport {\n PrefetchHint,\n StaticPrefetchDisabled,\n} from '../../shared/lib/app-router-types'\nimport type { VaryParamsIterable } from '../../shared/lib/segment-cache/vary-params-decoding'\nimport type { ManifestNode } from '../../build/webpack/plugins/flight-manifest-plugin'\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { createFromReadableStream } from 'react-server-dom-webpack/client'\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { prerender } from 'react-server-dom-webpack/static'\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { renderToReadableStream } from 'react-server-dom-webpack/server'\n\nimport {\n streamFromBuffer,\n streamToBuffer,\n} from '../stream-utils/node-web-streams-helper'\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'\nimport { waitAtLeastOneReactRenderTask } from '../../lib/scheduler'\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers'\nimport {\n type SegmentRequestKey,\n createSegmentRequestKeyPart,\n appendSegmentRequestKeyPart,\n ROOT_SEGMENT_REQUEST_KEY,\n HEAD_REQUEST_KEY,\n} from '../../shared/lib/segment-cache/segment-value-encoding'\nimport { getDigestForWellKnownError } from './create-error-handler'\nimport {\n Phase,\n printDebugThrownValueForProspectiveRender,\n} from './prospective-render-utils'\nimport { workAsyncStorage } from './work-async-storage.external'\n\n// Contains metadata about the route tree. The client must fetch this before\n// it can fetch any actual segment data.\nexport type RootTreePrefetch = {\n buildId?: string\n tree: TreePrefetch\n staleTime: number\n}\n\nexport type TreePrefetchParam = {\n type: DynamicParamTypesShort\n // When cacheComponents is enabled, this field is always null.\n // Instead we parse the param on the client, allowing us to omit it from\n // the prefetch response and increase its cacheability.\n key: string | null\n // Static sibling segments at the same URL level. Used by the client\n // router to determine if a prefetch can be reused when navigating to\n // a static sibling of a dynamic route. For example, if the route is\n // /products/[id] and there's also /products/sale, then siblings\n // would be ['sale']. null means the siblings are unknown (e.g. in\n // webpack dev mode).\n siblings: readonly string[] | null\n}\n\nexport type TreePrefetch = {\n name: string\n // Only present for parameterized (dynamic) segments.\n param: TreePrefetchParam | null\n\n // Child segments.\n slots: null | {\n [parallelRouteKey: string]: TreePrefetch\n }\n\n /** Bitmask of PrefetchHint flags for this segment and its subtree */\n prefetchHints: number\n}\n\n/**\n * Top-level response for a segment prefetch request. Contains the build ID\n * and an array of segment data (one per segment in the bundle).\n *\n * Ordering contract: data[0] is the requested (terminal) segment. Subsequent\n * elements are ancestors that were inlined into this response, built by\n * walking the SegmentBundleNode linked list. The client's SegmentBundle\n * linked list is constructed in the same order during scheduling, so the\n * two are walked in parallel when the response arrives. A null element\n * indicates a disabled segment (prefetch: 'force-disabled') that occupies a\n * slot but carries no data. (Allow-runtime segments get real slots — the\n * server emits static data for them unconditionally.)\n */\nexport type SegmentPrefetchResponse = {\n buildId: string\n data: Array<SegmentPrefetch | null>\n /**\n * True if this response was generated from a fallback shell render (i.e. the\n * page had not yet been prerendered with concrete params, so it was rendered\n * with `fallbackRouteParams`). The client uses this to schedule a retry,\n * since a more complete version may become available once the server's\n * background regeneration finishes.\n *\n * Note: this is distinct from per-segment `isPartial`. A fully-prerendered\n * PPR page can have partial segments (dynamic holes filled by runtime\n * requests); those should not be retried. `isUpgradeableISRFallback` specifically means a\n * more complete *static* version may become available.\n */\n isUpgradeableISRFallback: boolean\n /**\n * Shell byte boundary — the segment-level analogue of the route-level `a`.\n * A promise because the value is only known mid-stream; its resolution row\n * flushes past the boundary, so a truncated shLine truncated
|
||||
{"offset": {"line": 6137, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/create-error-handler.tsx"],"sourcesContent":["import type { ErrorInfo } from 'react'\nimport stringHash from 'next/dist/compiled/string-hash'\n\nimport { formatServerError } from '../../lib/format-server-error'\nimport { SpanStatusCode, getTracer } from '../lib/trace/tracer'\n\nimport { isAbortError } from '../pipe-readable'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { isDynamicServerError } from '../../client/components/hooks-server-context'\nimport { isNextRouterError } from '../../client/components/is-next-router-error'\nimport { isPrerenderInterruptedError } from './dynamic-rendering'\nimport { getProperError } from '../../lib/is-error'\nimport { createDigestWithErrorCode } from '../../lib/error-telemetry-utils'\nimport { isReactLargeShellError } from './react-large-shell-error'\nimport { isInstantValidationError } from './instant-validation/instant-validation-error'\n\ndeclare global {\n var __next_log_error__: undefined | ((err: unknown) => void)\n}\n\ntype RSCErrorHandler = (err: unknown) => string | undefined\ntype SSRErrorHandler = (\n err: unknown,\n errorInfo?: ErrorInfo\n) => string | undefined\n\nexport type DigestedError = Error & { digest: string; environmentName?: string }\n\n/**\n * Returns a digest for well-known Next.js errors, otherwise `undefined`. If a\n * digest is returned this also means that the error does not need to be\n * reported.\n */\nexport function getDigestForWellKnownError(error: unknown): string | undefined {\n // If we're bailing out to CSR, we don't need to log the error.\n if (isBailoutToCSRError(error)) return error.digest\n\n // If this is a navigation error, we don't need to log the error.\n if (isNextRouterError(error)) return error.digest\n\n // If this error occurs, we know that we should be stopping the static\n // render. This is only thrown in static generation when PPR is not enabled,\n // which causes the whole page to be marked as dynamic. We don't need to\n // tell the user about this error, as it's not actionable.\n if (isDynamicServerError(error)) return error.digest\n\n // If this is a prerender interrupted error, we don't need to log the error.\n if (isPrerenderInterruptedError(error)) return error.digest\n\n if (isInstantValidationError(error)) return error.digest\n\n return undefined\n}\n\nexport function createReactServerErrorHandler(\n shouldFormatError: boolean,\n isBuildTimePrerendering: boolean,\n reactServerErrors: Map<string, DigestedError>,\n onReactServerRenderError: (err: DigestedError, silenceLog: boolean) => void,\n spanToRecordOn?: any\n): RSCErrorHandler {\n return (thrownValue: unknown) => {\n // If the response was closed, we don't need to log the error.\n if (isAbortError(thrownValue)) return\n\n const digest = getDigestForWellKnownError(thrownValue)\n\n if (digest) {\n return digest\n }\n\n if (isReactLargeShellError(thrownValue)) {\n // TODO: Aggregate\n console.error(thrownValue)\n return undefined\n }\n\n let err = getProperError(thrownValue) as DigestedError\n let silenceLog = false\n\n // If the error already has a digest, respect the original digest,\n // so it won't get re-generated into another new error.\n if (err.digest) {\n const originalError = reactServerErrors.get(err.digest)\n\n if (originalError) {\n // This error crossed a react-server boundary (e.g. from a `'use cache'`\n // render). Reaching the handler means it surfaced (it wasn't caught in\n // userland), so stamp the digest onto the original to mark it surfaced.\n // If the original was recorded as `invalidDynamicUsageError` without a\n // digest (a cache that aborted across the boundary), this is what lets\n // the dev overlay dedup: the separate forwarding checks for that digest\n // and skips it.\n originalError.digest ??= err.digest\n\n if (process.env.NODE_ENV === 'production') {\n // In production we use the recovered original (de-obfuscated!) error\n // for reporting, and don't log it again as it was already logged in\n // the original environment.\n err = originalError\n silenceLog = true\n }\n }\n } else {\n // TODO-APP: look at using webcrypto instead of string-hash. Requires a promise to be awaited.\n err.digest =\n typeof thrownValue === 'string'\n ? stringHash(thrownValue).toString()\n : createDigestWithErrorCode(\n err,\n stringHash(err.message + (err.stack || '')).toString()\n )\n }\n\n // @TODO by putting this here and not at the top it is possible that\n // we don't error the build in places we actually expect to\n if (!reactServerErrors.has(err.digest))Line truncated
|
||||
{"offset": {"line": 6316, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/dynamic-rendering.ts"],"sourcesContent":["/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n WorkUnitStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n ValidationStoreClient,\n PrerenderStoreModernServer,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n getStagedRenderingController,\n throwForMissingRequestStore,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n ClientHookDynamicError,\n isClientHookDynamicError,\n makeClientHookHangingPromise,\n trackRuntimeDataAccessed,\n} from '../dynamic-rendering-utils'\nimport {\n METADATA_BOUNDARY_NAME,\n VIEWPORT_BOUNDARY_NAME,\n OUTLET_BOUNDARY_NAME,\n ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport {\n createRuntimeBodyError,\n createDynamicBodyError,\n createRuntimeBodyErrorInNavigation,\n createDynamicBodyErrorInNavigation,\n createDynamicOrRuntimeBodyError,\n createRuntimeMetadataError,\n createDynamicMetadataError,\n createRuntimeViewportError,\n createDynamicViewportError,\n createDynamicOrRuntimeViewportError,\n createDynamicOrRuntimeMetadataError,\n logBuildDebugHint,\n createLinkBodyErrorInNavigation,\n createLinkMetadataError,\n createLinkViewportError,\n} from './blocking-route-messages'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n INSTANT_VALIDATION_BOUNDARY_NAME,\n INSTANT_SLOT_MARKER_PREFIX,\n INSTANT_SLOT_MARKER_SUFFIX,\n} from './instant-validation/boundary-constants'\nimport {\n type ValidationBoundaryTracking,\n allRequiredBoundariesRendered,\n} from './instant-validation/boundary-tracking'\nimport type { InstantValidationSampleTracking } from './instant-validation/instant-samples'\nimport { createUnrenderedSegmentError } from '../../shared/lib/instant-messages'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n /**\n * If debugging, this will contain the stack trace of where the dynamic access\n * occurred. This is used to provide more information to the user about why\n * their page is being rendered dynamically.\n */\n stack?: string\n\n /**\n * The expression that was accessed dynamically.\n */\n expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n /**\n * When true, stack information will also be tracked during dynamic access.\n */\n readonly isDebugDynamicAccesses: boolean | undefined\n\n /**\n * The dynamic accesses that occurred during the render.\n */\n readonly dynamicAccesses: Array<DynamicAccess>\n\n syncDynamicErrorWithStack: null | Error\n syncDynamicErrorWithStackPostMicrotask: boolean\n}\n\n// Stores dynamic reasons used during an SSR render.\nexportLine truncated
|
||||
{"offset": {"line": 7451, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/encryption-utils.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport { getServerActionsManifest } from './manifests-singleton'\n\nlet __next_loaded_action_key: CryptoKey\n\nexport function arrayBufferToString(\n buffer: ArrayBuffer | Uint8Array<ArrayBufferLike>\n) {\n const bytes = new Uint8Array(buffer)\n const len = bytes.byteLength\n\n // @anonrig: V8 has a limit of 65535 arguments in a function.\n // For len < 65535, this is faster.\n // https://github.com/vercel/next.js/pull/56377#pullrequestreview-1656181623\n if (len < 65535) {\n return String.fromCharCode.apply(null, bytes as unknown as number[])\n }\n\n let binary = ''\n for (let i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i])\n }\n return binary\n}\n\nexport function stringToUint8Array(binary: string) {\n const len = binary.length\n const arr = new Uint8Array(len)\n\n for (let i = 0; i < len; i++) {\n arr[i] = binary.charCodeAt(i)\n }\n\n return arr\n}\n\nexport function encrypt(\n key: CryptoKey,\n iv: Uint8Array<ArrayBuffer>,\n data: Uint8Array<ArrayBuffer>\n) {\n return crypto.subtle.encrypt(\n {\n name: 'AES-GCM',\n iv,\n },\n key,\n data\n )\n}\n\nexport function decrypt(\n key: CryptoKey,\n iv: Uint8Array<ArrayBuffer>,\n data: Uint8Array<ArrayBuffer>\n) {\n return crypto.subtle.decrypt(\n {\n name: 'AES-GCM',\n iv,\n },\n key,\n data\n )\n}\n\nexport async function getActionEncryptionKey() {\n if (__next_loaded_action_key) {\n return __next_loaded_action_key\n }\n\n const serverActionsManifest = getServerActionsManifest()\n\n const rawKey =\n process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY ||\n serverActionsManifest.encryptionKey\n\n if (rawKey === undefined) {\n throw new InvariantError('Missing encryption key for Server Actions')\n }\n\n __next_loaded_action_key = await crypto.subtle.importKey(\n 'raw',\n stringToUint8Array(atob(rawKey)),\n 'AES-GCM',\n true,\n ['encrypt', 'decrypt']\n )\n\n return __next_loaded_action_key\n}\n"],"names":["InvariantError","getServerActionsManifest","__next_loaded_action_key","arrayBufferToString","buffer","bytes","Uint8Array","len","byteLength","String","fromCharCode","apply","binary","i","stringToUint8Array","length","arr","charCodeAt","encrypt","key","iv","data","crypto","subtle","name","decrypt","getActionEncryptionKey","serverActionsManifest","rawKey","process","env","NEXT_SERVER_ACTIONS_ENCRYPTION_KEY","encryptionKey","undefined","importKey","atob"],"mappings":";;;;;;;;;;;;AAAA,SAASA,cAAc,QAAQ,mCAAkC;AACjE,SAASC,wBAAwB,QAAQ,wBAAuB;;;AAEhE,IAAIC;AAEG,SAASC,oBACdC,MAAiD;IAEjD,MAAMC,QAAQ,IAAIC,WAAWF;IAC7B,MAAMG,MAAMF,MAAMG,UAAU;IAE5B,6DAA6D;IAC7D,mCAAmC;IACnC,4EAA4E;IAC5E,IAAID,MAAM,OAAO;QACf,OAAOE,OAAOC,YAAY,CAACC,KAAK,CAAC,MAAMN;IACzC;IAEA,IAAIO,SAAS;IACb,IAAK,IAAIC,IAAI,GAAGA,IAAIN,KAAKM,IAAK;QAC5BD,UAAUH,OAAOC,YAAY,CAACL,KAAK,CAACQ,EAAE;IACxC;IACA,OAAOD;AACT;AAEO,SAASE,mBAAmBF,MAAc;IAC/C,MAAML,MAAMK,OAAOG,MAAM;IACzB,MAAMC,MAAM,IAAIV,WAAWC;IAE3B,IAAK,IAAIM,IAAI,GAAGA,IAAIN,KAAKM,IAAK;QAC5BG,GAAG,CAACH,EAAE,GAAGD,OAAOK,UAAU,CAACJ;IAC7B;IAEA,OAAOG;AACT;AAEO,SAASE,QACdC,GAAc,EACdC,EAA2B,EAC3BC,IAA6B;IAE7B,OAAOC,OAAOC,MAAM,CAACL,OAAO,CAC1B;QACEM,MAAM;QACNJ;IACF,GACAD,KACAE;AAEJ;AAEO,SAASI,QACdN,GAAc,EACdC,EAA2B,EAC3BC,IAA6B;IAE7B,OAAOC,OAAOC,MAAM,CAACE,OAAO,CAC1B;QACED,MAAM;QACNJ;IACF,GACAD,KACAE;AAEJ;AAEO,eAAeK;IACpB,IAAIxB,0BAA0B;QAC5B,OAAOA;IACT;IAEA,MAAMyB,4BAAwB1B,oNAAAA;IAE9B,MAAM2B,SACJC,QAAQC,GAAG,CAACC,kCAAkC,IAC9CJ,sBAAsBK,aAAa;IAErC,IAAIJ,WAAWK,WAAW;QACxB,MAAM,OAAA,cAA+D,CAA/D,IAAIjC,4LAAAA,CAAe,8CAAnB,qBAAA;mBAAA;wBAAA;0BAAA;QAA8D;IACtE;IAEAE,2BAA2B,MAAMoB,OAAOC,MAAM,CAACW,SAAS,CACtD,OACApB,mBAAmBqB,KAAKP,UACxB,WACA,MACA;QAAC;QAAW;KAAU;IAGxB,OAAO1B;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 7623, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/entry-base.ts"],"sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nexport {\n createTemporaryReferenceSet,\n renderToReadableStream,\n decodeReply,\n decodeAction,\n decodeFormState,\n} from 'react-server-dom-webpack/server'\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nexport { prerender } from 'react-server-dom-webpack/static'\n\n// Node.js-specific Flight APIs, needed by stream-ops.node.ts via ComponentMod.\n// These must be exported from entry-base (react-server layer) because direct\n// imports from react-server-dom-webpack/* fail outside this layer.\ntype FlightRenderToPipeableStream = (...args: any[]) => {\n pipe<Writable extends NodeJS.WritableStream>(destination: Writable): Writable\n abort: (reason?: unknown) => void\n}\n\ntype FlightPrerenderToNodeStream = (...args: any[]) => Promise<{\n prelude: import('node:stream').Readable\n}>\n\n/* eslint-disable import/no-extraneous-dependencies */\nexport let renderToPipeableStream: FlightRenderToPipeableStream | undefined\nexport let prerenderToNodeStream: FlightPrerenderToNodeStream | undefined\nif (process.env.__NEXT_USE_NODE_STREAMS) {\n renderToPipeableStream = (\n require('react-server-dom-webpack/server.node') as typeof import('react-server-dom-webpack/server.node')\n ).renderToPipeableStream\n prerenderToNodeStream = (\n require('react-server-dom-webpack/static') as typeof import('react-server-dom-webpack/static')\n ).prerenderToNodeStream\n} else {\n renderToPipeableStream = undefined\n prerenderToNodeStream = undefined\n}\n/* eslint-enable import/no-extraneous-dependencies */\n\n// TODO: Just re-export `* as ReactServer`\nexport { captureOwnerStack, createElement, Fragment } from 'react'\n\nexport {\n default as LayoutRouter,\n LoadingBoundaryProvider,\n} from '../../client/components/layout-router'\nexport { default as RenderFromTemplateContext } from '../../client/components/render-from-template-context'\nexport { ClientPageRoot } from '../../client/components/client-page'\nexport { ClientSegmentRoot } from '../../client/components/client-segment'\nexport {\n createServerSearchParamsForServerPage,\n createPrerenderSearchParamsForClientPage,\n} from '../request/search-params'\nexport {\n createServerParamsForServerSegment,\n createPrerenderParamsForClientSegment,\n} from '../request/params'\nexport * as serverHooks from '../../client/components/hooks-server-context'\nexport { HTTPAccessFallbackBoundary } from '../../client/components/http-access-fallback/error-boundary'\nexport { createMetadataComponents } from '../../lib/metadata/metadata'\nexport { RootLayoutBoundary } from '../../lib/framework/boundary-components'\n\nexport { preloadStyle, preloadFont, preconnect } from './rsc/preloads'\nexport { isEmptyHTMLPrelude } from './postponed-state'\nexport { Postpone } from './rsc/postpone'\nexport { taintObjectReference } from './rsc/taint'\nexport {\n collectSegmentData,\n collectPrefetchHints,\n} from './collect-segment-data'\n\nexport const InstantValidation = () => {\n if (\n process.env.NEXT_RUNTIME !== 'edge' &&\n process.env.__NEXT_CACHE_COMPONENTS\n ) {\n return require('./instant-validation/instant-validation') as typeof import('./instant-validation/instant-validation')\n } else {\n return undefined\n }\n}\n\nimport type { NodeJsPartialHmrUpdate } from '../../build/swc/types'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { workUnitAsyncStorage } from './work-unit-async-storage.external'\nimport { patchFetch as _patchFetch } from '../lib/patch-fetch'\n\nlet SegmentViewNode: typeof import('../../next-devtools/userspace/app/segment-explorer-node').SegmentViewNode =\n () => null\nlet SegmentViewStateNode: typeof import('../../next-devtools/userspace/app/segment-explorer-node').SegmentViewStateNode =\n () => null\nif (process.env.NODE_ENV === 'development') {\n const mod =\n require('../../next-devtools/userspace/app/segment-explorer-node') as typeof import('../../next-devtools/userspace/app/segment-explorer-node')\n SegmentViewNode = mod.SegmentViewNode\n SegmentViewStateNode = mod.SegmentViewStateNode\n}\n\n// For hot-reloader\ndeclare global {\n var __next__clear_chunk_cache__: (() => void) | null | undefined\n var __turbopack_clear_chunk_cache__: () => void | null | undefined\n var __turbopack_server_hmr_apply__:\n | ((update: NodeJsPartialHmrUpdate) => void)\n | undefined\n}\n\n// hot-reloader modules are not bundled so we need to inject `__next__clear_chunk_cache__`\n// into globalThis from this file which is bundled.\nif (process.env.TURBOPACK) {\n globalThis.__next__clear_chunk_cache__ = __turbopack_clear_chunk_cache__\n} else {\n // Webpack does not have chunks on the server\n globalThis.__next__clear_chunk_cache__ = null\n}\n\n// Line truncated
|
||||
{"offset": {"line": 7721, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/get-short-dynamic-param-type.tsx"],"sourcesContent":["import type {\n DynamicParamTypes,\n DynamicParamTypesShort,\n} from '../../shared/lib/app-router-types'\n\nexport const dynamicParamTypes: Record<\n DynamicParamTypes,\n DynamicParamTypesShort\n> = {\n catchall: 'c',\n 'catchall-intercepted-(..)(..)': 'ci(..)(..)',\n 'catchall-intercepted-(.)': 'ci(.)',\n 'catchall-intercepted-(..)': 'ci(..)',\n 'catchall-intercepted-(...)': 'ci(...)',\n 'optional-catchall': 'oc',\n dynamic: 'd',\n 'dynamic-intercepted-(..)(..)': 'di(..)(..)',\n 'dynamic-intercepted-(.)': 'di(.)',\n 'dynamic-intercepted-(..)': 'di(..)',\n 'dynamic-intercepted-(...)': 'di(...)',\n}\n"],"names":["dynamicParamTypes","catchall","dynamic"],"mappings":";;;;AAKO,MAAMA,oBAGT;IACFC,UAAU;IACV,iCAAiC;IACjC,4BAA4B;IAC5B,6BAA6B;IAC7B,8BAA8B;IAC9B,qBAAqB;IACrBC,SAAS;IACT,gCAAgC;IAChC,2BAA2B;IAC3B,4BAA4B;IAC5B,6BAA6B;AAC/B,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 7742, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/boundary-constants.ts"],"sourcesContent":["export const INSTANT_VALIDATION_BOUNDARY_NAME =\n '__next_instant_validation_boundary__'\n\nexport const INSTANT_SLOT_MARKER_PREFIX = '__next_instant_slot_'\nexport const INSTANT_SLOT_MARKER_SUFFIX = '__'\n"],"names":["INSTANT_VALIDATION_BOUNDARY_NAME","INSTANT_SLOT_MARKER_PREFIX","INSTANT_SLOT_MARKER_SUFFIX"],"mappings":";;;;;;;;AAAO,MAAMA,mCACX,uCAAsC;AAEjC,MAAMC,6BAA6B,uBAAsB;AACzD,MAAMC,6BAA6B,KAAI","ignoreList":[0]}},
|
||||
{"offset": {"line": 7757, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/boundary-tracking.tsx"],"sourcesContent":["export type ValidationBoundaryTracking = {\n /**\n * Map from boundary id (the SegmentPath where a validation boundary is\n * placed) to the file paths of modules inside that boundary's subtree.\n * When the boundary spans multiple parallel slots, each slot contributes\n * its own first-found module path so all unrendered segments can be\n * reported together.\n */\n requiredIds: Map<string, string[]>\n renderedIds: Set<string>\n}\n\nexport function createValidationBoundaryTracking(): ValidationBoundaryTracking {\n return {\n requiredIds: new Map(),\n renderedIds: new Set(),\n }\n}\n\nexport function allRequiredBoundariesRendered(\n state: ValidationBoundaryTracking\n): boolean {\n for (const id of state.requiredIds.keys()) {\n if (!state.renderedIds.has(id)) {\n return false\n }\n }\n return true\n}\n"],"names":["createValidationBoundaryTracking","requiredIds","Map","renderedIds","Set","allRequiredBoundariesRendered","state","id","keys","has"],"mappings":";;;;;;AAYO,SAASA;IACd,OAAO;QACLC,aAAa,IAAIC;QACjBC,aAAa,IAAIC;IACnB;AACF;AAEO,SAASC,8BACdC,KAAiC;IAEjC,KAAK,MAAMC,MAAMD,MAAML,WAAW,CAACO,IAAI,GAAI;QACzC,IAAI,CAACF,MAAMH,WAAW,CAACM,GAAG,CAACF,KAAK;YAC9B,OAAO;QACT;IACF;IACA,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 7781, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/instant-samples.ts"],"sourcesContent":["import type { InstantSample } from '../../../build/segment-config/app/app-segment-config'\nimport type { ReadonlyRequestCookies } from '../../web/spec-extension/adapters/request-cookies'\nimport type { ReadonlyHeaders } from '../../web/spec-extension/adapters/headers'\nimport type { DraftModeProvider } from '../../async-storage/draft-mode-provider'\nimport type { Params } from '../../request/params'\n\nimport { RequestCookies } from '../../web/spec-extension/cookies'\nimport { RequestCookiesAdapter } from '../../web/spec-extension/adapters/request-cookies'\nimport { HeadersAdapter } from '../../web/spec-extension/adapters/headers'\nimport type { SearchParams } from '../../request/search-params'\nimport { getSegmentParam } from '../../../shared/lib/router/utils/get-segment-param'\nimport { parseRelativeUrl } from '../../../shared/lib/router/utils/parse-relative-url'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport { InstantValidationError } from './instant-validation-error'\nimport { workUnitAsyncStorage } from '../work-unit-async-storage.external'\nimport { wellKnownProperties } from '../../../shared/lib/utils/reflect-utils'\nimport type { WorkStore } from '../work-async-storage.external'\n\nexport type InstantValidationSampleTracking = {\n // TODO(instant-validation-build): track which samples config we used and attribute errors\n missingSampleErrors: InstantValidationError[]\n}\n\nexport function createValidationSampleTracking(): InstantValidationSampleTracking {\n return {\n missingSampleErrors: [],\n }\n}\n\nfunction getExpectedSampleTracking(): InstantValidationSampleTracking {\n let validationSampleTracking: InstantValidationSampleTracking | null = null\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'request':\n case 'validation-client':\n // TODO(instant-validation-build): do we need any special handling for caches?\n validationSampleTracking =\n workUnitStore.validationSampleTracking ?? null\n break\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n case 'prerender':\n case 'prerender-runtime':\n case 'generate-static-params':\n break\n default:\n workUnitStore satisfies never\n }\n }\n if (!validationSampleTracking) {\n throw new InvariantError(\n 'Expected to have a workUnitStore that provides validationSampleTracking'\n )\n }\n return validationSampleTracking\n}\n\nexport function trackMissingSampleError(error: InstantValidationError): void {\n const validationSampleTracking = getExpectedSampleTracking()\n validationSampleTracking.missingSampleErrors.push(error)\n}\n\nexport function trackMissingSampleErrorAndThrow(\n error: InstantValidationError\n): never {\n // TODO(instant-validation-build): this should abort the render\n trackMissingSampleError(error)\n throw error\n}\n\n/**\n * Creates ReadonlyRequestCookies from sample cookie data.\n * Accessing a cookie not declared in the sample will throw an error.\n * Cookies with `value: null` are declared (allowed to access) but return no value.\n */\nexport function createCookiesFromSample(\n sampleCookies: InstantSample['cookies'],\n route: string\n): ReadonlyRequestCookies {\n const declaredNames = new Set<string>()\n\n const cookies = new RequestCookies(new Headers())\n if (sampleCookies) {\n for (const cookie of sampleCookies) {\n declaredNames.add(cookie.name)\n if (cookie.value !== null) {\n cookies.set(cookie.name, cookie.value)\n }\n }\n }\n\n const sealed = RequestCookiesAdapter.seal(cookies)\n\n return new Proxy(sealed, {\n get(target, prop, receiver) {\n if (prop === 'has') {\n const originalMethod = Reflect.get(target, prop, receiver)\n const wrappedMethod: typeof originalMethod = function (name) {\n if (!declaredNames.has(name)) {\n trackMissingSampleErrorAndThrow(\n createMissingCookieSampleError(route, name)\n )\n }\n return originalMethod.call(target, name)\n }\n return wrappedMethod\n }\n if (prop === 'get') {\n const originalMethod = Reflect.get(target, prop, receiver)\n const wrappedMethod: typeof originalMethod = function (nameOrCookie) {\n let name: string\n if (typeof nameOrCookie === 'string') {\n name = nameOrCookie\n } else if (\n nameOrCookie &&\n typeof nameOrCookie === 'object' &&\n typeof nameOrCookie.name === 'string'\n ) {\n name = nameLine truncated
|
||||
{"offset": {"line": 8191, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/instant-validation/instant-validation-error.ts"],"sourcesContent":["const INSTANT_VALIDATION_ERROR_DIGEST = 'INSTANT_VALIDATION_ERROR'\n\n/** Check if an error is an exhaustive samples validation error (by digest). */\nexport function isInstantValidationError(\n err: unknown\n): err is InstantValidationError {\n return !!(\n err &&\n typeof err === 'object' &&\n err instanceof Error &&\n (err as any).digest === INSTANT_VALIDATION_ERROR_DIGEST\n )\n}\n\nexport class InstantValidationError extends Error {\n digest = INSTANT_VALIDATION_ERROR_DIGEST\n}\n"],"names":["INSTANT_VALIDATION_ERROR_DIGEST","isInstantValidationError","err","Error","digest","InstantValidationError"],"mappings":";;;;;;AAAA,MAAMA,kCAAkC;AAGjC,SAASC,yBACdC,GAAY;IAEZ,OAAO,CAAC,CACNA,CAAAA,OACA,OAAOA,QAAQ,YACfA,eAAeC,SACdD,IAAYE,MAAM,KAAKJ,+BAA8B;AAE1D;AAEO,MAAMK,+BAA+BF;;QAArC,KAAA,IAAA,OAAA,IAAA,CACLC,MAAAA,GAASJ;;AACX","ignoreList":[0]}},
|
||||
{"offset": {"line": 8210, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/interop-default.ts"],"sourcesContent":["/**\n * Interop between \"export default\" and \"module.exports\".\n */\nexport function interopDefault(mod: any) {\n return mod.default || mod\n}\n"],"names":["interopDefault","mod","default"],"mappings":"AAAA;;CAEC,GACD;;;;AAAO,SAASA,eAAeC,GAAQ;IACrC,OAAOA,IAAIC,OAAO,IAAID;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 8223, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/manifests-singleton.ts"],"sourcesContent":["import type { ActionManifest } from '../../build/webpack/plugins/flight-client-entry-plugin'\nimport type { ClientReferenceManifest } from '../../build/webpack/plugins/flight-manifest-plugin'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { pathHasPrefix } from '../../shared/lib/router/utils/path-has-prefix'\nimport { removePathPrefix } from '../../shared/lib/router/utils/remove-path-prefix'\nimport { mightBeServerReferenceId } from '../../shared/lib/server-reference-info'\nimport { wellKnownProperties } from '../../shared/lib/utils/reflect-utils'\nimport { workAsyncStorage } from './work-async-storage.external'\n\nexport interface ServerModuleMap {\n readonly [name: string]: {\n readonly id: string | number\n readonly name: string\n readonly chunks: Readonly<Array<string>> // currently not used\n readonly async?: boolean\n }\n}\n\nexport function getActionNotFoundError(actionId: string | null): Error {\n return new Error(\n `Failed to find Server Action${actionId ? ` \"${actionId}\"` : ''}. This request might be from an older or newer deployment.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n )\n}\n\nexport function getInvalidServerReferenceIdError(id: string): Error {\n // `id` is arbitrary client-provided input. Unlike the not-found case, it has\n // not passed the length gate and can reach this error via a malformed server\n // reference in an action payload, so it may be of any length and contain\n // control characters. `JSON.stringify` escapes newlines and quotes so it\n // can't forge log lines, and truncating overly long ids prevents log\n // flooding. Ids at or below the cap are logged in full so that we only add an\n // ellipsis to ids that are meaningfully longer than the truncated length.\n const encoded = JSON.stringify(\n id.length > MAX_LOGGED_SERVER_REFERENCE_ID_LENGTH\n ? id.slice(0, TRUNCATED_SERVER_REFERENCE_ID_LENGTH) + '…'\n : id\n )\n\n return new Error(\n `The Server Reference ID did not match the expected format. Received ${encoded}.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n )\n}\n\n// Ids at or below the cap are logged in full. Longer ids are truncated to the\n// shorter length and marked with an ellipsis, so the cap leaves headroom over\n// the truncated length rather than ellipsizing ids that are barely too long.\nconst MAX_LOGGED_SERVER_REFERENCE_ID_LENGTH = 100\nconst TRUNCATED_SERVER_REFERENCE_ID_LENGTH = 90\n\n// This is a global singleton that is, among other things, also used to\n// encode/decode bound args of server function closures. This can't be using a\n// AsyncLocalStorage as it might happen at the module level.\nconst MANIFESTS_SINGLETON = Symbol.for('next.server.manifests')\n\ninterface RegisteredClientReferenceManifest {\n /**\n * The page the manifest was registered with. Routes are normalized app paths,\n * which is lossy (route groups, parallel slots and the trailing `/page` are\n * stripped), so this is kept alongside for consumers that need to address the\n * manifest on disk again rather than reversing the normalization.\n */\n readonly page: string\n readonly clientReferenceManifest: DeepReadonly<ClientReferenceManifest>\n}\n\ninterface ManifestsSingleton {\n readonly clientReferenceManifestsPerRoute: Map<\n string,\n RegisteredClientReferenceManifest\n >\n readonly proxiedClientReferenceManifest: DeepReadonly<ClientReferenceManifest>\n serverActionsManifest: DeepReadonly<ActionManifest>\n serverModuleMap: ServerModuleMap\n}\n\ntype GlobalThisWithManifests = typeof globalThis & {\n [MANIFESTS_SINGLETON]?: ManifestsSingleton\n}\n\ntype ClientReferenceManifestMappingProp =\n | 'clientModules'\n | 'rscModuleMapping'\n | 'edgeRscModuleMapping'\n | 'ssrModuleMapping'\n | 'edgeSSRModuleMapping'\n\nconst globalThisWithManifests = globalThis as GlobalThisWithManifests\n\nfunction createProxiedClientReferenceManifest(\n clientReferenceManifestsPerRoute: Map<\n string,\n RegisteredClientReferenceManifest\n >\n): DeepReadonly<ClientReferenceManifest> {\n const createMappingProxy = (prop: ClientReferenceManifestMappingProp) => {\n return new Proxy(\n {},\n {\n get(_, id: string) {\n const workStore = workAsyncStorage.getStore()\n\n if (workStore) {\n const currentManifest = clientReferenceManifestsPerRoute.get(\n workStore.route\n )?.clientReferenceManifest\n\n if (currentManifest?.[prop][id]) {\n return currentManifest[prop][id]\n }\n\n Line truncated
|
||||
{"offset": {"line": 8533, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/postponed-state.ts"],"sourcesContent":["import type {\n OpaqueFallbackRouteParamEntries,\n OpaqueFallbackRouteParams,\n} from '../../server/request/fallback-params'\nimport { getDynamicParam } from '../../shared/lib/router/utils/get-dynamic-param'\nimport type { Params } from '../request/params'\nimport {\n createPrerenderResumeDataCache,\n createRenderResumeDataCache,\n type PrerenderResumeDataCache,\n type RenderResumeDataCache,\n} from '../resume-data-cache/resume-data-cache'\nimport { stringifyResumeDataCache } from '../resume-data-cache/resume-data-cache'\n\nexport enum DynamicState {\n /**\n * The dynamic access occurred during the RSC render phase.\n */\n DATA = 1,\n\n /**\n * The dynamic access occurred during the HTML shell render phase.\n */\n HTML = 2,\n}\n\n/**\n * The postponed state for dynamic data.\n */\nexport type DynamicDataPostponedState = {\n /**\n * The type of dynamic state.\n */\n readonly type: DynamicState.DATA\n\n /**\n * The immutable resume data cache.\n */\n readonly renderResumeDataCache: RenderResumeDataCache\n}\n\n/**\n * The postponed state for dynamic HTML.\n */\nexport type DynamicHTMLPostponedState = {\n /**\n * The type of dynamic state.\n */\n readonly type: DynamicState.HTML\n\n /**\n * The postponed data used by React.\n */\n readonly data: [\n preludeState: DynamicHTMLPreludeState,\n postponed: ReactPostponed,\n ]\n\n /**\n * The immutable resume data cache.\n */\n readonly renderResumeDataCache: RenderResumeDataCache\n}\n\nexport const enum DynamicHTMLPreludeState {\n Empty = 0,\n Full = 1,\n}\n\ntype ReactPostponed = NonNullable<\n import('react-dom/static').PrerenderResult['postponed']\n>\n\nexport type PostponedState =\n | DynamicDataPostponedState\n | DynamicHTMLPostponedState\n\nexport async function getDynamicHTMLPostponedState(\n postponed: ReactPostponed,\n preludeState: DynamicHTMLPreludeState,\n fallbackRouteParams: OpaqueFallbackRouteParams | null,\n resumeDataCache: PrerenderResumeDataCache | RenderResumeDataCache,\n isCacheComponentsEnabled: boolean\n): Promise<string> {\n const data: DynamicHTMLPostponedState['data'] = [preludeState, postponed]\n const dataString = JSON.stringify(data)\n\n // If there are no fallback route params, we can just serialize the postponed\n // state as is.\n if (!fallbackRouteParams || fallbackRouteParams.size === 0) {\n // Serialized as `<postponedString.length>:<postponedString><renderResumeDataCache>`\n return `${dataString.length}:${dataString}${await stringifyResumeDataCache(\n createRenderResumeDataCache(resumeDataCache),\n isCacheComponentsEnabled\n )}`\n }\n\n const replacements: OpaqueFallbackRouteParamEntries = Array.from(\n fallbackRouteParams.entries()\n )\n const replacementsString = JSON.stringify(replacements)\n\n // Serialized as `<replacements.length><replacements><data>`\n const postponedString = `${replacementsString.length}${replacementsString}${dataString}`\n\n // Serialized as `<postponedString.length>:<postponedString><renderResumeDataCache>`\n return `${postponedString.length}:${postponedString}${await stringifyResumeDataCache(resumeDataCache, isCacheComponentsEnabled)}`\n}\n\nexport async function getDynamicDataPostponedState(\n resumeDataCache: PrerenderResumeDataCache | RenderResumeDataCache,\n isCacheComponentsEnabled: boolean\n): Promise<string> {\n return `4:null${await stringifyResumeDataCache(createRenderResumeDataCache(resumeDataCache), isCacheComponentsEnabled)}`\n}\n\nexport function parsePostponedState(\n state: string,\n interpolatedParams: Params,\n maxPostponedStateSizeBytes: number | undefined\n): PostponedState {\n try {\n const postponedStringLengthMatch = state.match(/^([0-9]*):/)?.[1]\n if (!postponedStringLengthMatch) {\n // Do not include the raw state in the message: it can be large and may\n // contain sensitive serialized data.\n throw new Error(\n 'Invariant: invalid postponed state: missing length prefix'\n )\n }\n\n const postponedStringLength = parseInt(postponedStringLengthMatch)\n\n // We add a `:` to the end of the length as the first character of the\n // postponed string is the length of the replacement entries.\n const postponedString = state.slice(\n postponedStringLengthMatch.length + 1,\n postponedStringLengthMatch.length + postponedStringLength + 1\n )\n\n const renderResumeDataCache = createRenderResumeDataCache(\n state.slice(\n postponedStringLengthMatch.length + postponedStringLength + 1\n ),\n maxPostponedStateSizeBytes\n )\n\n try {\n if (postponedString === 'null') {\n return { type: DynamicState.DATA, renderResumeDataCache }\n }\n\n if (/^[0-9]/.test(postponedString)) {\n const Line truncated
|
||||
{"offset": {"line": 8740, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/prospective-render-utils.ts"],"sourcesContent":["import { getDigestForWellKnownError } from './create-error-handler'\nimport { isReactLargeShellError } from './react-large-shell-error'\n\nexport enum Phase {\n ProspectiveRender = 'the prospective render',\n SegmentCollection = 'segment collection',\n InstantValidation = 'instant validation',\n}\n\nexport function printDebugThrownValueForProspectiveRender(\n thrownValue: unknown,\n route: string,\n phase: Phase\n) {\n // We don't need to print well-known Next.js errors.\n if (getDigestForWellKnownError(thrownValue)) {\n return\n }\n\n if (isReactLargeShellError(thrownValue)) {\n // TODO: Aggregate\n console.error(thrownValue)\n return undefined\n }\n\n let message: undefined | string\n if (\n typeof thrownValue === 'object' &&\n thrownValue !== null &&\n typeof (thrownValue as any).message === 'string'\n ) {\n message = (thrownValue as any).message\n if (typeof (thrownValue as any).stack === 'string') {\n const originalErrorStack: string = (thrownValue as any).stack\n const stackStart = originalErrorStack.indexOf('\\n')\n if (stackStart > -1) {\n const error = new Error(\n `Route ${route} errored during ${phase}. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled.\n \nOriginal Error: ${message}`\n )\n error.stack =\n 'Error: ' + error.message + originalErrorStack.slice(stackStart)\n console.error(error)\n return\n }\n }\n } else if (typeof thrownValue === 'string') {\n message = thrownValue\n }\n\n if (message) {\n console.error(`Route ${route} errored during ${phase}. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. No stack was provided.\n \nOriginal Message: ${message}`)\n return\n }\n\n console.error(\n `Route ${route} errored during ${phase}. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. The thrown value is logged just following this message`\n )\n console.error(thrownValue)\n return\n}\n"],"names":["getDigestForWellKnownError","isReactLargeShellError","Phase","printDebugThrownValueForProspectiveRender","thrownValue","route","phase","console","error","undefined","message","stack","originalErrorStack","stackStart","indexOf","Error","slice"],"mappings":";;;;;;AAAA,SAASA,0BAA0B,QAAQ,yBAAwB;AACnE,SAASC,sBAAsB,QAAQ,4BAA2B;;;AAE3D,IAAKC,QAAAA,WAAAA,GAAAA,SAAAA,KAAAA;;;;WAAAA;MAIX;AAEM,SAASC,0CACdC,WAAoB,EACpBC,KAAa,EACbC,KAAY;IAEZ,oDAAoD;IACpD,QAAIN,0NAAAA,EAA2BI,cAAc;QAC3C;IACF;IAEA,QAAIH,4NAAAA,EAAuBG,cAAc;QACvC,kBAAkB;QAClBG,QAAQC,KAAK,CAACJ;QACd,OAAOK;IACT;IAEA,IAAIC;IACJ,IACE,OAAON,gBAAgB,YACvBA,gBAAgB,QAChB,OAAQA,YAAoBM,OAAO,KAAK,UACxC;QACAA,UAAWN,YAAoBM,OAAO;QACtC,IAAI,OAAQN,YAAoBO,KAAK,KAAK,UAAU;YAClD,MAAMC,qBAA8BR,YAAoBO,KAAK;YAC7D,MAAME,aAAaD,mBAAmBE,OAAO,CAAC;YAC9C,IAAID,aAAa,CAAC,GAAG;gBACnB,MAAML,QAAQ,OAAA,cAIb,CAJa,IAAIO,MAChB,CAAC,MAAM,EAAEV,MAAM,gBAAgB,EAAEC,MAAM;;gBAEjC,EAAEI,SAAS,GAHL,qBAAA;2BAAA;gCAAA;kCAAA;gBAId;gBACAF,MAAMG,KAAK,GACT,YAAYH,MAAME,OAAO,GAAGE,mBAAmBI,KAAK,CAACH;gBACvDN,QAAQC,KAAK,CAACA;gBACd;YACF;QACF;IACF,OAAO,IAAI,OAAOJ,gBAAgB,UAAU;QAC1CM,UAAUN;IACZ;IAEA,IAAIM,SAAS;QACXH,QAAQC,KAAK,CAAC,CAAC,MAAM,EAAEH,MAAM,gBAAgB,EAAEC,MAAM;;kBAEvC,EAAEI,SAAS;QACzB;IACF;IAEAH,QAAQC,KAAK,CACX,CAAC,MAAM,EAAEH,MAAM,gBAAgB,EAAEC,MAAM,kMAAkM,CAAC;IAE5OC,QAAQC,KAAK,CAACJ;IACd;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 8802, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/react-large-shell-error.ts"],"sourcesContent":["// TODO: isWellKnownError -> isNextInternalError\n// isReactLargeShellError -> isWarning\nexport function isReactLargeShellError(\n error: unknown\n): error is Error & { digest?: string } {\n return (\n typeof error === 'object' &&\n error !== null &&\n 'message' in error &&\n typeof error.message === 'string' &&\n error.message.startsWith('This rendered a large document (>')\n )\n}\n"],"names":["isReactLargeShellError","error","message","startsWith"],"mappings":"AAAA,gDAAgD;AAChD,sCAAsC;;;;;AAC/B,SAASA,uBACdC,KAAc;IAEd,OACE,OAAOA,UAAU,YACjBA,UAAU,QACV,aAAaA,SACb,OAAOA,MAAMC,OAAO,KAAK,YACzBD,MAAMC,OAAO,CAACC,UAAU,CAAC;AAE7B","ignoreList":[0]}},
|
||||
{"offset": {"line": 8815, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/rsc/postpone.ts"],"sourcesContent":["/*\n\nFiles in the rsc directory are meant to be packaged as part of the RSC graph using next-app-loader.\n\n*/\n\n// When postpone is available in canary React we can switch to importing it directly\nexport { Postpone } from '../dynamic-rendering'\n"],"names":["Postpone"],"mappings":";AAAA;;;;AAIA,GAEA,oFAAoF;AACpF,SAASA,QAAQ,QAAQ,uBAAsB","ignoreList":[0]}},
|
||||
{"offset": {"line": 8827, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/rsc/preloads.ts"],"sourcesContent":["/*\n\nFiles in the rsc directory are meant to be packaged as part of the RSC graph using next-app-loader.\n\n*/\n\nimport ReactDOM from 'react-dom'\n\nexport function preloadStyle(\n href: string,\n crossOrigin: string | undefined,\n nonce: string | undefined\n) {\n const opts: any = { as: 'style' }\n if (typeof crossOrigin === 'string') {\n opts.crossOrigin = crossOrigin\n }\n if (typeof nonce === 'string') {\n opts.nonce = nonce\n }\n ReactDOM.preload(href, opts)\n}\n\nexport function preloadFont(\n href: string,\n type: string,\n crossOrigin: string | undefined,\n nonce: string | undefined\n) {\n const opts: any = { as: 'font', type }\n if (typeof crossOrigin === 'string') {\n opts.crossOrigin = crossOrigin\n }\n if (typeof nonce === 'string') {\n opts.nonce = nonce\n }\n ReactDOM.preload(href, opts)\n}\n\nexport function preconnect(\n href: string,\n crossOrigin: string | undefined,\n nonce: string | undefined\n) {\n const opts: any = {}\n if (typeof crossOrigin === 'string') {\n opts.crossOrigin = crossOrigin\n }\n if (typeof nonce === 'string') {\n opts.nonce = nonce\n }\n ;(ReactDOM as any).preconnect(href, opts)\n}\n"],"names":["ReactDOM","preloadStyle","href","crossOrigin","nonce","opts","as","preload","preloadFont","type","preconnect"],"mappings":";;;;;;;;AAAA;;;;AAIA,GAEA,OAAOA,cAAc,YAAW;;AAEzB,SAASC,aACdC,IAAY,EACZC,WAA+B,EAC/BC,KAAyB;IAEzB,MAAMC,OAAY;QAAEC,IAAI;IAAQ;IAChC,IAAI,OAAOH,gBAAgB,UAAU;QACnCE,KAAKF,WAAW,GAAGA;IACrB;IACA,IAAI,OAAOC,UAAU,UAAU;QAC7BC,KAAKD,KAAK,GAAGA;IACf;IACAJ,uNAAAA,CAASO,OAAO,CAACL,MAAMG;AACzB;AAEO,SAASG,YACdN,IAAY,EACZO,IAAY,EACZN,WAA+B,EAC/BC,KAAyB;IAEzB,MAAMC,OAAY;QAAEC,IAAI;QAAQG;IAAK;IACrC,IAAI,OAAON,gBAAgB,UAAU;QACnCE,KAAKF,WAAW,GAAGA;IACrB;IACA,IAAI,OAAOC,UAAU,UAAU;QAC7BC,KAAKD,KAAK,GAAGA;IACf;IACAJ,uNAAAA,CAASO,OAAO,CAACL,MAAMG;AACzB;AAEO,SAASK,WACdR,IAAY,EACZC,WAA+B,EAC/BC,KAAyB;IAEzB,MAAMC,OAAY,CAAC;IACnB,IAAI,OAAOF,gBAAgB,UAAU;QACnCE,KAAKF,WAAW,GAAGA;IACrB;IACA,IAAI,OAAOC,UAAU,UAAU;QAC7BC,KAAKD,KAAK,GAAGA;IACf;;IACEJ,uNAAAA,CAAiBU,UAAU,CAACR,MAAMG;AACtC","ignoreList":[0]}},
|
||||
{"offset": {"line": 8881, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/rsc/taint.ts"],"sourcesContent":["/*\n\nFiles in the rsc directory are meant to be packaged as part of the RSC graph using next-app-loader.\n\n*/\n\nimport * as React from 'react'\n\ntype Reference = object\ntype TaintableUniqueValue = string | bigint | ArrayBufferView\n\nfunction notImplemented() {\n throw new Error('Taint can only be used with the taint flag.')\n}\n\nexport const taintObjectReference: (\n message: string | undefined,\n object: Reference\n) => void = process.env.__NEXT_EXPERIMENTAL_REACT\n ? // @ts-ignore\n React.experimental_taintObjectReference\n : notImplemented\nexport const taintUniqueValue: (\n message: string | undefined,\n lifetime: Reference,\n value: TaintableUniqueValue\n) => void = process.env.__NEXT_EXPERIMENTAL_REACT\n ? // @ts-ignore\n React.experimental_taintUniqueValue\n : notImplemented\n"],"names":["React","notImplemented","Error","taintObjectReference","process","env","__NEXT_EXPERIMENTAL_REACT","experimental_taintObjectReference","taintUniqueValue","experimental_taintUniqueValue"],"mappings":";;;;;;AAAA;;;;AAIA,GAEA,YAAYA,WAAW,QAAO;;AAK9B,SAASC;IACP,MAAM,OAAA,cAAwD,CAAxD,IAAIC,MAAM,gDAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAuD;AAC/D;AAEO,MAAMC,uBAGDC,QAAQC,GAAG,CAACC,yBAAyB,CAE7CN,MAAMO,oBACNN,aADuC,EACzB;AACX,MAAMO,mBAIDJ,QAAQC,GAAG,CAACC,yBAAyB,CAE7CN,MAAMS,oBACNR,SADmC,MACrB","ignoreList":[0]}},
|
||||
{"offset": {"line": 8906, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/staged-rendering.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers'\n\nexport enum RenderStage {\n Before = 1,\n //\n ShellStatic = 11,\n Static = 13,\n //\n ShellRuntime = 21,\n Runtime = 23,\n //\n Dynamic = 30,\n //\n Abandoned = 40,\n}\n\nexport type AdvanceableRenderStage = Exclude<\n RenderStage,\n RenderStage.Before | RenderStage.Abandoned\n>\n\nexport const RENDER_STAGE_ADVANCE_ORDER: AdvanceableRenderStage[] = [\n RenderStage.ShellStatic,\n RenderStage.Static,\n //\n RenderStage.ShellRuntime,\n RenderStage.Runtime,\n //\n RenderStage.Dynamic,\n]\n\nexport function getNextStage(\n stage: Exclude<AdvanceableRenderStage, RenderStage.Dynamic>\n) {\n return RENDER_STAGE_ADVANCE_ORDER[\n RENDER_STAGE_ADVANCE_ORDER.indexOf(stage) + 1\n ]\n}\n\nexport function isAdvanceableRenderStage(\n stage: RenderStage\n): stage is AdvanceableRenderStage {\n return RenderStage.Before < stage && stage <= RenderStage.Dynamic\n}\n\nexport enum SyncIOMode {\n /** Sync IO does not error in any stage. */\n Untracked = 1,\n /** Before `partialPrefetching`: Sync IO errors in static stages, and is allowed otherwise. */\n AllowedInRuntimeOrDynamic = 2,\n /** After `partialPrefetching`: Sync IO errors in all stages other than dynamic. */\n AllowedInDynamic = 3,\n}\n\nexport class StagedRenderingController {\n private abortSignal: AbortSignal | null\n private abandonController: AbortController | null\n private syncIOMode: SyncIOMode\n public readonly finalStage: AdvanceableRenderStage | null\n\n currentStage: RenderStage = RenderStage.Before\n\n syncInterruptReason: Error | null = null\n\n triggers: Record<AdvanceableRenderStage, StageTrigger> = {\n [RenderStage.ShellStatic]: createStageTrigger(),\n [RenderStage.Static]: createStageTrigger(),\n //\n [RenderStage.ShellRuntime]: createStageTrigger(),\n [RenderStage.Runtime]: createStageTrigger(),\n //\n [RenderStage.Dynamic]: createStageTrigger(),\n }\n\n constructor({\n abortSignal,\n abandonController,\n syncIO,\n finalStage,\n }: {\n abortSignal: AbortSignal | null\n abandonController: AbortController | null\n syncIO: SyncIOMode\n finalStage: AdvanceableRenderStage | null\n }) {\n this.abortSignal = abortSignal\n this.abandonController = abandonController\n this.syncIOMode = syncIO\n this.finalStage = finalStage\n\n if (abortSignal) {\n abortSignal.addEventListener(\n 'abort',\n () => {\n // Reject all stage promises that haven't already been resolved.\n // `cancelStageTrigger` is a noop if the trigger already resolved.\n const { reason } = abortSignal\n for (const trigger of Object.values(this.triggers)) {\n cancelStageTrigger(trigger, reason)\n }\n },\n { once: true }\n )\n }\n\n if (abandonController) {\n abandonController.signal.addEventListener(\n 'abort',\n () => {\n this.abandonRender()\n },\n { once: true }\n )\n }\n }\n\n onStage(stage: AdvanceableRenderStage, callback: () => void) {\n addSyncTriggerListener(this.triggers[stage], callback)\n }\n\n shouldTrackSyncInterrupt(): boolean {\n if (this.syncIOMode === SyncIOMode.Untracked) {\n return false\n }\n\n switch (this.currentStage) {\n case RenderStage.Before:\n // If we haven't started the render yet, it can't be interrupted.\n return false\n case RenderStage.ShellStatic:\n case RenderStage.Static:\n return true\n case RenderStage.ShellRuntime:\n case RenderStage.Runtime: {\n switch (this.syncIOMode) {\n case SyncIOMode.AllowedInRuntimeOrDynamic: {\n // Before `partialPrefetching`: Sync IO only errors in static stages.\n return false\n }\n case SyncIOMode.AllowedInDynamic: {\n return true\n }\n }\n // NOT a fallthrough, but eslint doesn't understand that\n }\n case RenderStage.Dynamic:\n case RenderStage.Abandoned:\n return false\n default:\n this.currentStage satisfies never\n return false\n }\n }\n\n /** Note: only call this if `shouldTrackSyncInterrupt()` returned true */\n syncInterruptCurrentStageWithReason(reason: Error) {\n const { currentStage } = this\n if (\n currentStage === RenderStage.Before ||\n currentStage === RenderStage.Dynamic ||\n currentStage === RenderStage.Abandoned\n ) {\n // Not interruptible. Defensive noop.\n return\n }\n\n // If Sync IO occurs during an abandonable render, we trigger the abandon.\n // The abandon listener wiLine truncated
|
||||
{"offset": {"line": 9210, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/strip-flight-headers.ts"],"sourcesContent":["import type { IncomingHttpHeaders } from 'node:http'\n\nimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'\n\n/**\n * Removes the flight headers from the request.\n *\n * @param req the request to strip the headers from\n */\nexport function stripFlightHeaders(headers: IncomingHttpHeaders) {\n for (const header of FLIGHT_HEADERS) {\n delete headers[header]\n }\n}\n"],"names":["FLIGHT_HEADERS","stripFlightHeaders","headers","header"],"mappings":";;;;AAEA,SAASA,cAAc,QAAQ,6CAA4C;;AAOpE,SAASC,mBAAmBC,OAA4B;IAC7D,KAAK,MAAMC,UAAUH,yMAAAA,CAAgB;QACnC,OAAOE,OAAO,CAACC,OAAO;IACxB;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 9225, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/app-render/vary-params.ts"],"sourcesContent":["import type { Params } from '../request/params'\nimport type { SearchParams } from '../request/search-params'\nimport {\n getVaryParamsAccumulator,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\n\n/**\n * Accumulates vary params for a single segment (or for metadata/rootParams).\n *\n * A VaryParamsAccumulator is an `AsyncIterable<string>` that can be serialized\n * by React Flight. As params are accessed during render, each newly-seen param\n * name is `add`ed, which yields it into the Flight stream immediately. After\n * rendering, call `close()` (via `finishAccumulatingVaryParams`) to end the\n * iteration.\n *\n * Because each access is flushed into the stream as it happens, the set of\n * accessed params is built up incrementally, with no step at the end of the\n * render that has to run for the client to read anything. If the prerender is\n * aborted by sync I/O, the params yielded before the abort are already in the\n * stream — and they're exactly the params the partial response depends on.\n * This mirrors how `StaleTimeIterable` works (see stale-time.ts).\n *\n * Each name is emitted at most once: `add` dedupes against the set of\n * already-yielded names, so the stream never contains a duplicate.\n *\n * NOTE: like `StaleTimeIterable`, this supports a single concurrent iteration\n * (Flight iterates it exactly once). The shared empty singleton below is the\n * only instance referenced by more than one segment, and it only ever yields\n * \"done\", so concurrent iteration of it is safe.\n */\nexport class VaryParamsAccumulator implements AsyncIterable<string> {\n private _resolve: ((result: IteratorResult<string>) => void) | null = null\n private _done = false\n private _buffer: string[] = []\n // The set of param names already yielded. Doubles as the dedupe guard so the\n // same name is never emitted twice.\n private _seen: Set<string> = new Set()\n\n /**\n * Records that a param was accessed. Yields the name into the stream the\n * first time it's seen; subsequent accesses of the same name are no-ops.\n */\n add(paramName: string): void {\n if (this._done || this._seen.has(paramName)) {\n return\n }\n this._seen.add(paramName)\n if (this._resolve !== null) {\n this._resolve({ value: paramName, done: false })\n this._resolve = null\n } else {\n this._buffer.push(paramName)\n }\n }\n\n /** Ends the iteration. Best-effort: if skipped (e.g. on a sync-I/O abort),\n * the consumer simply reads the params yielded so far. */\n close(): void {\n if (this._done) {\n return\n }\n this._done = true\n if (this._resolve !== null) {\n this._resolve({ value: undefined, done: true })\n this._resolve = null\n }\n }\n\n [Symbol.asyncIterator](): AsyncIterator<string> {\n return {\n next: () => {\n if (this._buffer.length > 0) {\n return Promise.resolve({ value: this._buffer.shift()!, done: false })\n }\n if (this._done) {\n return Promise.resolve({ value: undefined, done: true })\n }\n return new Promise<IteratorResult<string>>((resolve) => {\n this._resolve = resolve\n })\n },\n }\n }\n}\n\n/**\n * A mutable data structure for accumulating per-segment vary params for an\n * entire server response. It's only used during prerenders. It describes\n * metadata about the response itself.\n */\nexport type ResponseVaryParamsAccumulator = {\n /** Vary params accumulator for metadata/viewport (the \"head\" segment) */\n head: VaryParamsAccumulator\n /** Vary params accumulator for root params access */\n rootParams: VaryParamsAccumulator\n /** Vary params accumulators for each route segment */\n segments: Set<VaryParamsAccumulator>\n}\n\n/**\n * A singleton accumulator that's already closed with no params. Use this for\n * segments where we know upfront that no params will be accessed, such as\n * client components or segments without user code.\n *\n * Benefits:\n * - No need to accumulate or close later\n * - Resilient: reads as an empty set even if other tracking fails\n * - Memory efficient: reuses the same object\n *\n * It's never added to `ResponseVaryParamsAccumulator.segments` (callers pass it\n * directly), so `finishAccumulatingVaryParams` doesn't touch it.\n */\nexport const emptyVaryParamsAccumulator: VaryParamsAccumulator =\n new VaryParamsAccumulator()\nemptyVaryParamsAccumulator.close()\n\nexport function createResponseVaryParamsAccumulator(): ResponseVaryParamsAccumulator {\n // Create the head and rootParams accumulators as top-level fields.\n // Segment accumulators are added to the segments set as they are created.\n const head = new VaryParamsAccumulator()\n const rootParams = new VaryParamsAccumulator(Line truncated
|
||||
{"offset": {"line": 9453, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/base-http/helpers.ts"],"sourcesContent":["import type { BaseNextRequest, BaseNextResponse } from './'\nimport type { NodeNextRequest, NodeNextResponse } from './node'\nimport type { WebNextRequest, WebNextResponse } from './web'\n\n/**\n * This file provides some helpers that should be used in conjunction with\n * explicit environment checks. When combined with the environment checks, it\n * will ensure that the correct typings are used as well as enable code\n * elimination.\n */\n\n/**\n * Type guard to determine if a request is a WebNextRequest. This does not\n * actually check the type of the request, but rather the runtime environment.\n * It's expected that when the runtime environment is the edge runtime, that any\n * base request is a WebNextRequest.\n */\nexport const isWebNextRequest = (req: BaseNextRequest): req is WebNextRequest =>\n process.env.NEXT_RUNTIME === 'edge'\n\n/**\n * Type guard to determine if a response is a WebNextResponse. This does not\n * actually check the type of the response, but rather the runtime environment.\n * It's expected that when the runtime environment is the edge runtime, that any\n * base response is a WebNextResponse.\n */\nexport const isWebNextResponse = (\n res: BaseNextResponse\n): res is WebNextResponse => process.env.NEXT_RUNTIME === 'edge'\n\n/**\n * Type guard to determine if a request is a NodeNextRequest. This does not\n * actually check the type of the request, but rather the runtime environment.\n * It's expected that when the runtime environment is the node runtime, that any\n * base request is a NodeNextRequest.\n */\nexport const isNodeNextRequest = (\n req: BaseNextRequest\n): req is NodeNextRequest => process.env.NEXT_RUNTIME !== 'edge'\n\n/**\n * Type guard to determine if a response is a NodeNextResponse. This does not\n * actually check the type of the response, but rather the runtime environment.\n * It's expected that when the runtime environment is the node runtime, that any\n * base response is a NodeNextResponse.\n */\nexport const isNodeNextResponse = (\n res: BaseNextResponse\n): res is NodeNextResponse => process.env.NEXT_RUNTIME !== 'edge'\n"],"names":["isWebNextRequest","req","process","env","NEXT_RUNTIME","isWebNextResponse","res","isNodeNextRequest","isNodeNextResponse"],"mappings":"AAIA;;;;;CAKC,GAED;;;;;CAKC,GACD;;;;;;;;;;AAAO,MAAMA,mBAAmB,CAACC,MAC/BC,QAAQC,GAAG,CAACC,YAAY,uBAAK,OAAM;AAQ9B,MAAMC,oBAAoB,CAC/BC,MAC2BJ,QAAQC,GAAG,CAACC,YAAY,uBAAK,OAAM;AAQzD,MAAMG,oBAAoB,CAC/BN,MAC2BC,QAAQC,GAAG,CAACC,YAAY,uBAAK,OAAM;AAQzD,MAAMI,qBAAqB,CAChCF,MAC4BJ,QAAQC,GAAG,CAACC,YAAY,uBAAK,OAAM","ignoreList":[0]}},
|
||||
{"offset": {"line": 9481, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/base-http/index.ts"],"sourcesContent":["import type { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'\nimport type { I18NConfig } from '../config-shared'\n\nimport { RedirectStatusCode } from '../../client/components/redirect-status-code'\nimport type { NextApiRequestCookies } from '../api-utils'\nimport { getCookieParser } from '../api-utils/get-cookie-parser'\n\nexport interface BaseNextRequestConfig {\n basePath: string | undefined\n i18n?: I18NConfig\n trailingSlash?: boolean | undefined\n}\n\nexport type FetchMetric = {\n url: string\n idx: number\n end: number\n start: number\n method: string\n status: number\n cacheReason: string\n cacheStatus: 'hit' | 'miss' | 'skip' | 'hmr'\n cacheWarning?: string\n}\n\nexport type FetchMetrics = Array<FetchMetric>\n\nexport abstract class BaseNextRequest<Body = any> {\n protected _cookies: NextApiRequestCookies | undefined\n public abstract headers: IncomingHttpHeaders\n public abstract fetchMetrics: FetchMetric[] | undefined\n\n constructor(\n public method: string,\n public url: string,\n public body: Body\n ) {}\n\n // Utils implemented using the abstract methods above\n\n public get cookies() {\n if (this._cookies) return this._cookies\n return (this._cookies = getCookieParser(this.headers)())\n }\n}\n\nexport abstract class BaseNextResponse<Destination = any> {\n abstract statusCode: number | undefined\n abstract statusMessage: string | undefined\n abstract get sent(): boolean\n\n constructor(public destination: Destination) {}\n\n /**\n * Sets a value for the header overwriting existing values\n */\n abstract setHeader(name: string, value: string | string[]): this\n\n /**\n * Removes a header\n */\n abstract removeHeader(name: string): this\n\n /**\n * Appends value for the given header name\n */\n abstract appendHeader(name: string, value: string): this\n\n /**\n * Get all values for a header as an array or undefined if no value is present\n */\n abstract getHeaderValues(name: string): string[] | undefined\n\n abstract hasHeader(name: string): boolean\n\n /**\n * Get values for a header concatenated using `,` or undefined if no value is present\n */\n abstract getHeader(name: string): string | undefined\n\n abstract getHeaders(): OutgoingHttpHeaders\n\n abstract body(value: string): this\n\n abstract send(): void\n\n abstract onClose(callback: () => void): void\n\n // Utils implemented using the abstract methods above\n\n public redirect(destination: string, statusCode: number) {\n this.setHeader('Location', destination)\n this.statusCode = statusCode\n\n // Since IE11 doesn't support the 308 header add backwards\n // compatibility using refresh header\n if (statusCode === RedirectStatusCode.PermanentRedirect) {\n this.setHeader('Refresh', `0;url=${destination}`)\n }\n\n return this\n }\n}\n"],"names":["RedirectStatusCode","getCookieParser","BaseNextRequest","constructor","method","url","body","cookies","_cookies","headers","BaseNextResponse","destination","redirect","statusCode","setHeader","PermanentRedirect"],"mappings":";;;;;;AAGA,SAASA,kBAAkB,QAAQ,+CAA8C;AAEjF,SAASC,eAAe,QAAQ,iCAAgC;;;AAsBzD,MAAeC;IAKpBC,YACSC,MAAc,EACdC,GAAW,EACXC,IAAU,CACjB;aAHOF,MAAAA,GAAAA;aACAC,GAAAA,GAAAA;aACAC,IAAAA,GAAAA;IACN;IAEH,qDAAqD;IAErD,IAAWC,UAAU;QACnB,IAAI,IAAI,CAACC,QAAQ,EAAE,OAAO,IAAI,CAACA,QAAQ;QACvC,OAAQ,IAAI,CAACA,QAAQ,OAAGP,2MAAAA,EAAgB,IAAI,CAACQ,OAAO;IACtD;AACF;AAEO,MAAeC;IAKpBP,YAAmBQ,WAAwB,CAAE;aAA1BA,WAAAA,GAAAA;IAA2B;IAqC9C,qDAAqD;IAE9CC,SAASD,WAAmB,EAAEE,UAAkB,EAAE;QACvD,IAAI,CAACC,SAAS,CAAC,YAAYH;QAC3B,IAAI,CAACE,UAAU,GAAGA;QAElB,0DAA0D;QAC1D,qCAAqC;QACrC,IAAIA,eAAeb,+MAAAA,CAAmBe,iBAAiB,EAAE;YACvD,IAAI,CAACD,SAAS,CAAC,WAAW,CAAC,MAAM,EAAEH,aAAa;QAClD;QAEA,OAAO,IAAI;IACb;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 9523, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/base-http/node.ts"],"sourcesContent":["import type { ServerResponse, IncomingMessage } from 'http'\nimport type { Writable, Readable } from 'stream'\n\nimport { SYMBOL_CLEARED_COOKIES } from '../api-utils'\nimport type { NextApiRequestCookies } from '../api-utils'\n\nimport { NEXT_REQUEST_META } from '../request-meta'\nimport type { RequestMeta } from '../request-meta'\n\nimport { BaseNextRequest, BaseNextResponse, type FetchMetric } from './index'\nimport type { OutgoingHttpHeaders } from 'node:http'\n\ntype Req = IncomingMessage & {\n [NEXT_REQUEST_META]?: RequestMeta\n cookies?: NextApiRequestCookies\n fetchMetrics?: FetchMetric[]\n}\n\nexport class NodeNextRequest extends BaseNextRequest<Readable> {\n public headers = this._req.headers\n public fetchMetrics: FetchMetric[] | undefined = this._req?.fetchMetrics;\n\n [NEXT_REQUEST_META]: RequestMeta = this._req[NEXT_REQUEST_META] || {}\n\n constructor(private _req: Req) {\n super(_req.method!.toUpperCase(), _req.url!, _req)\n }\n\n get originalRequest() {\n // Need to mimic these changes to the original req object for places where we use it:\n // render.tsx, api/ssg requests\n this._req[NEXT_REQUEST_META] = this[NEXT_REQUEST_META]\n this._req.url = this.url\n this._req.cookies = this.cookies\n return this._req\n }\n\n set originalRequest(value: Req) {\n this._req = value\n }\n\n private streaming = false\n\n /**\n * Returns the request body as a Web Readable Stream. The body here can only\n * be read once as the body will start flowing as soon as the data handler\n * is attached.\n *\n * @internal\n */\n public stream() {\n if (this.streaming) {\n throw new Error(\n 'Invariant: NodeNextRequest.stream() can only be called once'\n )\n }\n this.streaming = true\n\n return new ReadableStream({\n start: (controller) => {\n this._req.on('data', (chunk) => {\n controller.enqueue(new Uint8Array(chunk))\n })\n this._req.on('end', () => {\n controller.close()\n })\n this._req.on('error', (err) => {\n controller.error(err)\n })\n },\n })\n }\n}\n\nexport class NodeNextResponse extends BaseNextResponse<Writable> {\n private textBody: string | undefined = undefined\n\n public [SYMBOL_CLEARED_COOKIES]?: boolean\n\n get originalResponse() {\n if (SYMBOL_CLEARED_COOKIES in this) {\n this._res[SYMBOL_CLEARED_COOKIES] = this[SYMBOL_CLEARED_COOKIES]\n }\n\n return this._res\n }\n\n constructor(\n private _res: ServerResponse & { [SYMBOL_CLEARED_COOKIES]?: boolean }\n ) {\n super(_res)\n }\n\n get sent() {\n return this._res.finished || this._res.headersSent\n }\n\n get statusCode() {\n return this._res.statusCode\n }\n\n set statusCode(value: number) {\n this._res.statusCode = value\n }\n\n get statusMessage() {\n return this._res.statusMessage\n }\n\n set statusMessage(value: string) {\n this._res.statusMessage = value\n }\n\n setHeader(name: string, value: string | string[]): this {\n this._res.setHeader(name, value)\n return this\n }\n\n removeHeader(name: string): this {\n this._res.removeHeader(name)\n return this\n }\n\n getHeaderValues(name: string): string[] | undefined {\n const values = this._res.getHeader(name)\n\n if (values === undefined) return undefined\n\n return (Array.isArray(values) ? values : [values]).map((value) =>\n value.toString()\n )\n }\n\n hasHeader(name: string): boolean {\n return this._res.hasHeader(name)\n }\n\n getHeader(name: string): string | undefined {\n const values = this.getHeaderValues(name)\n return Array.isArray(values) ? values.join(',') : undefined\n }\n\n getHeaders(): OutgoingHttpHeaders {\n return this._res.getHeaders()\n }\n\n appendHeader(name: string, value: string): this {\n const currentValues = this.getHeaderValues(name) ?? []\n\n if (!currentValues.includes(value)) {\n this._res.setHeader(name, [...currentValues, value])\n }\n\n return this\n }\n\n body(value: string) {\n this.textBody = value\n return this\n }\n\n send() {\n this._res.end(this.textBody)\n }\n\n public onClose(callback: () => void) {\n this.originalResponse.on('close', callback)\n }\n}\n"],"names":["SYMBOL_CLEARED_COOKIES","NEXT_REQUEST_META","BaseNextRequest","BaseNextResponse","NodeNextRequest","constructor","_req","method","toUpperCase","url","headers","fetchMetrics","streaming","originalRequest","cookies","value","stream","Error","ReadableStream","start","controller","on","chunk","enqueue","Uint8Array","close","err","error","NodeNextResponse","originalResponse","_res","textBody","undefined","sent","finished","headersSent","statusCode","statusMessage","setHeader","name","removeHeader","getHeaderValues","values"Line truncated
|
||||
{"offset": {"line": 9659, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/client-component-renderer-logger.ts"],"sourcesContent":["import type { AppPageModule } from './route-modules/app-page/module'\n\n// Combined load times for loading client components\nlet clientComponentLoadStart = 0\nlet clientComponentLoadTimes = 0\nlet clientComponentLoadCount = 0\n\nexport function wrapClientComponentLoader(\n ComponentMod: AppPageModule,\n isTracingEnabled: boolean\n): AppPageModule['__next_app__'] {\n if (\n !('performance' in globalThis) ||\n (!process.env.NEXT_OTEL_PERFORMANCE_PREFIX && !isTracingEnabled)\n ) {\n return ComponentMod.__next_app__\n }\n\n return {\n require: (...args) => {\n const startTime = performance.now()\n\n if (clientComponentLoadStart === 0) {\n clientComponentLoadStart = startTime\n }\n\n try {\n clientComponentLoadCount += 1\n return ComponentMod.__next_app__.require(...args)\n } finally {\n clientComponentLoadTimes += performance.now() - startTime\n }\n },\n loadChunk: (...args) => {\n const startTime = performance.now()\n const result = ComponentMod.__next_app__.loadChunk(...args)\n // Avoid wrapping `loadChunk`'s result in an extra promise in case something like React depends on its identity.\n // We only need to know when it's settled.\n result.finally(() => {\n clientComponentLoadTimes += performance.now() - startTime\n })\n return result\n },\n }\n}\n\nexport function getClientComponentLoaderMetrics(\n options: { reset?: boolean } = {}\n) {\n const metrics =\n clientComponentLoadStart === 0\n ? undefined\n : {\n clientComponentLoadStart,\n clientComponentLoadTimes,\n clientComponentLoadCount,\n }\n\n if (options.reset) {\n clientComponentLoadStart = 0\n clientComponentLoadTimes = 0\n clientComponentLoadCount = 0\n }\n\n return metrics\n}\n"],"names":["clientComponentLoadStart","clientComponentLoadTimes","clientComponentLoadCount","wrapClientComponentLoader","ComponentMod","isTracingEnabled","globalThis","process","env","NEXT_OTEL_PERFORMANCE_PREFIX","__next_app__","require","args","startTime","performance","now","loadChunk","result","finally","getClientComponentLoaderMetrics","options","metrics","undefined","reset"],"mappings":";;;;;;AAEA,oDAAoD;AACpD,IAAIA,2BAA2B;AAC/B,IAAIC,2BAA2B;AAC/B,IAAIC,2BAA2B;AAExB,SAASC,0BACdC,YAA2B,EAC3BC,gBAAyB;IAEzB,IACE,CAAE,CAAA,iBAAiBC,UAAS,KAC3B,CAACC,QAAQC,GAAG,CAACC,4BAA4B,IAAI,CAACJ,kBAC/C;QACA,OAAOD,aAAaM,YAAY;IAClC;IAEA,OAAO;QACLC,SAAS,CAAC,GAAGC;YACX,MAAMC,YAAYC,YAAYC,GAAG;YAEjC,IAAIf,6BAA6B,GAAG;gBAClCA,2BAA2Ba;YAC7B;YAEA,IAAI;gBACFX,4BAA4B;gBAC5B,OAAOE,aAAaM,YAAY,CAACC,OAAO,IAAIC;YAC9C,SAAU;gBACRX,4BAA4Ba,YAAYC,GAAG,KAAKF;YAClD;QACF;QACAG,WAAW,CAAC,GAAGJ;YACb,MAAMC,YAAYC,YAAYC,GAAG;YACjC,MAAME,SAASb,aAAaM,YAAY,CAACM,SAAS,IAAIJ;YACtD,gHAAgH;YAChH,0CAA0C;YAC1CK,OAAOC,OAAO,CAAC;gBACbjB,4BAA4Ba,YAAYC,GAAG,KAAKF;YAClD;YACA,OAAOI;QACT;IACF;AACF;AAEO,SAASE,gCACdC,UAA+B,CAAC,CAAC;IAEjC,MAAMC,UACJrB,6BAA6B,IACzBsB,YACA;QACEtB;QACAC;QACAC;IACF;IAEN,IAAIkB,QAAQG,KAAK,EAAE;QACjBvB,2BAA2B;QAC3BC,2BAA2B;QAC3BC,2BAA2B;IAC7B;IAEA,OAAOmB;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 9715, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/create-deduped-by-callsite-server-error-logger.ts"],"sourcesContent":["import * as React from 'react'\n\nconst errorRef: { current: null | Error } = { current: null }\n\n// React.cache is currently only available in canary/experimental React channels.\nconst cache =\n typeof React.cache === 'function'\n ? React.cache\n : (fn: (key: unknown) => void) => fn\n\n// When Cache Components is enabled, we record these as errors so that they\n// are captured by the dev overlay as it's more critical to fix these\n// when enabled.\nconst logErrorOrWarn = process.env.__NEXT_CACHE_COMPONENTS\n ? console.error\n : console.warn\n\n// We don't want to dedupe across requests.\n// The developer might've just attempted to fix the warning so we should warn again if it still happens.\nconst flushCurrentErrorIfNew = cache(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- cache key\n (key: unknown) => {\n try {\n logErrorOrWarn(errorRef.current)\n } finally {\n errorRef.current = null\n }\n }\n)\n\n/**\n * Creates a function that logs an error message that is deduped by the userland\n * callsite.\n * This requires no indirection between the call of this function and the userland\n * callsite i.e. there's only a single library frame above this.\n * Do not use on the Client where sourcemaps and ignore listing might be enabled.\n * Only use that for warnings need a fix independent of the callstack.\n *\n * @param getMessage\n * @returns\n */\nexport function createDedupedByCallsiteServerErrorLoggerDev<Args extends any[]>(\n getMessage: (...args: Args) => Error\n) {\n return function logDedupedError(...args: Args) {\n const message = getMessage(...args)\n\n if (process.env.NODE_ENV !== 'production') {\n const callStackFrames = new Error().stack?.split('\\n')\n if (callStackFrames === undefined || callStackFrames.length < 4) {\n logErrorOrWarn(message)\n } else {\n // Error:\n // logDedupedError\n // asyncApiBeingAccessedSynchronously\n // <userland callsite>\n // TODO: This breaks if sourcemaps with ignore lists are enabled.\n const key = callStackFrames[4]\n errorRef.current = message\n flushCurrentErrorIfNew(key)\n }\n } else {\n logErrorOrWarn(message)\n }\n }\n}\n"],"names":["React","errorRef","current","cache","fn","logErrorOrWarn","process","env","__NEXT_CACHE_COMPONENTS","console","error","warn","flushCurrentErrorIfNew","key","createDedupedByCallsiteServerErrorLoggerDev","getMessage","logDedupedError","args","message","NODE_ENV","callStackFrames","Error","stack","split","undefined","length"],"mappings":";;;;AAAA,YAAYA,WAAW,QAAO;;AAE9B,MAAMC,WAAsC;IAAEC,SAAS;AAAK;AAE5D,iFAAiF;AACjF,MAAMC,QACJ,OAAOH,MAAMG,wMAAK,KAAK,aACnBH,MAAMG,wMAAK,GACX,CAACC,KAA+BA;AAEtC,2EAA2E;AAC3E,qEAAqE;AACrE,gBAAgB;AAChB,MAAMC,iBAAiBC,QAAQC,GAAG,CAACC,uBAAuB,GACtDC,QAAQC,KAAK,aACbD,QAAQE,IAAI;AAEhB,2CAA2C;AAC3C,wGAAwG;AACxG,MAAMC,yBAAyBT,MAC7B,AACA,CAACU,yEADyE;IAExE,IAAI;QACFR,eAAeJ,SAASC,OAAO;IACjC,SAAU;QACRD,SAASC,OAAO,GAAG;IACrB;AACF;AAcK,SAASY,4CACdC,UAAoC;IAEpC,OAAO,SAASC,gBAAgB,GAAGC,IAAU;QAC3C,MAAMC,UAAUH,cAAcE;QAE9B,IAAIX,QAAQC,GAAG,CAACY,QAAQ,KAAK,WAAc;gBACjB;YAAxB,MAAMC,kBAAAA,CAAkB,SAAA,IAAIC,QAAQC,KAAK,KAAA,OAAA,KAAA,IAAjB,OAAmBC,KAAK,CAAC;YACjD,IAAIH,oBAAoBI,aAAaJ,gBAAgBK,MAAM,GAAG,GAAG;gBAC/DpB,eAAea;YACjB,OAAO;gBACL,SAAS;gBACT,oBAAoB;gBACpB,uCAAuC;gBACvC,wBAAwB;gBACxB,iEAAiE;gBACjE,MAAML,MAAMO,eAAe,CAAC,EAAE;gBAC9BnB,SAASC,OAAO,GAAGgB;gBACnBN,uBAAuBC;YACzB;QACF,OAAO;;IAGT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 9765, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/dynamic-rendering-utils.ts"],"sourcesContent":["import {\n RenderStage,\n type AdvanceableRenderStage,\n} from './app-render/staged-rendering'\nimport type {\n RequestStore,\n WorkUnitStore,\n} from './app-render/work-unit-async-storage.external'\nimport { workUnitAsyncStorage } from './app-render/work-unit-async-storage.external'\nimport { getServerReact, getClientReact } from './runtime-reacts.external'\n\nexport function isHangingPromiseRejectionError(\n err: unknown\n): err is HangingPromiseRejectionError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === HANGING_PROMISE_REJECTION\n}\n\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'\n\nclass HangingPromiseRejectionError extends Error {\n public readonly digest = HANGING_PROMISE_REJECTION\n\n constructor(\n public readonly route: string,\n public readonly expression: string\n ) {\n super(\n `During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`\n )\n }\n}\n\nconst CLIENT_HOOK_DYNAMIC = 'CLIENT_HOOK_DYNAMIC'\n\nexport class ClientHookDynamicError extends Error {\n public readonly digest = CLIENT_HOOK_DYNAMIC\n\n constructor(route: string, expression: string) {\n super(\n `Route \"${route}\": Next.js encountered URL data \\`${expression}\\` in a Client Component outside of \\`<Suspense>\\`.\\n\\n` +\n `This blocks prerendering because the value is only available at runtime.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [stream] Wrap the component in \\`<Suspense fallback={...}>\\` so the hook value streams in after prerendering\\n` +\n ` - [block] Set \\`export const instant = false\\` to allow a blocking route\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/blocking-prerender-client-hook`\n )\n }\n}\n\nexport function isClientHookDynamicError(\n err: unknown\n): err is ClientHookDynamicError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === CLIENT_HOOK_DYNAMIC\n}\n\ntype AbortListeners = Array<() => void>\nconst abortListenersBySignal = new WeakMap<AbortSignal, AbortListeners>()\n\n/**\n * Constructs a promise that never resolves, standing in for *dynamic* data:\n * data that is only available during a real dynamic request and hangs in\n * every kind of prerender — `io()`, `connection()`, uncached `fetch()`.\n *\n * This is primarily useful for cacheComponents where we use promise\n * resolution timing to determine which parts of a render can be included in a\n * prerender.\n *\n * Records nothing on the prerender store: the promise's holes are only ever\n * filled by a real dynamic request, so a runtime prefetch response would have\n * the same holes as the static one. If the data source would resolve during a\n * runtime prerender, use `makeRuntimeHangingPromise` instead.\n *\n * @internal\n */\nexport function makeDynamicHangingPromise<T>(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise<T> {\n return makeHangingPromiseWithError(\n signal,\n new HangingPromiseRejectionError(route, expression)\n )\n}\n\nexport function makeUntrackedHangingPromise<T>(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise<T> {\n return makeHangingPromiseWithError(\n signal,\n new HangingPromiseRejectionError(route, expression)\n )\n}\n\n/**\n * Constructs a promise that never resolves, standing in for *runtime* data:\n * data that hangs during a static prerender but is available during a runtime\n * prerender (the kind that backs a runtime prefetch request: request data\n * like cookies and headers is available, but the render is still not a real\n * dynamic request). Examples: cookies, headers, fallback params,\n * searchParams, and cache entries that are excluded only from static\n * prerenders.\n *\n * Creating one of these during a static prerender records on the prerender\n * store that a runtime prefetch would produce more content than the static\n * response (`runtimeDataAccessed`), which the segment prefetch encoding uses\n * to tell the client whether a runtime prefetch request could be skipped.\n *\n * When unsure whether data is dynamic or runtime, prefer this method — the\n * cost of over-recording is a redundant runtime prefetch request; the cost of\n * under-recording is a permanently missing one.\n *\n * `workUnitStore` may be null ONLY when the caller tracks the access itself\n * at observation time instead of creation time. TLine truncated
|
||||
{"offset": {"line": 10012, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/instrumentation/utils.ts"],"sourcesContent":["export function getRevalidateReason(params: {\n isOnDemandRevalidate?: boolean\n isStaticGeneration?: boolean\n}): 'on-demand' | 'stale' | undefined {\n if (params.isOnDemandRevalidate) {\n return 'on-demand'\n }\n if (params.isStaticGeneration) {\n return 'stale'\n }\n return undefined\n}\n"],"names":["getRevalidateReason","params","isOnDemandRevalidate","isStaticGeneration","undefined"],"mappings":";;;;AAAO,SAASA,oBAAoBC,MAGnC;IACC,IAAIA,OAAOC,oBAAoB,EAAE;QAC/B,OAAO;IACT;IACA,IAAID,OAAOE,kBAAkB,EAAE;QAC7B,OAAO;IACT;IACA,OAAOC;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 10029, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/app-dir-module.ts"],"sourcesContent":["import type { AppDirModules } from '../../build/webpack/loaders/next-app-loader'\nimport { DEFAULT_SEGMENT_KEY } from '../../shared/lib/segment'\n\n/**\n * LoaderTree is generated in next-app-loader.\n */\nexport type LoaderTree = [\n segment: string,\n parallelRoutes: { [parallelRouterKey: string]: LoaderTree },\n modules: AppDirModules,\n /**\n * At build time, for each dynamic segment, we compute the list of static\n * sibling segments that exist at the same URL path level. This is used by\n * the client router to determine if a prefetch can be reused.\n *\n * For example, given the following file structure:\n * /app/(group1)/products/sale/page.tsx -> /products/sale\n * /app/(group2)/products/[id]/page.tsx -> /products/[id]\n *\n * The [id] segment would have staticSiblings: ['sale']\n *\n * This accounts for route groups, which may place sibling routes in\n * different parts of the file system tree but at the same URL level.\n *\n * A value of `null` means the static siblings are unknown (e.g., in webpack\n * dev mode where routes are compiled on-demand).\n */\n staticSiblings: readonly string[] | null,\n]\n\nexport async function getLayoutOrPageModule(loaderTree: LoaderTree) {\n const { layout, page, defaultPage } = loaderTree[2]\n const isLayout = typeof layout !== 'undefined'\n const isPage = typeof page !== 'undefined'\n const isDefaultPage =\n typeof defaultPage !== 'undefined' && loaderTree[0] === DEFAULT_SEGMENT_KEY\n\n let mod = undefined\n let modType: 'layout' | 'page' | undefined = undefined\n let filePath = undefined\n\n if (isLayout) {\n mod = await layout[0]()\n modType = 'layout'\n filePath = layout[1]\n } else if (isPage) {\n mod = await page[0]()\n modType = 'page'\n filePath = page[1]\n } else if (isDefaultPage) {\n mod = await defaultPage[0]()\n modType = 'page'\n filePath = defaultPage[1]\n }\n\n return { mod, modType, filePath }\n}\n\nexport async function getComponentTypeModule(\n loaderTree: LoaderTree,\n moduleType: 'layout' | 'not-found' | 'forbidden' | 'unauthorized'\n) {\n const { [moduleType]: module } = loaderTree[2]\n if (typeof module !== 'undefined') {\n return await module[0]()\n }\n return undefined\n}\n"],"names":["DEFAULT_SEGMENT_KEY","getLayoutOrPageModule","loaderTree","layout","page","defaultPage","isLayout","isPage","isDefaultPage","mod","undefined","modType","filePath","getComponentTypeModule","moduleType","module"],"mappings":";;;;;;AACA,SAASA,mBAAmB,QAAQ,2BAA0B;;AA6BvD,eAAeC,sBAAsBC,UAAsB;IAChE,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAEC,WAAW,EAAE,GAAGH,UAAU,CAAC,EAAE;IACnD,MAAMI,WAAW,OAAOH,WAAW;IACnC,MAAMI,SAAS,OAAOH,SAAS;IAC/B,MAAMI,gBACJ,OAAOH,gBAAgB,eAAeH,UAAU,CAAC,EAAE,KAAKF,sLAAAA;IAE1D,IAAIS,MAAMC;IACV,IAAIC,UAAyCD;IAC7C,IAAIE,WAAWF;IAEf,IAAIJ,UAAU;QACZG,MAAM,MAAMN,MAAM,CAAC,EAAE;QACrBQ,UAAU;QACVC,WAAWT,MAAM,CAAC,EAAE;IACtB,OAAO,IAAII,QAAQ;QACjBE,MAAM,MAAML,IAAI,CAAC,EAAE;QACnBO,UAAU;QACVC,WAAWR,IAAI,CAAC,EAAE;IACpB,OAAO,IAAII,eAAe;QACxBC,MAAM,MAAMJ,WAAW,CAAC,EAAE;QAC1BM,UAAU;QACVC,WAAWP,WAAW,CAAC,EAAE;IAC3B;IAEA,OAAO;QAAEI;QAAKE;QAASC;IAAS;AAClC;AAEO,eAAeC,uBACpBX,UAAsB,EACtBY,UAAiE;IAEjE,MAAM,EAAE,CAACA,WAAW,EAAEC,MAAM,EAAE,GAAGb,UAAU,CAAC,EAAE;IAC9C,IAAI,OAAOa,WAAW,aAAa;QACjC,OAAO,MAAMA,MAAM,CAAC,EAAE;IACxB;IACA,OAAOL;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 10075, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/cache-control.ts"],"sourcesContent":["import { CACHE_ONE_YEAR_SECONDS } from '../../lib/constants'\n\n/**\n * The revalidate option used internally for pages. A value of `false` means\n * that the page should not be revalidated. A number means that the page\n * should be revalidated after the given number of seconds (this also includes\n * `1` which means to revalidate after 1 second). A value of `0` is not a valid\n * value for this option.\n */\nexport type Revalidate = number | false\n\nexport interface CacheControl {\n revalidate: Revalidate\n expire: number | undefined\n}\n\nexport function getCacheControlHeader({\n revalidate,\n expire,\n}: CacheControl): string {\n const swrHeader =\n typeof revalidate === 'number' &&\n expire !== undefined &&\n revalidate < expire\n ? `, stale-while-revalidate=${expire - revalidate}`\n : ''\n\n if (revalidate === 0) {\n return 'private, no-cache, no-store, max-age=0, must-revalidate'\n } else if (typeof revalidate === 'number') {\n return `s-maxage=${revalidate}${swrHeader}`\n }\n\n return `s-maxage=${CACHE_ONE_YEAR_SECONDS}${swrHeader}`\n}\n"],"names":["CACHE_ONE_YEAR_SECONDS","getCacheControlHeader","revalidate","expire","swrHeader","undefined"],"mappings":";;;;AAAA,SAASA,sBAAsB,QAAQ,sBAAqB;;AAgBrD,SAASC,sBAAsB,EACpCC,UAAU,EACVC,MAAM,EACO;IACb,MAAMC,YACJ,OAAOF,eAAe,YACtBC,WAAWE,aACXH,aAAaC,SACT,CAAC,yBAAyB,EAAEA,SAASD,YAAY,GACjD;IAEN,IAAIA,eAAe,GAAG;QACpB,OAAO;IACT,OAAO,IAAI,OAAOA,eAAe,UAAU;QACzC,OAAO,CAAC,SAAS,EAAEA,aAAaE,WAAW;IAC7C;IAEA,OAAO,CAAC,SAAS,EAAEJ,iLAAAA,GAAyBI,WAAW;AACzD","ignoreList":[0]}},
|
||||
{"offset": {"line": 10094, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/clone-response.ts"],"sourcesContent":["const noop = () => {}\n\nlet registry: FinalizationRegistry<WeakRef<ReadableStream>> | undefined\n\nif (globalThis.FinalizationRegistry) {\n registry = new FinalizationRegistry((weakRef: WeakRef<ReadableStream>) => {\n const stream = weakRef.deref()\n if (stream && !stream.locked) {\n stream.cancel('Response object has been garbage collected').then(noop)\n }\n })\n}\n\n/**\n * Clones a response by teeing the body so we can return two independent\n * ReadableStreams from it. This avoids the bug in the undici library around\n * response cloning.\n *\n * After cloning, the original response's body will be consumed and closed.\n *\n * @see https://github.com/vercel/next.js/pull/73274\n *\n * @param original - The original response to clone.\n * @returns A tuple containing two independent clones of the original response.\n */\nexport function cloneResponse(original: Response): [Response, Response] {\n // If the response has no body, then we can just return the original response\n // twice because it's immutable.\n if (!original.body) {\n return [original, original]\n }\n\n const [body1, body2] = original.body.tee()\n\n const cloned1 = new Response(body1, {\n status: original.status,\n statusText: original.statusText,\n headers: original.headers,\n })\n\n Object.defineProperty(cloned1, 'url', {\n value: original.url,\n // How the original response.url behaves\n configurable: true,\n enumerable: true,\n writable: false,\n })\n\n const cloned2 = new Response(body2, {\n status: original.status,\n statusText: original.statusText,\n headers: original.headers,\n })\n\n Object.defineProperty(cloned2, 'url', {\n value: original.url,\n // How the original response.url behaves\n configurable: true,\n enumerable: true,\n writable: false,\n })\n\n // The Fetch Standard allows users to skip consuming the response body by\n // relying on garbage collection to release connection resources.\n // https://github.com/nodejs/undici?tab=readme-ov-file#garbage-collection\n //\n // To cancel the stream you then need to cancel both resulting branches.\n // Teeing a stream will generally lock it for the duration, preventing other\n // readers from locking it.\n // https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/tee\n if (registry) {\n if (cloned1.body) {\n registry.register(cloned1, new WeakRef(cloned1.body))\n }\n\n if (cloned2.body) {\n registry.register(cloned2, new WeakRef(cloned2.body))\n }\n }\n\n return [cloned1, cloned2]\n}\n"],"names":["noop","registry","globalThis","FinalizationRegistry","weakRef","stream","deref","locked","cancel","then","cloneResponse","original","body","body1","body2","tee","cloned1","Response","status","statusText","headers","Object","defineProperty","value","url","configurable","enumerable","writable","cloned2","register","WeakRef"],"mappings":";;;;AAAA,MAAMA,OAAO,KAAO;AAEpB,IAAIC;AAEJ,IAAIC,WAAWC,oBAAoB,EAAE;IACnCF,WAAW,IAAIE,qBAAqB,CAACC;QACnC,MAAMC,SAASD,QAAQE,KAAK;QAC5B,IAAID,UAAU,CAACA,OAAOE,MAAM,EAAE;YAC5BF,OAAOG,MAAM,CAAC,8CAA8CC,IAAI,CAACT;QACnE;IACF;AACF;AAcO,SAASU,cAAcC,QAAkB;IAC9C,6EAA6E;IAC7E,gCAAgC;IAChC,IAAI,CAACA,SAASC,IAAI,EAAE;QAClB,OAAO;YAACD;YAAUA;SAAS;IAC7B;IAEA,MAAM,CAACE,OAAOC,MAAM,GAAGH,SAASC,IAAI,CAACG,GAAG;IAExC,MAAMC,UAAU,IAAIC,SAASJ,OAAO;QAClCK,QAAQP,SAASO,MAAM;QACvBC,YAAYR,SAASQ,UAAU;QAC/BC,SAAST,SAASS,OAAO;IAC3B;IAEAC,OAAOC,cAAc,CAACN,SAAS,OAAO;QACpCO,OAAOZ,SAASa,GAAG;QACnB,wCAAwC;QACxCC,cAAc;QACdC,YAAY;QACZC,UAAU;IACZ;IAEA,MAAMC,UAAU,IAAIX,SAASH,OAAO;QAClCI,QAAQP,SAASO,MAAM;QACvBC,YAAYR,SAASQ,UAAU;QAC/BC,SAAST,SAASS,OAAO;IAC3B;IAEAC,OAAOC,cAAc,CAACM,SAAS,OAAO;QACpCL,OAAOZ,SAASa,GAAG;QACnB,wCAAwC;QACxCC,cAAc;QACdC,YAAY;QACZC,UAAU;IACZ;IAEA,yEAAyE;IACzE,iEAAiE;IACjE,yEAAyE;IACzE,EAAE;IACF,wEAAwE;IACxE,4EAA4E;IAC5E,2BAA2B;IAC3B,sEAAsE;IACtE,IAAI1B,UAAU;QACZ,IAAIe,QAAQJ,IAAI,EAAE;YAChBX,SAAS4B,QAAQ,CAACb,SAAS,IAAIc,QAAQd,QAAQJ,IAAI;QACrD;QAEA,IAAIgB,QAAQhB,IAAI,EAAE;YAChBX,SAAS4B,QAAQ,CAACD,SAAS,IAAIE,QAAQF,QAAQhB,IAAI;QACrD;IACF;IAEA,OAAO;QAACI;QAASY;KAAQ;AAC3B","ignoreList":[0]}},
|
||||
{"offset": {"line": 10167, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/dedupe-fetch.ts"],"sourcesContent":["/**\n * Based on https://github.com/facebook/react/blob/d4e78c42a94be027b4dc7ed2659a5fddfbf9bd4e/packages/react/src/ReactFetch.js\n */\nimport * as React from 'react'\nimport { cloneResponse } from './clone-response'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nconst simpleCacheKey = '[\"GET\",[],null,\"follow\",null,null,null,null]' // generateCacheKey(new Request('https://blank'));\n\n// Headers that should not affect deduplication\n// traceparent and tracestate are used for distributed tracing and should not affect cache keys\nconst headersToExcludeInCacheKey = new Set(['traceparent', 'tracestate'])\n\nfunction generateCacheKey(request: Request): string {\n // We pick the fields that goes into the key used to dedupe requests.\n // We don't include the `cache` field, because we end up using whatever\n // caching resulted from the first request.\n // Notably we currently don't consider non-standard (or future) options.\n // This might not be safe. TODO: warn for non-standard extensions differing.\n // IF YOU CHANGE THIS UPDATE THE simpleCacheKey ABOVE.\n\n const filteredHeaders = Array.from(request.headers.entries()).filter(\n ([key]) => !headersToExcludeInCacheKey.has(key.toLowerCase())\n )\n\n return JSON.stringify([\n request.method,\n filteredHeaders,\n request.mode,\n request.redirect,\n request.credentials,\n request.referrer,\n request.referrerPolicy,\n request.integrity,\n ])\n}\n\ntype CacheEntry = [\n key: string,\n promise: Promise<Response>,\n response: Response | null,\n]\n\nexport function createDedupeFetch(originalFetch: typeof fetch) {\n const getCacheEntries = React.cache(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- url is the cache key\n (url: string): CacheEntry[] => []\n )\n\n return function dedupeFetch(\n resource: URL | RequestInfo,\n options?: RequestInit\n ): Promise<Response> {\n if (options && options.signal) {\n // If we're passed a signal, then we assume that\n // someone else controls the lifetime of this object and opts out of\n // caching. It's effectively the opt-out mechanism.\n // Ideally we should be able to check this on the Request but\n // it always gets initialized with its own signal so we don't\n // know if it's supposed to override - unless we also override the\n // Request constructor.\n return originalFetch(resource, options)\n }\n // Normalize the Request\n let url: string\n let cacheKey: string\n if (typeof resource === 'string' && !options) {\n // Fast path.\n cacheKey = simpleCacheKey\n url = resource\n } else {\n // Normalize the request.\n // if resource is not a string or a URL (its an instance of Request)\n // then do not instantiate a new Request but instead\n // reuse the request as to not disturb the body in the event it's a ReadableStream.\n const request =\n typeof resource === 'string' || resource instanceof URL\n ? new Request(resource, options)\n : resource\n if (\n (request.method !== 'GET' && request.method !== 'HEAD') ||\n request.keepalive\n ) {\n // We currently don't dedupe requests that might have side-effects. Those\n // have to be explicitly cached. We assume that the request doesn't have a\n // body if it's GET or HEAD.\n // keepalive gets treated the same as if you passed a custom cache signal.\n return originalFetch(resource, options)\n }\n cacheKey = generateCacheKey(request)\n url = request.url\n }\n\n const cacheEntries = getCacheEntries(url)\n for (let i = 0, j = cacheEntries.length; i < j; i += 1) {\n const [key, promise] = cacheEntries[i]\n if (key === cacheKey) {\n return promise.then(() => {\n const response = cacheEntries[i][2]\n if (!response) throw new InvariantError('No cached response')\n\n // We're cloning the response using this utility because there exists\n // a bug in the undici library around response cloning. See the\n // following pull request for more details:\n // https://github.com/vercel/next.js/pull/73274\n const [cloned1, cloned2] = cloneResponse(response)\n cacheEntries[i][2] = cloned2\n return cloned1\n })\n }\n }\n\n // We pass the original arguments here in case normalizing the Request\n // doesn't include all the options in this environment.\n const promise = originalFetch(resource, options)\n const entry: CacheEntry = [cacheKey, promise, null]\n cacheEntries.push(entry)\n\n return promise.then((response) => {\n // We're cloning the response using this utility because there existsLine truncated
|
||||
{"offset": {"line": 10287, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/encode-cache-tag.ts"],"sourcesContent":["/**\n * Percent-encode every character outside printable ASCII so a tag value can be\n * safely serialized as part of the `x-next-cache-tags` HTTP header.\n *\n * Node's `validateHeaderValue` rejects any code unit outside `\\t\\x20-\\x7e`, so\n * a matched route path or user-supplied tag containing a non-ASCII character\n * (Hebrew, Arabic, Chinese, emoji, …) would otherwise throw `ERR_INVALID_CHAR`\n * and crash ISR on every affected request.\n *\n * This is applied at the public boundaries — tag construction\n * (`getImplicitTags`, `validateTags`) and invalidation input (`revalidatePath`,\n * `revalidateTag`, `updateTag`) — so storage, comparison, and the wire all see\n * the same canonical ASCII-safe form.\n *\n * The character class `[\\t\\x20-\\x7e]` mirrors Node's `validHdrChars` table —\n * `\\t` plus printable ASCII through `~`. Anything outside that is rejected\n * by `validateHeaderValue`, so we encode runs of those characters and leave\n * everything else (`,`, `/`, `%`, `[`, `]`, `_`, `-`, `\\t`, …) byte-for-byte\n * unchanged. This preserves the comma-separated header format and the\n * dynamic-segment markers in derived tags (`_N_T_/[slug]/page`).\n *\n * Properties:\n * - Fast-path: input that already fits the validation class is returned\n * unchanged. This makes the encoder idempotent on already-encoded `%xx`\n * sequences.\n * - Matches *runs* of out-of-class code units so surrogate pairs (e.g. an\n * emoji) are handed to `encodeURIComponent` as a complete code point — a\n * per-code-unit regex would split the pair and throw `URIError`.\n */\nconst OUT_OF_CLASS_CHAR = /[^\\t\\x20-\\x7e]/\nconst OUT_OF_CLASS_RUN = /[^\\t\\x20-\\x7e]+/g\n\nexport function encodeCacheTag(tag: string): string {\n return OUT_OF_CLASS_CHAR.test(tag)\n ? tag.replace(OUT_OF_CLASS_RUN, (run) => encodeURIComponent(run))\n : tag\n}\n"],"names":["OUT_OF_CLASS_CHAR","OUT_OF_CLASS_RUN","encodeCacheTag","tag","test","replace","run","encodeURIComponent"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BC,GACD,MAAMA,oBAAoB;AAC1B,MAAMC,mBAAmB;AAElB,SAASC,eAAeC,GAAW;IACxC,OAAOH,kBAAkBI,IAAI,CAACD,OAC1BA,IAAIE,OAAO,CAACJ,kBAAkB,CAACK,MAAQC,mBAAmBD,QAC1DH;AACN","ignoreList":[0]}},
|
||||
{"offset": {"line": 10328, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/etag.ts"],"sourcesContent":["/**\n * FNV-1a Hash implementation\n * @author Travis Webb (tjwebb) <me@traviswebb.com>\n *\n * Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js\n *\n * Simplified, optimized and add modified for 52 bit, which provides a larger hash space\n * and still making use of Javascript's 53-bit integer space.\n */\nexport const fnv1a52 = (str: string) => {\n const len = str.length\n let i = 0,\n t0 = 0,\n v0 = 0x2325,\n t1 = 0,\n v1 = 0x8422,\n t2 = 0,\n v2 = 0x9ce4,\n t3 = 0,\n v3 = 0xcbf2\n\n while (i < len) {\n v0 ^= str.charCodeAt(i++)\n t0 = v0 * 435\n t1 = v1 * 435\n t2 = v2 * 435\n t3 = v3 * 435\n t2 += v0 << 8\n t3 += v1 << 8\n t1 += t0 >>> 16\n v0 = t0 & 65535\n t2 += t1 >>> 16\n v1 = t1 & 65535\n v3 = (t3 + (t2 >>> 16)) & 65535\n v2 = t2 & 65535\n }\n\n return (\n (v3 & 15) * 281474976710656 +\n v2 * 4294967296 +\n v1 * 65536 +\n (v0 ^ (v3 >> 4))\n )\n}\n\nexport const generateETag = (payload: string, weak = false) => {\n const prefix = weak ? 'W/\"' : '\"'\n return (\n prefix + fnv1a52(payload).toString(36) + payload.length.toString(36) + '\"'\n )\n}\n"],"names":["fnv1a52","str","len","length","i","t0","v0","t1","v1","t2","v2","t3","v3","charCodeAt","generateETag","payload","weak","prefix","toString"],"mappings":"AAAA;;;;;;;;CAQC,GACD;;;;;;AAAO,MAAMA,UAAU,CAACC;IACtB,MAAMC,MAAMD,IAAIE,MAAM;IACtB,IAAIC,IAAI,GACNC,KAAK,GACLC,KAAK,QACLC,KAAK,GACLC,KAAK,QACLC,KAAK,GACLC,KAAK,QACLC,KAAK,GACLC,KAAK;IAEP,MAAOR,IAAIF,IAAK;QACdI,MAAML,IAAIY,UAAU,CAACT;QACrBC,KAAKC,KAAK;QACVC,KAAKC,KAAK;QACVC,KAAKC,KAAK;QACVC,KAAKC,KAAK;QACVH,MAAMH,MAAM;QACZK,MAAMH,MAAM;QACZD,MAAMF,OAAO;QACbC,KAAKD,KAAK;QACVI,MAAMF,OAAO;QACbC,KAAKD,KAAK;QACVK,KAAMD,KAAMF,CAAAA,OAAO,EAAC,IAAM;QAC1BC,KAAKD,KAAK;IACZ;IAEA,OACGG,CAAAA,KAAK,EAAC,IAAK,kBACZF,KAAK,aACLF,KAAK,QACJF,CAAAA,KAAMM,MAAM,CAAC;AAElB,EAAC;AAEM,MAAME,eAAe,CAACC,SAAiBC,OAAO,KAAK;IACxD,MAAMC,SAASD,OAAO,QAAQ;IAC9B,OACEC,SAASjB,QAAQe,SAASG,QAAQ,CAAC,MAAMH,QAAQZ,MAAM,CAACe,QAAQ,CAAC,MAAM;AAE3E,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 10370, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/experimental/ppr.ts"],"sourcesContent":["/**\n * If set to `incremental`, only those leaf pages that export\n * `experimental_ppr = true` will have partial prerendering enabled. If any\n * page exports this value as `false` or does not export it at all will not\n * have partial prerendering enabled. If set to a boolean, the options for\n * `experimental_ppr` will be ignored.\n */\n\nexport type ExperimentalPPRConfig = boolean | 'incremental'\n\n/**\n * Returns true if partial prerendering is enabled for the application. It does\n * not tell you if a given route has PPR enabled, as that requires analysis of\n * the route's configuration.\n *\n * @see {@link checkIsRoutePPREnabled} - for checking if a specific route has PPR enabled.\n */\nexport function checkIsAppPPREnabled(\n config: ExperimentalPPRConfig | undefined\n): boolean {\n // If the config is undefined, partial prerendering is disabled.\n if (typeof config === 'undefined') return false\n\n // If the config is a boolean, use it directly.\n if (typeof config === 'boolean') return config\n\n // If the config is a string, it must be 'incremental' to enable partial\n // prerendering.\n if (config === 'incremental') return true\n\n return false\n}\n\n/**\n * Returns true if partial prerendering is supported for the current page with\n * the provided app configuration. If the application doesn't have partial\n * prerendering enabled, this function will always return false. If you want to\n * check if the application has partial prerendering enabled\n *\n * @see {@link checkIsAppPPREnabled} for checking if the application has PPR enabled.\n */\nexport function checkIsRoutePPREnabled(\n config: ExperimentalPPRConfig | undefined\n): boolean {\n // If the config is undefined, partial prerendering is disabled.\n if (typeof config === 'undefined') return false\n\n // If the config is a boolean, use it directly.\n if (typeof config === 'boolean') return config\n\n return false\n}\n"],"names":["checkIsAppPPREnabled","config","checkIsRoutePPREnabled"],"mappings":"AAAA;;;;;;CAMC,GAID;;;;;;CAMC,GACD;;;;;;AAAO,SAASA,qBACdC,MAAyC;IAEzC,gEAAgE;IAChE,IAAI,OAAOA,WAAW,aAAa,OAAO;IAE1C,+CAA+C;IAC/C,IAAI,OAAOA,WAAW,WAAW,OAAOA;IAExC,wEAAwE;IACxE,gBAAgB;IAChB,IAAIA,WAAW,eAAe,OAAO;IAErC,OAAO;AACT;AAUO,SAASC,uBACdD,MAAyC;IAEzC,gEAAgE;IAChE,IAAI,OAAOA,WAAW,aAAa,OAAO;IAE1C,+CAA+C;IAC/C,IAAI,OAAOA,WAAW,WAAW,OAAOA;IAExC,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 10409, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/is-non-html-sec-fetch-dest.ts"],"sourcesContent":["/**\n * `Sec-Fetch-Dest` values for subresource requests that can never render an\n * HTML response. Excludes destinations that can display HTML (`document`,\n * `iframe`, etc.) and `empty` (`fetch()`/XHR, including RSC requests).\n */\nconst NON_HTML_SEC_FETCH_DESTS = new Set([\n 'audio',\n 'audioworklet',\n 'font',\n 'image',\n 'json',\n 'manifest',\n 'paintworklet',\n 'report',\n 'script',\n 'serviceworker',\n 'sharedworker',\n 'style',\n 'track',\n 'video',\n 'webidentity',\n 'worker',\n 'xslt',\n])\n\nexport function isNonHtmlSecFetchDest(\n value: string | string[] | null | undefined\n): boolean {\n return typeof value === 'string' && NON_HTML_SEC_FETCH_DESTS.has(value)\n}\n"],"names":["NON_HTML_SEC_FETCH_DESTS","Set","isNonHtmlSecFetchDest","value","has"],"mappings":";;;;AAAA;;;;CAIC,GACD,MAAMA,2BAA2B,IAAIC,IAAI;IACvC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAEM,SAASC,sBACdC,KAA2C;IAE3C,OAAO,OAAOA,UAAU,YAAYH,yBAAyBI,GAAG,CAACD;AACnE","ignoreList":[0]}},
|
||||
{"offset": {"line": 10443, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/is-rsc-request.ts"],"sourcesContent":["/**\n * Normalizes the raw RSC header value. Only the literal string \"1\" is treated\n * as a valid RSC request marker; malformed or repeated values are ignored.\n */\nexport function isRSCRequestHeader(\n value: string | string[] | null | undefined\n): boolean {\n return value === '1'\n}\n"],"names":["isRSCRequestHeader","value"],"mappings":"AAAA;;;CAGC,GACD;;;;AAAO,SAASA,mBACdC,KAA2C;IAE3C,OAAOA,UAAU;AACnB","ignoreList":[0]}},
|
||||
{"offset": {"line": 10457, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/lazy-result.ts"],"sourcesContent":["export type LazyResult<TValue> = PromiseLike<TValue> & { value?: TValue }\nexport type ResolvedLazyResult<TValue> = PromiseLike<TValue> & { value: TValue }\n\n/**\n * Calls the given function only when the returned promise-like object is\n * awaited. Afterwards, it provides the resolved value synchronously as `value`\n * property.\n */\nexport function createLazyResult<TValue>(\n fn: () => Promise<TValue> | TValue\n): LazyResult<TValue> {\n let pendingResult: Promise<TValue> | undefined\n\n const result: LazyResult<TValue> = {\n then(onfulfilled, onrejected) {\n if (!pendingResult) {\n pendingResult = Promise.resolve(fn())\n }\n\n pendingResult\n .then((value) => {\n result.value = value\n })\n .catch(() => {\n // The externally awaited result will be rejected via `onrejected`. We\n // don't need to handle it here. But we do want to avoid an unhandled\n // rejection.\n })\n\n return pendingResult.then(onfulfilled, onrejected)\n },\n }\n\n return result\n}\n\nexport function isResolvedLazyResult<TValue>(\n result: LazyResult<TValue>\n): result is ResolvedLazyResult<TValue> {\n return result.hasOwnProperty('value')\n}\n"],"names":["createLazyResult","fn","pendingResult","result","then","onfulfilled","onrejected","Promise","resolve","value","catch","isResolvedLazyResult","hasOwnProperty"],"mappings":"AAGA;;;;CAIC,GACD;;;;;;AAAO,SAASA,iBACdC,EAAkC;IAElC,IAAIC;IAEJ,MAAMC,SAA6B;QACjCC,MAAKC,WAAW,EAAEC,UAAU;YAC1B,IAAI,CAACJ,eAAe;gBAClBA,gBAAgBK,QAAQC,OAAO,CAACP;YAClC;YAEAC,cACGE,IAAI,CAAC,CAACK;gBACLN,OAAOM,KAAK,GAAGA;YACjB,GACCC,KAAK,CAAC;YACL,sEAAsE;YACtE,qEAAqE;YACrE,aAAa;YACf;YAEF,OAAOR,cAAcE,IAAI,CAACC,aAAaC;QACzC;IACF;IAEA,OAAOH;AACT;AAEO,SAASQ,qBACdR,MAA0B;IAE1B,OAAOA,OAAOS,cAAc,CAAC;AAC/B","ignoreList":[0]}},
|
||||
{"offset": {"line": 10493, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/lru-cache.ts"],"sourcesContent":["/**\n * Node in the doubly-linked list used for LRU tracking.\n * Each node represents a cache entry with bidirectional pointers.\n */\nclass LRUNode<T> {\n public readonly key: string\n public data: T\n public size: number\n public prev: LRUNode<T> | SentinelNode<T> | null = null\n public next: LRUNode<T> | SentinelNode<T> | null = null\n\n constructor(key: string, data: T, size: number) {\n this.key = key\n this.data = data\n this.size = size\n }\n}\n\n/**\n * Sentinel node used for head/tail boundaries.\n * These nodes don't contain actual cache data but simplify list operations.\n */\nclass SentinelNode<T> {\n public prev: LRUNode<T> | SentinelNode<T> | null = null\n public next: LRUNode<T> | SentinelNode<T> | null = null\n}\n\n/**\n * LRU (Least Recently Used) Cache implementation using a doubly-linked list\n * and hash map for O(1) operations.\n *\n * Algorithm:\n * - Uses a doubly-linked list to maintain access order (most recent at head)\n * - Hash map provides O(1) key-to-node lookup\n * - Sentinel head/tail nodes simplify edge case handling\n * - Size-based eviction supports custom size calculation functions\n *\n * Data Structure Layout:\n * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL\n *\n * Operations:\n * - get(): Move accessed node to head (mark as most recent)\n * - set(): Add new node at head, evict from tail if over capacity\n * - Eviction: Remove least recent node (tail.prev) when size exceeds limit\n */\nexport class LRUCache<T> {\n private readonly cache: Map<string, LRUNode<T>> = new Map()\n private readonly head: SentinelNode<T>\n private readonly tail: SentinelNode<T>\n private totalSize: number = 0\n private readonly maxSize: number\n private readonly calculateSize:\n | ((value: T, key: string) => number)\n | undefined\n private readonly onEvict: ((key: string, value: T) => void) | undefined\n\n constructor(\n maxSize: number,\n calculateSize?: (value: T, key: string) => number,\n onEvict?: (key: string, value: T) => void\n ) {\n this.maxSize = maxSize\n this.calculateSize = calculateSize\n this.onEvict = onEvict\n\n // Create sentinel nodes to simplify doubly-linked list operations\n // HEAD <-> TAIL (empty list)\n this.head = new SentinelNode<T>()\n this.tail = new SentinelNode<T>()\n this.head.next = this.tail\n this.tail.prev = this.head\n }\n\n /**\n * Adds a node immediately after the head (marks as most recently used).\n * Used when inserting new items or when an item is accessed.\n * PRECONDITION: node must be disconnected (prev/next should be null)\n */\n private addToHead(node: LRUNode<T>): void {\n node.prev = this.head\n node.next = this.head.next\n // head.next is always non-null (points to tail or another node)\n this.head.next!.prev = node\n this.head.next = node\n }\n\n /**\n * Removes a node from its current position in the doubly-linked list.\n * Updates the prev/next pointers of adjacent nodes to maintain list integrity.\n * PRECONDITION: node must be connected (prev/next are non-null)\n */\n private removeNode(node: LRUNode<T>): void {\n // Connected nodes always have non-null prev/next\n node.prev!.next = node.next\n node.next!.prev = node.prev\n }\n\n /**\n * Moves an existing node to the head position (marks as most recently used).\n * This is the core LRU operation - accessed items become most recent.\n */\n private moveToHead(node: LRUNode<T>): void {\n this.removeNode(node)\n this.addToHead(node)\n }\n\n /**\n * Removes and returns the least recently used node (the one before tail).\n * This is called during eviction when the cache exceeds capacity.\n * PRECONDITION: cache is not empty (ensured by caller)\n */\n private removeTail(): LRUNode<T> {\n const lastNode = this.tail.prev as LRUNode<T>\n // tail.prev is always non-null and always LRUNode when cache is not empty\n this.removeNode(lastNode)\n return lastNode\n }\n\n /**\n * Sets a key-value pair in the cache.\n * If the key exists, updates the value and moves to head.\n * If new, adds at head and evicts from tail if necessary.\n *\n * Time Complexity:\n * - O(1) for uniform item sizes\n * - O(k) where k is the number of items evicted (can be O(N) for variable sizes)\n */\n public set(key: string, value: T): boolean {\n const size = this.calculateSize?.(value, key) ?? 1\n if (size <= 0) {\n throw new Error(\n `LRUCache: calculateSize returned ${size}, but size must be > 0. ` +\n `Items with size 0 would never be evicted, causing unbounded cache growth.`\n )\n }\n if (size > this.maxSize) {\n console.warn('Single item size exceeds maxSize')\n return false\n }\n\n const existing = this.caLine truncated
|
||||
{"offset": {"line": 10680, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/params-utils.ts"],"sourcesContent":["import type { OpaqueFallbackRouteParams } from '../request/fallback-params'\nimport type { Params } from '../request/params'\n\nexport function hasNonRootStaticParams(\n params: Params,\n rootParams: Params,\n fallbackParams: OpaqueFallbackRouteParams | null | undefined\n) {\n for (const paramName in params) {\n if (\n !Object.hasOwn(rootParams, paramName) &&\n isStaticParam(paramName, fallbackParams)\n ) {\n return true\n }\n }\n return false\n}\n\nfunction isStaticParam(\n paramName: string,\n fallbackParams: OpaqueFallbackRouteParams | null | undefined\n) {\n // NOTE: Assume that undefined fallback params mean that all of the params are static.\n if (!fallbackParams) return true\n // If the param isn't a fallback param, it must be static.\n return !fallbackParams.has(paramName)\n}\n\nexport function allParamsAreRootParams(\n underlyingParams: Params,\n rootParams: Params\n) {\n for (const paramName in underlyingParams) {\n if (!Object.hasOwn(rootParams, paramName)) {\n return false\n }\n }\n return true\n}\n\nexport function isEmptyParams(params: Params): boolean {\n for (const _paramKey in params) {\n return false\n }\n return true\n}\n\nexport function hasFallbackRouteParams(\n underlyingParams: Params,\n fallbackParams: OpaqueFallbackRouteParams | null | undefined\n): boolean {\n if (fallbackParams) {\n for (let key in underlyingParams) {\n if (fallbackParams.has(key)) {\n return true\n }\n }\n }\n return false\n}\n"],"names":["hasNonRootStaticParams","params","rootParams","fallbackParams","paramName","Object","hasOwn","isStaticParam","has","allParamsAreRootParams","underlyingParams","isEmptyParams","_paramKey","hasFallbackRouteParams","key"],"mappings":";;;;;;;;;;AAGO,SAASA,uBACdC,MAAc,EACdC,UAAkB,EAClBC,cAA4D;IAE5D,IAAK,MAAMC,aAAaH,OAAQ;QAC9B,IACE,CAACI,OAAOC,MAAM,CAACJ,YAAYE,cAC3BG,cAAcH,WAAWD,iBACzB;YACA,OAAO;QACT;IACF;IACA,OAAO;AACT;AAEA,SAASI,cACPH,SAAiB,EACjBD,cAA4D;IAE5D,sFAAsF;IACtF,IAAI,CAACA,gBAAgB,OAAO;IAC5B,0DAA0D;IAC1D,OAAO,CAACA,eAAeK,GAAG,CAACJ;AAC7B;AAEO,SAASK,uBACdC,gBAAwB,EACxBR,UAAkB;IAElB,IAAK,MAAME,aAAaM,iBAAkB;QACxC,IAAI,CAACL,OAAOC,MAAM,CAACJ,YAAYE,YAAY;YACzC,OAAO;QACT;IACF;IACA,OAAO;AACT;AAEO,SAASO,cAAcV,MAAc;IAC1C,IAAK,MAAMW,aAAaX,OAAQ;QAC9B,OAAO;IACT;IACA,OAAO;AACT;AAEO,SAASY,uBACdH,gBAAwB,EACxBP,cAA4D;IAE5D,IAAIA,gBAAgB;QAClB,IAAK,IAAIW,OAAOJ,iBAAkB;YAChC,IAAIP,eAAeK,GAAG,CAACM,MAAM;gBAC3B,OAAO;YACT;QACF;IACF;IACA,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 10732, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/patch-fetch.ts"],"sourcesContent":["import type {\n WorkAsyncStorage,\n WorkStore,\n} from '../app-render/work-async-storage.external'\n\nimport { AppRenderSpan, NextNodeServerSpan } from './trace/constants'\nimport {\n isRequestInsightsEnabled,\n recordRequestInsightFetch,\n} from './trace/request-insights'\nimport { getRequestInsightsIdentity } from './trace/request-insights-identity'\nimport { getTracer, SpanKind } from './trace/tracer'\nimport {\n CACHE_ONE_YEAR_SECONDS,\n INFINITE_CACHE,\n NEXT_CACHE_TAG_MAX_ITEMS,\n NEXT_CACHE_TAG_MAX_LENGTH,\n} from '../../lib/constants'\nimport { markCurrentScopeAsDynamic } from '../app-render/dynamic-rendering'\nimport { makeDynamicHangingPromise } from '../dynamic-rendering-utils'\nimport type { FetchMetric } from '../base-http'\nimport { createDedupeFetch } from './dedupe-fetch'\nimport {\n getCacheSignal,\n type RevalidateStore,\n type WorkUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n CachedRouteKind,\n IncrementalCacheKind,\n type CachedFetchData,\n type ServerComponentsHmrCache,\n type SetIncrementalFetchCacheContext,\n} from '../response-cache'\nimport { cloneResponse } from './clone-response'\nimport type { IncrementalCache } from './incremental-cache'\nimport { RenderStage } from '../app-render/staged-rendering'\nimport { encodeCacheTag } from './encode-cache-tag'\nimport type { Span } from './trace/tracer'\n\nconst isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge'\n\ntype Fetcher = typeof fetch\n\ntype PatchedFetcher = Fetcher & {\n readonly __nextPatched: true\n readonly __nextGetStaticStore: () => WorkAsyncStorage\n readonly _nextOriginalFetch: Fetcher\n}\n\nexport const NEXT_PATCH_SYMBOL = Symbol.for('next-patch')\n\nfunction isFetchPatched() {\n return (globalThis as Record<symbol, unknown>)[NEXT_PATCH_SYMBOL] === true\n}\n\nexport function validateRevalidate(\n revalidateVal: unknown,\n route: string\n): undefined | number {\n try {\n let normalizedRevalidate: number | undefined = undefined\n\n if (revalidateVal === false || revalidateVal === Infinity) {\n // Unlike Infinity, INFINITE_CACHE survives JSON serialization (e.g. in\n // the fetch cache).\n normalizedRevalidate = INFINITE_CACHE\n } else if (\n typeof revalidateVal === 'number' &&\n !isNaN(revalidateVal) &&\n revalidateVal > -1\n ) {\n normalizedRevalidate = revalidateVal\n } else if (typeof revalidateVal !== 'undefined') {\n throw new Error(\n `Invalid revalidate value \"${revalidateVal}\" on \"${route}\", must be a non-negative number or false`\n )\n }\n return normalizedRevalidate\n } catch (err: any) {\n // handle client component error from attempting to check revalidate value\n if (err instanceof Error && err.message.includes('Invalid revalidate')) {\n throw err\n }\n return undefined\n }\n}\n\nexport function validateTags(tags: any[], description: string) {\n const validTags: string[] = []\n const invalidTags: Array<{\n tag: any\n reason: string\n }> = []\n\n for (let i = 0; i < tags.length; i++) {\n const tag = tags[i]\n\n if (typeof tag !== 'string') {\n invalidTags.push({ tag, reason: 'invalid type, must be a string' })\n } else if (tag.length > NEXT_CACHE_TAG_MAX_LENGTH) {\n invalidTags.push({\n tag,\n reason: `exceeded max length of ${NEXT_CACHE_TAG_MAX_LENGTH}`,\n })\n } else {\n // Encode so a non-ASCII tag can be safely serialized into the\n // `x-next-cache-tags` HTTP header without tripping Node's header\n // validation. Length is checked on the raw input above.\n validTags.push(encodeCacheTag(tag))\n }\n\n if (validTags.length > NEXT_CACHE_TAG_MAX_ITEMS) {\n console.warn(\n `Warning: exceeded max tag count for ${description}, dropped tags:`,\n tags.slice(i).join(', ')\n )\n break\n }\n }\n\n if (invalidTags.length > 0) {\n console.warn(`Warning: invalid tags passed to ${description}: `)\n\n for (const { tag, reason } of invalidTags) {\n console.log(`tag: \"${tag}\" ${reason}`)\n }\n }\n return validTags\n}\n\nfunction trackFetchMetric(\n workStore: WorkStore,\n span: Span | undefined,\n ctx: Omit<FetchMetric, 'end' | 'idx'>\n) {\n const metric = {\n ...ctx,\n end: performance.timeOrigin + performance.now(),\n idx: workStore.nextFetchId || 0,\n }\n\n span?.setAttributes({\n 'http.status_code': metric.status,\n 'next.fetch.idx': metric.idx,\n 'next.fetch.cache_status': metric.cacheStatus,\n 'next.fetch.cache_reason': metric.cacheReason,\n })\n\n if (isRequestInsightsEnabled()) {\n const requestInsightsIdentity = getRequestInsightsIdentity()\n const requestInsightsRequestId =\n requestInsightsIdentity?.requestIdLine truncated
|
||||
{"offset": {"line": 11750, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/postponed-request-body.ts"],"sourcesContent":["import {\n DEFAULT_MAX_POSTPONED_STATE_SIZE,\n parseMaxPostponedStateSize,\n} from '../../shared/lib/size-limit'\nimport type { SizeLimit } from '../../types'\n\nconst INVALID_MAX_POSTPONED_STATE_SIZE_ERROR_MESSAGE =\n 'maxPostponedStateSize must be a valid number (bytes) or filesize format string (e.g., \"5mb\")'\n\nexport type PostponedRequestBodyChunk = Buffer | Uint8Array | string\n\nexport function getMaxPostponedStateSize(\n configuredMaxPostponedStateSize: SizeLimit | undefined\n): {\n maxPostponedStateSize: SizeLimit\n maxPostponedStateSizeBytes: number\n} {\n const maxPostponedStateSize =\n configuredMaxPostponedStateSize ?? DEFAULT_MAX_POSTPONED_STATE_SIZE\n const maxPostponedStateSizeBytes = parseMaxPostponedStateSize(\n configuredMaxPostponedStateSize\n )\n\n if (maxPostponedStateSizeBytes === undefined) {\n throw new Error(INVALID_MAX_POSTPONED_STATE_SIZE_ERROR_MESSAGE)\n }\n\n return { maxPostponedStateSize, maxPostponedStateSizeBytes }\n}\n\nexport function getPostponedStateExceededErrorMessage(\n maxPostponedStateSize: SizeLimit\n): string {\n return (\n `Postponed state exceeded ${maxPostponedStateSize} limit. ` +\n `To configure the limit, see: https://nextjs.org/docs/app/api-reference/config/next-config-js/max-postponed-state-size`\n )\n}\n\nfunction toBuffer(chunk: PostponedRequestBodyChunk): Buffer {\n return Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)\n}\n\nexport async function readBodyWithSizeLimit(\n body: AsyncIterable<PostponedRequestBodyChunk>,\n maxBodySizeBytes: number\n): Promise<Buffer | null> {\n const chunks: Array<Buffer> = []\n let size = 0\n\n for await (const chunk of body) {\n const buffer = toBuffer(chunk)\n size += buffer.byteLength\n if (size > maxBodySizeBytes) {\n return null\n }\n chunks.push(buffer)\n }\n\n return Buffer.concat(chunks)\n}\n"],"names":["DEFAULT_MAX_POSTPONED_STATE_SIZE","parseMaxPostponedStateSize","INVALID_MAX_POSTPONED_STATE_SIZE_ERROR_MESSAGE","getMaxPostponedStateSize","configuredMaxPostponedStateSize","maxPostponedStateSize","maxPostponedStateSizeBytes","undefined","Error","getPostponedStateExceededErrorMessage","toBuffer","chunk","Buffer","isBuffer","from","readBodyWithSizeLimit","body","maxBodySizeBytes","chunks","size","buffer","byteLength","push","concat"],"mappings":";;;;;;;;AAAA,SACEA,gCAAgC,EAChCC,0BAA0B,QACrB,8BAA6B;;AAGpC,MAAMC,iDACJ;AAIK,SAASC,yBACdC,+BAAsD;IAKtD,MAAMC,wBACJD,mCAAmCJ,yMAAAA;IACrC,MAAMM,iCAA6BL,mMAAAA,EACjCG;IAGF,IAAIE,+BAA+BC,WAAW;QAC5C,MAAM,OAAA,cAAyD,CAAzD,IAAIC,MAAMN,iDAAV,qBAAA;mBAAA;wBAAA;0BAAA;QAAwD;IAChE;IAEA,OAAO;QAAEG;QAAuBC;IAA2B;AAC7D;AAEO,SAASG,sCACdJ,qBAAgC;IAEhC,OACE,CAAC,yBAAyB,EAAEA,sBAAsB,QAAQ,CAAC,GAC3D,CAAC,qHAAqH,CAAC;AAE3H;AAEA,SAASK,SAASC,KAAgC;IAChD,OAAOC,OAAOC,QAAQ,CAACF,SAASA,QAAQC,OAAOE,IAAI,CAACH;AACtD;AAEO,eAAeI,sBACpBC,IAA8C,EAC9CC,gBAAwB;IAExB,MAAMC,SAAwB,EAAE;IAChC,IAAIC,OAAO;IAEX,WAAW,MAAMR,SAASK,KAAM;QAC9B,MAAMI,SAASV,SAASC;QACxBQ,QAAQC,OAAOC,UAAU;QACzB,IAAIF,OAAOF,kBAAkB;YAC3B,OAAO;QACT;QACAC,OAAOI,IAAI,CAACF;IACd;IAEA,OAAOR,OAAOW,MAAM,CAACL;AACvB","ignoreList":[0]}},
|
||||
{"offset": {"line": 11799, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/router-utils/is-postpone.ts"],"sourcesContent":["const REACT_POSTPONE_TYPE: symbol = Symbol.for('react.postpone')\n\nexport function isPostpone(error: any): boolean {\n return (\n typeof error === 'object' &&\n error !== null &&\n error.$$typeof === REACT_POSTPONE_TYPE\n )\n}\n"],"names":["REACT_POSTPONE_TYPE","Symbol","for","isPostpone","error","$$typeof"],"mappings":";;;;AAAA,MAAMA,sBAA8BC,OAAOC,GAAG,CAAC;AAExC,SAASC,WAAWC,KAAU;IACnC,OACE,OAAOA,UAAU,YACjBA,UAAU,QACVA,MAAMC,QAAQ,KAAKL;AAEvB","ignoreList":[0]}},
|
||||
{"offset": {"line": 11811, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/server-action-request-meta.ts"],"sourcesContent":["import type { IncomingMessage } from 'http'\nimport type { BaseNextRequest } from '../base-http'\nimport type { NextRequest } from '../web/exports'\nimport { ACTION_HEADER } from '../../client/components/app-router-headers'\n\nexport function getServerActionRequestMetadata(\n req: IncomingMessage | BaseNextRequest | NextRequest\n): {\n actionId: string | null\n isURLEncodedAction: boolean\n isMultipartAction: boolean\n isFetchAction: boolean\n isPossibleServerAction: boolean\n} {\n let actionId: string | null\n let contentType: string | null\n\n if (req.headers instanceof Headers) {\n actionId = req.headers.get(ACTION_HEADER) ?? null\n contentType = req.headers.get('content-type')\n } else {\n actionId = (req.headers[ACTION_HEADER] as string) ?? null\n contentType = req.headers['content-type'] ?? null\n }\n\n // We don't actually support URL encoded actions, and the action handler will bail out if it sees one.\n // But we still want it to flow through to the action handler, to prevent changes in behavior when a regular\n // page component tries to handle a POST.\n const isURLEncodedAction = Boolean(\n req.method === 'POST' && contentType === 'application/x-www-form-urlencoded'\n )\n const isMultipartAction = Boolean(\n req.method === 'POST' && contentType?.startsWith('multipart/form-data')\n )\n const isFetchAction = Boolean(\n actionId !== undefined &&\n typeof actionId === 'string' &&\n req.method === 'POST'\n )\n\n const isPossibleServerAction = Boolean(\n isFetchAction || isURLEncodedAction || isMultipartAction\n )\n\n return {\n actionId,\n isURLEncodedAction,\n isMultipartAction,\n isFetchAction,\n isPossibleServerAction,\n }\n}\n\nexport function getIsPossibleServerAction(\n req: IncomingMessage | BaseNextRequest | NextRequest\n): boolean {\n return getServerActionRequestMetadata(req).isPossibleServerAction\n}\n"],"names":["ACTION_HEADER","getServerActionRequestMetadata","req","actionId","contentType","headers","Headers","get","isURLEncodedAction","Boolean","method","isMultipartAction","startsWith","isFetchAction","undefined","isPossibleServerAction","getIsPossibleServerAction"],"mappings":";;;;;;AAGA,SAASA,aAAa,QAAQ,6CAA4C;;AAEnE,SAASC,+BACdC,GAAoD;IAQpD,IAAIC;IACJ,IAAIC;IAEJ,IAAIF,IAAIG,OAAO,YAAYC,SAAS;QAClCH,WAAWD,IAAIG,OAAO,CAACE,GAAG,CAACP,wMAAAA,KAAkB;QAC7CI,cAAcF,IAAIG,OAAO,CAACE,GAAG,CAAC;IAChC,OAAO;QACLJ,WAAYD,IAAIG,OAAO,CAACL,wMAAAA,CAAc,IAAe;QACrDI,cAAcF,IAAIG,OAAO,CAAC,eAAe,IAAI;IAC/C;IAEA,sGAAsG;IACtG,4GAA4G;IAC5G,yCAAyC;IACzC,MAAMG,qBAAqBC,QACzBP,IAAIQ,MAAM,KAAK,UAAUN,gBAAgB;IAE3C,MAAMO,oBAAoBF,QACxBP,IAAIQ,MAAM,KAAK,UAAA,CAAUN,eAAAA,OAAAA,KAAAA,IAAAA,YAAaQ,UAAU,CAAC,sBAAA;IAEnD,MAAMC,gBAAgBJ,QACpBN,aAAaW,aACX,OAAOX,aAAa,YACpBD,IAAIQ,MAAM,KAAK;IAGnB,MAAMK,yBAAyBN,QAC7BI,iBAAiBL,sBAAsBG;IAGzC,OAAO;QACLR;QACAK;QACAG;QACAE;QACAE;IACF;AACF;AAEO,SAASC,0BACdd,GAAoD;IAEpD,OAAOD,+BAA+BC,KAAKa,sBAAsB;AACnE","ignoreList":[0]}},
|
||||
{"offset": {"line": 11851, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/source-maps.ts"],"sourcesContent":["import type { SourceMap } from 'module'\nimport { LRUCache } from './lru-cache'\n\nfunction noSourceMap(): SourceMap | undefined {\n return undefined\n}\n\n// Edge runtime does not implement `module`\nconst findSourceMap =\n process.env.NEXT_RUNTIME === 'edge'\n ? noSourceMap\n : (require('module') as typeof import('module')).findSourceMap\n\n/**\n * https://tc39.es/source-map/#index-map\n */\ninterface IndexSourceMapSection {\n offset: {\n line: number\n column: number\n }\n map: BasicSourceMapPayload\n}\n\n// TODO(veil): Upstream types\n/** https://tc39.es/ecma426/#sec-index-source-map */\ninterface IndexSourceMap {\n version: number\n file: string\n sections: IndexSourceMapSection[]\n}\n\n/** https://tc39.es/ecma426/#sec-source-map-format */\nexport interface BasicSourceMapPayload {\n version: number\n // TODO: Move to https://github.com/jridgewell/sourcemaps which is actively maintained\n /** WARNING: `file` is optional. */\n file: string\n sourceRoot?: string\n // TODO: Move to https://github.com/jridgewell/sourcemaps which is actively maintained\n /** WARNING: `sources[number]` can be `null`. */\n sources: Array<string>\n names: Array<string>\n mappings: string\n ignoreList?: number[]\n}\n\nexport type ModernSourceMapPayload = BasicSourceMapPayload | IndexSourceMap\n\n// `SourceMap#payload` deep-clones the payload on every access — expensive\n// for large chunk maps — so the clone is shared per `SourceMap` instance,\n// which Node.js memoizes per script.\nconst sourceMapPayloads = new WeakMap<SourceMap, ModernSourceMapPayload>()\n\n/**\n * Like `module.findSourceMap`, but returns the source map's payload without\n * cloning it on every call. Callers must not mutate the returned payload.\n * Throws like `module.findSourceMap` does on invalid source maps.\n */\nexport function findSourceMapPayload(\n sourceURL: string\n): ModernSourceMapPayload | undefined {\n const sourceMap = findSourceMap(sourceURL)\n if (sourceMap === undefined) {\n return undefined\n }\n let payload = sourceMapPayloads.get(sourceMap)\n if (payload === undefined) {\n payload = sourceMap.payload as ModernSourceMapPayload\n sourceMapPayloads.set(sourceMap, payload)\n }\n return payload\n}\n\nexport function sourceMapIgnoreListsEverything(\n sourceMap: BasicSourceMapPayload\n): boolean {\n return (\n sourceMap.ignoreList !== undefined &&\n sourceMap.sources.length === sourceMap.ignoreList.length\n )\n}\n\n/**\n * Finds the sourcemap payload applicable to a given frame.\n * Equal to the input unless an Index Source Map is used.\n * @param line0 - The line number of the frame, 0-based.\n * @param column0 - The column number of the frame, 0-based.\n */\nexport function findApplicableSourceMapPayload(\n line0: number,\n column0: number,\n payload: ModernSourceMapPayload\n): BasicSourceMapPayload | undefined {\n if ('sections' in payload) {\n if (payload.sections.length === 0) {\n return undefined\n }\n\n // Sections must not overlap and must be sorted: https://tc39.es/source-map/#section-object\n // Therefore the last section that has an offset less than or equal to the frame is the applicable one.\n const sections = payload.sections\n let left = 0\n let right = sections.length - 1\n let result: IndexSourceMapSection | null = null\n\n while (left <= right) {\n // fast Math.floor\n const middle = ~~((left + right) / 2)\n const section = sections[middle]\n const offset = section.offset\n\n if (\n offset.line < line0 ||\n (offset.line === line0 && offset.column <= column0)\n ) {\n result = section\n left = middle + 1\n } else {\n right = middle - 1\n }\n }\n\n return result === null ? undefined : result.map\n } else {\n return payload\n }\n}\n\nconst didWarnAboutInvalidSourceMapDEV = new Set<string>()\n\nexport function filterStackFrameDEV(\n sourceURL: string,\n functionName: string,\n line1: number,\n column1: number\n): boolean {\n if (sourceURL === '') {\n // The default implementation filters out <anonymous> stack frames\n // but we want to retain them because current Server Components and\n // built-in Components in parent stacks don't have source location.\n // Filter out frames that show up in Promises to get good names in React's\n // Server Request track until we come up with a better heuristic.\n return functionName !== 'new Promise'\n }\n if (sourceURL.startsWith('node:') || sourceURL.includes('node_modules')) {\n return false\n }\n try {\n // Node.js loads source maps eagerly so this call is cheap.\n // TODO: ESM sourcemaps are O(1) but CommonJS sourcemaps are O(Number of CJS modules).\n // Make sure this doesn't adversely affect Line truncated
|
||||
{"offset": {"line": 12066, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/streaming-metadata.ts"],"sourcesContent":["import { HTML_LIMITED_BOT_UA_RE_STRING } from '../../shared/lib/router/utils/is-bot'\n\nlet cachedPattern: string | undefined\nlet cachedRegex: RegExp | undefined\n\nexport function shouldServeStreamingMetadata(\n userAgent: string,\n htmlLimitedBots: string | undefined\n): boolean {\n const pattern = htmlLimitedBots || HTML_LIMITED_BOT_UA_RE_STRING\n if (cachedPattern !== pattern) {\n cachedPattern = pattern\n cachedRegex = new RegExp(pattern, 'i')\n }\n // Only block metadata for HTML-limited bots\n if (userAgent && cachedRegex!.test(userAgent)) {\n return false\n }\n return true\n}\n"],"names":["HTML_LIMITED_BOT_UA_RE_STRING","cachedPattern","cachedRegex","shouldServeStreamingMetadata","userAgent","htmlLimitedBots","pattern","RegExp","test"],"mappings":";;;;AAAA,SAASA,6BAA6B,QAAQ,uCAAsC;;AAEpF,IAAIC;AACJ,IAAIC;AAEG,SAASC,6BACdC,SAAiB,EACjBC,eAAmC;IAEnC,MAAMC,UAAUD,mBAAmBL,qOAAAA;IACnC,IAAIC,kBAAkBK,SAAS;QAC7BL,gBAAgBK;QAChBJ,cAAc,IAAIK,OAAOD,SAAS;IACpC;IACA,4CAA4C;IAC5C,IAAIF,aAAaF,YAAaM,IAAI,CAACJ,YAAY;QAC7C,OAAO;IACT;IACA,OAAO;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 12090, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/constants.ts"],"sourcesContent":["/**\n * Contains predefined constants for the trace span name in next/server.\n *\n * Currently, next/server/tracer is internal implementation only for tracking\n * next.js's implementation only with known span names defined here.\n **/\n\n// eslint typescript has a bug with TS enums\n\nenum BaseServerSpan {\n handleRequest = 'BaseServer.handleRequest',\n run = 'BaseServer.run',\n pipe = 'BaseServer.pipe',\n getStaticHTML = 'BaseServer.getStaticHTML',\n render = 'BaseServer.render',\n renderToResponseWithComponents = 'BaseServer.renderToResponseWithComponents',\n renderToResponse = 'BaseServer.renderToResponse',\n renderToHTML = 'BaseServer.renderToHTML',\n renderError = 'BaseServer.renderError',\n renderErrorToResponse = 'BaseServer.renderErrorToResponse',\n renderErrorToHTML = 'BaseServer.renderErrorToHTML',\n render404 = 'BaseServer.render404',\n}\n\nenum LoadComponentsSpan {\n loadDefaultErrorComponents = 'LoadComponents.loadDefaultErrorComponents',\n loadComponents = 'LoadComponents.loadComponents',\n}\n\nenum NextServerSpan {\n getRequestHandler = 'NextServer.getRequestHandler',\n getRequestHandlerWithMetadata = 'NextServer.getRequestHandlerWithMetadata',\n getServer = 'NextServer.getServer',\n getServerRequestHandler = 'NextServer.getServerRequestHandler',\n createServer = 'createServer.createServer',\n}\n\nenum NextNodeServerSpan {\n compression = 'NextNodeServer.compression',\n getBuildId = 'NextNodeServer.getBuildId',\n createComponentTree = 'NextNodeServer.createComponentTree',\n clientComponentLoading = 'NextNodeServer.clientComponentLoading',\n getLayoutOrPageModule = 'NextNodeServer.getLayoutOrPageModule',\n generateStaticRoutes = 'NextNodeServer.generateStaticRoutes',\n generateFsStaticRoutes = 'NextNodeServer.generateFsStaticRoutes',\n generatePublicRoutes = 'NextNodeServer.generatePublicRoutes',\n generateImageRoutes = 'NextNodeServer.generateImageRoutes.route',\n sendRenderResult = 'NextNodeServer.sendRenderResult',\n proxyRequest = 'NextNodeServer.proxyRequest',\n runApi = 'NextNodeServer.runApi',\n render = 'NextNodeServer.render',\n renderHTML = 'NextNodeServer.renderHTML',\n imageOptimizer = 'NextNodeServer.imageOptimizer',\n getPagePath = 'NextNodeServer.getPagePath',\n getRoutesManifest = 'NextNodeServer.getRoutesManifest',\n findPageComponents = 'NextNodeServer.findPageComponents',\n getFontManifest = 'NextNodeServer.getFontManifest',\n getServerComponentManifest = 'NextNodeServer.getServerComponentManifest',\n getRequestHandler = 'NextNodeServer.getRequestHandler',\n renderToHTML = 'NextNodeServer.renderToHTML',\n renderError = 'NextNodeServer.renderError',\n renderErrorToHTML = 'NextNodeServer.renderErrorToHTML',\n render404 = 'NextNodeServer.render404',\n startResponse = 'NextNodeServer.startResponse',\n\n // nested inner span, does not require parent scope name\n route = 'route',\n onProxyReq = 'onProxyReq',\n apiResolver = 'apiResolver',\n internalFetch = 'internalFetch',\n}\n\nenum StartServerSpan {\n startServer = 'startServer.startServer',\n}\n\nenum RenderSpan {\n getServerSideProps = 'Render.getServerSideProps',\n getStaticProps = 'Render.getStaticProps',\n renderToString = 'Render.renderToString',\n renderDocument = 'Render.renderDocument',\n createBodyResult = 'Render.createBodyResult',\n}\n\nenum AppRenderSpan {\n renderToString = 'AppRender.renderToString',\n renderToReadableStream = 'AppRender.renderToReadableStream',\n getBodyResult = 'AppRender.getBodyResult',\n fetch = 'AppRender.fetch',\n waitShellReady = 'AppRender.waitShellReady',\n renderToNodeFizzStream = 'AppRender.renderToNodeFizzStream',\n instantInsights = 'AppRender.instantInsights',\n instantInsightsPrepareValidation = 'AppRender.instantInsights.prepareValidation',\n instantInsightsRunValidation = 'AppRender.instantInsights.runValidation',\n}\n\nenum RouterSpan {\n executeRoute = 'Router.executeRoute',\n}\n\nenum NodeSpan {\n runHandler = 'Node.runHandler',\n}\n\nenum AppRouteRouteHandlersSpan {\n runHandler = 'AppRouteRouteHandlers.runHandler',\n}\n\nenum ResolveMetadataSpan {\n generateMetadata = 'ResolveMetadata.generateMetadata',\n generateViewport = 'ResolveMetadata.generateViewport',\n}\n\nenum MiddlewareSpan {\n execute = 'Middleware.execute',\n}\n\ntype SpanTypes =\n | `${BaseServerSpan}`\n | `${LoadComponentsSpan}`\n | `${NextServerSpan}`\n | `${StartServerSpan}`\n | `${NextNodeServerSpan}`\n | `${RenderSpan}`\n | `${RouterSpan}`\n | `${AppRenderSpan}`\n | `${NodeSpan}`\n | `${AppRouteRouteHandlersSpan}`\n | `${ResolveMetadataSpan}`\n | `${MiddlewareSpan}`\n\n// This list is used to filter out spans that are not relevant to the user\nexport const NextVanillaSpanAllowlist = new Set([\n MiddlewareSpan.execute,\n BaseServerSpan.hLine truncated
|
||||
{"offset": {"line": 12261, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/request-insights-identity.ts"],"sourcesContent":["import type { AsyncLocalStorage } from 'async_hooks'\nimport type { RequestInsightKind } from '../../../next-devtools/shared/request-insights'\nimport { createAsyncLocalStorage } from '../../app-render/async-local-storage'\n\nexport type RequestInsightsIdentity = {\n requestId: string\n kind?: RequestInsightKind\n htmlRequestId: string\n url: string | undefined\n}\n\n// This storage covers the part of BaseServer request handling that runs before\n// App Render creates workAsyncStorage. Once available, workStore remains the\n// primary identity source for locally recorded spans.\nconst REQUEST_INSIGHTS_IDENTITY_STORAGE_KEY = Symbol.for(\n '@next/request-insights-identity-storage'\n)\n\nfunction getRequestInsightsIdentityStorage(): AsyncLocalStorage<RequestInsightsIdentity> {\n const globalStore = globalThis as typeof globalThis & {\n [REQUEST_INSIGHTS_IDENTITY_STORAGE_KEY]?: AsyncLocalStorage<RequestInsightsIdentity>\n }\n\n return (globalStore[REQUEST_INSIGHTS_IDENTITY_STORAGE_KEY] ??=\n createAsyncLocalStorage())\n}\n\nexport function runWithRequestInsightsIdentity<T>(\n identity: RequestInsightsIdentity,\n fn: () => T\n): T {\n return getRequestInsightsIdentityStorage().run(identity, fn)\n}\n\nexport function getRequestInsightsIdentity():\n | RequestInsightsIdentity\n | undefined {\n return getRequestInsightsIdentityStorage().getStore()\n}\n"],"names":["createAsyncLocalStorage","REQUEST_INSIGHTS_IDENTITY_STORAGE_KEY","Symbol","for","getRequestInsightsIdentityStorage","globalStore","globalThis","runWithRequestInsightsIdentity","identity","fn","run","getRequestInsightsIdentity","getStore"],"mappings":";;;;;;AAEA,SAASA,uBAAuB,QAAQ,uCAAsC;;AAS9E,+EAA+E;AAC/E,6EAA6E;AAC7E,sDAAsD;AACtD,MAAMC,wCAAwCC,OAAOC,GAAG,CACtD;AAGF,SAASC;IACP,MAAMC,cAAcC;IAIpB,OAAQD,WAAW,CAACJ,sCAAsC,SACxDD,sNAAAA;AACJ;AAEO,SAASO,+BACdC,QAAiC,EACjCC,EAAW;IAEX,OAAOL,oCAAoCM,GAAG,CAACF,UAAUC;AAC3D;AAEO,SAASE;IAGd,OAAOP,oCAAoCQ,QAAQ;AACrD","ignoreList":[0]}},
|
||||
{"offset": {"line": 12287, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/request-insights.ts"],"sourcesContent":["import type { AttributeValue } from 'next/dist/compiled/@opentelemetry/api'\nimport type {\n RequestInsight,\n RequestInsightFetch,\n RequestInsightsSnapshot,\n} from '../../../next-devtools/shared/request-insights'\nimport type { RequestInsightKind } from '../../../shared/lib/request-insights'\nimport {\n getRequestInsightKey,\n getRequestInsightKind,\n} from '../../../shared/lib/request-insights'\nimport type { SpanStoreRecord } from './span-store'\nexport { isRequestInsightsEnabled } from './span-store'\n\nconst MAX_REQUEST_INSIGHTS = 100\nconst REQUEST_INSIGHTS_STORE_KEY = Symbol.for('@next/request-insights-store')\nconst CLIENT_COMPONENT_LOADING_SPAN_TYPE =\n 'NextNodeServer.clientComponentLoading'\n\ntype RequestInsightsListener = (insight: RequestInsight) => void\ntype RequestInsightIdentity = {\n requestId?: string\n kind?: RequestInsightKind\n htmlRequestId?: string\n route?: string\n url?: string\n}\n\nconst REDACTED_VALUE = 'redacted'\nconst SAFE_SPAN_ATTRIBUTE_KEYS = new Set([\n 'http.method',\n 'http.route',\n 'http.status_code',\n 'http.url',\n 'net.peer.name',\n 'net.peer.port',\n 'next.fetch.cache_reason',\n 'next.fetch.cache_status',\n 'next.fetch.idx',\n 'next.route',\n 'next.rsc',\n 'next.segment',\n 'next.span_category',\n 'next.span_name',\n 'next.span_type',\n])\nconst SENSITIVE_PARAM_NAME_RE =\n /(?:^|[_-])(?:access[_-]?token|api[_-]?key|auth|authorization|code|cookie|credential|id[_-]?token|jwt|key|password|secret|session|signature|sig|token)(?:$|[_-])/i\n\nclass InMemoryRequestInsightsStore {\n private readonly requests = new Map<string, RequestInsight>()\n private readonly requestTimings = new Map<\n string,\n { startTime: number; durationMs: number }\n >()\n private readonly requestOrder: string[] = []\n private readonly listeners = new Set<RequestInsightsListener>()\n\n recordSpan(span: SpanStoreRecord): void {\n if (!span.requestId) {\n return\n }\n\n const insight = this.getOrCreateRequest(\n {\n requestId: span.requestId,\n kind: span.requestInsightKind,\n htmlRequestId: span.htmlRequestId,\n route: span.route,\n url: span.url,\n },\n span.startTime ?? span.timestamp\n )\n\n const spanStartTime = span.startTime ?? span.timestamp\n insight.htmlRequestId = span.htmlRequestId ?? insight.htmlRequestId\n insight.route = insight.route ?? span.route\n insight.url = insight.url ?? sanitizeUrl(span.url)\n this.updateTiming(\n insight,\n spanStartTime,\n span.durationMs,\n span.attributes?.['next.span_type'] === 'BaseServer.handleRequest'\n )\n insight.status =\n insight.status === 'error' || span.status === 'error'\n ? 'error'\n : span.status === 'ok'\n ? 'ok'\n : insight.status\n\n insight.spans.push({\n name: span.name,\n startTime: spanStartTime,\n durationMs: span.durationMs,\n status: span.status,\n traceId: span.traceId,\n spanId: span.spanId,\n parentSpanId: span.parentSpanId,\n attributes: sanitizeSpanAttributes(span.attributes),\n links: sanitizeSpanLinks(span.links),\n events: sanitizeSpanEvents(span.events),\n error: span.error,\n })\n\n const fetch = getFetchInsight(span)\n if (fetch) {\n this.recordFetchForInsight(insight, fetch)\n }\n\n this.notify(insight)\n }\n\n recordFetch(identity: RequestInsightIdentity, fetch: RequestInsightFetch) {\n if (!identity.requestId) {\n return\n }\n\n const fetchStartTime = fetch.startTime ?? getCurrentTimestamp()\n const insight = this.getOrCreateRequest(identity, fetchStartTime)\n this.updateTiming(insight, fetchStartTime, fetch.durationMs, false)\n this.recordFetchForInsight(insight, sanitizeFetchInsight(fetch))\n this.notify(insight)\n }\n\n getSnapshot(): RequestInsightsSnapshot {\n return {\n requests: this.requestOrder\n .map((insightKey) => this.requests.get(insightKey))\n .filter((request): request is RequestInsight => request !== undefined),\n }\n }\n\n subscribe(listener: RequestInsightsListener): () => void {\n this.listeners.add(listener)\n return () => {\n this.listeners.delete(listener)\n }\n }\n\n clear(): void {\n this.requests.clear()\n this.requestTimings.clear()\n this.requestOrder.length = 0\n }\n\n private updateTiming(\n insight: RequestInsight,\n startTime: number,\n durationMs: number | undefined,\n isRequestSpan: boolean\n ): void {\n const insightKey = getRequestInsightKey(insight)\n if (isRequestSpan && durationMs !== undefined) {\n const requestTiming = { startTime, durationMs }\n this.requestTimings.set(insightKey, requestTiming)\n insight.starLine truncated
|
||||
{"offset": {"line": 12572, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/span-store.ts"],"sourcesContent":["import type { AttributeValue } from 'next/dist/compiled/@opentelemetry/api'\nimport type { RequestInsightKind } from '../../../next-devtools/shared/request-insights'\n\nexport type SpanStoreAttributes = Record<string, AttributeValue>\n\nexport type SpanStoreLink = {\n traceId: string\n spanId: string\n attributes?: SpanStoreAttributes\n}\n\nexport type SpanStoreEvent = {\n name: string\n timestamp: number\n attributes?: SpanStoreAttributes\n}\n\nexport type SpanStoreRecord = {\n name: string\n timestamp: number\n startTime?: number\n durationMs?: number\n status?: 'ok' | 'error'\n traceId?: string\n spanId?: string\n parentSpanId?: string\n requestId?: string\n requestInsightKind?: RequestInsightKind\n htmlRequestId?: string\n route?: string\n url?: string\n attributes?: SpanStoreAttributes\n links?: SpanStoreLink[]\n events?: SpanStoreEvent[]\n error?: {\n type?: string\n message?: string\n }\n}\n\ntype SpanRecorderForTest = (span: SpanStoreRecord) => void\n\nlet spanRecorderForTest: SpanRecorderForTest | undefined\n\nexport function recordSpan(record: Omit<SpanStoreRecord, 'timestamp'>): void {\n if (!isLocalSpanRecordingEnabled()) {\n return\n }\n\n const spanRecord: SpanStoreRecord = {\n timestamp: getCurrentTimestamp(),\n ...record,\n }\n\n spanRecorderForTest?.(spanRecord)\n\n if (isRequestInsightsEnabled() && spanRecord.requestId) {\n const { recordRequestInsightSpan } =\n require('./request-insights') as typeof import('./request-insights')\n recordRequestInsightSpan(spanRecord)\n }\n}\n\nexport function setSpanRecorderForTest(\n recorder: SpanRecorderForTest | undefined\n): void {\n spanRecorderForTest = recorder\n}\n\nexport function isLocalSpanRecordingEnabled(): boolean {\n if (!process.env.__NEXT_DEV_SERVER) {\n return false\n }\n\n return spanRecorderForTest !== undefined || isRequestInsightsEnabled()\n}\n\nexport function isRequestInsightsEnabled(): boolean {\n if (!process.env.__NEXT_DEV_SERVER) {\n return false\n }\n\n const value = process.env.__NEXT_REQUEST_INSIGHTS\n return isEnabledEnvValue(value)\n}\n\nfunction isEnabledEnvValue(value: string | undefined): boolean {\n return value === '1' || value === 'true' || (value as unknown) === true\n}\n\nfunction getCurrentTimestamp(): number {\n return performance.timeOrigin + performance.now()\n}\n"],"names":["spanRecorderForTest","recordSpan","record","isLocalSpanRecordingEnabled","spanRecord","timestamp","getCurrentTimestamp","isRequestInsightsEnabled","requestId","recordRequestInsightSpan","require","setSpanRecorderForTest","recorder","process","env","__NEXT_DEV_SERVER","undefined","value","__NEXT_REQUEST_INSIGHTS","isEnabledEnvValue","performance","timeOrigin","now"],"mappings":";;;;;;;;;;AA0CA,IAAIA;AAEG,SAASC,WAAWC,MAA0C;IACnE,IAAI,CAACC,+BAA+B;QAClC;IACF;IAEA,MAAMC,aAA8B;QAClCC,WAAWC;QACX,GAAGJ,MAAM;IACX;IAEAF,uBAAAA,OAAAA,KAAAA,IAAAA,oBAAsBI;IAEtB,IAAIG,8BAA8BH,WAAWI,SAAS,EAAE;;AAK1D;AAEO,SAASG,uBACdC,QAAyC;IAEzCZ,sBAAsBY;AACxB;AAEO,SAAST;IACd,IAAI,CAACU,QAAQC,GAAG,CAACC,iBAAiB,EAAE;;IAIpC,OAAOf,wBAAwBgB,aAAaT;AAC9C;AAEO,SAASA;IACd,IAAI,CAACM,QAAQC,GAAG,CAACC,iBAAiB,EAAE;;IAIpC,MAAME,QAAQJ,QAAQC,GAAG,CAACI,uBAAuB;IACjD,OAAOC,kBAAkBF;AAC3B;AAEA,SAASE,kBAAkBF,KAAyB;IAClD,OAAOA,UAAU,OAAOA,UAAU,UAAWA,UAAsB;AACrE;AAEA,SAASX;IACP,OAAOc,YAAYC,UAAU,GAAGD,YAAYE,GAAG;AACjD","ignoreList":[0]}},
|
||||
{"offset": {"line": 12619, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/lib/trace/tracer.ts"],"sourcesContent":["import type { FetchEventResult } from '../../web/types'\nimport type { TextMapSetter } from '@opentelemetry/api'\nimport type { SpanTypes } from './constants'\nimport type { LocalSpanRecorder } from './local-span-recorder'\nimport { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'\n\nimport type {\n Context,\n ContextAPI,\n Span,\n SpanOptions,\n Tracer,\n AttributeValue,\n TextMapGetter,\n} from 'next/dist/compiled/@opentelemetry/api'\nimport { isThenable } from '../../../shared/lib/is-thenable'\n\nconst NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX\nconst LOCAL_SPAN_RECORDER_KEY = Symbol.for('@next/local-span-recorder')\n\ntype GlobalWithLocalSpanRecorder = typeof globalThis & {\n [LOCAL_SPAN_RECORDER_KEY]?: LocalSpanRecorder\n}\n\nlet api: typeof import('next/dist/compiled/@opentelemetry/api')\n\nfunction getLocalSpanRecorder() {\n if (process.env.__NEXT_DEV_SERVER) {\n return (globalThis as GlobalWithLocalSpanRecorder)[LOCAL_SPAN_RECORDER_KEY]\n } else {\n return undefined\n }\n}\n\n// we want to allow users to use their own version of @opentelemetry/api if they\n// want to, so we try to require it first, and if it fails we fall back to the\n// version that is bundled with Next.js\n// this is because @opentelemetry/api has to be synced with the version of\n// @opentelemetry/tracing that is used, and we don't want to force users to use\n// the version that is bundled with Next.js.\n// the API is ~stable, so this should be fine\nif (process.env.NEXT_RUNTIME === 'edge') {\n api = require('@opentelemetry/api') as typeof import('@opentelemetry/api')\n} else {\n try {\n api = require('@opentelemetry/api') as typeof import('@opentelemetry/api')\n } catch (err) {\n api =\n require('next/dist/compiled/@opentelemetry/api') as typeof import('next/dist/compiled/@opentelemetry/api')\n }\n}\n\nconst { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } =\n api\n\nexport class BubbledError extends Error {\n constructor(\n public readonly bubble?: boolean,\n public readonly result?: FetchEventResult\n ) {\n super()\n }\n}\n\nexport function isBubbledError(error: unknown): error is BubbledError {\n if (typeof error !== 'object' || error === null) return false\n return error instanceof BubbledError\n}\n\nconst closeSpanWithError = (span: Span, error?: Error) => {\n if (isBubbledError(error) && error.bubble) {\n span.setAttribute('next.bubble', true)\n } else {\n if (error) {\n span.recordException(error)\n span.setAttribute('error.type', error.name)\n }\n span.setStatus({ code: SpanStatusCode.ERROR, message: error?.message })\n }\n span.end()\n}\n\ntype TracerSpanOptions = Omit<SpanOptions, 'attributes'> & {\n parentSpan?: Span\n spanName?: string\n attributes?: Partial<Record<AttributeNames, AttributeValue | undefined>>\n hideSpan?: boolean\n}\n\ninterface NextTracer {\n getContext(): ContextAPI\n\n /**\n * Instruments a function by automatically creating a span activated on its\n * scope.\n *\n * The span will automatically be finished when one of these conditions is\n * met:\n *\n * * The function returns a promise, in which case the span will finish when\n * the promise is resolved or rejected.\n * * The function takes a callback as its second parameter, in which case the\n * span will finish when that callback is called.\n * * The function doesn't accept a callback and doesn't return a promise, in\n * which case the span will finish at the end of the function execution.\n *\n */\n trace<T>(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise<T>\n ): Promise<T>\n trace<T>(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => T\n ): T\n trace<T>(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise<T>\n ): Promise<T>\n trace<T>(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: (span?: Span, done?: (error?: Error) => any) => T\n ): T\n\n /**\n * Wrap a function to automatically create a span activated on its\n * scope when it's called.\n *\n * The span will automatically be finished when one of these conditions is\n * met:\n *\n * * The function returns a promise, in which case the span will finish when\n * the promise is resolved or rejected.\n * * The function takes a callback as its last parameter, in which case the\n * span will finish when that callback is called.\n * * The function doesn't accept a callback and doesn't return a promise, in\n * which case the span will finish at the end of the function execution.\n */\n wrap<T = (...args: Array<any>) => any>(type: SpanTypes, fn: T): T\n wrap<Line truncated
|
||||
{"offset": {"line": 12992, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/pipe-readable.ts"],"sourcesContent":["import type { ServerResponse } from 'node:http'\nimport type { Readable } from 'node:stream'\n\nimport {\n ResponseAbortedName,\n createAbortController,\n} from './web/spec-extension/adapters/next-request'\nimport { DetachedPromise } from '../lib/detached-promise'\nimport { getTracer } from './lib/trace/tracer'\nimport { NextNodeServerSpan } from './lib/trace/constants'\nimport { getClientComponentLoaderMetrics } from './client-component-renderer-logger'\n\nexport function isAbortError(e: any): e is Error & { name: 'AbortError' } {\n return e?.name === 'AbortError' || e?.name === ResponseAbortedName\n}\n\nconst HAS_CLIENT_COMPONENT_METRICS_ENABLED =\n 'performance' in globalThis && process.env.NEXT_OTEL_PERFORMANCE_PREFIX\n\nfunction createWriterFromResponse(\n res: ServerResponse,\n waitUntilForEnd?: Promise<unknown>\n): WritableStream<Uint8Array> {\n let started = false\n\n // Create a promise that will resolve once the response has drained. See\n // https://nodejs.org/api/stream.html#stream_event_drain\n let drained = new DetachedPromise<void>()\n function onDrain() {\n drained.resolve()\n }\n res.on('drain', onDrain)\n\n // If the finish event fires, it means we shouldn't block and wait for the\n // drain event.\n res.once('close', () => {\n res.off('drain', onDrain)\n drained.resolve()\n })\n\n // Create a promise that will resolve once the response has finished. See\n // https://nodejs.org/api/http.html#event-finish_1\n const finished = new DetachedPromise<void>()\n res.once('finish', () => {\n finished.resolve()\n })\n\n // Create a writable stream that will write to the response.\n return new WritableStream<Uint8Array>({\n write: async (chunk) => {\n // You'd think we'd want to use `start` instead of placing this in `write`\n // but this ensures that we don't actually flush the headers until we've\n // started writing chunks.\n if (!started) {\n started = true\n\n if (HAS_CLIENT_COMPONENT_METRICS_ENABLED) {\n const metrics = getClientComponentLoaderMetrics()\n if (metrics) {\n performance.measure(\n `${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,\n {\n start: metrics.clientComponentLoadStart,\n end:\n metrics.clientComponentLoadStart +\n metrics.clientComponentLoadTimes,\n }\n )\n }\n }\n\n res.flushHeaders()\n getTracer().trace(\n NextNodeServerSpan.startResponse,\n {\n spanName: 'start response',\n },\n () => undefined\n )\n }\n\n try {\n const ok = res.write(chunk)\n\n // Added by the `compression` middleware, this is a function that will\n // flush the partially-compressed response to the client.\n if ('flush' in res && typeof res.flush === 'function') {\n res.flush()\n }\n\n // If the write returns false, it means there's some backpressure, so\n // wait until it's streamed before continuing.\n if (!ok) {\n await drained.promise\n\n // Reset the drained promise so that we can wait for the next drain event.\n drained = new DetachedPromise<void>()\n }\n } catch (err) {\n res.end()\n throw new Error('failed to write chunk to response', { cause: err })\n }\n },\n abort: (err) => {\n if (res.writableFinished) return\n\n res.destroy(err)\n },\n close: async () => {\n // if a waitUntil promise was passed, wait for it to resolve before\n // ending the response.\n if (waitUntilForEnd) {\n await waitUntilForEnd\n }\n\n if (res.writableFinished) return\n\n res.end()\n return finished.promise\n },\n })\n}\n\nexport async function pipeToNodeResponse(\n readable: ReadableStream<Uint8Array>,\n res: ServerResponse,\n waitUntilForEnd?: Promise<unknown>\n) {\n try {\n // If the response has already errored, then just return now.\n const { errored, destroyed } = res\n if (errored || destroyed) return\n\n // Create a new AbortController so that we can abort the readable if the\n // client disconnects.\n const controller = createAbortController(res)\n\n const writer = createWriterFromResponse(res, waitUntilForEnd)\n\n await readable.pipeTo(writer, { signal: controller.signal })\n } catch (err: any) {\n // If this isn't related to an abort error, re-throw it.\n if (isAbortError(err)) return\n\n throw new Error('failed to pipe response', { cause: err })\n }\n}\n\nexport async function pipeNodeReadableToNodeResponse(\n readable: Readable,\n res: ServerResponse,\n waitUntilForEndLine truncated
|
||||
{"offset": {"line": 13193, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/render-result.ts"],"sourcesContent":["import type { OutgoingHttpHeaders, ServerResponse } from 'http'\nimport type { Readable } from 'stream'\nimport type { CacheControl } from './lib/cache-control'\nimport type { FetchMetrics } from './base-http'\nimport type { PrefetchHints } from '../shared/lib/app-router-types'\n\nimport {\n chainStreams,\n streamFromBuffer,\n streamFromString,\n streamToString,\n} from './stream-utils/node-web-streams-helper'\nimport {\n isAbortError,\n pipeToNodeResponse,\n pipeNodeReadableToNodeResponse,\n} from './pipe-readable'\nimport type { RenderResumeDataCache } from './resume-data-cache/resume-data-cache'\nimport { InvariantError } from '../shared/lib/invariant-error'\nimport type {\n HTML_CONTENT_TYPE_HEADER,\n JSON_CONTENT_TYPE_HEADER,\n TEXT_PLAIN_CONTENT_TYPE_HEADER,\n} from '../lib/constants'\nimport type { RSC_CONTENT_TYPE_HEADER } from '../client/components/app-router-headers'\n\ntype ContentTypeOption =\n | typeof RSC_CONTENT_TYPE_HEADER // For App Page RSC responses\n | typeof HTML_CONTENT_TYPE_HEADER // For App Page, Pages HTML responses\n | typeof JSON_CONTENT_TYPE_HEADER // For API routes, Next.js data requests\n | typeof TEXT_PLAIN_CONTENT_TYPE_HEADER // For simplified errors\n\nexport type AppPageRenderResultMetadata = {\n flightData?: Buffer\n cacheControl?: CacheControl\n staticBailoutInfo?: {\n stack?: string\n description?: string\n }\n\n /**\n * The postponed state if the render had postponed and needs to be resumed.\n */\n postponed?: string\n\n /**\n * Whether the prerender left any UI pending in a Suspense boundary. This is\n * reported directly by React's prerender result before Next.js resumes\n * client-only boundaries.\n */\n hasPendingUi?: boolean\n\n /**\n * The headers to set on the response that were added by the render.\n */\n headers?: OutgoingHttpHeaders\n statusCode?: number\n fetchTags?: string\n fetchMetrics?: FetchMetrics\n\n segmentData?: Map<string, Buffer>\n\n /**\n * Per-route prefetch hints computed at build time (e.g. segment inlining\n * decisions based on gzip sizes). Written to prefetch-hints.json by the\n * build pipeline.\n */\n prefetchHints?: PrefetchHints\n\n /**\n * In development, the resume data cache is warmed up before the render. This\n * is attached to the metadata so that it can be used during the render. When\n * prerendering, the filled resume data cache is also attached to the metadata\n * so that it can be used when prerendering matching fallback shells.\n */\n renderResumeDataCache?: RenderResumeDataCache\n}\n\nexport type PagesRenderResultMetadata = {\n pageData?: any\n cacheControl?: CacheControl\n isNotFound?: boolean\n isRedirect?: boolean\n}\n\nexport type StaticRenderResultMetadata = {}\n\nexport type RenderResultMetadata = AppPageRenderResultMetadata &\n PagesRenderResultMetadata &\n StaticRenderResultMetadata\n\nexport type RenderResultResponse =\n | ReadableStream<Uint8Array>[]\n | ReadableStream<Uint8Array>\n | Readable\n | string\n | Buffer\n | null\n\nexport type RenderResultOptions<\n Metadata extends RenderResultMetadata = RenderResultMetadata,\n> = {\n contentType: ContentTypeOption | null\n waitUntil?: Promise<unknown>\n metadata: Metadata\n}\n\nfunction isNodeReadable(value: unknown): value is Readable {\n return (\n value !== null &&\n typeof value === 'object' &&\n typeof (value as Record<string, unknown>).pipe === 'function' &&\n typeof (value as Record<string, unknown>).on === 'function' &&\n !(value instanceof ReadableStream)\n )\n}\n\nexport default class RenderResult<\n Metadata extends RenderResultMetadata = RenderResultMetadata,\n> {\n /**\n * The detected content type for the response. This is used to set the\n * `Content-Type` header.\n */\n public readonly contentType: ContentTypeOption | null\n\n /**\n * The metadata for the response. This is used to set the revalidation times\n * and other metadata.\n */\n public readonly metadata: Readonly<Metadata>\n\n /**\n * The response itself. This can be a string, a stream, or null. If it's a\n * string, then it's a static response. If it's a stream, then it's a\n * dynamic response. If it's null, then the response was not found or was\n * already sent.\n */\n private response: RenderResultResponse\n\n /**\n * A render result that represents an empty response. This is used to\n * represent a response that was not found or was already sent.\n */\n public static readonly EMPTY = new RenderResult<StaticRenderResultMetadata>(\n null,\n { metadata: {}, contentType: null }\n )\n\n /**\n * Creates a new RenderResult instance from a static response.\n *\n * @param value the static response value\n * @param contentType the content type of the response\n Line truncated
|
||||
{"offset": {"line": 13428, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request-meta.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'http'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { UrlWithParsedQuery } from 'url'\nimport type { BaseNextRequest } from './base-http'\nimport type { CloneableBody } from './body-streams'\nimport type { RouteMatch } from './route-matches/route-match'\nimport type { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\nimport type {\n ResponseCacheEntry,\n ServerComponentsHmrCache,\n} from './response-cache'\nimport type { PagesDevOverlayBridgeType } from '../next-devtools/userspace/pages/pages-dev-overlay-setup'\nimport type { OpaqueFallbackRouteParams } from './request/fallback-params'\nimport type { IncrementalCache } from './lib/incremental-cache'\nimport type { RevalidateFn } from './lib/router-utils/router-server-context'\nimport type { NextRequest } from './web/exports'\n\n// FIXME: (wyattjoh) this is a temporary solution to allow us to pass data between bundled modules\nexport const NEXT_REQUEST_META = Symbol.for('NextInternalRequestMeta')\n\nexport type NextIncomingMessage = (\n | BaseNextRequest\n | IncomingMessage\n | NextRequest\n) & {\n [NEXT_REQUEST_META]?: RequestMeta\n}\n\n/**\n * The callback function to call when a response cache entry was generated or\n * looked up in the cache. When it returns true, the server assumes that the\n * handler has already responded to the request and will not do so itself.\n */\nexport type OnCacheEntryHandler = (\n /**\n * The response cache entry that was generated or looked up in the cache.\n */\n cacheEntry: ResponseCacheEntry,\n\n /**\n * The request metadata.\n */\n requestMeta: {\n /**\n * The URL that was used to make the request.\n */\n url: string | undefined\n }\n) => Promise<boolean | void> | boolean | void\n\nexport interface RequestMeta {\n /**\n * The query that was used to make the request.\n */\n initQuery?: ParsedUrlQuery\n\n /**\n * The URL that was used to make the request.\n */\n initURL?: string\n\n /**\n * The protocol that was used to make the request.\n */\n initProtocol?: string\n\n /**\n * The body that was read from the request. This is used to allow the body to\n * be read multiple times.\n */\n clonableBody?: CloneableBody\n\n /**\n * True when the request matched a locale domain that was configured in the\n * next.config.js file.\n */\n isLocaleDomain?: boolean\n\n /**\n * True when the request had locale information stripped from the pathname\n * part of the URL.\n */\n didStripLocale?: boolean\n\n /**\n * If the request had its URL rewritten, this is the pathname it was rewritten\n * to (not a full URL, just the pathname).\n */\n rewrittenPathname?: string\n\n /**\n * The resolved pathname for the request. Dynamic route params are\n * interpolated, the pathname is decoded, and the trailing slash is removed.\n */\n resolvedPathname?: string\n\n /**\n * The cookies that were added by middleware and were added to the response.\n */\n middlewareCookie?: string[]\n\n /**\n * The match on the request for a given route.\n */\n match?: RouteMatch\n\n /**\n * The incremental cache to use for the request.\n */\n incrementalCache?: IncrementalCache\n\n /**\n * The server components HMR cache, only for dev.\n */\n serverComponentsHmrCache?: ServerComponentsHmrCache\n\n /**\n * The hash of the most recent server component change (dev only), set by the\n * router-server from the hot-reloader. Included in `\"use cache\"` cache keys\n * so that cached entries are revalidated after an edit, for every client,\n * regardless of whether it runs the HMR client.\n */\n hmrRefreshHash?: string\n\n /**\n * Equals the segment path that was used for the prefetch RSC request.\n */\n segmentPrefetchRSCRequest?: string\n\n /**\n * True when the request is for the prefetch flight data.\n */\n isPrefetchRSCRequest?: true\n\n /**\n * True when the request is for the flight data.\n */\n isRSCRequest?: true\n\n /**\n * A search param set by the Next.js client when performing RSC requests.\n * Because some CDNs do not vary their cache entries on our custom headers,\n * this search param represents a hash of the header values. For any cached\n * RSC request, we should verify that the hash matches before responding.\n * Otherwise this can lead to cache poisoning.\n * TODO: Consider not using custom request headers at all, and instead encode\n * everything into the search param.\n */\n cacheBustingSearchParam?: string\n\n /**\n * True when the request is for the `/_next/data` route using the pages\n * router.\n */\n isNextDataReq?: true\n\n /**\n * Postponed state to use for resumption. When absent, the request is not a\n *Line truncated
|
||||
{"offset": {"line": 13464, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/fallback-params.ts"],"sourcesContent":["import { resolveRouteParamsFromTree } from '../../build/static-paths/utils'\nimport type { FallbackRouteParam } from '../../build/static-paths/types'\nimport type { DynamicParamTypesShort } from '../../shared/lib/app-router-types'\nimport { dynamicParamTypes } from '../app-render/get-short-dynamic-param-type'\nimport type AppPageRouteModule from '../route-modules/app-page/module'\nimport { parseNormalizedAppRoute } from '../../shared/lib/router/routes/app'\nimport { extractPathnameRouteParamSegmentsFromLoaderTree } from '../../build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree'\nimport { getParamProperties } from '../../shared/lib/router/utils/get-segment-param'\n\nexport type OpaqueFallbackRouteParamValue = [\n /**\n * The search value of the fallback route param. This is the opaque key\n * that will be used to replace the dynamic param in the postponed state.\n */\n searchValue: string,\n\n /**\n * The dynamic param type of the fallback route param. This is the type of\n * the dynamic param that will be used to replace the dynamic param in the\n * postponed state.\n */\n dynamicParamType: DynamicParamTypesShort,\n]\n\n/**\n * An opaque fallback route params object. This is used to store the fallback\n * route params in a way that is not easily accessible to the client.\n */\nexport type OpaqueFallbackRouteParams = ReadonlyMap<\n string,\n OpaqueFallbackRouteParamValue\n>\n\n/**\n * The entries of the opaque fallback route params object.\n *\n * @param key the key of the fallback route param\n * @param value the value of the fallback route param\n */\nexport type OpaqueFallbackRouteParamEntries =\n ReturnType<OpaqueFallbackRouteParams['entries']> extends MapIterator<\n [infer K, infer V]\n >\n ? ReadonlyArray<[K, V]>\n : never\n\n/**\n * Creates an opaque fallback route params object from the fallback route params.\n *\n * @param fallbackRouteParams the fallback route params\n * @returns the opaque fallback route params\n */\nexport function createOpaqueFallbackRouteParams(\n fallbackRouteParams: readonly FallbackRouteParam[]\n): OpaqueFallbackRouteParams | null {\n // If there are no fallback route params, we can return early.\n if (fallbackRouteParams.length === 0) return null\n\n // As we're creating unique keys for each of the dynamic route params, we only\n // need to generate a unique ID once per request because each of the keys will\n // be also be unique.\n const uniqueID = Math.random().toString(16).slice(2)\n\n const keys = new Map<string, OpaqueFallbackRouteParamValue>()\n\n // Generate a unique key for the fallback route param, if this key is found\n // in the static output, it represents a bug in cache components.\n for (const { paramName, paramType } of fallbackRouteParams) {\n keys.set(paramName, [\n `%%drp:${paramName}:${uniqueID}%%`,\n dynamicParamTypes[paramType],\n ])\n }\n\n return keys\n}\n\nexport function buildDynamicSegmentPlaceholder(\n param: Pick<FallbackRouteParam, 'paramName' | 'paramType'>\n): string {\n const { repeat, optional } = getParamProperties(param.paramType)\n\n if (optional) {\n return `[[...${param.paramName}]]`\n }\n\n if (repeat) {\n return `[...${param.paramName}]`\n }\n\n return `[${param.paramName}]`\n}\n\nexport function getPlaceholderFallbackRouteParams(\n params: Record<string, undefined | string | string[]> | undefined,\n fallbackRouteParams: readonly FallbackRouteParam[]\n): FallbackRouteParam[] {\n return fallbackRouteParams.filter((param) => {\n const placeholder = buildDynamicSegmentPlaceholder(param)\n const value = params?.[param.paramName]\n\n return (\n value === placeholder ||\n (Array.isArray(value) && value.length === 1 && value[0] === placeholder)\n )\n })\n}\n\n/**\n * Gets the fallback route params for a given page. This is an expensive\n * operation because it requires parsing the loader tree to extract the fallback\n * route params.\n *\n * @param page the page\n * @param routeModule the route module\n * @returns the opaque fallback route params\n */\nexport function getFallbackRouteParams(\n page: string,\n routeModule: AppPageRouteModule\n) {\n const route = parseNormalizedAppRoute(page)\n\n // Extract the pathname-contributing segments from the loader tree. This\n // mirrors the logic in buildAppStaticPaths where we determine which segments\n // actually contribute to the pathname.\n const { pathnameRouteParamSegments, params } =\n extractPathnameRouteParamSegmentsFromLoaderTree(\n routeModule.userland.loaderTree,\n route\n )\n\n // Create fallback route params for the pathname segments.\n const fallbackRouteParams: FallbackRouteParam[] =\n pathnameRouteParamSegments.map(({ paramName, paramType })Line truncated
|
||||
{"offset": {"line": 13546, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/params.ts"],"sourcesContent":["import {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport type { OpaqueFallbackRouteParams } from './fallback-params'\nimport type { VaryParamsAccumulator } from '../app-render/vary-params'\nimport {\n createVaryingParams,\n getMetadataVaryParamsAccumulator,\n} from '../app-render/vary-params'\n\nimport { ReflectAdapter } from '../web/spec-extension/adapters/reflect'\nimport {\n throwToInterruptStaticGeneration,\n postponeWithTracking,\n} from '../app-render/dynamic-rendering'\n\nimport {\n workUnitAsyncStorage,\n type PrerenderStorePPR,\n type PrerenderStoreLegacy,\n type StaticPrerenderStoreModern,\n type StaticPrerenderStore,\n throwInvariantForMissingStore,\n type PrerenderStoreModernRuntime,\n type RequestStore,\n type ValidationStoreClient,\n} from '../app-render/work-unit-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport {\n makeDevtoolsIOAwarePromise,\n makeFallbackParamsHangingPromise,\n makePromiseFromTrigger,\n trackFallbackParamsAccessed,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport { dynamicAccessAsyncStorage } from '../app-render/dynamic-access-async-storage.external'\nimport {\n isEmptyParams,\n hasFallbackRouteParams,\n allParamsAreRootParams,\n} from '../lib/params-utils'\n\nexport type ParamValue = string | Array<string> | undefined\nexport type Params = Record<string, ParamValue>\n\nexport function createParamsFromClient(\n underlyingParams: Params\n): Promise<Params> {\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Expected workStore to be initialized')\n }\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n // Client params don't need additional vary tracking because by the\n // time they reach the client, the access would have already been\n // tracked by the server.\n const varyParamsAccumulator = null\n return createStaticPrerenderParams(\n underlyingParams,\n null,\n workStore,\n workUnitStore,\n varyParamsAccumulator\n )\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw new InvariantError(\n 'createParamsFromClient should not be called in cache contexts.'\n )\n case 'prerender-runtime':\n throw new InvariantError(\n 'createParamsFromClient should not be called in a runtime prerender.'\n )\n case 'generate-static-params':\n throw new InvariantError(\n 'createParamsFromClient should not be called inside generateStaticParams.'\n )\n case 'validation-client': {\n if (workUnitStore.validationSamples) {\n return createClientParamsInInstantValidation(\n underlyingParams,\n workStore,\n workUnitStore.validationSamples\n )\n }\n return makeUntrackedParams(underlyingParams)\n }\n case 'request': {\n if (workUnitStore.validationSamples) {\n return createClientParamsInInstantValidation(\n underlyingParams,\n workStore,\n workUnitStore.validationSamples\n )\n }\n if (process.env.NODE_ENV === 'development') {\n const fallbackParams = workUnitStore.fallbackParams\n const userspaceParams = underlyingParams\n return createRenderParamsInDev(\n underlyingParams,\n userspaceParams,\n fallbackParams,\n workStore,\n workUnitStore\n )\n } else {\n return createRenderParamsInProd(underlyingParams)\n }\n }\n default:\n workUnitStore satisfies never\n }\n }\n throwInvariantForMissingStore()\n}\n\n// generateMetadata always runs in RSC context so it is equivalent to a Server Page Component\nexport type CreateServerParamsForMetadata = typeof createServerParamsForMetadata\nexport function createServerParamsForMetadata(\n underlyingParams: Params,\n optionalCatchAllParamName: string | null\n): Promise<Params> {\n const metadataVaryParamsAccumulator = getMetadataVaryParamsAccumulator()\n return createServerParamsForServerSegment(\n underlyingParams,\n optionalCatchAllParamName,\n metadataVaryParamsAccumulator\n )\n}\n\n// Line truncated
|
||||
{"offset": {"line": 14164, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/pathname.ts"],"sourcesContent":["import {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\n\nimport {\n postponeWithTracking,\n type DynamicTrackingState,\n} from '../app-render/dynamic-rendering'\n\nimport {\n throwInvariantForMissingStore,\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStoreModernServer,\n type PrerenderStorePPR,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n makeDynamicHangingPromise,\n makeFallbackParamsHangingPromise,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport function createServerPathnameForMetadata(\n underlyingPathname: string\n): Promise<string> {\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Expected workStore to be initialized')\n }\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderPathname(\n underlyingPathname,\n workStore,\n workUnitStore\n )\n }\n case 'prerender-client':\n case 'validation-client':\n throw new InvariantError(\n 'createServerPathnameForMetadata should not be called in client contexts.'\n )\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw new InvariantError(\n 'createServerPathnameForMetadata should not be called in cache contexts.'\n )\n case 'generate-static-params':\n throw new InvariantError(\n 'createServerPathnameForMetadata should not be called inside generateStaticParams.'\n )\n case 'prerender-runtime': {\n // TODO(app-shells): whether or not this is included in the shell\n // should depend on whether this route has params.\n // if there's no params, it can be included.\n // for now, we defensively exclude it to match the earlier pessimistic\n // behavior of always resolving in the runtime stage\n // (i.e. assuming that we have non-static params in the pathname)\n const { stagedRendering } = workUnitStore\n if (stagedRendering) {\n const pathnameStage = RENDER_STAGES_BY_DATA_KIND.runtimeLinkData\n return stagedRendering.delayUntilStage(\n pathnameStage,\n undefined,\n underlyingPathname\n )\n } else {\n if (workUnitStore.isSessionShell) {\n return makeDynamicHangingPromise<string>(\n workUnitStore.renderSignal,\n workStore.route,\n '`pathname`'\n )\n } else {\n return createRenderPathname(underlyingPathname)\n }\n }\n }\n case 'request':\n // TODO(app-shells): this should be delayed if there's non-static params\n return createRenderPathname(underlyingPathname)\n default:\n workUnitStore satisfies never\n }\n }\n throwInvariantForMissingStore()\n}\n\nfunction createPrerenderPathname(\n underlyingPathname: string,\n workStore: WorkStore,\n prerenderStore:\n | PrerenderStoreLegacy\n | PrerenderStorePPR\n | PrerenderStoreModernServer\n): Promise<string> {\n switch (prerenderStore.type) {\n case 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // The pathname only hangs when there are fallback params, and a\n // concrete (ISR-upgraded) prerender resolves it — so this access is\n // fallback-param data for the static-prefetch hint.\n return makeFallbackParamsHangingPromise<string>(\n prerenderStore.renderSignal,\n workStore.route,\n '`pathname`',\n prerenderStore\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return makeErroringPathname(workStore, prerenderStore.dynamicTracking)\n }\n break\n }\n case 'prerender-legacy':\n break\n default:\n prerenderStore satisfies never\n }\n\n // We don't have any fallback params so we have an entirely static safe params object\n return Promise.resolve(underlyingPathname)\n}\n\nfunction makeErroringPathname<T>(\n workStore: WorkStore,\n dynamicTracking: null | DynamicTrackingState\n): Promise<T> {\n let reject: null | ((reason: unknown) => void) = null\n const promise = new Promise<T>((_, re) => {\n reject = re\n })\n\n const originalThen = promise.thenLine truncated
|
||||
{"offset": {"line": 14306, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/search-params.ts"],"sourcesContent":["import {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport type { VaryParamsAccumulator } from '../app-render/vary-params'\nimport {\n createVaryingSearchParams,\n getMetadataVaryParamsAccumulator,\n} from '../app-render/vary-params'\n\nimport { ReflectAdapter } from '../web/spec-extension/adapters/reflect'\nimport {\n throwToInterruptStaticGeneration,\n postponeWithTracking,\n annotateDynamicAccess,\n} from '../app-render/dynamic-rendering'\nimport { dynamicAccessAsyncStorage } from '../app-render/dynamic-access-async-storage.external'\n\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type PrerenderStoreModern,\n type PrerenderStoreModernRuntime,\n type StaticPrerenderStore,\n throwInvariantForMissingStore,\n type RequestStore,\n type ValidationStoreClient,\n} from '../app-render/work-unit-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n makeDevtoolsIOAwarePromise,\n makeRuntimeHangingPromise,\n makePromiseFromTrigger,\n trackRuntimeDataAccessed,\n RENDER_STAGES_BY_DATA_KIND,\n} from '../dynamic-rendering-utils'\nimport { createDedupedByCallsiteServerErrorLoggerDev } from '../create-deduped-by-callsite-server-error-logger'\nimport {\n describeStringPropertyAccess,\n describeHasCheckingStringProperty,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport {\n throwWithStaticGenerationBailoutErrorWithDynamicError,\n throwForSearchParamsAccessInUseCache,\n} from './utils'\n\nexport type SearchParams = { [key: string]: string | string[] | undefined }\n\nexport function createSearchParamsFromClient(\n underlyingSearchParams: SearchParams\n): Promise<SearchParams> {\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Expected workStore to be initialized')\n }\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createStaticPrerenderSearchParams(workStore, workUnitStore)\n case 'prerender-runtime':\n throw new InvariantError(\n 'createSearchParamsFromClient should not be called in a runtime prerender.'\n )\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw new InvariantError(\n 'createSearchParamsFromClient should not be called in cache contexts.'\n )\n case 'generate-static-params':\n throw new InvariantError(\n 'createSearchParamsFromClient should not be called inside generateStaticParams.'\n )\n case 'validation-client': {\n if (workUnitStore.validationSamples) {\n return createClientSearchParamsInValidation(\n underlyingSearchParams,\n workStore,\n workUnitStore\n )\n }\n return makeUntrackedSearchParams(underlyingSearchParams)\n }\n case 'request':\n return createRenderSearchParams(\n underlyingSearchParams,\n workStore,\n workUnitStore\n )\n default:\n workUnitStore satisfies never\n }\n }\n throwInvariantForMissingStore()\n}\n\n// generateMetadata always runs in RSC context so it is equivalent to a Server Page Component\nexport function createServerSearchParamsForMetadata(\n underlyingSearchParams: SearchParams\n): Promise<SearchParams> {\n const metadataVaryParamsAccumulator = getMetadataVaryParamsAccumulator()\n return createServerSearchParamsForServerPage(\n underlyingSearchParams,\n metadataVaryParamsAccumulator\n )\n}\n\nexport function createServerSearchParamsForServerPage(\n underlyingSearchParams: SearchParams,\n varyParamsAccumulator: VaryParamsAccumulator | null\n): Promise<SearchParams> {\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Expected workStore to be initialized')\n }\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createStaticPrerenderSearchParams(workStore, workUnitStore)\n case 'validation-client':\n throw new InvariantError(\n 'createServerSearchParamsForServerPage should not be called in a client validation.'\n )\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n throw new InvariantError(\n 'createServerSearchParamsForServerPage should not be called in cache contexts.Line truncated
|
||||
{"offset": {"line": 14875, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type { WorkUnitStore } from '../app-render/work-unit-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutErrorWithDynamicError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n}\n\nexport function throwForSearchParamsAccessInUseCache(\n workStore: WorkStore,\n constructorOpt: Function\n): never {\n const error = new Error(\n `Route ${workStore.route} used \\`searchParams\\` inside \"use cache\". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \\`searchParams\\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n Error.captureStackTrace(error, constructorOpt)\n workStore.invalidDynamicUsageError ??= error\n\n throw error\n}\n\nexport function isRequestApiAllowedInCurrentPhase(\n workUnitStore: WorkUnitStore\n): boolean {\n switch (workUnitStore.phase) {\n case 'action':\n case 'render': {\n // The request is still in progress. The API may be disallowed for other reasons,\n // but not because of phase.\n return true\n }\n case 'after': {\n // The request has finished.\n\n // If we're in a Route Handler or a Server Action,\n // request APIs can be called everywhere, even in after().\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore && (actionStore.isAppRoute || actionStore.isAction)) {\n return true\n }\n\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n if (afterTaskStore) {\n // We're in an `after` callback. Request APIs are callable if\n // the `after()` call happened in an action phase:\n // - in a Route Handler\n // - in a Server Action's body (but not the render after)\n //\n // TODO(after): Is it even possible to have `phase === 'action'` but no `actionStore`?\n // We should revisit this setup and simplify this.\n return afterTaskStore.rootTaskSpawnPhase === 'action'\n }\n\n // Otherwise, we must be in a page, in the `after` phase.\n // We don't allow calling request APIs here because we'd miss\n // them during prerendering and wouldn't know that the page is dynamic.\n return false\n }\n }\n}\n"],"names":["StaticGenBailoutError","actionAsyncStorage","afterTaskAsyncStorage","throwWithStaticGenerationBailoutErrorWithDynamicError","route","expression","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestApiAllowedInCurrentPhase","workUnitStore","phase","actionStore","getStore","isAppRoute","isAction","afterTaskStore","rootTaskSpawnPhase"],"mappings":";;;;;;;;AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;AACzF,SAASC,kBAAkB,QAAQ,8CAA6C;AAChF,SAASC,qBAAqB,QAAQ,kDAAiD;;;;AAIhF,SAASC,sDACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIL,uNAAAA,CACR,CAAC,MAAM,EAAEI,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASC,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUH,KAAK,CAAC,2XAA2X,CAAC,GADzY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAM,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEO,SAASI,kCACdC,aAA4B;IAE5B,OAAQA,cAAcC,KAAK;QACzB,KAAK;QACL,KAAK;YAAU;gBACb,iFAAiF;gBACjF,4BAA4B;gBAC5B,OAAO;YACT;QACA,KAAK;YAAS;gBACZ,4BAA4B;gBAE5B,kDAAkD;gBAClD,0DAA0D;gBAC1D,MAAMC,cAAcf,6RAAAA,CAAmBgB,QAAQ;gBAC/C,IAAID,eAAgBA,CAAAA,YAAYE,UAAU,IAAIF,YAAYG,QAAO,GAAI;oBACnE,OAAO;gBACT;gBAEA,MAAMC,iBAAiBlB,8SAAAA,CAAsBe,QAAQ;gBACrD,IAAIG,gBAAgB;oBAClB,6DAA6D;oBAC7D,kDAAkD;oBAClD,uBAAuB;oBACvB,yDAAyD;oBACzD,EAAE;oBACF,sFAAsF;oBACtF,kDAAkD;oBAClD,OAAOA,eAAeC,kBAAkB,KAAK;gBAC/C;gBAEA,yDAAyD;gBACzD,6DAA6D;gBAC7D,uEAAuE;gBACvE,OAAO;YACT;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 14946, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/response-cache/index.ts"],"sourcesContent":["import type {\n ResponseCacheEntry,\n ResponseGenerator,\n ResponseCacheBase,\n IncrementalResponseCacheEntry,\n IncrementalResponseCache,\n} from './types'\n\nimport { Batcher } from '../../lib/batcher'\nimport { LRUCache } from '../lib/lru-cache'\nimport { warnOnce } from '../../build/output/log'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport {\n fromResponseCacheEntry,\n routeKindToIncrementalCacheKind,\n toResponseCacheEntry,\n} from './utils'\nimport type { RouteKind } from '../route-kind'\n\n/**\n * Parses an environment variable as a positive integer, returning the fallback\n * if the value is missing, not a number, or not positive.\n */\nfunction parsePositiveInt(\n envValue: string | undefined,\n fallback: number\n): number {\n if (!envValue) return fallback\n const parsed = parseInt(envValue, 10)\n return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback\n}\n\n/**\n * Default TTL (in milliseconds) for minimal mode response cache entries.\n * Used for cache hit validation as a fallback for providers that don't\n * send the x-invocation-id header yet.\n *\n * 10 seconds chosen because:\n * - Long enough to dedupe rapid successive requests (e.g., page + data)\n * - Short enough to not serve stale data across unrelated requests\n *\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_TTL` environment variable.\n */\nconst DEFAULT_TTL_MS = parsePositiveInt(\n process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL,\n 10_000\n)\n\n/**\n * Default maximum number of entries in the response cache.\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE` environment variable.\n */\nconst DEFAULT_MAX_SIZE = parsePositiveInt(\n process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE,\n 150\n)\n\n/**\n * Separator used in compound cache keys to join pathname and invocationID.\n * Using null byte (\\0) since it cannot appear in valid URL paths or UUIDs.\n */\nconst KEY_SEPARATOR = '\\0'\n\n/**\n * Sentinel value used for TTL-based cache entries (when invocationID is undefined).\n * Chosen to be a clearly reserved marker for internal cache keys.\n */\nconst TTL_SENTINEL = '__ttl_sentinel__'\n\n/**\n * Entry stored in the LRU cache.\n */\ntype CacheEntry = {\n entry: IncrementalResponseCacheEntry | null\n /**\n * TTL expiration timestamp in milliseconds. Used as a fallback for\n * cache hit validation when providers don't send x-invocation-id.\n * Memory pressure is managed by LRU eviction rather than timers.\n */\n expiresAt: number\n}\n\n/**\n * Creates a compound cache key from pathname and invocationID.\n */\nfunction createCacheKey(\n pathname: string,\n invocationID: string | undefined\n): string {\n return `${pathname}${KEY_SEPARATOR}${invocationID ?? TTL_SENTINEL}`\n}\n\n/**\n * Extracts the invocationID from a compound cache key.\n * Returns undefined if the key used TTL_SENTINEL.\n */\nfunction extractInvocationID(compoundKey: string): string | undefined {\n const separatorIndex = compoundKey.lastIndexOf(KEY_SEPARATOR)\n if (separatorIndex === -1) return undefined\n\n const invocationID = compoundKey.slice(separatorIndex + 1)\n return invocationID === TTL_SENTINEL ? undefined : invocationID\n}\n\nexport * from './types'\n\nexport default class ResponseCache implements ResponseCacheBase {\n private readonly getBatcher = Batcher.create<\n { key: string; isOnDemandRevalidate: boolean },\n IncrementalResponseCacheEntry | null,\n string\n >({\n // Ensure on-demand revalidate doesn't block normal requests, it should be\n // safe to run an on-demand revalidate for the same key as a normal request.\n cacheKeyFn: ({ key, isOnDemandRevalidate }) =>\n `${key}-${isOnDemandRevalidate ? '1' : '0'}`,\n // We wait to do any async work until after we've added our promise to\n // `pendingResponses` to ensure that any any other calls will reuse the\n // same promise until we've fully finished our work.\n schedulerFn: scheduleOnNextTick,\n })\n\n private readonly revalidateBatcher = Batcher.create<\n string,\n IncrementalResponseCacheEntry | null\n >({\n // We wait to do any async work until after we've added our promise to\n // `pendingResponses` to ensure that any any other calls will reuse the\n // same promise until we've fully finished our work.\n schedulerFn: scheduleOnNextTick,\n })\n\n /**\n * LRU cache for minimal mode using compound keys (pathname + invocationID).\n * This allows multiple invocations to cache the same pathname without\n * overwriting each other's entries.\n */\n private readonly cache: LRUCache<CacheEntry>\n\n /**\n * Set of invocation IDs that have had cache entries evicted.\n * Used to detect when the cache size may be too small.\n * Bounded to prevent memory growth.\n */\n privLine truncated
|
||||
{"offset": {"line": 15256, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/response-cache/types.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\nimport type RenderResult from '../render-result'\nimport type { CacheControl, Revalidate } from '../lib/cache-control'\nimport type { RouteKind } from '../route-kind'\n\nexport interface ResponseCacheBase {\n get(\n key: string | null,\n responseGenerator: ResponseGenerator,\n context: {\n isOnDemandRevalidate?: boolean\n isPrefetch?: boolean\n incrementalCache: IncrementalCache\n /**\n * This is a hint to the cache to help it determine what kind of route\n * this is so it knows where to look up the cache entry from. If not\n * provided it will test the filesystem to check.\n */\n routeKind: RouteKind\n\n /**\n * True if this is a fallback request.\n */\n isFallback?: boolean\n\n /**\n * True if the route is enabled for PPR.\n */\n isRoutePPREnabled?: boolean\n }\n ): Promise<ResponseCacheEntry | null>\n}\n\n// The server components HMR cache might store other data as well in the future,\n// at which point this should be refactored to a discriminated union type.\nexport interface ServerComponentsHmrCache {\n get(key: string): CachedFetchData | undefined\n set(key: string, data: CachedFetchData): void\n}\n\nexport type CachedFetchData = {\n headers: Record<string, string>\n body: string\n url: string\n status?: number\n}\n\nexport const enum CachedRouteKind {\n APP_PAGE = 'APP_PAGE',\n APP_ROUTE = 'APP_ROUTE',\n PAGES = 'PAGES',\n FETCH = 'FETCH',\n REDIRECT = 'REDIRECT',\n IMAGE = 'IMAGE',\n}\n\nexport interface CachedFetchValue {\n kind: CachedRouteKind.FETCH\n data: CachedFetchData\n // tags are only present with file-system-cache\n // fetch cache stores tags outside of cache entry\n tags?: string[]\n revalidate: number\n}\n\nexport interface CachedRedirectValue {\n kind: CachedRouteKind.REDIRECT\n props: Object\n}\n\nexport interface CachedAppPageValue {\n kind: CachedRouteKind.APP_PAGE\n // this needs to be a RenderResult so since renderResponse\n // expects that type instead of a string\n html: RenderResult\n rscData: Buffer | undefined\n status: number | undefined\n postponed: string | undefined\n headers: OutgoingHttpHeaders | undefined\n segmentData: Map<string, Buffer> | undefined\n}\n\nexport interface CachedPageValue {\n kind: CachedRouteKind.PAGES\n // this needs to be a RenderResult so since renderResponse\n // expects that type instead of a string\n html: RenderResult\n pageData: Object\n status: number | undefined\n headers: OutgoingHttpHeaders | undefined\n}\n\nexport interface CachedRouteValue {\n kind: CachedRouteKind.APP_ROUTE\n // this needs to be a RenderResult so since renderResponse\n // expects that type instead of a string\n body: Buffer\n status: number\n headers: OutgoingHttpHeaders\n}\n\nexport interface CachedImageValue {\n kind: CachedRouteKind.IMAGE\n etag: string\n upstreamEtag: string\n buffer: Buffer\n extension: string\n revalidate?: number\n isMiss?: boolean\n isStale?: boolean\n}\n\nexport interface IncrementalCachedAppPageValue {\n kind: CachedRouteKind.APP_PAGE\n // this needs to be a string since the cache expects to store\n // the string value\n html: string\n rscData: Buffer | undefined\n headers: OutgoingHttpHeaders | undefined\n postponed: string | undefined\n status: number | undefined\n segmentData: Map<string, Buffer> | undefined\n}\n\nexport interface IncrementalCachedPageValue {\n kind: CachedRouteKind.PAGES\n // this needs to be a string since the cache expects to store\n // the string value\n html: string\n pageData: Object\n headers: OutgoingHttpHeaders | undefined\n status: number | undefined\n}\n\nexport interface IncrementalResponseCacheEntry {\n cacheControl?: CacheControl\n /**\n * timestamp in milliseconds to revalidate after\n */\n revalidateAfter?: Revalidate\n /**\n * `-1` here dictates a blocking revalidate should be used\n */\n isStale?: boolean | -1\n isMiss?: boolean\n isFallback?: boolean\n value: Exclude<IncrementalCacheValue, CachedFetchValue> | null\n}\n\nexport interface IncrementalFetchCacheEntry {\n /**\n * `-1` here dictates a blocking revalidate should be used\n */\n isStale?: boolean | -1\n value: CachedFetchValue\n}\n\nexport type IncrementalCacheEntry =\n | IncrementalResponseCacheEntry\n | IncrementalFetchCacheEntry\n\nexport type IncrementalCacheValue =\n | CachedRedirectValue\n | IncrementalCachedPageValue\n | IncrementalCachedAppPageValue\n | CachedImageValue\n | CachedFetchValue\n | CachedRouteValue\n\nexport type ResponseCacheValue =\n | CachedRedirectValue\n | CachedPageValue\n | CachedAppPageValue\n | CachedImageValue\n | CachedRouteValue\n\nexport type ResponseCacheEntry = {\n cacheLine truncated
|
||||
{"offset": {"line": 15283, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/response-cache/utils.ts"],"sourcesContent":["import {\n CachedRouteKind,\n IncrementalCacheKind,\n type CachedAppPageValue,\n type CachedPageValue,\n type IncrementalResponseCacheEntry,\n type ResponseCacheEntry,\n} from './types'\n\nimport RenderResult from '../render-result'\nimport { RouteKind } from '../route-kind'\nimport { HTML_CONTENT_TYPE_HEADER } from '../../lib/constants'\n\nexport async function fromResponseCacheEntry(\n cacheEntry: ResponseCacheEntry\n): Promise<IncrementalResponseCacheEntry> {\n return {\n ...cacheEntry,\n value:\n cacheEntry.value?.kind === CachedRouteKind.PAGES\n ? {\n kind: CachedRouteKind.PAGES,\n html: await cacheEntry.value.html.toUnchunkedString(true),\n pageData: cacheEntry.value.pageData,\n headers: cacheEntry.value.headers,\n status: cacheEntry.value.status,\n }\n : cacheEntry.value?.kind === CachedRouteKind.APP_PAGE\n ? {\n kind: CachedRouteKind.APP_PAGE,\n html: await cacheEntry.value.html.toUnchunkedString(true),\n postponed: cacheEntry.value.postponed,\n rscData: cacheEntry.value.rscData,\n headers: cacheEntry.value.headers,\n status: cacheEntry.value.status,\n segmentData: cacheEntry.value.segmentData,\n }\n : cacheEntry.value,\n }\n}\n\nexport async function toResponseCacheEntry(\n response: IncrementalResponseCacheEntry | null\n): Promise<ResponseCacheEntry | null> {\n if (!response) return null\n\n return {\n isMiss: response.isMiss,\n isStale: response.isStale,\n cacheControl: response.cacheControl,\n isFallback: response.isFallback,\n value:\n response.value?.kind === CachedRouteKind.PAGES\n ? ({\n kind: CachedRouteKind.PAGES,\n html: RenderResult.fromStatic(\n response.value.html,\n HTML_CONTENT_TYPE_HEADER\n ),\n pageData: response.value.pageData,\n headers: response.value.headers,\n status: response.value.status,\n } satisfies CachedPageValue)\n : response.value?.kind === CachedRouteKind.APP_PAGE\n ? ({\n kind: CachedRouteKind.APP_PAGE,\n html: RenderResult.fromStatic(\n response.value.html,\n HTML_CONTENT_TYPE_HEADER\n ),\n rscData: response.value.rscData,\n headers: response.value.headers,\n status: response.value.status,\n postponed: response.value.postponed,\n segmentData: response.value.segmentData,\n } satisfies CachedAppPageValue)\n : response.value,\n }\n}\n\nexport function routeKindToIncrementalCacheKind(\n routeKind: RouteKind\n): Exclude<IncrementalCacheKind, IncrementalCacheKind.FETCH> {\n switch (routeKind) {\n case RouteKind.PAGES:\n return IncrementalCacheKind.PAGES\n case RouteKind.APP_PAGE:\n return IncrementalCacheKind.APP_PAGE\n case RouteKind.IMAGE:\n return IncrementalCacheKind.IMAGE\n case RouteKind.APP_ROUTE:\n return IncrementalCacheKind.APP_ROUTE\n case RouteKind.PAGES_API:\n // Pages Router API routes are not cached in the incremental cache.\n throw new Error(`Unexpected route kind ${routeKind}`)\n default:\n return routeKind satisfies never\n }\n}\n"],"names":["CachedRouteKind","IncrementalCacheKind","RenderResult","RouteKind","HTML_CONTENT_TYPE_HEADER","fromResponseCacheEntry","cacheEntry","value","kind","PAGES","html","toUnchunkedString","pageData","headers","status","APP_PAGE","postponed","rscData","segmentData","toResponseCacheEntry","response","isMiss","isStale","cacheControl","isFallback","fromStatic","routeKindToIncrementalCacheKind","routeKind","IMAGE","APP_ROUTE","PAGES_API","Error"],"mappings":";;;;;;;;AAAA,SACEA,eAAe,EACfC,oBAAoB,QAKf,UAAS;AAEhB,OAAOC,kBAAkB,mBAAkB;AAC3C,SAASC,SAAS,QAAQ,gBAAe;AACzC,SAASC,wBAAwB,QAAQ,sBAAqB;;;;;AAEvD,eAAeC,uBACpBC,UAA8B;QAK1BA,mBAQIA;IAXR,OAAO;QACL,GAAGA,UAAU;QACbC,OACED,CAAAA,CAAAA,oBAAAA,WAAWC,KAAK,KAAA,OAAA,KAAA,IAAhBD,kBAAkBE,IAAI,MAAKR,8LAAAA,CAAgBS,KAAK,GAC5C;YACED,MAAMR,8LAAAA,CAAgBS,KAAK;YAC3BC,MAAM,MAAMJ,WAAWC,KAAK,CAACG,IAAI,CAACC,iBAAiB,CAAC;YACpDC,UAAUN,WAAWC,KAAK,CAACK,QAAQ;YACnCC,SAASP,WAAWC,KAAK,CAACM,OAAO;YACjCC,QAAQR,WAAWC,KAAK,CAACO,MAAM;QACjC,IACAR,CAAAA,CAAAA,qBAAAA,WAAWC,KAAK,KAAA,OAAA,KAAA,IAAhBD,mBAAkBE,IAAI,MAAKR,8LAAAA,CAAgBe,QAAQ,GACjD;YACEP,MAAMR,8LAAAA,CAAgBe,QAAQ;YAC9BL,MAAM,MAAMJ,WAAWC,KAAK,CAACG,IAAI,CAACC,iBAAiB,CAAC;YACpDK,WAAWV,WAAWC,KAAK,CAACS,SAAS;YACrCC,SAASX,WAAWC,KAAK,CAACU,OAAO;YACjCJ,SAASP,WAAWC,KAAK,CAACM,OAAO;YACjCC,QAAQR,WAAWC,KAAK,CAACO,MAAM;YAC/BI,aAAaZ,WAAWC,KAAK,CAACW,WAAW;QAC3C,IACAZ,WAAWC,KAAK;IAC1B;AACF;AAEO,eAAeY,qBACpBC,QAA8CLine truncated
|
||||
{"offset": {"line": 15370, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/resume-data-cache/cache-store.ts"],"sourcesContent":["import {\n arrayBufferToString,\n stringToUint8Array,\n} from '../app-render/encryption-utils'\nimport type { CachedFetchValue } from '../response-cache/types'\nimport { MIN_PRERENDERABLE_EXPIRE } from '../use-cache/constants'\nimport type { CollectedCacheResult } from '../use-cache/use-cache-wrapper'\n\n/**\n * A generic cache store type that provides a subset of Map functionality\n */\ntype CacheStore<T> = Pick<\n Map<string, T>,\n 'entries' | 'keys' | 'size' | 'get' | 'set' | 'has' | typeof Symbol.iterator\n>\n\n/**\n * A cache store specifically for fetch cache values\n */\nexport type FetchCacheStore = CacheStore<CachedFetchValue>\n\n/**\n * A cache store for encrypted bound args of inline server functions.\n */\nexport type EncryptedBoundArgsCacheStore = CacheStore<string>\n\n/**\n * An in-memory-only cache store for decrypted bound args of inline server\n * functions.\n */\nexport type DecryptedBoundArgsCacheStore = CacheStore<string>\n\n/**\n * An in-memory-only cache store for rendered `ImageResponse` array buffers,\n * keyed by a serialization of the `ImageResponse` constructor args. This lets\n * the prospective prerender render the image once and hand the array buffer to\n * the final prerender within microtasks, so that metadata image routes can be\n * statically prerendered under Cache Components. Never serialized into the\n * resume store.\n */\nexport type ImageResponseCacheStore = CacheStore<Promise<ArrayBuffer>>\n\n/**\n * Serialized format for \"use cache\" entries\n */\nexport interface UseCacheCacheStoreSerialized {\n entry: {\n value: string\n tags: string[]\n stale: number\n timestamp: number\n expire: number\n revalidate: number\n }\n hasExplicitRevalidate: boolean | undefined\n hasExplicitExpire: boolean | undefined\n readRootParamNames: string[] | undefined\n}\n\n/**\n * A cache store specifically for \"use cache\" values that stores promises of\n * collected cache results (entry + metadata).\n */\nexport type UseCacheCacheStore = CacheStore<Promise<CollectedCacheResult>>\n\n/**\n * Parses serialized cache entries into a UseCacheCacheStore\n * @param entries - The serialized entries to parse\n * @returns A new UseCacheCacheStore containing the parsed entries\n */\nexport function parseUseCacheCacheStore(\n entries: Iterable<[string, UseCacheCacheStoreSerialized]>\n): UseCacheCacheStore {\n const store = new Map<string, Promise<CollectedCacheResult>>()\n\n for (const [\n key,\n { entry, hasExplicitRevalidate, hasExplicitExpire, readRootParamNames },\n ] of entries) {\n store.set(\n key,\n Promise.resolve({\n entry: {\n // Create a ReadableStream from the Uint8Array\n value: new ReadableStream<Uint8Array>({\n start(controller) {\n // Enqueue the Uint8Array to the stream\n controller.enqueue(stringToUint8Array(atob(entry.value)))\n\n // Close the stream\n controller.close()\n },\n }),\n tags: entry.tags,\n stale: entry.stale,\n timestamp: entry.timestamp,\n expire: entry.expire,\n revalidate: entry.revalidate,\n },\n hasExplicitRevalidate,\n hasExplicitExpire,\n readRootParamNames: readRootParamNames\n ? new Set(readRootParamNames)\n : undefined,\n // Serialized RDC entries are non-dynamic by construction (the\n // serializer drops dynamic entries), so this is never produced from the\n // wire — the throw path that consumes it is only reachable for dynamic\n // entries, which only exist in the in-memory RDC.\n dynamicNestedCacheError: undefined,\n })\n )\n }\n\n return store\n}\n\n/**\n * Serializes UseCacheCacheStore entries into an array of key-value pairs\n * @param entries - The store entries to stringify\n * @returns A promise that resolves to an array of key-value pairs with serialized values\n */\nexport async function serializeUseCacheCacheStore(\n entries: IterableIterator<[string, Promise<CollectedCacheResult>]>,\n isCacheComponentsEnabled: boolean\n): Promise<Array<[string, UseCacheCacheStoreSerialized] | null>> {\n return Promise.all(\n Array.from(entries).map(([key, value]) => {\n return value\n .then(\n async ({\n entry,\n hasExplicitRevalidate,\n hasExplicitExpire,\n readRootParamNames,\n }) => {\n if (\n isCacheComponentsEnabled &&\n (entry.revalidate === 0 ||\n entry.expire < MIN_PRERENDERABLE_EXPIRE)\n ) {\n // The entry was omitted from the prerender result, and subsequently\n // does not need to be included in theLine truncated
|
||||
{"offset": {"line": 15459, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/resume-data-cache/resume-data-cache.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n type UseCacheCacheStore,\n type FetchCacheStore,\n type EncryptedBoundArgsCacheStore,\n serializeUseCacheCacheStore,\n parseUseCacheCacheStore,\n type DecryptedBoundArgsCacheStore,\n type ImageResponseCacheStore,\n type UseCacheCacheStoreSerialized,\n} from './cache-store'\n\n/**\n * An immutable version of the resume data cache used during rendering.\n * This cache is read-only and cannot be modified once created.\n */\nexport interface RenderResumeDataCache {\n /**\n * Discriminator. `false` means this cache is read-only and cannot be filled\n * with new entries. Used by `ResumeDataCache` consumers to narrow the union\n * via standard discriminated-union narrowing (e.g. `if\n * (resumeDataCache.mutable)`).\n */\n readonly mutable: false\n\n /**\n * A read-only Map store for values cached by the 'use cache' React hook.\n * The 'set' operation is omitted to enforce immutability.\n */\n readonly cache: Omit<UseCacheCacheStore, 'set'>\n\n /**\n * A read-only Map store for cached fetch responses.\n * The 'set' operation is omitted to enforce immutability.\n */\n readonly fetch: Omit<FetchCacheStore, 'set'>\n\n /**\n * A read-only Map store for encrypted bound args of inline server functions.\n * The 'set' operation is omitted to enforce immutability.\n */\n readonly encryptedBoundArgs: Omit<EncryptedBoundArgsCacheStore, 'set'>\n\n /**\n * A read-only Map store for decrypted bound args of inline server functions.\n * This is only intended for in-memory usage during pre-rendering, and must\n * not be persisted in the resume store. The 'set' operation is omitted to\n * enforce immutability.\n */\n readonly decryptedBoundArgs: Omit<DecryptedBoundArgsCacheStore, 'set'>\n\n /**\n * A read-only in-memory Map store for rendered `ImageResponse` array buffers.\n * This is only intended for in-memory usage during pre-rendering, and must\n * not be persisted in the resume store. The 'set' operation is omitted to\n * enforce immutability.\n */\n readonly imageResponses: Omit<ImageResponseCacheStore, 'set'>\n\n /**\n * Serialized cache keys that were intentionally skipped during the\n * prospective prerender (e.g. because the cached function accessed fallback\n * params or other dynamic data). During the final prerender, a key in this\n * set is returned as a hanging promise early, without attempting to look up\n * or generate a cache entry. Optional because this field is intentionally not\n * serialized and won't be present in deserialized caches.\n */\n readonly dynamicCacheKeys?: ReadonlySet<string>\n}\n\n/**\n * A mutable version of the resume data cache used during pre-rendering.\n * This cache allows both reading and writing of cached values.\n */\nexport interface PrerenderResumeDataCache {\n /**\n * Discriminator. `true` means this cache is mutable and can be filled with\n * new entries during this prerender. Used by `ResumeDataCache` consumers to\n * narrow the union via standard discriminated-union narrowing (e.g.\n * `if (resumeDataCache.mutable)`).\n */\n readonly mutable: true\n\n /**\n * A mutable Map store for values cached by the 'use cache' React hook.\n * Supports both 'get' and 'set' operations to build the cache during\n * pre-rendering.\n */\n readonly cache: UseCacheCacheStore\n\n /**\n * A mutable Map store for cached fetch responses.\n * Supports both 'get' and 'set' operations to build the cache during\n * pre-rendering.\n */\n readonly fetch: FetchCacheStore\n\n /**\n * A mutable Map store for encrypted bound args of inline server functions.\n * Supports both 'get' and 'set' operations to build the cache during\n * pre-rendering.\n */\n readonly encryptedBoundArgs: EncryptedBoundArgsCacheStore\n\n /**\n * A mutable Map store for decrypted bound args of inline server functions.\n * This is only intended for in-memory usage during pre-rendering, and must\n * not be persisted in the resume store. Supports both 'get' and 'set'\n * operations to build the cache during pre-rendering.\n */\n readonly decryptedBoundArgs: DecryptedBoundArgsCacheStore\n\n /**\n * A mutable in-memory Map store for rendered `ImageResponse` array buffers.\n * Filled during the prospective prerender and read during the final\n * prerender. Never persisted in the resume store.\n */\n readonly imageResponses: ImageResponseCacheStore\n\n /**\n * Tracks serialized cache keys that were intentionally skipped during the\n * prospective prerender (e.g. because the cached function accessed fallback\n * params or other dynamic data). During the final prerender, a key in this\n * set is returned as a hangingLine truncated
|
||||
{"offset": {"line": 15578, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-kind.ts"],"sourcesContent":["export const enum RouteKind {\n /**\n * `PAGES` represents all the React pages that are under `pages/`.\n */\n PAGES = 'PAGES',\n /**\n * `PAGES_API` represents all the API routes under `pages/api/`.\n */\n PAGES_API = 'PAGES_API',\n /**\n * `APP_PAGE` represents all the React pages that are under `app/` with the\n * filename of `page.{j,t}s{,x}`.\n */\n APP_PAGE = 'APP_PAGE',\n /**\n * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n * filename of `route.{j,t}s{,x}`.\n */\n APP_ROUTE = 'APP_ROUTE',\n\n /**\n * `IMAGE` represents all the images that are generated by `next/image`.\n */\n IMAGE = 'IMAGE',\n}\n"],"names":["RouteKind"],"mappings":";;;;AAAO,IAAWA,YAAAA,WAAAA,GAAAA,SAAAA,SAAAA;IAChB;;GAEC,GAAA,SAAA,CAAA,QAAA,GAAA;IAED;;GAEC,GAAA,SAAA,CAAA,YAAA,GAAA;IAED;;;GAGC,GAAA,SAAA,CAAA,WAAA,GAAA;IAED;;;GAGC,GAAA,SAAA,CAAA,YAAA,GAAA;IAGD;;GAEC,GAAA,SAAA,CAAA,QAAA,GAAA;WAtBeA;MAwBjB","ignoreList":[0]}},
|
||||
{"offset": {"line": 15606, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/checks.ts"],"sourcesContent":["import type { AppRouteRouteModule } from './app-route/module'\nimport type { AppPageRouteModule } from './app-page/module'\nimport type { PagesRouteModule } from './pages/module'\nimport type { PagesAPIRouteModule } from './pages-api/module'\n\nimport type { RouteModule } from './route-module'\n\nimport { RouteKind } from '../route-kind'\n\nexport function isAppRouteRouteModule(\n routeModule: RouteModule\n): routeModule is AppRouteRouteModule {\n return routeModule.definition.kind === RouteKind.APP_ROUTE\n}\n\nexport function isAppPageRouteModule(\n routeModule: RouteModule\n): routeModule is AppPageRouteModule {\n return routeModule.definition.kind === RouteKind.APP_PAGE\n}\n\nexport function isPagesRouteModule(\n routeModule: RouteModule\n): routeModule is PagesRouteModule {\n return routeModule.definition.kind === RouteKind.PAGES\n}\n\nexport function isPagesAPIRouteModule(\n routeModule: RouteModule\n): routeModule is PagesAPIRouteModule {\n return routeModule.definition.kind === RouteKind.PAGES_API\n}\n"],"names":["RouteKind","isAppRouteRouteModule","routeModule","definition","kind","APP_ROUTE","isAppPageRouteModule","APP_PAGE","isPagesRouteModule","PAGES","isPagesAPIRouteModule","PAGES_API"],"mappings":";;;;;;;;;;AAOA,SAASA,SAAS,QAAQ,gBAAe;;AAElC,SAASC,sBACdC,WAAwB;IAExB,OAAOA,YAAYC,UAAU,CAACC,IAAI,KAAKJ,2KAAAA,CAAUK,SAAS;AAC5D;AAEO,SAASC,qBACdJ,WAAwB;IAExB,OAAOA,YAAYC,UAAU,CAACC,IAAI,KAAKJ,2KAAAA,CAAUO,QAAQ;AAC3D;AAEO,SAASC,mBACdN,WAAwB;IAExB,OAAOA,YAAYC,UAAU,CAACC,IAAI,KAAKJ,2KAAAA,CAAUS,KAAK;AACxD;AAEO,SAASC,sBACdR,WAAwB;IAExB,OAAOA,YAAYC,UAAU,CAACC,IAAI,KAAKJ,2KAAAA,CAAUW,SAAS;AAC5D","ignoreList":[0]}},
|
||||
{"offset": {"line": 15634, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/send-payload.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'http'\nimport type RenderResult from './render-result'\nimport type { CacheControl } from './lib/cache-control'\n\nimport { isResSent } from '../shared/lib/utils'\nimport { generateETag } from './lib/etag'\nimport fresh from 'next/dist/compiled/fresh'\nimport { getCacheControlHeader } from './lib/cache-control'\nimport { HTML_CONTENT_TYPE_HEADER } from '../lib/constants'\n\nexport function sendEtagResponse(\n req: IncomingMessage,\n res: ServerResponse,\n etag: string | undefined\n): boolean {\n if (etag) {\n /**\n * The server generating a 304 response MUST generate any of the\n * following header fields that would have been sent in a 200 (OK)\n * response to the same request: Cache-Control, Content-Location, Date,\n * ETag, Expires, and Vary. https://tools.ietf.org/html/rfc7232#section-4.1\n */\n res.setHeader('ETag', etag)\n }\n\n if (fresh(req.headers, { etag })) {\n res.statusCode = 304\n res.end()\n return true\n }\n\n return false\n}\n\nexport async function sendRenderResult({\n req,\n res,\n result,\n generateEtags,\n poweredByHeader,\n cacheControl,\n}: {\n req: IncomingMessage\n res: ServerResponse\n result: RenderResult\n generateEtags: boolean\n poweredByHeader: boolean\n cacheControl: CacheControl | undefined\n}): Promise<void> {\n if (isResSent(res)) {\n return\n }\n\n if (poweredByHeader && result.contentType === HTML_CONTENT_TYPE_HEADER) {\n res.setHeader('X-Powered-By', 'Next.js')\n }\n\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheControl && !res.getHeader('Cache-Control')) {\n res.setHeader('Cache-Control', getCacheControlHeader(cacheControl))\n }\n\n const payload = result.isDynamic ? null : result.toUnchunkedString()\n\n if (generateEtags && payload !== null) {\n const etag = generateETag(payload)\n if (sendEtagResponse(req, res, etag)) {\n return\n }\n }\n\n if (!res.getHeader('Content-Type') && result.contentType) {\n res.setHeader('Content-Type', result.contentType)\n }\n\n if (payload) {\n res.setHeader('Content-Length', Buffer.byteLength(payload))\n }\n\n if (req.method === 'HEAD') {\n res.end(null)\n return\n }\n\n if (payload !== null) {\n res.end(payload)\n return\n }\n\n // Pipe the render result to the response after we get a writer for it.\n await result.pipeToNodeResponse(res)\n}\n"],"names":["isResSent","generateETag","fresh","getCacheControlHeader","HTML_CONTENT_TYPE_HEADER","sendEtagResponse","req","res","etag","setHeader","headers","statusCode","end","sendRenderResult","result","generateEtags","poweredByHeader","cacheControl","contentType","getHeader","payload","isDynamic","toUnchunkedString","Buffer","byteLength","method","pipeToNodeResponse"],"mappings":";;;;;;AAIA,SAASA,SAAS,QAAQ,sBAAqB;AAC/C,SAASC,YAAY,QAAQ,aAAY;AACzC,OAAOC,WAAW,2BAA0B;AAC5C,SAASC,qBAAqB,QAAQ,sBAAqB;AAC3D,SAASC,wBAAwB,QAAQ,mBAAkB;;;;;;AAEpD,SAASC,iBACdC,GAAoB,EACpBC,GAAmB,EACnBC,IAAwB;IAExB,IAAIA,MAAM;QACR;;;;;KAKC,GACDD,IAAIE,SAAS,CAAC,QAAQD;IACxB;IAEA,QAAIN,qKAAAA,EAAMI,IAAII,OAAO,EAAE;QAAEF;IAAK,IAAI;QAChCD,IAAII,UAAU,GAAG;QACjBJ,IAAIK,GAAG;QACP,OAAO;IACT;IAEA,OAAO;AACT;AAEO,eAAeC,iBAAiB,EACrCP,GAAG,EACHC,GAAG,EACHO,MAAM,EACNC,aAAa,EACbC,eAAe,EACfC,YAAY,EAQb;IACC,QAAIjB,0KAAAA,EAAUO,MAAM;QAClB;IACF;IAEA,IAAIS,mBAAmBF,OAAOI,WAAW,KAAKd,mLAAAA,EAA0B;QACtEG,IAAIE,SAAS,CAAC,gBAAgB;IAChC;IAEA,2DAA2D;IAC3D,6DAA6D;IAC7D,IAAIQ,gBAAgB,CAACV,IAAIY,SAAS,CAAC,kBAAkB;QACnDZ,IAAIE,SAAS,CAAC,qBAAiBN,iMAAAA,EAAsBc;IACvD;IAEA,MAAMG,UAAUN,OAAOO,SAAS,GAAG,OAAOP,OAAOQ,iBAAiB;IAElE,IAAIP,iBAAiBK,YAAY,MAAM;QACrC,MAAMZ,WAAOP,4KAAAA,EAAamB;QAC1B,IAAIf,iBAAiBC,KAAKC,KAAKC,OAAO;YACpC;QACF;IACF;IAEA,IAAI,CAACD,IAAIY,SAAS,CAAC,mBAAmBL,OAAOI,WAAW,EAAE;QACxDX,IAAIE,SAAS,CAAC,gBAAgBK,OAAOI,WAAW;IAClD;IAEA,IAAIE,SAAS;QACXb,IAAIE,SAAS,CAAC,kBAAkBc,OAAOC,UAAU,CAACJ;IACpD;IAEA,IAAId,IAAImB,MAAM,KAAK,QAAQ;QACzBlB,IAAIK,GAAG,CAAC;QACR;IACF;IAEA,IAAIQ,YAAY,MAAM;QACpBb,IAAIK,GAAG,CAACQ;QACR;IACF;IAEA,uEAAuE;IACvE,MAAMN,OAAOY,kBAAkB,CAACnB;AAClC","ignoreList":[0]}},
|
||||
{"offset": {"line": 15708, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/stream-utils/encoded-tags.ts"],"sourcesContent":["export const ENCODED_TAGS = {\n // opening tags do not have the closing `>` since they can contain other attributes such as `<body className=''>`\n OPENING: {\n // <html\n HTML: new Uint8Array([60, 104, 116, 109, 108]),\n // <head\n HEAD: new Uint8Array([60, 104, 101, 97, 100]),\n // <body\n BODY: new Uint8Array([60, 98, 111, 100, 121]),\n },\n CLOSED: {\n // </head>\n HEAD: new Uint8Array([60, 47, 104, 101, 97, 100, 62]),\n // </body>\n BODY: new Uint8Array([60, 47, 98, 111, 100, 121, 62]),\n // </html>\n HTML: new Uint8Array([60, 47, 104, 116, 109, 108, 62]),\n // </body></html>\n BODY_AND_HTML: new Uint8Array([\n 60, 47, 98, 111, 100, 121, 62, 60, 47, 104, 116, 109, 108, 62,\n ]),\n },\n META: {\n // Only the match the prefix cause the suffix can be different wether it's xml compatible or not \">\" or \"/>\"\n // <meta name=\"«nxt-icon»\"\n // This is a special mark that will be replaced by the icon insertion script tag.\n ICON_MARK: new Uint8Array([\n 60, 109, 101, 116, 97, 32, 110, 97, 109, 101, 61, 34, 194, 171, 110, 120,\n 116, 45, 105, 99, 111, 110, 194, 187, 34,\n ]),\n },\n} as const\n"],"names":["ENCODED_TAGS","OPENING","HTML","Uint8Array","HEAD","BODY","CLOSED","BODY_AND_HTML","META","ICON_MARK"],"mappings":";;;;AAAO,MAAMA,eAAe;IAC1B,iHAAiH;IACjHC,SAAS;QACP,QAAQ;QACRC,MAAM,IAAIC,WAAW;YAAC;YAAI;YAAK;YAAK;YAAK;SAAI;QAC7C,QAAQ;QACRC,MAAM,IAAID,WAAW;YAAC;YAAI;YAAK;YAAK;YAAI;SAAI;QAC5C,QAAQ;QACRE,MAAM,IAAIF,WAAW;YAAC;YAAI;YAAI;YAAK;YAAK;SAAI;IAC9C;IACAG,QAAQ;QACN,UAAU;QACVF,MAAM,IAAID,WAAW;YAAC;YAAI;YAAI;YAAK;YAAK;YAAI;YAAK;SAAG;QACpD,UAAU;QACVE,MAAM,IAAIF,WAAW;YAAC;YAAI;YAAI;YAAI;YAAK;YAAK;YAAK;SAAG;QACpD,UAAU;QACVD,MAAM,IAAIC,WAAW;YAAC;YAAI;YAAI;YAAK;YAAK;YAAK;YAAK;SAAG;QACrD,iBAAiB;QACjBI,eAAe,IAAIJ,WAAW;YAC5B;YAAI;YAAI;YAAI;YAAK;YAAK;YAAK;YAAI;YAAI;YAAI;YAAK;YAAK;YAAK;YAAK;SAC5D;IACH;IACAK,MAAM;QACJ,4GAA4G;QAC5G,0BAA0B;QAC1B,iFAAiF;QACjFC,WAAW,IAAIN,WAAW;YACxB;YAAI;YAAK;YAAK;YAAK;YAAI;YAAI;YAAK;YAAI;YAAK;YAAK;YAAI;YAAI;YAAK;YAAK;YAAK;YACrE;YAAK;YAAI;YAAK;YAAI;YAAK;YAAK;YAAK;YAAK;SACvC;IACH;AACF,EAAU","ignoreList":[0]}},
|
||||
{"offset": {"line": 15826, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/stream-utils/node-web-streams-helper.ts"],"sourcesContent":["import type { ReactDOMServerReadableStream } from 'react-dom/server'\nimport { getTracer } from '../lib/trace/tracer'\nimport { AppRenderSpan } from '../lib/trace/constants'\nimport { DetachedPromise } from '../../lib/detached-promise'\nimport {\n scheduleImmediate,\n atLeastOneTask,\n waitAtLeastOneReactRenderTask,\n} from '../../lib/scheduler'\nimport { ENCODED_TAGS } from './encoded-tags'\nimport {\n indexOfUint8Array,\n isEquivalentUint8Arrays,\n removeFromUint8Array,\n} from './uint8array-helpers'\nimport { MISSING_ROOT_TAGS_ERROR } from '../../shared/lib/errors/constants'\nimport {\n RSC_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_RSC_UNION_QUERY,\n} from '../../client/components/app-router-headers'\nimport { computeCacheBustingSearchParam } from '../../shared/lib/router/utils/cache-busting-search-param'\nimport type { AnyStream } from '../app-render/stream-ops'\n\nfunction voidCatch() {\n // this catcher is designed to be used with pipeTo where we expect the underlying\n // pipe implementation to forward errors but we don't want the pipeTo promise to reject\n // and be unhandled\n}\n\n// We can share the same encoder instance everywhere\n// Notably we cannot do the same for TextDecoder because it is stateful\n// when handling streaming data\nconst encoder = new TextEncoder()\n\nexport function chainStreams<T>(\n ...streams: ReadableStream<T>[]\n): ReadableStream<T> {\n // If we have no streams, return an empty stream. This behavior is\n // intentional as we're now providing the `RenderResult.EMPTY` value.\n if (streams.length === 0) {\n return new ReadableStream<T>({\n start(controller) {\n controller.close()\n },\n })\n }\n\n // If we only have 1 stream we fast path it by returning just this stream\n if (streams.length === 1) {\n return streams[0]\n }\n\n const { readable, writable } = new TransformStream()\n\n // We always initiate pipeTo immediately. We know we have at least 2 streams\n // so we need to avoid closing the writable when this one finishes.\n let promise = streams[0].pipeTo(writable, { preventClose: true })\n\n let i = 1\n for (; i < streams.length - 1; i++) {\n const nextStream = streams[i]\n promise = promise.then(() =>\n nextStream.pipeTo(writable, { preventClose: true })\n )\n }\n\n // We can omit the length check because we halted before the last stream and there\n // is at least two streams so the lastStream here will always be defined\n const lastStream = streams[i]\n promise = promise.then(() => lastStream.pipeTo(writable))\n\n // Catch any errors from the streams and ignore them, they will be handled\n // by whatever is consuming the readable stream.\n promise.catch(voidCatch)\n\n return readable\n}\n\nexport function streamFromString(str: string): ReadableStream<Uint8Array> {\n return new ReadableStream({\n start(controller) {\n controller.enqueue(encoder.encode(str))\n controller.close()\n },\n })\n}\n\nexport function streamFromBuffer(chunk: Buffer): ReadableStream<Uint8Array> {\n return new ReadableStream({\n start(controller) {\n controller.enqueue(chunk)\n controller.close()\n },\n })\n}\n\nasync function streamToChunks(\n stream: ReadableStream<Uint8Array>\n): Promise<Array<Uint8Array>> {\n const reader = stream.getReader()\n const chunks: Array<Uint8Array> = []\n\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n break\n }\n\n chunks.push(value)\n }\n\n return chunks\n}\n\nfunction concatUint8Arrays(chunks: Array<Uint8Array>): Uint8Array {\n const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0)\n const result = new Uint8Array(totalLength)\n let offset = 0\n for (const chunk of chunks) {\n result.set(chunk, offset)\n offset += chunk.length\n }\n return result\n}\n\nexport async function webstreamToUint8Array(\n stream: ReadableStream<Uint8Array>\n): Promise<Uint8Array> {\n return concatUint8Arrays(await streamToChunks(stream))\n}\n\nfunction webToReadable(\n stream: ReadableStream<Uint8Array> | import('node:stream').Readable\n): import('node:stream').Readable {\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new Error('webToReadable cannot be used in the edge runtime')\n } else {\n let Readable: typeof import('node:stream').Readable\n if (process.env.TURBOPACK) {\n Readable = (require('node:stream') as typeof import('node:stream'))\n .Readable\n } else if (\n process.env.__NEXT_BUNDLER === 'Webpack' ||\n process.env.__NEXT_BUNDLER === 'Rspack'\n ) {\n Readable = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n } else {\n ReadLine truncated
|
||||
{"offset": {"line": 16701, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/stream-utils/uint8array-helpers.ts"],"sourcesContent":["/**\n * Find the starting index of Uint8Array `b` within Uint8Array `a`.\n */\nexport function indexOfUint8Array(a: Uint8Array, b: Uint8Array) {\n if (b.length === 0) return 0\n if (a.length === 0 || b.length > a.length) return -1\n\n // Use Node's native implementation when available.\n if (typeof Buffer !== 'undefined') {\n const haystack = Buffer.isBuffer(a)\n ? a\n : Buffer.from(a.buffer, a.byteOffset, a.byteLength)\n return haystack.indexOf(b)\n }\n\n // start iterating through `a`\n for (let i = 0; i <= a.length - b.length; i++) {\n let completeMatch = true\n // from index `i`, iterate through `b` and check for mismatch\n for (let j = 0; j < b.length; j++) {\n // if the values do not match, then this isn't a complete match, exit `b` iteration early and iterate to next index of `a`.\n if (a[i + j] !== b[j]) {\n completeMatch = false\n break\n }\n }\n\n if (completeMatch) {\n return i\n }\n }\n\n return -1\n}\n\n/**\n * Check if two Uint8Arrays are strictly equivalent.\n */\nexport function isEquivalentUint8Arrays(a: Uint8Array, b: Uint8Array) {\n if (a.length !== b.length) return false\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false\n }\n\n return true\n}\n\n/**\n * Remove Uint8Array `b` from Uint8Array `a`.\n *\n * If `b` is not in `a`, `a` is returned unchanged.\n *\n * Otherwise, the function returns a new Uint8Array instance with size `a.length - b.length`\n */\nexport function removeFromUint8Array(a: Uint8Array, b: Uint8Array) {\n const tagIndex = indexOfUint8Array(a, b)\n if (tagIndex === 0) return a.subarray(b.length)\n if (tagIndex > -1) {\n const removed = new Uint8Array(a.length - b.length)\n removed.set(a.subarray(0, tagIndex))\n removed.set(a.subarray(tagIndex + b.length), tagIndex)\n return removed\n } else {\n return a\n }\n}\n"],"names":["indexOfUint8Array","a","b","length","Buffer","haystack","isBuffer","from","buffer","byteOffset","byteLength","indexOf","i","completeMatch","j","isEquivalentUint8Arrays","removeFromUint8Array","tagIndex","subarray","removed","Uint8Array","set"],"mappings":"AAAA;;CAEC,GACD;;;;;;;;AAAO,SAASA,kBAAkBC,CAAa,EAAEC,CAAa;IAC5D,IAAIA,EAAEC,MAAM,KAAK,GAAG,OAAO;IAC3B,IAAIF,EAAEE,MAAM,KAAK,KAAKD,EAAEC,MAAM,GAAGF,EAAEE,MAAM,EAAE,OAAO,CAAC;IAEnD,mDAAmD;IACnD,IAAI,OAAOC,WAAW,aAAa;QACjC,MAAMC,WAAWD,OAAOE,QAAQ,CAACL,KAC7BA,IACAG,OAAOG,IAAI,CAACN,EAAEO,MAAM,EAAEP,EAAEQ,UAAU,EAAER,EAAES,UAAU;QACpD,OAAOL,SAASM,OAAO,CAACT;IAC1B;IAEA,8BAA8B;IAC9B,IAAK,IAAIU,IAAI,GAAGA,KAAKX,EAAEE,MAAM,GAAGD,EAAEC,MAAM,EAAES,IAAK;QAC7C,IAAIC,gBAAgB;QACpB,6DAA6D;QAC7D,IAAK,IAAIC,IAAI,GAAGA,IAAIZ,EAAEC,MAAM,EAAEW,IAAK;YACjC,2HAA2H;YAC3H,IAAIb,CAAC,CAACW,IAAIE,EAAE,KAAKZ,CAAC,CAACY,EAAE,EAAE;gBACrBD,gBAAgB;gBAChB;YACF;QACF;QAEA,IAAIA,eAAe;YACjB,OAAOD;QACT;IACF;IAEA,OAAO,CAAC;AACV;AAKO,SAASG,wBAAwBd,CAAa,EAAEC,CAAa;IAClE,IAAID,EAAEE,MAAM,KAAKD,EAAEC,MAAM,EAAE,OAAO;IAElC,IAAK,IAAIS,IAAI,GAAGA,IAAIX,EAAEE,MAAM,EAAES,IAAK;QACjC,IAAIX,CAAC,CAACW,EAAE,KAAKV,CAAC,CAACU,EAAE,EAAE,OAAO;IAC5B;IAEA,OAAO;AACT;AASO,SAASI,qBAAqBf,CAAa,EAAEC,CAAa;IAC/D,MAAMe,WAAWjB,kBAAkBC,GAAGC;IACtC,IAAIe,aAAa,GAAG,OAAOhB,EAAEiB,QAAQ,CAAChB,EAAEC,MAAM;IAC9C,IAAIc,WAAW,CAAC,GAAG;QACjB,MAAME,UAAU,IAAIC,WAAWnB,EAAEE,MAAM,GAAGD,EAAEC,MAAM;QAClDgB,QAAQE,GAAG,CAACpB,EAAEiB,QAAQ,CAAC,GAAGD;QAC1BE,QAAQE,GAAG,CAACpB,EAAEiB,QAAQ,CAACD,WAAWf,EAAEC,MAAM,GAAGc;QAC7C,OAAOE;IACT,OAAO;QACL,OAAOlB;IACT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 16759, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/use-cache/constants.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\n\nexport const MIN_PRERENDERABLE_EXPIRE = 300 // 5 minutes\nexport const MIN_PREFETCHABLE_STALE = 30 // 30 seconds\nexport const MIN_SHELL_STALE = 300 // 5 minutes\n\nif (process.env.NODE_ENV !== 'production') {\n if (MIN_PREFETCHABLE_STALE > MIN_SHELL_STALE) {\n throw new InvariantError(\n 'MIN_PREFETCHABLE_STALE must not exceed MIN_SHELL_STALE.'\n )\n }\n}\n"],"names":["InvariantError","MIN_PRERENDERABLE_EXPIRE","MIN_PREFETCHABLE_STALE","MIN_SHELL_STALE","process","env","NODE_ENV"],"mappings":";;;;;;;;AAAA,SAASA,cAAc,QAAQ,mCAAkC;;AAE1D,MAAMC,2BAA2B,IAAI,YAAY;;AACjD,MAAMC,yBAAyB,GAAG,aAAa;;AAC/C,MAAMC,kBAAkB,IAAI,YAAY;;AAE/C,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,WAAc;IACzC,IAAIJ,yBAAyBC,iBAAiB;QAC5C,MAAM,OAAA,cAEL,CAFK,IAAIH,4LAAAA,CACR,4DADI,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 16788, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/error.ts"],"sourcesContent":["export class PageSignatureError extends Error {\n constructor({ page }: { page: string }) {\n super(`The middleware \"${page}\" accepts an async API directly with the form:\n \n export function middleware(request, event) {\n return NextResponse.redirect('/new-location')\n }\n \n Read more: https://nextjs.org/docs/messages/middleware-new-signature\n `)\n }\n}\n\nexport class RemovedPageError extends Error {\n constructor() {\n super(`The request.page has been deprecated in favour of \\`URLPattern\\`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n `)\n }\n}\n\nexport class RemovedUAError extends Error {\n constructor() {\n super(`The request.ua has been removed in favour of \\`userAgent\\` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n `)\n }\n}\n"],"names":["PageSignatureError","Error","constructor","page","RemovedPageError","RemovedUAError"],"mappings":";;;;;;;;AAAO,MAAMA,2BAA2BC;IACtCC,YAAY,EAAEC,IAAI,EAAoB,CAAE;QACtC,KAAK,CAAC,CAAC,gBAAgB,EAAEA,KAAK;;;;;;;EAOhC,CAAC;QAPC,OAAA,cAOA,CAPA,IAOA,EAPA,qBAAA;mBAAA;wBAAA;0BAAA;QAOD;IACD;AACF;AAEO,MAAMC,yBAAyBH;IACpCC,aAAc;QACZ,KAAK,CAAC,CAAC;;EAET,CAAC;QAFC,OAAA,cAEA,CAFA,IAEA,EAFA,qBAAA;mBAAA;wBAAA;0BAAA;QAED;IACD;AACF;AAEO,MAAMG,uBAAuBJ;IAClCC,aAAc;QACZ,KAAK,CAAC,CAAC;;EAET,CAAC;QAFC,OAAA,cAEA,CAFA,IAEA,EAFA,qBAAA;mBAAA;wBAAA;0BAAA;QAED;IACD;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 16841, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/next-url.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\nimport type { DomainLocale, I18NConfig } from '../config-shared'\nimport type { I18NProvider } from '../lib/i18n-provider'\n\nimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'\nimport { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'\nimport { getHostname } from '../../shared/lib/get-hostname'\nimport { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'\n\ninterface Options {\n base?: string | URL\n headers?: OutgoingHttpHeaders\n forceLocale?: boolean\n nextConfig?: {\n basePath?: string\n i18n?: I18NConfig | null\n trailingSlash?: boolean\n }\n i18nProvider?: I18NProvider\n}\n\nconst REGEX_LOCALHOST_HOSTNAME =\n /^(?:127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\\[::1\\]|localhost)$/\n\nfunction parseURL(url: string | URL, base?: string | URL) {\n const parsed = new URL(String(url), base && String(base))\n if (REGEX_LOCALHOST_HOSTNAME.test(parsed.hostname)) {\n parsed.hostname = 'localhost'\n }\n return parsed\n}\n\nconst Internal = Symbol('NextURLInternal')\n\nexport class NextURL {\n private [Internal]: {\n basePath: string\n buildId?: string\n flightSearchParameters?: Record<string, string>\n defaultLocale?: string\n domainLocale?: DomainLocale\n locale?: string\n options: Options\n trailingSlash?: boolean\n url: URL\n }\n\n constructor(input: string | URL, base?: string | URL, opts?: Options)\n constructor(input: string | URL, opts?: Options)\n constructor(\n input: string | URL,\n baseOrOpts?: string | URL | Options,\n opts?: Options\n ) {\n let base: undefined | string | URL\n let options: Options\n\n if (\n (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts) ||\n typeof baseOrOpts === 'string'\n ) {\n base = baseOrOpts\n options = opts || {}\n } else {\n options = opts || baseOrOpts || {}\n }\n\n this[Internal] = {\n url: parseURL(input, base ?? options.base),\n options: options,\n basePath: '',\n }\n\n this.analyze()\n }\n\n private analyze() {\n const info = getNextPathnameInfo(this[Internal].url.pathname, {\n nextConfig: this[Internal].options.nextConfig,\n parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,\n i18nProvider: this[Internal].options.i18nProvider,\n })\n\n const hostname = getHostname(\n this[Internal].url,\n this[Internal].options.headers\n )\n this[Internal].domainLocale = this[Internal].options.i18nProvider\n ? this[Internal].options.i18nProvider.detectDomainLocale(hostname)\n : detectDomainLocale(\n this[Internal].options.nextConfig?.i18n?.domains,\n hostname\n )\n\n const defaultLocale =\n this[Internal].domainLocale?.defaultLocale ||\n this[Internal].options.nextConfig?.i18n?.defaultLocale\n\n this[Internal].url.pathname = info.pathname\n this[Internal].defaultLocale = defaultLocale\n this[Internal].basePath = info.basePath ?? ''\n this[Internal].buildId = info.buildId\n this[Internal].locale = info.locale ?? defaultLocale\n this[Internal].trailingSlash = info.trailingSlash\n }\n\n private formatPathname() {\n return formatNextPathnameInfo({\n basePath: this[Internal].basePath,\n buildId: this[Internal].buildId,\n defaultLocale: !this[Internal].options.forceLocale\n ? this[Internal].defaultLocale\n : undefined,\n locale: this[Internal].locale,\n pathname: this[Internal].url.pathname,\n trailingSlash: this[Internal].trailingSlash,\n })\n }\n\n private formatSearch() {\n return this[Internal].url.search\n }\n\n public get buildId() {\n return this[Internal].buildId\n }\n\n public set buildId(buildId: string | undefined) {\n this[Internal].buildId = buildId\n }\n\n public get locale() {\n return this[Internal].locale ?? ''\n }\n\n public set locale(locale: string) {\n if (\n !this[Internal].locale ||\n !this[Internal].options.nextConfig?.i18n?.locales.includes(locale)\n ) {\n throw new TypeError(\n `The NextURL configuration includes no locale \"${locale}\"`\n )\n }\n\n this[Internal].locale = locale\n }\n\n get defaultLocale() {\n return this[Internal].defaultLocale\n }\n\n get domainLocale() {\n return this[Internal].domainLocale\n }\n\n get searchParams() {\n return this[Internal].url.searchParams\n }\n\n get host() {\n return this[Internal].url.host\n }\n\n set host(value: string) {\n this[Internal].url.host = value\n }\n\n get hostname() {\n return this[Internal].url.hostname\n }\n\n set hostname(value: string) {\n this[Internal].url.hostname Line truncated
|
||||
{"offset": {"line": 17040, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/headers.ts"],"sourcesContent":["import type { IncomingHttpHeaders } from 'http'\n\nimport { ReflectAdapter } from './reflect'\n\n/**\n * @internal\n */\nexport class ReadonlyHeadersError extends Error {\n constructor() {\n super(\n 'Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'\n )\n }\n\n public static callable() {\n throw new ReadonlyHeadersError()\n }\n}\n\nexport type ReadonlyHeaders = Headers & {\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n append(...args: any[]): void\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n set(...args: any[]): void\n /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n delete(...args: any[]): void\n}\nexport class HeadersAdapter extends Headers {\n private readonly headers: IncomingHttpHeaders\n\n constructor(headers: IncomingHttpHeaders) {\n // We've already overridden the methods that would be called, so we're just\n // calling the super constructor to ensure that the instanceof check works.\n super()\n\n this.headers = new Proxy(headers, {\n get(target, prop, receiver) {\n // Because this is just an object, we expect that all \"get\" operations\n // are for properties. If it's a \"get\" for a symbol, we'll just return\n // the symbol.\n if (typeof prop === 'symbol') {\n return ReflectAdapter.get(target, prop, receiver)\n }\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return undefined.\n if (typeof original === 'undefined') return\n\n // If the original casing exists, return the value.\n return ReflectAdapter.get(target, original, receiver)\n },\n set(target, prop, value, receiver) {\n if (typeof prop === 'symbol') {\n return ReflectAdapter.set(target, prop, value, receiver)\n }\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, use the prop as the key.\n return ReflectAdapter.set(target, original ?? prop, value, receiver)\n },\n has(target, prop) {\n if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop)\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return false.\n if (typeof original === 'undefined') return false\n\n // If the original casing exists, return true.\n return ReflectAdapter.has(target, original)\n },\n deleteProperty(target, prop) {\n if (typeof prop === 'symbol')\n return ReflectAdapter.deleteProperty(target, prop)\n\n const lowercased = prop.toLowerCase()\n\n // Let's find the original casing of the key. This assumes that there is\n // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n // headers object.\n const original = Object.keys(headers).find(\n (o) => o.toLowerCase() === lowercased\n )\n\n // If the original casing doesn't exist, return true.\n if (typeof original === 'undefined') return true\n\n // If the original casing exists, delete the property.\n return ReflectAdapter.deleteProperty(target, original)\n },\n })\n }\n\n /**\n * Seals a Headers instance to prevent modification by throwing an error when\n * any mutating method is called.\n */\n public static seal(headers: Headers): ReadonlyHeaders {\n return new Proxy<ReadonlyHeaders>(headers, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'append':\n case 'delete':\n Line truncated
|
||||
{"offset": {"line": 17234, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/next-request.ts"],"sourcesContent":["import type { BaseNextRequest } from '../../../base-http'\nimport type { NodeNextRequest } from '../../../base-http/node'\nimport type { WebNextRequest } from '../../../base-http/web'\nimport type { Writable } from 'node:stream'\n\nimport { getRequestMeta } from '../../../request-meta'\nimport { fromNodeOutgoingHttpHeaders } from '../../utils'\nimport { NextRequest } from '../request'\nimport { isNodeNextRequest, isWebNextRequest } from '../../../base-http/helpers'\n\nexport const ResponseAbortedName = 'ResponseAborted'\nexport class ResponseAborted extends Error {\n public readonly name = ResponseAbortedName\n}\n\n/**\n * Creates an AbortController tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * If the `close` event is fired before the `finish` event, then we'll send the\n * `abort` signal.\n */\nexport function createAbortController(response: Writable): AbortController {\n const controller = new AbortController()\n\n // If `finish` fires first, then `res.end()` has been called and the close is\n // just us finishing the stream on our side. If `close` fires first, then we\n // know the client disconnected before we finished.\n response.once('close', () => {\n if (response.writableFinished) return\n\n controller.abort(new ResponseAborted())\n })\n\n return controller\n}\n\n/**\n * Creates an AbortSignal tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * This cannot be done with the request (IncomingMessage or Readable) because\n * the `abort` event will not fire if to data has been fully read (because that\n * will \"close\" the readable stream and nothing fires after that).\n */\nexport function signalFromNodeResponse(response: Writable): AbortSignal {\n const { errored, destroyed } = response\n if (errored || destroyed) {\n return AbortSignal.abort(errored ?? new ResponseAborted())\n }\n\n const { signal } = createAbortController(response)\n return signal\n}\n\nexport class NextRequestAdapter {\n public static fromBaseNextRequest(\n request: BaseNextRequest,\n signal: AbortSignal\n ): NextRequest {\n if (\n // The type check here ensures that `req` is correctly typed, and the\n // environment variable check provides dead code elimination.\n process.env.NEXT_RUNTIME === 'edge' &&\n isWebNextRequest(request)\n ) {\n return NextRequestAdapter.fromWebNextRequest(request)\n } else if (\n // The type check here ensures that `req` is correctly typed, and the\n // environment variable check provides dead code elimination.\n process.env.NEXT_RUNTIME !== 'edge' &&\n isNodeNextRequest(request)\n ) {\n return NextRequestAdapter.fromNodeNextRequest(request, signal)\n } else {\n throw new Error('Invariant: Unsupported NextRequest type')\n }\n }\n\n public static fromNodeNextRequest(\n request: NodeNextRequest,\n signal: AbortSignal\n ): NextRequest {\n // HEAD and GET requests can not have a body.\n let body: BodyInit | null = null\n if (request.method !== 'GET' && request.method !== 'HEAD' && request.body) {\n // @ts-expect-error - this is handled by undici, when streams/web land use it instead\n body = request.body\n }\n\n let url: URL\n if (request.url.startsWith('http')) {\n url = new URL(request.url)\n } else {\n // Grab the full URL from the request metadata.\n const base = getRequestMeta(request, 'initURL')\n if (!base || !base.startsWith('http')) {\n // Because the URL construction relies on the fact that the URL provided\n // is absolute, we need to provide a base URL. We can't use the request\n // URL because it's relative, so we use a dummy URL instead.\n url = new URL(request.url, 'http://n')\n } else {\n url = new URL(request.url, base)\n }\n }\n\n return new NextRequest(url, {\n method: request.method,\n headers: fromNodeOutgoingHttpHeaders(request.headers),\n duplex: 'half',\n signal,\n // geo\n // ip\n // nextConfig\n\n // body can not be passed if request was aborted\n // or we get a Request body was disturbed error\n ...(signal.aborted\n ? {}\n : {\n body,\n }),\n })\n }\n\n public static fromWebNextRequest(request: WebNextRequest): NextRequest {\n // HEAD and GET requests can not have a body.\n let body: ReadableStream | null = null\n if (request.method !== 'GET' && request.method !== 'HEAD') {\n body = request.body\n }\n\n return new NextRequest(request.url, {\n method: request.method,\n headers: fromNodeOutgoingHttpHeaders(request.headers),\n duplex: 'half',\n signal: request.request.siLine truncated
|
||||
{"offset": {"line": 17358, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/reflect.ts"],"sourcesContent":["export class ReflectAdapter {\n static get<T extends object>(\n target: T,\n prop: string | symbol,\n receiver: unknown\n ): any {\n const value = Reflect.get(target, prop, receiver)\n if (typeof value === 'function') {\n return value.bind(target)\n }\n\n return value\n }\n\n static set<T extends object>(\n target: T,\n prop: string | symbol,\n value: any,\n receiver: any\n ): boolean {\n return Reflect.set(target, prop, value, receiver)\n }\n\n static has<T extends object>(target: T, prop: string | symbol): boolean {\n return Reflect.has(target, prop)\n }\n\n static deleteProperty<T extends object>(\n target: T,\n prop: string | symbol\n ): boolean {\n return Reflect.deleteProperty(target, prop)\n }\n}\n"],"names":["ReflectAdapter","get","target","prop","receiver","value","Reflect","bind","set","has","deleteProperty"],"mappings":";;;;AAAO,MAAMA;IACX,OAAOC,IACLC,MAAS,EACTC,IAAqB,EACrBC,QAAiB,EACZ;QACL,MAAMC,QAAQC,QAAQL,GAAG,CAACC,QAAQC,MAAMC;QACxC,IAAI,OAAOC,UAAU,YAAY;YAC/B,OAAOA,MAAME,IAAI,CAACL;QACpB;QAEA,OAAOG;IACT;IAEA,OAAOG,IACLN,MAAS,EACTC,IAAqB,EACrBE,KAAU,EACVD,QAAa,EACJ;QACT,OAAOE,QAAQE,GAAG,CAACN,QAAQC,MAAME,OAAOD;IAC1C;IAEA,OAAOK,IAAsBP,MAAS,EAAEC,IAAqB,EAAW;QACtE,OAAOG,QAAQG,GAAG,CAACP,QAAQC;IAC7B;IAEA,OAAOO,eACLR,MAAS,EACTC,IAAqB,EACZ;QACT,OAAOG,QAAQI,cAAc,CAACR,QAAQC;IACxC;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 17384, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/adapters/request-cookies.ts"],"sourcesContent":["import { RequestCookies } from '../cookies'\n\nimport { ResponseCookies } from '../cookies'\nimport { ReflectAdapter } from './reflect'\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external'\nimport type { RequestStore } from '../../../app-render/work-unit-async-storage.external'\nimport { ActionDidRevalidateStaticAndDynamic } from '../../../../shared/lib/action-revalidation-kind'\n\n/**\n * @internal\n */\nexport class ReadonlyRequestCookiesError extends Error {\n constructor() {\n super(\n 'Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'\n )\n }\n\n public static callable() {\n throw new ReadonlyRequestCookiesError()\n }\n}\n\n// We use this to type some APIs but we don't construct instances directly\nexport type { ResponseCookies }\n\n// The `cookies()` API is a mix of request and response cookies. For `.get()` methods,\n// we want to return the request cookie if it exists. For mutative methods like `.set()`,\n// we want to return the response cookie.\nexport type ReadonlyRequestCookies = Omit<\n RequestCookies,\n 'set' | 'clear' | 'delete'\n> &\n Pick<ResponseCookies, 'set' | 'delete'>\n\nexport class RequestCookiesAdapter {\n public static seal(cookies: RequestCookies): ReadonlyRequestCookies {\n return new Proxy(cookies as any, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'clear':\n case 'delete':\n case 'set':\n return ReadonlyRequestCookiesError.callable\n default:\n return ReflectAdapter.get(target, prop, receiver)\n }\n },\n })\n }\n\n /**\n * @param cookies\n * @returns A fresh object identity backed by the original value\n */\n public static fresh(cookies: ReadonlyRequestCookies): ReadonlyRequestCookies {\n return new Proxy(cookies, {\n get(target, prop, receiver) {\n return ReflectAdapter.get(target, prop, receiver)\n },\n })\n }\n}\n\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies')\n\nexport function getModifiedCookieValues(\n cookies: ResponseCookies\n): ResponseCookie[] {\n const modified: ResponseCookie[] | undefined = (cookies as unknown as any)[\n SYMBOL_MODIFY_COOKIE_VALUES\n ]\n if (!modified || !Array.isArray(modified) || modified.length === 0) {\n return []\n }\n\n return modified\n}\n\ntype SetCookieArgs =\n | [key: string, value: string, cookie?: Partial<ResponseCookie>]\n | [options: ResponseCookie]\n\nexport function appendMutableCookies(\n headers: Headers,\n mutableCookies: ResponseCookies\n): boolean {\n const modifiedCookieValues = getModifiedCookieValues(mutableCookies)\n if (modifiedCookieValues.length === 0) {\n return false\n }\n\n // Return a new response that extends the response with\n // the modified cookies as fallbacks. `res` cookies\n // will still take precedence.\n const resCookies = new ResponseCookies(headers)\n const returnedCookies = resCookies.getAll()\n\n // Set the modified cookies as fallbacks.\n for (const cookie of modifiedCookieValues) {\n resCookies.set(cookie)\n }\n\n // Set the original cookies as the final values.\n for (const cookie of returnedCookies) {\n resCookies.set(cookie)\n }\n\n return true\n}\n\ntype ResponseCookie = NonNullable<\n ReturnType<InstanceType<typeof ResponseCookies>['get']>\n>\n\nexport class MutableRequestCookiesAdapter {\n public static wrap(\n cookies: RequestCookies,\n onUpdateCookies?: (cookies: string[]) => void\n ): ResponseCookies {\n const responseCookies = new ResponseCookies(new Headers())\n for (const cookie of cookies.getAll()) {\n responseCookies.set(cookie)\n }\n\n let modifiedValues: ResponseCookie[] = []\n const modifiedCookies = new Set<string>()\n const updateResponseCookies = () => {\n // TODO-APP: change method of getting workStore\n const workStore = workAsyncStorage.getStore()\n if (workStore) {\n workStore.pathWasRevalidated = ActionDidRevalidateStaticAndDynamic\n }\n\n const allCookies = responseCookies.getAll()\n modifiedValues = allCookies.filter((c) => modifiedCookies.has(c.name))\n if (onUpdateCookies) {\n const serializedCookies: string[] = []\n for (const cookie of modifiedValues) {\n const tempCookies = new ResponseCookies(new Headers())\n tempCookies.set(cookie)\n serializedCookies.push(tempCookies.toString())\n }\n\n onUpdateCookies(serializedCookies)\n }\n }\n\n const wrappedCookies = new Proxy(responseCookies, {\n get(target, prop, receiver) {\n switch (prop) {\n // A special symbol tLine truncated
|
||||
{"offset": {"line": 17590, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/cookies.ts"],"sourcesContent":["export {\n RequestCookies,\n ResponseCookies,\n stringifyCookie,\n} from 'next/dist/compiled/@edge-runtime/cookies'\n"],"names":["RequestCookies","ResponseCookies","stringifyCookie"],"mappings":";AAAA,SACEA,cAAc,EACdC,eAAe,EACfC,eAAe,QACV,2CAA0C","ignoreList":[0]}},
|
||||
{"offset": {"line": 17597, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/spec-extension/request.ts"],"sourcesContent":["import type { I18NConfig } from '../../config-shared'\nimport { NextURL } from '../next-url'\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils'\nimport { RemovedUAError, RemovedPageError } from '../error'\nimport { RequestCookies } from './cookies'\n\nexport const INTERNALS = Symbol('internal request')\n\n/**\n * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request)\n */\nexport class NextRequest extends Request {\n /** @internal */\n [INTERNALS]: {\n cookies: RequestCookies\n url: string\n nextUrl: NextURL\n }\n\n constructor(input: URL | RequestInfo, init: RequestInit = {}) {\n const url =\n typeof input !== 'string' && 'url' in input ? input.url : String(input)\n\n validateURL(url)\n\n // node Request instance requires duplex option when a body\n // is present or it errors, we don't handle this for\n // Request being passed in since it would have already\n // errored if this wasn't configured\n if (process.env.NEXT_RUNTIME !== 'edge') {\n if (init.body && init.duplex !== 'half') {\n init.duplex = 'half'\n }\n }\n\n if (input instanceof Request) super(input, init)\n else super(url, init)\n\n const nextUrl = new NextURL(url, {\n headers: toNodeOutgoingHttpHeaders(this.headers),\n nextConfig: init.nextConfig,\n })\n this[INTERNALS] = {\n cookies: new RequestCookies(this.headers),\n nextUrl,\n url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE\n ? url\n : nextUrl.toString(),\n }\n }\n\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n nextUrl: this.nextUrl,\n url: this.url,\n // rest of props come from Request\n bodyUsed: this.bodyUsed,\n cache: this.cache,\n credentials: this.credentials,\n destination: this.destination,\n headers: Object.fromEntries(this.headers),\n integrity: this.integrity,\n keepalive: this.keepalive,\n method: this.method,\n mode: this.mode,\n redirect: this.redirect,\n referrer: this.referrer,\n referrerPolicy: this.referrerPolicy,\n signal: this.signal,\n }\n }\n\n public get cookies() {\n return this[INTERNALS].cookies\n }\n\n public get nextUrl() {\n return this[INTERNALS].nextUrl\n }\n\n /**\n * @deprecated\n * `page` has been deprecated in favour of `URLPattern`.\n * Read more: https://nextjs.org/docs/messages/middleware-request-page\n */\n public get page() {\n throw new RemovedPageError()\n }\n\n /**\n * @deprecated\n * `ua` has been removed in favour of \\`userAgent\\` function.\n * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n */\n public get ua() {\n throw new RemovedUAError()\n }\n\n public get url() {\n return this[INTERNALS].url\n }\n}\n\nexport interface RequestInit extends globalThis.RequestInit {\n nextConfig?: {\n basePath?: string\n i18n?: I18NConfig | null\n trailingSlash?: boolean\n }\n signal?: AbortSignal\n // see https://github.com/whatwg/fetch/pull/1457\n duplex?: 'half'\n}\n"],"names":["NextURL","toNodeOutgoingHttpHeaders","validateURL","RemovedUAError","RemovedPageError","RequestCookies","INTERNALS","Symbol","NextRequest","Request","constructor","input","init","url","String","process","env","NEXT_RUNTIME","body","duplex","nextUrl","headers","nextConfig","cookies","__NEXT_NO_MIDDLEWARE_URL_NORMALIZE","toString","for","bodyUsed","cache","credentials","destination","Object","fromEntries","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","page","ua"],"mappings":";;;;;;AACA,SAASA,OAAO,QAAQ,cAAa;AACrC,SAASC,yBAAyB,EAAEC,WAAW,QAAQ,WAAU;AACjE,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,WAAU;;AAC3D,SAASC,cAAc,QAAQ,YAAW;;;;;AAEnC,MAAMC,YAAYC,OAAO,oBAAmB;AAO5C,MAAMC,oBAAoBC;IAQ/BC,YAAYC,KAAwB,EAAEC,OAAoB,CAAC,CAAC,CAAE;QAC5D,MAAMC,MACJ,OAAOF,UAAU,YAAY,SAASA,QAAQA,MAAME,GAAG,GAAGC,OAAOH;YAEnET,4KAAAA,EAAYW;QAEZ,2DAA2D;QAC3D,oDAAoD;QACpD,sDAAsD;QACtD,oCAAoC;QACpC,IAAIE,QAAQC,GAAG,CAACC,YAAY,KAAK,OAAQ;YACvC,IAAIL,KAAKM,IAAI,IAAIN,KAAKO,MAAM,KAAK,QAAQ;gBACvCP,KAAKO,MAAM,GAAG;YAChB;QACF;QAEA,IAAIR,iBAAiBF,SAAS,KAAK,CAACE,OAAOC;aACtC,KAAK,CAACC,KAAKD;QAEhB,MAAMQ,UAAU,IAAIpB,8KAAAA,CAAQa,KAAK;YAC/BQ,aAASpB,0LAAAA,EAA0B,IAAI,CAACoB,OAAO;YAC/CC,YAAYV,KAAKU,UAAU;QAC7B;QACA,IAAI,CAAChB,UAAU,GAAG;YAChBiB,SAAS,IAAIlB,mMAAAA,CAAe,IAAI,CAACgB,OAAO;YACxCD;YACAP,KAAKE,QAAQC,GAAG,CAACQ,0BACbX,QAD+C,kBAE/CO,QAAQK,QAAQ;QACtB;IACF;IAEA,CAAClB,OAAOmB,GAAG,CAAC,+BAA+B,GAAG;QAC5C,OAAO;YACLH,SAAS,IAAI,CAACA,OAAO;YACrBH,SAAS,IAAI,CAACA,OAAO;YACrBP,KLine truncated
|
||||
{"offset": {"line": 17687, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/web/utils.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\nimport {\n NEXT_INTERCEPTION_MARKER_PREFIX,\n NEXT_QUERY_PARAM_PREFIX,\n} from '../../lib/constants'\n\n/**\n * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any\n * headers with multiple values will be joined with a comma and space. Any\n * headers that have an undefined value will be ignored and others will be\n * coerced to strings.\n *\n * @param nodeHeaders the headers object to convert\n * @returns the converted headers object\n */\nexport function fromNodeOutgoingHttpHeaders(\n nodeHeaders: OutgoingHttpHeaders\n): Headers {\n const headers = new Headers()\n for (let [key, value] of Object.entries(nodeHeaders)) {\n const values = Array.isArray(value) ? value : [value]\n for (let v of values) {\n if (typeof v === 'undefined') continue\n if (typeof v === 'number') {\n v = v.toString()\n }\n\n headers.append(key, v)\n }\n }\n return headers\n}\n\n/*\n Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas\n that are within a single set-cookie field-value, such as in the Expires portion.\n This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2\n Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128\n React Native's fetch does this for *every* header, including set-cookie.\n \n Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25\n Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation\n*/\nexport function splitCookiesString(cookiesString: string) {\n var cookiesStrings = []\n var pos = 0\n var start\n var ch\n var lastComma\n var nextStart\n var cookiesSeparatorFound\n\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1\n }\n return pos < cookiesString.length\n }\n\n function notSpecialChar() {\n ch = cookiesString.charAt(pos)\n\n return ch !== '=' && ch !== ';' && ch !== ','\n }\n\n while (pos < cookiesString.length) {\n start = pos\n cookiesSeparatorFound = false\n\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos)\n if (ch === ',') {\n // ',' is a cookie separator if we have later first '=', not ';' or ','\n lastComma = pos\n pos += 1\n\n skipWhitespace()\n nextStart = pos\n\n while (pos < cookiesString.length && notSpecialChar()) {\n pos += 1\n }\n\n // currently special character\n if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') {\n // we found cookies separator\n cookiesSeparatorFound = true\n // pos is inside the next cookie, so back up and return it.\n pos = nextStart\n cookiesStrings.push(cookiesString.substring(start, lastComma))\n start = pos\n } else {\n // in param ',' or param separator ';',\n // we continue from that comma\n pos = lastComma + 1\n }\n } else {\n pos += 1\n }\n }\n\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length))\n }\n }\n\n return cookiesStrings\n}\n\n/**\n * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is\n * required to support the set-cookie header, which may have multiple values.\n *\n * @param headers the headers object to convert\n * @returns the converted headers object\n */\nexport function toNodeOutgoingHttpHeaders(\n headers: Headers\n): OutgoingHttpHeaders {\n const nodeHeaders: OutgoingHttpHeaders = {}\n const cookies: string[] = []\n if (headers) {\n for (const [key, value] of headers.entries()) {\n if (key.toLowerCase() === 'set-cookie') {\n // We may have gotten a comma joined string of cookies, or multiple\n // set-cookie headers. We need to merge them into one header array\n // to represent all the cookies.\n cookies.push(...splitCookiesString(value))\n nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies\n } else {\n nodeHeaders[key] = value\n }\n }\n }\n return nodeHeaders\n}\n\n/**\n * Validate the correctness of a user-provided URL.\n */\nexport function validateURL(url: string | URL): string {\n try {\n return String(new URL(String(url)))\n } catch (error: any) {\n throw new Error(\n `URL is malformed \"${String(\n url\n )}\". Please use only absolute URLs - https://nextjs.org/docs/messages/midLine truncated
|
||||
{"offset": {"line": 17819, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/action-revalidation-kind.ts"],"sourcesContent":["export type ActionRevalidationKind = 0 | 1 | 2\n\nexport const ActionDidNotRevalidate = 0\nexport const ActionDidRevalidateStaticAndDynamic = 1\nexport const ActionDidRevalidateDynamicOnly = 2\n"],"names":["ActionDidNotRevalidate","ActionDidRevalidateStaticAndDynamic","ActionDidRevalidateDynamicOnly"],"mappings":";;;;;;;;AAEO,MAAMA,yBAAyB,EAAC;AAChC,MAAMC,sCAAsC,EAAC;AAC7C,MAAMC,iCAAiC,EAAC","ignoreList":[0]}},
|
||||
{"offset": {"line": 17834, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/app-router-types.ts"],"sourcesContent":["/**\n * App Router types - Client-safe types for the Next.js App Router\n *\n * This file contains type definitions that can be safely imported\n * by both client-side and server-side code without circular dependencies.\n */\n\nimport type React from 'react'\n\nexport type LoadingModuleData =\n | [React.JSX.Element, React.ReactNode, React.ReactNode]\n | null\n\nimport type { VaryParamsIterable } from './segment-cache/vary-params-decoding'\n\n/** viewport metadata node */\nexport type HeadData = React.ReactNode\n\n/**\n * Cache node used in app-router / layout-router.\n */\n\nexport type CacheNode = {\n /**\n * When rsc is not null, it represents the RSC data for the\n * corresponding segment.\n *\n * `null` is a valid React Node but because segment data is always a\n * <LayoutRouter> component, we can use `null` to represent empty. When it is\n * null, it represents missing data, and rendering should suspend.\n */\n rsc: React.ReactNode\n\n /**\n * Represents a static version of the segment that can be shown immediately,\n * and may or may not contain dynamic holes. It's prefetched before a\n * navigation occurs.\n *\n * During rendering, we will choose whether to render `rsc` or `prefetchRsc`\n * with `useDeferredValue`. As with the `rsc` field, a value of `null` means\n * no value was provided. In this case, the LayoutRouter will go straight to\n * rendering the `rsc` value; if that one is also missing, it will suspend and\n * trigger a lazy fetch.\n */\n prefetchRsc: React.ReactNode\n\n prefetchHead: HeadData | null\n\n head: HeadData\n\n slots: Record<string, CacheNode> | null\n\n /**\n * A shared mutable ref that tracks whether this segment should be scrolled\n * to. All new segments created during a single navigation share the same\n * ref. When any segment's scroll handler fires, it sets `current` to\n * `false` so no other segment scrolls for the same navigation.\n *\n * `null` means this segment is not a scroll target (e.g., a reused shared\n * layout segment).\n */\n scrollRef: ScrollRef | null\n\n /**\n * Globally-unique identifier minted from a monotonic counter when the\n * CacheNode is freshly created. Surfaced to user code as a string via\n * `useRouter().bfcacheId` and intended to be used as a React `key` to\n * opt out of Activity-based state preservation on fresh navigations.\n *\n * Preserved when the CacheNode is reused (shared layouts, refresh,\n * search/hash-only navigations) or restored from the BFCache during a\n * back/forward navigation.\n */\n bfcacheId: number\n}\n\n/**\n * A mutable ref shared across all new segments created during a single\n * navigation. Used to ensure that only one segment scrolls per navigation.\n */\nexport type ScrollRef = { current: boolean }\n\nexport type DynamicParamTypes =\n | 'catchall'\n | 'catchall-intercepted-(..)(..)'\n | 'catchall-intercepted-(.)'\n | 'catchall-intercepted-(..)'\n | 'catchall-intercepted-(...)'\n | 'optional-catchall'\n | 'dynamic'\n | 'dynamic-intercepted-(..)(..)'\n | 'dynamic-intercepted-(.)'\n | 'dynamic-intercepted-(..)'\n | 'dynamic-intercepted-(...)'\n\nexport type DynamicParamTypesShort =\n | 'c'\n | 'ci(..)(..)'\n | 'ci(.)'\n | 'ci(..)'\n | 'ci(...)'\n | 'oc'\n | 'd'\n | 'di(..)(..)'\n | 'di(.)'\n | 'di(..)'\n | 'di(...)'\n\n// The tuple form of a segment, used for dynamic route params\nexport type DynamicSegmentTuple = [\n // Param name\n paramName: string,\n // Param cache key (almost the same as the value, but arrays are\n // concatenated into strings)\n // TODO: We should change this to just be the value. Currently we convert\n // it back to a value when passing to useParams. It only needs to be\n // a string when converted to a a cache key, but that doesn't mean we\n // need to store it as that representation.\n paramCacheKey: string,\n // Dynamic param type\n dynamicParamType: DynamicParamTypesShort,\n // Static sibling segments at the same URL level. Used by the client\n // router to determine if a prefetch can be reused when navigating to\n // a static sibling of a dynamic route. For example, if the route is\n // /products/[id] and there's also /products/sale, then staticSiblings\n // would be ['sale']. null means the siblings are unknown (e.g. in\n // webpack dev mode).\n staticSiblings: readonly string[] | null,\n]\n\nexport type Segment = string | DynamicSegmentTuple\n\n/**\n * Router state\n */\nexport type FlightRouterState = [\n segment: Segment,\n parallelRoutes: { [parallelRouterKey: string]: FlightRouterState },\n refreshState?: CompressedRefreshState | null,\n /**\n * - \"refetch\" is used during a request to inform the server where rendering\n * should start from.\n *\n * - \"insidLine truncated
|
||||
{"offset": {"line": 17975, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/deep-freeze.ts"],"sourcesContent":["import type { DeepReadonly } from './deep-readonly'\n\n/**\n * Recursively freezes an object and all of its properties. This prevents the\n * object from being modified at runtime. When the JS runtime is running in\n * strict mode, any attempts to modify a frozen object will throw an error.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n * @param obj The object to freeze.\n */\nexport function deepFreeze<T extends object>(obj: T): DeepReadonly<T> {\n // If the object is already frozen, there's no need to freeze it again.\n if (Object.isFrozen(obj)) return obj as DeepReadonly<T>\n\n // An array is an object, but we also want to freeze each element in the array\n // as well.\n if (Array.isArray(obj)) {\n for (const item of obj) {\n if (!item || typeof item !== 'object') continue\n deepFreeze(item)\n }\n\n return Object.freeze(obj) as DeepReadonly<T>\n }\n\n for (const value of Object.values(obj)) {\n if (!value || typeof value !== 'object') continue\n deepFreeze(value)\n }\n\n return Object.freeze(obj) as DeepReadonly<T>\n}\n"],"names":["deepFreeze","obj","Object","isFrozen","Array","isArray","item","freeze","value","values"],"mappings":"AAEA;;;;;;;CAOC,GACD;;;;AAAO,SAASA,WAA6BC,GAAM;IACjD,uEAAuE;IACvE,IAAIC,OAAOC,QAAQ,CAACF,MAAM,OAAOA;IAEjC,8EAA8E;IAC9E,WAAW;IACX,IAAIG,MAAMC,OAAO,CAACJ,MAAM;QACtB,KAAK,MAAMK,QAAQL,IAAK;YACtB,IAAI,CAACK,QAAQ,OAAOA,SAAS,UAAU;YACvCN,WAAWM;QACb;QAEA,OAAOJ,OAAOK,MAAM,CAACN;IACvB;IAEA,KAAK,MAAMO,SAASN,OAAOO,MAAM,CAACR,KAAM;QACtC,IAAI,CAACO,SAAS,OAAOA,UAAU,UAAU;QACzCR,WAAWQ;IACb;IAEA,OAAON,OAAOK,MAAM,CAACN;AACvB","ignoreList":[0]}},
|
||||
{"offset": {"line": 18008, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/entry-constants.ts"],"sourcesContent":["export const UNDERSCORE_NOT_FOUND_ROUTE = '/_not-found'\nexport const UNDERSCORE_NOT_FOUND_ROUTE_ENTRY = `${UNDERSCORE_NOT_FOUND_ROUTE}/page`\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE = '/_global-error'\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY = `${UNDERSCORE_GLOBAL_ERROR_ROUTE}/page`\n"],"names":["UNDERSCORE_NOT_FOUND_ROUTE","UNDERSCORE_NOT_FOUND_ROUTE_ENTRY","UNDERSCORE_GLOBAL_ERROR_ROUTE","UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY"],"mappings":";;;;;;;;;;AAAO,MAAMA,6BAA6B,cAAa;AAChD,MAAMC,mCAAmC,GAAGD,2BAA2B,KAAK,CAAC,CAAA;AAC7E,MAAME,gCAAgC,iBAAgB;AACtD,MAAMC,sCAAsC,GAAGD,8BAA8B,KAAK,CAAC,CAAA","ignoreList":[0]}},
|
||||
{"offset": {"line": 18026, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/errors/constants.ts"],"sourcesContent":["export const MISSING_ROOT_TAGS_ERROR = 'NEXT_MISSING_ROOT_TAGS'\n"],"names":["MISSING_ROOT_TAGS_ERROR"],"mappings":";;;;AAAO,MAAMA,0BAA0B,yBAAwB","ignoreList":[0]}},
|
||||
{"offset": {"line": 18035, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/get-hostname.ts"],"sourcesContent":["import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n parsed: { hostname?: string | null },\n headers?: OutgoingHttpHeaders\n): string | undefined {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname: string\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0]\n } else if (parsed.hostname) {\n hostname = parsed.hostname\n } else return\n\n return hostname.toLowerCase()\n}\n"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD;;;;AAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,SAASE,QAAQ,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B","ignoreList":[0]}},
|
||||
{"offset": {"line": 18059, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/hash.ts"],"sourcesContent":["// http://www.cse.yorku.ca/~oz/hash.html\n// More specifically, 32-bit hash via djbxor\n// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)\n// This is due to number type differences between rust for turbopack to js number types,\n// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching\n// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation\n// as can gaurantee determinstic output from 32bit hash.\nexport function djb2Hash(str: string) {\n let hash = 5381\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = ((hash << 5) + hash + char) & 0xffffffff\n }\n return hash >>> 0\n}\n\nexport function hexHash(str: string) {\n return djb2Hash(str).toString(36).slice(0, 5)\n}\n"],"names":["djb2Hash","str","hash","i","length","char","charCodeAt","hexHash","toString","slice"],"mappings":"AAAA,wCAAwC;AACxC,4CAA4C;AAC5C,iHAAiH;AACjH,wFAAwF;AACxF,gGAAgG;AAChG,wHAAwH;AACxH,wDAAwD;;;;;;;AACjD,SAASA,SAASC,GAAW;IAClC,IAAIC,OAAO;IACX,IAAK,IAAIC,IAAI,GAAGA,IAAIF,IAAIG,MAAM,EAAED,IAAK;QACnC,MAAME,OAAOJ,IAAIK,UAAU,CAACH;QAC5BD,OAASA,CAAAA,QAAQ,CAAA,IAAKA,OAAOG,OAAQ;IACvC;IACA,OAAOH,SAAS;AAClB;AAEO,SAASK,QAAQN,GAAW;IACjC,OAAOD,SAASC,KAAKO,QAAQ,CAAC,IAAIC,KAAK,CAAC,GAAG;AAC7C","ignoreList":[0]}},
|
||||
{"offset": {"line": 18087, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/i18n/detect-domain-locale.ts"],"sourcesContent":["import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n domainItems?: readonly DomainLocale[],\n hostname?: string,\n detectedLocale?: string\n) {\n if (!domainItems) return\n\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase()\n }\n\n for (const item of domainItems) {\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n if (\n hostname === domainHostname ||\n detectedLocale === item.defaultLocale.toLowerCase() ||\n item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n ) {\n return item\n }\n }\n}\n"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":";;;;AAEO,SAASA,mBACdC,WAAqC,EACrCC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;QAC9B,yBAAyB;QACzB,MAAMK,iBAAiBD,KAAKE,MAAM,EAAEC,MAAM,KAAK,EAAE,CAAC,EAAE,CAACJ;QACrD,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MACjDC,KAAKK,OAAO,EAAEC,KAAK,CAACC,SAAWA,OAAOR,WAAW,OAAOD,iBACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 18108, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/i18n/normalize-locale-path.ts"],"sourcesContent":["export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap<readonly string[], readonly string[]>()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n"],"names":["cache","WeakMap","normalizeLocalePath","pathname","locales","lowercasedLocales","get","map","locale","toLowerCase","set","detectedLocale","segments","split","segment","index","indexOf","slice","length"],"mappings":";;;;AAKA;;;;CAIC,GACD,MAAMA,QAAQ,IAAIC;AAWX,SAASC,oBACdC,QAAgB,EAChBC,OAA2B;IAE3B,sDAAsD;IACtD,IAAI,CAACA,SAAS,OAAO;QAAED;IAAS;IAEhC,iEAAiE;IACjE,IAAIE,oBAAoBL,MAAMM,GAAG,CAACF;IAClC,IAAI,CAACC,mBAAmB;QACtBA,oBAAoBD,QAAQG,GAAG,CAAC,CAACC,SAAWA,OAAOC,WAAW;QAC9DT,MAAMU,GAAG,CAACN,SAASC;IACrB;IAEA,IAAIM;IAEJ,oEAAoE;IACpE,yEAAyE;IACzE,MAAMC,WAAWT,SAASU,KAAK,CAAC,KAAK;IAErC,0EAA0E;IAC1E,UAAU;IACV,IAAI,CAACD,QAAQ,CAAC,EAAE,EAAE,OAAO;QAAET;IAAS;IAEpC,0DAA0D;IAC1D,MAAMW,UAAUF,QAAQ,CAAC,EAAE,CAACH,WAAW;IAEvC,yEAAyE;IACzE,mCAAmC;IACnC,MAAMM,QAAQV,kBAAkBW,OAAO,CAACF;IACxC,IAAIC,QAAQ,GAAG,OAAO;QAAEZ;IAAS;IAEjC,oCAAoC;IACpCQ,iBAAiBP,OAAO,CAACW,MAAM;IAE/B,gDAAgD;IAChDZ,WAAWA,SAASc,KAAK,CAACN,eAAeO,MAAM,GAAG,MAAM;IAExD,OAAO;QAAEf;QAAUQ;IAAe;AACpC","ignoreList":[0]}},
|
||||
{"offset": {"line": 18158, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/instant-messages.ts"],"sourcesContent":["export function createUnrenderedSegmentError(\n route: string,\n missingFiles: readonly string[]\n): Error {\n let message = `Route \"${route}\": Could not validate that a segment in your UI has instant navigation.`\n if (missingFiles.length > 0) {\n const label =\n missingFiles.length === 1 ? 'Dropped segment' : 'Dropped segments'\n message +=\n `\\n\\nThis segment was dropped from rendering. Issues that would prevent instant navigation will go undetected.` +\n `\\n\\n${label}:\\n${missingFiles.map((p) => ` ${p}`).join('\\n')}` +\n `\\n\\nWays to fix this:` +\n `\\n - [render] Render the dropped segment` +\n `\\n - [ignore] Set \\`export const instant = false\\` to opt the dropped segment out of instant-navigation validation` +\n `\\n\\nLearn more: https://nextjs.org/docs/messages/instant-unrendered-segment`\n }\n return new Error(message)\n}\n\nexport function createLinkPrefetchPartialError(pathname: string): Error {\n return new Error(\n `Next.js encountered dynamic data during prefetching for \"${pathname}\".\\n\\n` +\n `This will lead to slower, more expensive prefetches.\\n\\n` +\n `Ways to fix this:\\n` +\n ` - [upgrade] Opt into Partial Prefetching by exporting \\`const prefetch = 'partial'\\` from the page or layout, or by setting \\`partialPrefetching: true\\` in next.config to opt the whole app in\\n` +\n ` - [disable] Remove \\`prefetch={true}\\` from the <Link> to use the default prefetch\\n` +\n ` - [ignore] Set \\`export const instant = false\\` to opt the route out of instant-navigation validation\\n\\n` +\n `Learn more: https://nextjs.org/docs/messages/instant-link-prefetch-partial`\n )\n}\n"],"names":["createUnrenderedSegmentError","route","missingFiles","message","length","label","map","p","join","Error","createLinkPrefetchPartialError","pathname"],"mappings":";;;;;;AAAO,SAASA,6BACdC,KAAa,EACbC,YAA+B;IAE/B,IAAIC,UAAU,CAAC,OAAO,EAAEF,MAAM,uEAAuE,CAAC;IACtG,IAAIC,aAAaE,MAAM,GAAG,GAAG;QAC3B,MAAMC,QACJH,aAAaE,MAAM,KAAK,IAAI,oBAAoB;QAClDD,WACE,CAAC,6GAA6G,CAAC,GAC/G,CAAC,IAAI,EAAEE,MAAM,GAAG,EAAEH,aAAaI,GAAG,CAAC,CAACC,IAAM,CAAC,EAAE,EAAEA,GAAG,EAAEC,IAAI,CAAC,OAAO,GAChE,CAAC,qBAAqB,CAAC,GACvB,CAAC,yCAAyC,CAAC,GAC3C,CAAC,mHAAmH,CAAC,GACrH,CAAC,2EAA2E,CAAC;IACjF;IACA,OAAO,OAAA,cAAkB,CAAlB,IAAIC,MAAMN,UAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAiB;AAC1B;AAEO,SAASO,+BAA+BC,QAAgB;IAC7D,OAAO,OAAA,cAQN,CARM,IAAIF,MACT,CAAC,yDAAyD,EAAEE,SAAS,MAAM,CAAC,GAC1E,CAAC,wDAAwD,CAAC,GAC1D,CAAC,mBAAmB,CAAC,GACrB,CAAC,mMAAmM,CAAC,GACrM,CAAC,sFAAsF,CAAC,GACxF,CAAC,2GAA2G,CAAC,GAC7G,CAAC,0EAA0E,CAAC,GAPzE,qBAAA;eAAA;oBAAA;sBAAA;IAQP;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 18187, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/invariant-error.ts"],"sourcesContent":["export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n"],"names":["InvariantError","Error","constructor","message","options","endsWith","name"],"mappings":";;;;AAAO,MAAMA,uBAAuBC;IAClCC,YAAYC,OAAe,EAAEC,OAAsB,CAAE;QACnD,KAAK,CACH,CAAC,WAAW,EAAED,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,IAAI,0BAA0B,CAAC,EACzFC;QAFF,OAAA,cAGC,CAHD,IAGC,EAHD,qBAAA;mBAAA;wBAAA;0BAAA;QAGA;QACA,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 18206, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/is-plain-object.ts"],"sourcesContent":["export function getObjectClassLabel(value: any): string {\n return Object.prototype.toString.call(value)\n}\n\nexport function isPlainObject(value: any): boolean {\n if (getObjectClassLabel(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n\n /**\n * this used to be previously:\n *\n * `return prototype === null || prototype === Object.prototype`\n *\n * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n *\n * It was changed to the current implementation since it's resilient to serialization.\n */\n return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n"],"names":["getObjectClassLabel","value","Object","prototype","toString","call","isPlainObject","getPrototypeOf","hasOwnProperty"],"mappings":";;;;;;AAAO,SAASA,oBAAoBC,KAAU;IAC5C,OAAOC,OAAOC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ;AACxC;AAEO,SAASK,cAAcL,KAAU;IACtC,IAAID,oBAAoBC,WAAW,mBAAmB;QACpD,OAAO;IACT;IAEA,MAAME,YAAYD,OAAOK,cAAc,CAACN;IAExC;;;;;;;;GAQC,GACD,OAAOE,cAAc,QAAQA,UAAUK,cAAc,CAAC;AACxD","ignoreList":[0]}},
|
||||
{"offset": {"line": 18234, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/is-thenable.ts"],"sourcesContent":["/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n"],"names":["isThenable","promise","then"],"mappings":"AAAA;;;;;CAKC,GACD;;;;AAAO,SAASA,WACdC,OAAuB;IAEvB,OACEA,YAAY,QACZ,OAAOA,YAAY,YACnB,UAAUA,WACV,OAAOA,QAAQC,IAAI,KAAK;AAE5B","ignoreList":[0]}},
|
||||
{"offset": {"line": 18249, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/isomorphic/path.js"],"sourcesContent":["/**\n * This module is for next.js server internal usage of path module.\n * It will use native path module for nodejs runtime.\n * It will use path-browserify polyfill for edge runtime.\n */\nlet path\n\nif (process.env.NEXT_RUNTIME === 'edge') {\n path = require('next/dist/compiled/path-browserify')\n} else {\n path = require('path')\n}\n\nmodule.exports = path\n"],"names":["path","process","env","NEXT_RUNTIME","require","module","exports"],"mappings":"AAAA;;;;CAIC,GACD,IAAIA;AAEJ,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;KAElC;IACLH,OAAOI,QAAQ;AACjB;AAEAC,OAAOC,OAAO,GAAGN","ignoreList":[0]}},
|
||||
{"offset": {"line": 18264, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"sourcesContent":["// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":";;;;;;AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAGhB,MAAMC,0BAA0BC;IAGrCC,YAA4BC,MAAc,CAAE;QAC1C,KAAK,CAAC,CAAC,mCAAmC,EAAEA,QAAQ,GAAA,IAAA,CAD1BA,MAAAA,GAAAA,QAAAA,IAAAA,CAFZC,MAAAA,GAASL;IAIzB;AACF;AAGO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAE,GAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 18287, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/page-path/ensure-leading-slash.ts"],"sourcesContent":["/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD;;;;AAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAO,CAAC,CAAC,EAAEA,MAAM;AACjD","ignoreList":[0]}},
|
||||
{"offset": {"line": 18301, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/promise-with-resolvers.ts"],"sourcesContent":["export function createPromiseWithResolvers<T>(): PromiseWithResolvers<T> {\n // Shim of Stage 4 Promise.withResolvers proposal\n let resolve: (value: T | PromiseLike<T>) => void\n let reject: (reason: any) => void\n const promise = new Promise<T>((res, rej) => {\n resolve = res\n reject = rej\n })\n return { resolve: resolve!, reject: reject!, promise }\n}\n"],"names":["createPromiseWithResolvers","resolve","reject","promise","Promise","res","rej"],"mappings":";;;;AAAO,SAASA;IACd,iDAAiD;IACjD,IAAIC;IACJ,IAAIC;IACJ,MAAMC,UAAU,IAAIC,QAAW,CAACC,KAAKC;QACnCL,UAAUI;QACVH,SAASI;IACX;IACA,OAAO;QAAEL,SAASA;QAAUC,QAAQA;QAASC;IAAQ;AACvD","ignoreList":[0]}},
|
||||
{"offset": {"line": 18323, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/request-insights.ts"],"sourcesContent":["export type RequestInsightKind = 'request' | 'instant-insights'\n\nexport type RequestInsightIdentity = {\n requestId: string\n kind?: RequestInsightKind\n}\n\nexport function getRequestInsightKind(\n insight: Pick<RequestInsightIdentity, 'kind'>\n): RequestInsightKind {\n return insight.kind ?? 'request'\n}\n\nexport function getRequestInsightKey(insight: RequestInsightIdentity): string {\n return `${getRequestInsightKind(insight)}:${insight.requestId}`\n}\n"],"names":["getRequestInsightKind","insight","kind","getRequestInsightKey","requestId"],"mappings":";;;;;;AAOO,SAASA,sBACdC,OAA6C;IAE7C,OAAOA,QAAQC,IAAI,IAAI;AACzB;AAEO,SAASC,qBAAqBF,OAA+B;IAClE,OAAO,GAAGD,sBAAsBC,SAAS,CAAC,EAAEA,QAAQG,SAAS,EAAE;AACjE","ignoreList":[0]}},
|
||||
{"offset": {"line": 18339, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/routes/app.ts"],"sourcesContent":["import { InvariantError } from '../../invariant-error'\nimport { getSegmentParam, type SegmentParam } from '../utils/get-segment-param'\nimport {\n INTERCEPTION_ROUTE_MARKERS,\n type InterceptionMarker,\n} from '../utils/interception-routes'\n\nexport type RouteGroupAppRouteSegment = {\n type: 'route-group'\n name: string\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\nexport type ParallelRouteAppRouteSegment = {\n type: 'parallel-route'\n name: string\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\nexport type StaticAppRouteSegment = {\n type: 'static'\n name: string\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\nexport type DynamicAppRouteSegment = {\n type: 'dynamic'\n name: string\n param: SegmentParam\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\n/**\n * Represents a single segment in a route path.\n * Can be either static (e.g., \"blog\") or dynamic (e.g., \"[slug]\").\n */\nexport type AppRouteSegment =\n | StaticAppRouteSegment\n | DynamicAppRouteSegment\n | RouteGroupAppRouteSegment\n | ParallelRouteAppRouteSegment\n\nexport type NormalizedAppRouteSegment =\n | StaticAppRouteSegment\n | DynamicAppRouteSegment\n\nfunction normalizeEncodedDynamicPlaceholder(segment: string): string {\n if (!/%5b|%5d/i.test(segment)) {\n return segment\n }\n\n try {\n const decodedSegment = decodeURIComponent(segment)\n return getSegmentParam(decodedSegment) ? decodedSegment : segment\n } catch {\n return segment\n }\n}\n\nexport function parseAppRouteSegment(segment: string): AppRouteSegment | null {\n if (segment === '') {\n return null\n }\n\n // Check if the segment starts with an interception marker\n const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n segment.startsWith(m)\n )\n\n const param = getSegmentParam(segment)\n if (param) {\n return {\n type: 'dynamic',\n name: segment,\n param,\n interceptionMarker,\n }\n } else if (segment.startsWith('(') && segment.endsWith(')')) {\n return {\n type: 'route-group',\n name: segment,\n interceptionMarker,\n }\n } else if (segment.startsWith('@')) {\n return {\n type: 'parallel-route',\n name: segment,\n interceptionMarker,\n }\n } else {\n return {\n type: 'static',\n name: segment,\n interceptionMarker,\n }\n }\n}\n\nexport type AppRoute = {\n normalized: boolean\n pathname: string\n segments: AppRouteSegment[]\n dynamicSegments: DynamicAppRouteSegment[]\n interceptionMarker: InterceptionMarker | undefined\n interceptingRoute: AppRoute | undefined\n interceptedRoute: AppRoute | undefined\n}\n\nexport type NormalizedAppRoute = Omit<AppRoute, 'normalized' | 'segments'> & {\n normalized: true\n segments: NormalizedAppRouteSegment[]\n}\n\nexport function isNormalizedAppRoute(\n route: InterceptionAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isNormalizedAppRoute(\n route: AppRoute | InterceptionAppRoute\n): route is NormalizedAppRoute {\n return route.normalized\n}\n\nexport type InterceptionAppRoute = Omit<\n AppRoute,\n 'interceptionMarker' | 'interceptingRoute' | 'interceptedRoute'\n> & {\n interceptionMarker: InterceptionMarker\n interceptingRoute: AppRoute\n interceptedRoute: AppRoute\n}\n\nexport type NormalizedInterceptionAppRoute = Omit<\n InterceptionAppRoute,\n | 'normalized'\n | 'segments'\n | 'interceptionMarker'\n | 'interceptingRoute'\n | 'interceptedRoute'\n> & {\n normalized: true\n segments: NormalizedAppRouteSegment[]\n interceptionMarker: InterceptionMarker\n interceptingRoute: NormalizedAppRoute\n interceptedRoute: NormalizedAppRoute\n}\n\nexport function isInterceptionAppRoute(\n route: NormalizedAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isInterceptionAppRoute(\n route: AppRoute\n): route is InterceptionAppRoute {\n return (\n route.interceptionMarker !== undefined &&\n route.interceptingRoute !== undefined &&\n route.interceptedRoute !== undefined\n )\n}\n\n// Bitmask for which non-URL segment types to allow during parsing.\n// By default, route groups and parallel routes are rejected because\n// they should have been stripped by normalizeAppPath. These flags\n// let callers opt in to allowing specific types.\nconst OnlyRoutableSegments = /* */ 0b00\nconst AllowParallelSegments = /* */ 0b01\nconst AllowGroupSegments = /* */ 0b10\n\nfunction parseAppRouteImpl(Line truncated
|
||||
{"offset": {"line": 18480, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/add-locale.ts"],"sourcesContent":["import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n"],"names":["addPathPrefix","pathHasPrefix","addLocale","path","locale","defaultLocale","ignorePrefix","lower","toLowerCase"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;;;AAO1C,SAASC,UACdC,IAAY,EACZC,MAAuB,EACvBC,aAAsB,EACtBC,YAAsB;IAEtB,4EAA4E;IAC5E,sBAAsB;IACtB,IAAI,CAACF,UAAUA,WAAWC,eAAe,OAAOF;IAEhD,MAAMI,QAAQJ,KAAKK,WAAW;IAE9B,2EAA2E;IAC3E,iCAAiC;IACjC,IAAI,CAACF,cAAc;QACjB,QAAIL,iNAAAA,EAAcM,OAAO,SAAS,OAAOJ;QACzC,QAAIF,iNAAAA,EAAcM,OAAO,CAAC,CAAC,EAAEH,OAAOI,WAAW,IAAI,GAAG,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,WAAOH,iNAAAA,EAAcG,MAAM,CAAC,CAAC,EAAEC,QAAQ;AACzC","ignoreList":[0]}},
|
||||
{"offset": {"line": 18506, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/add-path-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n"],"names":["parsePath","addPathPrefix","path","prefix","startsWith","pathname","query","hash"],"mappings":";;;;AAAA,SAASA,SAAS,QAAQ,eAAc;;AAMjC,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,OAAGP,qMAAAA,EAAUE;IAC5C,OAAO,GAAGC,SAASE,WAAWC,QAAQC,MAAM;AAC9C","ignoreList":[0]}},
|
||||
{"offset": {"line": 18523, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/add-path-suffix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n"],"names":["parsePath","addPathSuffix","path","suffix","startsWith","pathname","query","hash"],"mappings":";;;;AAAA,SAASA,SAAS,QAAQ,eAAc;;AAOjC,SAASC,cAAcC,IAAY,EAAEC,MAAe;IACzD,IAAI,CAACD,KAAKE,UAAU,CAAC,QAAQ,CAACD,QAAQ;QACpC,OAAOD;IACT;IAEA,MAAM,EAAEG,QAAQ,EAAEC,KAAK,EAAEC,IAAI,EAAE,OAAGP,qMAAAA,EAAUE;IAC5C,OAAO,GAAGG,WAAWF,SAASG,QAAQC,MAAM;AAC9C","ignoreList":[0]}},
|
||||
{"offset": {"line": 18540, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/app-paths.ts"],"sourcesContent":["import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Comparator for sorting app paths so that parallel slot paths (containing\n * `/@`) come before the children/root page path. This ensures the last item\n * is always the children page, which is what `renderPageComponent` reads via\n * `appPaths[appPaths.length - 1]`.\n *\n * Without this, route group prefixes like `(group)` (char code 0x28) sort\n * before `@` (0x40), causing the children page to sort first instead of last\n * and leading to a manifest mismatch / 404 in webpack dev mode.\n */\nexport function compareAppPaths(a: string, b: string): number {\n const aHasSlot = a.includes('/@')\n const bHasSlot = b.includes('/@')\n if (aHasSlot && !bHasSlot) return -1\n if (!aHasSlot && bHasSlot) return 1\n return a.localeCompare(b)\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n"],"names":["ensureLeadingSlash","isGroupSegment","normalizeAppPath","route","split","reduce","pathname","segment","index","segments","length","compareAppPaths","a","b","aHasSlot","includes","bHasSlot","localeCompare","normalizeRscURL","url","replace"],"mappings":";;;;;;;;AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;;;AAqBvC,SAASC,iBAAiBC,KAAa;IAC5C,WAAOH,wNAAAA,EACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,QAAIL,iLAAAA,EAAeM,UAAU;YAC3B,OAAOD;QACT;QAEA,iCAAiC;QACjC,IAAIC,OAAO,CAAC,EAAE,KAAK,KAAK;YACtB,OAAOD;QACT;QAEA,uDAAuD;QACvD,IACGC,CAAAA,YAAY,UAAUA,YAAY,OAAM,KACzCC,UAAUC,SAASC,MAAM,GAAG,GAC5B;YACA,OAAOJ;QACT;QAEA,OAAO,GAAGA,SAAS,CAAC,EAAEC,SAAS;IACjC,GAAG;AAEP;AAYO,SAASI,gBAAgBC,CAAS,EAAEC,CAAS;IAClD,MAAMC,WAAWF,EAAEG,QAAQ,CAAC;IAC5B,MAAMC,WAAWH,EAAEE,QAAQ,CAAC;IAC5B,IAAID,YAAY,CAACE,UAAU,OAAO,CAAC;IACnC,IAAI,CAACF,YAAYE,UAAU,OAAO;IAClC,OAAOJ,EAAEK,aAAa,CAACJ;AACzB;AAMO,SAASK,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0]}},
|
||||
{"offset": {"line": 18587, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/cache-busting-search-param.ts"],"sourcesContent":["import { hexHash } from '../../hash'\n\nconst CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES = 12\nconst textEncoder = new TextEncoder()\n\nfunction encodeCacheBustingSearchParam(bytes: Uint8Array): string {\n let binary = ''\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i])\n }\n\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '')\n}\n\nfunction normalizeCacheBustingInput(\n value: string | string[] | undefined\n): string {\n if (value === undefined) {\n return '0'\n }\n return Array.isArray(value) ? value.join(',') : value\n}\n\nfunction createCacheBustingSearchParamInput(\n prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): string | null {\n if (\n (prefetchHeader === undefined || prefetchHeader === '0') &&\n segmentPrefetchHeader === undefined &&\n stateTreeHeader === undefined &&\n nextUrlHeader === undefined\n ) {\n return null\n }\n\n return [\n prefetchHeader ?? '0',\n normalizeCacheBustingInput(segmentPrefetchHeader),\n normalizeCacheBustingInput(stateTreeHeader),\n normalizeCacheBustingInput(nextUrlHeader),\n ].join(',')\n}\n\nasync function computeCacheBustingSearchParamFromInput(\n input: string\n): Promise<string> {\n // Truncate SHA-256 to 96 bits to keep `_rsc` compact\n const digest = await globalThis.crypto.subtle.digest(\n 'SHA-256',\n textEncoder.encode(input)\n )\n return encodeCacheBustingSearchParam(\n new Uint8Array(digest).subarray(0, CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES)\n )\n}\n\nexport async function computeCacheBustingSearchParam(\n prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): Promise<string> {\n const input = createCacheBustingSearchParamInput(\n prefetchHeader,\n segmentPrefetchHeader,\n stateTreeHeader,\n nextUrlHeader\n )\n if (input === null) {\n return ''\n }\n\n return computeCacheBustingSearchParamFromInput(input)\n}\n\nexport function computeLegacyCacheBustingSearchParam(\n prefetchHeader: '1' | '2' | '3' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): string {\n const input = createCacheBustingSearchParamInput(\n prefetchHeader,\n segmentPrefetchHeader,\n stateTreeHeader,\n nextUrlHeader\n )\n if (input === null) {\n return ''\n }\n\n return hexHash(input)\n}\n"],"names":["hexHash","CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES","textEncoder","TextEncoder","encodeCacheBustingSearchParam","bytes","binary","i","length","String","fromCharCode","btoa","replace","normalizeCacheBustingInput","value","undefined","Array","isArray","join","createCacheBustingSearchParamInput","prefetchHeader","segmentPrefetchHeader","stateTreeHeader","nextUrlHeader","computeCacheBustingSearchParamFromInput","input","digest","globalThis","crypto","subtle","encode","Uint8Array","subarray","computeCacheBustingSearchParam","computeLegacyCacheBustingSearchParam"],"mappings":";;;;;;AAAA,SAASA,OAAO,QAAQ,aAAY;;AAEpC,MAAMC,0CAA0C;AAChD,MAAMC,cAAc,IAAIC;AAExB,SAASC,8BAA8BC,KAAiB;IACtD,IAAIC,SAAS;IACb,IAAK,IAAIC,IAAI,GAAGA,IAAIF,MAAMG,MAAM,EAAED,IAAK;QACrCD,UAAUG,OAAOC,YAAY,CAACL,KAAK,CAACE,EAAE;IACxC;IAEA,OAAOI,KAAKL,QAAQM,OAAO,CAAC,OAAO,KAAKA,OAAO,CAAC,OAAO,KAAKA,OAAO,CAAC,OAAO;AAC7E;AAEA,SAASC,2BACPC,KAAoC;IAEpC,IAAIA,UAAUC,WAAW;QACvB,OAAO;IACT;IACA,OAAOC,MAAMC,OAAO,CAACH,SAASA,MAAMI,IAAI,CAAC,OAAOJ;AAClD;AAEA,SAASK,mCACPC,cAAiD,EACjDC,qBAAoD,EACpDC,eAA8C,EAC9CC,aAA4C;IAE5C,IACGH,CAAAA,mBAAmBL,aAAaK,mBAAmB,GAAE,KACtDC,0BAA0BN,aAC1BO,oBAAoBP,aACpBQ,kBAAkBR,WAClB;QACA,OAAO;IACT;IAEA,OAAO;QACLK,kBAAkB;QAClBP,2BAA2BQ;QAC3BR,2BAA2BS;QAC3BT,2BAA2BU;KAC5B,CAACL,IAAI,CAAC;AACT;AAEA,eAAeM,wCACbC,KAAa;IAEb,qDAAqD;IACrD,MAAMC,SAAS,MAAMC,WAAWC,MAAM,CAACC,MAAM,CAACH,MAAM,CAClD,WACAxB,YAAY4B,MAAM,CAACL;IAErB,OAAOrB,8BACL,IAAI2B,WAAWL,QAAQM,QAAQ,CAAC,GAAG/B;AAEvC;AAEO,eAAegC,+BACpBb,cAAiD,EACjDC,qBAAoD,EACpDC,eAA8C,EAC9CC,aAA4C;IAE5C,MAAME,QAAQN,mCACZC,gBACAC,uBACAC,iBACAC;IAEF,IAAIE,UAAU,MAAM;QAClB,OAAO;IACT;IAEA,OAAOD,wCAAwCC;AACjD;AAEO,SAASS,qCACdd,cAAiD,EACjDC,qBAAoD,EACpDC,eAA8C,EAC9CC,aAA4C;IAE5C,MAAME,QAAQN,mCACZC,gBACAC,uBACAC,iBACAC;IAEF,IAAIE,UAAU,MAAM;QAClB,OAAO;IACT;IAEA,WAAOzB,uKAAAA,EAAQyB;AACjB","ignoreList":[0]}},
|
||||
{"offset": {"line": 18644, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/format-next-pathname-info.ts"],"sourcesContent":["import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n"],"names":["removeTrailingSlash","addPathPrefix","addPathSuffix","addLocale","formatNextPathnameInfo","info","pathname","locale","buildId","undefined","defaultLocale","ignorePrefix","trailingSlash","basePath","endsWith"],"mappings":";;;;AACA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,aAAa,QAAQ,oBAAmB;AACjD,SAASC,SAAS,QAAQ,eAAc;;;;;AAOjC,SAASC,uBAAuBC,IAAkB;IACvD,IAAIC,eAAWH,qMAAAA,EACbE,KAAKC,QAAQ,EACbD,KAAKE,MAAM,EACXF,KAAKG,OAAO,GAAGC,YAAYJ,KAAKK,aAAa,EAC7CL,KAAKM,YAAY;IAGnB,IAAIN,KAAKG,OAAO,IAAI,CAACH,KAAKO,aAAa,EAAE;QACvCN,eAAWN,6NAAAA,EAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,eAAWJ,iNAAAA,MACTD,iNAAAA,EAAcK,UAAU,CAAC,YAAY,EAAED,KAAKG,OAAO,EAAE,GACrDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,eAAWL,iNAAAA,EAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,WACjBZ,iNAAAA,EAAcI,UAAU,OACxBA,eACFN,6NAAAA,EAAoBM;AAC1B","ignoreList":[0]}},
|
||||
{"offset": {"line": 18671, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/get-dynamic-param.ts"],"sourcesContent":["import type { DynamicParam } from '../../../../server/app-render/app-render'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\nimport type { OpaqueFallbackRouteParams } from '../../../../server/request/fallback-params'\nimport type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypesShort } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport { parseLoaderTree } from './parse-loader-tree'\nimport { parseNormalizedAppRoute, parseAppRouteSegment } from '../routes/app'\nimport { resolveParamValue } from './resolve-param-value'\n\n/**\n * Gets the value of a param from the params object. This correctly handles the\n * case where the param is a fallback route param and encodes the resulting\n * value.\n *\n * @param interpolatedParams - The params object.\n * @param segmentKey - The key of the segment.\n * @param fallbackRouteParams - The fallback route params.\n * @returns The value of the param.\n */\nfunction getParamValue(\n interpolatedParams: Params,\n segmentKey: string,\n fallbackRouteParams: OpaqueFallbackRouteParams | null\n) {\n let value = interpolatedParams[segmentKey]\n\n if (fallbackRouteParams?.has(segmentKey)) {\n // We know that the fallback route params has the segment key because we\n // checked that above.\n const [searchValue] = fallbackRouteParams.get(segmentKey)!\n value = searchValue\n } else if (Array.isArray(value)) {\n value = value.map((i) => encodeURIComponent(i))\n } else if (typeof value === 'string') {\n value = encodeURIComponent(value)\n }\n\n return value\n}\n\nexport function interpolateParallelRouteParams(\n loaderTree: LoaderTree,\n params: Params,\n pagePath: string,\n fallbackRouteParams: OpaqueFallbackRouteParams | null\n): Params {\n const interpolated = structuredClone(params)\n\n // Stack-based traversal with depth tracking\n const stack: Array<{ tree: LoaderTree; depth: number }> = [\n { tree: loaderTree, depth: 0 },\n ]\n\n // Parse the route from the provided page path.\n const route = parseNormalizedAppRoute(pagePath)\n\n while (stack.length > 0) {\n const { tree, depth } = stack.pop()!\n const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n const appSegment = parseAppRouteSegment(segment)\n\n if (\n appSegment?.type === 'dynamic' &&\n !interpolated.hasOwnProperty(appSegment.param.paramName) &&\n // If the param is in the fallback route params, we don't need to\n // interpolate it because it's already marked as being unknown.\n !fallbackRouteParams?.has(appSegment.param.paramName)\n ) {\n const { paramName, paramType } = appSegment.param\n\n const paramValue = resolveParamValue(\n paramName,\n paramType,\n depth,\n route,\n interpolated\n )\n\n if (paramValue !== undefined) {\n interpolated[paramName] = paramValue\n } else if (paramType !== 'optional-catchall') {\n throw new InvariantError(\n `Could not resolve param value for segment: ${paramName}`\n )\n }\n }\n\n // Calculate next depth - increment if this is not a route group and not empty\n let nextDepth = depth\n if (\n appSegment &&\n appSegment.type !== 'route-group' &&\n appSegment.type !== 'parallel-route'\n ) {\n nextDepth++\n }\n\n // Add all parallel routes to the stack for processing\n for (const parallelRoute of Object.values(parallelRoutes)) {\n stack.push({ tree: parallelRoute, depth: nextDepth })\n }\n }\n\n return interpolated\n}\n\n/**\n *\n * Shared logic on client and server for creating a dynamic param value.\n *\n * This code needs to be shared with the client so it can extract dynamic route\n * params from the URL without a server request.\n *\n * Because everything in this module is sent to the client, we should aim to\n * keep this code as simple as possible. The special case handling for catchall\n * and optional is, alas, unfortunate.\n */\nexport function getDynamicParam(\n interpolatedParams: Params,\n segmentKey: string,\n dynamicParamType: DynamicParamTypesShort,\n fallbackRouteParams: OpaqueFallbackRouteParams | null,\n staticSiblings: readonly string[] | null\n): DynamicParam {\n let value: string | string[] | undefined = getParamValue(\n interpolatedParams,\n segmentKey,\n fallbackRouteParams\n )\n\n // handle the case where an optional catchall does not have a value,\n // e.g. `/dashboard/[[...slug]]` when requesting `/dashboard`\n if (!value || value.length === 0) {\n if (dynamicParamType === 'oc') {\n return {\n param: segmentKey,\n value: null,\n type: dynamicParamType,\n treeSegment: [segmentLine truncated
|
||||
{"offset": {"line": 18829, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/get-next-pathname-info.ts"],"sourcesContent":["import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n"],"names":["normalizeLocalePath","removePathPrefix","pathHasPrefix","getNextPathnameInfo","pathname","options","basePath","i18n","trailingSlash","nextConfig","info","endsWith","pathnameNoDataPrefix","startsWith","paths","replace","split","buildId","slice","join","parseData","result","i18nProvider","analyze","locales","locale","detectedLocale"],"mappings":";;;;AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,SAASC,aAAa,QAAQ,oBAAmB;;;;AAkD1C,SAASC,oBACdC,QAAgB,EAChBC,OAAgB;IAEhB,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,aAAa,EAAE,GAAGH,QAAQI,UAAU,IAAI,CAAC;IACjE,MAAMC,OAAyB;QAC7BN;QACAI,eAAeJ,aAAa,MAAMA,SAASO,QAAQ,CAAC,OAAOH;IAC7D;IAEA,IAAIF,gBAAYJ,iNAAAA,EAAcQ,KAAKN,QAAQ,EAAEE,WAAW;QACtDI,KAAKN,QAAQ,OAAGH,uNAAAA,EAAiBS,KAAKN,QAAQ,EAAEE;QAChDI,KAAKJ,QAAQ,GAAGA;IAClB;IACA,IAAIM,uBAAuBF,KAAKN,QAAQ;IAExC,IACEM,KAAKN,QAAQ,CAACS,UAAU,CAAC,mBACzBH,KAAKN,QAAQ,CAACO,QAAQ,CAAC,UACvB;QACA,MAAMG,QAAQJ,KAAKN,QAAQ,CACxBW,OAAO,CAAC,oBAAoB,IAC5BA,OAAO,CAAC,WAAW,IACnBC,KAAK,CAAC;QAET,MAAMC,UAAUH,KAAK,CAAC,EAAE;QACxBJ,KAAKO,OAAO,GAAGA;QACfL,uBACEE,KAAK,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,EAAEA,MAAMI,KAAK,CAAC,GAAGC,IAAI,CAAC,MAAM,GAAG;QAE1D,sDAAsD;QACtD,kDAAkD;QAClD,IAAId,QAAQe,SAAS,KAAK,MAAM;YAC9BV,KAAKN,QAAQ,GAAGQ;QAClB;IACF;IAEA,4EAA4E;IAC5E,yBAAyB;IACzB,IAAIL,MAAM;QACR,IAAIc,SAAShB,QAAQiB,YAAY,GAC7BjB,QAAQiB,YAAY,CAACC,OAAO,CAACb,KAAKN,QAAQ,QAC1CJ,kNAAAA,EAAoBU,KAAKN,QAAQ,EAAEG,KAAKiB,OAAO;QAEnDd,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;QACnChB,KAAKN,QAAQ,GAAGiB,OAAOjB,QAAQ,IAAIM,KAAKN,QAAQ;QAEhD,IAAI,CAACiB,OAALine truncated
|
||||
{"offset": {"line": 18880, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/get-segment-param.tsx"],"sourcesContent":["import { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport type { DynamicParamTypes } from '../../app-router-types'\n\nexport type SegmentParam = {\n paramName: string\n paramType: DynamicParamTypes\n}\n\n/**\n * Parse dynamic route segment to type of parameter\n */\nexport function getSegmentParam(segment: string): SegmentParam | null {\n const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((marker) =>\n segment.startsWith(marker)\n )\n\n // if an interception marker is part of the path segment, we need to jump ahead\n // to the relevant portion for param parsing\n if (interceptionMarker) {\n segment = segment.slice(interceptionMarker.length)\n }\n\n if (segment.startsWith('[[...') && segment.endsWith(']]')) {\n return {\n // TODO-APP: Optional catchall does not currently work with parallel routes,\n // so for now aren't handling a potential interception marker.\n paramType: 'optional-catchall',\n paramName: segment.slice(5, -2),\n }\n }\n\n if (segment.startsWith('[...') && segment.endsWith(']')) {\n return {\n paramType: interceptionMarker\n ? `catchall-intercepted-${interceptionMarker}`\n : 'catchall',\n paramName: segment.slice(4, -1),\n }\n }\n\n if (segment.startsWith('[') && segment.endsWith(']')) {\n return {\n paramType: interceptionMarker\n ? `dynamic-intercepted-${interceptionMarker}`\n : 'dynamic',\n paramName: segment.slice(1, -1),\n }\n }\n\n return null\n}\n\nexport function isCatchAll(\n type: DynamicParamTypes\n): type is\n | 'catchall'\n | 'catchall-intercepted-(..)(..)'\n | 'catchall-intercepted-(.)'\n | 'catchall-intercepted-(..)'\n | 'catchall-intercepted-(...)'\n | 'optional-catchall' {\n return (\n type === 'catchall' ||\n type === 'catchall-intercepted-(..)(..)' ||\n type === 'catchall-intercepted-(.)' ||\n type === 'catchall-intercepted-(..)' ||\n type === 'catchall-intercepted-(...)' ||\n type === 'optional-catchall'\n )\n}\n\nexport function getParamProperties(paramType: DynamicParamTypes): {\n repeat: boolean\n optional: boolean\n} {\n let repeat = false\n let optional = false\n\n switch (paramType) {\n case 'catchall':\n case 'catchall-intercepted-(..)(..)':\n case 'catchall-intercepted-(.)':\n case 'catchall-intercepted-(..)':\n case 'catchall-intercepted-(...)':\n repeat = true\n break\n case 'optional-catchall':\n repeat = true\n optional = true\n break\n case 'dynamic':\n case 'dynamic-intercepted-(..)(..)':\n case 'dynamic-intercepted-(.)':\n case 'dynamic-intercepted-(..)':\n case 'dynamic-intercepted-(...)':\n break\n default:\n paramType satisfies never\n }\n\n return { repeat, optional }\n}\n"],"names":["INTERCEPTION_ROUTE_MARKERS","getSegmentParam","segment","interceptionMarker","find","marker","startsWith","slice","length","endsWith","paramType","paramName","isCatchAll","type","getParamProperties","repeat","optional"],"mappings":";;;;;;;;AAAA,SAASA,0BAA0B,QAAQ,wBAAuB;;AAW3D,SAASC,gBAAgBC,OAAe;IAC7C,MAAMC,qBAAqBH,+NAAAA,CAA2BI,IAAI,CAAC,CAACC,SAC1DH,QAAQI,UAAU,CAACD;IAGrB,+EAA+E;IAC/E,4CAA4C;IAC5C,IAAIF,oBAAoB;QACtBD,UAAUA,QAAQK,KAAK,CAACJ,mBAAmBK,MAAM;IACnD;IAEA,IAAIN,QAAQI,UAAU,CAAC,YAAYJ,QAAQO,QAAQ,CAAC,OAAO;QACzD,OAAO;YACL,4EAA4E;YAC5E,8DAA8D;YAC9DC,WAAW;YACXC,WAAWT,QAAQK,KAAK,CAAC,GAAG,CAAC;QAC/B;IACF;IAEA,IAAIL,QAAQI,UAAU,CAAC,WAAWJ,QAAQO,QAAQ,CAAC,MAAM;QACvD,OAAO;YACLC,WAAWP,qBACP,CAAC,qBAAqB,EAAEA,oBAAoB,GAC5C;YACJQ,WAAWT,QAAQK,KAAK,CAAC,GAAG,CAAC;QAC/B;IACF;IAEA,IAAIL,QAAQI,UAAU,CAAC,QAAQJ,QAAQO,QAAQ,CAAC,MAAM;QACpD,OAAO;YACLC,WAAWP,qBACP,CAAC,oBAAoB,EAAEA,oBAAoB,GAC3C;YACJQ,WAAWT,QAAQK,KAAK,CAAC,GAAG,CAAC;QAC/B;IACF;IAEA,OAAO;AACT;AAEO,SAASK,WACdC,IAAuB;IAQvB,OACEA,SAAS,cACTA,SAAS,mCACTA,SAAS,8BACTA,SAAS,+BACTA,SAAS,gCACTA,SAAS;AAEb;AAEO,SAASC,mBAAmBJ,SAA4B;IAI7D,IAAIK,SAAS;IACb,IAAIC,WAAW;IAEf,OAAQN;QACN,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACHK,SAAS;YACT;QACF,KAAK;YACHA,SAAS;YACTC,WAAW;YACX;QACF,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH;QACF;YACEN;IACJ;IAEA,OAAO;QAAEK;QAAQC;IAAS;AAC5B","ignoreList":[0]}},
|
||||
{"offset": {"line": 18955, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/html-bots.ts"],"sourcesContent":["// This regex contains the bots that we need to do a blocking render for and can't safely stream the response\n// due to how they parse the DOM. For example, they might explicitly check for metadata in the `head` tag, so we can't stream metadata tags after the `head` was sent.\n// Note: The pattern [\\w-]+-Google captures all Google crawlers with \"-Google\" suffix (e.g., Mediapartners-Google, AdsBot-Google, Storebot-Google)\n// as well as crawlers starting with \"Google-\" (e.g., Google-PageRenderer, Google-InspectionTool)\nexport const HTML_LIMITED_BOT_UA_RE =\n /[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight/i\n"],"names":["HTML_LIMITED_BOT_UA_RE"],"mappings":"AAAA,6GAA6G;AAC7G,sKAAsK;AACtK,kJAAkJ;AAClJ,iGAAiG;;;;;AAC1F,MAAMA,yBACX,sTAAqT","ignoreList":[0]}},
|
||||
{"offset": {"line": 18968, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/interception-prefix-from-param-type.ts"],"sourcesContent":["import type { DynamicParamTypes } from '../../app-router-types'\n\nexport function interceptionPrefixFromParamType(\n paramType: DynamicParamTypes\n): string | null {\n switch (paramType) {\n case 'catchall-intercepted-(..)(..)':\n case 'dynamic-intercepted-(..)(..)':\n return '(..)(..)'\n case 'catchall-intercepted-(.)':\n case 'dynamic-intercepted-(.)':\n return '(.)'\n case 'catchall-intercepted-(..)':\n case 'dynamic-intercepted-(..)':\n return '(..)'\n case 'catchall-intercepted-(...)':\n case 'dynamic-intercepted-(...)':\n return '(...)'\n case 'catchall':\n case 'dynamic':\n case 'optional-catchall':\n default:\n return null\n }\n}\n"],"names":["interceptionPrefixFromParamType","paramType"],"mappings":";;;;AAEO,SAASA,gCACdC,SAA4B;IAE5B,OAAQA;QACN,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;QACL,KAAK;QACL;YACE,OAAO;IACX;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 18997, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/interception-routes.ts"],"sourcesContent":["import { normalizeAppPath } from './app-paths'\n\n// order matters here, the first match will be used\nexport const INTERCEPTION_ROUTE_MARKERS = [\n '(..)(..)',\n '(.)',\n '(..)',\n '(...)',\n] as const\n\nexport type InterceptionMarker = (typeof INTERCEPTION_ROUTE_MARKERS)[number]\n\nexport function isInterceptionRouteAppPath(path: string): boolean {\n // TODO-APP: add more serious validation\n return (\n path\n .split('/')\n .find((segment) =>\n INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n ) !== undefined\n )\n}\n\ntype InterceptionRouteInformation = {\n /**\n * The intercepting route. This is the route that is being intercepted or the\n * route that the user was coming from. This is matched by the Next-Url\n * header.\n */\n interceptingRoute: string\n\n /**\n * The intercepted route. This is the route that is being intercepted or the\n * route that the user is going to. This is matched by the request pathname.\n */\n interceptedRoute: string\n}\n\nexport function extractInterceptionRouteInformation(\n path: string\n): InterceptionRouteInformation {\n let interceptingRoute: string | undefined\n let marker: (typeof INTERCEPTION_ROUTE_MARKERS)[number] | undefined\n let interceptedRoute: string | undefined\n\n for (const segment of path.split('/')) {\n marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n if (marker) {\n ;[interceptingRoute, interceptedRoute] = path.split(marker, 2)\n break\n }\n }\n\n if (!interceptingRoute || !marker || !interceptedRoute) {\n throw new Error(\n `Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`\n )\n }\n\n interceptingRoute = normalizeAppPath(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed\n\n switch (marker) {\n case '(.)':\n // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route\n if (interceptingRoute === '/') {\n interceptedRoute = `/${interceptedRoute}`\n } else {\n interceptedRoute = interceptingRoute + '/' + interceptedRoute\n }\n break\n case '(..)':\n // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route\n if (interceptingRoute === '/') {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`\n )\n }\n interceptedRoute = interceptingRoute\n .split('/')\n .slice(0, -1)\n .concat(interceptedRoute)\n .join('/')\n break\n case '(...)':\n // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route\n interceptedRoute = '/' + interceptedRoute\n break\n case '(..)(..)':\n // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route\n\n const splitInterceptingRoute = interceptingRoute.split('/')\n if (splitInterceptingRoute.length <= 2) {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`\n )\n }\n\n interceptedRoute = splitInterceptingRoute\n .slice(0, -2)\n .concat(interceptedRoute)\n .join('/')\n break\n default:\n throw new Error('Invariant: unexpected marker')\n }\n\n return { interceptingRoute, interceptedRoute }\n}\n"],"names":["normalizeAppPath","INTERCEPTION_ROUTE_MARKERS","isInterceptionRouteAppPath","path","split","find","segment","m","startsWith","undefined","extractInterceptionRouteInformation","interceptingRoute","marker","interceptedRoute","Error","slice","concat","join","splitInterceptingRoute","length"],"mappings":";;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,cAAa;;AAGvC,MAAMC,6BAA6B;IACxC;IACA;IACA;IACA;CACD,CAAS;AAIH,SAASC,2BAA2BC,IAAY;IACrD,wCAAwC;IACxC,OACEA,KACGC,KAAK,CAAC,KACNC,IAAI,CAAC,CAACC,UACLL,2BAA2BI,IAAI,CAAC,CAACE,IAAMD,QAAQE,UAAU,CAACD,SACtDE;AAEZ;AAiBO,SAASC,oCACdP,IAAY;IAEZ,IAAIQ;IACJ,IAAIC;IACJ,IAAIC;IAEJ,KAAK,MAAMP,WAAWH,KAAKC,KAAK,CAAC,KAAM;QACrCQ,SAASX,2BAA2BI,IAAI,CAAC,CAACE,IAAMD,QAAQE,UAAU,CAACD;QACnE,IAAIK,QAAQ;;YACT,CAACD,mBAAmBE,iBAAiB,GAAGV,KAAKC,KAAK,CAACQ,QAAQ;YAC5D;QACF;IACF;IAEA,IAAI,CAACD,qBAAqB,CAACC,UAAU,CAACC,kBAAkB;QACtD,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,4BAA4B,EAAEX,KAAK,iFAAiF,CAAC,GADlH,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEAQ,wBAAoBX,2MAAAA,EAAiBW,mBAAmB,iDAAiD;;IAEzG,OAAQC;QACN,KAAK;YACH,oIAAoI;YACpI,IAAID,sBAAsB,KAAK;gBAC7BE,mBAAmB,CAAC,CAAC,EAAEA,kBAAkB;YAC3C,OAAO;gBACLA,mBAAmLine truncated
|
||||
{"offset": {"line": 19090, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/is-bot.ts"],"sourcesContent":["import { HTML_LIMITED_BOT_UA_RE } from './html-bots'\n\n// Bot crawler that will spin up a headless browser and execute JS.\n// Only the main Googlebot search crawler executes JavaScript, not other Google crawlers.\n// x-ref: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers\n// This regex specifically matches \"Googlebot\" but NOT \"Mediapartners-Google\", \"AdsBot-Google\", etc.\nconst HEADLESS_BROWSER_BOT_UA_RE = /Googlebot(?!-)|Googlebot$/i\n\nexport const HTML_LIMITED_BOT_UA_RE_STRING = HTML_LIMITED_BOT_UA_RE.source\n\nexport { HTML_LIMITED_BOT_UA_RE }\n\nfunction isDomBotUA(userAgent: string) {\n return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent)\n}\n\nfunction isHtmlLimitedBotUA(userAgent: string) {\n return HTML_LIMITED_BOT_UA_RE.test(userAgent)\n}\n\nexport function isBot(userAgent: string): boolean {\n return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent)\n}\n\nexport function getBotType(userAgent: string): 'dom' | 'html' | undefined {\n if (isDomBotUA(userAgent)) {\n return 'dom'\n }\n if (isHtmlLimitedBotUA(userAgent)) {\n return 'html'\n }\n return undefined\n}\n"],"names":["HTML_LIMITED_BOT_UA_RE","HEADLESS_BROWSER_BOT_UA_RE","HTML_LIMITED_BOT_UA_RE_STRING","source","isDomBotUA","userAgent","test","isHtmlLimitedBotUA","isBot","getBotType","undefined"],"mappings":";;;;;;;;AAAA,SAASA,sBAAsB,QAAQ,cAAa;;AAEpD,mEAAmE;AACnE,yFAAyF;AACzF,4FAA4F;AAC5F,oGAAoG;AACpG,MAAMC,6BAA6B;AAE5B,MAAMC,gCAAgCF,iNAAAA,CAAuBG,MAAM,CAAA;;AAI1E,SAASC,WAAWC,SAAiB;IACnC,OAAOJ,2BAA2BK,IAAI,CAACD;AACzC;AAEA,SAASE,mBAAmBF,SAAiB;IAC3C,OAAOL,iNAAAA,CAAuBM,IAAI,CAACD;AACrC;AAEO,SAASG,MAAMH,SAAiB;IACrC,OAAOD,WAAWC,cAAcE,mBAAmBF;AACrD;AAEO,SAASI,WAAWJ,SAAiB;IAC1C,IAAID,WAAWC,YAAY;QACzB,OAAO;IACT;IACA,IAAIE,mBAAmBF,YAAY;QACjC,OAAO;IACT;IACA,OAAOK;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 19129, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/parse-loader-tree.ts"],"sourcesContent":["import { DEFAULT_SEGMENT_KEY } from '../../segment'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\n\nexport function parseLoaderTree(tree: LoaderTree) {\n const [segment, parallelRoutes, modules, staticSiblings] = tree\n const { layout, template } = modules\n let { page } = modules\n // a __DEFAULT__ segment means that this route didn't match any of the\n // segments in the route, so we should use the default page\n page = segment === DEFAULT_SEGMENT_KEY ? modules.defaultPage : page\n\n const conventionPath = layout?.[1] || template?.[1] || page?.[1]\n\n return {\n page,\n segment,\n modules,\n /* it can be either layout / template / page */\n conventionPath,\n parallelRoutes,\n staticSiblings,\n }\n}\n"],"names":["DEFAULT_SEGMENT_KEY","parseLoaderTree","tree","segment","parallelRoutes","modules","staticSiblings","layout","template","page","defaultPage","conventionPath"],"mappings":";;;;AAAA,SAASA,mBAAmB,QAAQ,gBAAe;;AAG5C,SAASC,gBAAgBC,IAAgB;IAC9C,MAAM,CAACC,SAASC,gBAAgBC,SAASC,eAAe,GAAGJ;IAC3D,MAAM,EAAEK,MAAM,EAAEC,QAAQ,EAAE,GAAGH;IAC7B,IAAI,EAAEI,IAAI,EAAE,GAAGJ;IACf,sEAAsE;IACtE,2DAA2D;IAC3DI,OAAON,YAAYH,sLAAAA,GAAsBK,QAAQK,WAAW,GAAGD;IAE/D,MAAME,iBAAiBJ,QAAQ,CAAC,EAAE,IAAIC,UAAU,CAAC,EAAE,IAAIC,MAAM,CAAC,EAAE;IAEhE,OAAO;QACLA;QACAN;QACAE;QACA,6CAA6C,GAC7CM;QACAP;QACAE;IACF;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 19156, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/parse-path.ts"],"sourcesContent":["/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n"],"names":["parsePath","path","hashIndex","indexOf","queryIndex","hasQuery","pathname","substring","query","undefined","hash","slice"],"mappings":"AAAA;;;;CAIC,GACD;;;;AAAO,SAASA,UAAUC,IAAY;IACpC,MAAMC,YAAYD,KAAKE,OAAO,CAAC;IAC/B,MAAMC,aAAaH,KAAKE,OAAO,CAAC;IAChC,MAAME,WAAWD,aAAa,CAAC,KAAMF,CAAAA,YAAY,KAAKE,aAAaF,SAAQ;IAE3E,IAAIG,YAAYH,YAAY,CAAC,GAAG;QAC9B,OAAO;YACLI,UAAUL,KAAKM,SAAS,CAAC,GAAGF,WAAWD,aAAaF;YACpDM,OAAOH,WACHJ,KAAKM,SAAS,CAACH,YAAYF,YAAY,CAAC,IAAIA,YAAYO,aACxD;YACJC,MAAMR,YAAY,CAAC,IAAID,KAAKU,KAAK,CAACT,aAAa;QACjD;IACF;IAEA,OAAO;QAAEI,UAAUL;QAAMO,OAAO;QAAIE,MAAM;IAAG;AAC/C","ignoreList":[0]}},
|
||||
{"offset": {"line": 19185, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/parse-relative-url.ts"],"sourcesContent":["import type { ParsedUrlQuery } from 'querystring'\nimport { getLocationOrigin } from '../../utils'\nimport { searchParamsToUrlQuery } from './querystring'\n\nexport interface ParsedRelativeUrl {\n auth: string | null\n hash: string\n host: string | null\n hostname: string | null\n href: string\n pathname: string\n port: string | null\n protocol: string | null\n query: ParsedUrlQuery\n search: string\n slashes: null\n}\n\n/**\n * Parses path-relative urls (e.g. `/hello/world?foo=bar`). If url isn't path-relative\n * (e.g. `./hello`) then at least base must be.\n * Absolute urls are rejected with one exception, in the browser, absolute urls that are on\n * the current origin will be parsed as relative\n */\nexport function parseRelativeUrl(\n url: string,\n base?: string,\n parseQuery?: true\n): ParsedRelativeUrl\nexport function parseRelativeUrl(\n url: string,\n base: string | undefined,\n parseQuery: false\n): Omit<ParsedRelativeUrl, 'query'>\nexport function parseRelativeUrl(\n url: string,\n base?: string,\n parseQuery = true\n): ParsedRelativeUrl | Omit<ParsedRelativeUrl, 'query'> {\n const globalBase = new URL(\n typeof window === 'undefined' ? 'http://n' : getLocationOrigin()\n )\n\n const resolvedBase = base\n ? new URL(base, globalBase)\n : url.startsWith('.')\n ? new URL(\n typeof window === 'undefined' ? 'http://n' : window.location.href\n )\n : globalBase\n\n const { pathname, searchParams, search, hash, href, origin } = url.startsWith(\n '/'\n )\n ? // 'http://localhost:3000///' would be received as '///' in Node.js' IncomingMessage\n // See https://nodejs.org/api/http.html#messageurl\n // Not using `origin` to support other protocols\n new URL(`${resolvedBase.protocol}//${resolvedBase.host}${url}`)\n : new URL(url, resolvedBase)\n\n if (origin !== globalBase.origin) {\n throw new Error(`invariant: invalid relative URL, router received ${url}`)\n }\n\n return {\n auth: null,\n host: null,\n hostname: null,\n pathname,\n port: null,\n protocol: null,\n query: parseQuery ? searchParamsToUrlQuery(searchParams) : undefined,\n search,\n hash,\n href: href.slice(origin.length),\n // We don't know for relative URLs at this point since we set a custom, internal\n // base that isn't surfaced to users.\n slashes: null,\n }\n}\n"],"names":["getLocationOrigin","searchParamsToUrlQuery","parseRelativeUrl","url","base","parseQuery","globalBase","URL","window","resolvedBase","startsWith","location","href","pathname","searchParams","search","hash","origin","protocol","host","Error","auth","hostname","port","query","undefined","slice","length","slashes"],"mappings":";;;;AAEA,SAASC,sBAAsB,QAAQ,gBAAe;;;AAgC/C,SAASC,iBACdC,GAAW,EACXC,IAAa,EACbC,aAAa,IAAI;IAEjB,MAAMC,aAAa,IAAIC,IACrB,OAAOC,WAAW,qBAAc,aAAaR;IAG/C,MAAMS,eAAeL,OACjB,IAAIG,IAAIH,MAAME,cACdH,IAAIO,UAAU,CAAC,OACb,IAAIH,IACF,OAAOC,WAAW,qBAAc,aAAaA,OAAOG,QAAQ,CAACC,IAAI,OAEnEN;IAEN,MAAM,EAAEO,QAAQ,EAAEC,YAAY,EAAEC,MAAM,EAAEC,IAAI,EAAEJ,IAAI,EAAEK,MAAM,EAAE,GAAGd,IAAIO,UAAU,CAC3E,OAGE,AACA,gDAAgD,EADE;IAElD,IAAIH,IAAI,GAAGE,aAAaS,QAAQ,CAAC,EAAE,EAAET,aAAaU,IAAI,GAAGhB,KAAK,IAC9D,IAAII,IAAIJ,KAAKM;IAEjB,IAAIQ,WAAWX,WAAWW,MAAM,EAAE;QAChC,MAAM,OAAA,cAAoE,CAApE,IAAIG,MAAM,CAAC,iDAAiD,EAAEjB,KAAK,GAAnE,qBAAA;mBAAA;wBAAA;0BAAA;QAAmE;IAC3E;IAEA,OAAO;QACLkB,MAAM;QACNF,MAAM;QACNG,UAAU;QACVT;QACAU,MAAM;QACNL,UAAU;QACVM,OAAOnB,iBAAaJ,gNAAAA,EAAuBa,gBAAgBW;QAC3DV;QACAC;QACAJ,MAAMA,KAAKc,KAAK,CAACT,OAAOU,MAAM;QAC9B,gFAAgF;QAChF,qCAAqC;QACrCC,SAAS;IACX;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 19224, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/path-has-prefix.ts"],"sourcesContent":["import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n"],"names":["parsePath","pathHasPrefix","path","prefix","pathname","startsWith"],"mappings":";;;;AAAA,SAASA,SAAS,QAAQ,eAAc;;AASjC,SAASC,cAAcC,IAAY,EAAEC,MAAc;IACxD,IAAI,OAAOD,SAAS,UAAU;QAC5B,OAAO;IACT;IAEA,MAAM,EAAEE,QAAQ,EAAE,OAAGJ,qMAAAA,EAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0]}},
|
||||
{"offset": {"line": 19241, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/querystring.ts"],"sourcesContent":["import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n searchParams: URLSearchParams\n): ParsedUrlQuery {\n const query: ParsedUrlQuery = {}\n for (const [key, value] of searchParams.entries()) {\n const existing = query[key]\n if (typeof existing === 'undefined') {\n query[key] = value\n } else if (Array.isArray(existing)) {\n existing.push(value)\n } else {\n query[key] = [existing, value]\n }\n }\n return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n if (typeof param === 'string') {\n return param\n }\n\n if (\n (typeof param === 'number' && !isNaN(param)) ||\n typeof param === 'boolean'\n ) {\n return String(param)\n } else {\n return ''\n }\n}\n\nexport function urlQueryToSearchParams(query: ParsedUrlQuery): URLSearchParams {\n const searchParams = new URLSearchParams()\n for (const [key, value] of Object.entries(query)) {\n if (Array.isArray(value)) {\n for (const item of value) {\n searchParams.append(key, stringifyUrlQueryParam(item))\n }\n } else {\n searchParams.set(key, stringifyUrlQueryParam(value))\n }\n }\n return searchParams\n}\n\nexport function assign(\n target: URLSearchParams,\n ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n for (const searchParams of searchParamsList) {\n for (const key of searchParams.keys()) {\n target.delete(key)\n }\n\n for (const [key, value] of searchParams.entries()) {\n target.append(key, value)\n }\n }\n\n return target\n}\n"],"names":["searchParamsToUrlQuery","searchParams","query","key","value","entries","existing","Array","isArray","push","stringifyUrlQueryParam","param","isNaN","String","urlQueryToSearchParams","URLSearchParams","Object","item","append","set","assign","target","searchParamsList","keys","delete"],"mappings":";;;;;;;;AAEO,SAASA,uBACdC,YAA6B;IAE7B,MAAMC,QAAwB,CAAC;IAC/B,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIH,aAAaI,OAAO,GAAI;QACjD,MAAMC,WAAWJ,KAAK,CAACC,IAAI;QAC3B,IAAI,OAAOG,aAAa,aAAa;YACnCJ,KAAK,CAACC,IAAI,GAAGC;QACf,OAAO,IAAIG,MAAMC,OAAO,CAACF,WAAW;YAClCA,SAASG,IAAI,CAACL;QAChB,OAAO;YACLF,KAAK,CAACC,IAAI,GAAG;gBAACG;gBAAUF;aAAM;QAChC;IACF;IACA,OAAOF;AACT;AAEA,SAASQ,uBAAuBC,KAAc;IAC5C,IAAI,OAAOA,UAAU,UAAU;QAC7B,OAAOA;IACT;IAEA,IACG,OAAOA,UAAU,YAAY,CAACC,MAAMD,UACrC,OAAOA,UAAU,WACjB;QACA,OAAOE,OAAOF;IAChB,OAAO;QACL,OAAO;IACT;AACF;AAEO,SAASG,uBAAuBZ,KAAqB;IAC1D,MAAMD,eAAe,IAAIc;IACzB,KAAK,MAAM,CAACZ,KAAKC,MAAM,IAAIY,OAAOX,OAAO,CAACH,OAAQ;QAChD,IAAIK,MAAMC,OAAO,CAACJ,QAAQ;YACxB,KAAK,MAAMa,QAAQb,MAAO;gBACxBH,aAAaiB,MAAM,CAACf,KAAKO,uBAAuBO;YAClD;QACF,OAAO;YACLhB,aAAakB,GAAG,CAAChB,KAAKO,uBAAuBN;QAC/C;IACF;IACA,OAAOH;AACT;AAEO,SAASmB,OACdC,MAAuB,EACvB,GAAGC,gBAAmC;IAEtC,KAAK,MAAMrB,gBAAgBqB,iBAAkB;QAC3C,KAAK,MAAMnB,OAAOF,aAAasB,IAAI,GAAI;YACrCF,OAAOG,MAAM,CAACrB;QAChB;QAEA,KAAK,MAAM,CAACA,KAAKC,MAAM,IAAIH,aAAaI,OAAO,GAAI;YACjDgB,OAAOH,MAAM,CAACf,KAAKC;QACrB;IACF;IAEA,OAAOiB;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 19304, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/remove-path-prefix.ts"],"sourcesContent":["import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n"],"names":["pathHasPrefix","removePathPrefix","path","prefix","withoutPrefix","slice","length","startsWith"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,oBAAmB;;AAU1C,SAASC,iBAAiBC,IAAY,EAAEC,MAAc;IAC3D,yEAAyE;IACzE,0EAA0E;IAC1E,kBAAkB;IAClB,EAAE;IACF,oBAAoB;IACpB,EAAE;IACF,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,IAAI,KAACH,iNAAAA,EAAcE,MAAMC,SAAS;QAChC,OAAOD;IACT;IAEA,+CAA+C;IAC/C,MAAME,gBAAgBF,KAAKG,KAAK,CAACF,OAAOG,MAAM;IAE9C,2EAA2E;IAC3E,IAAIF,cAAcG,UAAU,CAAC,MAAM;QACjC,OAAOH;IACT;IAEA,4EAA4E;IAC5E,mDAAmD;IACnD,OAAO,CAAC,CAAC,EAAEA,eAAe;AAC5B","ignoreList":[0]}},
|
||||
{"offset": {"line": 19340, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n *\n * Uses charCodeAt (47 === '/') instead of regex to avoid the overhead of\n * compiling and executing a RegExp on every call (~3-5x faster).\n */\nexport function removeTrailingSlash(route: string) {\n return route.charCodeAt(route.length - 1) === 47 && route.length > 1\n ? route.slice(0, -1)\n : route\n}\n"],"names":["removeTrailingSlash","route","charCodeAt","length","slice"],"mappings":"AAAA;;;;;;;CAOC,GACD;;;;AAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,UAAU,CAACD,MAAME,MAAM,GAAG,OAAO,MAAMF,MAAME,MAAM,GAAG,IAC/DF,MAAMG,KAAK,CAAC,GAAG,CAAC,KAChBH;AACN","ignoreList":[0]}},
|
||||
{"offset": {"line": 19358, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/router/utils/resolve-param-value.ts"],"sourcesContent":["import type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypes } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport type {\n NormalizedAppRoute,\n NormalizedAppRouteSegment,\n} from '../routes/app'\nimport { interceptionPrefixFromParamType } from './interception-prefix-from-param-type'\n\n/**\n * Extracts the param value from a path segment, handling interception markers\n * based on the expected param type.\n *\n * @param pathSegment - The path segment to extract the value from\n * @param params - The current params object for resolving dynamic param references\n * @param paramType - The expected param type which may include interception marker info\n * @returns The extracted param value\n */\nfunction getParamValueFromSegment(\n pathSegment: NormalizedAppRouteSegment,\n params: Params,\n paramType: DynamicParamTypes\n): string {\n // If the segment is dynamic, resolve it from the params object\n if (pathSegment.type === 'dynamic') {\n return params[pathSegment.param.paramName] as string\n }\n\n // If the paramType indicates this is an intercepted param, strip the marker\n // that matches the interception marker in the param type\n const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n if (interceptionPrefix === pathSegment.interceptionMarker) {\n return pathSegment.name.replace(pathSegment.interceptionMarker, '')\n }\n\n // For static segments, use the name\n return pathSegment.name\n}\n\n/**\n * Resolves a route parameter value from the route segments at the given depth.\n * This shared logic is used by both extractPathnameRouteParamSegmentsFromLoaderTree\n * and resolveRouteParamsFromTree.\n *\n * @param paramName - The parameter name to resolve\n * @param paramType - The parameter type (dynamic, catchall, etc.)\n * @param depth - The current depth in the route tree\n * @param route - The normalized route containing segments\n * @param params - The current params object (used to resolve embedded param references)\n * @param options - Configuration options\n * @returns The resolved parameter value, or undefined if it cannot be resolved\n */\nexport function resolveParamValue(\n paramName: string,\n paramType: DynamicParamTypes,\n depth: number,\n route: NormalizedAppRoute,\n params: Params\n): string | string[] | undefined {\n switch (paramType) {\n case 'catchall':\n case 'optional-catchall':\n case 'catchall-intercepted-(..)(..)':\n case 'catchall-intercepted-(.)':\n case 'catchall-intercepted-(..)':\n case 'catchall-intercepted-(...)':\n // For catchall routes, derive from pathname using depth to determine\n // which segments to use\n const processedSegments: string[] = []\n\n // Process segments to handle any embedded dynamic params\n for (let index = depth; index < route.segments.length; index++) {\n const pathSegment = route.segments[index]\n\n if (pathSegment.type === 'static') {\n let value = pathSegment.name\n\n // For intercepted catch-all params, strip the marker from the first segment\n const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n if (\n interceptionPrefix &&\n index === depth &&\n interceptionPrefix === pathSegment.interceptionMarker\n ) {\n // Strip the interception marker from the value\n value = value.replace(pathSegment.interceptionMarker, '')\n }\n\n processedSegments.push(value)\n } else {\n // If the segment is a param placeholder, check if we have its value\n if (!params.hasOwnProperty(pathSegment.param.paramName)) {\n // If the segment is an optional catchall, we can break out of the\n // loop because it's optional!\n if (pathSegment.param.paramType === 'optional-catchall') {\n break\n }\n\n // Unknown param placeholder in pathname - can't derive full value\n return undefined\n }\n\n // If the segment matches a param, use the param value\n // We don't encode values here as that's handled during retrieval.\n const paramValue = params[pathSegment.param.paramName]\n if (Array.isArray(paramValue)) {\n processedSegments.push(...paramValue)\n } else {\n processedSegments.push(paramValue as string)\n }\n }\n }\n\n if (processedSegments.length > 0) {\n return processedSegments\n } else if (paramType === 'optional-catchall') {\n return undefined\n } else {\n // We shouldn't be able to match a catchall segment without any path\n // seLine truncated
|
||||
{"offset": {"line": 19472, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/segment-cache/segment-value-encoding.ts"],"sourcesContent":["import { PAGE_SEGMENT_KEY } from '../segment'\nimport type { Segment as FlightRouterStateSegment } from '../app-router-types'\n\n// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\nexport type SegmentRequestKeyPart = Opaque<'SegmentRequestKeyPart', string>\nexport type SegmentRequestKey = Opaque<'SegmentRequestKey', string>\n\nexport const ROOT_SEGMENT_REQUEST_KEY = '' as SegmentRequestKey\n\nexport const HEAD_REQUEST_KEY = '/_head' as SegmentRequestKey\n\nexport function createSegmentRequestKeyPart(\n segment: FlightRouterStateSegment\n): SegmentRequestKeyPart {\n if (typeof segment === 'string') {\n if (segment.startsWith(PAGE_SEGMENT_KEY)) {\n // The Flight Router State type sometimes includes the search params in\n // the page segment. However, the Segment Cache tracks this as a separate\n // key. So, we strip the search params here, and then add them back when\n // the cache entry is turned back into a FlightRouterState. This is an\n // unfortunate consequence of the FlightRouteState being used both as a\n // transport type and as a cache key; we'll address this once more of the\n // Segment Cache implementation has settled.\n // TODO: We should hoist the search params out of the FlightRouterState\n // type entirely, This is our plan for dynamic route params, too.\n return PAGE_SEGMENT_KEY as SegmentRequestKeyPart\n }\n const safeName =\n // TODO: FlightRouterState encodes Not Found routes as \"/_not-found\".\n // But params typically don't include the leading slash. We should use\n // a different encoding to avoid this special case.\n segment === '/_not-found'\n ? '_not-found'\n : encodeToFilesystemAndURLSafeString(segment)\n // Since this is not a dynamic segment, it's fully encoded. It does not\n // need to be \"hydrated\" with a param value.\n return safeName as SegmentRequestKeyPart\n }\n\n const name = segment[0]\n const paramType = segment[2]\n const safeName = encodeToFilesystemAndURLSafeString(name)\n\n const encodedName = '$' + paramType + '$' + safeName\n return encodedName as SegmentRequestKeyPart\n}\n\nexport function appendSegmentRequestKeyPart(\n parentRequestKey: SegmentRequestKey,\n parallelRouteKey: string,\n childRequestKeyPart: SegmentRequestKeyPart\n): SegmentRequestKey {\n // Aside from being filesystem safe, segment keys are also designed so that\n // each segment and parallel route creates its own subdirectory. Roughly in\n // the same shape as the source app directory. This is mostly just for easier\n // debugging (you can open up the build folder and navigate the output); if\n // we wanted to do we could just use a flat structure.\n\n // Omit the parallel route key for children, since this is the most\n // common case. Saves some bytes (and it's what the app directory does).\n const slotKey =\n parallelRouteKey === 'children'\n ? childRequestKeyPart\n : `@${encodeToFilesystemAndURLSafeString(parallelRouteKey)}/${childRequestKeyPart}`\n return (parentRequestKey + '/' + slotKey) as SegmentRequestKey\n}\n\n// Define a regex pattern to match the most common characters found in a route\n// param. It excludes anything that might not be cross-platform filesystem\n// compatible, like |. It does not need to be precise because the fallback is to\n// just base64url-encode the whole parameter, which is fine; we just don't do it\n// by default for compactness, and for easier debugging.\nconst simpleParamValueRegex = /^[a-zA-Z0-9\\-_@]+$/\n\nfunction encodeToFilesystemAndURLSafeString(value: string) {\n if (simpleParamValueRegex.test(value)) {\n return value\n }\n // If there are any unsafe characters, base64url-encode the entire value.\n // We also add a ! prefix so it doesn't collide with the simple case.\n const base64url = btoa(value)\n .replace(/\\+/g, '-') // Replace '+' with '-'\n .replace(/\\//g, '_') // Replace '/' with '_'\n .replace(/=+$/, '') // Remove trailing '='\n return '!' + base64url\n}\n\nexport function convertSegmentPathToStaticExportFilename(\n segmentPath: string\n): string {\n return `__next${segmentPath.replace(/\\//g, '.')}.txt`\n}\n"],"names":["PAGE_SEGMENT_KEY","ROOT_SEGMENT_REQUEST_KEY","HEAD_REQUEST_KEY","createSegmentRequestKeyPart","segment","startsWith","safeName","encodeToFilesystemAndURLSafeString","name","paramType","encodedName","appendSegmentRequestKeyPart","parentRequestKey","parallelRouteKey","childRequestKeyPart","slotKey","simpleParamValueRegex","value","test","base64url","btoa","replace","convertSegmentPathToStaticExportFilename","segmentPath"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,aAAY;;AAStC,MAAMC,2BAA2B,GAAuB;AAExD,MAAMC,mBAAmB,Line truncated
|
||||
{"offset": {"line": 19551, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/segment.ts"],"sourcesContent":["import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record<string, string | string[] | undefined>\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport function computeSelectedLayoutSegment(\n segments: string[] | null,\n parallelRouteKey: string\n): string | null {\n if (!segments || segments.length === 0) {\n return null\n }\n\n // For 'children', use first segment; for other parallel routes, use last segment\n const rawSegment =\n parallelRouteKey === 'children'\n ? segments[0]\n : segments[segments.length - 1]\n\n // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n // Returning an internal value like `__DEFAULT__` would be confusing\n return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n tree: FlightRouterState,\n parallelRouteKey: string,\n first = true,\n segmentPath: string[] = []\n): string[] {\n let node: FlightRouterState\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey]\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1]\n node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n }\n\n if (!node) return segmentPath\n const segment = node[0]\n\n let segmentValue = getSegmentValue(segment)\n\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath\n }\n\n segmentPath.push(segmentValue)\n\n return getSelectedLayoutSegmentPath(\n node,\n parallelRouteKey,\n false,\n segmentPath\n )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n"],"names":["getSegmentValue","segment","Array","isArray","isGroupSegment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","computeSelectedLayoutSegment","segments","parallelRouteKey","length","rawSegment","DEFAULT_SEGMENT_KEY","getSelectedLayoutSegmentPath","tree","first","segmentPath","node","parallelRoutes","children","Object","values","segmentValue","push","NOT_FOUND_SEGMENT_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEO,SAASA,gBAAgBC,OAAgB;IAC9C,OAAOC,MAAMC,OAAO,CAACF,WAAWA,OAAO,CAAC,EAAE,GAAGA;AAC/C;AAEO,SAASG,eAAeH,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQI,QAAQ,CAAC;AAChD;AAEO,SAASC,uBAAuBL,OAAe;IACpD,OAAOA,QAAQM,UAAU,CAAC,QAAQN,YAAY;AAChD;AAEO,SAASO,6BACdP,OAAgB,EAChBQ,YAA2D;IAE3D,MAAMC,gBAAgBT,QAAQU,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOX;AACT;AAEO,SAASe,6BACdC,QAAyB,EACzBC,gBAAwB;IAExB,IAAI,CAACD,YAAYA,SAASE,MAAM,KAAK,GAAG;QACtC,OAAO;IACT;IAEA,iFAAiF;IACjF,MAAMC,aACJF,qBAAqB,aACjBD,QAAQ,CAAC,EAAE,GACXA,QAAQ,CAACA,SAASE,MAAM,GAAG,EAAE;IAEnC,sGAAsG;IACtG,oEAAoE;IACpE,OAAOC,eAAeC,sBAAsB,OAAOD;AACrD;AAGO,SAASE,6BACdC,IAAuB,EACvBL,gBAAwB,EACxBM,QAAQ,IAAI,EACZC,cAAwB,EAAE;IAE1B,IAAIC;IACJ,IAAIF,OAAO;QACT,kEAAkE;QAClEE,OAAOH,IAAI,CAAC,EAAE,CAACL,iBAAiB;IAClC,OAAO;QACL,oGAAoG;QACpG,MAAMS,iBAAiBJ,IAAI,CAAC,EAAE;QAC9BG,OAAOC,eAAeC,QAAQ,IAAIC,OAAOC,MAAM,CAACH,eAAe,CAAC,EAAE;IACpE;IAEA,IAAI,CAACD,MAAM,OAAOD;IAClB,MAAMxB,UAAUyB,IAAI,CAAC,EAAE;IAEvB,IAAIK,eAAe/B,gBAAgBC;IAEnC,IAAI,CAAC8B,gBAAgBA,aAAaxB,UAAU,CAACK,mBAAmB;QAC9D,OAAOa;IACT;IAEAA,YAAYO,IAAI,CAACD;IAEjB,OAAOT,6BACLI,MACAR,kBACA,OACAO;AAEJ;AAEO,MAAMb,mBAAmB,WAAU;AACnC,MAAMS,sBAAsB,cAAa;AACzC,MAAMY,wBAAwB,cAAa","ignoreList":[0]}},
|
||||
{"offset": {"line": 19625, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/server-reference-info.ts"],"sourcesContent":["export interface ServerReferenceInfo {\n type: 'server-action' | 'use-cache'\n usedArgs: [boolean, boolean, boolean, boolean, boolean, boolean]\n hasRestArgs: boolean\n}\n\nexport const SERVER_REFERENCE_ID_LENGTH = 42\n\nexport function mightBeServerReferenceId(id: string): boolean {\n return id.length === SERVER_REFERENCE_ID_LENGTH\n}\n\n/**\n * Extracts info about the server reference for the given server reference ID by\n * parsing the first byte of the hex-encoded ID.\n *\n * ```\n * Bit positions: [7] [6] [5] [4] [3] [2] [1] [0]\n * Bits: typeBit argMask restArgs\n * ```\n *\n * If the `typeBit` is `1` the server reference represents a `\"use cache\"`\n * function, otherwise a server action.\n *\n * The `argMask` encodes whether the function uses the argument at the\n * respective position.\n *\n * The `restArgs` bit indicates whether the function uses a rest parameter. It's\n * also set to 1 if the function has more than 6 args.\n *\n * @param id hex-encoded server reference ID\n */\nexport function extractInfoFromServerReferenceId(\n id: string\n): ServerReferenceInfo {\n const infoByte = parseInt(id.slice(0, 2), 16)\n const typeBit = (infoByte >> 7) & 0x1\n const argMask = (infoByte >> 1) & 0x3f\n const restArgs = infoByte & 0x1\n const usedArgs = Array(6)\n\n for (let index = 0; index < 6; index++) {\n const bitPosition = 5 - index\n const bit = (argMask >> bitPosition) & 0x1\n usedArgs[index] = bit === 1\n }\n\n return {\n type: typeBit === 1 ? 'use-cache' : 'server-action',\n usedArgs: usedArgs as [\n boolean,\n boolean,\n boolean,\n boolean,\n boolean,\n boolean,\n ],\n hasRestArgs: restArgs === 1,\n }\n}\n\n/**\n * Creates a sparse array containing only the used arguments based on the\n * provided action info.\n */\nexport function omitUnusedArgs(\n args: unknown[],\n info: ServerReferenceInfo\n): unknown[] {\n const filteredArgs = new Array(args.length)\n let length = 0\n\n for (let index = 0; index < args.length; index++) {\n if (\n (index < 6 && info.usedArgs[index]) ||\n // This assumes that the server reference info byte has the restArgs bit\n // set to 1 if there are more than 6 args.\n (index >= 6 && info.hasRestArgs)\n ) {\n filteredArgs[index] = args[index]\n length = index + 1\n }\n }\n\n // Trim trailing unused args from the array.\n filteredArgs.length = length\n\n return filteredArgs\n}\n"],"names":["SERVER_REFERENCE_ID_LENGTH","mightBeServerReferenceId","id","length","extractInfoFromServerReferenceId","infoByte","parseInt","slice","typeBit","argMask","restArgs","usedArgs","Array","index","bitPosition","bit","type","hasRestArgs","omitUnusedArgs","args","info","filteredArgs"],"mappings":";;;;;;;;;;AAMO,MAAMA,6BAA6B,GAAE;AAErC,SAASC,yBAAyBC,EAAU;IACjD,OAAOA,GAAGC,MAAM,KAAKH;AACvB;AAsBO,SAASI,iCACdF,EAAU;IAEV,MAAMG,WAAWC,SAASJ,GAAGK,KAAK,CAAC,GAAG,IAAI;IAC1C,MAAMC,UAAWH,YAAY,IAAK;IAClC,MAAMI,UAAWJ,YAAY,IAAK;IAClC,MAAMK,WAAWL,WAAW;IAC5B,MAAMM,WAAWC,MAAM;IAEvB,IAAK,IAAIC,QAAQ,GAAGA,QAAQ,GAAGA,QAAS;QACtC,MAAMC,cAAc,IAAID;QACxB,MAAME,MAAON,WAAWK,cAAe;QACvCH,QAAQ,CAACE,MAAM,GAAGE,QAAQ;IAC5B;IAEA,OAAO;QACLC,MAAMR,YAAY,IAAI,cAAc;QACpCG,UAAUA;QAQVM,aAAaP,aAAa;IAC5B;AACF;AAMO,SAASQ,eACdC,IAAe,EACfC,IAAyB;IAEzB,MAAMC,eAAe,IAAIT,MAAMO,KAAKhB,MAAM;IAC1C,IAAIA,SAAS;IAEb,IAAK,IAAIU,QAAQ,GAAGA,QAAQM,KAAKhB,MAAM,EAAEU,QAAS;QAChD,IACGA,QAAQ,KAAKO,KAAKT,QAAQ,CAACE,MAAM,IAClC,wEAAwE;QACxE,0CAA0C;QACzCA,SAAS,KAAKO,KAAKH,WAAW,EAC/B;YACAI,YAAY,CAACR,MAAM,GAAGM,IAAI,CAACN,MAAM;YACjCV,SAASU,QAAQ;QACnB;IACF;IAEA,4CAA4C;IAC5CQ,aAAalB,MAAM,GAAGA;IAEtB,OAAOkB;AACT","ignoreList":[0]}},
|
||||
{"offset": {"line": 19675, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/size-limit.ts"],"sourcesContent":["import type { SizeLimit } from '../../types'\n\nexport const DEFAULT_MAX_POSTPONED_STATE_SIZE: SizeLimit = '100 MB'\n\n// 100MB in bytes. Not using the parseSizeLimit for performance as parseMaxPostponedStateSize is in the hot path for rendering.\nconst DEFAULT_MAX_POSTPONED_STATE_SIZE_BYTES = 104_857_600\n\nfunction parseSizeLimit(size: SizeLimit): number | undefined {\n const bytes = (\n require('next/dist/compiled/bytes') as typeof import('next/dist/compiled/bytes')\n ).parse(size)\n if (bytes === null || isNaN(bytes) || bytes < 1) {\n return undefined\n }\n return bytes\n}\n\n/**\n * Parses the maxPostponedStateSize config value, using the default if not provided.\n */\nexport function parseMaxPostponedStateSize(\n size: SizeLimit | undefined\n): number | undefined {\n if (!size) {\n return DEFAULT_MAX_POSTPONED_STATE_SIZE_BYTES\n }\n return parseSizeLimit(size)\n}\n"],"names":["DEFAULT_MAX_POSTPONED_STATE_SIZE","DEFAULT_MAX_POSTPONED_STATE_SIZE_BYTES","parseSizeLimit","size","bytes","require","parse","isNaN","undefined","parseMaxPostponedStateSize"],"mappings":";;;;;;AAEO,MAAMA,mCAA8C,SAAQ;AAEnE,+HAA+H;AAC/H,MAAMC,yCAAyC;AAE/C,SAASC,eAAeC,IAAe;IACrC,MAAMC,QACJC,QAAQ,mGACRC,KAAK,CAACH;IACR,IAAIC,UAAU,QAAQG,MAAMH,UAAUA,QAAQ,GAAG;QAC/C,OAAOI;IACT;IACA,OAAOJ;AACT;AAKO,SAASK,2BACdN,IAA2B;IAE3B,IAAI,CAACA,MAAM;QACT,OAAOF;IACT;IACA,OAAOC,eAAeC;AACxB","ignoreList":[0]}},
|
||||
{"offset": {"line": 19701, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/utils.ts"],"sourcesContent":["import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n Context extends BaseContext = NextPageContext,\n InitialProps = {},\n Props = {},\n> = ComponentType<Props> & {\n /**\n * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n * @param context Context of `page`\n */\n getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n DocumentContext,\n DocumentInitialProps,\n DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n AppContextType,\n P,\n AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n id: string\n startTime: number\n value: number\n attribution?: { [key: string]: unknown }\n} & (\n | {\n label: 'web-vital'\n name: (typeof WEB_VITALS)[number]\n }\n | {\n label: 'custom'\n name:\n | 'Next.js-hydration'\n | 'Next.js-route-change-to-render'\n | 'Next.js-render'\n }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n | {\n enhanceApp?: Enhancer<AppType>\n enhanceComponent?: Enhancer<NextComponentType>\n }\n | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n html: string\n head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n res?: ServerResponse\n [k: string]: any\n}\n\nexport type NEXT_DATA = {\n props: Record<string, any>\n page: string\n query: ParsedUrlQuery\n buildId: string\n assetPrefix?: string\n nextExport?: boolean\n autoExport?: boolean\n isFallback?: boolean\n isExperimentalCompile?: boolean\n dynamicIds?: (string | number)[]\n err?: Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n __NEXT_ERROR_CODE?: string\n }\n gsp?: boolean\n gssp?: boolean\n customServer?: boolean\n gip?: boolean\n appGip?: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n scriptLoader?: any[]\n isPreview?: boolean\n notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n /**\n * Error object if encountered during rendering\n */\n err?: (Error & { statusCode?: number }) | null\n /**\n * `HTTP` request object.\n */\n req?: IncomingMessage\n /**\n * `HTTP` response object.\n */\n res?: ServerResponse\n /**\n * Path section of `URL`.\n */\n pathname: string\n /**\n * Query string section of `URL` parsed as an object.\n */\n query: ParsedUrlQuery\n /**\n * `String` of the actual path including query.\n */\n asPath?: string\n /**\n * The currently active locale\n */\n locale?: string\n /**\n * All configured locales\n */\n locales?: readonly string[]\n /**\n * The configured default locale\n */\n defaultLocale?: string\n /**\n * `Component` the tree of the App to use if needing to render separately\n */\n AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n Component: NextComponentType<NextPageContext>\n AppTree: AppTreeType\n ctx: NextPageContext\n router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n pageProps: PageProps\n}\n\nexport type AppPropsType<\n Router extends NextRouter = NextRouter,\n PageProps = {},\n> = AppInitialProps<PageProps> & {\n Component: NextComponentType<NextPageContext, any, any>\n router: Router\n __N_SSG?: boolean\n __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n renderPage: RenderPage\n defaultGetInitialProps(\n ctx: DocumentContext,\n options?: { nonce?: string }\n ): Promise<DocumentInitialProps>\n}\n\nexport tyLine truncated
|
||||
{"offset": {"line": 19876, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/shared/lib/utils/reflect-utils.ts"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n if (isDefinitelyAValidIdentifier.test(prop)) {\n return `\\`${target}.${prop}\\``\n }\n return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n target: string,\n prop: string\n) {\n const stringifiedProp = JSON.stringify(prop)\n return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toString',\n 'valueOf',\n 'toLocaleString',\n\n // Promise prototype\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n 'status',\n // 'value',\n // 'error',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n 'toJSON',\n '$$typeof',\n '__esModule',\n\n // Tested by flight when checking for iterables\n '@@iterator',\n])\n"],"names":["isDefinitelyAValidIdentifier","describeStringPropertyAccess","target","prop","test","JSON","stringify","describeHasCheckingStringProperty","stringifiedProp","wellKnownProperties","Set"],"mappings":";;;;;;;;AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAMA,+BAA+B;AAE9B,SAASC,6BAA6BC,MAAc,EAAEC,IAAY;IACvE,IAAIH,6BAA6BI,IAAI,CAACD,OAAO;QAC3C,OAAO,CAAC,EAAE,EAAED,OAAO,CAAC,EAAEC,KAAK,EAAE,CAAC;IAChC;IACA,OAAO,CAAC,EAAE,EAAED,OAAO,CAAC,EAAEG,KAAKC,SAAS,CAACH,MAAM,GAAG,CAAC;AACjD;AAEO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAO,CAAC,cAAc,EAAED,OAAO,EAAE,EAAEM,gBAAgB,OAAO,EAAEA,gBAAgB,IAAI,EAAEN,OAAO,cAAc,CAAC;AAC1G;AAEO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB;IACA;IACA;IAEA,0BAA0B;IAC1B;IACA,WAAW;IACX,WAAW;IAEX,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B;IACA;IACA;IAEA,+CAA+C;IAC/C;CACD,EAAC","ignoreList":[0]}}]
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
module.exports = [
|
||||
"[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
|
||||
;
|
||||
else {
|
||||
if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
|
||||
;
|
||||
else {
|
||||
if ("TURBOPACK compile-time truthy", 1) {
|
||||
if ("TURBOPACK compile-time truthy", 1) {
|
||||
module.exports = __turbopack_context__.r("[externals]/next/dist/compiled/next-server/app-page-turbo.runtime.dev.js [external] (next/dist/compiled/next-server/app-page-turbo.runtime.dev.js, cjs)");
|
||||
} else //TURBOPACK unreachable
|
||||
;
|
||||
} else //TURBOPACK unreachable
|
||||
;
|
||||
}
|
||||
}
|
||||
}),
|
||||
"[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-dom.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-rsc] (ecmascript)").vendored['react-rsc'].ReactDOM;
|
||||
}),
|
||||
"[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-rsc] (ecmascript)").vendored['react-rsc'].ReactJsxRuntime;
|
||||
}),
|
||||
"[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-rsc] (ecmascript)").vendored['react-rsc'].ReactServerDOMTurbopackServer;
|
||||
}),
|
||||
"[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-static.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-rsc] (ecmascript)").vendored['react-rsc'].ReactServerDOMTurbopackStatic;
|
||||
}),
|
||||
"[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||
"use strict";
|
||||
|
||||
module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-rsc] (ecmascript)").vendored['react-rsc'].React;
|
||||
}),
|
||||
];
|
||||
|
||||
//# sourceMappingURL=node_modules_next_dist_server_route-modules_app-page_0qo_rmc._.js.map
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sections": [
|
||||
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/module.compiled.js"],"sourcesContent":["if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n"],"names":["process","env","NEXT_RUNTIME","module","exports","require","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK"],"mappings":"AAAA,IAAIA,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;KAElC;IACL,IAAIF,QAAQC,GAAG,CAACK,yBAAyB,EAAE;;SAcpC;QACL,IAAIN,QAAQC,GAAG,CAACM,QAAQ,KAAK,WAAe;YAC1C,IAAIP,QAAQC,GAAG,CAACO,SAAS,eAAE;gBACzBL,OAAOC,OAAO,GAAGC,QAAQ;YAC3B,OAAO;;QAGT,OAAO;;IAOT;AACF","ignoreList":[0]}},
|
||||
{"offset": {"line": 23, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/rsc/react-dom.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.ReactDOM\n"],"names":["module","exports","require","vendored","ReactDOM"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,QAAQ","ignoreList":[0]}},
|
||||
{"offset": {"line": 28, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.ReactJsxRuntime\n"],"names":["module","exports","require","vendored","ReactJsxRuntime"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,eAAe","ignoreList":[0]}},
|
||||
{"offset": {"line": 33, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.ReactServerDOMTurbopackServer\n"],"names":["module","exports","require","vendored","ReactServerDOMTurbopackServer"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,6BAA6B","ignoreList":[0]}},
|
||||
{"offset": {"line": 38, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-static.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.ReactServerDOMTurbopackStatic\n"],"names":["module","exports","require","vendored","ReactServerDOMTurbopackStatic"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,6BAA6B","ignoreList":[0]}},
|
||||
{"offset": {"line": 43, "column": 0}, "map": {"version":3,"sources":["file:///Users/home/Projects/forumlify/node_modules/next/src/server/route-modules/app-page/vendored/rsc/react.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.React\n"],"names":["module","exports","require","vendored","React"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,KAAK","ignoreList":[0]}}]
|
||||
}
|
||||
Reference in new issue
Block a user