diff --git a/apps/tools/package.json b/apps/tools/package.json index ac7e27a0..80dc1de2 100644 --- a/apps/tools/package.json +++ b/apps/tools/package.json @@ -19,6 +19,7 @@ "@hookform/resolvers": "^3.9.1", "@opencut/env": "workspace:*", "@opencut/ui": "workspace:*", + "@opencut/hooks": "workspace:*", "@radix-ui/react-separator": "^1.1.7", "@upstash/ratelimit": "^2.0.6", "@upstash/redis": "^1.35.4", @@ -36,7 +37,7 @@ "lucide-react": "^0.468.0", "motion": "^12.18.1", "nanoid": "^5.1.5", - "next": "^15.5.3", + "next": "^15.5.7", "next-themes": "^0.4.4", "pg": "^8.16.2", "radix-ui": "^1.4.2", @@ -80,4 +81,4 @@ "tsx": "^4.7.1", "typescript": "^5.8.3" } -} +} \ No newline at end of file diff --git a/apps/tools/public/bg-remover-2.png b/apps/tools/public/bg-remover-2.png new file mode 100644 index 00000000..159fe0ea Binary files /dev/null and b/apps/tools/public/bg-remover-2.png differ diff --git a/apps/tools/public/bg-remover.png b/apps/tools/public/bg-remover.png new file mode 100644 index 00000000..d5c8e2b1 Binary files /dev/null and b/apps/tools/public/bg-remover.png differ diff --git a/apps/tools/public/logo.svg b/apps/tools/public/logo.svg new file mode 100644 index 00000000..76a6535a --- /dev/null +++ b/apps/tools/public/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/apps/tools/src/app/base-page.tsx b/apps/tools/src/app/base-page.tsx deleted file mode 100644 index 61c827c7..00000000 --- a/apps/tools/src/app/base-page.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { Header } from "@/components/header"; -import { Footer } from "@/components/footer"; -import { cn } from "@/lib/utils"; - -interface BasePageProps { - children: React.ReactNode; - className?: string; - mainClassName?: string; - maxWidth?: "3xl" | "6xl" | "full"; - title?: string; - description?: string; -} - -export function BasePage({ - children, - className = "", - mainClassName = "", - maxWidth = "3xl", - title, - description, -}: BasePageProps) { - const maxWidthClass = { - "3xl": "max-w-3xl", - "6xl": "max-w-6xl", - full: "max-w-full", - }[maxWidth]; - - return ( -
-
-
- {title && description && ( -
-

- {title} -

-

- {description} -

-
- )} - {children} -
-
- ); -} diff --git a/apps/tools/src/app/bg-remover/client-page copy.tsx b/apps/tools/src/app/bg-remover/client-page copy.tsx new file mode 100644 index 00000000..004a22dc --- /dev/null +++ b/apps/tools/src/app/bg-remover/client-page copy.tsx @@ -0,0 +1,322 @@ +"use client"; +import { Header } from "@/components/header"; +import { DownloadIcon } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { UploadIcon } from "lucide-react"; +import { useFileUpload } from "@opencut/hooks/use-file-upload"; +import { useFilePaste } from "@opencut/hooks/use-file-paste"; +import { useState, useEffect, useRef } from "react"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/components/ui/popover"; +import { cn, generateUUID } from "@/lib/utils"; + +interface FileStatus { + file: File; + id: string; + progress: number; + status: "pending" | "processing" | "completed" | "error"; + batchId: string; +} + +export function BGRemoverClient() { + const [files, setFiles] = useState([]); + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + const [isFinishedUploading, setIsFinishedUploading] = useState(false); + + const handleFiles = ({ files: newFiles }: { files: File[] | FileList }) => { + const newFileStatuses: FileStatus[] = Array.from(newFiles).map((file) => ({ + file, + id: generateUUID(), + progress: 0, + status: "pending", + batchId: generateUUID(), + })); + setFiles((prev) => [...prev, ...newFileStatuses]); + console.log(newFileStatuses); + // setIsFinishedUploading(false); + // setIsPopoverOpen(true); + }; + + useEffect(() => { + const interval = setInterval(() => { + setFiles((prev) => { + if ( + !prev.some((f) => f.status === "pending" || f.status === "processing") + ) { + return prev; + } + return prev.map((f) => { + if (f.status === "completed") return f; + + if (f.status === "pending") { + return { ...f, status: "processing", progress: 0 }; + } + + if (f.status === "processing") { + const newProgress = Math.min( + f.progress + Math.random() * 15 + 5, + 100, + ); + return { + ...f, + progress: newProgress, + status: newProgress >= 100 ? "completed" : "processing", + }; + } + return f; + }); + }); + }, 500); + return () => clearInterval(interval); + }, []); + + useEffect(() => { + if (files.length > 0 && files.every((f) => f.status === "completed")) { + setIsFinishedUploading(true); + } + }, [files]); + + const { isDragOver, openFilePicker, fileInputProps, dragProps } = + useFileUpload({ + accept: "image/*", + multiple: false, + onFilesSelected: (files) => handleFiles({ files }), + }); + + useFilePaste({ onFilesPaste: (files) => handleFiles({ files }) }); + + return ( +
+
+ + +
+ } + /> +
+ +
+ BG Remover + BG Remover + BG Remover +
+
+
+

BG Remover

+

+ Drag and drop, click to browse or paste from clipboard to upload + an image. +

+
+ +
+
+ + ); +} + +const FilesPopover = ({ + files, + isPopoverOpen, + setIsPopoverOpen, + isFinishedUploading, +}: { + files: FileStatus[]; + isPopoverOpen: boolean; + setIsPopoverOpen: (open: boolean) => void; + isFinishedUploading: boolean; +}) => { + const scrollContainerRef = useRef(null); + const prevFileLengthRef = useRef(0); + + useEffect(() => { + if (files.length > prevFileLengthRef.current) { + const scrollToBottom = () => { + scrollContainerRef.current?.scrollTo({ + top: scrollContainerRef.current.scrollHeight, + behavior: "smooth", + }); + }; + + if (scrollContainerRef.current) { + scrollToBottom(); + } else { + // popover just opened, wait for open animation to finish + setTimeout(scrollToBottom, 100); + } + } + prevFileLengthRef.current = files.length; + }, [files.length]); + + const isProcessing = files.some( + (f) => f.status === "processing" || f.status === "pending", + ); + + const inProgressFiles = files.filter( + (f) => f.status === "processing" || f.status === "pending", + ); + const overallProgress = + inProgressFiles.length > 0 + ? inProgressFiles.reduce((acc, f) => acc + f.progress, 0) / + inProgressFiles.length + : 0; + + const hasCompletedFiles = files.some((f) => f.status === "completed"); + const canDownloadAll = hasCompletedFiles; + + return ( + + + + + { + const target = e.target as HTMLElement; + const isInteractive = + target.closest("button") || + target.closest("a") || + target.closest("p") || + target.closest("h1") || + target.closest("h2") || + target.closest("h3") || + target.closest("h4") || + target.closest("h5") || + target.closest("h6") || + target.closest("input") || + target.closest("[role='button']") || + target.tagName === "IMG" || + target.tagName === "VIDEO"; + + if (isInteractive) { + e.preventDefault(); + } + }} + > +
+
+

Downloads

+
+
+ {files.length === 0 && ( +
+ No files uploaded yet +
+ )} +
+ {files.map((fileStatus) => ( + + ))} +
+ +
+ {files.length > 0 && ( + + )} +
+
+
+
+
+ ); +}; + +const ProgressIndicator = ({ progress }: { progress: number }) => ( + + + +); + +const FileItem = ({ fileStatus }: { fileStatus: FileStatus }) => ( +
+ {fileStatus.file.name} +
+
+

+ {fileStatus.file.name.split(".").slice(0, -1).join(".")} +

+ {fileStatus.status === "completed" ? ( + + ) : ( +

+ {Math.round(fileStatus.progress)}% +

+ )} +
+
+
+); diff --git a/apps/tools/src/app/bg-remover/client-page.tsx b/apps/tools/src/app/bg-remover/client-page.tsx new file mode 100644 index 00000000..9381b851 --- /dev/null +++ b/apps/tools/src/app/bg-remover/client-page.tsx @@ -0,0 +1,147 @@ +"use client"; +import { Header } from "@/components/header"; +import { DownloadIcon } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { UploadIcon } from "lucide-react"; +import { useFileUpload } from "@opencut/hooks/use-file-upload"; +import { useFilePaste } from "@opencut/hooks/use-file-paste"; +import { useState, useEffect, useRef } from "react"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/components/ui/popover"; +import { cn, generateUUID } from "@/lib/utils"; +import { motion, AnimatePresence } from "motion/react"; + +interface FileStatus { + file: File; + id: string; + progress: number; + status: "pending" | "processing" | "completed" | "error"; + batchId: string; +} + +export function BGRemoverClient() { + const [files, setFiles] = useState([]); + + const handleFiles = ({ files: newFiles }: { files: File[] | FileList }) => { + const newFileStatuses: FileStatus[] = Array.from(newFiles).map((file) => ({ + file, + id: generateUUID(), + progress: 0, + status: "pending", + batchId: generateUUID(), + })); + setFiles((prev) => [...prev, ...newFileStatuses]); + console.log(newFileStatuses); + }; + + const { isDragOver, openFilePicker, fileInputProps, dragProps } = + useFileUpload({ + accept: "image/*", + multiple: false, + onFilesSelected: (files) => handleFiles({ files }), + }); + + useFilePaste({ onFilesPaste: (files) => handleFiles({ files }) }); + + return ( +
+
+
+ + {files.length === 0 ? ( + + +
+ BG Remover + BG Remover + BG Remover +
+
+
+

BG Remover

+

+ Drag and drop, click to browse or paste from clipboard to + upload an image. +

+
+ +
+
+ ) : ( + +
+

Processing Images...

+
+ {files.map((fileStatus) => ( +
+ {fileStatus.file.name} +
+ {fileStatus.file.name} +
+
+ ))} +
+ +
+
+ )} +
+
+
+ ); +} diff --git a/apps/tools/src/app/bg-remover/flow.md b/apps/tools/src/app/bg-remover/flow.md new file mode 100644 index 00000000..11f7b1f2 --- /dev/null +++ b/apps/tools/src/app/bg-remover/flow.md @@ -0,0 +1,7 @@ +user uploads an image + +new view shows with the image + +they can "paint" on it (to create rough mask around subject to keep) + +button to "remove background" \ No newline at end of file diff --git a/apps/tools/src/app/bg-remover/page.tsx b/apps/tools/src/app/bg-remover/page.tsx new file mode 100644 index 00000000..76e969fc --- /dev/null +++ b/apps/tools/src/app/bg-remover/page.tsx @@ -0,0 +1,5 @@ +import { BGRemoverClient } from "./client-page"; + +export default function BGRemoverPage() { + return ; +} diff --git a/apps/tools/src/app/globals.css b/apps/tools/src/app/globals.css index 8d318925..ed389192 100644 --- a/apps/tools/src/app/globals.css +++ b/apps/tools/src/app/globals.css @@ -14,7 +14,7 @@ --card-foreground: hsl(0 0% 11%); --popover: hsl(0, 0%, 100%); --popover-foreground: hsl(0 0% 2%); - --primary: hsl(205, 84%, 47%); + --primary: hsl(214, 92%, 51%); --primary-foreground: hsl(0 0% 91%); --secondary: hsl(216, 13%, 92%); --secondary-foreground: hsl(0 0% 2%); diff --git a/apps/tools/src/app/layout.tsx b/apps/tools/src/app/layout.tsx index ad91aa68..0beeeba8 100644 --- a/apps/tools/src/app/layout.tsx +++ b/apps/tools/src/app/layout.tsx @@ -30,7 +30,7 @@ export default function RootLayout({ - + {children} diff --git a/apps/tools/src/app/page.tsx b/apps/tools/src/app/page.tsx index c6053bf6..4c8d7712 100644 --- a/apps/tools/src/app/page.tsx +++ b/apps/tools/src/app/page.tsx @@ -9,8 +9,13 @@ export const metadata: Metadata = { export default async function Home() { return ( -
-

Hello World

+
+
+

Background Remover

+

+ Remove backgrounds from images with AI-powered precision +

+
); } diff --git a/apps/tools/src/components/header.tsx b/apps/tools/src/components/header.tsx index 5a35b399..1cca54dd 100644 --- a/apps/tools/src/components/header.tsx +++ b/apps/tools/src/components/header.tsx @@ -1,33 +1,36 @@ "use client"; -import { useState } from "react"; import Link from "next/link"; -import { motion } from "motion/react"; +import { usePathname } from "next/navigation"; import { Button } from "./ui/button"; -import { ArrowRight } from "lucide-react"; import Image from "next/image"; -import { ThemeToggle } from "./theme-toggle"; -import { GithubIcon, MenuIcon } from "@opencut/ui/icons"; -import { cn } from "@/lib/utils"; -import { DEFAULT_LOGO_URL, SOCIAL_LINKS } from "@/constants/site-constants"; +import { DEFAULT_LOGO_URL } from "@/constants/site-constants"; +import { + HoverCard, + HoverCardContent, + HoverCardTrigger, +} from "@/components/ui/hover-card"; +import { CheckIcon } from "lucide-react"; -export function Header() { - const [isMenuOpen, setIsMenuOpen] = useState(false); - - const links = [ - { - label: "Contributors", - href: "/contributors", +export function Header({rightContent}: {rightContent?: React.ReactNode}) { + const pathname = usePathname(); + const tools = { + video: { + label: "Video tools", + items: [ + { name: "Video Editor", href: "/video-editor" }, + { name: "Video Compressor", href: "/video-compressor" }, + { name: "Video Converter", href: "/video-converter" }, + ], }, - { - label: "Sponsors", - href: "/sponsors", + image: { + label: "Image tools", + items: [ + { name: "BG Remover", href: "/bg-remover" }, + { name: "Color Replacer", href: "/color-replacer" }, + ], }, - { - label: "Blog", - href: "/blog", - }, - ]; + }; return (
@@ -42,88 +45,41 @@ export function Header() { height={32} /> -
- -
-
- -
-
- - - - - - - -
-
-
setIsMenuOpen(false)} - > -
- - { - e.preventDefault(); - e.stopPropagation(); - }} - /> -
-
+ {rightContent} ); diff --git a/apps/tools/src/components/ui/button.tsx b/apps/tools/src/components/ui/button.tsx index 1d4d6e5e..8b36ef29 100644 --- a/apps/tools/src/components/ui/button.tsx +++ b/apps/tools/src/components/ui/button.tsx @@ -13,8 +13,6 @@ const buttonVariants = cva( "bg-foreground text-background shadow-sm hover:bg-foreground/90", primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90", - "primary-gradient": - "bg-gradient-to-r from-cyan-400 to-blue-500 text-white hover:opacity-85 transition-opacity", destructive: "bg-destructive/0 border border-destructive/25 text-destructive shadow-xs hover:bg-destructive hover:text-destructive-foreground", outline: diff --git a/apps/tools/src/components/ui/popover.tsx b/apps/tools/src/components/ui/popover.tsx index 406ff8eb..0fada7f0 100644 --- a/apps/tools/src/components/ui/popover.tsx +++ b/apps/tools/src/components/ui/popover.tsx @@ -21,7 +21,7 @@ const PopoverContent = React.forwardRef< align={align} sideOffset={sideOffset} className={cn( - "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-[0_0_10px_rgba(0,0,0,0.15)] outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", + "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-[0_0_20px_rgba(0,0,0,0.15)] outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className )} {...props} diff --git a/apps/tools/src/components/ui/spinner.tsx b/apps/tools/src/components/ui/spinner.tsx new file mode 100644 index 00000000..3e4ea072 --- /dev/null +++ b/apps/tools/src/components/ui/spinner.tsx @@ -0,0 +1,17 @@ +import { Loader2Icon } from "lucide-react"; + +import { cn } from "@/lib/utils"; + +function Spinner({ className, ...props }: React.ComponentProps<"svg">) { + return ( + + ); +} + +export { Spinner }; diff --git a/apps/tools/src/constants/site-constants.ts b/apps/tools/src/constants/site-constants.ts index af94b927..20578929 100644 --- a/apps/tools/src/constants/site-constants.ts +++ b/apps/tools/src/constants/site-constants.ts @@ -10,7 +10,7 @@ export const SITE_INFO = { favicon: "/favicon.ico", }; -export const DEFAULT_LOGO_URL = "/logos/opencut/svg/logo.svg"; +export const DEFAULT_LOGO_URL = "/logo.svg"; export const SOCIAL_LINKS = { x: "https://x.com/OpenCutTools", diff --git a/apps/tools/src/stores/editor-store.ts b/apps/tools/src/stores/editor-store.ts deleted file mode 100644 index 97606ded..00000000 --- a/apps/tools/src/stores/editor-store.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { create } from "zustand"; -import { persist } from "zustand/middleware"; -import type { CanvasPreset, PlatformLayout } from "@/types/editor"; -import { DEFAULT_CANVAS_PRESETS } from "@/constants/editor-constants"; - -interface LayoutGuideSettings { - platform: PlatformLayout | null; -} - -interface EditorState { - isInitializing: boolean; - isPanelsReady: boolean; - canvasPresets: CanvasPreset[]; - layoutGuide: LayoutGuideSettings; - setInitializing: (loading: boolean) => void; - setPanelsReady: (ready: boolean) => void; - initializeApp: () => Promise; - setLayoutGuide: (settings: Partial) => void; - toggleLayoutGuide: (platform: PlatformLayout) => void; -} - -export const useEditorStore = create()( - persist( - (set) => ({ - isInitializing: true, - isPanelsReady: false, - canvasPresets: DEFAULT_CANVAS_PRESETS, - layoutGuide: { - platform: null, - }, - setInitializing: (loading) => { - set({ isInitializing: loading }); - }, - - setPanelsReady: (ready) => { - set({ isPanelsReady: ready }); - }, - - initializeApp: async () => { - console.log("Initializing video editor..."); - set({ isInitializing: true, isPanelsReady: false }); - - set({ isPanelsReady: true, isInitializing: false }); - console.log("Video editor ready"); - }, - - setLayoutGuide: (settings) => { - set((state) => ({ - layoutGuide: { - ...state.layoutGuide, - ...settings, - }, - })); - }, - - toggleLayoutGuide: (platform) => { - set((state) => ({ - layoutGuide: { - platform: state.layoutGuide.platform === platform ? null : platform, - }, - })); - }, - }), - { - name: "editor-settings", - partialize: (state) => ({ - layoutGuide: state.layoutGuide, - }), - }, - ), -); diff --git a/apps/tools/src/stores/keybindings-store.ts b/apps/tools/src/stores/keybindings-store.ts deleted file mode 100644 index 6cc08780..00000000 --- a/apps/tools/src/stores/keybindings-store.ts +++ /dev/null @@ -1,270 +0,0 @@ -"use client"; - -import { create } from "zustand"; -import { persist } from "zustand/middleware"; -import { ActionWithOptionalArgs } from "@/constants/action-constants"; -import { isAppleDevice, isTypableDOMElement } from "@/lib/utils"; -import { KeybindingConfig, ShortcutKey } from "@/types/keybinding"; - -// Default keybindings configuration -export const defaultKeybindings: KeybindingConfig = { - space: "toggle-play", - j: "seek-backward", - k: "toggle-play", - l: "seek-forward", - left: "frame-step-backward", - right: "frame-step-forward", - "shift+left": "jump-backward", - "shift+right": "jump-forward", - home: "goto-start", - enter: "goto-start", - end: "goto-end", - s: "split-element", - n: "toggle-snapping", - "ctrl+a": "select-all", - "ctrl+d": "duplicate-selected", - "ctrl+c": "copy-selected", - "ctrl+v": "paste-selected", - "ctrl+z": "undo", - "ctrl+shift+z": "redo", - "ctrl+y": "redo", - delete: "delete-selected", - backspace: "delete-selected", -}; - -export interface KeybindingConflict { - key: ShortcutKey; - existingAction: ActionWithOptionalArgs; - newAction: ActionWithOptionalArgs; -} - -interface KeybindingsState { - keybindings: KeybindingConfig; - isCustomized: boolean; - keybindingsEnabled: boolean; - isRecording: boolean; - - // Actions - updateKeybinding: (key: ShortcutKey, action: ActionWithOptionalArgs) => void; - removeKeybinding: (key: ShortcutKey) => void; - resetToDefaults: () => void; - importKeybindings: (config: KeybindingConfig) => void; - exportKeybindings: () => KeybindingConfig; - enableKeybindings: () => void; - disableKeybindings: () => void; - setIsRecording: (isRecording: boolean) => void; - - // Validation - validateKeybinding: ( - key: ShortcutKey, - action: ActionWithOptionalArgs, - ) => KeybindingConflict | null; - getKeybindingsForAction: (action: ActionWithOptionalArgs) => ShortcutKey[]; - - // Utility - getKeybindingString: (ev: KeyboardEvent) => ShortcutKey | null; -} - -function isDOMElement(el: EventTarget | null): el is HTMLElement { - return !!el && (el instanceof Element || el instanceof HTMLElement); -} - -export const useKeybindingsStore = create()( - persist( - (set, get) => ({ - keybindings: { ...defaultKeybindings }, - isCustomized: false, - keybindingsEnabled: true, - isRecording: false, - - updateKeybinding: (key: ShortcutKey, action: ActionWithOptionalArgs) => { - set((state) => { - const newKeybindings = { ...state.keybindings }; - newKeybindings[key] = action; - - return { - keybindings: newKeybindings, - isCustomized: true, - }; - }); - }, - - removeKeybinding: (key: ShortcutKey) => { - set((state) => { - const newKeybindings = { ...state.keybindings }; - delete newKeybindings[key]; - - return { - keybindings: newKeybindings, - isCustomized: true, - }; - }); - }, - - resetToDefaults: () => { - set({ - keybindings: { ...defaultKeybindings }, - isCustomized: false, - }); - }, - - enableKeybindings: () => { - set({ keybindingsEnabled: true }); - }, - - disableKeybindings: () => { - set({ keybindingsEnabled: false }); - }, - - importKeybindings: (config: KeybindingConfig) => { - // Validate all keys and actions - for (const [key, action] of Object.entries(config)) { - // Validate the key format - if (typeof key !== "string" || key.length === 0) { - throw new Error(`Invalid key format: ${key}`); - } - } - set({ - keybindings: { ...config }, - isCustomized: true, - }); - }, - - exportKeybindings: () => { - return get().keybindings; - }, - - validateKeybinding: ( - key: ShortcutKey, - action: ActionWithOptionalArgs, - ) => { - const { keybindings } = get(); - const existingAction = keybindings[key]; - - if (existingAction && existingAction !== action) { - return { - key, - existingAction, - newAction: action, - }; - } - - return null; - }, - setIsRecording: (isRecording: boolean) => { - set({ isRecording }); - }, - - getKeybindingsForAction: (action: ActionWithOptionalArgs) => { - const { keybindings } = get(); - return Object.keys(keybindings).filter( - (key) => keybindings[key as ShortcutKey] === action, - ) as ShortcutKey[]; - }, - - getKeybindingString: (ev: KeyboardEvent) => { - return generateKeybindingString(ev) as ShortcutKey | null; - }, - }), - { - name: "opencut-keybindings", - version: 2, - }, - ), -); - -// Utility functions -function generateKeybindingString(ev: KeyboardEvent): ShortcutKey | null { - const target = ev.target; - - // We may or may not have a modifier key - const modifierKey = getActiveModifier(ev); - - // We will always have a non-modifier key - const key = getPressedKey(ev); - if (!key) return null; - - // All key combos backed by modifiers are valid shortcuts (whether currently typing or not) - if (modifierKey) { - // If the modifier is shift and the target is an input, we ignore - if ( - modifierKey === "shift" && - isDOMElement(target) && - isTypableDOMElement(target as HTMLElement) - ) { - return null; - } - - return `${modifierKey}+${key}` as ShortcutKey; - } - - // no modifier key here then we do not do anything while on input - if (isDOMElement(target) && isTypableDOMElement(target as HTMLElement)) - return null; - - // single key while not input - return `${key}` as ShortcutKey; -} - -function getPressedKey(ev: KeyboardEvent): string | null { - // Sometimes the property code is not available on the KeyboardEvent object - const key = (ev.key ?? "").toLowerCase(); - const code = ev.code ?? ""; - - if (code === "Space" || key === " " || key === "spacebar" || key === "space") - return "space"; - - // Check arrow keys - if (key.startsWith("arrow")) { - return key.slice(5); - } - - // Check for special keys - if (key === "tab") return "tab"; - if (key === "home") return "home"; - if (key === "end") return "end"; - if (key === "delete") return "delete"; - if (key === "backspace") return "backspace"; - - // Check letter keys - if (code.startsWith("Key")) { - const letter = code.slice(3).toLowerCase(); - if (letter.length === 1 && letter >= "a" && letter <= "z") { - return letter; - } - } - - // Check number keys using physical position for AZERTY support - if (code.startsWith("Digit")) { - const digit = code.slice(5); - if (digit.length === 1 && digit >= "0" && digit <= "9") { - return digit; - } - } - - // Fallback for other layouts - const isDigit = key.length === 1 && key >= "0" && key <= "9"; - if (isDigit) return key; - - // Check if slash, period or enter - if (key === "/" || key === "." || key === "enter") return key; - - // If no other cases match, this is not a valid key - return null; -} - -function getActiveModifier(ev: KeyboardEvent): string | null { - const modifierKeys = { - ctrl: isAppleDevice() ? ev.metaKey : ev.ctrlKey, - alt: ev.altKey, - shift: ev.shiftKey, - }; - - // active modifier: ctrl | alt | ctrl+alt | ctrl+shift | ctrl+alt+shift | alt+shift - // modiferKeys object's keys are sorted to match the above order - const activeModifier = Object.keys(modifierKeys) - .filter((key) => modifierKeys[key as keyof typeof modifierKeys]) - .join("+"); - - return activeModifier === "" ? null : activeModifier; -} diff --git a/apps/tools/src/stores/media-store.ts b/apps/tools/src/stores/media-store.ts deleted file mode 100644 index fcbd6575..00000000 --- a/apps/tools/src/stores/media-store.ts +++ /dev/null @@ -1,296 +0,0 @@ -import { create } from "zustand"; -import { storageService } from "@/lib/storage/storage-service"; -import { useTimelineStore } from "./timeline-store"; -import { generateUUID } from "@/lib/utils"; -import { MediaType, MediaFile } from "@/types/media"; -import { videoCache } from "@/lib/video-cache"; - -interface MediaStore { - mediaFiles: MediaFile[]; - isLoading: boolean; - - // Actions - addMediaFile: ( - projectId: string, - file: Omit - ) => Promise; - removeMediaFile: (projectId: string, id: string) => Promise; - loadProjectMedia: (projectId: string) => Promise; - clearProjectMedia: (projectId: string) => Promise; - clearAllMedia: () => void; -} - -// Helper function to determine file type -export const getFileType = (file: File): MediaType | null => { - const { type } = file; - - if (type.startsWith("image/")) { - return "image"; - } - if (type.startsWith("video/")) { - return "video"; - } - if (type.startsWith("audio/")) { - return "audio"; - } - - return null; -}; - -// Helper function to get image dimensions -export const getImageDimensions = ( - file: File -): Promise<{ width: number; height: number }> => { - return new Promise((resolve, reject) => { - const img = new window.Image(); - - img.addEventListener("load", () => { - const width = img.naturalWidth; - const height = img.naturalHeight; - resolve({ width, height }); - img.remove(); - }); - - img.addEventListener("error", () => { - reject(new Error("Could not load image")); - img.remove(); - }); - - img.src = URL.createObjectURL(file); - }); -}; - -// Helper function to generate video thumbnail and get dimensions -export const generateVideoThumbnail = ( - file: File -): Promise<{ thumbnailUrl: string; width: number; height: number }> => { - return new Promise((resolve, reject) => { - const video = document.createElement("video") as HTMLVideoElement; - const canvas = document.createElement("canvas") as HTMLCanvasElement; - const ctx = canvas.getContext("2d"); - - if (!ctx) { - reject(new Error("Could not get canvas context")); - return; - } - - video.addEventListener("loadedmetadata", () => { - canvas.width = video.videoWidth; - canvas.height = video.videoHeight; - - // Seek to 1 second or 10% of duration, whichever is smaller - video.currentTime = Math.min(1, video.duration * 0.1); - }); - - video.addEventListener("seeked", () => { - ctx.drawImage(video, 0, 0, canvas.width, canvas.height); - const thumbnailUrl = canvas.toDataURL("image/jpeg", 0.8); - const width = video.videoWidth; - const height = video.videoHeight; - - resolve({ thumbnailUrl, width, height }); - - // Cleanup - video.remove(); - canvas.remove(); - }); - - video.addEventListener("error", () => { - reject(new Error("Could not load video")); - video.remove(); - canvas.remove(); - }); - - video.src = URL.createObjectURL(file); - video.load(); - }); -}; - -// Helper function to get media duration -export const getMediaDuration = (file: File): Promise => { - return new Promise((resolve, reject) => { - const element = document.createElement( - file.type.startsWith("video/") ? "video" : "audio" - ) as HTMLVideoElement; - - element.addEventListener("loadedmetadata", () => { - resolve(element.duration); - element.remove(); - }); - - element.addEventListener("error", () => { - reject(new Error("Could not load media")); - element.remove(); - }); - - element.src = URL.createObjectURL(file); - element.load(); - }); -}; - -export const getMediaAspectRatio = (item: MediaFile): number => { - if (item.width && item.height) { - return item.width / item.height; - } - return 16 / 9; // Default aspect ratio -}; - -export const useMediaStore = create((set, get) => ({ - mediaFiles: [], - isLoading: false, - - addMediaFile: async (projectId, file) => { - const newItem: MediaFile = { - ...file, - id: generateUUID(), - }; - - // Add to local state immediately for UI responsiveness - set((state) => ({ - mediaFiles: [...state.mediaFiles, newItem], - })); - - // Save to persistent storage in background - try { - await storageService.saveMediaFile({ projectId, mediaItem: newItem }); - } catch (error) { - console.error("Failed to save media item:", error); - // Remove from local state if save failed - set((state) => ({ - mediaFiles: state.mediaFiles.filter((media) => media.id !== newItem.id), - })); - } - }, - - removeMediaFile: async (projectId: string, id: string) => { - const state = get(); - const item = state.mediaFiles.find((media) => media.id === id); - - videoCache.clearVideo(id); - - // Cleanup object URLs to prevent memory leaks - if (item?.url) { - URL.revokeObjectURL(item.url); - if (item.thumbnailUrl) { - URL.revokeObjectURL(item.thumbnailUrl); - } - } - - // 1) Remove from local state immediately - set((state) => ({ - mediaFiles: state.mediaFiles.filter((media) => media.id !== id), - })); - - // 2) Cascade into the timeline: remove any elements using this media ID - const timeline = useTimelineStore.getState(); - const { tracks, deleteSelected, setSelectedElements } = timeline; - - // Find all elements that reference this media - const elementsToRemove: Array<{ trackId: string; elementId: string }> = []; - for (const track of tracks) { - for (const el of track.elements) { - if (el.type === "media" && el.mediaId === id) { - elementsToRemove.push({ trackId: track.id, elementId: el.id }); - } - } - } - - // If there are elements to remove, use unified delete function - if (elementsToRemove.length > 0) { - setSelectedElements(elementsToRemove); - deleteSelected(); - } - - // 3) Remove from persistent storage - try { - await storageService.deleteMediaFile({ projectId, id }); - } catch (error) { - console.error("Failed to delete media item:", error); - } - }, - - loadProjectMedia: async (projectId) => { - set({ isLoading: true }); - - try { - const mediaItems = await storageService.loadAllMediaFiles({ projectId }); - - // Regenerate thumbnails for video items - const updatedMediaItems = await Promise.all( - mediaItems.map(async (item) => { - if (item.type === "video" && item.file) { - try { - const { thumbnailUrl, width, height } = - await generateVideoThumbnail(item.file); - return { - ...item, - thumbnailUrl, - width: width || item.width, - height: height || item.height, - }; - } catch (error) { - console.error( - `Failed to regenerate thumbnail for video ${item.id}:`, - error - ); - return item; - } - } - return item; - }) - ); - - set({ mediaFiles: updatedMediaItems }); - } catch (error) { - console.error("Failed to load media items:", error); - } finally { - set({ isLoading: false }); - } - }, - - clearProjectMedia: async (projectId) => { - const state = get(); - - // Cleanup all object URLs - state.mediaFiles.forEach((item) => { - if (item.url) { - URL.revokeObjectURL(item.url); - } - if (item.thumbnailUrl) { - URL.revokeObjectURL(item.thumbnailUrl); - } - }); - - // Clear local state - set({ mediaFiles: [] }); - - // Clear persistent storage - try { - const mediaIds = state.mediaFiles.map((item) => item.id); - await Promise.all( - mediaIds.map((id) => storageService.deleteMediaFile({ projectId, id })) - ); - } catch (error) { - console.error("Failed to clear media items from storage:", error); - } - }, - - clearAllMedia: () => { - const state = get(); - - videoCache.clearAll(); - - // Cleanup all object URLs - state.mediaFiles.forEach((item) => { - if (item.url) { - URL.revokeObjectURL(item.url); - } - if (item.thumbnailUrl) { - URL.revokeObjectURL(item.thumbnailUrl); - } - }); - - // Clear local state - set({ mediaFiles: [] }); - }, -})); diff --git a/apps/tools/src/stores/panel-store.ts b/apps/tools/src/stores/panel-store.ts deleted file mode 100644 index ae09c13b..00000000 --- a/apps/tools/src/stores/panel-store.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { create } from "zustand"; -import { persist } from "zustand/middleware"; - -export type PanelPreset = - | "default" - | "media" - | "inspector" - | "vertical-preview"; - -interface PanelSizes { - toolsPanel: number; - previewPanel: number; - propertiesPanel: number; - mainContent: number; - timeline: number; -} - -export const PRESET_CONFIGS: Record = { - default: { - toolsPanel: 25, - previewPanel: 50, - propertiesPanel: 25, - mainContent: 70, - timeline: 30, - }, - media: { - toolsPanel: 30, - previewPanel: 45, - propertiesPanel: 25, - mainContent: 100, - timeline: 25, - }, - inspector: { - toolsPanel: 30, - previewPanel: 70, - propertiesPanel: 30, - mainContent: 75, - timeline: 25, - }, - "vertical-preview": { - toolsPanel: 30, - previewPanel: 40, - propertiesPanel: 30, - mainContent: 75, - timeline: 25, - }, -}; - -interface PanelState extends PanelSizes { - activePreset: PanelPreset; - presetCustomSizes: Record>; - resetCounter: number; - - mediaViewMode: "grid" | "list"; - - setToolsPanel: (size: number) => void; - setPreviewPanel: (size: number) => void; - setPropertiesPanel: (size: number) => void; - setMainContent: (size: number) => void; - setTimeline: (size: number) => void; - setMediaViewMode: (mode: "grid" | "list") => void; - - setActivePreset: (preset: PanelPreset) => void; - resetPreset: (preset: PanelPreset) => void; - getCurrentPresetSizes: () => PanelSizes; -} - -export const usePanelStore = create()( - persist( - (set, get) => ({ - ...PRESET_CONFIGS.default, - activePreset: "default" as PanelPreset, - presetCustomSizes: { - default: {}, - media: {}, - inspector: {}, - "vertical-preview": {}, - }, - resetCounter: 0, - - mediaViewMode: "grid" as const, - - setToolsPanel: (size) => { - const { activePreset, presetCustomSizes } = get(); - set({ - toolsPanel: size, - presetCustomSizes: { - ...presetCustomSizes, - [activePreset]: { - ...presetCustomSizes[activePreset], - toolsPanel: size, - }, - }, - }); - }, - setPreviewPanel: (size) => { - const { activePreset, presetCustomSizes } = get(); - set({ - previewPanel: size, - presetCustomSizes: { - ...presetCustomSizes, - [activePreset]: { - ...presetCustomSizes[activePreset], - previewPanel: size, - }, - }, - }); - }, - setPropertiesPanel: (size) => { - const { activePreset, presetCustomSizes } = get(); - set({ - propertiesPanel: size, - presetCustomSizes: { - ...presetCustomSizes, - [activePreset]: { - ...presetCustomSizes[activePreset], - propertiesPanel: size, - }, - }, - }); - }, - setMainContent: (size) => { - const { activePreset, presetCustomSizes } = get(); - set({ - mainContent: size, - presetCustomSizes: { - ...presetCustomSizes, - [activePreset]: { - ...presetCustomSizes[activePreset], - mainContent: size, - }, - }, - }); - }, - setTimeline: (size) => { - const { activePreset, presetCustomSizes } = get(); - set({ - timeline: size, - presetCustomSizes: { - ...presetCustomSizes, - [activePreset]: { - ...presetCustomSizes[activePreset], - timeline: size, - }, - }, - }); - }, - setMediaViewMode: (mode) => set({ mediaViewMode: mode }), - - setActivePreset: (preset) => { - const { - activePreset: currentPreset, - presetCustomSizes, - toolsPanel, - previewPanel, - propertiesPanel, - mainContent, - timeline, - } = get(); - - const updatedPresetCustomSizes = { - ...presetCustomSizes, - [currentPreset]: { - toolsPanel, - previewPanel, - propertiesPanel, - mainContent, - timeline, - }, - }; - - const defaultSizes = PRESET_CONFIGS[preset]; - const customSizes = updatedPresetCustomSizes[preset] || {}; - const finalSizes = { ...defaultSizes, ...customSizes } as PanelSizes; - - set({ - activePreset: preset, - presetCustomSizes: updatedPresetCustomSizes, - ...finalSizes, - }); - }, - - resetPreset: (preset) => { - const { presetCustomSizes, activePreset, resetCounter } = get(); - const defaultSizes = PRESET_CONFIGS[preset]; - - const newPresetCustomSizes = { - ...presetCustomSizes, - [preset]: {}, - }; - - const updates: Partial = { - presetCustomSizes: newPresetCustomSizes, - resetCounter: resetCounter + 1, - }; - - if (preset === activePreset) { - Object.assign(updates, defaultSizes); - } - - set(updates); - }, - - getCurrentPresetSizes: () => { - const { - toolsPanel, - previewPanel, - propertiesPanel, - mainContent, - timeline, - } = get(); - return { - toolsPanel, - previewPanel, - propertiesPanel, - mainContent, - timeline, - }; - }, - }), - { - name: "panel-sizes", - } - ) -); diff --git a/apps/tools/src/stores/playback-store.ts b/apps/tools/src/stores/playback-store.ts deleted file mode 100644 index cb2077f1..00000000 --- a/apps/tools/src/stores/playback-store.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { create } from "zustand"; -import { useTimelineStore } from "@/stores/timeline-store"; -import { useProjectStore } from "./project-store"; -import { DEFAULT_FPS } from "@/constants/editor-constants"; - -interface TPlaybackState { - isPlaying: boolean; - currentTime: number; - duration: number; - volume: number; - speed: number; - muted: boolean; - previousVolume?: number; -} - -interface TPlaybackControls { - play: () => void; - pause: () => void; - seek: (time: number) => void; - setVolume: (volume: number) => void; - setSpeed: (speed: number) => void; - toggle: () => void; - mute: () => void; - unmute: () => void; - toggleMute: () => void; -} - -interface TPlaybackStore extends TPlaybackState, TPlaybackControls { - setDuration: (duration: number) => void; - setCurrentTime: (time: number) => void; -} - -let playbackTimer: number | null = null; - -const startTimer = (store: () => TPlaybackStore) => { - if (playbackTimer) cancelAnimationFrame(playbackTimer); - - // Use requestAnimationFrame for smoother updates - const updateTime = () => { - const state = store(); - if (state.isPlaying && state.currentTime < state.duration) { - const now = performance.now(); - const delta = (now - lastUpdate) / 1000; // Convert to seconds - lastUpdate = now; - - const newTime = state.currentTime + delta * state.speed; - - // Get actual content duration from timeline store - const actualContentDuration = useTimelineStore - .getState() - .getTotalDuration(); - - // Stop at actual content end, not timeline duration - // It was either this or reducing default min timeline to 1 second - const effectiveDuration = - actualContentDuration > 0 ? actualContentDuration : state.duration; - - if (newTime >= effectiveDuration) { - // When content completes, pause just before the end so we can see the last frame - const projectFps = useProjectStore.getState().activeProject?.fps; - if (!projectFps) - console.error( - "Project FPS is not set, assuming " + DEFAULT_FPS + "fps", - ); - - const frameOffset = 1 / (projectFps ?? DEFAULT_FPS); // Stop 1 frame before end based on project FPS - const stopTime = Math.max(0, effectiveDuration - frameOffset); - - state.pause(); - state.setCurrentTime(stopTime); - // Notify video elements to sync with end position - window.dispatchEvent( - new CustomEvent("playback-seek", { - detail: { time: stopTime }, - }), - ); - } else { - state.setCurrentTime(newTime); - // Notify video elements to sync - window.dispatchEvent( - new CustomEvent("playback-update", { detail: { time: newTime } }), - ); - } - } - playbackTimer = requestAnimationFrame(updateTime); - }; - - let lastUpdate = performance.now(); - playbackTimer = requestAnimationFrame(updateTime); -}; - -const stopTimer = () => { - if (playbackTimer) { - cancelAnimationFrame(playbackTimer); - playbackTimer = null; - } -}; - -export const usePlaybackStore = create((set, get) => ({ - isPlaying: false, - currentTime: 0, - duration: 0, - volume: 1, - muted: false, - previousVolume: 1, - speed: 1.0, - - play: () => { - const state = get(); - - const actualContentDuration = useTimelineStore - .getState() - .getTotalDuration(); - const effectiveDuration = - actualContentDuration > 0 ? actualContentDuration : state.duration; - - if (effectiveDuration > 0) { - const fps = useProjectStore.getState().activeProject?.fps ?? DEFAULT_FPS; - const frameOffset = 1 / fps; - const endThreshold = Math.max(0, effectiveDuration - frameOffset); - - if (state.currentTime >= endThreshold) { - get().seek(0); - } - } - - set({ isPlaying: true }); - startTimer(get); - }, - - pause: () => { - set({ isPlaying: false }); - stopTimer(); - }, - - toggle: () => { - const { isPlaying } = get(); - if (isPlaying) { - get().pause(); - } else { - get().play(); - } - }, - - seek: (time: number) => { - const { duration } = get(); - const clampedTime = Math.max(0, Math.min(duration, time)); - set({ currentTime: clampedTime }); - - const event = new CustomEvent("playback-seek", { - detail: { time: clampedTime }, - }); - window.dispatchEvent(event); - }, - - setVolume: (volume: number) => - set((state) => ({ - volume: Math.max(0, Math.min(1, volume)), - muted: volume === 0, - previousVolume: volume > 0 ? volume : state.previousVolume, - })), - - setSpeed: (speed: number) => { - const newSpeed = Math.max(0.1, Math.min(2.0, speed)); - set({ speed: newSpeed }); - - const event = new CustomEvent("playback-speed", { - detail: { speed: newSpeed }, - }); - window.dispatchEvent(event); - }, - - setDuration: (duration: number) => set({ duration }), - setCurrentTime: (time: number) => set({ currentTime: time }), - - mute: () => { - const { volume, previousVolume } = get(); - set({ - muted: true, - previousVolume: volume > 0 ? volume : previousVolume, - volume: 0, - }); - }, - - unmute: () => { - const { previousVolume } = get(); - set({ muted: false, volume: previousVolume ?? 1 }); - }, - - toggleMute: () => { - const { muted } = get(); - if (muted) { - get().unmute(); - } else { - get().mute(); - } - }, -})); diff --git a/apps/tools/src/stores/project-store.ts b/apps/tools/src/stores/project-store.ts deleted file mode 100644 index 31f26e1b..00000000 --- a/apps/tools/src/stores/project-store.ts +++ /dev/null @@ -1,465 +0,0 @@ -import { TProject, TScene } from "@/types/project"; -import { create } from "zustand"; -import { storageService } from "@/lib/storage/storage-service"; -import { toast } from "sonner"; -import { useMediaStore } from "./media-store"; -import { useTimelineStore } from "./timeline-store"; -import { useSceneStore } from "./scene-store"; -import { generateUUID } from "@/lib/utils"; -import { TCanvasSize } from "@/types/editor"; -import { DEFAULT_BLUR_INTENSITY, DEFAULT_CANVAS_SIZE, DEFAULT_FPS } from "@/constants/editor-constants"; - -export function createMainScene(): TScene { - return { - id: generateUUID(), - name: "Main Scene", - isMain: true, - createdAt: new Date(), - updatedAt: new Date(), - }; -} - -const createDefaultProject = (name: string): TProject => { - const mainScene: TScene = createMainScene(); - - return { - id: generateUUID(), - name, - thumbnail: "", - createdAt: new Date(), - updatedAt: new Date(), - scenes: [mainScene], - currentSceneId: mainScene.id, - backgroundColor: "#000000", - backgroundType: "color", - blurIntensity: DEFAULT_BLUR_INTENSITY, - fps: DEFAULT_FPS, - canvasSize: DEFAULT_CANVAS_SIZE, - }; -}; - -interface ProjectStore { - activeProject: TProject | null; - savedProjects: TProject[]; - isLoading: boolean; - isInitialized: boolean; - invalidProjectIds?: Set; - createNewProject: (name: string) => Promise; - loadProject: (id: string) => Promise; - saveCurrentProject: () => Promise; - loadAllProjects: () => Promise; - deleteProject: (id: string) => Promise; - closeProject: () => void; - renameProject: (projectId: string, name: string) => Promise; - duplicateProject: (projectId: string) => Promise; - updateProjectBackground: (backgroundColor: string) => Promise; - updateBackgroundType: ( - type: "color" | "blur", - options?: { backgroundColor?: string; blurIntensity?: number }, - ) => Promise; - updateProjectFps: (fps: number) => Promise; - updateCanvasSize: ({ size }: { size: TCanvasSize }) => Promise; - getFilteredAndSortedProjects: ( - searchQuery: string, - sortOption: string, - ) => TProject[]; - isInvalidProjectId: (id: string) => boolean; - markProjectIdAsInvalid: (id: string) => void; - clearInvalidProjectIds: () => void; -} - -export const useProjectStore = create((set, get) => ({ - activeProject: null, - savedProjects: [], - isLoading: true, - isInitialized: false, - invalidProjectIds: new Set(), - - createNewProject: async (name: string) => { - const newProject = createDefaultProject(name); - - set({ activeProject: newProject }); - - const mediaStore = useMediaStore.getState(); - const timelineStore = useTimelineStore.getState(); - const sceneStore = useSceneStore.getState(); - - mediaStore.clearAllMedia(); - timelineStore.clearTimeline(); - - sceneStore.initializeScenes({ - scenes: newProject.scenes, - currentSceneId: newProject.currentSceneId, - }); - - try { - await storageService.saveProject({ project: newProject }); - // Reload all projects to update the list - await get().loadAllProjects(); - return newProject.id; - } catch (error) { - toast.error("Failed to save new project"); - throw error; - } - }, - - loadProject: async (id: string) => { - if (!get().isInitialized) { - set({ isLoading: true }); - } - - // Prevent flicker when switching projects - clear all stores - const mediaStore = useMediaStore.getState(); - const timelineStore = useTimelineStore.getState(); - const sceneStore = useSceneStore.getState(); - - mediaStore.clearAllMedia(); - timelineStore.clearTimeline(); - sceneStore.clearScenes(); - - try { - const project = await storageService.loadProject({ id }); - if (project) { - set({ activeProject: project }); - - let currentScene = null; - if (project.scenes && project.scenes.length > 0) { - sceneStore.initializeScenes({ - scenes: project.scenes, - currentSceneId: project.currentSceneId, - }); - // Get current scene directly from project data (don't rely on store state) - currentScene = - project.scenes.find((s) => s.id === project.currentSceneId) || - project.scenes.find((s) => s.isMain) || - project.scenes[0]; - } - - await Promise.all([ - mediaStore.loadProjectMedia(id), - timelineStore.loadProjectTimeline({ - projectId: id, - sceneId: currentScene?.id, - }), - ]); - } else { - throw new Error(`Project with id ${id} not found`); - } - } catch (error) { - console.error("Failed to load project:", error); - throw error; // Re-throw so the editor page can handle it - } finally { - set({ isLoading: false }); - } - }, - - saveCurrentProject: async () => { - const { activeProject } = get(); - if (!activeProject) return; - - try { - const timelineStore = useTimelineStore.getState(); - const sceneStore = useSceneStore.getState(); - const currentScene = sceneStore.currentScene; - - await Promise.all([ - storageService.saveProject({ project: activeProject }), - timelineStore.saveProjectTimeline({ - projectId: activeProject.id, - sceneId: currentScene?.id, - }), - ]); - await get().loadAllProjects(); // Refresh the list - } catch (error) { - console.error("Failed to save project:", error); - } - }, - - loadAllProjects: async () => { - if (!get().isInitialized) { - set({ isLoading: true }); - } - - try { - const projects = await storageService.loadAllProjects(); - set({ savedProjects: projects }); - } catch (error) { - console.error("Failed to load projects:", error); - } finally { - set({ isLoading: false, isInitialized: true }); - } - }, - - deleteProject: async (id: string) => { - try { - await Promise.all([ - storageService.deleteProjectMedia({ projectId: id }), - storageService.deleteProjectTimeline({ projectId: id }), - storageService.deleteProject({ id }), - ]); - await get().loadAllProjects(); // Refresh the list - - // If deleted active project, close it and clear data - const { activeProject } = get(); - if (activeProject?.id === id) { - set({ activeProject: null }); - const mediaStore = useMediaStore.getState(); - const timelineStore = useTimelineStore.getState(); - const sceneStore = useSceneStore.getState(); - - mediaStore.clearAllMedia(); - timelineStore.clearTimeline(); - sceneStore.clearScenes(); - } - } catch (error) { - console.error("Failed to delete project:", error); - } - }, - - closeProject: () => { - set({ activeProject: null }); - - const mediaStore = useMediaStore.getState(); - const timelineStore = useTimelineStore.getState(); - const sceneStore = useSceneStore.getState(); - - mediaStore.clearAllMedia(); - timelineStore.clearTimeline(); - sceneStore.clearScenes(); - }, - - renameProject: async (id: string, name: string) => { - const { savedProjects } = get(); - - // Find the project to rename - const projectToRename = savedProjects.find((p) => p.id === id); - if (!projectToRename) { - toast.error("Project not found", { - description: "Please try again", - }); - return; - } - - const updatedProject = { - ...projectToRename, - name, - updatedAt: new Date(), - }; - - try { - await storageService.saveProject({ project: updatedProject }); - - await get().loadAllProjects(); - - // Update activeProject if same project - const { activeProject } = get(); - if (activeProject?.id === id) { - set({ activeProject: updatedProject }); - } - } catch (error) { - console.error("Failed to rename project:", error); - toast.error("Failed to rename project", { - description: - error instanceof Error ? error.message : "Please try again", - }); - } - }, - - duplicateProject: async (projectId: string) => { - try { - const project = await storageService.loadProject({ id: projectId }); - if (!project) { - toast.error("Project not found", { - description: "Please try again", - }); - throw new Error("Project not found"); - } - - const { savedProjects } = get(); - - // Extract the base name (remove any existing numbering) - const numberMatch = project.name.match(/^\((\d+)\)\s+(.+)$/); - const baseName = numberMatch ? numberMatch[2] : project.name; - const existingNumbers: number[] = []; - - // Check for pattern "(number) baseName" in existing projects - savedProjects.forEach((p) => { - const match = p.name.match(/^\((\d+)\)\s+(.+)$/); - if (match && match[2] === baseName) { - existingNumbers.push(parseInt(match[1], 10)); - } - }); - - const nextNumber = - existingNumbers.length > 0 ? Math.max(...existingNumbers) + 1 : 1; - - const newProject: TProject = { - ...project, - id: generateUUID(), - name: `(${nextNumber}) ${baseName}`, - createdAt: new Date(), - updatedAt: new Date(), - }; - - await storageService.saveProject({ project: newProject }); - await get().loadAllProjects(); - return newProject.id; - } catch (error) { - console.error("Failed to duplicate project:", error); - toast.error("Failed to duplicate project", { - description: - error instanceof Error ? error.message : "Please try again", - }); - throw error; - } - }, - - updateProjectBackground: async (backgroundColor: string) => { - const { activeProject } = get(); - if (!activeProject) return; - - const updatedProject = { - ...activeProject, - backgroundColor, - updatedAt: new Date(), - }; - - try { - await storageService.saveProject({ project: updatedProject }); - set({ activeProject: updatedProject }); - await get().loadAllProjects(); - } catch (error) { - console.error("Failed to update project background:", error); - toast.error("Failed to update background", { - description: "Please try again", - }); - } - }, - - updateBackgroundType: async ( - type: "color" | "blur", - options?: { backgroundColor?: string; blurIntensity?: number }, - ) => { - const { activeProject } = get(); - if (!activeProject) return; - - const updatedProject = { - ...activeProject, - backgroundType: type, - ...(options?.backgroundColor && { - backgroundColor: options.backgroundColor, - }), - ...(options?.blurIntensity !== undefined && { - blurIntensity: options.blurIntensity, - }), - updatedAt: new Date(), - }; - - try { - await storageService.saveProject({ project: updatedProject }); - set({ activeProject: updatedProject }); - await get().loadAllProjects(); - } catch (error) { - console.error("Failed to update background type:", error); - toast.error("Failed to update background", { - description: "Please try again", - }); - } - }, - - updateProjectFps: async (fps: number) => { - const { activeProject } = get(); - if (!activeProject) return; - - const updatedProject = { - ...activeProject, - fps, - updatedAt: new Date(), - }; - - try { - await storageService.saveProject({ project: updatedProject }); - set({ activeProject: updatedProject }); - await get().loadAllProjects(); - } catch (error) { - console.error("Failed to update project FPS:", error); - toast.error("Failed to update project FPS", { - description: "Please try again", - }); - } - }, - - updateCanvasSize: async ({ size }: { size: TCanvasSize }) => { - const { activeProject } = get(); - if (!activeProject) return; - - const updatedProject: TProject = { - ...activeProject, - canvasSize: size, - updatedAt: new Date(), - }; - - try { - await storageService.saveProject({ project: updatedProject }); - set({ activeProject: updatedProject }); - await get().loadAllProjects(); - } catch (error) { - console.error("Failed to update canvas size:", error); - toast.error("Failed to update canvas size", { - description: "Please try again", - }); - } - }, - - getFilteredAndSortedProjects: (searchQuery: string, sortOption: string) => { - const { savedProjects } = get(); - - const filteredProjects = savedProjects.filter((project) => - project.name.toLowerCase().includes(searchQuery.toLowerCase()), - ); - - const sortedProjects = [...filteredProjects].sort((a, b) => { - const [key, order] = sortOption.split("-"); - - if (key !== "createdAt" && key !== "name") { - console.warn(`Invalid sort key: ${key}`); - return 0; - } - - const aValue = a[key]; - const bValue = b[key]; - - if (aValue === undefined || bValue === undefined) return 0; - - if (order === "asc") { - if (aValue < bValue) return -1; - if (aValue > bValue) return 1; - return 0; - } - if (aValue > bValue) return -1; - if (aValue < bValue) return 1; - return 0; - }); - - return sortedProjects; - }, - - // Global invalid project ID tracking - isInvalidProjectId: (id: string) => { - const invalidIds = get().invalidProjectIds || new Set(); - return invalidIds.has(id); - }, - - markProjectIdAsInvalid: (id: string) => { - set((state) => ({ - invalidProjectIds: new Set([ - ...(state.invalidProjectIds || new Set()), - id, - ]), - })); - }, - - clearInvalidProjectIds: () => { - set({ invalidProjectIds: new Set() }); - }, -})); diff --git a/apps/tools/src/stores/renderer-store.ts b/apps/tools/src/stores/renderer-store.ts deleted file mode 100644 index 2632c65c..00000000 --- a/apps/tools/src/stores/renderer-store.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { create } from "zustand"; -import { SceneNode } from "@/services/renderer/nodes/root-node"; - -interface RendererStore { - renderTree: SceneNode | null; - setRenderTree: (renderTree: SceneNode | null) => void; -} - -export const useRendererStore = create((set) => ({ - renderTree: null, - setRenderTree: (renderTree) => set({ renderTree }), -})); diff --git a/apps/tools/src/stores/scene-store.ts b/apps/tools/src/stores/scene-store.ts deleted file mode 100644 index b5c5c0a1..00000000 --- a/apps/tools/src/stores/scene-store.ts +++ /dev/null @@ -1,419 +0,0 @@ -import { create } from "zustand"; -import { TScene } from "@/types/project"; -import { useProjectStore } from "./project-store"; -import { useTimelineStore } from "./timeline-store"; -import { storageService } from "@/lib/storage/storage-service"; -import { - getActiveScene, - updateSceneInArray, - getMainScene as getMainSceneUtil, - ensureMainScene, - createScene as createSceneUtil, - canDeleteScene, - getFallbackSceneAfterDelete, - normalizeScenes, - findCurrentScene, -} from "@/lib/scene-utils"; -import { toast } from "sonner"; -import { - getFrameTime, - toggleBookmarkInArray, - removeBookmarkFromArray, - isBookmarkAtTime, -} from "@/lib/timeline/bookmark-utils"; - -interface SceneStore { - currentScene: TScene | null; - scenes: TScene[]; - activeScene: TScene | null; - createScene: ({ - name, - isMain, - }: { - name: string; - isMain: boolean; - }) => Promise; - deleteScene: ({ sceneId }: { sceneId: string }) => Promise; - renameScene: ({ - sceneId, - name, - }: { - sceneId: string; - name: string; - }) => Promise; - switchToScene: ({ sceneId }: { sceneId: string }) => Promise; - toggleBookmark: ({ time }: { time: number }) => Promise; - isBookmarked: ({ time }: { time: number }) => boolean; - removeBookmark: ({ time }: { time: number }) => Promise; - loadProjectScenes: ({ projectId }: { projectId: string }) => Promise; - initializeScenes: ({ - scenes, - currentSceneId, - }: { - scenes: TScene[]; - currentSceneId?: string; - }) => void; - clearScenes: () => void; -} - -export const useSceneStore = create((set, get) => { - const updateProjectWithScenes = async ({ - updatedScenes, - updatedSceneId, - refreshProjectList = false, - }: { - updatedScenes: TScene[]; - updatedSceneId?: string; - refreshProjectList?: boolean; - }) => { - const projectStore = useProjectStore.getState(); - const { activeProject } = projectStore; - - if (!activeProject) { - throw new Error("No active project"); - } - - const updatedScene = updatedSceneId - ? updatedScenes.find((s) => s.id === updatedSceneId) - : get().currentScene; - - const updatedProject = { - ...activeProject, - scenes: updatedScenes, - updatedAt: new Date(), - }; - - await storageService.saveProject({ project: updatedProject }); - useProjectStore.setState({ activeProject: updatedProject }); - set({ scenes: updatedScenes, currentScene: updatedScene || null }); - - if (refreshProjectList) { - await projectStore.loadAllProjects(); - } - }; - - return { - currentScene: null, - scenes: [], - get activeScene(): TScene | null { - const { scenes, currentScene } = get(); - return getActiveScene({ - scenes, - currentSceneId: currentScene?.id || "", - }); - }, - - createScene: async ({ name, isMain = false }) => { - const { scenes } = get(); - - const newScene = createSceneUtil({ name, isMain }); - const updatedScenes = [...scenes, newScene]; - - try { - await updateProjectWithScenes({ updatedScenes }); - return newScene.id; - } catch (error) { - console.error("Failed to create scene:", error); - throw error; - } - }, - - deleteScene: async ({ sceneId }: { sceneId: string }) => { - const { scenes, currentScene } = get(); - const sceneToDelete = scenes.find((s) => s.id === sceneId); - - if (!sceneToDelete) { - throw new Error("Scene not found"); - } - - const { canDelete, reason } = canDeleteScene({ scene: sceneToDelete }); - if (!canDelete) { - throw new Error(reason); - } - - const updatedScenes = scenes.filter((s) => s.id !== sceneId); - - const newCurrentScene = getFallbackSceneAfterDelete({ - scenes: updatedScenes, - deletedSceneId: sceneId, - currentSceneId: currentScene?.id || null, - }); - - try { - await updateProjectWithScenes({ - updatedScenes, - updatedSceneId: newCurrentScene?.id, - }); - - if (newCurrentScene && newCurrentScene.id !== currentScene?.id) { - const timelineStore = useTimelineStore.getState(); - const projectStore = useProjectStore.getState(); - const { activeProject } = projectStore; - if (activeProject) { - await timelineStore.loadProjectTimeline({ - projectId: activeProject.id, - sceneId: newCurrentScene.id, - }); - } - } - } catch (error) { - console.error("Failed to delete scene:", error); - throw error; - } - }, - - renameScene: async ({ - sceneId, - name, - }: { - sceneId: string; - name: string; - }) => { - const { scenes } = get(); - const updatedScenes = updateSceneInArray({ - scenes, - sceneId, - updates: { name, updatedAt: new Date() }, - }); - - try { - await updateProjectWithScenes({ - updatedScenes, - updatedSceneId: sceneId, - }); - } catch (error) { - console.error("Failed to rename scene:", error); - throw error; - } - }, - - switchToScene: async ({ sceneId }: { sceneId: string }) => { - const { scenes } = get(); - const targetScene = scenes.find((s) => s.id === sceneId); - - if (!targetScene) { - throw new Error("Scene not found"); - } - - const timelineStore = useTimelineStore.getState(); - const projectStore = useProjectStore.getState(); - const { activeProject } = projectStore; - const { currentScene } = get(); - - if (activeProject && currentScene) { - await timelineStore.saveProjectTimeline({ - projectId: activeProject.id, - sceneId: currentScene.id, - }); - } - - if (activeProject) { - await timelineStore.loadProjectTimeline({ - projectId: activeProject.id, - sceneId, - }); - - const updatedProject = { - ...activeProject, - currentSceneId: sceneId, - updatedAt: new Date(), - }; - - await storageService.saveProject({ project: updatedProject }); - useProjectStore.setState({ activeProject: updatedProject }); - } - - set({ currentScene: targetScene }); - }, - - toggleBookmark: async ({ time }: { time: number }) => { - const { activeScene, scenes, currentScene } = get(); - if (!activeScene || !currentScene) return; - - const projectStore = useProjectStore.getState(); - const { activeProject } = projectStore; - if (!activeProject) return; - - const frameTime = getFrameTime({ - time, - fps: activeProject.fps, - }); - - const bookmarks = activeScene.timeline?.bookmarks || []; - const updatedBookmarks = toggleBookmarkInArray({ - bookmarks, - frameTime, - }); - - const updatedScenes = updateSceneInArray({ - scenes, - sceneId: activeScene.id, - updates: { - timeline: { - ...activeScene.timeline, - bookmarks: updatedBookmarks, - }, - }, - }); - - try { - await updateProjectWithScenes({ - updatedScenes, - updatedSceneId: activeScene.id, - refreshProjectList: true, - }); - } catch (error) { - console.error("Failed to update scene bookmarks:", error); - toast.error("Failed to update bookmarks", { - description: "Please try again", - }); - } - }, - - isBookmarked: ({ time }: { time: number }) => { - const { activeScene, currentScene } = get(); - const projectStore = useProjectStore.getState(); - const { activeProject } = projectStore; - - if (!activeScene || !currentScene || !activeProject) return false; - - const frameTime = getFrameTime({ - time, - fps: activeProject.fps, - }); - const bookmarks = activeScene.timeline?.bookmarks || []; - - return isBookmarkAtTime({ bookmarks, frameTime }); - }, - - removeBookmark: async ({ time }: { time: number }) => { - const { activeScene, scenes, currentScene } = get(); - if (!activeScene || !currentScene) return; - - const projectStore = useProjectStore.getState(); - const { activeProject } = projectStore; - if (!activeProject) return; - - const frameTime = getFrameTime({ - time, - fps: activeProject.fps, - }); - const bookmarks = activeScene.timeline?.bookmarks || []; - - const updatedBookmarks = removeBookmarkFromArray({ - bookmarks, - frameTime, - }); - - if (updatedBookmarks.length === bookmarks.length) { - return; - } - - const updatedScenes = updateSceneInArray({ - scenes, - sceneId: activeScene.id, - updates: { - timeline: { - ...activeScene.timeline, - bookmarks: updatedBookmarks, - }, - }, - }); - - try { - await updateProjectWithScenes({ - updatedScenes, - updatedSceneId: activeScene.id, - refreshProjectList: true, - }); - } catch (error) { - console.error("Failed to update scene bookmarks:", error); - toast.error("Failed to remove bookmark", { - description: "Please try again", - }); - } - }, - - getMainScene: () => { - const { scenes } = get(); - return getMainSceneUtil({ scenes }); - }, - - getCurrentScene: () => { - return get().currentScene; - }, - - loadProjectScenes: async ({ projectId }: { projectId: string }) => { - try { - const project = await storageService.loadProject({ id: projectId }); - if (project?.scenes) { - const normalizedScenes = normalizeScenes({ scenes: project.scenes }); - const currentScene = findCurrentScene({ - scenes: normalizedScenes, - currentSceneId: project.currentSceneId, - }); - - set({ - scenes: normalizedScenes, - currentScene, - }); - } - } catch (error) { - console.error("Failed to load project scenes:", error); - set({ scenes: [], currentScene: null }); - } - }, - - initializeScenes: ({ - scenes, - currentSceneId, - }: { - scenes: TScene[]; - currentSceneId?: string; - }) => { - const ensuredScenes = ensureMainScene({ scenes }); - const currentScene = currentSceneId - ? ensuredScenes.find((s) => s.id === currentSceneId) - : null; - - const fallbackScene = getMainSceneUtil({ scenes: ensuredScenes }); - - set({ - scenes: ensuredScenes, - currentScene: currentScene || fallbackScene, - }); - - if (ensuredScenes.length > scenes.length) { - const projectStore = useProjectStore.getState(); - const { activeProject } = projectStore; - - if (activeProject) { - const updatedProject = { - ...activeProject, - scenes: ensuredScenes, - updatedAt: new Date(), - }; - - storageService - .saveProject({ project: updatedProject }) - .then(() => { - useProjectStore.setState({ activeProject: updatedProject }); - }) - .catch((error) => { - console.error( - "Failed to save project with background scene:", - error, - ); - }); - } - } - }, - - clearScenes: () => { - set({ - scenes: [], - currentScene: null, - }); - }, - }; -}); diff --git a/apps/tools/src/stores/sounds-store.ts b/apps/tools/src/stores/sounds-store.ts deleted file mode 100644 index 019ab9f9..00000000 --- a/apps/tools/src/stores/sounds-store.ts +++ /dev/null @@ -1,282 +0,0 @@ -import { create } from "zustand"; -import type { SoundEffect, SavedSound } from "@/types/sounds"; -import { storageService } from "@/lib/storage/storage-service"; -import { toast } from "sonner"; -import { useMediaStore } from "./media-store"; -import { useTimelineStore } from "./timeline-store"; -import { useProjectStore } from "./project-store"; -import { usePlaybackStore } from "./playback-store"; - -interface SoundsStore { - topSoundEffects: SoundEffect[]; - isLoading: boolean; - error: string | null; - hasLoaded: boolean; - - // Filter state - showCommercialOnly: boolean; - toggleCommercialFilter: () => void; - - // Search state - searchQuery: string; - searchResults: SoundEffect[]; - isSearching: boolean; - searchError: string | null; - lastSearchQuery: string; - scrollPosition: number; - - // Pagination state - currentPage: number; - hasNextPage: boolean; - totalCount: number; - isLoadingMore: boolean; - - // Saved sounds state - savedSounds: SavedSound[]; - isSavedSoundsLoaded: boolean; - isLoadingSavedSounds: boolean; - savedSoundsError: string | null; - - // Timeline integration - addSoundToTimeline: (sound: SoundEffect) => Promise; - - setTopSoundEffects: (sounds: SoundEffect[]) => void; - setLoading: (loading: boolean) => void; - setError: (error: string | null) => void; - setHasLoaded: (loaded: boolean) => void; - - // Search actions - setSearchQuery: (query: string) => void; - setSearchResults: (results: SoundEffect[]) => void; - setSearching: (searching: boolean) => void; - setSearchError: (error: string | null) => void; - setLastSearchQuery: (query: string) => void; - setScrollPosition: (position: number) => void; - - // Pagination actions - setCurrentPage: (page: number) => void; - setHasNextPage: (hasNext: boolean) => void; - setTotalCount: (count: number) => void; - setLoadingMore: (loading: boolean) => void; - appendSearchResults: (results: SoundEffect[]) => void; - appendTopSounds: (results: SoundEffect[]) => void; - resetPagination: () => void; - - // Saved sounds actions - loadSavedSounds: () => Promise; - saveSoundEffect: (soundEffect: SoundEffect) => Promise; - removeSavedSound: (soundId: number) => Promise; - isSoundSaved: (soundId: number) => boolean; - toggleSavedSound: (soundEffect: SoundEffect) => Promise; - clearSavedSounds: () => Promise; -} - -export const useSoundsStore = create((set, get) => ({ - topSoundEffects: [], - isLoading: false, - error: null, - hasLoaded: false, - showCommercialOnly: true, - - toggleCommercialFilter: () => { - set((state) => ({ showCommercialOnly: !state.showCommercialOnly })); - }, - - // Search state - searchQuery: "", - searchResults: [], - isSearching: false, - searchError: null, - lastSearchQuery: "", - scrollPosition: 0, - - // Pagination state - currentPage: 1, - hasNextPage: false, - totalCount: 0, - isLoadingMore: false, - - // Saved sounds state - savedSounds: [], - isSavedSoundsLoaded: false, - isLoadingSavedSounds: false, - savedSoundsError: null, - - setTopSoundEffects: (sounds) => set({ topSoundEffects: sounds }), - setLoading: (loading) => set({ isLoading: loading }), - setError: (error) => set({ error }), - setHasLoaded: (loaded) => set({ hasLoaded: loaded }), - - // Search actions - setSearchQuery: (query) => set({ searchQuery: query }), - setSearchResults: (results) => - set({ searchResults: results, currentPage: 1 }), - setSearching: (searching) => set({ isSearching: searching }), - setSearchError: (error) => set({ searchError: error }), - setLastSearchQuery: (query) => set({ lastSearchQuery: query }), - setScrollPosition: (position) => set({ scrollPosition: position }), - - // Pagination actions - setCurrentPage: (page) => set({ currentPage: page }), - setHasNextPage: (hasNext) => set({ hasNextPage: hasNext }), - setTotalCount: (count) => set({ totalCount: count }), - setLoadingMore: (loading) => set({ isLoadingMore: loading }), - appendSearchResults: (results) => - set((state) => ({ - searchResults: [...state.searchResults, ...results], - })), - appendTopSounds: (results) => - set((state) => ({ - topSoundEffects: [...state.topSoundEffects, ...results], - })), - resetPagination: () => - set({ - currentPage: 1, - hasNextPage: false, - totalCount: 0, - isLoadingMore: false, - }), - - // Saved sounds actions - loadSavedSounds: async () => { - if (get().isSavedSoundsLoaded) return; - - try { - set({ isLoadingSavedSounds: true, savedSoundsError: null }); - const savedSoundsData = await storageService.loadSavedSounds(); - set({ - savedSounds: savedSoundsData.sounds, - isSavedSoundsLoaded: true, - isLoadingSavedSounds: false, - }); - } catch (error) { - const errorMessage = - error instanceof Error ? error.message : "Failed to load saved sounds"; - set({ - savedSoundsError: errorMessage, - isLoadingSavedSounds: false, - }); - console.error("Failed to load saved sounds:", error); - } - }, - - saveSoundEffect: async (soundEffect: SoundEffect) => { - try { - await storageService.saveSoundEffect({ soundEffect }); - - // Refresh saved sounds - const savedSoundsData = await storageService.loadSavedSounds(); - set({ savedSounds: savedSoundsData.sounds }); - } catch (error) { - const errorMessage = - error instanceof Error ? error.message : "Failed to save sound"; - set({ savedSoundsError: errorMessage }); - toast.error("Failed to save sound"); - console.error("Failed to save sound:", error); - } - }, - - removeSavedSound: async (soundId: number) => { - try { - await storageService.removeSavedSound({ soundId }); - - // Update local state immediately - set((state) => ({ - savedSounds: state.savedSounds.filter((sound) => sound.id !== soundId), - })); - } catch (error) { - const errorMessage = - error instanceof Error ? error.message : "Failed to remove sound"; - set({ savedSoundsError: errorMessage }); - toast.error("Failed to remove sound"); - console.error("Failed to remove sound:", error); - } - }, - - isSoundSaved: (soundId: number) => { - const { savedSounds } = get(); - return savedSounds.some((sound) => sound.id === soundId); - }, - - toggleSavedSound: async (soundEffect: SoundEffect) => { - const { isSoundSaved, saveSoundEffect, removeSavedSound } = get(); - - if (isSoundSaved(soundEffect.id)) { - await removeSavedSound(soundEffect.id); - } else { - await saveSoundEffect(soundEffect); - } - }, - - clearSavedSounds: async () => { - try { - await storageService.clearSavedSounds(); - set({ - savedSounds: [], - savedSoundsError: null, - }); - } catch (error) { - const errorMessage = - error instanceof Error ? error.message : "Failed to clear saved sounds"; - set({ savedSoundsError: errorMessage }); - toast.error("Failed to clear saved sounds"); - console.error("Failed to clear saved sounds:", error); - } - }, - - addSoundToTimeline: async (sound) => { - const activeProject = useProjectStore.getState().activeProject; - if (!activeProject) { - toast.error("No active project"); - return false; - } - - const audioUrl = sound.previewUrl; - if (!audioUrl) { - toast.error("Sound file not available"); - return false; - } - - try { - const response = await fetch(audioUrl); - if (!response.ok) - throw new Error(`Failed to download audio: ${response.statusText}`); - - const blob = await response.blob(); - const file = new File([blob], `${sound.name}.mp3`, { - type: "audio/mpeg", - }); - - await useMediaStore.getState().addMediaFile(activeProject.id, { - name: sound.name, - type: "audio", - file, - duration: sound.duration, - url: URL.createObjectURL(file), - }); - - const mediaItem = useMediaStore - .getState() - .mediaFiles.find((item) => item.file === file); - if (!mediaItem) throw new Error("Failed to create media item"); - - const success = useTimelineStore - .getState() - .addElementAtTime(mediaItem, usePlaybackStore.getState().currentTime); - - if (success) { - return true; - } - throw new Error("Failed to add to timeline - check for overlaps"); - } catch (error) { - console.error("Failed to add sound to timeline:", error); - toast.error( - error instanceof Error - ? error.message - : "Failed to add sound to timeline", - { id: `sound-${sound.id}` } - ); - return false; - } - }, -})); diff --git a/apps/tools/src/stores/stickers-store.ts b/apps/tools/src/stores/stickers-store.ts deleted file mode 100644 index c7c9ef98..00000000 --- a/apps/tools/src/stores/stickers-store.ts +++ /dev/null @@ -1,231 +0,0 @@ -import { create } from "zustand"; -import { - getCollections, - getCollection, - searchIcons, - downloadSvgAsText, - svgToFile, - type IconSet, - type CollectionInfo, - type IconSearchResult, -} from "@/lib/iconify-api"; -import { useProjectStore } from "@/stores/project-store"; -import { useMediaStore } from "@/stores/media-store"; -import { useTimelineStore } from "@/stores/timeline-store"; -import { usePlaybackStore } from "@/stores/playback-store"; -import { TIMELINE_CONSTANTS } from "@/constants/timeline-constants"; -import type { MediaFile } from "@/types/media"; - -export type StickerCategory = "all" | "general" | "brands" | "emoji"; - -interface StickersStore { - searchQuery: string; - selectedCategory: StickerCategory; - selectedCollection: string | null; - viewMode: "search" | "browse" | "collection"; - - collections: Record; - currentCollection: CollectionInfo | null; - searchResults: IconSearchResult | null; - recentStickers: string[]; - isLoadingCollections: boolean; - isLoadingCollection: boolean; - isSearching: boolean; - isDownloading: boolean; - addingSticker: string | null; - - setSearchQuery: (query: string) => void; - setSelectedCategory: (category: StickerCategory) => void; - setSelectedCollection: (collection: string | null) => void; - setViewMode: (mode: "search" | "browse" | "collection") => void; - - loadCollections: () => Promise; - loadCollection: (prefix: string) => Promise; - searchStickers: (query: string) => Promise; - downloadSticker: (iconName: string) => Promise; - addStickerToTimeline: (iconName: string) => Promise; - - addToRecentStickers: (iconName: string) => void; - clearRecentStickers: () => void; -} - -const MAX_RECENT_STICKERS = 50; - -export const useStickersStore = create((set, get) => ({ - searchQuery: "", - selectedCategory: "all", - selectedCollection: null, - viewMode: "browse", - - collections: {}, - currentCollection: null, - searchResults: null, - recentStickers: [], - - isLoadingCollections: false, - isLoadingCollection: false, - isSearching: false, - isDownloading: false, - addingSticker: null, - - setSearchQuery: (query) => set({ searchQuery: query }), - - setSelectedCategory: (category) => - set({ - selectedCategory: category, - viewMode: "browse", - selectedCollection: null, - currentCollection: null, - }), - - setSelectedCollection: (collection) => { - set({ - selectedCollection: collection, - viewMode: collection ? "collection" : "browse", - currentCollection: null, - }); - - if (collection) { - get().loadCollection(collection); - } - }, - - setViewMode: (mode) => set({ viewMode: mode }), - - loadCollections: async () => { - set({ isLoadingCollections: true }); - try { - const collections = await getCollections(); - set({ collections }); - } catch (error) { - console.error("Failed to load collections:", error); - } finally { - set({ isLoadingCollections: false }); - } - }, - - loadCollection: async (prefix: string) => { - set({ isLoadingCollection: true }); - try { - const collection = await getCollection(prefix); - set({ currentCollection: collection }); - } catch (error) { - console.error(`Failed to load collection ${prefix}:`, error); - set({ currentCollection: null }); - } finally { - set({ isLoadingCollection: false }); - } - }, - - searchStickers: async (query: string) => { - if (!query.trim()) { - set({ searchResults: null, viewMode: "browse" }); - return; - } - - const { selectedCategory } = get(); - - set({ isSearching: true, viewMode: "search" }); - try { - let category: string | undefined; - - if (selectedCategory !== "all") { - if (selectedCategory === "general") { - category = "General"; - } else if (selectedCategory === "brands") { - category = "Brands / Social"; - } else if (selectedCategory === "emoji") { - category = "Emoji"; - } - } - - const results = await searchIcons(query, 100, undefined, category); - set({ searchResults: results }); - } catch (error) { - console.error("Search failed:", error); - set({ searchResults: null }); - } finally { - set({ isSearching: false }); - } - }, - - downloadSticker: async (iconName: string) => { - set({ isDownloading: true }); - try { - const svgText = await downloadSvgAsText(iconName, { - width: 200, - height: 200, - }); - - const fileName = `${iconName.replace(":", "-")}.svg`; - const file = svgToFile(svgText, fileName); - - get().addToRecentStickers(iconName); - - return file; - } catch (error) { - console.error(`Failed to download sticker ${iconName}:`, error); - return null; - } finally { - set({ isDownloading: false }); - } - }, - - addStickerToTimeline: async (iconName: string) => { - set({ addingSticker: iconName }); - try { - const { activeProject } = useProjectStore.getState(); - if (!activeProject) { - throw new Error("No active project"); - } - - const file = await get().downloadSticker(iconName); - if (!file) { - throw new Error("Failed to download sticker"); - } - - const mediaItem: Omit = { - name: iconName.replace(":", "-"), - type: "image", - file, - url: URL.createObjectURL(file), - width: 200, - height: 200, - duration: TIMELINE_CONSTANTS.DEFAULT_IMAGE_DURATION, - ephemeral: false, - }; - - const { addMediaFile } = useMediaStore.getState(); - await addMediaFile(activeProject.id, mediaItem); - - const added = useMediaStore - .getState() - .mediaFiles.find( - (m) => m.url === mediaItem.url && m.name === mediaItem.name - ); - if (!added) { - throw new Error("Sticker not in media store"); - } - - const { currentTime } = usePlaybackStore.getState(); - const { addElementAtTime } = useTimelineStore.getState(); - addElementAtTime(added, currentTime); - } finally { - set({ addingSticker: null }); - } - }, - - addToRecentStickers: (iconName: string) => { - set((state) => { - const recent = [ - iconName, - ...state.recentStickers.filter((s) => s !== iconName), - ]; - return { - recentStickers: recent.slice(0, MAX_RECENT_STICKERS), - }; - }); - }, - - clearRecentStickers: () => set({ recentStickers: [] }), -})); diff --git a/apps/tools/src/stores/text-properties-store.ts b/apps/tools/src/stores/text-properties-store.ts deleted file mode 100644 index 44310538..00000000 --- a/apps/tools/src/stores/text-properties-store.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { create } from "zustand"; -import { persist } from "zustand/middleware"; - -export type TextPropertiesTab = "transform" | "style"; - -export interface TextPropertiesTabMeta { - value: TextPropertiesTab; - label: string; -} - -export const TEXT_PROPERTIES_TABS: ReadonlyArray = [ - { value: "transform", label: "Transform" }, - { value: "style", label: "Style" }, -] as const; - -export function isTextPropertiesTab(value: string): value is TextPropertiesTab { - return TEXT_PROPERTIES_TABS.some((t) => t.value === value); -} - -interface TextPropertiesState { - activeTab: TextPropertiesTab; - setActiveTab: (tab: TextPropertiesTab) => void; -} - -export const useTextPropertiesStore = create()( - persist( - (set) => ({ - activeTab: "transform", - setActiveTab: (tab) => set({ activeTab: tab }), - }), - { name: "text-properties" } - ) -); diff --git a/apps/tools/src/stores/timeline-store.ts b/apps/tools/src/stores/timeline-store.ts deleted file mode 100644 index 05fb06d0..00000000 --- a/apps/tools/src/stores/timeline-store.ts +++ /dev/null @@ -1,1907 +0,0 @@ -import { create } from "zustand"; -import { - TrackType, - TimelineElement, - CreateTimelineElement, - TimelineTrack, - TextElement, - DragData, - MediaElement, -} from "@/types/timeline"; -import { - sortTracksByOrder, - ensureMainTrack, - validateElementTrackCompatibility, -} from "@/lib/timeline/track-utils"; -import { useMediaStore } from "./media-store"; -import { MediaFile, MediaType } from "@/types/media"; -import { storageService } from "@/lib/storage/storage-service"; -import { useProjectStore } from "./project-store"; -import { useSceneStore } from "./scene-store"; -import { generateUUID } from "@/lib/utils"; -import { TIMELINE_CONSTANTS } from "@/constants/timeline-constants"; -import { checkElementOverlaps, resolveElementOverlaps } from "@/lib/timeline"; -import { DEFAULT_TEXT_ELEMENT } from "@/constants/text-constants"; -import { usePlaybackStore } from "./playback-store"; - -// Helper function to manage element naming with suffixes -const getElementNameWithSuffix = ( - originalName: string, - suffix: string, -): string => { - // Remove existing suffixes to prevent accumulation - const baseName = originalName - .replace(/ \(left\)$/i, "") - .replace(/ \(right\)$/i, "") - .replace(/ \(audio\)$/i, "") - .replace(/ \(split \d+\)$/i, ""); - - return `${baseName} (${suffix})`; -}; - -interface TimelineStore { - // Private track storage - _tracks: TimelineTrack[]; - history: TimelineTrack[][]; - redoStack: TimelineTrack[][]; - - // Clipboard buffer - clipboard: { - items: Array<{ trackType: TrackType; element: CreateTimelineElement }>; - } | null; - - // Always returns properly ordered tracks with main track ensured - tracks: TimelineTrack[]; - - // Manual method if you need to force recomputation - getSortedTracks: () => TimelineTrack[]; - - // Snapping settings - snappingEnabled: boolean; - - // Snapping actions - toggleSnapping: () => void; - - // Ripple editing mode - rippleEditingEnabled: boolean; - toggleRippleEditing: () => void; - - // Multi-selection - selectedElements: { trackId: string; elementId: string }[]; - selectElement: (trackId: string, elementId: string, multi?: boolean) => void; - deselectElement: (trackId: string, elementId: string) => void; - clearSelectedElements: () => void; - setSelectedElements: ( - elements: { trackId: string; elementId: string }[], - ) => void; - - // Drag state - dragState: { - isDragging: boolean; - elementId: string | null; - trackId: string | null; - startMouseX: number; - startElementTime: number; - clickOffsetTime: number; - currentTime: number; - }; - setDragState: (dragState: Partial) => void; - startDrag: ( - elementId: string, - trackId: string, - startMouseX: number, - startElementTime: number, - clickOffsetTime: number, - ) => void; - updateDragTime: (currentTime: number) => void; - endDrag: () => void; - - // Actions - addTrack: (type: TrackType) => string; - insertTrackAt: (type: TrackType, index: number) => string; - removeTrack: (trackId: string) => void; - removeTrackWithRipple: (trackId: string) => void; - addElementToTrack: (trackId: string, element: CreateTimelineElement) => void; - - moveElementToTrack: ( - fromTrackId: string, - toTrackId: string, - elementId: string, - ) => void; - updateElementTrim: ( - trackId: string, - elementId: string, - trimStart: number, - trimEnd: number, - pushHistory?: boolean, - ) => void; - updateElementDuration: ( - trackId: string, - elementId: string, - duration: number, - pushHistory?: boolean, - ) => void; - updateElementStartTime: ( - trackId: string, - elementId: string, - startTime: number, - pushHistory?: boolean, - ) => void; - toggleTrackMute: (trackId: string) => void; - splitAndKeepLeft: ( - trackId: string, - elementId: string, - splitTime: number, - ) => void; - splitAndKeepRight: ( - trackId: string, - elementId: string, - splitTime: number, - ) => void; - separateAudio: (trackId: string, elementId: string) => string | null; - - // Replace media for an element - replaceElementMedia: ( - trackId: string, - elementId: string, - newFile: File, - ) => Promise<{ success: boolean; error?: string }>; - - // Ripple editing functions - updateElementStartTimeWithRipple: ( - trackId: string, - elementId: string, - newStartTime: number, - ) => void; - removeElementFromTrackWithRipple: ( - trackId: string, - elementId: string, - pushHistory?: boolean, - ) => void; - - // Computed values - getTotalDuration: () => number; - getProjectThumbnail: (projectId: string) => Promise; - - // History actions - undo: () => void; - redo: () => void; - pushHistory: () => void; - - // Persistence actions - loadProjectTimeline: ({ - projectId, - sceneId, - }: { - projectId: string; - sceneId?: string; - }) => Promise; - saveProjectTimeline: ({ - projectId, - sceneId, - }: { - projectId: string; - sceneId?: string; - }) => Promise; - clearTimeline: () => void; - - // Clipboard actions - copySelected: () => void; - pasteAtTime: (time: number) => void; - - // Unified selection-aware actions - deleteSelected: (trackId?: string, elementId?: string) => void; - splitSelected: ( - splitTime: number, - trackId?: string, - elementId?: string, - ) => void; - toggleSelectedHidden: (trackId?: string, elementId?: string) => void; - toggleSelectedMuted: (trackId?: string, elementId?: string) => void; - duplicateElement: (trackId: string, elementId: string) => void; - revealElementInMedia: (elementId: string) => void; - replaceElementWithFile: ( - trackId: string, - elementId: string, - file: File, - ) => Promise; - getContextMenuState: ( - trackId: string, - elementId: string, - ) => { - isMultipleSelected: boolean; - isCurrentElementSelected: boolean; - hasAudioElements: boolean; - canSplitSelected: boolean; - currentTime: number; - }; - updateTextElement: ( - trackId: string, - elementId: string, - updates: Partial< - Pick< - TextElement, - | "content" - | "fontSize" - | "fontFamily" - | "color" - | "backgroundColor" - | "textAlign" - | "fontWeight" - | "fontStyle" - | "textDecoration" - | "x" - | "y" - | "rotation" - | "opacity" - > - >, - ) => void; - checkElementOverlap: ( - trackId: string, - startTime: number, - duration: number, - excludeElementId?: string, - ) => boolean; - findOrCreateTrack: (trackType: TrackType) => string; - addElementAtTime: ( - item: MediaFile | TextElement, - currentTime?: number, - ) => boolean; - addElementToNewTrack: (item: MediaFile | TextElement | DragData) => boolean; -} - -export const useTimelineStore = create((set, get) => { - // Helper to update tracks and maintain ordering - const updateTracks = (newTracks: TimelineTrack[]) => { - const tracksWithMain = ensureMainTrack({ tracks: newTracks }); - const sortedTracks = sortTracksByOrder({ tracks: tracksWithMain }); - set({ - _tracks: tracksWithMain, - tracks: sortedTracks, - }); - }; - - // Helper to auto-save timeline changes - const autoSaveTimeline = async () => { - const activeProject = useProjectStore.getState().activeProject; - const currentScene = useSceneStore.getState().currentScene; - - if (activeProject && currentScene) { - try { - await storageService.saveTimeline({ - projectId: activeProject.id, - tracks: get()._tracks, - sceneId: currentScene.id, - }); - } catch (error) { - console.error("Failed to auto-save timeline:", error); - } - } else { - console.warn( - "Auto-save skipped - missing activeProject or currentScene:", - { - hasProject: !!activeProject, - hasScene: !!currentScene, - sceneName: currentScene?.name, - }, - ); - } - }; - - // Helper to update tracks and auto-save - const updateTracksAndSave = (newTracks: TimelineTrack[]) => { - updateTracks(newTracks); - // Auto-save in background - setTimeout(autoSaveTimeline, 100); - }; - - // Initialize with proper track ordering - const initialTracks = ensureMainTrack({ tracks: [] }); - const sortedInitialTracks = sortTracksByOrder({ tracks: initialTracks }); - - return { - _tracks: initialTracks, - tracks: sortedInitialTracks, - history: [], - redoStack: [], - selectedElements: [], - rippleEditingEnabled: false, - clipboard: null, - - // Snapping settings defaults - snappingEnabled: true, - - getSortedTracks: () => { - const { _tracks } = get(); - const tracksWithMain = ensureMainTrack({ tracks: _tracks }); - return sortTracksByOrder({ tracks: tracksWithMain }); - }, - - pushHistory: () => { - const { _tracks, history } = get(); - set({ - history: [...history, JSON.parse(JSON.stringify(_tracks))], - redoStack: [], - }); - }, - - undo: () => { - const { history, redoStack, _tracks } = get(); - if (history.length === 0) return; - const prev = history[history.length - 1]; - updateTracksAndSave(prev); - set({ - history: history.slice(0, -1), - redoStack: [...redoStack, JSON.parse(JSON.stringify(_tracks))], - }); - }, - - selectElement: (trackId, elementId, multi = false) => { - set((state) => { - const exists = state.selectedElements.some( - (c) => c.trackId === trackId && c.elementId === elementId, - ); - if (multi) { - return exists - ? { - selectedElements: state.selectedElements.filter( - (c) => !(c.trackId === trackId && c.elementId === elementId), - ), - } - : { - selectedElements: [ - ...state.selectedElements, - { trackId, elementId }, - ], - }; - } - return { selectedElements: [{ trackId, elementId }] }; - }); - }, - - deselectElement: (trackId, elementId) => { - set((state) => ({ - selectedElements: state.selectedElements.filter( - (c) => !(c.trackId === trackId && c.elementId === elementId), - ), - })); - }, - - clearSelectedElements: () => { - set({ selectedElements: [] }); - }, - - setSelectedElements: (elements) => set({ selectedElements: elements }), - - addTrack: (type) => { - get().pushHistory(); - - const trackName = - type === "media" - ? "Media Track" - : type === "text" - ? "Text Track" - : type === "audio" - ? "Audio Track" - : "Track"; - - const newTrack: TimelineTrack = { - id: generateUUID(), - name: trackName, - type, - elements: [], - muted: false, - }; - - updateTracksAndSave([...get()._tracks, newTrack]); - return newTrack.id; - }, - - insertTrackAt: (type, index) => { - get().pushHistory(); - - const trackName = - type === "media" - ? "Media Track" - : type === "text" - ? "Text Track" - : type === "audio" - ? "Audio Track" - : "Track"; - - const newTrack: TimelineTrack = { - id: generateUUID(), - name: trackName, - type, - elements: [], - muted: false, - }; - - const newTracks = [...get()._tracks]; - newTracks.splice(index, 0, newTrack); - updateTracksAndSave(newTracks); - return newTrack.id; - }, - - removeTrack: (trackId) => { - const { rippleEditingEnabled } = get(); - - if (rippleEditingEnabled) { - get().removeTrackWithRipple(trackId); - } else { - get().pushHistory(); - updateTracksAndSave( - get()._tracks.filter((track) => track.id !== trackId), - ); - } - }, - - removeTrackWithRipple: (trackId) => { - const { _tracks } = get(); - const trackToRemove = _tracks.find((t) => t.id === trackId); - - if (!trackToRemove) return; - - get().pushHistory(); - - const occupiedRanges = trackToRemove.elements.map((element) => ({ - startTime: element.startTime, - endTime: - element.startTime + - (element.duration - element.trimStart - element.trimEnd), - })); - - occupiedRanges.sort((a, b) => a.startTime - b.startTime); - - const mergedRanges: Array<{ - startTime: number; - endTime: number; - duration: number; - }> = []; - - for (const range of occupiedRanges) { - if (mergedRanges.length === 0) { - mergedRanges.push({ - startTime: range.startTime, - endTime: range.endTime, - duration: range.endTime - range.startTime, - }); - } else { - const lastRange = mergedRanges[mergedRanges.length - 1]; - if (range.startTime <= lastRange.endTime) { - lastRange.endTime = Math.max(lastRange.endTime, range.endTime); - lastRange.duration = lastRange.endTime - lastRange.startTime; - } else { - mergedRanges.push({ - startTime: range.startTime, - endTime: range.endTime, - duration: range.endTime - range.startTime, - }); - } - } - } - - const updatedTracks = _tracks - .filter((track) => track.id !== trackId) - .map((track) => { - const updatedElements = track.elements.map((element) => { - let newStartTime = element.startTime; - - for (let i = mergedRanges.length - 1; i >= 0; i--) { - const gap = mergedRanges[i]; - if (newStartTime >= gap.endTime) { - newStartTime -= gap.duration; - } - } - - return { - ...element, - startTime: Math.max(0, newStartTime), - }; - }); - - const hasOverlaps = checkElementOverlaps({ - elements: updatedElements, - }); - if (hasOverlaps) { - const resolvedElements = resolveElementOverlaps({ - elements: updatedElements, - }); - return { ...track, elements: resolvedElements }; - } - - return { ...track, elements: updatedElements }; - }); - - updateTracksAndSave(updatedTracks); - }, - - addElementToTrack: (trackId, elementData) => { - get().pushHistory(); - - const track = get()._tracks.find((t) => t.id === trackId); - if (!track) { - console.error("Track not found:", trackId); - return; - } - - const validation = validateElementTrackCompatibility({ - element: elementData, - track, - }); - if (!validation.isValid) { - console.error(validation.errorMessage); - return; - } - - if (elementData.type === "media" && !elementData.mediaId) { - console.error("Media element must have mediaId"); - return; - } - - if (elementData.type === "text" && !elementData.content) { - console.error("Text element must have content"); - return; - } - - const currentState = get(); - const totalElementsInTimeline = currentState._tracks.reduce( - (total, track) => total + track.elements.length, - 0, - ); - const isFirstElement = totalElementsInTimeline === 0; - - const newElement: TimelineElement = { - ...elementData, - id: generateUUID(), - startTime: elementData.startTime, - trimStart: elementData.trimStart ?? 0, - trimEnd: elementData.trimEnd ?? 0, - ...(elementData.type === "media" - ? { muted: elementData.muted ?? false } - : {}), - } as TimelineElement; - - if (isFirstElement && newElement.type === "media") { - const mediaStore = useMediaStore.getState(); - const mediaItem = mediaStore.mediaFiles.find( - (item) => item.id === newElement.mediaId, - ); - - if ( - mediaItem && - (mediaItem.type === "image" || mediaItem.type === "video") && - mediaItem.width && - mediaItem.height - ) { - const projectStore = useProjectStore.getState(); - projectStore.updateCanvasSize({ - size: { - width: mediaItem.width, - height: mediaItem.height, - }, - }); - } - - if (mediaItem && mediaItem.type === "video" && mediaItem.fps) { - const projectStore = useProjectStore.getState(); - if (projectStore.activeProject) { - projectStore.updateProjectFps(mediaItem.fps); - } - } - } - - updateTracksAndSave( - get()._tracks.map((track) => - track.id === trackId - ? { ...track, elements: [...track.elements, newElement] } - : track, - ), - ); - - get().selectElement(trackId, newElement.id); - }, - - removeElementFromTrackWithRipple: ( - trackId, - elementId, - pushHistory = true, - ) => { - const { _tracks, rippleEditingEnabled } = get(); - - if (!rippleEditingEnabled) { - // Inline non-ripple removal logic - if (pushHistory) get().pushHistory(); - updateTracksAndSave( - _tracks - .map((track) => - track.id === trackId - ? { - ...track, - elements: track.elements.filter( - (element) => element.id !== elementId, - ), - } - : track, - ) - .filter((track) => track.elements.length > 0), - ); - return; - } - - const track = _tracks.find((t) => t.id === trackId); - const element = track?.elements.find((e) => e.id === elementId); - - if (!element || !track) return; - - if (pushHistory) get().pushHistory(); - - const elementStartTime = element.startTime; - const elementDuration = - element.duration - element.trimStart - element.trimEnd; - const elementEndTime = elementStartTime + elementDuration; - - const updatedTracks = _tracks - .map((currentTrack) => { - const shouldApplyRipple = currentTrack.id === trackId; - - const updatedElements = currentTrack.elements - .filter((currentElement) => { - if ( - currentElement.id === elementId && - currentTrack.id === trackId - ) { - return false; - } - return true; - }) - .map((currentElement) => { - if (!shouldApplyRipple) { - return currentElement; - } - - if (currentElement.startTime >= elementEndTime) { - return { - ...currentElement, - startTime: Math.max( - 0, - currentElement.startTime - elementDuration, - ), - }; - } - return currentElement; - }); - - const hasOverlaps = checkElementOverlaps({ - elements: updatedElements, - }); - if (hasOverlaps) { - const resolvedElements = resolveElementOverlaps({ - elements: updatedElements, - }); - return { ...currentTrack, elements: resolvedElements }; - } - - return { ...currentTrack, elements: updatedElements }; - }) - .filter((track) => track.elements.length > 0 || track.isMain); - - updateTracksAndSave(updatedTracks); - }, - - moveElementToTrack: (fromTrackId, toTrackId, elementId) => { - get().pushHistory(); - - const fromTrack = get()._tracks.find((track) => track.id === fromTrackId); - const toTrack = get()._tracks.find((track) => track.id === toTrackId); - const elementToMove = fromTrack?.elements.find( - (element) => element.id === elementId, - ); - - if (!elementToMove || !toTrack) return; - - const validation = validateElementTrackCompatibility({ - element: elementToMove, - track: toTrack, - }); - if (!validation.isValid) { - console.error(validation.errorMessage); - return; - } - - const newTracks = get() - ._tracks.map((track) => { - if (track.id === fromTrackId) { - return { - ...track, - elements: track.elements.filter( - (element) => element.id !== elementId, - ), - }; - } - if (track.id === toTrackId) { - return { - ...track, - elements: [...track.elements, elementToMove], - }; - } - return track; - }) - .filter((track) => track.elements.length > 0); - - updateTracksAndSave(newTracks); - }, - - updateElementTrim: ( - trackId, - elementId, - trimStart, - trimEnd, - pushHistory = true, - ) => { - if (pushHistory) get().pushHistory(); - updateTracksAndSave( - get()._tracks.map((track) => - track.id === trackId - ? { - ...track, - elements: track.elements.map((element) => - element.id === elementId - ? { ...element, trimStart, trimEnd } - : element, - ), - } - : track, - ), - ); - }, - - updateElementDuration: ( - trackId, - elementId, - duration, - pushHistory = true, - ) => { - if (pushHistory) get().pushHistory(); - updateTracksAndSave( - get()._tracks.map((track) => - track.id === trackId - ? { - ...track, - elements: track.elements.map((element) => - element.id === elementId ? { ...element, duration } : element, - ), - } - : track, - ), - ); - }, - - updateElementStartTime: ( - trackId, - elementId, - startTime, - pushHistory = true, - ) => { - if (pushHistory) get().pushHistory(); - const clampedStartTime = Math.max(0, startTime); - updateTracksAndSave( - get()._tracks.map((track) => - track.id === trackId - ? { - ...track, - elements: track.elements.map((element) => - element.id === elementId - ? { ...element, startTime: clampedStartTime } - : element, - ), - } - : track, - ), - ); - }, - - updateElementStartTimeWithRipple: (trackId, elementId, newStartTime) => { - const { _tracks, rippleEditingEnabled } = get(); - - if (!rippleEditingEnabled) { - get().updateElementStartTime(trackId, elementId, newStartTime); - return; - } - - const track = _tracks.find((t) => t.id === trackId); - const element = track?.elements.find((e) => e.id === elementId); - - if (!element || !track) return; - - get().pushHistory(); - - const oldStartTime = element.startTime; - const oldEndTime = - element.startTime + - (element.duration - element.trimStart - element.trimEnd); - const newEndTime = - newStartTime + (element.duration - element.trimStart - element.trimEnd); - const timeDelta = newStartTime - oldStartTime; - - const updatedTracks = _tracks.map((currentTrack) => { - const shouldApplyRipple = currentTrack.id === trackId; - - const updatedElements = currentTrack.elements.map((currentElement) => { - if (currentElement.id === elementId && currentTrack.id === trackId) { - return { ...currentElement, startTime: Math.max(0, newStartTime) }; - } - - if (!shouldApplyRipple) { - return currentElement; - } - - const currentElementStart = currentElement.startTime; - const currentElementEnd = - currentElement.startTime + - (currentElement.duration - - currentElement.trimStart - - currentElement.trimEnd); - - if (timeDelta > 0) { - if (currentElementStart >= oldEndTime) { - return { - ...currentElement, - startTime: currentElementStart + timeDelta, - }; - } - } else if (timeDelta < 0) { - if ( - currentElementStart >= newEndTime && - currentElementStart >= oldStartTime - ) { - return { - ...currentElement, - startTime: Math.max(0, currentElementStart + timeDelta), - }; - } - } - - return currentElement; - }); - - const hasOverlaps = checkElementOverlaps({ elements: updatedElements }); - if (hasOverlaps) { - const resolvedElements = resolveElementOverlaps({ - elements: updatedElements, - }); - return { ...currentTrack, elements: resolvedElements }; - } - - return { ...currentTrack, elements: updatedElements }; - }); - - updateTracksAndSave(updatedTracks); - }, - - toggleTrackMute: (trackId) => { - get().pushHistory(); - updateTracksAndSave( - get()._tracks.map((track) => - track.id === trackId ? { ...track, muted: !track.muted } : track, - ), - ); - }, - - updateTextElement: (trackId, elementId, updates) => { - get().pushHistory(); - updateTracksAndSave( - get()._tracks.map((track) => - track.id === trackId - ? { - ...track, - elements: track.elements.map((element) => - element.id === elementId && element.type === "text" - ? { ...element, ...updates } - : element, - ), - } - : track, - ), - ); - }, - - // Split element and keep only the left portion - splitAndKeepLeft: (trackId, elementId, splitTime) => { - const { _tracks } = get(); - const track = _tracks.find((t) => t.id === trackId); - const element = track?.elements.find((c) => c.id === elementId); - - if (!element) return; - - const effectiveStart = element.startTime; - const effectiveEnd = - element.startTime + - (element.duration - element.trimStart - element.trimEnd); - - if (splitTime <= effectiveStart || splitTime >= effectiveEnd) return; - - get().pushHistory(); - - const relativeTime = splitTime - element.startTime; - const durationToRemove = - element.duration - element.trimStart - element.trimEnd - relativeTime; - - updateTracksAndSave( - get()._tracks.map((track) => - track.id === trackId - ? { - ...track, - elements: track.elements.map((c) => - c.id === elementId - ? { - ...c, - trimEnd: c.trimEnd + durationToRemove, - name: getElementNameWithSuffix(c.name, "left"), - } - : c, - ), - } - : track, - ), - ); - }, - - // Split element and keep only the right portion - splitAndKeepRight: (trackId, elementId, splitTime) => { - const { _tracks } = get(); - const track = _tracks.find((t) => t.id === trackId); - const element = track?.elements.find((c) => c.id === elementId); - - if (!element) return; - - const effectiveStart = element.startTime; - const effectiveEnd = - element.startTime + - (element.duration - element.trimStart - element.trimEnd); - - if (splitTime <= effectiveStart || splitTime >= effectiveEnd) return; - - get().pushHistory(); - - const relativeTime = splitTime - element.startTime; - - updateTracksAndSave( - get()._tracks.map((track) => - track.id === trackId - ? { - ...track, - elements: track.elements.map((c) => - c.id === elementId - ? { - ...c, - startTime: splitTime, - trimStart: c.trimStart + relativeTime, - name: getElementNameWithSuffix(c.name, "right"), - } - : c, - ), - } - : track, - ), - ); - }, - - // Extract audio from video element to an audio track - separateAudio: (trackId, elementId) => { - const { _tracks } = get(); - const track = _tracks.find((t) => t.id === trackId); - const element = track?.elements.find((c) => c.id === elementId); - - if (!element || track?.type !== "media") return null; - - get().pushHistory(); - - const existingAudioTrack = _tracks.find((t) => t.type === "audio"); - const audioElementId = generateUUID(); - - if (existingAudioTrack) { - updateTracksAndSave( - get()._tracks.map((track) => - track.id === existingAudioTrack.id - ? { - ...track, - elements: [ - ...track.elements, - { - ...element, - id: audioElementId, - name: getElementNameWithSuffix(element.name, "audio"), - }, - ], - } - : track, - ), - ); - } else { - const newAudioTrack: TimelineTrack = { - id: generateUUID(), - name: "Audio Track", - type: "audio", - elements: [ - { - ...element, - id: audioElementId, - name: getElementNameWithSuffix(element.name, "audio"), - }, - ], - muted: false, - }; - - updateTracksAndSave([...get()._tracks, newAudioTrack]); - } - - return audioElementId; - }, - - // Replace media for an element - replaceElementMedia: async ( - trackId: string, - elementId: string, - newFile: File, - ): Promise<{ success: boolean; error?: string }> => { - const { _tracks } = get(); - const track = _tracks.find((t) => t.id === trackId); - const element = track?.elements.find((c) => c.id === elementId); - - if (!element) { - return { success: false, error: "Timeline element not found" }; - } - - if (element.type !== "media") { - return { - success: false, - error: "Replace is only available for media clips", - }; - } - - try { - const mediaStore = useMediaStore.getState(); - const projectStore = useProjectStore.getState(); - - if (!projectStore.activeProject) { - return { success: false, error: "No active project found" }; - } - - const { - getFileType, - getImageDimensions, - generateVideoThumbnail, - getMediaDuration, - } = await import("./media-store"); - - const fileType = getFileType(newFile); - if (!fileType) { - return { - success: false, - error: - "Unsupported file type. Please select a video, audio, or image file.", - }; - } - - const mediaData: Omit = { - name: newFile.name, - type: fileType as MediaType, - file: newFile, - url: URL.createObjectURL(newFile), - }; - - try { - if (fileType === "image") { - const { width, height } = await getImageDimensions(newFile); - mediaData.width = width; - mediaData.height = height; - } else if (fileType === "video") { - const [duration, { thumbnailUrl, width, height }] = - await Promise.all([ - getMediaDuration(newFile), - generateVideoThumbnail(newFile), - ]); - mediaData.duration = duration; - mediaData.thumbnailUrl = thumbnailUrl; - mediaData.width = width; - mediaData.height = height; - } else if (fileType === "audio") { - mediaData.duration = await getMediaDuration(newFile); - } - } catch (error) { - return { - success: false, - error: `Failed to process ${fileType} file: ${error instanceof Error ? error.message : "Unknown error"}`, - }; - } - - try { - await mediaStore.addMediaFile( - projectStore.activeProject.id, - mediaData, - ); - } catch (error) { - return { - success: false, - error: `Failed to add media to project: ${error instanceof Error ? error.message : "Unknown error"}`, - }; - } - - const newMediaItem = mediaStore.mediaFiles.find( - (item) => item.file === newFile, - ); - - if (!newMediaItem) { - return { - success: false, - error: "Failed to create media item in project. Please try again.", - }; - } - - get().pushHistory(); - - updateTracksAndSave( - _tracks.map((track) => - track.id === trackId - ? { - ...track, - elements: track.elements.map((c) => - c.id === elementId - ? { - ...c, - mediaId: newMediaItem.id, - name: newMediaItem.name, - duration: newMediaItem.duration || c.duration, - } - : c, - ), - } - : track, - ), - ); - - return { success: true }; - } catch (error) { - console.error("Failed to replace element media:", error); - return { - success: false, - error: `Unexpected error: ${error instanceof Error ? error.message : "Unknown error"}`, - }; - } - }, - - getTotalDuration: () => { - const { _tracks } = get(); - if (_tracks.length === 0) return 0; - - const trackEndTimes = _tracks.map((track) => - track.elements.reduce((maxEnd, element) => { - const elementEnd = - element.startTime + - element.duration - - element.trimStart - - element.trimEnd; - return Math.max(maxEnd, elementEnd); - }, 0), - ); - - return Math.max(...trackEndTimes, 0); - }, - - getProjectThumbnail: async (projectId) => { - try { - const project = await storageService.loadProject({ id: projectId }); - if (!project) return null; - - // For scene-based projects, use main scene timeline - // For legacy projects, use legacy timeline format - let sceneId: string | undefined; - if (project.scenes && project.scenes.length > 0) { - const mainScene = project.scenes.find((s) => s.isMain); - sceneId = mainScene?.id; - } - - const tracks = await storageService.loadTimeline({ - projectId, - sceneId, - }); - const mediaItems = await storageService.loadAllMediaFiles({ - projectId, - }); - - if (!tracks || !mediaItems.length) return null; - - const firstMediaElement = tracks - .flatMap((track) => track.elements) - .filter((element) => element.type === "media") - .sort((a, b) => a.startTime - b.startTime)[0]; - - if (!firstMediaElement) return null; - - const mediaFile = mediaItems.find( - (item) => item.id === firstMediaElement.mediaId, - ); - if (!mediaFile) return null; - - if (mediaFile.type === "video" && mediaFile.file) { - const { generateVideoThumbnail } = await import( - "@/stores/media-store" - ); - const { thumbnailUrl } = await generateVideoThumbnail(mediaFile.file); - return thumbnailUrl; - } - if (mediaFile.type === "image" && mediaFile.url) { - return mediaFile.url; - } - - return null; - } catch (error) { - console.error("Failed to get project thumbnail:", error); - return null; - } - }, - - redo: () => { - const { redoStack } = get(); - if (redoStack.length === 0) return; - const next = redoStack[redoStack.length - 1]; - updateTracksAndSave(next); - set({ redoStack: redoStack.slice(0, -1) }); - }, - - dragState: { - isDragging: false, - elementId: null, - trackId: null, - startMouseX: 0, - startElementTime: 0, - clickOffsetTime: 0, - currentTime: 0, - }, - - setDragState: (dragState) => - set((state) => ({ - dragState: { ...state.dragState, ...dragState }, - })), - - startDrag: ( - elementId, - trackId, - startMouseX, - startElementTime, - clickOffsetTime, - ) => { - set({ - dragState: { - isDragging: true, - elementId, - trackId, - startMouseX, - startElementTime, - clickOffsetTime, - currentTime: startElementTime, - }, - }); - }, - - updateDragTime: (currentTime) => { - set((state) => ({ - dragState: { - ...state.dragState, - currentTime, - }, - })); - }, - - endDrag: () => { - set({ - dragState: { - isDragging: false, - elementId: null, - trackId: null, - startMouseX: 0, - startElementTime: 0, - clickOffsetTime: 0, - currentTime: 0, - }, - }); - }, - - loadProjectTimeline: async ({ - projectId, - sceneId, - }: { - projectId: string; - sceneId?: string; - }) => { - try { - const tracks = await storageService.loadTimeline({ - projectId, - sceneId, - }); - - if (tracks) { - updateTracks(tracks); - } else { - const defaultTracks = ensureMainTrack({ tracks: [] }); - updateTracks(defaultTracks); - } - set({ history: [], redoStack: [] }); - } catch (error) { - console.error("Failed to load timeline:", error); - const defaultTracks = ensureMainTrack({ tracks: [] }); - updateTracks(defaultTracks); - set({ history: [], redoStack: [] }); - } - }, - - saveProjectTimeline: async ({ - projectId, - sceneId, - }: { - projectId: string; - sceneId?: string; - }) => { - const { _tracks } = get(); - try { - await storageService.saveTimeline({ - projectId, - tracks: _tracks, - sceneId, - }); - } catch (error) { - console.error("Failed to save timeline:", error); - } - }, - - clearTimeline: () => { - const defaultTracks = ensureMainTrack({ tracks: [] }); - updateTracks(defaultTracks); - set({ - history: [], - redoStack: [], - selectedElements: [], - clipboard: null, - }); - }, - - // Snapping actions - toggleSnapping: () => { - set((state) => ({ snappingEnabled: !state.snappingEnabled })); - }, - - // Ripple editing functions - toggleRippleEditing: () => { - set((state) => ({ - rippleEditingEnabled: !state.rippleEditingEnabled, - })); - }, - - checkElementOverlap: (trackId, startTime, duration, excludeElementId) => { - const track = get()._tracks.find((t) => t.id === trackId); - if (!track) return false; - - const overlap = track.elements.some((element) => { - const elementEnd = - element.startTime + - element.duration - - element.trimStart - - element.trimEnd; - - if (element.id === excludeElementId) { - return false; - } - - return ( - (startTime >= element.startTime && startTime < elementEnd) || - (startTime + duration > element.startTime && - startTime + duration <= elementEnd) || - (startTime < element.startTime && startTime + duration > elementEnd) - ); - }); - return overlap; - }, - - findOrCreateTrack: (trackType) => { - if (trackType === "text") { - return get().insertTrackAt(trackType, 0); - } - - const existingTrack = get()._tracks.find((t) => t.type === trackType); - if (existingTrack) { - return existingTrack.id; - } - - return get().addTrack(trackType); - }, - - addElementAtTime: (item: MediaFile | TextElement, currentTime = 0) => { - if (item.type === "text") { - const targetTrackId = get().insertTrackAt("text", 0); - get().addElementToTrack( - targetTrackId, - buildTextElement(item, currentTime), - ); - return true; - } - - const media = item as MediaFile; - const trackType = media.type === "audio" ? "audio" : "media"; - const targetTrackId = get().insertTrackAt(trackType, 0); - get().addElementToTrack(targetTrackId, { - type: "media", - mediaId: media.id, - name: media.name, - duration: media.duration || TIMELINE_CONSTANTS.DEFAULT_IMAGE_DURATION, - startTime: currentTime, - trimStart: 0, - trimEnd: 0, - muted: false, - }); - return true; - }, - - addElementToNewTrack: (item) => { - if (item.type === "text") { - const targetTrackId = get().insertTrackAt("text", 0); - get().addElementToTrack( - targetTrackId, - buildTextElement(item as TextElement | DragData, 0), - ); - return true; - } - - const media = item as MediaFile; - const trackType = media.type === "audio" ? "audio" : "media"; - const targetTrackId = get().insertTrackAt(trackType, 0); - get().addElementToTrack(targetTrackId, { - type: "media", - mediaId: media.id, - name: media.name, - duration: media.duration || TIMELINE_CONSTANTS.DEFAULT_IMAGE_DURATION, - startTime: 0, - trimStart: 0, - trimEnd: 0, - muted: false, - }); - return true; - }, - - copySelected: () => { - const { selectedElements, _tracks } = get(); - if (selectedElements.length === 0) return; - - const items: Array<{ - trackType: TrackType; - element: CreateTimelineElement; - }> = []; - - for (const { trackId, elementId } of selectedElements) { - const track = _tracks.find((t) => t.id === trackId); - const element = track?.elements.find((e) => e.id === elementId); - if (!track || !element) continue; - - // Prepare a creation-friendly copy without id - const { id: _id, ...rest } = element as TimelineElement; - items.push({ - trackType: track.type, - element: rest as CreateTimelineElement, - }); - } - - set({ clipboard: { items } }); - }, - - pasteAtTime: (time) => { - const { clipboard } = get(); - if (!clipboard || clipboard.items.length === 0) return; - - // Determine reference start time offset based on earliest element in clipboard - const minStart = Math.min( - ...clipboard.items.map((x) => x.element.startTime), - ); - - get().pushHistory(); - - for (const item of clipboard.items) { - const targetTrackId = get().findOrCreateTrack(item.trackType); - const relativeOffset = item.element.startTime - minStart; - const startTime = Math.max(0, time + relativeOffset); - - // Ensure no overlap on target track - const duration = - item.element.duration - item.element.trimStart - item.element.trimEnd; - const hasOverlap = get().checkElementOverlap( - targetTrackId, - startTime, - duration, - ); - if (hasOverlap) { - // If overlap, nudge forward slightly until free (simple resolve) - let candidate = startTime; - let safety = 0; - while ( - get().checkElementOverlap(targetTrackId, candidate, duration) && - safety < 1000 - ) { - candidate += 0.01; - safety += 1; - } - get().addElementToTrack(targetTrackId, { - ...item.element, - startTime: candidate, - }); - } else { - get().addElementToTrack(targetTrackId, { - ...item.element, - startTime, - }); - } - } - }, - - deleteSelected: (trackId?: string, elementId?: string) => { - const { selectedElements, rippleEditingEnabled } = get(); - - const elementsToDelete = - trackId && elementId - ? [{ trackId, elementId }] - : selectedElements.length > 0 - ? selectedElements - : []; - - if (elementsToDelete.length === 0) return; - - get().pushHistory(); - - if (rippleEditingEnabled) { - for (const { trackId: tId, elementId: eId } of elementsToDelete) { - get().removeElementFromTrackWithRipple(tId, eId, false); - } - } else { - updateTracksAndSave( - get() - ._tracks.map((track) => ({ - ...track, - elements: track.elements.filter( - (element) => - !elementsToDelete.some( - ({ trackId: tId, elementId: eId }) => - track.id === tId && element.id === eId, - ), - ), - })) - .filter((track) => track.elements.length > 0), - ); - } - - get().clearSelectedElements(); - }, - - splitSelected: (splitTime, trackId?: string, elementId?: string) => { - const { selectedElements, _tracks } = get(); - - const elementsToProcess = - trackId && elementId - ? [{ trackId, elementId }] - : selectedElements.length > 0 - ? selectedElements - : []; - - if (elementsToProcess.length === 0) return; - - const elementsToSplit: Array<{ - trackId: string; - elementId: string; - element: TimelineElement; - }> = []; - - for (const { trackId: tId, elementId: eId } of elementsToProcess) { - const track = _tracks.find((t) => t.id === tId); - const element = track?.elements.find((e) => e.id === eId); - if (!track || !element) continue; - - const effectiveStart = element.startTime; - const effectiveEnd = - element.startTime + - (element.duration - element.trimStart - element.trimEnd); - - if (splitTime > effectiveStart && splitTime < effectiveEnd) { - elementsToSplit.push({ trackId: tId, elementId: eId, element }); - } - } - - if (elementsToSplit.length === 0) { - const { toast } = require("sonner"); - const isMultiple = elementsToProcess.length > 1; - toast.error( - isMultiple - ? "Playhead must be within all selected elements to split" - : "Playhead must be within element to split", - ); - return; - } - - get().pushHistory(); - - updateTracksAndSave( - get()._tracks.map((track) => { - const elementsToSplitInTrack = elementsToSplit.filter( - ({ trackId: tId }) => tId === track.id, - ); - - if (elementsToSplitInTrack.length === 0) return track; - - return { - ...track, - elements: track.elements.flatMap((c) => { - const elementToSplit = elementsToSplitInTrack.find( - ({ elementId: eId }) => eId === c.id, - ); - - if (!elementToSplit) return [c]; - - const relativeTime = splitTime - elementToSplit.element.startTime; - const firstDuration = relativeTime; - const secondDuration = - elementToSplit.element.duration - - elementToSplit.element.trimStart - - elementToSplit.element.trimEnd - - relativeTime; - - const secondElementId = generateUUID(); - - return [ - { - ...c, - trimEnd: c.trimEnd + secondDuration, - name: getElementNameWithSuffix(c.name, "left"), - }, - { - ...c, - id: secondElementId, - startTime: splitTime, - trimStart: c.trimStart + firstDuration, - name: getElementNameWithSuffix(c.name, "right"), - }, - ]; - }), - }; - }), - ); - }, - - toggleSelectedHidden: (trackId?: string, elementId?: string) => { - const { selectedElements, _tracks } = get(); - - const elementsToProcess = - trackId && elementId - ? [{ trackId, elementId }] - : selectedElements.length > 0 - ? selectedElements - : []; - - if (elementsToProcess.length === 0) return; - - get().pushHistory(); - - const shouldHide = elementsToProcess.some( - ({ trackId: tId, elementId: eId }) => { - const track = _tracks.find((t) => t.id === tId); - const element = track?.elements.find((e) => e.id === eId); - return element && !element.hidden; - }, - ); - - updateTracksAndSave( - _tracks.map((track) => ({ - ...track, - elements: track.elements.map((element) => { - const shouldUpdate = elementsToProcess.some( - ({ trackId: tId, elementId: eId }) => - track.id === tId && element.id === eId, - ); - return shouldUpdate && element.hidden !== shouldHide - ? { ...element, hidden: shouldHide } - : element; - }), - })), - ); - }, - - toggleSelectedMuted: (trackId?: string, elementId?: string) => { - const { selectedElements, _tracks } = get(); - - const elementsToProcess = - trackId && elementId - ? [{ trackId, elementId }] - : selectedElements.length > 0 - ? selectedElements - : []; - - if (elementsToProcess.length === 0) return; - - get().pushHistory(); - - const audioElements = elementsToProcess.filter( - ({ trackId: tId, elementId: eId }) => { - const track = _tracks.find((t) => t.id === tId); - const element = track?.elements.find((e) => e.id === eId); - return element?.type === "media"; - }, - ); - - if (audioElements.length === 0) return; - - const shouldMute = audioElements.some( - ({ trackId: tId, elementId: eId }) => { - const track = _tracks.find((t) => t.id === tId); - const element = track?.elements.find((e) => e.id === eId); - return element?.type === "media" && !element.muted; - }, - ); - - updateTracksAndSave( - _tracks.map((track) => ({ - ...track, - elements: track.elements.map((element) => { - const shouldUpdate = audioElements.some( - ({ trackId: tId, elementId: eId }) => - track.id === tId && element.id === eId, - ); - return shouldUpdate && - element.type === "media" && - element.muted !== shouldMute - ? { ...element, muted: shouldMute } - : element; - }), - })), - ); - }, - - duplicateElement: (trackId, elementId) => { - const { _tracks } = get(); - const track = _tracks.find((t) => t.id === trackId); - const element = track?.elements.find((e) => e.id === elementId); - if (!track || !element) return; - - const { id, ...elementWithoutId } = element; - const effectiveDuration = - element.duration - element.trimStart - element.trimEnd; - - get().addElementToTrack(trackId, { - ...elementWithoutId, - name: `${element.name} (copy)`, - startTime: element.startTime + effectiveDuration + 0.1, - } as CreateTimelineElement); - }, - - revealElementInMedia: (elementId) => { - const { - useMediaPanelStore, - } = require("../components/editor/media-panel/store"); - const { requestRevealMedia } = useMediaPanelStore.getState(); - - const { _tracks } = get(); - const element = _tracks - .flatMap((track) => track.elements) - .find((el) => el.id === elementId); - - if (element?.type === "media") { - requestRevealMedia(element.mediaId); - } - }, - - replaceElementWithFile: async (trackId, elementId, file) => { - try { - const result = await get().replaceElementMedia( - trackId, - elementId, - file, - ); - if (result.success) { - const { toast } = await import("sonner"); - toast.success("Clip replaced successfully"); - } else { - const { toast } = await import("sonner"); - toast.error(result.error || "Failed to replace clip"); - } - } catch (error) { - console.error("Unexpected error replacing clip:", error); - const { toast } = await import("sonner"); - toast.error( - `Unexpected error: ${error instanceof Error ? error.message : "Unknown error"}`, - ); - } - }, - - getContextMenuState: (trackId, elementId) => { - const { selectedElements, _tracks } = get(); - const { currentTime } = usePlaybackStore.getState(); - const { mediaFiles } = useMediaStore.getState(); - - const isMultipleSelected = selectedElements.length > 1; - const isCurrentElementSelected = selectedElements.some( - (sel) => sel.trackId === trackId && sel.elementId === elementId, - ); - - const hasAudioElements = selectedElements.some( - ({ trackId: tId, elementId: eId }) => { - const selectedTrack = _tracks.find((t) => t.id === tId); - const selectedElement = selectedTrack?.elements.find( - (e) => e.id === eId, - ); - if (selectedElement?.type !== "media") return false; - const mediaElement = selectedElement as MediaElement; - const mediaItem = mediaFiles.find( - (file: MediaFile) => file.id === mediaElement.mediaId, - ); - return mediaItem?.type === "audio" || mediaItem?.type === "video"; - }, - ); - - const canSplitSelected = selectedElements.every( - ({ trackId: tId, elementId: eId }) => { - const selectedTrack = _tracks.find((t) => t.id === tId); - const selectedElement = selectedTrack?.elements.find( - (e) => e.id === eId, - ); - if (!selectedElement) return false; - const effectiveStart = selectedElement.startTime; - const effectiveEnd = - selectedElement.startTime + - (selectedElement.duration - - selectedElement.trimStart - - selectedElement.trimEnd); - return currentTime > effectiveStart && currentTime < effectiveEnd; - }, - ); - - return { - isMultipleSelected, - isCurrentElementSelected, - hasAudioElements, - canSplitSelected, - currentTime, - }; - }, - }; -}); - -function buildTextElement( - raw: TextElement | DragData, - startTime: number, -): CreateTimelineElement { - const t = raw as Partial; - - return { - type: "text", - name: t.name ?? DEFAULT_TEXT_ELEMENT.name, - content: t.content ?? DEFAULT_TEXT_ELEMENT.content, - duration: t.duration ?? TIMELINE_CONSTANTS.DEFAULT_TEXT_DURATION, - startTime, - trimStart: 0, - trimEnd: 0, - fontSize: - typeof t.fontSize === "number" - ? t.fontSize - : DEFAULT_TEXT_ELEMENT.fontSize, - fontFamily: t.fontFamily ?? DEFAULT_TEXT_ELEMENT.fontFamily, - color: t.color ?? DEFAULT_TEXT_ELEMENT.color, - backgroundColor: t.backgroundColor ?? DEFAULT_TEXT_ELEMENT.backgroundColor, - textAlign: t.textAlign ?? DEFAULT_TEXT_ELEMENT.textAlign, - fontWeight: t.fontWeight ?? DEFAULT_TEXT_ELEMENT.fontWeight, - fontStyle: t.fontStyle ?? DEFAULT_TEXT_ELEMENT.fontStyle, - textDecoration: t.textDecoration ?? DEFAULT_TEXT_ELEMENT.textDecoration, - x: typeof t.x === "number" ? t.x : DEFAULT_TEXT_ELEMENT.x, - y: typeof t.y === "number" ? t.y : DEFAULT_TEXT_ELEMENT.y, - rotation: - typeof t.rotation === "number" - ? t.rotation - : DEFAULT_TEXT_ELEMENT.rotation, - opacity: - typeof t.opacity === "number" ? t.opacity : DEFAULT_TEXT_ELEMENT.opacity, - }; -} diff --git a/apps/web/.next/app-build-manifest.json b/apps/web/.next/app-build-manifest.json new file mode 100644 index 00000000..1b3b57dc --- /dev/null +++ b/apps/web/.next/app-build-manifest.json @@ -0,0 +1,3 @@ +{ + "pages": {} +} \ No newline at end of file diff --git a/apps/web/.next/build-manifest.json b/apps/web/.next/build-manifest.json new file mode 100644 index 00000000..428583c1 --- /dev/null +++ b/apps/web/.next/build-manifest.json @@ -0,0 +1,14 @@ +{ + "pages": { + "/_app": [] + }, + "devFiles": [], + "ampDevFiles": [], + "polyfillFiles": [], + "lowPriorityFiles": [ + "static/development/_ssgManifest.js", + "static/development/_buildManifest.js" + ], + "rootMainFiles": [], + "ampFirstPages": [] +} \ No newline at end of file diff --git a/apps/web/.next/cache/.rscinfo b/apps/web/.next/cache/.rscinfo new file mode 100644 index 00000000..2b8762f6 --- /dev/null +++ b/apps/web/.next/cache/.rscinfo @@ -0,0 +1 @@ +{"encryption.key":"qDHbHIqItmhsNnDDb1zJxgaLO9R4RpheEkUFqJlwCAc=","encryption.expire_at":1765569405530} \ No newline at end of file diff --git a/apps/web/.next/fallback-build-manifest.json b/apps/web/.next/fallback-build-manifest.json new file mode 100644 index 00000000..428583c1 --- /dev/null +++ b/apps/web/.next/fallback-build-manifest.json @@ -0,0 +1,14 @@ +{ + "pages": { + "/_app": [] + }, + "devFiles": [], + "ampDevFiles": [], + "polyfillFiles": [], + "lowPriorityFiles": [ + "static/development/_ssgManifest.js", + "static/development/_buildManifest.js" + ], + "rootMainFiles": [], + "ampFirstPages": [] +} \ No newline at end of file diff --git a/apps/web/.next/package.json b/apps/web/.next/package.json new file mode 100644 index 00000000..c9a44226 --- /dev/null +++ b/apps/web/.next/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} \ No newline at end of file diff --git a/apps/web/.next/prerender-manifest.json b/apps/web/.next/prerender-manifest.json new file mode 100644 index 00000000..80adf8dd --- /dev/null +++ b/apps/web/.next/prerender-manifest.json @@ -0,0 +1,11 @@ +{ + "version": 4, + "routes": {}, + "dynamicRoutes": {}, + "notFoundRoutes": [], + "preview": { + "previewModeId": "69359808c9a0e2ef1d49645b631e2df3", + "previewModeSigningKey": "3633002c1292b21a2ca6234134d5ac8399c49df49cb048069e9f8e2abb74e43f", + "previewModeEncryptionKey": "9ba5e3b1ce2abf798e2d8442c165a811960360c5a8cdc5fe7ebbe0df296d2d62" + } +} \ No newline at end of file diff --git a/apps/web/.next/routes-manifest.json b/apps/web/.next/routes-manifest.json new file mode 100644 index 00000000..13021bd7 --- /dev/null +++ b/apps/web/.next/routes-manifest.json @@ -0,0 +1 @@ +{"version":3,"caseSensitive":false,"basePath":"","rewrites":{"beforeFiles":[],"afterFiles":[{"source":"/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/a-4-a/c.js","destination":"https://api.vercel.com/bot-protection/v1/challenge","regex":"^\\/149e9513-01fa-4fb0-aad4-566afd725d1b\\/2d206a39-8ed7-437e-a3be-862e0f06eea3\\/a-4-a\\/c\\.js(?:\\/)?$","check":true},{"source":"/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/:path*","destination":"https://api.vercel.com/bot-protection/v1/proxy/:path*","regex":"^\\/149e9513-01fa-4fb0-aad4-566afd725d1b\\/2d206a39-8ed7-437e-a3be-862e0f06eea3(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?(?:\\/)?$","check":true}],"fallback":[]},"redirects":[{"source":"/:path+/","destination":"/:path+","permanent":true,"internal":true,"regex":"^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$"}],"headers":[{"source":"/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/:path*","headers":[{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Security-Policy","value":"frame-ancestors 'self'"}],"regex":"^\\/149e9513-01fa-4fb0-aad4-566afd725d1b\\/2d206a39-8ed7-437e-a3be-862e0f06eea3(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?(?:\\/)?$"}]} \ No newline at end of file diff --git a/apps/web/.next/server/app-paths-manifest.json b/apps/web/.next/server/app-paths-manifest.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/apps/web/.next/server/app-paths-manifest.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/apps/web/.next/server/edge/chunks/[root-of-the-server]__8bd37c4c._.js b/apps/web/.next/server/edge/chunks/[root-of-the-server]__8bd37c4c._.js new file mode 100644 index 00000000..c8f26d08 --- /dev/null +++ b/apps/web/.next/server/edge/chunks/[root-of-the-server]__8bd37c4c._.js @@ -0,0 +1,43 @@ +(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["chunks/[root-of-the-server]__8bd37c4c._.js", +"[externals]/node:buffer [external] (node:buffer, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("node:buffer", () => require("node:buffer")); + +module.exports = mod; +}), +"[externals]/node:async_hooks [external] (node:async_hooks, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("node:async_hooks", () => require("node:async_hooks")); + +module.exports = mod; +}), +"[project]/apps/web/src/middleware.ts [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "config", + ()=>config, + "middleware", + ()=>middleware +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$api$2f$server$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/api/server.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$exports$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/exports/index.js [middleware-edge] (ecmascript)"); +; +async function middleware() { + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$exports$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextResponse"].next(); +} +const config = { + matcher: [ + /* + * Match all request paths except for the ones starting with: + * - api (API routes) + * - _next/static (static files) + * - _next/image (image optimization files) + * - favicon.ico (favicon file) + */ "/((?!api|_next/static|_next/image|favicon.ico).*)" + ] +}; +}), +]); + +//# sourceMappingURL=%5Broot-of-the-server%5D__8bd37c4c._.js.map \ No newline at end of file diff --git a/apps/web/.next/server/edge/chunks/[root-of-the-server]__8bd37c4c._.js.map b/apps/web/.next/server/edge/chunks/[root-of-the-server]__8bd37c4c._.js.map new file mode 100644 index 00000000..e73baa24 --- /dev/null +++ b/apps/web/.next/server/edge/chunks/[root-of-the-server]__8bd37c4c._.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 16, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/apps/web/src/middleware.ts"],"sourcesContent":["import { NextResponse } from \"next/server\";\r\n\r\nexport async function middleware() {\r\n return NextResponse.next();\r\n}\r\n\r\nexport const config = {\r\n matcher: [\r\n /*\r\n * Match all request paths except for the ones starting with:\r\n * - api (API routes)\r\n * - _next/static (static files)\r\n * - _next/image (image optimization files)\r\n * - favicon.ico (favicon file)\r\n */\r\n \"/((?!api|_next/static|_next/image|favicon.ico).*)\",\r\n ],\r\n};\r\n"],"names":[],"mappings":";;;;;;AAAA;AAAA;;AAEO,eAAe;IACpB,OAAO,qQAAY,CAAC,IAAI;AAC1B;AAEO,MAAM,SAAS;IACpB,SAAS;QACP;;;;;;KAMC,GACD;KACD;AACH"}}] +} \ No newline at end of file diff --git a/apps/web/.next/server/edge/chunks/_886b33c3._.js b/apps/web/.next/server/edge/chunks/_886b33c3._.js new file mode 100644 index 00000000..f97d57ca --- /dev/null +++ b/apps/web/.next/server/edge/chunks/_886b33c3._.js @@ -0,0 +1,11979 @@ +(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["chunks/_886b33c3._.js", +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/globals.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "edgeInstrumentationOnRequestError", + ()=>edgeInstrumentationOnRequestError, + "ensureInstrumentationRegistered", + ()=>ensureInstrumentationRegistered, + "getEdgeInstrumentationModule", + ()=>getEdgeInstrumentationModule +]); +async function getEdgeInstrumentationModule() { + const instrumentation = '_ENTRIES' in globalThis && _ENTRIES.middleware_instrumentation && await _ENTRIES.middleware_instrumentation; + return instrumentation; +} +let instrumentationModulePromise = null; +async function registerInstrumentation() { + // Ensure registerInstrumentation is not called in production build + if (process.env.NEXT_PHASE === 'phase-production-build') return; + if (!instrumentationModulePromise) { + instrumentationModulePromise = getEdgeInstrumentationModule(); + } + const instrumentation = await instrumentationModulePromise; + if (instrumentation == null ? void 0 : instrumentation.register) { + try { + await instrumentation.register(); + } catch (err) { + err.message = `An error occurred while loading instrumentation hook: ${err.message}`; + throw err; + } + } +} +async function edgeInstrumentationOnRequestError(...args) { + const instrumentation = await getEdgeInstrumentationModule(); + try { + var _instrumentation_onRequestError; + await (instrumentation == null ? void 0 : (_instrumentation_onRequestError = instrumentation.onRequestError) == null ? void 0 : _instrumentation_onRequestError.call(instrumentation, ...args)); + } catch (err) { + // Log the soft error and continue, since the original error has already been thrown + console.error('Error in instrumentation.onRequestError:', err); + } +} +let registerInstrumentationPromise = null; +function ensureInstrumentationRegistered() { + if (!registerInstrumentationPromise) { + registerInstrumentationPromise = registerInstrumentation(); + } + return registerInstrumentationPromise; +} +function getUnsupportedModuleErrorMessage(module) { + // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found + return `The edge runtime does not support Node.js '${module}' module. +Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`; +} +function __import_unsupported(moduleName) { + const proxy = new Proxy(function() {}, { + get (_obj, prop) { + if (prop === 'then') { + return {}; + } + throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + }, + construct () { + throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + }, + apply (_target, _this, args) { + if (typeof args[0] === 'function') { + return args[0](proxy); + } + throw Object.defineProperty(new Error(getUnsupportedModuleErrorMessage(moduleName)), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + } + }); + return new Proxy({}, { + get: ()=>proxy + }); +} +function enhanceGlobals() { + if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable + ; + // The condition is true when the "process" module is provided + if (process !== /*TURBOPACK member replacement*/ __turbopack_context__.g.process) { + // prefer local process but global.process has correct "env" + process.env = /*TURBOPACK member replacement*/ __turbopack_context__.g.process.env; + /*TURBOPACK member replacement*/ __turbopack_context__.g.process = process; + } + // to allow building code that import but does not use node.js modules, + // webpack will expect this function to exist in global scope + try { + Object.defineProperty(globalThis, '__import_unsupported', { + value: __import_unsupported, + enumerable: false, + configurable: false + }); + } catch {} + // Eagerly fire instrumentation hook to make the startup faster. + void ensureInstrumentationRegistered(); +} +enhanceGlobals(); //# sourceMappingURL=globals.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/error.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "PageSignatureError", + ()=>PageSignatureError, + "RemovedPageError", + ()=>RemovedPageError, + "RemovedUAError", + ()=>RemovedUAError +]); +class PageSignatureError extends Error { + constructor({ page }){ + super(`The middleware "${page}" accepts an async API directly with the form: + + export function middleware(request, event) { + return NextResponse.redirect('/new-location') + } + + Read more: https://nextjs.org/docs/messages/middleware-new-signature + `); + } +} +class RemovedPageError extends Error { + constructor(){ + super(`The request.page has been deprecated in favour of \`URLPattern\`. + Read more: https://nextjs.org/docs/messages/middleware-request-page + `); + } +} +class RemovedUAError extends Error { + constructor(){ + super(`The request.ua has been removed in favour of \`userAgent\` function. + Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent + `); + } +} //# sourceMappingURL=error.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/constants.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "ACTION_SUFFIX", + ()=>ACTION_SUFFIX, + "APP_DIR_ALIAS", + ()=>APP_DIR_ALIAS, + "CACHE_ONE_YEAR", + ()=>CACHE_ONE_YEAR, + "DOT_NEXT_ALIAS", + ()=>DOT_NEXT_ALIAS, + "ESLINT_DEFAULT_DIRS", + ()=>ESLINT_DEFAULT_DIRS, + "GSP_NO_RETURNED_VALUE", + ()=>GSP_NO_RETURNED_VALUE, + "GSSP_COMPONENT_MEMBER_ERROR", + ()=>GSSP_COMPONENT_MEMBER_ERROR, + "GSSP_NO_RETURNED_VALUE", + ()=>GSSP_NO_RETURNED_VALUE, + "HTML_CONTENT_TYPE_HEADER", + ()=>HTML_CONTENT_TYPE_HEADER, + "INFINITE_CACHE", + ()=>INFINITE_CACHE, + "INSTRUMENTATION_HOOK_FILENAME", + ()=>INSTRUMENTATION_HOOK_FILENAME, + "JSON_CONTENT_TYPE_HEADER", + ()=>JSON_CONTENT_TYPE_HEADER, + "MATCHED_PATH_HEADER", + ()=>MATCHED_PATH_HEADER, + "MIDDLEWARE_FILENAME", + ()=>MIDDLEWARE_FILENAME, + "MIDDLEWARE_LOCATION_REGEXP", + ()=>MIDDLEWARE_LOCATION_REGEXP, + "NEXT_BODY_SUFFIX", + ()=>NEXT_BODY_SUFFIX, + "NEXT_CACHE_IMPLICIT_TAG_ID", + ()=>NEXT_CACHE_IMPLICIT_TAG_ID, + "NEXT_CACHE_REVALIDATED_TAGS_HEADER", + ()=>NEXT_CACHE_REVALIDATED_TAGS_HEADER, + "NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER", + ()=>NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER, + "NEXT_CACHE_SOFT_TAG_MAX_LENGTH", + ()=>NEXT_CACHE_SOFT_TAG_MAX_LENGTH, + "NEXT_CACHE_TAGS_HEADER", + ()=>NEXT_CACHE_TAGS_HEADER, + "NEXT_CACHE_TAG_MAX_ITEMS", + ()=>NEXT_CACHE_TAG_MAX_ITEMS, + "NEXT_CACHE_TAG_MAX_LENGTH", + ()=>NEXT_CACHE_TAG_MAX_LENGTH, + "NEXT_DATA_SUFFIX", + ()=>NEXT_DATA_SUFFIX, + "NEXT_INTERCEPTION_MARKER_PREFIX", + ()=>NEXT_INTERCEPTION_MARKER_PREFIX, + "NEXT_META_SUFFIX", + ()=>NEXT_META_SUFFIX, + "NEXT_QUERY_PARAM_PREFIX", + ()=>NEXT_QUERY_PARAM_PREFIX, + "NEXT_RESUME_HEADER", + ()=>NEXT_RESUME_HEADER, + "NON_STANDARD_NODE_ENV", + ()=>NON_STANDARD_NODE_ENV, + "PAGES_DIR_ALIAS", + ()=>PAGES_DIR_ALIAS, + "PRERENDER_REVALIDATE_HEADER", + ()=>PRERENDER_REVALIDATE_HEADER, + "PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER", + ()=>PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER, + "PUBLIC_DIR_MIDDLEWARE_CONFLICT", + ()=>PUBLIC_DIR_MIDDLEWARE_CONFLICT, + "ROOT_DIR_ALIAS", + ()=>ROOT_DIR_ALIAS, + "RSC_ACTION_CLIENT_WRAPPER_ALIAS", + ()=>RSC_ACTION_CLIENT_WRAPPER_ALIAS, + "RSC_ACTION_ENCRYPTION_ALIAS", + ()=>RSC_ACTION_ENCRYPTION_ALIAS, + "RSC_ACTION_PROXY_ALIAS", + ()=>RSC_ACTION_PROXY_ALIAS, + "RSC_ACTION_VALIDATE_ALIAS", + ()=>RSC_ACTION_VALIDATE_ALIAS, + "RSC_CACHE_WRAPPER_ALIAS", + ()=>RSC_CACHE_WRAPPER_ALIAS, + "RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS", + ()=>RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS, + "RSC_MOD_REF_PROXY_ALIAS", + ()=>RSC_MOD_REF_PROXY_ALIAS, + "RSC_PREFETCH_SUFFIX", + ()=>RSC_PREFETCH_SUFFIX, + "RSC_SEGMENTS_DIR_SUFFIX", + ()=>RSC_SEGMENTS_DIR_SUFFIX, + "RSC_SEGMENT_SUFFIX", + ()=>RSC_SEGMENT_SUFFIX, + "RSC_SUFFIX", + ()=>RSC_SUFFIX, + "SERVER_PROPS_EXPORT_ERROR", + ()=>SERVER_PROPS_EXPORT_ERROR, + "SERVER_PROPS_GET_INIT_PROPS_CONFLICT", + ()=>SERVER_PROPS_GET_INIT_PROPS_CONFLICT, + "SERVER_PROPS_SSG_CONFLICT", + ()=>SERVER_PROPS_SSG_CONFLICT, + "SERVER_RUNTIME", + ()=>SERVER_RUNTIME, + "SSG_FALLBACK_EXPORT_ERROR", + ()=>SSG_FALLBACK_EXPORT_ERROR, + "SSG_GET_INITIAL_PROPS_CONFLICT", + ()=>SSG_GET_INITIAL_PROPS_CONFLICT, + "STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR", + ()=>STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR, + "TEXT_PLAIN_CONTENT_TYPE_HEADER", + ()=>TEXT_PLAIN_CONTENT_TYPE_HEADER, + "UNSTABLE_REVALIDATE_RENAME_ERROR", + ()=>UNSTABLE_REVALIDATE_RENAME_ERROR, + "WEBPACK_LAYERS", + ()=>WEBPACK_LAYERS, + "WEBPACK_RESOURCE_QUERIES", + ()=>WEBPACK_RESOURCE_QUERIES +]); +const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; +const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; +const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; +const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; +const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; +const MATCHED_PATH_HEADER = 'x-matched-path'; +const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; +const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; +const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; +const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; +const RSC_SEGMENT_SUFFIX = '.segment.rsc'; +const RSC_SUFFIX = '.rsc'; +const ACTION_SUFFIX = '.action'; +const NEXT_DATA_SUFFIX = '.json'; +const NEXT_META_SUFFIX = '.meta'; +const NEXT_BODY_SUFFIX = '.body'; +const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; +const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; +const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; +const NEXT_RESUME_HEADER = 'next-resume'; +const NEXT_CACHE_TAG_MAX_ITEMS = 128; +const NEXT_CACHE_TAG_MAX_LENGTH = 256; +const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; +const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; +const CACHE_ONE_YEAR = 31536000; +const INFINITE_CACHE = 0xfffffffe; +const MIDDLEWARE_FILENAME = 'middleware'; +const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`; +const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; +const PAGES_DIR_ALIAS = 'private-next-pages'; +const DOT_NEXT_ALIAS = 'private-dot-next'; +const ROOT_DIR_ALIAS = 'private-next-root-dir'; +const APP_DIR_ALIAS = 'private-next-app-dir'; +const RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy'; +const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; +const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; +const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; +const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; +const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; +const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; +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`; +const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`; +const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`; +const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`; +const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`; +const SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`; +const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; +const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; +const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.'; +const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`; +const NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`; +const SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`; +const ESLINT_DEFAULT_DIRS = [ + 'app', + 'pages', + 'components', + 'lib', + 'src' +]; +const SERVER_RUNTIME = { + edge: 'edge', + experimentalEdge: 'experimental-edge', + nodejs: 'nodejs' +}; +/** + * The names of the webpack layers. These layers are the primitives for the + * webpack chunks. + */ const WEBPACK_LAYERS_NAMES = { + /** + * The layer for the shared code between the client and server bundles. + */ shared: 'shared', + /** + * The layer for server-only runtime and picking up `react-server` export conditions. + * Including app router RSC pages and app router custom routes and metadata routes. + */ reactServerComponents: 'rsc', + /** + * Server Side Rendering layer for app (ssr). + */ serverSideRendering: 'ssr', + /** + * The browser client bundle layer for actions. + */ actionBrowser: 'action-browser', + /** + * The Node.js bundle layer for the API routes. + */ apiNode: 'api-node', + /** + * The Edge Lite bundle layer for the API routes. + */ apiEdge: 'api-edge', + /** + * The layer for the middleware code. + */ middleware: 'middleware', + /** + * The layer for the instrumentation hooks. + */ instrument: 'instrument', + /** + * The layer for assets on the edge. + */ edgeAsset: 'edge-asset', + /** + * The browser client bundle layer for App directory. + */ appPagesBrowser: 'app-pages-browser', + /** + * The browser client bundle layer for Pages directory. + */ pagesDirBrowser: 'pages-dir-browser', + /** + * The Edge Lite bundle layer for Pages directory. + */ pagesDirEdge: 'pages-dir-edge', + /** + * The Node.js bundle layer for Pages directory. + */ pagesDirNode: 'pages-dir-node' +}; +const WEBPACK_LAYERS = { + ...WEBPACK_LAYERS_NAMES, + GROUP: { + builtinReact: [ + WEBPACK_LAYERS_NAMES.reactServerComponents, + WEBPACK_LAYERS_NAMES.actionBrowser + ], + serverOnly: [ + WEBPACK_LAYERS_NAMES.reactServerComponents, + WEBPACK_LAYERS_NAMES.actionBrowser, + WEBPACK_LAYERS_NAMES.instrument, + WEBPACK_LAYERS_NAMES.middleware + ], + neutralTarget: [ + // pages api + WEBPACK_LAYERS_NAMES.apiNode, + WEBPACK_LAYERS_NAMES.apiEdge + ], + clientOnly: [ + WEBPACK_LAYERS_NAMES.serverSideRendering, + WEBPACK_LAYERS_NAMES.appPagesBrowser + ], + bundled: [ + WEBPACK_LAYERS_NAMES.reactServerComponents, + WEBPACK_LAYERS_NAMES.actionBrowser, + WEBPACK_LAYERS_NAMES.serverSideRendering, + WEBPACK_LAYERS_NAMES.appPagesBrowser, + WEBPACK_LAYERS_NAMES.shared, + WEBPACK_LAYERS_NAMES.instrument, + WEBPACK_LAYERS_NAMES.middleware + ], + appPages: [ + // app router pages and layouts + WEBPACK_LAYERS_NAMES.reactServerComponents, + WEBPACK_LAYERS_NAMES.serverSideRendering, + WEBPACK_LAYERS_NAMES.appPagesBrowser, + WEBPACK_LAYERS_NAMES.actionBrowser + ] + } +}; +const WEBPACK_RESOURCE_QUERIES = { + edgeSSREntry: '__next_edge_ssr_entry__', + metadata: '__next_metadata__', + metadataRoute: '__next_metadata_route__', + metadataImageMeta: '__next_metadata_image_meta__' +}; +; + //# sourceMappingURL=constants.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/utils.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "fromNodeOutgoingHttpHeaders", + ()=>fromNodeOutgoingHttpHeaders, + "normalizeNextQueryParam", + ()=>normalizeNextQueryParam, + "splitCookiesString", + ()=>splitCookiesString, + "toNodeOutgoingHttpHeaders", + ()=>toNodeOutgoingHttpHeaders, + "validateURL", + ()=>validateURL +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/constants.js [middleware-edge] (ecmascript)"); +; +function fromNodeOutgoingHttpHeaders(nodeHeaders) { + const headers = new Headers(); + for (let [key, value] of Object.entries(nodeHeaders)){ + const values = Array.isArray(value) ? value : [ + value + ]; + for (let v of values){ + if (typeof v === 'undefined') continue; + if (typeof v === 'number') { + v = v.toString(); + } + headers.append(key, v); + } + } + return headers; +} +function splitCookiesString(cookiesString) { + var cookiesStrings = []; + var pos = 0; + var start; + var ch; + var lastComma; + var nextStart; + var cookiesSeparatorFound; + function skipWhitespace() { + while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ + pos += 1; + } + return pos < cookiesString.length; + } + function notSpecialChar() { + ch = cookiesString.charAt(pos); + return ch !== '=' && ch !== ';' && ch !== ','; + } + while(pos < cookiesString.length){ + start = pos; + cookiesSeparatorFound = false; + while(skipWhitespace()){ + ch = cookiesString.charAt(pos); + if (ch === ',') { + // ',' is a cookie separator if we have later first '=', not ';' or ',' + lastComma = pos; + pos += 1; + skipWhitespace(); + nextStart = pos; + while(pos < cookiesString.length && notSpecialChar()){ + pos += 1; + } + // currently special character + if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') { + // we found cookies separator + cookiesSeparatorFound = true; + // pos is inside the next cookie, so back up and return it. + pos = nextStart; + cookiesStrings.push(cookiesString.substring(start, lastComma)); + start = pos; + } else { + // in param ',' or param separator ';', + // we continue from that comma + pos = lastComma + 1; + } + } else { + pos += 1; + } + } + if (!cookiesSeparatorFound || pos >= cookiesString.length) { + cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); + } + } + return cookiesStrings; +} +function toNodeOutgoingHttpHeaders(headers) { + const nodeHeaders = {}; + const cookies = []; + if (headers) { + for (const [key, value] of headers.entries()){ + if (key.toLowerCase() === 'set-cookie') { + // We may have gotten a comma joined string of cookies, or multiple + // set-cookie headers. We need to merge them into one header array + // to represent all the cookies. + cookies.push(...splitCookiesString(value)); + nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies; + } else { + nodeHeaders[key] = value; + } + } + } + return nodeHeaders; +} +function validateURL(url) { + try { + return String(new URL(String(url))); + } catch (error) { + throw Object.defineProperty(new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { + cause: error + }), "__NEXT_ERROR_CODE", { + value: "E61", + enumerable: false, + configurable: true + }); + } +} +function normalizeNextQueryParam(key) { + const prefixes = [ + __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_QUERY_PARAM_PREFIX"], + __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_INTERCEPTION_MARKER_PREFIX"] + ]; + for (const prefix of prefixes){ + if (key !== prefix && key.startsWith(prefix)) { + return key.substring(prefix.length); + } + } + return null; +} //# sourceMappingURL=utils.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "NextFetchEvent", + ()=>NextFetchEvent, + "getWaitUntilPromiseFromEvent", + ()=>getWaitUntilPromiseFromEvent +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/error.js [middleware-edge] (ecmascript)"); +; +const responseSymbol = Symbol('response'); +const passThroughSymbol = Symbol('passThrough'); +const waitUntilSymbol = Symbol('waitUntil'); +class FetchEvent { + constructor(_request, waitUntil){ + this[passThroughSymbol] = false; + this[waitUntilSymbol] = waitUntil ? { + kind: 'external', + function: waitUntil + } : { + kind: 'internal', + promises: [] + }; + } + // TODO: is this dead code? NextFetchEvent never lets this get called + respondWith(response) { + if (!this[responseSymbol]) { + this[responseSymbol] = Promise.resolve(response); + } + } + // TODO: is this dead code? passThroughSymbol is unused + passThroughOnException() { + this[passThroughSymbol] = true; + } + waitUntil(promise) { + if (this[waitUntilSymbol].kind === 'external') { + // if we received an external waitUntil, we delegate to it + // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox` + const waitUntil = this[waitUntilSymbol].function; + return waitUntil(promise); + } else { + // if we didn't receive an external waitUntil, we make it work on our own + // (and expect the caller to do something with the promises) + this[waitUntilSymbol].promises.push(promise); + } + } +} +function getWaitUntilPromiseFromEvent(event) { + return event[waitUntilSymbol].kind === 'internal' ? Promise.all(event[waitUntilSymbol].promises).then(()=>{}) : undefined; +} +class NextFetchEvent extends FetchEvent { + constructor(params){ + var _params_context; + super(params.request, (_params_context = params.context) == null ? void 0 : _params_context.waitUntil); + this.sourcePage = params.page; + } + /** + * @deprecated The `request` is now the first parameter and the API is now async. + * + * Read more: https://nextjs.org/docs/messages/middleware-new-signature + */ get request() { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["PageSignatureError"]({ + page: this.sourcePage + }), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + } + /** + * @deprecated Using `respondWith` is no longer needed. + * + * Read more: https://nextjs.org/docs/messages/middleware-new-signature + */ respondWith() { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["PageSignatureError"]({ + page: this.sourcePage + }), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + } +} //# sourceMappingURL=fetch-event.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "detectDomainLocale", + ()=>detectDomainLocale +]); +function detectDomainLocale(domainItems, hostname, detectedLocale) { + if (!domainItems) return; + if (detectedLocale) { + detectedLocale = detectedLocale.toLowerCase(); + } + for (const item of domainItems){ + var _item_domain, _item_locales; + // remove port if present + const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(':', 1)[0].toLowerCase(); + if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) { + return item; + } + } +} //# sourceMappingURL=detect-domain-locale.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Removes the trailing slash for a given route or page path. Preserves the + * root page. Examples: + * - `/foo/bar/` -> `/foo/bar` + * - `/foo/bar` -> `/foo/bar` + * - `/` -> `/` + */ __turbopack_context__.s([ + "removeTrailingSlash", + ()=>removeTrailingSlash +]); +function removeTrailingSlash(route) { + return route.replace(/\/$/, '') || '/'; +} //# sourceMappingURL=remove-trailing-slash.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Given a path this function will find the pathname, query and hash and return + * them. This is useful to parse full paths on the client side. + * @param path A path to parse e.g. /foo/bar?id=1#hash + */ __turbopack_context__.s([ + "parsePath", + ()=>parsePath +]); +function parsePath(path) { + const hashIndex = path.indexOf('#'); + const queryIndex = path.indexOf('?'); + const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex); + if (hasQuery || hashIndex > -1) { + return { + pathname: path.substring(0, hasQuery ? queryIndex : hashIndex), + query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '', + hash: hashIndex > -1 ? path.slice(hashIndex) : '' + }; + } + return { + pathname: path, + query: '', + hash: '' + }; +} //# sourceMappingURL=parse-path.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "addPathPrefix", + ()=>addPathPrefix +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$parse$2d$path$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js [middleware-edge] (ecmascript)"); +; +function addPathPrefix(path, prefix) { + if (!path.startsWith('/') || !prefix) { + return path; + } + const { pathname, query, hash } = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$parse$2d$path$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["parsePath"])(path); + return "" + prefix + pathname + query + hash; +} //# sourceMappingURL=add-path-prefix.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "addPathSuffix", + ()=>addPathSuffix +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$parse$2d$path$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js [middleware-edge] (ecmascript)"); +; +function addPathSuffix(path, suffix) { + if (!path.startsWith('/') || !suffix) { + return path; + } + const { pathname, query, hash } = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$parse$2d$path$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["parsePath"])(path); + return "" + pathname + suffix + query + hash; +} //# sourceMappingURL=add-path-suffix.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "pathHasPrefix", + ()=>pathHasPrefix +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$parse$2d$path$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js [middleware-edge] (ecmascript)"); +; +function pathHasPrefix(path, prefix) { + if (typeof path !== 'string') { + return false; + } + const { pathname } = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$parse$2d$path$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["parsePath"])(path); + return pathname === prefix || pathname.startsWith(prefix + '/'); +} //# sourceMappingURL=path-has-prefix.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "addLocale", + ()=>addLocale +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$path$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$path$2d$has$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js [middleware-edge] (ecmascript)"); +; +; +function addLocale(path, locale, defaultLocale, ignorePrefix) { + // If no locale was given or the locale is the default locale, we don't need + // to prefix the path. + if (!locale || locale === defaultLocale) return path; + const lower = path.toLowerCase(); + // If the path is an API path or the path already has the locale prefix, we + // don't need to prefix the path. + if (!ignorePrefix) { + if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$path$2d$has$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["pathHasPrefix"])(lower, '/api')) return path; + if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$path$2d$has$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["pathHasPrefix"])(lower, "/" + locale.toLowerCase())) return path; + } + // Add the locale prefix to the path. + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$path$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["addPathPrefix"])(path, "/" + locale); +} //# sourceMappingURL=add-locale.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "formatNextPathnameInfo", + ()=>formatNextPathnameInfo +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$remove$2d$trailing$2d$slash$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$path$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$path$2d$suffix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$locale$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js [middleware-edge] (ecmascript)"); +; +; +; +; +function formatNextPathnameInfo(info) { + let pathname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$locale$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["addLocale"])(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix); + if (info.buildId || !info.trailingSlash) { + pathname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$remove$2d$trailing$2d$slash$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["removeTrailingSlash"])(pathname); + } + if (info.buildId) { + pathname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$path$2d$suffix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["addPathSuffix"])((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$path$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["addPathPrefix"])(pathname, "/_next/data/" + info.buildId), info.pathname === '/' ? 'index.json' : '.json'); + } + pathname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$path$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["addPathPrefix"])(pathname, info.basePath); + return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$add$2d$path$2d$suffix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["addPathSuffix"])(pathname, '/') : pathname : (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$remove$2d$trailing$2d$slash$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["removeTrailingSlash"])(pathname); +} //# sourceMappingURL=format-next-pathname-info.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/get-hostname.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Takes an object with a hostname property (like a parsed URL) and some + * headers that may contain Host and returns the preferred hostname. + * @param parsed An object containing a hostname property. + * @param headers A dictionary with headers containing a `host`. + */ __turbopack_context__.s([ + "getHostname", + ()=>getHostname +]); +function getHostname(parsed, headers) { + // Get the hostname from the headers if it exists, otherwise use the parsed + // hostname. + let hostname; + if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) { + hostname = headers.host.toString().split(':', 1)[0]; + } else if (parsed.hostname) { + hostname = parsed.hostname; + } else return; + return hostname.toLowerCase(); +} //# sourceMappingURL=get-hostname.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * A cache of lowercased locales for each list of locales. This is stored as a + * WeakMap so if the locales are garbage collected, the cache entry will be + * removed as well. + */ __turbopack_context__.s([ + "normalizeLocalePath", + ()=>normalizeLocalePath +]); +const cache = new WeakMap(); +function normalizeLocalePath(pathname, locales) { + // If locales is undefined, return the pathname as is. + if (!locales) return { + pathname + }; + // Get the cached lowercased locales or create a new cache entry. + let lowercasedLocales = cache.get(locales); + if (!lowercasedLocales) { + lowercasedLocales = locales.map((locale)=>locale.toLowerCase()); + cache.set(locales, lowercasedLocales); + } + let detectedLocale; + // The first segment will be empty, because it has a leading `/`. If + // there is no further segment, there is no locale (or it's the default). + const segments = pathname.split('/', 2); + // If there's no second segment (ie, the pathname is just `/`), there's no + // locale. + if (!segments[1]) return { + pathname + }; + // The second segment will contain the locale part if any. + const segment = segments[1].toLowerCase(); + // See if the segment matches one of the locales. If it doesn't, there is + // no locale (or it's the default). + const index = lowercasedLocales.indexOf(segment); + if (index < 0) return { + pathname + }; + // Return the case-sensitive locale. + detectedLocale = locales[index]; + // Remove the `/${locale}` part of the pathname. + pathname = pathname.slice(detectedLocale.length + 1) || '/'; + return { + pathname, + detectedLocale + }; +} //# sourceMappingURL=normalize-locale-path.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "removePathPrefix", + ()=>removePathPrefix +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$path$2d$has$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js [middleware-edge] (ecmascript)"); +; +function removePathPrefix(path, prefix) { + // If the path doesn't start with the prefix we can return it as is. This + // protects us from situations where the prefix is a substring of the path + // prefix such as: + // + // For prefix: /blog + // + // /blog -> true + // /blog/ -> true + // /blog/1 -> true + // /blogging -> false + // /blogging/ -> false + // /blogging/1 -> false + if (!(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$path$2d$has$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["pathHasPrefix"])(path, prefix)) { + return path; + } + // Remove the prefix from the path via slicing. + const withoutPrefix = path.slice(prefix.length); + // If the path without the prefix starts with a `/` we can return it as is. + if (withoutPrefix.startsWith('/')) { + return withoutPrefix; + } + // If the path without the prefix doesn't start with a `/` we need to add it + // back to the path to make sure it's a valid path. + return "/" + withoutPrefix; +} //# sourceMappingURL=remove-path-prefix.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "getNextPathnameInfo", + ()=>getNextPathnameInfo +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$i18n$2f$normalize$2d$locale$2d$path$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$remove$2d$path$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$path$2d$has$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js [middleware-edge] (ecmascript)"); +; +; +; +function getNextPathnameInfo(pathname, options) { + var _options_nextConfig; + const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {}; + const info = { + pathname, + trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash + }; + if (basePath && (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$path$2d$has$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["pathHasPrefix"])(info.pathname, basePath)) { + info.pathname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$remove$2d$path$2d$prefix$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["removePathPrefix"])(info.pathname, basePath); + info.basePath = basePath; + } + let pathnameNoDataPrefix = info.pathname; + if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) { + const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/'); + const buildId = paths[0]; + info.buildId = buildId; + pathnameNoDataPrefix = paths[1] !== 'index' ? "/" + paths.slice(1).join('/') : '/'; + // update pathname with normalized if enabled although + // we use normalized to populate locale info still + if (options.parseData === true) { + info.pathname = pathnameNoDataPrefix; + } + } + // If provided, use the locale route normalizer to detect the locale instead + // of the function below. + if (i18n) { + let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$i18n$2f$normalize$2d$locale$2d$path$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["normalizeLocalePath"])(info.pathname, i18n.locales); + info.locale = result.detectedLocale; + var _result_pathname; + info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname; + if (!result.detectedLocale && info.buildId) { + result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$i18n$2f$normalize$2d$locale$2d$path$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["normalizeLocalePath"])(pathnameNoDataPrefix, i18n.locales); + if (result.detectedLocale) { + info.locale = result.detectedLocale; + } + } + } + return info; +} //# sourceMappingURL=get-next-pathname-info.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/next-url.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "NextURL", + ()=>NextURL +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$i18n$2f$detect$2d$domain$2d$locale$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$format$2d$next$2d$pathname$2d$info$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$get$2d$hostname$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/get-hostname.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$get$2d$next$2d$pathname$2d$info$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js [middleware-edge] (ecmascript)"); +; +; +; +; +const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; +function parseURL(url, base) { + return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); +} +const Internal = Symbol('NextURLInternal'); +class NextURL { + constructor(input, baseOrOpts, opts){ + let base; + let options; + if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { + base = baseOrOpts; + options = opts || {}; + } else { + options = opts || baseOrOpts || {}; + } + this[Internal] = { + url: parseURL(input, base ?? options.base), + options: options, + basePath: '' + }; + this.analyze(); + } + analyze() { + var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; + const info = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$get$2d$next$2d$pathname$2d$info$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getNextPathnameInfo"])(this[Internal].url.pathname, { + nextConfig: this[Internal].options.nextConfig, + parseData: !("TURBOPACK compile-time value", void 0), + i18nProvider: this[Internal].options.i18nProvider + }); + const hostname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$get$2d$hostname$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getHostname"])(this[Internal].url, this[Internal].options.headers); + this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$i18n$2f$detect$2d$domain$2d$locale$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["detectDomainLocale"])((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname); + const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale); + this[Internal].url.pathname = info.pathname; + this[Internal].defaultLocale = defaultLocale; + this[Internal].basePath = info.basePath ?? ''; + this[Internal].buildId = info.buildId; + this[Internal].locale = info.locale ?? defaultLocale; + this[Internal].trailingSlash = info.trailingSlash; + } + formatPathname() { + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$format$2d$next$2d$pathname$2d$info$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["formatNextPathnameInfo"])({ + basePath: this[Internal].basePath, + buildId: this[Internal].buildId, + defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, + locale: this[Internal].locale, + pathname: this[Internal].url.pathname, + trailingSlash: this[Internal].trailingSlash + }); + } + formatSearch() { + return this[Internal].url.search; + } + get buildId() { + return this[Internal].buildId; + } + set buildId(buildId) { + this[Internal].buildId = buildId; + } + get locale() { + return this[Internal].locale ?? ''; + } + set locale(locale) { + var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; + if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) { + throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { + value: "E597", + enumerable: false, + configurable: true + }); + } + this[Internal].locale = locale; + } + get defaultLocale() { + return this[Internal].defaultLocale; + } + get domainLocale() { + return this[Internal].domainLocale; + } + get searchParams() { + return this[Internal].url.searchParams; + } + get host() { + return this[Internal].url.host; + } + set host(value) { + this[Internal].url.host = value; + } + get hostname() { + return this[Internal].url.hostname; + } + set hostname(value) { + this[Internal].url.hostname = value; + } + get port() { + return this[Internal].url.port; + } + set port(value) { + this[Internal].url.port = value; + } + get protocol() { + return this[Internal].url.protocol; + } + set protocol(value) { + this[Internal].url.protocol = value; + } + get href() { + const pathname = this.formatPathname(); + const search = this.formatSearch(); + return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; + } + set href(url) { + this[Internal].url = parseURL(url); + this.analyze(); + } + get origin() { + return this[Internal].url.origin; + } + get pathname() { + return this[Internal].url.pathname; + } + set pathname(value) { + this[Internal].url.pathname = value; + } + get hash() { + return this[Internal].url.hash; + } + set hash(value) { + this[Internal].url.hash = value; + } + get search() { + return this[Internal].url.search; + } + set search(value) { + this[Internal].url.search = value; + } + get password() { + return this[Internal].url.password; + } + set password(value) { + this[Internal].url.password = value; + } + get username() { + return this[Internal].url.username; + } + set username(value) { + this[Internal].url.username = value; + } + get basePath() { + return this[Internal].basePath; + } + set basePath(value) { + this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; + } + toString() { + return this.href; + } + toJSON() { + return this.href; + } + [Symbol.for('edge-runtime.inspect.custom')]() { + return { + href: this.href, + origin: this.origin, + protocol: this.protocol, + username: this.username, + password: this.password, + host: this.host, + hostname: this.hostname, + port: this.port, + pathname: this.pathname, + search: this.search, + searchParams: this.searchParams, + hash: this.hash + }; + } + clone() { + return new NextURL(String(this), this[Internal].options); + } +} //# sourceMappingURL=next-url.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all)=>{ + for(var name in all)__defProp(target, name, { + get: all[name], + enumerable: true + }); +}; +var __copyProps = (to, from, except, desc)=>{ + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from))if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { + get: ()=>from[key], + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable + }); + } + return to; +}; +var __toCommonJS = (mod)=>__copyProps(__defProp({}, "__esModule", { + value: true + }), mod); +// src/index.ts +var src_exports = {}; +__export(src_exports, { + RequestCookies: ()=>RequestCookies, + ResponseCookies: ()=>ResponseCookies, + parseCookie: ()=>parseCookie, + parseSetCookie: ()=>parseSetCookie, + stringifyCookie: ()=>stringifyCookie +}); +module.exports = __toCommonJS(src_exports); +// src/serialize.ts +function stringifyCookie(c) { + var _a; + const attrs = [ + "path" in c && c.path && `Path=${c.path}`, + "expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`, + "maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`, + "domain" in c && c.domain && `Domain=${c.domain}`, + "secure" in c && c.secure && "Secure", + "httpOnly" in c && c.httpOnly && "HttpOnly", + "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`, + "partitioned" in c && c.partitioned && "Partitioned", + "priority" in c && c.priority && `Priority=${c.priority}` + ].filter(Boolean); + const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`; + return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`; +} +function parseCookie(cookie) { + const map = /* @__PURE__ */ new Map(); + for (const pair of cookie.split(/; */)){ + if (!pair) continue; + const splitAt = pair.indexOf("="); + if (splitAt === -1) { + map.set(pair, "true"); + continue; + } + const [key, value] = [ + pair.slice(0, splitAt), + pair.slice(splitAt + 1) + ]; + try { + map.set(key, decodeURIComponent(value != null ? value : "true")); + } catch {} + } + return map; +} +function parseSetCookie(setCookie) { + if (!setCookie) { + return void 0; + } + const [[name, value], ...attributes] = parseCookie(setCookie); + const { domain, expires, httponly, maxage, path, samesite, secure, partitioned, priority } = Object.fromEntries(attributes.map(([key, value2])=>[ + key.toLowerCase().replace(/-/g, ""), + value2 + ])); + const cookie = { + name, + value: decodeURIComponent(value), + domain, + ...expires && { + expires: new Date(expires) + }, + ...httponly && { + httpOnly: true + }, + ...typeof maxage === "string" && { + maxAge: Number(maxage) + }, + path, + ...samesite && { + sameSite: parseSameSite(samesite) + }, + ...secure && { + secure: true + }, + ...priority && { + priority: parsePriority(priority) + }, + ...partitioned && { + partitioned: true + } + }; + return compact(cookie); +} +function compact(t) { + const newT = {}; + for(const key in t){ + if (t[key]) { + newT[key] = t[key]; + } + } + return newT; +} +var SAME_SITE = [ + "strict", + "lax", + "none" +]; +function parseSameSite(string) { + string = string.toLowerCase(); + return SAME_SITE.includes(string) ? string : void 0; +} +var PRIORITY = [ + "low", + "medium", + "high" +]; +function parsePriority(string) { + string = string.toLowerCase(); + return PRIORITY.includes(string) ? string : void 0; +} +function splitCookiesString(cookiesString) { + if (!cookiesString) return []; + var cookiesStrings = []; + var pos = 0; + var start; + var ch; + var lastComma; + var nextStart; + var cookiesSeparatorFound; + function skipWhitespace() { + while(pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))){ + pos += 1; + } + return pos < cookiesString.length; + } + function notSpecialChar() { + ch = cookiesString.charAt(pos); + return ch !== "=" && ch !== ";" && ch !== ","; + } + while(pos < cookiesString.length){ + start = pos; + cookiesSeparatorFound = false; + while(skipWhitespace()){ + ch = cookiesString.charAt(pos); + if (ch === ",") { + lastComma = pos; + pos += 1; + skipWhitespace(); + nextStart = pos; + while(pos < cookiesString.length && notSpecialChar()){ + pos += 1; + } + if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { + cookiesSeparatorFound = true; + pos = nextStart; + cookiesStrings.push(cookiesString.substring(start, lastComma)); + start = pos; + } else { + pos = lastComma + 1; + } + } else { + pos += 1; + } + } + if (!cookiesSeparatorFound || pos >= cookiesString.length) { + cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); + } + } + return cookiesStrings; +} +// src/request-cookies.ts +var RequestCookies = class { + constructor(requestHeaders){ + /** @internal */ this._parsed = /* @__PURE__ */ new Map(); + this._headers = requestHeaders; + const header = requestHeaders.get("cookie"); + if (header) { + const parsed = parseCookie(header); + for (const [name, value] of parsed){ + this._parsed.set(name, { + name, + value + }); + } + } + } + [Symbol.iterator]() { + return this._parsed[Symbol.iterator](); + } + /** + * The amount of cookies received from the client + */ get size() { + return this._parsed.size; + } + get(...args) { + const name = typeof args[0] === "string" ? args[0] : args[0].name; + return this._parsed.get(name); + } + getAll(...args) { + var _a; + const all = Array.from(this._parsed); + if (!args.length) { + return all.map(([_, value])=>value); + } + const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; + return all.filter(([n])=>n === name).map(([_, value])=>value); + } + has(name) { + return this._parsed.has(name); + } + set(...args) { + const [name, value] = args.length === 1 ? [ + args[0].name, + args[0].value + ] : args; + const map = this._parsed; + map.set(name, { + name, + value + }); + this._headers.set("cookie", Array.from(map).map(([_, value2])=>stringifyCookie(value2)).join("; ")); + return this; + } + /** + * Delete the cookies matching the passed name or names in the request. + */ delete(names) { + const map = this._parsed; + const result = !Array.isArray(names) ? map.delete(names) : names.map((name)=>map.delete(name)); + this._headers.set("cookie", Array.from(map).map(([_, value])=>stringifyCookie(value)).join("; ")); + return result; + } + /** + * Delete all the cookies in the cookies in the request. + */ clear() { + this.delete(Array.from(this._parsed.keys())); + return this; + } + /** + * Format the cookies in the request as a string for logging + */ [Symbol.for("edge-runtime.inspect.custom")]() { + return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; + } + toString() { + return [ + ...this._parsed.values() + ].map((v)=>`${v.name}=${encodeURIComponent(v.value)}`).join("; "); + } +}; +// src/response-cookies.ts +var ResponseCookies = class { + constructor(responseHeaders){ + /** @internal */ this._parsed = /* @__PURE__ */ new Map(); + var _a, _b, _c; + this._headers = responseHeaders; + const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : []; + const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie); + for (const cookieString of cookieStrings){ + const parsed = parseSetCookie(cookieString); + if (parsed) this._parsed.set(parsed.name, parsed); + } + } + /** + * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise. + */ get(...args) { + const key = typeof args[0] === "string" ? args[0] : args[0].name; + return this._parsed.get(key); + } + /** + * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise. + */ getAll(...args) { + var _a; + const all = Array.from(this._parsed.values()); + if (!args.length) { + return all; + } + const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name; + return all.filter((c)=>c.name === key); + } + has(name) { + return this._parsed.has(name); + } + /** + * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise. + */ set(...args) { + const [name, value, cookie] = args.length === 1 ? [ + args[0].name, + args[0].value, + args[0] + ] : args; + const map = this._parsed; + map.set(name, normalizeCookie({ + name, + value, + ...cookie + })); + replace(map, this._headers); + return this; + } + /** + * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise. + */ delete(...args) { + const [name, options] = typeof args[0] === "string" ? [ + args[0] + ] : [ + args[0].name, + args[0] + ]; + return this.set({ + ...options, + name, + value: "", + expires: /* @__PURE__ */ new Date(0) + }); + } + [Symbol.for("edge-runtime.inspect.custom")]() { + return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`; + } + toString() { + return [ + ...this._parsed.values() + ].map(stringifyCookie).join("; "); + } +}; +function replace(bag, headers) { + headers.delete("set-cookie"); + for (const [, value] of bag){ + const serialized = stringifyCookie(value); + headers.append("set-cookie", serialized); + } +} +function normalizeCookie(cookie = { + name: "", + value: "" +}) { + if (typeof cookie.expires === "number") { + cookie.expires = new Date(cookie.expires); + } + if (cookie.maxAge) { + cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3); + } + if (cookie.path === null || cookie.path === void 0) { + cookie.path = "/"; + } + return cookie; +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + RequestCookies, + ResponseCookies, + parseCookie, + parseSetCookie, + stringifyCookie +}); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/cookies.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js [middleware-edge] (ecmascript)"); //# sourceMappingURL=cookies.js.map +; +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/request.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "INTERNALS", + ()=>INTERNALS, + "NextRequest", + ()=>NextRequest +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$next$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/next-url.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/utils.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/error.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/cookies.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js [middleware-edge] (ecmascript)"); +; +; +; +; +const INTERNALS = Symbol('internal request'); +class NextRequest extends Request { + constructor(input, init = {}){ + const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); + (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["validateURL"])(url); + // node Request instance requires duplex option when a body + // is present or it errors, we don't handle this for + // Request being passed in since it would have already + // errored if this wasn't configured + if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable + ; + if (input instanceof Request) super(input, init); + else super(url, init); + const nextUrl = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$next$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextURL"](url, { + headers: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["toNodeOutgoingHttpHeaders"])(this.headers), + nextConfig: init.nextConfig + }); + this[INTERNALS] = { + cookies: new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RequestCookies"](this.headers), + nextUrl, + url: ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : nextUrl.toString() + }; + } + [Symbol.for('edge-runtime.inspect.custom')]() { + return { + cookies: this.cookies, + nextUrl: this.nextUrl, + url: this.url, + // rest of props come from Request + bodyUsed: this.bodyUsed, + cache: this.cache, + credentials: this.credentials, + destination: this.destination, + headers: Object.fromEntries(this.headers), + integrity: this.integrity, + keepalive: this.keepalive, + method: this.method, + mode: this.mode, + redirect: this.redirect, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + signal: this.signal + }; + } + get cookies() { + return this[INTERNALS].cookies; + } + get nextUrl() { + return this[INTERNALS].nextUrl; + } + /** + * @deprecated + * `page` has been deprecated in favour of `URLPattern`. + * Read more: https://nextjs.org/docs/messages/middleware-request-page + */ get page() { + throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RemovedPageError"](); + } + /** + * @deprecated + * `ua` has been removed in favour of \`userAgent\` function. + * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent + */ get ua() { + throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RemovedUAError"](); + } + get url() { + return this[INTERNALS].url; + } +} //# sourceMappingURL=request.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "ReflectAdapter", + ()=>ReflectAdapter +]); +class ReflectAdapter { + static get(target, prop, receiver) { + const value = Reflect.get(target, prop, receiver); + if (typeof value === 'function') { + return value.bind(target); + } + return value; + } + static set(target, prop, value, receiver) { + return Reflect.set(target, prop, value, receiver); + } + static has(target, prop) { + return Reflect.has(target, prop); + } + static deleteProperty(target, prop) { + return Reflect.deleteProperty(target, prop); + } +} //# sourceMappingURL=reflect.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/response.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "NextResponse", + ()=>NextResponse +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/cookies.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$next$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/next-url.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/utils.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js [middleware-edge] (ecmascript)"); +; +; +; +; +; +const INTERNALS = Symbol('internal response'); +const REDIRECTS = new Set([ + 301, + 302, + 303, + 307, + 308 +]); +function handleMiddlewareField(init, headers) { + var _init_request; + if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) { + if (!(init.request.headers instanceof Headers)) { + throw Object.defineProperty(new Error('request.headers must be an instance of Headers'), "__NEXT_ERROR_CODE", { + value: "E119", + enumerable: false, + configurable: true + }); + } + const keys = []; + for (const [key, value] of init.request.headers){ + headers.set('x-middleware-request-' + key, value); + keys.push(key); + } + headers.set('x-middleware-override-headers', keys.join(',')); + } +} +class NextResponse extends Response { + constructor(body, init = {}){ + super(body, init); + const headers = this.headers; + const cookies = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ResponseCookies"](headers); + const cookiesProxy = new Proxy(cookies, { + get (target, prop, receiver) { + switch(prop){ + case 'delete': + case 'set': + { + return (...args)=>{ + const result = Reflect.apply(target[prop], target, args); + const newHeaders = new Headers(headers); + if (result instanceof __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ResponseCookies"]) { + headers.set('x-middleware-set-cookie', result.getAll().map((cookie)=>(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["stringifyCookie"])(cookie)).join(',')); + } + handleMiddlewareField(init, newHeaders); + return result; + }; + } + default: + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); + } + } + }); + this[INTERNALS] = { + cookies: cookiesProxy, + url: init.url ? new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$next$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextURL"](init.url, { + headers: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["toNodeOutgoingHttpHeaders"])(headers), + nextConfig: init.nextConfig + }) : undefined + }; + } + [Symbol.for('edge-runtime.inspect.custom')]() { + return { + cookies: this.cookies, + url: this.url, + // rest of props come from Response + body: this.body, + bodyUsed: this.bodyUsed, + headers: Object.fromEntries(this.headers), + ok: this.ok, + redirected: this.redirected, + status: this.status, + statusText: this.statusText, + type: this.type + }; + } + get cookies() { + return this[INTERNALS].cookies; + } + static json(body, init) { + const response = Response.json(body, init); + return new NextResponse(response.body, response); + } + static redirect(url, init) { + const status = typeof init === 'number' ? init : (init == null ? void 0 : init.status) ?? 307; + if (!REDIRECTS.has(status)) { + throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'), "__NEXT_ERROR_CODE", { + value: "E529", + enumerable: false, + configurable: true + }); + } + const initObj = typeof init === 'object' ? init : {}; + const headers = new Headers(initObj == null ? void 0 : initObj.headers); + headers.set('Location', (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["validateURL"])(url)); + return new NextResponse(null, { + ...initObj, + headers, + status + }); + } + static rewrite(destination, init) { + const headers = new Headers(init == null ? void 0 : init.headers); + headers.set('x-middleware-rewrite', (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["validateURL"])(destination)); + handleMiddlewareField(init, headers); + return new NextResponse(null, { + ...init, + headers + }); + } + static next(init) { + const headers = new Headers(init == null ? void 0 : init.headers); + headers.set('x-middleware-next', '1'); + handleMiddlewareField(init, headers); + return new NextResponse(null, { + ...init, + headers + }); + } +} //# sourceMappingURL=response.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * The result of parsing a URL relative to a base URL. + */ __turbopack_context__.s([ + "getRelativeURL", + ()=>getRelativeURL, + "parseRelativeURL", + ()=>parseRelativeURL +]); +function parseRelativeURL(url, base) { + const baseURL = typeof base === 'string' ? new URL(base) : base; + const relative = new URL(url, base); + // The URL is relative if the origin is the same as the base URL. + const isRelative = relative.origin === baseURL.origin; + return { + url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(), + isRelative + }; +} +function getRelativeURL(url, base) { + const relative = parseRelativeURL(url, base); + return relative.url; +} //# sourceMappingURL=relativize-url.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/app-router-headers.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "ACTION_HEADER", + ()=>ACTION_HEADER, + "FLIGHT_HEADERS", + ()=>FLIGHT_HEADERS, + "NEXT_ACTION_NOT_FOUND_HEADER", + ()=>NEXT_ACTION_NOT_FOUND_HEADER, + "NEXT_DID_POSTPONE_HEADER", + ()=>NEXT_DID_POSTPONE_HEADER, + "NEXT_HMR_REFRESH_HASH_COOKIE", + ()=>NEXT_HMR_REFRESH_HASH_COOKIE, + "NEXT_HMR_REFRESH_HEADER", + ()=>NEXT_HMR_REFRESH_HEADER, + "NEXT_IS_PRERENDER_HEADER", + ()=>NEXT_IS_PRERENDER_HEADER, + "NEXT_REWRITTEN_PATH_HEADER", + ()=>NEXT_REWRITTEN_PATH_HEADER, + "NEXT_REWRITTEN_QUERY_HEADER", + ()=>NEXT_REWRITTEN_QUERY_HEADER, + "NEXT_ROUTER_PREFETCH_HEADER", + ()=>NEXT_ROUTER_PREFETCH_HEADER, + "NEXT_ROUTER_SEGMENT_PREFETCH_HEADER", + ()=>NEXT_ROUTER_SEGMENT_PREFETCH_HEADER, + "NEXT_ROUTER_STALE_TIME_HEADER", + ()=>NEXT_ROUTER_STALE_TIME_HEADER, + "NEXT_ROUTER_STATE_TREE_HEADER", + ()=>NEXT_ROUTER_STATE_TREE_HEADER, + "NEXT_RSC_UNION_QUERY", + ()=>NEXT_RSC_UNION_QUERY, + "NEXT_URL", + ()=>NEXT_URL, + "RSC_CONTENT_TYPE_HEADER", + ()=>RSC_CONTENT_TYPE_HEADER, + "RSC_HEADER", + ()=>RSC_HEADER +]); +const RSC_HEADER = 'rsc'; +const ACTION_HEADER = 'next-action'; +const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; +const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; +const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; +const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; +const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; +const NEXT_URL = 'next-url'; +const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; +const FLIGHT_HEADERS = [ + RSC_HEADER, + NEXT_ROUTER_STATE_TREE_HEADER, + NEXT_ROUTER_PREFETCH_HEADER, + NEXT_HMR_REFRESH_HEADER, + NEXT_ROUTER_SEGMENT_PREFETCH_HEADER +]; +const NEXT_RSC_UNION_QUERY = '_rsc'; +const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; +const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; +const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; +const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; +const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; +const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; //# sourceMappingURL=app-router-headers.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/internal-utils.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "stripInternalQueries", + ()=>stripInternalQueries, + "stripInternalSearchParams", + ()=>stripInternalSearchParams +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/app-router-headers.js [middleware-edge] (ecmascript)"); +; +const INTERNAL_QUERY_NAMES = [ + __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"] +]; +function stripInternalQueries(query) { + for (const name of INTERNAL_QUERY_NAMES){ + delete query[name]; + } +} +function stripInternalSearchParams(url) { + const isStringUrl = typeof url === 'string'; + const instance = isStringUrl ? new URL(url) : url; + instance.searchParams.delete(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"]); + return isStringUrl ? instance.toString() : instance; +} //# sourceMappingURL=internal-utils.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * For a given page path, this function ensures that there is a leading slash. + * If there is not a leading slash, one is added, otherwise it is noop. + */ __turbopack_context__.s([ + "ensureLeadingSlash", + ()=>ensureLeadingSlash +]); +function ensureLeadingSlash(path) { + return path.startsWith('/') ? path : "/" + path; +} //# sourceMappingURL=ensure-leading-slash.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/segment.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "DEFAULT_SEGMENT_KEY", + ()=>DEFAULT_SEGMENT_KEY, + "PAGE_SEGMENT_KEY", + ()=>PAGE_SEGMENT_KEY, + "addSearchParamsIfPageSegment", + ()=>addSearchParamsIfPageSegment, + "isGroupSegment", + ()=>isGroupSegment, + "isParallelRouteSegment", + ()=>isParallelRouteSegment +]); +function isGroupSegment(segment) { + // Use array[0] for performant purpose + return segment[0] === '(' && segment.endsWith(')'); +} +function isParallelRouteSegment(segment) { + return segment.startsWith('@') && segment !== '@children'; +} +function addSearchParamsIfPageSegment(segment, searchParams) { + const isPageSegment = segment.includes(PAGE_SEGMENT_KEY); + if (isPageSegment) { + const stringifiedQuery = JSON.stringify(searchParams); + return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY; + } + return segment; +} +const PAGE_SEGMENT_KEY = '__PAGE__'; +const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; //# sourceMappingURL=segment.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "normalizeAppPath", + ()=>normalizeAppPath, + "normalizeRscURL", + ()=>normalizeRscURL +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$page$2d$path$2f$ensure$2d$leading$2d$slash$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/segment.js [middleware-edge] (ecmascript)"); +; +; +function normalizeAppPath(route) { + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$page$2d$path$2f$ensure$2d$leading$2d$slash$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ensureLeadingSlash"])(route.split('/').reduce((pathname, segment, index, segments)=>{ + // Empty segments are ignored. + if (!segment) { + return pathname; + } + // Groups are ignored. + if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["isGroupSegment"])(segment)) { + return pathname; + } + // Parallel segments are ignored. + if (segment[0] === '@') { + return pathname; + } + // The last segment (if it's a leaf) should be ignored. + if ((segment === 'page' || segment === 'route') && index === segments.length - 1) { + return pathname; + } + return pathname + "/" + segment; + }, '')); +} +function normalizeRscURL(url) { + return url.replace(/\.rsc($|\?)/, '$1'); +} //# sourceMappingURL=app-paths.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "HeadersAdapter", + ()=>HeadersAdapter, + "ReadonlyHeadersError", + ()=>ReadonlyHeadersError +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js [middleware-edge] (ecmascript)"); +; +class ReadonlyHeadersError extends Error { + constructor(){ + super('Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'); + } + static callable() { + throw new ReadonlyHeadersError(); + } +} +class HeadersAdapter extends Headers { + constructor(headers){ + // We've already overridden the methods that would be called, so we're just + // calling the super constructor to ensure that the instanceof check works. + super(); + this.headers = new Proxy(headers, { + get (target, prop, receiver) { + // Because this is just an object, we expect that all "get" operations + // are for properties. If it's a "get" for a symbol, we'll just return + // the symbol. + if (typeof prop === 'symbol') { + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); + } + const lowercased = prop.toLowerCase(); + // Let's find the original casing of the key. This assumes that there is + // no mixed case keys (e.g. "Content-Type" and "content-type") in the + // headers object. + const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); + // If the original casing doesn't exist, return undefined. + if (typeof original === 'undefined') return; + // If the original casing exists, return the value. + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, original, receiver); + }, + set (target, prop, value, receiver) { + if (typeof prop === 'symbol') { + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].set(target, prop, value, receiver); + } + const lowercased = prop.toLowerCase(); + // Let's find the original casing of the key. This assumes that there is + // no mixed case keys (e.g. "Content-Type" and "content-type") in the + // headers object. + const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); + // If the original casing doesn't exist, use the prop as the key. + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].set(target, original ?? prop, value, receiver); + }, + has (target, prop) { + if (typeof prop === 'symbol') return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].has(target, prop); + const lowercased = prop.toLowerCase(); + // Let's find the original casing of the key. This assumes that there is + // no mixed case keys (e.g. "Content-Type" and "content-type") in the + // headers object. + const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); + // If the original casing doesn't exist, return false. + if (typeof original === 'undefined') return false; + // If the original casing exists, return true. + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].has(target, original); + }, + deleteProperty (target, prop) { + if (typeof prop === 'symbol') return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].deleteProperty(target, prop); + const lowercased = prop.toLowerCase(); + // Let's find the original casing of the key. This assumes that there is + // no mixed case keys (e.g. "Content-Type" and "content-type") in the + // headers object. + const original = Object.keys(headers).find((o)=>o.toLowerCase() === lowercased); + // If the original casing doesn't exist, return true. + if (typeof original === 'undefined') return true; + // If the original casing exists, delete the property. + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].deleteProperty(target, original); + } + }); + } + /** + * Seals a Headers instance to prevent modification by throwing an error when + * any mutating method is called. + */ static seal(headers) { + return new Proxy(headers, { + get (target, prop, receiver) { + switch(prop){ + case 'append': + case 'delete': + case 'set': + return ReadonlyHeadersError.callable; + default: + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); + } + } + }); + } + /** + * Merges a header value into a string. This stores multiple values as an + * array, so we need to merge them into a string. + * + * @param value a header value + * @returns a merged header value (a string) + */ merge(value) { + if (Array.isArray(value)) return value.join(', '); + return value; + } + /** + * Creates a Headers instance from a plain object or a Headers instance. + * + * @param headers a plain object or a Headers instance + * @returns a headers instance + */ static from(headers) { + if (headers instanceof Headers) return headers; + return new HeadersAdapter(headers); + } + append(name, value) { + const existing = this.headers[name]; + if (typeof existing === 'string') { + this.headers[name] = [ + existing, + value + ]; + } else if (Array.isArray(existing)) { + existing.push(value); + } else { + this.headers[name] = value; + } + } + delete(name) { + delete this.headers[name]; + } + get(name) { + const value = this.headers[name]; + if (typeof value !== 'undefined') return this.merge(value); + return null; + } + has(name) { + return typeof this.headers[name] !== 'undefined'; + } + set(name, value) { + this.headers[name] = value; + } + forEach(callbackfn, thisArg) { + for (const [name, value] of this.entries()){ + callbackfn.call(thisArg, value, name, this); + } + } + *entries() { + for (const key of Object.keys(this.headers)){ + const name = key.toLowerCase(); + // We assert here that this is a string because we got it from the + // Object.keys() call above. + const value = this.get(name); + yield [ + name, + value + ]; + } + } + *keys() { + for (const key of Object.keys(this.headers)){ + const name = key.toLowerCase(); + yield name; + } + } + *values() { + for (const key of Object.keys(this.headers)){ + // We assert here that this is a string because we got it from the + // Object.keys() call above. + const value = this.get(key); + yield value; + } + } + [Symbol.iterator]() { + return this.entries(); + } +} //# sourceMappingURL=headers.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/async-local-storage.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "bindSnapshot", + ()=>bindSnapshot, + "createAsyncLocalStorage", + ()=>createAsyncLocalStorage, + "createSnapshot", + ()=>createSnapshot +]); +const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", { + value: "E504", + enumerable: false, + configurable: true +}); +class FakeAsyncLocalStorage { + disable() { + throw sharedAsyncLocalStorageNotAvailableError; + } + getStore() { + // This fake implementation of AsyncLocalStorage always returns `undefined`. + return undefined; + } + run() { + throw sharedAsyncLocalStorageNotAvailableError; + } + exit() { + throw sharedAsyncLocalStorageNotAvailableError; + } + enterWith() { + throw sharedAsyncLocalStorageNotAvailableError; + } + static bind(fn) { + return fn; + } +} +const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage; +function createAsyncLocalStorage() { + if (maybeGlobalAsyncLocalStorage) { + return new maybeGlobalAsyncLocalStorage(); + } + return new FakeAsyncLocalStorage(); +} +function bindSnapshot(fn) { + if (maybeGlobalAsyncLocalStorage) { + return maybeGlobalAsyncLocalStorage.bind(fn); + } + return FakeAsyncLocalStorage.bind(fn); +} +function createSnapshot() { + if (maybeGlobalAsyncLocalStorage) { + return maybeGlobalAsyncLocalStorage.snapshot(); + } + return function(fn, ...args) { + return fn(...args); + }; +} //# sourceMappingURL=async-local-storage.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "workAsyncStorageInstance", + ()=>workAsyncStorageInstance +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/async-local-storage.js [middleware-edge] (ecmascript)"); +; +const workAsyncStorageInstance = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createAsyncLocalStorage"])(); //# sourceMappingURL=work-async-storage-instance.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage.external.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +// Share the instance module in the next-shared layer +__turbopack_context__.s([]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript)"); +; +; + //# sourceMappingURL=work-async-storage.external.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "workAsyncStorage", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["workAsyncStorageInstance"] +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript)"); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "MutableRequestCookiesAdapter", + ()=>MutableRequestCookiesAdapter, + "ReadonlyRequestCookiesError", + ()=>ReadonlyRequestCookiesError, + "RequestCookiesAdapter", + ()=>RequestCookiesAdapter, + "appendMutableCookies", + ()=>appendMutableCookies, + "areCookiesMutableInCurrentPhase", + ()=>areCookiesMutableInCurrentPhase, + "createCookiesWithMutableAccessCheck", + ()=>createCookiesWithMutableAccessCheck, + "getModifiedCookieValues", + ()=>getModifiedCookieValues, + "responseCookiesToRequestCookies", + ()=>responseCookiesToRequestCookies +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/cookies.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript) "); +; +; +; +; +class ReadonlyRequestCookiesError extends Error { + constructor(){ + super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'); + } + static callable() { + throw new ReadonlyRequestCookiesError(); + } +} +class RequestCookiesAdapter { + static seal(cookies) { + return new Proxy(cookies, { + get (target, prop, receiver) { + switch(prop){ + case 'clear': + case 'delete': + case 'set': + return ReadonlyRequestCookiesError.callable; + default: + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); + } + } + }); + } +} +const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies'); +function getModifiedCookieValues(cookies) { + const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES]; + if (!modified || !Array.isArray(modified) || modified.length === 0) { + return []; + } + return modified; +} +function appendMutableCookies(headers, mutableCookies) { + const modifiedCookieValues = getModifiedCookieValues(mutableCookies); + if (modifiedCookieValues.length === 0) { + return false; + } + // Return a new response that extends the response with + // the modified cookies as fallbacks. `res` cookies + // will still take precedence. + const resCookies = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ResponseCookies"](headers); + const returnedCookies = resCookies.getAll(); + // Set the modified cookies as fallbacks. + for (const cookie of modifiedCookieValues){ + resCookies.set(cookie); + } + // Set the original cookies as the final values. + for (const cookie of returnedCookies){ + resCookies.set(cookie); + } + return true; +} +class MutableRequestCookiesAdapter { + static wrap(cookies, onUpdateCookies) { + const responseCookies = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ResponseCookies"](new Headers()); + for (const cookie of cookies.getAll()){ + responseCookies.set(cookie); + } + let modifiedValues = []; + const modifiedCookies = new Set(); + const updateResponseCookies = ()=>{ + // TODO-APP: change method of getting workStore + const workStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__["workAsyncStorage"].getStore(); + if (workStore) { + workStore.pathWasRevalidated = true; + } + const allCookies = responseCookies.getAll(); + modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name)); + if (onUpdateCookies) { + const serializedCookies = []; + for (const cookie of modifiedValues){ + const tempCookies = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ResponseCookies"](new Headers()); + tempCookies.set(cookie); + serializedCookies.push(tempCookies.toString()); + } + onUpdateCookies(serializedCookies); + } + }; + const wrappedCookies = new Proxy(responseCookies, { + get (target, prop, receiver) { + switch(prop){ + // A special symbol to get the modified cookie values + case SYMBOL_MODIFY_COOKIE_VALUES: + return modifiedValues; + // TODO: Throw error if trying to set a cookie after the response + // headers have been set. + case 'delete': + return function(...args) { + modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); + try { + target.delete(...args); + return wrappedCookies; + } finally{ + updateResponseCookies(); + } + }; + case 'set': + return function(...args) { + modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name); + try { + target.set(...args); + return wrappedCookies; + } finally{ + updateResponseCookies(); + } + }; + default: + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); + } + } + }); + return wrappedCookies; + } +} +function createCookiesWithMutableAccessCheck(requestStore) { + const wrappedCookies = new Proxy(requestStore.mutableCookies, { + get (target, prop, receiver) { + switch(prop){ + case 'delete': + return function(...args) { + ensureCookiesAreStillMutable(requestStore, 'cookies().delete'); + target.delete(...args); + return wrappedCookies; + }; + case 'set': + return function(...args) { + ensureCookiesAreStillMutable(requestStore, 'cookies().set'); + target.set(...args); + return wrappedCookies; + }; + default: + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); + } + } + }); + return wrappedCookies; +} +function areCookiesMutableInCurrentPhase(requestStore) { + return requestStore.phase === 'action'; +} +/** Ensure that cookies() starts throwing on mutation + * if we changed phases and can no longer mutate. + * + * This can happen when going: + * 'render' -> 'after' + * 'action' -> 'render' + * */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) { + if (!areCookiesMutableInCurrentPhase(requestStore)) { + // TODO: maybe we can give a more precise error message based on callingExpression? + throw new ReadonlyRequestCookiesError(); + } +} +function responseCookiesToRequestCookies(responseCookies) { + const requestCookies = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RequestCookies"](new Headers()); + for (const cookie of responseCookies.getAll()){ + requestCookies.set(cookie); + } + return requestCookies; +} //# sourceMappingURL=request-cookies.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/trace/constants.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Contains predefined constants for the trace span name in next/server. + * + * Currently, next/server/tracer is internal implementation only for tracking + * next.js's implementation only with known span names defined here. + **/ // eslint typescript has a bug with TS enums +/* eslint-disable no-shadow */ __turbopack_context__.s([ + "AppRenderSpan", + ()=>AppRenderSpan, + "AppRouteRouteHandlersSpan", + ()=>AppRouteRouteHandlersSpan, + "BaseServerSpan", + ()=>BaseServerSpan, + "LoadComponentsSpan", + ()=>LoadComponentsSpan, + "LogSpanAllowList", + ()=>LogSpanAllowList, + "MiddlewareSpan", + ()=>MiddlewareSpan, + "NextNodeServerSpan", + ()=>NextNodeServerSpan, + "NextServerSpan", + ()=>NextServerSpan, + "NextVanillaSpanAllowlist", + ()=>NextVanillaSpanAllowlist, + "NodeSpan", + ()=>NodeSpan, + "RenderSpan", + ()=>RenderSpan, + "ResolveMetadataSpan", + ()=>ResolveMetadataSpan, + "RouterSpan", + ()=>RouterSpan, + "StartServerSpan", + ()=>StartServerSpan +]); +var BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) { + BaseServerSpan["handleRequest"] = "BaseServer.handleRequest"; + BaseServerSpan["run"] = "BaseServer.run"; + BaseServerSpan["pipe"] = "BaseServer.pipe"; + BaseServerSpan["getStaticHTML"] = "BaseServer.getStaticHTML"; + BaseServerSpan["render"] = "BaseServer.render"; + BaseServerSpan["renderToResponseWithComponents"] = "BaseServer.renderToResponseWithComponents"; + BaseServerSpan["renderToResponse"] = "BaseServer.renderToResponse"; + BaseServerSpan["renderToHTML"] = "BaseServer.renderToHTML"; + BaseServerSpan["renderError"] = "BaseServer.renderError"; + BaseServerSpan["renderErrorToResponse"] = "BaseServer.renderErrorToResponse"; + BaseServerSpan["renderErrorToHTML"] = "BaseServer.renderErrorToHTML"; + BaseServerSpan["render404"] = "BaseServer.render404"; + return BaseServerSpan; +}(BaseServerSpan || {}); +var LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) { + LoadComponentsSpan["loadDefaultErrorComponents"] = "LoadComponents.loadDefaultErrorComponents"; + LoadComponentsSpan["loadComponents"] = "LoadComponents.loadComponents"; + return LoadComponentsSpan; +}(LoadComponentsSpan || {}); +var NextServerSpan = /*#__PURE__*/ function(NextServerSpan) { + NextServerSpan["getRequestHandler"] = "NextServer.getRequestHandler"; + NextServerSpan["getServer"] = "NextServer.getServer"; + NextServerSpan["getServerRequestHandler"] = "NextServer.getServerRequestHandler"; + NextServerSpan["createServer"] = "createServer.createServer"; + return NextServerSpan; +}(NextServerSpan || {}); +var NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) { + NextNodeServerSpan["compression"] = "NextNodeServer.compression"; + NextNodeServerSpan["getBuildId"] = "NextNodeServer.getBuildId"; + NextNodeServerSpan["createComponentTree"] = "NextNodeServer.createComponentTree"; + NextNodeServerSpan["clientComponentLoading"] = "NextNodeServer.clientComponentLoading"; + NextNodeServerSpan["getLayoutOrPageModule"] = "NextNodeServer.getLayoutOrPageModule"; + NextNodeServerSpan["generateStaticRoutes"] = "NextNodeServer.generateStaticRoutes"; + NextNodeServerSpan["generateFsStaticRoutes"] = "NextNodeServer.generateFsStaticRoutes"; + NextNodeServerSpan["generatePublicRoutes"] = "NextNodeServer.generatePublicRoutes"; + NextNodeServerSpan["generateImageRoutes"] = "NextNodeServer.generateImageRoutes.route"; + NextNodeServerSpan["sendRenderResult"] = "NextNodeServer.sendRenderResult"; + NextNodeServerSpan["proxyRequest"] = "NextNodeServer.proxyRequest"; + NextNodeServerSpan["runApi"] = "NextNodeServer.runApi"; + NextNodeServerSpan["render"] = "NextNodeServer.render"; + NextNodeServerSpan["renderHTML"] = "NextNodeServer.renderHTML"; + NextNodeServerSpan["imageOptimizer"] = "NextNodeServer.imageOptimizer"; + NextNodeServerSpan["getPagePath"] = "NextNodeServer.getPagePath"; + NextNodeServerSpan["getRoutesManifest"] = "NextNodeServer.getRoutesManifest"; + NextNodeServerSpan["findPageComponents"] = "NextNodeServer.findPageComponents"; + NextNodeServerSpan["getFontManifest"] = "NextNodeServer.getFontManifest"; + NextNodeServerSpan["getServerComponentManifest"] = "NextNodeServer.getServerComponentManifest"; + NextNodeServerSpan["getRequestHandler"] = "NextNodeServer.getRequestHandler"; + NextNodeServerSpan["renderToHTML"] = "NextNodeServer.renderToHTML"; + NextNodeServerSpan["renderError"] = "NextNodeServer.renderError"; + NextNodeServerSpan["renderErrorToHTML"] = "NextNodeServer.renderErrorToHTML"; + NextNodeServerSpan["render404"] = "NextNodeServer.render404"; + NextNodeServerSpan["startResponse"] = "NextNodeServer.startResponse"; + // nested inner span, does not require parent scope name + NextNodeServerSpan["route"] = "route"; + NextNodeServerSpan["onProxyReq"] = "onProxyReq"; + NextNodeServerSpan["apiResolver"] = "apiResolver"; + NextNodeServerSpan["internalFetch"] = "internalFetch"; + return NextNodeServerSpan; +}(NextNodeServerSpan || {}); +var StartServerSpan = /*#__PURE__*/ function(StartServerSpan) { + StartServerSpan["startServer"] = "startServer.startServer"; + return StartServerSpan; +}(StartServerSpan || {}); +var RenderSpan = /*#__PURE__*/ function(RenderSpan) { + RenderSpan["getServerSideProps"] = "Render.getServerSideProps"; + RenderSpan["getStaticProps"] = "Render.getStaticProps"; + RenderSpan["renderToString"] = "Render.renderToString"; + RenderSpan["renderDocument"] = "Render.renderDocument"; + RenderSpan["createBodyResult"] = "Render.createBodyResult"; + return RenderSpan; +}(RenderSpan || {}); +var AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) { + AppRenderSpan["renderToString"] = "AppRender.renderToString"; + AppRenderSpan["renderToReadableStream"] = "AppRender.renderToReadableStream"; + AppRenderSpan["getBodyResult"] = "AppRender.getBodyResult"; + AppRenderSpan["fetch"] = "AppRender.fetch"; + return AppRenderSpan; +}(AppRenderSpan || {}); +var RouterSpan = /*#__PURE__*/ function(RouterSpan) { + RouterSpan["executeRoute"] = "Router.executeRoute"; + return RouterSpan; +}(RouterSpan || {}); +var NodeSpan = /*#__PURE__*/ function(NodeSpan) { + NodeSpan["runHandler"] = "Node.runHandler"; + return NodeSpan; +}(NodeSpan || {}); +var AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) { + AppRouteRouteHandlersSpan["runHandler"] = "AppRouteRouteHandlers.runHandler"; + return AppRouteRouteHandlersSpan; +}(AppRouteRouteHandlersSpan || {}); +var ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) { + ResolveMetadataSpan["generateMetadata"] = "ResolveMetadata.generateMetadata"; + ResolveMetadataSpan["generateViewport"] = "ResolveMetadata.generateViewport"; + return ResolveMetadataSpan; +}(ResolveMetadataSpan || {}); +var MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) { + MiddlewareSpan["execute"] = "Middleware.execute"; + return MiddlewareSpan; +}(MiddlewareSpan || {}); +const NextVanillaSpanAllowlist = [ + "Middleware.execute", + "BaseServer.handleRequest", + "Render.getServerSideProps", + "Render.getStaticProps", + "AppRender.fetch", + "AppRender.getBodyResult", + "Render.renderDocument", + "Node.runHandler", + "AppRouteRouteHandlers.runHandler", + "ResolveMetadata.generateMetadata", + "ResolveMetadata.generateViewport", + "NextNodeServer.createComponentTree", + "NextNodeServer.findPageComponents", + "NextNodeServer.getLayoutOrPageModule", + "NextNodeServer.startResponse", + "NextNodeServer.clientComponentLoading" +]; +const LogSpanAllowList = [ + "NextNodeServer.findPageComponents", + "NextNodeServer.createComponentTree", + "NextNodeServer.clientComponentLoading" +]; +; + //# sourceMappingURL=constants.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/is-thenable.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Check to see if a value is Thenable. + * + * @param promise the maybe-thenable value + * @returns true if the value is thenable + */ __turbopack_context__.s([ + "isThenable", + ()=>isThenable +]); +function isThenable(promise) { + return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; +} //# sourceMappingURL=is-thenable.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@opentelemetry/api/index.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { + +(()=>{ + "use strict"; + var e = { + 491: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.ContextAPI = void 0; + const n = r(223); + const a = r(172); + const o = r(930); + 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; + }, + 930: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.DiagAPI = void 0; + const n = r(56); + const a = r(912); + const o = r(957); + const i = r(172); + 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 : ""; + 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; + }, + 653: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.MetricsAPI = void 0; + const n = r(660); + const a = r(172); + const o = r(930); + 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; + }, + 181: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.PropagationAPI = void 0; + const n = r(172); + const a = r(874); + const o = r(194); + const i = r(277); + const c = r(369); + const s = r(930); + 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; + }, + 997: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.TraceAPI = void 0; + const n = r(172); + const a = r(846); + const o = r(139); + const i = r(607); + const c = r(930); + 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; + }, + 277: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.deleteBaggage = t.setBaggage = t.getActiveBaggage = t.getBaggage = void 0; + const n = r(491); + const a = r(780); + const o = (0, a.createContextKey)("OpenTelemetry Baggage Key"); + function getBaggage(e) { + return e.getValue(o) || undefined; + } + t.getBaggage = getBaggage; + function getActiveBaggage() { + return getBaggage(n.ContextAPI.getInstance().active()); + } + t.getActiveBaggage = getActiveBaggage; + function setBaggage(e, t) { + return e.setValue(o, t); + } + t.setBaggage = setBaggage; + function deleteBaggage(e) { + return e.deleteValue(o); + } + t.deleteBaggage = deleteBaggage; + }, + 993: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.BaggageImpl = void 0; + class BaggageImpl { + constructor(e){ + this._entries = e ? new Map(e) : new Map; + } + getEntry(e) { + const t = this._entries.get(e); + if (!t) { + return undefined; + } + return Object.assign({}, t); + } + getAllEntries() { + return Array.from(this._entries.entries()).map(([e, t])=>[ + e, + t + ]); + } + setEntry(e, t) { + const r = new BaggageImpl(this._entries); + r._entries.set(e, t); + return r; + } + removeEntry(e) { + const t = new BaggageImpl(this._entries); + t._entries.delete(e); + return t; + } + removeEntries(...e) { + const t = new BaggageImpl(this._entries); + for (const r of e){ + t._entries.delete(r); + } + return t; + } + clear() { + return new BaggageImpl; + } + } + t.BaggageImpl = BaggageImpl; + }, + 830: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.baggageEntryMetadataSymbol = void 0; + t.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata"); + }, + 369: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.baggageEntryMetadataFromString = t.createBaggage = void 0; + const n = r(930); + const a = r(993); + const o = r(830); + const i = n.DiagAPI.instance(); + function createBaggage(e = {}) { + return new a.BaggageImpl(new Map(Object.entries(e))); + } + t.createBaggage = createBaggage; + function baggageEntryMetadataFromString(e) { + if (typeof e !== "string") { + i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`); + e = ""; + } + return { + __TYPE__: o.baggageEntryMetadataSymbol, + toString () { + return e; + } + }; + } + t.baggageEntryMetadataFromString = baggageEntryMetadataFromString; + }, + 67: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.context = void 0; + const n = r(491); + t.context = n.ContextAPI.getInstance(); + }, + 223: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.NoopContextManager = void 0; + const n = r(780); + class NoopContextManager { + active() { + return n.ROOT_CONTEXT; + } + with(e, t, r, ...n) { + return t.call(r, ...n); + } + bind(e, t) { + return t; + } + enable() { + return this; + } + disable() { + return this; + } + } + t.NoopContextManager = NoopContextManager; + }, + 780: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.ROOT_CONTEXT = t.createContextKey = void 0; + function createContextKey(e) { + return Symbol.for(e); + } + t.createContextKey = createContextKey; + class BaseContext { + constructor(e){ + const t = this; + t._currentContext = e ? new Map(e) : new Map; + t.getValue = (e)=>t._currentContext.get(e); + t.setValue = (e, r)=>{ + const n = new BaseContext(t._currentContext); + n._currentContext.set(e, r); + return n; + }; + t.deleteValue = (e)=>{ + const r = new BaseContext(t._currentContext); + r._currentContext.delete(e); + return r; + }; + } + } + t.ROOT_CONTEXT = new BaseContext; + }, + 506: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.diag = void 0; + const n = r(930); + t.diag = n.DiagAPI.instance(); + }, + 56: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.DiagComponentLogger = void 0; + const n = r(172); + class DiagComponentLogger { + constructor(e){ + this._namespace = e.namespace || "DiagComponentLogger"; + } + debug(...e) { + return logProxy("debug", this._namespace, e); + } + error(...e) { + return logProxy("error", this._namespace, e); + } + info(...e) { + return logProxy("info", this._namespace, e); + } + warn(...e) { + return logProxy("warn", this._namespace, e); + } + verbose(...e) { + return logProxy("verbose", this._namespace, e); + } + } + t.DiagComponentLogger = DiagComponentLogger; + function logProxy(e, t, r) { + const a = (0, n.getGlobal)("diag"); + if (!a) { + return; + } + r.unshift(t); + return a[e](...r); + } + }, + 972: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.DiagConsoleLogger = void 0; + const r = [ + { + n: "error", + c: "error" + }, + { + n: "warn", + c: "warn" + }, + { + n: "info", + c: "info" + }, + { + n: "debug", + c: "debug" + }, + { + n: "verbose", + c: "trace" + } + ]; + class DiagConsoleLogger { + constructor(){ + function _consoleFunc(e) { + return function(...t) { + if (console) { + let r = console[e]; + if (typeof r !== "function") { + r = console.log; + } + if (typeof r === "function") { + return r.apply(console, t); + } + } + }; + } + for(let e = 0; e < r.length; e++){ + this[r[e].n] = _consoleFunc(r[e].c); + } + } + } + t.DiagConsoleLogger = DiagConsoleLogger; + }, + 912: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.createLogLevelDiagLogger = void 0; + const n = r(957); + function createLogLevelDiagLogger(e, t) { + if (e < n.DiagLogLevel.NONE) { + e = n.DiagLogLevel.NONE; + } else if (e > n.DiagLogLevel.ALL) { + e = n.DiagLogLevel.ALL; + } + t = t || {}; + function _filterFunc(r, n) { + const a = t[r]; + if (typeof a === "function" && e >= n) { + return a.bind(t); + } + return function() {}; + } + return { + error: _filterFunc("error", n.DiagLogLevel.ERROR), + warn: _filterFunc("warn", n.DiagLogLevel.WARN), + info: _filterFunc("info", n.DiagLogLevel.INFO), + debug: _filterFunc("debug", n.DiagLogLevel.DEBUG), + verbose: _filterFunc("verbose", n.DiagLogLevel.VERBOSE) + }; + } + t.createLogLevelDiagLogger = createLogLevelDiagLogger; + }, + 957: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.DiagLogLevel = void 0; + var r; + (function(e) { + e[e["NONE"] = 0] = "NONE"; + e[e["ERROR"] = 30] = "ERROR"; + e[e["WARN"] = 50] = "WARN"; + e[e["INFO"] = 60] = "INFO"; + e[e["DEBUG"] = 70] = "DEBUG"; + e[e["VERBOSE"] = 80] = "VERBOSE"; + e[e["ALL"] = 9999] = "ALL"; + })(r = t.DiagLogLevel || (t.DiagLogLevel = {})); + }, + 172: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.unregisterGlobal = t.getGlobal = t.registerGlobal = void 0; + const n = r(200); + const a = r(521); + const o = r(130); + const i = a.VERSION.split(".")[0]; + const c = Symbol.for(`opentelemetry.js.api.${i}`); + const s = n._globalThis; + function registerGlobal(e, t, r, n = false) { + var o; + const i = s[c] = (o = s[c]) !== null && o !== void 0 ? o : { + version: a.VERSION + }; + if (!n && i[e]) { + const t = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`); + r.error(t.stack || t.message); + return false; + } + if (i.version !== a.VERSION) { + const t = new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`); + r.error(t.stack || t.message); + return false; + } + i[e] = t; + r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`); + return true; + } + t.registerGlobal = registerGlobal; + function getGlobal(e) { + var t, r; + const n = (t = s[c]) === null || t === void 0 ? void 0 : t.version; + if (!n || !(0, o.isCompatible)(n)) { + return; + } + return (r = s[c]) === null || r === void 0 ? void 0 : r[e]; + } + t.getGlobal = getGlobal; + function unregisterGlobal(e, t) { + t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`); + const r = s[c]; + if (r) { + delete r[e]; + } + } + t.unregisterGlobal = unregisterGlobal; + }, + 130: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.isCompatible = t._makeCompatibilityCheck = void 0; + const n = r(521); + const a = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; + function _makeCompatibilityCheck(e) { + const t = new Set([ + e + ]); + const r = new Set; + const n = e.match(a); + if (!n) { + return ()=>false; + } + const o = { + major: +n[1], + minor: +n[2], + patch: +n[3], + prerelease: n[4] + }; + if (o.prerelease != null) { + return function isExactmatch(t) { + return t === e; + }; + } + function _reject(e) { + r.add(e); + return false; + } + function _accept(e) { + t.add(e); + return true; + } + return function isCompatible(e) { + if (t.has(e)) { + return true; + } + if (r.has(e)) { + return false; + } + const n = e.match(a); + if (!n) { + return _reject(e); + } + const i = { + major: +n[1], + minor: +n[2], + patch: +n[3], + prerelease: n[4] + }; + if (i.prerelease != null) { + return _reject(e); + } + if (o.major !== i.major) { + return _reject(e); + } + if (o.major === 0) { + if (o.minor === i.minor && o.patch <= i.patch) { + return _accept(e); + } + return _reject(e); + } + if (o.minor <= i.minor) { + return _accept(e); + } + return _reject(e); + }; + } + t._makeCompatibilityCheck = _makeCompatibilityCheck; + t.isCompatible = _makeCompatibilityCheck(n.VERSION); + }, + 886: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.metrics = void 0; + const n = r(653); + t.metrics = n.MetricsAPI.getInstance(); + }, + 901: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.ValueType = void 0; + var r; + (function(e) { + e[e["INT"] = 0] = "INT"; + e[e["DOUBLE"] = 1] = "DOUBLE"; + })(r = t.ValueType || (t.ValueType = {})); + }, + 102: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.createNoopMeter = t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = t.NOOP_OBSERVABLE_GAUGE_METRIC = t.NOOP_OBSERVABLE_COUNTER_METRIC = t.NOOP_UP_DOWN_COUNTER_METRIC = t.NOOP_HISTOGRAM_METRIC = t.NOOP_COUNTER_METRIC = t.NOOP_METER = t.NoopObservableUpDownCounterMetric = t.NoopObservableGaugeMetric = t.NoopObservableCounterMetric = t.NoopObservableMetric = t.NoopHistogramMetric = t.NoopUpDownCounterMetric = t.NoopCounterMetric = t.NoopMetric = t.NoopMeter = void 0; + class NoopMeter { + constructor(){} + createHistogram(e, r) { + return t.NOOP_HISTOGRAM_METRIC; + } + createCounter(e, r) { + return t.NOOP_COUNTER_METRIC; + } + createUpDownCounter(e, r) { + return t.NOOP_UP_DOWN_COUNTER_METRIC; + } + createObservableGauge(e, r) { + return t.NOOP_OBSERVABLE_GAUGE_METRIC; + } + createObservableCounter(e, r) { + return t.NOOP_OBSERVABLE_COUNTER_METRIC; + } + createObservableUpDownCounter(e, r) { + return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC; + } + addBatchObservableCallback(e, t) {} + removeBatchObservableCallback(e) {} + } + t.NoopMeter = NoopMeter; + class NoopMetric { + } + t.NoopMetric = NoopMetric; + class NoopCounterMetric extends NoopMetric { + add(e, t) {} + } + t.NoopCounterMetric = NoopCounterMetric; + class NoopUpDownCounterMetric extends NoopMetric { + add(e, t) {} + } + t.NoopUpDownCounterMetric = NoopUpDownCounterMetric; + class NoopHistogramMetric extends NoopMetric { + record(e, t) {} + } + t.NoopHistogramMetric = NoopHistogramMetric; + class NoopObservableMetric { + addCallback(e) {} + removeCallback(e) {} + } + t.NoopObservableMetric = NoopObservableMetric; + class NoopObservableCounterMetric extends NoopObservableMetric { + } + t.NoopObservableCounterMetric = NoopObservableCounterMetric; + class NoopObservableGaugeMetric extends NoopObservableMetric { + } + t.NoopObservableGaugeMetric = NoopObservableGaugeMetric; + class NoopObservableUpDownCounterMetric extends NoopObservableMetric { + } + t.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric; + t.NOOP_METER = new NoopMeter; + t.NOOP_COUNTER_METRIC = new NoopCounterMetric; + t.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric; + t.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric; + t.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric; + t.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric; + t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric; + function createNoopMeter() { + return t.NOOP_METER; + } + t.createNoopMeter = createNoopMeter; + }, + 660: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.NOOP_METER_PROVIDER = t.NoopMeterProvider = void 0; + const n = r(102); + class NoopMeterProvider { + getMeter(e, t, r) { + return n.NOOP_METER; + } + } + t.NoopMeterProvider = NoopMeterProvider; + t.NOOP_METER_PROVIDER = new NoopMeterProvider; + }, + 200: function(e, t, r) { + var n = this && this.__createBinding || (Object.create ? function(e, t, r, n) { + if (n === undefined) n = r; + Object.defineProperty(e, n, { + enumerable: true, + get: function() { + return t[r]; + } + }); + } : function(e, t, r, n) { + if (n === undefined) n = r; + e[n] = t[r]; + }); + var a = this && this.__exportStar || function(e, t) { + for(var r in e)if (r !== "default" && !Object.prototype.hasOwnProperty.call(t, r)) n(t, e, r); + }; + Object.defineProperty(t, "__esModule", { + value: true + }); + a(r(46), t); + }, + 651: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t._globalThis = void 0; + t._globalThis = typeof globalThis === "object" ? globalThis : /*TURBOPACK member replacement*/ __turbopack_context__.g; + }, + 46: function(e, t, r) { + var n = this && this.__createBinding || (Object.create ? function(e, t, r, n) { + if (n === undefined) n = r; + Object.defineProperty(e, n, { + enumerable: true, + get: function() { + return t[r]; + } + }); + } : function(e, t, r, n) { + if (n === undefined) n = r; + e[n] = t[r]; + }); + var a = this && this.__exportStar || function(e, t) { + for(var r in e)if (r !== "default" && !Object.prototype.hasOwnProperty.call(t, r)) n(t, e, r); + }; + Object.defineProperty(t, "__esModule", { + value: true + }); + a(r(651), t); + }, + 939: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.propagation = void 0; + const n = r(181); + t.propagation = n.PropagationAPI.getInstance(); + }, + 874: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.NoopTextMapPropagator = void 0; + class NoopTextMapPropagator { + inject(e, t) {} + extract(e, t) { + return e; + } + fields() { + return []; + } + } + t.NoopTextMapPropagator = NoopTextMapPropagator; + }, + 194: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.defaultTextMapSetter = t.defaultTextMapGetter = void 0; + t.defaultTextMapGetter = { + get (e, t) { + if (e == null) { + return undefined; + } + return e[t]; + }, + keys (e) { + if (e == null) { + return []; + } + return Object.keys(e); + } + }; + t.defaultTextMapSetter = { + set (e, t, r) { + if (e == null) { + return; + } + e[t] = r; + } + }; + }, + 845: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.trace = void 0; + const n = r(997); + t.trace = n.TraceAPI.getInstance(); + }, + 403: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.NonRecordingSpan = void 0; + const n = r(476); + class NonRecordingSpan { + constructor(e = n.INVALID_SPAN_CONTEXT){ + this._spanContext = e; + } + spanContext() { + return this._spanContext; + } + setAttribute(e, t) { + return this; + } + setAttributes(e) { + return this; + } + addEvent(e, t) { + return this; + } + setStatus(e) { + return this; + } + updateName(e) { + return this; + } + end(e) {} + isRecording() { + return false; + } + recordException(e, t) {} + } + t.NonRecordingSpan = NonRecordingSpan; + }, + 614: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.NoopTracer = void 0; + const n = r(491); + const a = r(607); + const o = r(403); + const i = r(139); + const c = n.ContextAPI.getInstance(); + class NoopTracer { + startSpan(e, t, r = c.active()) { + const n = Boolean(t === null || t === void 0 ? void 0 : t.root); + if (n) { + return new o.NonRecordingSpan; + } + const s = r && (0, a.getSpanContext)(r); + if (isSpanContext(s) && (0, i.isSpanContextValid)(s)) { + return new o.NonRecordingSpan(s); + } else { + return new o.NonRecordingSpan; + } + } + startActiveSpan(e, t, r, n) { + let o; + let i; + let s; + if (arguments.length < 2) { + return; + } else if (arguments.length === 2) { + s = t; + } else if (arguments.length === 3) { + o = t; + s = r; + } else { + o = t; + i = r; + s = n; + } + const u = i !== null && i !== void 0 ? i : c.active(); + const l = this.startSpan(e, o, u); + const g = (0, a.setSpan)(u, l); + return c.with(g, s, undefined, l); + } + } + t.NoopTracer = NoopTracer; + function isSpanContext(e) { + return typeof e === "object" && typeof e["spanId"] === "string" && typeof e["traceId"] === "string" && typeof e["traceFlags"] === "number"; + } + }, + 124: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.NoopTracerProvider = void 0; + const n = r(614); + class NoopTracerProvider { + getTracer(e, t, r) { + return new n.NoopTracer; + } + } + t.NoopTracerProvider = NoopTracerProvider; + }, + 125: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.ProxyTracer = void 0; + const n = r(614); + const a = new n.NoopTracer; + class ProxyTracer { + constructor(e, t, r, n){ + this._provider = e; + this.name = t; + this.version = r; + this.options = n; + } + startSpan(e, t, r) { + return this._getTracer().startSpan(e, t, r); + } + startActiveSpan(e, t, r, n) { + const a = this._getTracer(); + return Reflect.apply(a.startActiveSpan, a, arguments); + } + _getTracer() { + if (this._delegate) { + return this._delegate; + } + const e = this._provider.getDelegateTracer(this.name, this.version, this.options); + if (!e) { + return a; + } + this._delegate = e; + return this._delegate; + } + } + t.ProxyTracer = ProxyTracer; + }, + 846: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.ProxyTracerProvider = void 0; + const n = r(125); + const a = r(124); + const o = new a.NoopTracerProvider; + class ProxyTracerProvider { + getTracer(e, t, r) { + var a; + return (a = this.getDelegateTracer(e, t, r)) !== null && a !== void 0 ? a : new n.ProxyTracer(this, e, t, r); + } + getDelegate() { + var e; + return (e = this._delegate) !== null && e !== void 0 ? e : o; + } + setDelegate(e) { + this._delegate = e; + } + getDelegateTracer(e, t, r) { + var n; + return (n = this._delegate) === null || n === void 0 ? void 0 : n.getTracer(e, t, r); + } + } + t.ProxyTracerProvider = ProxyTracerProvider; + }, + 996: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.SamplingDecision = void 0; + var r; + (function(e) { + e[e["NOT_RECORD"] = 0] = "NOT_RECORD"; + e[e["RECORD"] = 1] = "RECORD"; + e[e["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED"; + })(r = t.SamplingDecision || (t.SamplingDecision = {})); + }, + 607: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.getSpanContext = t.setSpanContext = t.deleteSpan = t.setSpan = t.getActiveSpan = t.getSpan = void 0; + const n = r(780); + const a = r(403); + const o = r(491); + const i = (0, n.createContextKey)("OpenTelemetry Context Key SPAN"); + function getSpan(e) { + return e.getValue(i) || undefined; + } + t.getSpan = getSpan; + function getActiveSpan() { + return getSpan(o.ContextAPI.getInstance().active()); + } + t.getActiveSpan = getActiveSpan; + function setSpan(e, t) { + return e.setValue(i, t); + } + t.setSpan = setSpan; + function deleteSpan(e) { + return e.deleteValue(i); + } + t.deleteSpan = deleteSpan; + function setSpanContext(e, t) { + return setSpan(e, new a.NonRecordingSpan(t)); + } + t.setSpanContext = setSpanContext; + function getSpanContext(e) { + var t; + return (t = getSpan(e)) === null || t === void 0 ? void 0 : t.spanContext(); + } + t.getSpanContext = getSpanContext; + }, + 325: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.TraceStateImpl = void 0; + const n = r(564); + const a = 32; + const o = 512; + const i = ","; + const c = "="; + class TraceStateImpl { + constructor(e){ + this._internalState = new Map; + if (e) this._parse(e); + } + set(e, t) { + const r = this._clone(); + if (r._internalState.has(e)) { + r._internalState.delete(e); + } + r._internalState.set(e, t); + return r; + } + unset(e) { + const t = this._clone(); + t._internalState.delete(e); + return t; + } + get(e) { + return this._internalState.get(e); + } + serialize() { + return this._keys().reduce((e, t)=>{ + e.push(t + c + this.get(t)); + return e; + }, []).join(i); + } + _parse(e) { + if (e.length > o) return; + this._internalState = e.split(i).reverse().reduce((e, t)=>{ + const r = t.trim(); + const a = r.indexOf(c); + if (a !== -1) { + const o = r.slice(0, a); + const i = r.slice(a + 1, t.length); + if ((0, n.validateKey)(o) && (0, n.validateValue)(i)) { + e.set(o, i); + } else {} + } + return e; + }, new Map); + if (this._internalState.size > a) { + this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, a)); + } + } + _keys() { + return Array.from(this._internalState.keys()).reverse(); + } + _clone() { + const e = new TraceStateImpl; + e._internalState = new Map(this._internalState); + return e; + } + } + t.TraceStateImpl = TraceStateImpl; + }, + 564: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.validateValue = t.validateKey = void 0; + const r = "[_0-9a-z-*/]"; + const n = `[a-z]${r}{0,255}`; + const a = `[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`; + const o = new RegExp(`^(?:${n}|${a})$`); + const i = /^[ -~]{0,255}[!-~]$/; + const c = /,|=/; + function validateKey(e) { + return o.test(e); + } + t.validateKey = validateKey; + function validateValue(e) { + return i.test(e) && !c.test(e); + } + t.validateValue = validateValue; + }, + 98: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.createTraceState = void 0; + const n = r(325); + function createTraceState(e) { + return new n.TraceStateImpl(e); + } + t.createTraceState = createTraceState; + }, + 476: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.INVALID_SPAN_CONTEXT = t.INVALID_TRACEID = t.INVALID_SPANID = void 0; + const n = r(475); + t.INVALID_SPANID = "0000000000000000"; + t.INVALID_TRACEID = "00000000000000000000000000000000"; + t.INVALID_SPAN_CONTEXT = { + traceId: t.INVALID_TRACEID, + spanId: t.INVALID_SPANID, + traceFlags: n.TraceFlags.NONE + }; + }, + 357: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.SpanKind = void 0; + var r; + (function(e) { + e[e["INTERNAL"] = 0] = "INTERNAL"; + e[e["SERVER"] = 1] = "SERVER"; + e[e["CLIENT"] = 2] = "CLIENT"; + e[e["PRODUCER"] = 3] = "PRODUCER"; + e[e["CONSUMER"] = 4] = "CONSUMER"; + })(r = t.SpanKind || (t.SpanKind = {})); + }, + 139: (e, t, r)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.wrapSpanContext = t.isSpanContextValid = t.isValidSpanId = t.isValidTraceId = void 0; + const n = r(476); + const a = r(403); + const o = /^([0-9a-f]{32})$/i; + const i = /^[0-9a-f]{16}$/i; + function isValidTraceId(e) { + return o.test(e) && e !== n.INVALID_TRACEID; + } + t.isValidTraceId = isValidTraceId; + function isValidSpanId(e) { + return i.test(e) && e !== n.INVALID_SPANID; + } + t.isValidSpanId = isValidSpanId; + function isSpanContextValid(e) { + return isValidTraceId(e.traceId) && isValidSpanId(e.spanId); + } + t.isSpanContextValid = isSpanContextValid; + function wrapSpanContext(e) { + return new a.NonRecordingSpan(e); + } + t.wrapSpanContext = wrapSpanContext; + }, + 847: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.SpanStatusCode = void 0; + var r; + (function(e) { + e[e["UNSET"] = 0] = "UNSET"; + e[e["OK"] = 1] = "OK"; + e[e["ERROR"] = 2] = "ERROR"; + })(r = t.SpanStatusCode || (t.SpanStatusCode = {})); + }, + 475: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.TraceFlags = void 0; + var r; + (function(e) { + e[e["NONE"] = 0] = "NONE"; + e[e["SAMPLED"] = 1] = "SAMPLED"; + })(r = t.TraceFlags || (t.TraceFlags = {})); + }, + 521: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + t.VERSION = void 0; + t.VERSION = "1.6.0"; + } + }; + var t = {}; + function __nccwpck_require__(r) { + var n = t[r]; + if (n !== undefined) { + return n.exports; + } + var a = t[r] = { + exports: {} + }; + var o = true; + try { + e[r].call(a.exports, a, a.exports, __nccwpck_require__); + o = false; + } finally{ + if (o) delete t[r]; + } + return a.exports; + } + if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@opentelemetry/api") + "/"; + var r = {}; + (()=>{ + var e = r; + Object.defineProperty(e, "__esModule", { + value: true + }); + e.trace = e.propagation = e.metrics = e.diag = e.context = e.INVALID_SPAN_CONTEXT = e.INVALID_TRACEID = e.INVALID_SPANID = e.isValidSpanId = e.isValidTraceId = e.isSpanContextValid = e.createTraceState = e.TraceFlags = e.SpanStatusCode = e.SpanKind = e.SamplingDecision = e.ProxyTracerProvider = e.ProxyTracer = e.defaultTextMapSetter = e.defaultTextMapGetter = e.ValueType = e.createNoopMeter = e.DiagLogLevel = e.DiagConsoleLogger = e.ROOT_CONTEXT = e.createContextKey = e.baggageEntryMetadataFromString = void 0; + var t = __nccwpck_require__(369); + Object.defineProperty(e, "baggageEntryMetadataFromString", { + enumerable: true, + get: function() { + return t.baggageEntryMetadataFromString; + } + }); + var n = __nccwpck_require__(780); + Object.defineProperty(e, "createContextKey", { + enumerable: true, + get: function() { + return n.createContextKey; + } + }); + Object.defineProperty(e, "ROOT_CONTEXT", { + enumerable: true, + get: function() { + return n.ROOT_CONTEXT; + } + }); + var a = __nccwpck_require__(972); + Object.defineProperty(e, "DiagConsoleLogger", { + enumerable: true, + get: function() { + return a.DiagConsoleLogger; + } + }); + var o = __nccwpck_require__(957); + Object.defineProperty(e, "DiagLogLevel", { + enumerable: true, + get: function() { + return o.DiagLogLevel; + } + }); + var i = __nccwpck_require__(102); + Object.defineProperty(e, "createNoopMeter", { + enumerable: true, + get: function() { + return i.createNoopMeter; + } + }); + var c = __nccwpck_require__(901); + Object.defineProperty(e, "ValueType", { + enumerable: true, + get: function() { + return c.ValueType; + } + }); + var s = __nccwpck_require__(194); + Object.defineProperty(e, "defaultTextMapGetter", { + enumerable: true, + get: function() { + return s.defaultTextMapGetter; + } + }); + Object.defineProperty(e, "defaultTextMapSetter", { + enumerable: true, + get: function() { + return s.defaultTextMapSetter; + } + }); + var u = __nccwpck_require__(125); + Object.defineProperty(e, "ProxyTracer", { + enumerable: true, + get: function() { + return u.ProxyTracer; + } + }); + var l = __nccwpck_require__(846); + Object.defineProperty(e, "ProxyTracerProvider", { + enumerable: true, + get: function() { + return l.ProxyTracerProvider; + } + }); + var g = __nccwpck_require__(996); + Object.defineProperty(e, "SamplingDecision", { + enumerable: true, + get: function() { + return g.SamplingDecision; + } + }); + var p = __nccwpck_require__(357); + Object.defineProperty(e, "SpanKind", { + enumerable: true, + get: function() { + return p.SpanKind; + } + }); + var d = __nccwpck_require__(847); + Object.defineProperty(e, "SpanStatusCode", { + enumerable: true, + get: function() { + return d.SpanStatusCode; + } + }); + var _ = __nccwpck_require__(475); + Object.defineProperty(e, "TraceFlags", { + enumerable: true, + get: function() { + return _.TraceFlags; + } + }); + var f = __nccwpck_require__(98); + Object.defineProperty(e, "createTraceState", { + enumerable: true, + get: function() { + return f.createTraceState; + } + }); + var b = __nccwpck_require__(139); + Object.defineProperty(e, "isSpanContextValid", { + enumerable: true, + get: function() { + return b.isSpanContextValid; + } + }); + Object.defineProperty(e, "isValidTraceId", { + enumerable: true, + get: function() { + return b.isValidTraceId; + } + }); + Object.defineProperty(e, "isValidSpanId", { + enumerable: true, + get: function() { + return b.isValidSpanId; + } + }); + var v = __nccwpck_require__(476); + Object.defineProperty(e, "INVALID_SPANID", { + enumerable: true, + get: function() { + return v.INVALID_SPANID; + } + }); + Object.defineProperty(e, "INVALID_TRACEID", { + enumerable: true, + get: function() { + return v.INVALID_TRACEID; + } + }); + Object.defineProperty(e, "INVALID_SPAN_CONTEXT", { + enumerable: true, + get: function() { + return v.INVALID_SPAN_CONTEXT; + } + }); + const O = __nccwpck_require__(67); + Object.defineProperty(e, "context", { + enumerable: true, + get: function() { + return O.context; + } + }); + const P = __nccwpck_require__(506); + Object.defineProperty(e, "diag", { + enumerable: true, + get: function() { + return P.diag; + } + }); + const N = __nccwpck_require__(886); + Object.defineProperty(e, "metrics", { + enumerable: true, + get: function() { + return N.metrics; + } + }); + const S = __nccwpck_require__(939); + Object.defineProperty(e, "propagation", { + enumerable: true, + get: function() { + return S.propagation; + } + }); + const C = __nccwpck_require__(845); + Object.defineProperty(e, "trace", { + enumerable: true, + get: function() { + return C.trace; + } + }); + e["default"] = { + context: O.context, + diag: P.diag, + metrics: N.metrics, + propagation: S.propagation, + trace: C.trace + }; + })(); + module.exports = r; +})(); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/trace/tracer.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "BubbledError", + ()=>BubbledError, + "SpanKind", + ()=>SpanKind, + "SpanStatusCode", + ()=>SpanStatusCode, + "getTracer", + ()=>getTracer, + "isBubbledError", + ()=>isBubbledError +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/trace/constants.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$is$2d$thenable$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/is-thenable.js [middleware-edge] (ecmascript)"); +; +; +let api; +// we want to allow users to use their own version of @opentelemetry/api if they +// want to, so we try to require it first, and if it fails we fall back to the +// version that is bundled with Next.js +// this is because @opentelemetry/api has to be synced with the version of +// @opentelemetry/tracing that is used, and we don't want to force users to use +// the version that is bundled with Next.js. +// the API is ~stable, so this should be fine +if ("TURBOPACK compile-time truthy", 1) { + api = __turbopack_context__.r("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@opentelemetry/api/index.js [middleware-edge] (ecmascript)"); +} else //TURBOPACK unreachable +; +const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api; +class BubbledError extends Error { + constructor(bubble, result){ + super(), this.bubble = bubble, this.result = result; + } +} +function isBubbledError(error) { + if (typeof error !== 'object' || error === null) return false; + return error instanceof BubbledError; +} +const closeSpanWithError = (span, error)=>{ + if (isBubbledError(error) && error.bubble) { + span.setAttribute('next.bubble', true); + } else { + if (error) { + span.recordException(error); + span.setAttribute('error.type', error.name); + } + span.setStatus({ + code: SpanStatusCode.ERROR, + message: error == null ? void 0 : error.message + }); + } + span.end(); +}; +/** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map(); +const rootSpanIdKey = api.createContextKey('next.rootSpanId'); +let lastSpanId = 0; +const getSpanId = ()=>lastSpanId++; +const clientTraceDataSetter = { + set (carrier, key, value) { + carrier.push({ + key, + value + }); + } +}; +class NextTracerImpl { + /** + * Returns an instance to the trace with configured name. + * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization, + * This should be lazily evaluated. + */ getTracerInstance() { + return trace.getTracer('next.js', '0.0.1'); + } + getContext() { + return context; + } + getTracePropagationData() { + const activeContext = context.active(); + const entries = []; + propagation.inject(activeContext, entries, clientTraceDataSetter); + return entries; + } + getActiveScopeSpan() { + return trace.getSpan(context == null ? void 0 : context.active()); + } + withPropagatedContext(carrier, fn, getter) { + const activeContext = context.active(); + if (trace.getSpanContext(activeContext)) { + // Active span is already set, too late to propagate. + return fn(); + } + const remoteContext = propagation.extract(activeContext, carrier, getter); + return context.with(remoteContext, fn); + } + trace(...args) { + var _trace_getSpanContext; + const [type, fnOrOptions, fnOrEmpty] = args; + // coerce options form overload + const { fn, options } = typeof fnOrOptions === 'function' ? { + fn: fnOrOptions, + options: {} + } : { + fn: fnOrEmpty, + options: { + ...fnOrOptions + } + }; + const spanName = options.spanName ?? type; + if (!__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextVanillaSpanAllowlist"].includes(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) { + return fn(); + } + // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it. + let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); + let isRootSpan = false; + if (!spanContext) { + spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT; + isRootSpan = true; + } else if ((_trace_getSpanContext = trace.getSpanContext(spanContext)) == null ? void 0 : _trace_getSpanContext.isRemote) { + isRootSpan = true; + } + const spanId = getSpanId(); + options.attributes = { + 'next.span_name': spanName, + 'next.span_type': type, + ...options.attributes + }; + return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{ + const startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined; + const onCleanup = ()=>{ + rootSpanAttributesStore.delete(spanId); + if (startTime && process.env.NEXT_OTEL_PERFORMANCE_PREFIX && __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["LogSpanAllowList"].includes(type || '')) { + performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, { + start: startTime, + end: performance.now() + }); + } + }; + if (isRootSpan) { + rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {}))); + } + try { + if (fn.length > 1) { + return fn(span, (err)=>closeSpanWithError(span, err)); + } + const result = fn(span); + if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$is$2d$thenable$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["isThenable"])(result)) { + // If there's error make sure it throws + return result.then((res)=>{ + span.end(); + // Need to pass down the promise result, + // it could be react stream response with error { error, stream } + return res; + }).catch((err)=>{ + closeSpanWithError(span, err); + throw err; + }).finally(onCleanup); + } else { + span.end(); + onCleanup(); + } + return result; + } catch (err) { + closeSpanWithError(span, err); + onCleanup(); + throw err; + } + })); + } + wrap(...args) { + const tracer = this; + const [name, options, fn] = args.length === 3 ? args : [ + args[0], + {}, + args[1] + ]; + if (!__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextVanillaSpanAllowlist"].includes(name) && process.env.NEXT_OTEL_VERBOSE !== '1') { + return fn; + } + return function() { + let optionsObj = options; + if (typeof optionsObj === 'function' && typeof fn === 'function') { + optionsObj = optionsObj.apply(this, arguments); + } + const lastArgId = arguments.length - 1; + const cb = arguments[lastArgId]; + if (typeof cb === 'function') { + const scopeBoundCb = tracer.getContext().bind(context.active(), cb); + return tracer.trace(name, optionsObj, (_span, done)=>{ + arguments[lastArgId] = function(err) { + done == null ? void 0 : done(err); + return scopeBoundCb.apply(this, arguments); + }; + return fn.apply(this, arguments); + }); + } else { + return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments)); + } + }; + } + startSpan(...args) { + const [type, options] = args; + const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan()); + return this.getTracerInstance().startSpan(type, options, spanContext); + } + getSpanContext(parentSpan) { + const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined; + return spanContext; + } + getRootSpanAttributes() { + const spanId = context.active().getValue(rootSpanIdKey); + return rootSpanAttributesStore.get(spanId); + } + setRootSpanAttribute(key, value) { + const spanId = context.active().getValue(rootSpanIdKey); + const attributes = rootSpanAttributesStore.get(spanId); + if (attributes) { + attributes.set(key, value); + } + } +} +const getTracer = (()=>{ + const tracer = new NextTracerImpl(); + return ()=>tracer; +})(); +; + //# sourceMappingURL=tracer.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/cookie/index.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { + +(()=>{ + "use strict"; + if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/cookie") + "/"; + var e = {}; + (()=>{ + var r = e; + /*! + * cookie + * Copyright(c) 2012-2014 Roman Shtylman + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ 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; +})(); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/api-utils/index.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "ApiError", + ()=>ApiError, + "COOKIE_NAME_PRERENDER_BYPASS", + ()=>COOKIE_NAME_PRERENDER_BYPASS, + "COOKIE_NAME_PRERENDER_DATA", + ()=>COOKIE_NAME_PRERENDER_DATA, + "RESPONSE_LIMIT_DEFAULT", + ()=>RESPONSE_LIMIT_DEFAULT, + "SYMBOL_CLEARED_COOKIES", + ()=>SYMBOL_CLEARED_COOKIES, + "SYMBOL_PREVIEW_DATA", + ()=>SYMBOL_PREVIEW_DATA, + "checkIsOnDemandRevalidate", + ()=>checkIsOnDemandRevalidate, + "clearPreviewData", + ()=>clearPreviewData, + "redirect", + ()=>redirect, + "sendError", + ()=>sendError, + "sendStatusCode", + ()=>sendStatusCode, + "setLazyProp", + ()=>setLazyProp, + "wrapApiHandler", + ()=>wrapApiHandler +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/constants.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$tracer$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/trace/tracer.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/trace/constants.js [middleware-edge] (ecmascript)"); +; +; +; +; +function wrapApiHandler(page, handler) { + return (...args)=>{ + (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$tracer$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getTracer"])().setRootSpanAttribute('next.route', page); + // Call API route method + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$tracer$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getTracer"])().trace(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NodeSpan"].runHandler, { + spanName: `executing api route (pages) ${page}` + }, ()=>handler(...args)); + }; +} +function sendStatusCode(res, statusCode) { + res.statusCode = statusCode; + return res; +} +function redirect(res, statusOrUrl, url) { + if (typeof statusOrUrl === 'string') { + url = statusOrUrl; + statusOrUrl = 307; + } + if (typeof statusOrUrl !== 'number' || typeof url !== 'string') { + throw Object.defineProperty(new Error(`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').`), "__NEXT_ERROR_CODE", { + value: "E389", + enumerable: false, + configurable: true + }); + } + res.writeHead(statusOrUrl, { + Location: url + }); + res.write(url); + res.end(); + return res; +} +function checkIsOnDemandRevalidate(req, previewProps) { + const headers = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["HeadersAdapter"].from(req.headers); + const previewModeId = headers.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["PRERENDER_REVALIDATE_HEADER"]); + const isOnDemandRevalidate = previewModeId === previewProps.previewModeId; + const revalidateOnlyGenerated = headers.has(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER"]); + return { + isOnDemandRevalidate, + revalidateOnlyGenerated + }; +} +const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`; +const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`; +const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024; +const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA); +const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS); +function clearPreviewData(res, options = {}) { + if (SYMBOL_CLEARED_COOKIES in res) { + return res; + } + const { serialize } = __turbopack_context__.r("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/cookie/index.js [middleware-edge] (ecmascript)"); + const previous = res.getHeader('Set-Cookie'); + res.setHeader(`Set-Cookie`, [ + ...typeof previous === 'string' ? [ + previous + ] : Array.isArray(previous) ? previous : [], + serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { + // To delete a cookie, set `expires` to a date in the past: + // https://tools.ietf.org/html/rfc6265#section-4.1.1 + // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. + expires: new Date(0), + httpOnly: true, + sameSite: ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : 'lax', + secure: ("TURBOPACK compile-time value", "development") !== 'development', + path: '/', + ...options.path !== undefined ? { + path: options.path + } : undefined + }), + serialize(COOKIE_NAME_PRERENDER_DATA, '', { + // To delete a cookie, set `expires` to a date in the past: + // https://tools.ietf.org/html/rfc6265#section-4.1.1 + // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. + expires: new Date(0), + httpOnly: true, + sameSite: ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : 'lax', + secure: ("TURBOPACK compile-time value", "development") !== 'development', + path: '/', + ...options.path !== undefined ? { + path: options.path + } : undefined + }) + ]); + Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, { + value: true, + enumerable: false + }); + return res; +} +class ApiError extends Error { + constructor(statusCode, message){ + super(message); + this.statusCode = statusCode; + } +} +function sendError(res, statusCode, message) { + res.statusCode = statusCode; + res.statusMessage = message; + res.end(message); +} +function setLazyProp({ req }, prop, getter) { + const opts = { + configurable: true, + enumerable: true + }; + const optsReset = { + ...opts, + writable: true + }; + Object.defineProperty(req, prop, { + ...opts, + get: ()=>{ + const value = getter(); + // we set the property on the object to avoid recalculating it + Object.defineProperty(req, prop, { + ...optsReset, + value + }); + return value; + }, + set: (value)=>{ + Object.defineProperty(req, prop, { + ...optsReset, + value + }); + } + }); +} //# sourceMappingURL=index.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "DraftModeProvider", + ()=>DraftModeProvider +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$api$2d$utils$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/api-utils/index.js [middleware-edge] (ecmascript)"); +; +class DraftModeProvider { + constructor(previewProps, req, cookies, mutableCookies){ + var _cookies_get; + // The logic for draftMode() is very similar to tryGetPreviewData() + // but Draft Mode does not have any data associated with it. + const isOnDemandRevalidate = previewProps && (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$api$2d$utils$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["checkIsOnDemandRevalidate"])(req, previewProps).isOnDemandRevalidate; + const cookieValue = (_cookies_get = cookies.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$api$2d$utils$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["COOKIE_NAME_PRERENDER_BYPASS"])) == null ? void 0 : _cookies_get.value; + this._isEnabled = Boolean(!isOnDemandRevalidate && cookieValue && previewProps && (cookieValue === previewProps.previewModeId || // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`. + ("TURBOPACK compile-time value", "development") !== 'production' && previewProps.previewModeId === 'development-id')); + this._previewModeId = previewProps == null ? void 0 : previewProps.previewModeId; + this._mutableCookies = mutableCookies; + } + get isEnabled() { + return this._isEnabled; + } + enable() { + if (!this._previewModeId) { + throw Object.defineProperty(new Error('Invariant: previewProps missing previewModeId this should never happen'), "__NEXT_ERROR_CODE", { + value: "E93", + enumerable: false, + configurable: true + }); + } + this._mutableCookies.set({ + name: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$api$2d$utils$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["COOKIE_NAME_PRERENDER_BYPASS"], + value: this._previewModeId, + httpOnly: true, + sameSite: ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : 'lax', + secure: ("TURBOPACK compile-time value", "development") !== 'development', + path: '/' + }); + this._isEnabled = true; + } + disable() { + // To delete a cookie, set `expires` to a date in the past: + // https://tools.ietf.org/html/rfc6265#section-4.1.1 + // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. + this._mutableCookies.set({ + name: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$api$2d$utils$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["COOKIE_NAME_PRERENDER_BYPASS"], + value: '', + httpOnly: true, + sameSite: ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : 'lax', + secure: ("TURBOPACK compile-time value", "development") !== 'development', + path: '/', + expires: new Date(0) + }); + this._isEnabled = false; + } +} //# sourceMappingURL=draft-mode-provider.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/async-storage/request-store.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "createRequestStoreForAPI", + ()=>createRequestStoreForAPI, + "createRequestStoreForRender", + ()=>createRequestStoreForRender, + "synchronizeMutableCookies", + ()=>synchronizeMutableCookies +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/app-router-headers.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$request$2d$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/cookies.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$async$2d$storage$2f$draft$2d$mode$2d$provider$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/utils.js [middleware-edge] (ecmascript)"); +; +; +; +; +; +; +function getHeaders(headers) { + const cleaned = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["HeadersAdapter"].from(headers); + for (const header of __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["FLIGHT_HEADERS"]){ + cleaned.delete(header); + } + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["HeadersAdapter"].seal(cleaned); +} +function getMutableCookies(headers, onUpdateCookies) { + const cookies = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RequestCookies"](__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["HeadersAdapter"].from(headers)); + return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$request$2d$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["MutableRequestCookiesAdapter"].wrap(cookies, onUpdateCookies); +} +/** + * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`), + * then merge those into the existing cookie object, so that when `cookies()` is accessed + * it's able to read the newly set cookies. + */ function mergeMiddlewareCookies(req, existingCookies) { + if ('x-middleware-set-cookie' in req.headers && typeof req.headers['x-middleware-set-cookie'] === 'string') { + const setCookieValue = req.headers['x-middleware-set-cookie']; + const responseHeaders = new Headers(); + for (const cookie of (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["splitCookiesString"])(setCookieValue)){ + responseHeaders.append('set-cookie', cookie); + } + const responseCookies = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ResponseCookies"](responseHeaders); + // Transfer cookies from ResponseCookies to RequestCookies + for (const cookie of responseCookies.getAll()){ + existingCookies.set(cookie); + } + } +} +function createRequestStoreForRender(req, res, url, rootParams, implicitTags, onUpdateCookies, previewProps, isHmrRefresh, serverComponentsHmrCache, renderResumeDataCache, devFallbackParams) { + return createRequestStoreImpl('render', req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams); +} +function createRequestStoreForAPI(req, url, implicitTags, onUpdateCookies, previewProps) { + return createRequestStoreImpl('action', req, undefined, url, {}, implicitTags, onUpdateCookies, undefined, previewProps, false, undefined, null); +} +function createRequestStoreImpl(phase, req, res, url, rootParams, implicitTags, onUpdateCookies, renderResumeDataCache, previewProps, isHmrRefresh, serverComponentsHmrCache, devFallbackParams) { + function defaultOnUpdateCookies(cookies) { + if (res) { + res.setHeader('Set-Cookie', cookies); + } + } + const cache = {}; + return { + type: 'request', + phase, + implicitTags, + // Rather than just using the whole `url` here, we pull the parts we want + // to ensure we don't use parts of the URL that we shouldn't. This also + // lets us avoid requiring an empty string for `search` in the type. + url: { + pathname: url.pathname, + search: url.search ?? '' + }, + rootParams, + get headers () { + if (!cache.headers) { + // Seal the headers object that'll freeze out any methods that could + // mutate the underlying data. + cache.headers = getHeaders(req.headers); + } + return cache.headers; + }, + get cookies () { + if (!cache.cookies) { + // if middleware is setting cookie(s), then include those in + // the initial cached cookies so they can be read in render + const requestCookies = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f40$edge$2d$runtime$2f$cookies$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RequestCookies"](__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["HeadersAdapter"].from(req.headers)); + mergeMiddlewareCookies(req, requestCookies); + // Seal the cookies object that'll freeze out any methods that could + // mutate the underlying data. + cache.cookies = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$request$2d$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RequestCookiesAdapter"].seal(requestCookies); + } + return cache.cookies; + }, + set cookies (value){ + cache.cookies = value; + }, + get mutableCookies () { + if (!cache.mutableCookies) { + const mutableCookies = getMutableCookies(req.headers, onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)); + mergeMiddlewareCookies(req, mutableCookies); + cache.mutableCookies = mutableCookies; + } + return cache.mutableCookies; + }, + get userspaceMutableCookies () { + if (!cache.userspaceMutableCookies) { + const userspaceMutableCookies = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$request$2d$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createCookiesWithMutableAccessCheck"])(this); + cache.userspaceMutableCookies = userspaceMutableCookies; + } + return cache.userspaceMutableCookies; + }, + get draftMode () { + if (!cache.draftMode) { + cache.draftMode = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$async$2d$storage$2f$draft$2d$mode$2d$provider$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["DraftModeProvider"](previewProps, req, this.cookies, this.mutableCookies); + } + return cache.draftMode; + }, + renderResumeDataCache: renderResumeDataCache ?? null, + isHmrRefresh, + serverComponentsHmrCache: serverComponentsHmrCache || globalThis.__serverComponentsHmrCache, + devFallbackParams + }; +} +function synchronizeMutableCookies(store) { + // TODO: does this need to update headers as well? + store.cookies = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$request$2d$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RequestCookiesAdapter"].seal((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$request$2d$cookies$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["responseCookiesToRequestCookies"])(store.mutableCookies)); +} //# sourceMappingURL=request-store.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "workUnitAsyncStorageInstance", + ()=>workUnitAsyncStorageInstance +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/async-local-storage.js [middleware-edge] (ecmascript)"); +; +const workUnitAsyncStorageInstance = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createAsyncLocalStorage"])(); //# sourceMappingURL=work-unit-async-storage-instance.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/invariant-error.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "InvariantError", + ()=>InvariantError +]); +class InvariantError extends Error { + constructor(message, options){ + super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options); + this.name = 'InvariantError'; + } +} //# sourceMappingURL=invariant-error.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +// Share the instance module in the next-shared layer +__turbopack_context__.s([ + "getCacheSignal", + ()=>getCacheSignal, + "getDraftModeProviderForCacheScope", + ()=>getDraftModeProviderForCacheScope, + "getHmrRefreshHash", + ()=>getHmrRefreshHash, + "getPrerenderResumeDataCache", + ()=>getPrerenderResumeDataCache, + "getRenderResumeDataCache", + ()=>getRenderResumeDataCache, + "getRuntimeStagePromise", + ()=>getRuntimeStagePromise, + "getServerComponentsHmrCache", + ()=>getServerComponentsHmrCache, + "isHmrRefresh", + ()=>isHmrRefresh, + "throwForMissingRequestStore", + ()=>throwForMissingRequestStore, + "throwInvariantForMissingStore", + ()=>throwInvariantForMissingStore +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/app-router-headers.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/invariant-error.js [middleware-edge] (ecmascript)"); +; +; +; +; +function throwForMissingRequestStore(callingExpression) { + throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", { + value: "E251", + enumerable: false, + configurable: true + }); +} +function throwInvariantForMissingStore() { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["InvariantError"]('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", { + value: "E696", + enumerable: false, + configurable: true + }); +} +function getPrerenderResumeDataCache(workUnitStore) { + switch(workUnitStore.type){ + case 'prerender': + case 'prerender-runtime': + case 'prerender-ppr': + return workUnitStore.prerenderResumeDataCache; + case 'prerender-client': + // TODO eliminate fetch caching in client scope and stop exposing this data + // cache during SSR. + return workUnitStore.prerenderResumeDataCache; + case 'prerender-legacy': + case 'request': + case 'cache': + case 'private-cache': + case 'unstable-cache': + return null; + default: + return workUnitStore; + } +} +function getRenderResumeDataCache(workUnitStore) { + switch(workUnitStore.type){ + case 'request': + return workUnitStore.renderResumeDataCache; + case 'prerender': + case 'prerender-runtime': + case 'prerender-client': + if (workUnitStore.renderResumeDataCache) { + // If we are in a prerender, we might have a render resume data cache + // that is used to read from prefilled caches. + return workUnitStore.renderResumeDataCache; + } + // fallthrough + case 'prerender-ppr': + // Otherwise we return the mutable resume data cache here as an immutable + // version of the cache as it can also be used for reading. + return workUnitStore.prerenderResumeDataCache; + case 'cache': + case 'private-cache': + case 'unstable-cache': + case 'prerender-legacy': + return null; + default: + return workUnitStore; + } +} +function getHmrRefreshHash(workStore, workUnitStore) { + if (workStore.dev) { + switch(workUnitStore.type){ + case 'cache': + case 'private-cache': + case 'prerender': + case 'prerender-runtime': + return workUnitStore.hmrRefreshHash; + case 'request': + var _workUnitStore_cookies_get; + return (_workUnitStore_cookies_get = workUnitStore.cookies.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_HMR_REFRESH_HASH_COOKIE"])) == null ? void 0 : _workUnitStore_cookies_get.value; + case 'prerender-client': + case 'prerender-ppr': + case 'prerender-legacy': + case 'unstable-cache': + break; + default: + workUnitStore; + } + } + return undefined; +} +function isHmrRefresh(workStore, workUnitStore) { + if (workStore.dev) { + switch(workUnitStore.type){ + case 'cache': + case 'private-cache': + case 'request': + return workUnitStore.isHmrRefresh ?? false; + case 'prerender': + case 'prerender-client': + case 'prerender-runtime': + case 'prerender-ppr': + case 'prerender-legacy': + case 'unstable-cache': + break; + default: + workUnitStore; + } + } + return false; +} +function getServerComponentsHmrCache(workStore, workUnitStore) { + if (workStore.dev) { + switch(workUnitStore.type){ + case 'cache': + case 'private-cache': + case 'request': + return workUnitStore.serverComponentsHmrCache; + case 'prerender': + case 'prerender-client': + case 'prerender-runtime': + case 'prerender-ppr': + case 'prerender-legacy': + case 'unstable-cache': + break; + default: + workUnitStore; + } + } + return undefined; +} +function getDraftModeProviderForCacheScope(workStore, workUnitStore) { + if (workStore.isDraftMode) { + switch(workUnitStore.type){ + case 'cache': + case 'private-cache': + case 'unstable-cache': + case 'prerender-runtime': + case 'request': + return workUnitStore.draftMode; + case 'prerender': + case 'prerender-client': + case 'prerender-ppr': + case 'prerender-legacy': + break; + default: + workUnitStore; + } + } + return undefined; +} +function getCacheSignal(workUnitStore) { + switch(workUnitStore.type){ + case 'prerender': + case 'prerender-client': + case 'prerender-runtime': + return workUnitStore.cacheSignal; + case 'prerender-ppr': + case 'prerender-legacy': + case 'request': + case 'cache': + case 'private-cache': + case 'unstable-cache': + return null; + default: + return workUnitStore; + } +} +function getRuntimeStagePromise(workUnitStore) { + switch(workUnitStore.type){ + case 'prerender-runtime': + case 'private-cache': + return workUnitStore.runtimeStagePromise; + case 'prerender': + case 'prerender-client': + case 'prerender-ppr': + case 'prerender-legacy': + case 'request': + case 'cache': + case 'unstable-cache': + return null; + default: + return workUnitStore; + } +} //# sourceMappingURL=work-unit-async-storage.external.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "workUnitAsyncStorage", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["workUnitAsyncStorageInstance"] +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js [middleware-edge] (ecmascript)"); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/p-queue/index.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { + +(()=>{ + "use strict"; + var e = { + 993: (e)=>{ + var t = Object.prototype.hasOwnProperty, n = "~"; + function Events() {} + if (Object.create) { + Events.prototype = Object.create(null); + if (!(new Events).__proto__) n = false; + } + function EE(e, t, n) { + this.fn = e; + this.context = t; + this.once = n || false; + } + function addListener(e, t, r, i, s) { + if (typeof r !== "function") { + throw new TypeError("The listener must be a function"); + } + var o = new EE(r, i || e, s), u = n ? n + t : t; + if (!e._events[u]) e._events[u] = o, e._eventsCount++; + else if (!e._events[u].fn) e._events[u].push(o); + else e._events[u] = [ + e._events[u], + o + ]; + return e; + } + function clearEvent(e, t) { + if (--e._eventsCount === 0) e._events = new Events; + else delete e._events[t]; + } + function EventEmitter() { + this._events = new Events; + this._eventsCount = 0; + } + EventEmitter.prototype.eventNames = function eventNames() { + var e = [], r, i; + if (this._eventsCount === 0) return e; + for(i in r = this._events){ + if (t.call(r, i)) e.push(n ? i.slice(1) : i); + } + if (Object.getOwnPropertySymbols) { + return e.concat(Object.getOwnPropertySymbols(r)); + } + return e; + }; + EventEmitter.prototype.listeners = function listeners(e) { + var t = n ? n + e : e, r = this._events[t]; + if (!r) return []; + if (r.fn) return [ + r.fn + ]; + for(var i = 0, s = r.length, o = new Array(s); i < s; i++){ + o[i] = r[i].fn; + } + return o; + }; + EventEmitter.prototype.listenerCount = function listenerCount(e) { + var t = n ? n + e : e, r = this._events[t]; + if (!r) return 0; + if (r.fn) return 1; + return r.length; + }; + EventEmitter.prototype.emit = function emit(e, t, r, i, s, o) { + var u = n ? n + e : e; + if (!this._events[u]) return false; + var a = this._events[u], l = arguments.length, c, h; + if (a.fn) { + if (a.once) this.removeListener(e, a.fn, undefined, true); + switch(l){ + case 1: + return a.fn.call(a.context), true; + case 2: + return a.fn.call(a.context, t), true; + case 3: + return a.fn.call(a.context, t, r), true; + case 4: + return a.fn.call(a.context, t, r, i), true; + case 5: + return a.fn.call(a.context, t, r, i, s), true; + case 6: + return a.fn.call(a.context, t, r, i, s, o), true; + } + for(h = 1, c = new Array(l - 1); h < l; h++){ + c[h - 1] = arguments[h]; + } + a.fn.apply(a.context, c); + } else { + var _ = a.length, f; + for(h = 0; h < _; h++){ + if (a[h].once) this.removeListener(e, a[h].fn, undefined, true); + switch(l){ + case 1: + a[h].fn.call(a[h].context); + break; + case 2: + a[h].fn.call(a[h].context, t); + break; + case 3: + a[h].fn.call(a[h].context, t, r); + break; + case 4: + a[h].fn.call(a[h].context, t, r, i); + break; + default: + if (!c) for(f = 1, c = new Array(l - 1); f < l; f++){ + c[f - 1] = arguments[f]; + } + a[h].fn.apply(a[h].context, c); + } + } + } + return true; + }; + EventEmitter.prototype.on = function on(e, t, n) { + return addListener(this, e, t, n, false); + }; + EventEmitter.prototype.once = function once(e, t, n) { + return addListener(this, e, t, n, true); + }; + EventEmitter.prototype.removeListener = function removeListener(e, t, r, i) { + var s = n ? n + e : e; + if (!this._events[s]) return this; + if (!t) { + clearEvent(this, s); + return this; + } + var o = this._events[s]; + if (o.fn) { + if (o.fn === t && (!i || o.once) && (!r || o.context === r)) { + clearEvent(this, s); + } + } else { + for(var u = 0, a = [], l = o.length; u < l; u++){ + if (o[u].fn !== t || i && !o[u].once || r && o[u].context !== r) { + a.push(o[u]); + } + } + if (a.length) this._events[s] = a.length === 1 ? a[0] : a; + else clearEvent(this, s); + } + return this; + }; + EventEmitter.prototype.removeAllListeners = function removeAllListeners(e) { + var t; + if (e) { + t = n ? n + e : e; + if (this._events[t]) clearEvent(this, t); + } else { + this._events = new Events; + this._eventsCount = 0; + } + return this; + }; + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + EventEmitter.prefixed = n; + EventEmitter.EventEmitter = EventEmitter; + if ("TURBOPACK compile-time truthy", 1) { + e.exports = EventEmitter; + } + }, + 213: (e)=>{ + e.exports = (e, t)=>{ + t = t || (()=>{}); + return e.then((e)=>new Promise((e)=>{ + e(t()); + }).then(()=>e), (e)=>new Promise((e)=>{ + e(t()); + }).then(()=>{ + throw e; + })); + }; + }, + 574: (e, t)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + function lowerBound(e, t, n) { + let r = 0; + let i = e.length; + while(i > 0){ + const s = i / 2 | 0; + let o = r + s; + if (n(e[o], t) <= 0) { + r = ++o; + i -= s + 1; + } else { + i = s; + } + } + return r; + } + t["default"] = lowerBound; + }, + 821: (e, t, n)=>{ + Object.defineProperty(t, "__esModule", { + value: true + }); + const r = n(574); + class PriorityQueue { + constructor(){ + this._queue = []; + } + enqueue(e, t) { + t = Object.assign({ + priority: 0 + }, t); + const n = { + priority: t.priority, + run: e + }; + if (this.size && this._queue[this.size - 1].priority >= t.priority) { + this._queue.push(n); + return; + } + const i = r.default(this._queue, n, (e, t)=>t.priority - e.priority); + this._queue.splice(i, 0, n); + } + dequeue() { + const e = this._queue.shift(); + return e === null || e === void 0 ? void 0 : e.run; + } + filter(e) { + return this._queue.filter((t)=>t.priority === e.priority).map((e)=>e.run); + } + get size() { + return this._queue.length; + } + } + t["default"] = PriorityQueue; + }, + 816: (e, t, n)=>{ + const r = n(213); + class TimeoutError extends Error { + constructor(e){ + super(e); + this.name = "TimeoutError"; + } + } + const pTimeout = (e, t, n)=>new Promise((i, s)=>{ + if (typeof t !== "number" || t < 0) { + throw new TypeError("Expected `milliseconds` to be a positive number"); + } + if (t === Infinity) { + i(e); + return; + } + const o = setTimeout(()=>{ + if (typeof n === "function") { + try { + i(n()); + } catch (e) { + s(e); + } + return; + } + const r = typeof n === "string" ? n : `Promise timed out after ${t} milliseconds`; + const o = n instanceof Error ? n : new TimeoutError(r); + if (typeof e.cancel === "function") { + e.cancel(); + } + s(o); + }, t); + r(e.then(i, s), ()=>{ + clearTimeout(o); + }); + }); + e.exports = pTimeout; + e.exports["default"] = pTimeout; + e.exports.TimeoutError = TimeoutError; + } + }; + var t = {}; + function __nccwpck_require__(n) { + var r = t[n]; + if (r !== undefined) { + return r.exports; + } + var i = t[n] = { + exports: {} + }; + var s = true; + try { + e[n](i, i.exports, __nccwpck_require__); + s = false; + } finally{ + if (s) delete t[n]; + } + return i.exports; + } + if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/p-queue") + "/"; + var n = {}; + (()=>{ + var e = n; + Object.defineProperty(e, "__esModule", { + value: true + }); + const t = __nccwpck_require__(993); + const r = __nccwpck_require__(816); + const i = __nccwpck_require__(821); + const empty = ()=>{}; + const s = new r.TimeoutError; + class PQueue extends t { + constructor(e){ + var t, n, r, s; + super(); + this._intervalCount = 0; + this._intervalEnd = 0; + this._pendingCount = 0; + this._resolveEmpty = empty; + this._resolveIdle = empty; + e = Object.assign({ + carryoverConcurrencyCount: false, + intervalCap: Infinity, + interval: 0, + concurrency: Infinity, + autoStart: true, + queueClass: i.default + }, e); + if (!(typeof e.intervalCap === "number" && e.intervalCap >= 1)) { + throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n = (t = e.intervalCap) === null || t === void 0 ? void 0 : t.toString()) !== null && n !== void 0 ? n : ""}\` (${typeof e.intervalCap})`); + } + if (e.interval === undefined || !(Number.isFinite(e.interval) && e.interval >= 0)) { + throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s = (r = e.interval) === null || r === void 0 ? void 0 : r.toString()) !== null && s !== void 0 ? s : ""}\` (${typeof e.interval})`); + } + this._carryoverConcurrencyCount = e.carryoverConcurrencyCount; + this._isIntervalIgnored = e.intervalCap === Infinity || e.interval === 0; + this._intervalCap = e.intervalCap; + this._interval = e.interval; + this._queue = new e.queueClass; + this._queueClass = e.queueClass; + this.concurrency = e.concurrency; + this._timeout = e.timeout; + this._throwOnTimeout = e.throwOnTimeout === true; + this._isPaused = e.autoStart === false; + } + get _doesIntervalAllowAnother() { + return this._isIntervalIgnored || this._intervalCount < this._intervalCap; + } + get _doesConcurrentAllowAnother() { + return this._pendingCount < this._concurrency; + } + _next() { + this._pendingCount--; + this._tryToStartAnother(); + this.emit("next"); + } + _resolvePromises() { + this._resolveEmpty(); + this._resolveEmpty = empty; + if (this._pendingCount === 0) { + this._resolveIdle(); + this._resolveIdle = empty; + this.emit("idle"); + } + } + _onResumeInterval() { + this._onInterval(); + this._initializeIntervalIfNeeded(); + this._timeoutId = undefined; + } + _isIntervalPaused() { + const e = Date.now(); + if (this._intervalId === undefined) { + const t = this._intervalEnd - e; + if (t < 0) { + this._intervalCount = this._carryoverConcurrencyCount ? this._pendingCount : 0; + } else { + if (this._timeoutId === undefined) { + this._timeoutId = setTimeout(()=>{ + this._onResumeInterval(); + }, t); + } + return true; + } + } + return false; + } + _tryToStartAnother() { + if (this._queue.size === 0) { + if (this._intervalId) { + clearInterval(this._intervalId); + } + this._intervalId = undefined; + this._resolvePromises(); + return false; + } + if (!this._isPaused) { + const e = !this._isIntervalPaused(); + if (this._doesIntervalAllowAnother && this._doesConcurrentAllowAnother) { + const t = this._queue.dequeue(); + if (!t) { + return false; + } + this.emit("active"); + t(); + if (e) { + this._initializeIntervalIfNeeded(); + } + return true; + } + } + return false; + } + _initializeIntervalIfNeeded() { + if (this._isIntervalIgnored || this._intervalId !== undefined) { + return; + } + this._intervalId = setInterval(()=>{ + this._onInterval(); + }, this._interval); + this._intervalEnd = Date.now() + this._interval; + } + _onInterval() { + if (this._intervalCount === 0 && this._pendingCount === 0 && this._intervalId) { + clearInterval(this._intervalId); + this._intervalId = undefined; + } + this._intervalCount = this._carryoverConcurrencyCount ? this._pendingCount : 0; + this._processQueue(); + } + _processQueue() { + while(this._tryToStartAnother()){} + } + get concurrency() { + return this._concurrency; + } + set concurrency(e) { + if (!(typeof e === "number" && e >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`); + } + this._concurrency = e; + this._processQueue(); + } + async add(e, t = {}) { + return new Promise((n, i)=>{ + const run = async ()=>{ + this._pendingCount++; + this._intervalCount++; + try { + const o = this._timeout === undefined && t.timeout === undefined ? e() : r.default(Promise.resolve(e()), t.timeout === undefined ? this._timeout : t.timeout, ()=>{ + if (t.throwOnTimeout === undefined ? this._throwOnTimeout : t.throwOnTimeout) { + i(s); + } + return undefined; + }); + n(await o); + } catch (e) { + i(e); + } + this._next(); + }; + this._queue.enqueue(run, t); + this._tryToStartAnother(); + this.emit("add"); + }); + } + async addAll(e, t) { + return Promise.all(e.map(async (e)=>this.add(e, t))); + } + start() { + if (!this._isPaused) { + return this; + } + this._isPaused = false; + this._processQueue(); + return this; + } + pause() { + this._isPaused = true; + } + clear() { + this._queue = new this._queueClass; + } + async onEmpty() { + if (this._queue.size === 0) { + return; + } + return new Promise((e)=>{ + const t = this._resolveEmpty; + this._resolveEmpty = ()=>{ + t(); + e(); + }; + }); + } + async onIdle() { + if (this._pendingCount === 0 && this._queue.size === 0) { + return; + } + return new Promise((e)=>{ + const t = this._resolveIdle; + this._resolveIdle = ()=>{ + t(); + e(); + }; + }); + } + get size() { + return this._queue.size; + } + sizeBy(e) { + return this._queue.filter(e).length; + } + get pending() { + return this._pendingCount; + } + get isPaused() { + return this._isPaused; + } + get timeout() { + return this._timeout; + } + set timeout(e) { + this._timeout = e; + } + } + e["default"] = PQueue; + })(); + module.exports = n; +})(); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/lru-cache.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Node in the doubly-linked list used for LRU tracking. + * Each node represents a cache entry with bidirectional pointers. + */ __turbopack_context__.s([ + "LRUCache", + ()=>LRUCache +]); +class LRUNode { + constructor(key, data, size){ + this.prev = null; + this.next = null; + this.key = key; + this.data = data; + this.size = size; + } +} +/** + * Sentinel node used for head/tail boundaries. + * These nodes don't contain actual cache data but simplify list operations. + */ class SentinelNode { + constructor(){ + this.prev = null; + this.next = null; + } +} +class LRUCache { + constructor(maxSize, calculateSize){ + this.cache = new Map(); + this.totalSize = 0; + this.maxSize = maxSize; + this.calculateSize = calculateSize; + // Create sentinel nodes to simplify doubly-linked list operations + // HEAD <-> TAIL (empty list) + this.head = new SentinelNode(); + this.tail = new SentinelNode(); + this.head.next = this.tail; + this.tail.prev = this.head; + } + /** + * Adds a node immediately after the head (marks as most recently used). + * Used when inserting new items or when an item is accessed. + * PRECONDITION: node must be disconnected (prev/next should be null) + */ addToHead(node) { + node.prev = this.head; + node.next = this.head.next; + // head.next is always non-null (points to tail or another node) + this.head.next.prev = node; + this.head.next = node; + } + /** + * Removes a node from its current position in the doubly-linked list. + * Updates the prev/next pointers of adjacent nodes to maintain list integrity. + * PRECONDITION: node must be connected (prev/next are non-null) + */ removeNode(node) { + // Connected nodes always have non-null prev/next + node.prev.next = node.next; + node.next.prev = node.prev; + } + /** + * Moves an existing node to the head position (marks as most recently used). + * This is the core LRU operation - accessed items become most recent. + */ moveToHead(node) { + this.removeNode(node); + this.addToHead(node); + } + /** + * Removes and returns the least recently used node (the one before tail). + * This is called during eviction when the cache exceeds capacity. + * PRECONDITION: cache is not empty (ensured by caller) + */ removeTail() { + const lastNode = this.tail.prev; + // tail.prev is always non-null and always LRUNode when cache is not empty + this.removeNode(lastNode); + return lastNode; + } + /** + * Sets a key-value pair in the cache. + * If the key exists, updates the value and moves to head. + * If new, adds at head and evicts from tail if necessary. + * + * Time Complexity: + * - O(1) for uniform item sizes + * - O(k) where k is the number of items evicted (can be O(N) for variable sizes) + */ set(key, value) { + const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1; + if (size > this.maxSize) { + console.warn('Single item size exceeds maxSize'); + return; + } + const existing = this.cache.get(key); + if (existing) { + // Update existing node: adjust size and move to head (most recent) + existing.data = value; + this.totalSize = this.totalSize - existing.size + size; + existing.size = size; + this.moveToHead(existing); + } else { + // Add new node at head (most recent position) + const newNode = new LRUNode(key, value, size); + this.cache.set(key, newNode); + this.addToHead(newNode); + this.totalSize += size; + } + // Evict least recently used items until under capacity + while(this.totalSize > this.maxSize && this.cache.size > 0){ + const tail = this.removeTail(); + this.cache.delete(tail.key); + this.totalSize -= tail.size; + } + } + /** + * Checks if a key exists in the cache. + * This is a pure query operation - does NOT update LRU order. + * + * Time Complexity: O(1) + */ has(key) { + return this.cache.has(key); + } + /** + * Retrieves a value by key and marks it as most recently used. + * Moving to head maintains the LRU property for future evictions. + * + * Time Complexity: O(1) + */ get(key) { + const node = this.cache.get(key); + if (!node) return undefined; + // Mark as most recently used by moving to head + this.moveToHead(node); + return node.data; + } + /** + * Returns an iterator over the cache entries. The order is outputted in the + * order of most recently used to least recently used. + */ *[Symbol.iterator]() { + let current = this.head.next; + while(current && current !== this.tail){ + // Between head and tail, current is always LRUNode + const node = current; + yield [ + node.key, + node.data + ]; + current = current.next; + } + } + /** + * Removes a specific key from the cache. + * Updates both the hash map and doubly-linked list. + * + * Time Complexity: O(1) + */ remove(key) { + const node = this.cache.get(key); + if (!node) return; + this.removeNode(node); + this.cache.delete(key); + this.totalSize -= node.size; + } + /** + * Returns the number of items in the cache. + */ get size() { + return this.cache.size; + } + /** + * Returns the current total size of all cached items. + * This uses the custom size calculation if provided. + */ get currentSize() { + return this.totalSize; + } +} //# sourceMappingURL=lru-cache.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +// We share the tags manifest between the "use cache" handlers and the previous +// file-system cache. +__turbopack_context__.s([ + "isStale", + ()=>isStale, + "tagsManifest", + ()=>tagsManifest +]); +const tagsManifest = new Map(); +const isStale = (tags, timestamp)=>{ + for (const tag of tags){ + const revalidatedAt = tagsManifest.get(tag); + if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) { + return true; + } + } + return false; +}; //# sourceMappingURL=tags-manifest.external.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * This is the default "use cache" handler it defaults to an in-memory store. + * In-memory caches are fragile and should not use stale-while-revalidate + * semantics on the caches because it's not worth warming up an entry that's + * likely going to get evicted before we get to use it anyway. However, we also + * don't want to reuse a stale entry for too long so stale entries should be + * considered expired/missing in such cache handlers. + */ __turbopack_context__.s([ + "default", + ()=>__TURBOPACK__default__export__ +]); +var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$buffer__$5b$external$5d$__$28$node$3a$buffer$2c$__cjs$29$__ = /*#__PURE__*/ __turbopack_context__.i("[externals]/node:buffer [external] (node:buffer, cjs)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$lru$2d$cache$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/lru-cache.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$incremental$2d$cache$2f$tags$2d$manifest$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/incremental-cache/tags-manifest.external.js [middleware-edge] (ecmascript)"); +; +; +// LRU cache default to max 50 MB but in future track +const memoryCache = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$lru$2d$cache$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["LRUCache"](50 * 1024 * 1024, (entry)=>entry.size); +const pendingSets = new Map(); +const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'DefaultCacheHandler:') : undefined; +const DefaultCacheHandler = { + async get (cacheKey) { + const pendingPromise = pendingSets.get(cacheKey); + if (pendingPromise) { + debug == null ? void 0 : debug('get', cacheKey, 'pending'); + await pendingPromise; + } + const privateEntry = memoryCache.get(cacheKey); + if (!privateEntry) { + debug == null ? void 0 : debug('get', cacheKey, 'not found'); + return undefined; + } + const entry = privateEntry.entry; + if (performance.timeOrigin + performance.now() > entry.timestamp + entry.revalidate * 1000) { + // In-memory caches should expire after revalidate time because it is + // unlikely that a new entry will be able to be used before it is dropped + // from the cache. + debug == null ? void 0 : debug('get', cacheKey, 'expired'); + return undefined; + } + if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$incremental$2d$cache$2f$tags$2d$manifest$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["isStale"])(entry.tags, entry.timestamp)) { + debug == null ? void 0 : debug('get', cacheKey, 'had stale tag'); + return undefined; + } + const [returnStream, newSaved] = entry.value.tee(); + entry.value = newSaved; + debug == null ? void 0 : debug('get', cacheKey, 'found', { + tags: entry.tags, + timestamp: entry.timestamp, + revalidate: entry.revalidate, + expire: entry.expire + }); + return { + ...entry, + value: returnStream + }; + }, + async set (cacheKey, pendingEntry) { + debug == null ? void 0 : debug('set', cacheKey, 'start'); + let resolvePending = ()=>{}; + const pendingPromise = new Promise((resolve)=>{ + resolvePending = resolve; + }); + pendingSets.set(cacheKey, pendingPromise); + const entry = await pendingEntry; + let size = 0; + try { + const [value, clonedValue] = entry.value.tee(); + entry.value = value; + const reader = clonedValue.getReader(); + for(let chunk; !(chunk = await reader.read()).done;){ + size += __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$buffer__$5b$external$5d$__$28$node$3a$buffer$2c$__cjs$29$__["Buffer"].from(chunk.value).byteLength; + } + memoryCache.set(cacheKey, { + entry, + isErrored: false, + errorRetryCount: 0, + size + }); + debug == null ? void 0 : debug('set', cacheKey, 'done'); + } catch (err) { + // TODO: store partial buffer with error after we retry 3 times + debug == null ? void 0 : debug('set', cacheKey, 'failed', err); + } finally{ + resolvePending(); + pendingSets.delete(cacheKey); + } + }, + async refreshTags () { + // Nothing to do for an in-memory cache handler. + }, + async getExpiration (...tags) { + const expiration = Math.max(...tags.map((tag)=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$incremental$2d$cache$2f$tags$2d$manifest$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["tagsManifest"].get(tag) ?? 0)); + debug == null ? void 0 : debug('getExpiration', { + tags, + expiration + }); + return expiration; + }, + async expireTags (...tags) { + const timestamp = Math.round(performance.timeOrigin + performance.now()); + debug == null ? void 0 : debug('expireTags', { + tags, + timestamp + }); + for (const tag of tags){ + // TODO: update file-system-cache? + __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$incremental$2d$cache$2f$tags$2d$manifest$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["tagsManifest"].set(tag, timestamp); + } + } +}; +const __TURBOPACK__default__export__ = DefaultCacheHandler; + //# sourceMappingURL=default.external.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/use-cache/handlers.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "getCacheHandler", + ()=>getCacheHandler, + "getCacheHandlerEntries", + ()=>getCacheHandlerEntries, + "getCacheHandlers", + ()=>getCacheHandlers, + "initializeCacheHandlers", + ()=>initializeCacheHandlers, + "setCacheHandler", + ()=>setCacheHandler +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$cache$2d$handlers$2f$default$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/cache-handlers/default.external.js [middleware-edge] (ecmascript)"); +; +const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? (message, ...args)=>{ + console.log(`use-cache: ${message}`, ...args); +} : undefined; +const handlersSymbol = Symbol.for('@next/cache-handlers'); +const handlersMapSymbol = Symbol.for('@next/cache-handlers-map'); +const handlersSetSymbol = Symbol.for('@next/cache-handlers-set'); +/** + * The reference to the cache handlers. We store the cache handlers on the + * global object so that we can access the same instance across different + * boundaries (such as different copies of the same module). + */ const reference = globalThis; +function initializeCacheHandlers() { + // If the cache handlers have already been initialized, don't do it again. + if (reference[handlersMapSymbol]) { + debug == null ? void 0 : debug('cache handlers already initialized'); + return false; + } + debug == null ? void 0 : debug('initializing cache handlers'); + reference[handlersMapSymbol] = new Map(); + // Initialize the cache from the symbol contents first. + if (reference[handlersSymbol]) { + let fallback; + if (reference[handlersSymbol].DefaultCache) { + debug == null ? void 0 : debug('setting "default" cache handler from symbol'); + fallback = reference[handlersSymbol].DefaultCache; + } else { + debug == null ? void 0 : debug('setting "default" cache handler from default'); + fallback = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$cache$2d$handlers$2f$default$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"]; + } + reference[handlersMapSymbol].set('default', fallback); + if (reference[handlersSymbol].RemoteCache) { + debug == null ? void 0 : debug('setting "remote" cache handler from symbol'); + reference[handlersMapSymbol].set('remote', reference[handlersSymbol].RemoteCache); + } else { + debug == null ? void 0 : debug('setting "remote" cache handler from default'); + reference[handlersMapSymbol].set('remote', fallback); + } + } else { + debug == null ? void 0 : debug('setting "default" cache handler from default'); + reference[handlersMapSymbol].set('default', __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$cache$2d$handlers$2f$default$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"]); + debug == null ? void 0 : debug('setting "remote" cache handler from default'); + reference[handlersMapSymbol].set('remote', __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$cache$2d$handlers$2f$default$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"]); + } + // Create a set of the cache handlers. + reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values()); + return true; +} +function getCacheHandler(kind) { + // This should never be called before initializeCacheHandlers. + if (!reference[handlersMapSymbol]) { + throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { + value: "E649", + enumerable: false, + configurable: true + }); + } + return reference[handlersMapSymbol].get(kind); +} +function getCacheHandlers() { + if (!reference[handlersSetSymbol]) { + return undefined; + } + return reference[handlersSetSymbol].values(); +} +function getCacheHandlerEntries() { + if (!reference[handlersMapSymbol]) { + return undefined; + } + return reference[handlersMapSymbol].entries(); +} +function setCacheHandler(kind, cacheHandler) { + // This should never be called before initializeCacheHandlers. + if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) { + throw Object.defineProperty(new Error('Cache handlers not initialized'), "__NEXT_ERROR_CODE", { + value: "E649", + enumerable: false, + configurable: true + }); + } + debug == null ? void 0 : debug('setting cache handler for "%s"', kind); + reference[handlersMapSymbol].set(kind, cacheHandler); + reference[handlersSetSymbol].add(cacheHandler); +} //# sourceMappingURL=handlers.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/revalidation-utils.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "executeRevalidates", + ()=>executeRevalidates, + "withExecuteRevalidates", + ()=>withExecuteRevalidates +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$use$2d$cache$2f$handlers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/use-cache/handlers.js [middleware-edge] (ecmascript)"); +; +async function withExecuteRevalidates(store, callback) { + if (!store) { + return callback(); + } + // If we executed any revalidates during the request, then we don't want to execute them again. + // save the state so we can check if anything changed after we're done running callbacks. + const savedRevalidationState = cloneRevalidationState(store); + try { + return await callback(); + } finally{ + // Check if we have any new revalidates, and if so, wait until they are all resolved. + const newRevalidates = diffRevalidationState(savedRevalidationState, cloneRevalidationState(store)); + await executeRevalidates(store, newRevalidates); + } +} +function cloneRevalidationState(store) { + return { + pendingRevalidatedTags: store.pendingRevalidatedTags ? [ + ...store.pendingRevalidatedTags + ] : [], + pendingRevalidates: { + ...store.pendingRevalidates + }, + pendingRevalidateWrites: store.pendingRevalidateWrites ? [ + ...store.pendingRevalidateWrites + ] : [] + }; +} +function diffRevalidationState(prev, curr) { + const prevTags = new Set(prev.pendingRevalidatedTags); + const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites); + return { + pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((tag)=>!prevTags.has(tag)), + pendingRevalidates: Object.fromEntries(Object.entries(curr.pendingRevalidates).filter(([key])=>!(key in prev.pendingRevalidates))), + pendingRevalidateWrites: curr.pendingRevalidateWrites.filter((promise)=>!prevRevalidateWrites.has(promise)) + }; +} +async function revalidateTags(tags, incrementalCache) { + if (tags.length === 0) { + return; + } + const promises = []; + if (incrementalCache) { + promises.push(incrementalCache.revalidateTag(tags)); + } + const handlers = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$use$2d$cache$2f$handlers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getCacheHandlers"])(); + if (handlers) { + for (const handler of handlers){ + promises.push(handler.expireTags(...tags)); + } + } + await Promise.all(promises); +} +async function executeRevalidates(workStore, state) { + const pendingRevalidatedTags = (state == null ? void 0 : state.pendingRevalidatedTags) ?? workStore.pendingRevalidatedTags ?? []; + const pendingRevalidates = (state == null ? void 0 : state.pendingRevalidates) ?? workStore.pendingRevalidates ?? {}; + const pendingRevalidateWrites = (state == null ? void 0 : state.pendingRevalidateWrites) ?? workStore.pendingRevalidateWrites ?? []; + return Promise.all([ + revalidateTags(pendingRevalidatedTags, workStore.incrementalCache), + ...Object.values(pendingRevalidates), + ...pendingRevalidateWrites + ]); +} //# sourceMappingURL=revalidation-utils.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "afterTaskAsyncStorageInstance", + ()=>afterTaskAsyncStorageInstance +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/async-local-storage.js [middleware-edge] (ecmascript)"); +; +const afterTaskAsyncStorageInstance = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createAsyncLocalStorage"])(); //# sourceMappingURL=after-task-async-storage-instance.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +// Share the instance module in the next-shared layer +__turbopack_context__.s([]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js [middleware-edge] (ecmascript)"); +; +; + //# sourceMappingURL=after-task-async-storage.external.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "afterTaskAsyncStorage", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["afterTaskAsyncStorageInstance"] +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js [middleware-edge] (ecmascript)"); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/after/after-context.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "AfterContext", + ()=>AfterContext +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$p$2d$queue$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/p-queue/index.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/invariant-error.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$is$2d$thenable$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/is-thenable.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$revalidation$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/revalidation-utils.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/async-local-storage.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__afterTaskAsyncStorageInstance__as__afterTaskAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js [middleware-edge] (ecmascript) "); +; +; +; +; +; +; +; +; +class AfterContext { + constructor({ waitUntil, onClose, onTaskError }){ + this.workUnitStores = new Set(); + this.waitUntil = waitUntil; + this.onClose = onClose; + this.onTaskError = onTaskError; + this.callbackQueue = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$p$2d$queue$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"](); + this.callbackQueue.pause(); + } + after(task) { + if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$is$2d$thenable$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["isThenable"])(task)) { + if (!this.waitUntil) { + errorWaitUntilNotAvailable(); + } + this.waitUntil(task.catch((error)=>this.reportTaskError('promise', error))); + } else if (typeof task === 'function') { + // TODO(after): implement tracing + this.addCallback(task); + } else { + throw Object.defineProperty(new Error('`after()`: Argument must be a promise or a function'), "__NEXT_ERROR_CODE", { + value: "E50", + enumerable: false, + configurable: true + }); + } + } + addCallback(callback) { + // if something is wrong, throw synchronously, bubbling up to the `after` callsite. + if (!this.waitUntil) { + errorWaitUntilNotAvailable(); + } + const workUnitStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__["workUnitAsyncStorage"].getStore(); + if (workUnitStore) { + this.workUnitStores.add(workUnitStore); + } + const afterTaskStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__afterTaskAsyncStorageInstance__as__afterTaskAsyncStorage$3e$__["afterTaskAsyncStorage"].getStore(); + // This is used for checking if request APIs can be called inside `after`. + // Note that we need to check the phase in which the *topmost* `after` was called (which should be "action"), + // not the current phase (which might be "after" if we're in a nested after). + // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`. + const rootTaskSpawnPhase = afterTaskStore ? afterTaskStore.rootTaskSpawnPhase // nested after + : workUnitStore == null ? void 0 : workUnitStore.phase // topmost after + ; + // this should only happen once. + if (!this.runCallbacksOnClosePromise) { + this.runCallbacksOnClosePromise = this.runCallbacksOnClose(); + this.waitUntil(this.runCallbacksOnClosePromise); + } + // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es). + // We do this because we want all of these to be equivalent in every regard except timing: + // after(() => x()) + // after(x()) + // await x() + const wrappedCallback = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["bindSnapshot"])(async ()=>{ + try { + await __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__afterTaskAsyncStorageInstance__as__afterTaskAsyncStorage$3e$__["afterTaskAsyncStorage"].run({ + rootTaskSpawnPhase + }, ()=>callback()); + } catch (error) { + this.reportTaskError('function', error); + } + }); + this.callbackQueue.add(wrappedCallback); + } + async runCallbacksOnClose() { + await new Promise((resolve)=>this.onClose(resolve)); + return this.runCallbacks(); + } + async runCallbacks() { + if (this.callbackQueue.size === 0) return; + for (const workUnitStore of this.workUnitStores){ + workUnitStore.phase = 'after'; + } + const workStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__["workAsyncStorage"].getStore(); + if (!workStore) { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["InvariantError"]('Missing workStore in AfterContext.runCallbacks'), "__NEXT_ERROR_CODE", { + value: "E547", + enumerable: false, + configurable: true + }); + } + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$revalidation$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["withExecuteRevalidates"])(workStore, ()=>{ + this.callbackQueue.start(); + return this.callbackQueue.onIdle(); + }); + } + reportTaskError(taskKind, error) { + // TODO(after): this is fine for now, but will need better intergration with our error reporting. + // TODO(after): should we log this if we have a onTaskError callback? + console.error(taskKind === 'promise' ? `A promise passed to \`after()\` rejected:` : `An error occurred in a function passed to \`after()\`:`, error); + if (this.onTaskError) { + // this is very defensive, but we really don't want anything to blow up in an error handler + try { + this.onTaskError == null ? void 0 : this.onTaskError.call(this, error); + } catch (handlerError) { + console.error(Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["InvariantError"]('`onTaskError` threw while handling an error thrown from an `after` task', { + cause: handlerError + }), "__NEXT_ERROR_CODE", { + value: "E569", + enumerable: false, + configurable: true + })); + } + } + } +} +function errorWaitUntilNotAvailable() { + throw Object.defineProperty(new Error('`after()` will not work correctly, because `waitUntil` is not available in the current environment.'), "__NEXT_ERROR_CODE", { + value: "E91", + enumerable: false, + configurable: true + }); +} //# sourceMappingURL=after-context.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/lazy-result.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Calls the given async function only when the returned promise-like object is + * awaited. Afterwards, it provides the resolved value synchronously as `value` + * property. + */ __turbopack_context__.s([ + "createLazyResult", + ()=>createLazyResult, + "isResolvedLazyResult", + ()=>isResolvedLazyResult +]); +function createLazyResult(fn) { + let pendingResult; + const result = { + then (onfulfilled, onrejected) { + if (!pendingResult) { + pendingResult = fn(); + } + pendingResult.then((value)=>{ + result.value = value; + }).catch(()=>{ + // The externally awaited result will be rejected via `onrejected`. We + // don't need to handle it here. But we do want to avoid an unhandled + // rejection. + }); + return pendingResult.then(onfulfilled, onrejected); + } + }; + return result; +} +function isResolvedLazyResult(result) { + return result.hasOwnProperty('value'); +} //# sourceMappingURL=lazy-result.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/async-storage/work-store.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "createWorkStore", + ()=>createWorkStore +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$after$2f$after$2d$context$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/after/after-context.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$app$2d$paths$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$lazy$2d$result$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/lazy-result.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$use$2d$cache$2f$handlers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/use-cache/handlers.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/async-local-storage.js [middleware-edge] (ecmascript)"); +; +; +; +; +; +function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags }) { + /** + * Rules of Static & Dynamic HTML: + * + * 1.) We must generate static HTML unless the caller explicitly opts + * in to dynamic HTML support. + * + * 2.) If dynamic HTML support is requested, we must honor that request + * or throw an error. It is the sole responsibility of the caller to + * ensure they aren't e.g. requesting dynamic HTML for an AMP page. + * + * 3.) If the request is in draft mode, we must generate dynamic HTML. + * + * 4.) If the request is a server action, we must generate dynamic HTML. + * + * These rules help ensure that other existing features like request caching, + * coalescing, and ISR continue working as intended. + */ const isStaticGeneration = !renderOpts.shouldWaitOnAllReady && !renderOpts.supportsDynamicResponse && !renderOpts.isDraftMode && !renderOpts.isPossibleServerAction; + const isDevelopment = renderOpts.dev ?? false; + const shouldTrackFetchMetrics = isDevelopment || // The only times we want to track fetch metrics outside of development is + // when we are performing a static generation and we either are in debug + // mode, or tracking fetch metrics was specifically opted into. + isStaticGeneration && (!!process.env.NEXT_DEBUG_BUILD || process.env.NEXT_SSG_FETCH_METRICS === '1'); + const store = { + isStaticGeneration, + page, + route: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$app$2d$paths$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["normalizeAppPath"])(page), + incrementalCache: // so that it can access the fs cache without mocks + renderOpts.incrementalCache || globalThis.__incrementalCache, + cacheLifeProfiles: renderOpts.cacheLifeProfiles, + isRevalidate: renderOpts.isRevalidate, + isBuildTimePrerendering: renderOpts.nextExport, + hasReadableErrorStacks: renderOpts.hasReadableErrorStacks, + fetchCache: renderOpts.fetchCache, + isOnDemandRevalidate: renderOpts.isOnDemandRevalidate, + isDraftMode: renderOpts.isDraftMode, + isPrefetchRequest, + buildId, + reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {}, + assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '', + afterContext: createAfterContext(renderOpts), + cacheComponentsEnabled: renderOpts.experimental.cacheComponents, + dev: isDevelopment, + previouslyRevalidatedTags, + refreshTagsByCacheKind: createRefreshTagsByCacheKind(), + runInCleanSnapshot: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createSnapshot"])(), + shouldTrackFetchMetrics + }; + // TODO: remove this when we resolve accessing the store outside the execution context + renderOpts.store = store; + return store; +} +function createAfterContext(renderOpts) { + const { waitUntil, onClose, onAfterTaskError } = renderOpts; + return new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$after$2f$after$2d$context$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["AfterContext"]({ + waitUntil, + onClose, + onTaskError: onAfterTaskError + }); +} +/** + * Creates a map with lazy results that refresh tags for the respective cache + * kind when they're awaited for the first time. + */ function createRefreshTagsByCacheKind() { + const refreshTagsByCacheKind = new Map(); + const cacheHandlers = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$use$2d$cache$2f$handlers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getCacheHandlerEntries"])(); + if (cacheHandlers) { + for (const [kind, cacheHandler] of cacheHandlers){ + if ('refreshTags' in cacheHandler) { + refreshTagsByCacheKind.set(kind, (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$lazy$2d$result$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createLazyResult"])(async ()=>cacheHandler.refreshTags())); + } + } + } + return refreshTagsByCacheKind; +} //# sourceMappingURL=work-store.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/web-on-close.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** Monitor when the consumer finishes reading the response body. +that's as close as we can get to `res.on('close')` using web APIs. +*/ __turbopack_context__.s([ + "CloseController", + ()=>CloseController, + "trackBodyConsumed", + ()=>trackBodyConsumed, + "trackStreamConsumed", + ()=>trackStreamConsumed +]); +function trackBodyConsumed(body, onEnd) { + if (typeof body === 'string') { + const generator = async function* generate() { + const encoder = new TextEncoder(); + yield encoder.encode(body); + onEnd(); + }; + // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice + return generator(); + } else { + return trackStreamConsumed(body, onEnd); + } +} +function trackStreamConsumed(stream, onEnd) { + // NOTE: This function must handle `stream` being aborted or cancelled, + // so it can't just be this: + // + // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } })) + // + // because that doesn't handle cancellations. + // (and cancellation handling via `Transformer.cancel` is only available in node >20) + const dest = new TransformStream(); + const runOnEnd = ()=>onEnd(); + stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd); + return dest.readable; +} +class CloseController { + onClose(callback) { + if (this.isClosed) { + throw Object.defineProperty(new Error('Cannot subscribe to a closed CloseController'), "__NEXT_ERROR_CODE", { + value: "E365", + enumerable: false, + configurable: true + }); + } + this.target.addEventListener('close', callback); + this.listeners++; + } + dispatchClose() { + if (this.isClosed) { + throw Object.defineProperty(new Error('Cannot close a CloseController multiple times'), "__NEXT_ERROR_CODE", { + value: "E229", + enumerable: false, + configurable: true + }); + } + if (this.listeners > 0) { + this.target.dispatchEvent(new Event('close')); + } + this.isClosed = true; + } + constructor(){ + this.target = new EventTarget(); + this.listeners = 0; + this.isClosed = false; + } +} //# sourceMappingURL=web-on-close.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/get-edge-preview-props.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * In edge runtime, these props directly accessed from environment variables. + * - local: env vars will be injected through edge-runtime as runtime env vars + * - deployment: env vars will be replaced by edge build pipeline + */ __turbopack_context__.s([ + "getEdgePreviewProps", + ()=>getEdgePreviewProps +]); +function getEdgePreviewProps() { + return { + previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '', + previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '', + previewModeEncryptionKey: process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '' + }; +} //# sourceMappingURL=get-edge-preview-props.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/after/builtin-request-context.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "createLocalRequestContext", + ()=>createLocalRequestContext, + "getBuiltinRequestContext", + ()=>getBuiltinRequestContext +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/async-local-storage.js [middleware-edge] (ecmascript)"); +; +function getBuiltinRequestContext() { + const _globalThis = globalThis; + const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]; + return ctx == null ? void 0 : ctx.get(); +} +const NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context'); +function createLocalRequestContext() { + const storage = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createAsyncLocalStorage"])(); + return { + get: ()=>storage.getStore(), + run: (value, callback)=>storage.run(value, callback) + }; +} //# sourceMappingURL=builtin-request-context.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/implicit-tags.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "getImplicitTags", + ()=>getImplicitTags +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/constants.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$use$2d$cache$2f$handlers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/use-cache/handlers.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$lazy$2d$result$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/lazy-result.js [middleware-edge] (ecmascript)"); +; +; +; +const getDerivedTags = (pathname)=>{ + const derivedTags = [ + `/layout` + ]; + // we automatically add the current path segments as tags + // for revalidatePath handling + if (pathname.startsWith('/')) { + const pathnameParts = pathname.split('/'); + for(let i = 1; i < pathnameParts.length + 1; i++){ + let curPathname = pathnameParts.slice(0, i).join('/'); + if (curPathname) { + // all derived tags other than the page are layout tags + if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) { + curPathname = `${curPathname}${!curPathname.endsWith('/') ? '/' : ''}layout`; + } + derivedTags.push(curPathname); + } + } + } + return derivedTags; +}; +/** + * Creates a map with lazy results that fetch the expiration value for the given + * tags and respective cache kind when they're awaited for the first time. + */ function createTagsExpirationsByCacheKind(tags) { + const expirationsByCacheKind = new Map(); + const cacheHandlers = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$use$2d$cache$2f$handlers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getCacheHandlerEntries"])(); + if (cacheHandlers) { + for (const [kind, cacheHandler] of cacheHandlers){ + if ('getExpiration' in cacheHandler) { + expirationsByCacheKind.set(kind, (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$lazy$2d$result$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createLazyResult"])(async ()=>cacheHandler.getExpiration(...tags))); + } + } + } + return expirationsByCacheKind; +} +async function getImplicitTags(page, url, fallbackRouteParams) { + const tags = []; + const hasFallbackRouteParams = fallbackRouteParams && fallbackRouteParams.size > 0; + // Add the derived tags from the page. + const derivedTags = getDerivedTags(page); + for (let tag of derivedTags){ + tag = `${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_CACHE_IMPLICIT_TAG_ID"]}${tag}`; + tags.push(tag); + } + // Add the tags from the pathname. If the route has unknown params, we don't + // want to add the pathname as a tag, as it will be invalid. + if (url.pathname && !hasFallbackRouteParams) { + const tag = `${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_CACHE_IMPLICIT_TAG_ID"]}${url.pathname}`; + tags.push(tag); + } + return { + tags, + expirationsByCacheKind: createTagsExpirationsByCacheKind(tags) + }; +} //# sourceMappingURL=implicit-tags.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/experimental/testmode/context.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +0 && (module.exports = { + getTestReqInfo: null, + withRequest: null +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + getTestReqInfo: function() { + return getTestReqInfo; + }, + withRequest: function() { + return withRequest; + } +}); +const _nodeasync_hooks = __turbopack_context__.r("[externals]/node:async_hooks [external] (node:async_hooks, cjs)"); +const testStorage = new _nodeasync_hooks.AsyncLocalStorage(); +function extractTestInfoFromRequest(req, reader) { + const proxyPortHeader = reader.header(req, 'next-test-proxy-port'); + if (!proxyPortHeader) { + return undefined; + } + const url = reader.url(req); + const proxyPort = Number(proxyPortHeader); + const testData = reader.header(req, 'next-test-data') || ''; + return { + url, + proxyPort, + testData + }; +} +function withRequest(req, reader, fn) { + const testReqInfo = extractTestInfoFromRequest(req, reader); + if (!testReqInfo) { + return fn(); + } + return testStorage.run(testReqInfo, fn); +} +function getTestReqInfo(req, reader) { + const testReqInfo = testStorage.getStore(); + if (testReqInfo) { + return testReqInfo; + } + if (req && reader) { + return extractTestInfoFromRequest(req, reader); + } + return undefined; +} //# sourceMappingURL=context.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/experimental/testmode/fetch.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$buffer__$5b$external$5d$__$28$node$3a$buffer$2c$__cjs$29$__ = /*#__PURE__*/ __turbopack_context__.i("[externals]/node:buffer [external] (node:buffer, cjs)"); +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +0 && (module.exports = { + handleFetch: null, + interceptFetch: null, + reader: null +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + handleFetch: function() { + return handleFetch; + }, + interceptFetch: function() { + return interceptFetch; + }, + reader: function() { + return reader; + } +}); +const _context = __turbopack_context__.r("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/experimental/testmode/context.js [middleware-edge] (ecmascript)"); +const reader = { + url (req) { + return req.url; + }, + header (req, name) { + return req.headers.get(name); + } +}; +function getTestStack() { + let stack = (new Error().stack ?? '').split('\n'); + // Skip the first line and find first non-empty line. + for(let i = 1; i < stack.length; i++){ + if (stack[i].length > 0) { + stack = stack.slice(i); + break; + } + } + // Filter out franmework lines. + stack = stack.filter((f)=>!f.includes('/next/dist/')); + // At most 5 lines. + stack = stack.slice(0, 5); + // Cleanup some internal info and trim. + stack = stack.map((s)=>s.replace('webpack-internal:///(rsc)/', '').trim()); + return stack.join(' '); +} +async function buildProxyRequest(testData, request) { + const { url, method, headers, body, cache, credentials, integrity, mode, redirect, referrer, referrerPolicy } = request; + return { + testData, + api: 'fetch', + request: { + url, + method, + headers: [ + ...Array.from(headers), + [ + 'next-test-stack', + getTestStack() + ] + ], + body: body ? __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$buffer__$5b$external$5d$__$28$node$3a$buffer$2c$__cjs$29$__["Buffer"].from(await request.arrayBuffer()).toString('base64') : null, + cache, + credentials, + integrity, + mode, + redirect, + referrer, + referrerPolicy + } + }; +} +function buildResponse(proxyResponse) { + const { status, headers, body } = proxyResponse.response; + return new Response(body ? __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$buffer__$5b$external$5d$__$28$node$3a$buffer$2c$__cjs$29$__["Buffer"].from(body, 'base64') : null, { + status, + headers: new Headers(headers) + }); +} +async function handleFetch(originalFetch, request) { + const testInfo = (0, _context.getTestReqInfo)(request, reader); + if (!testInfo) { + // Passthrough non-test requests. + return originalFetch(request); + } + const { testData, proxyPort } = testInfo; + const proxyRequest = await buildProxyRequest(testData, request); + const resp = await originalFetch(`http://localhost:${proxyPort}`, { + method: 'POST', + body: JSON.stringify(proxyRequest), + next: { + // @ts-ignore + internal: true + } + }); + if (!resp.ok) { + throw Object.defineProperty(new Error(`Proxy request failed: ${resp.status}`), "__NEXT_ERROR_CODE", { + value: "E146", + enumerable: false, + configurable: true + }); + } + const proxyResponse = await resp.json(); + const { api } = proxyResponse; + switch(api){ + case 'continue': + return originalFetch(request); + case 'abort': + case 'unhandled': + throw Object.defineProperty(new Error(`Proxy request aborted [${request.method} ${request.url}]`), "__NEXT_ERROR_CODE", { + value: "E145", + enumerable: false, + configurable: true + }); + case 'fetch': + return buildResponse(proxyResponse); + default: + return api; + } +} +function interceptFetch(originalFetch) { + /*TURBOPACK member replacement*/ __turbopack_context__.g.fetch = function testFetch(input, init) { + var _init_next; + // Passthrough internal requests. + // @ts-ignore + if (init == null ? void 0 : (_init_next = init.next) == null ? void 0 : _init_next.internal) { + return originalFetch(input, init); + } + return handleFetch(originalFetch, new Request(input, init)); + }; + return ()=>{ + /*TURBOPACK member replacement*/ __turbopack_context__.g.fetch = originalFetch; + }; +} //# sourceMappingURL=fetch.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/experimental/testmode/server-edge.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +0 && (module.exports = { + interceptTestApis: null, + wrapRequestHandler: null +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + interceptTestApis: function() { + return interceptTestApis; + }, + wrapRequestHandler: function() { + return wrapRequestHandler; + } +}); +const _context = __turbopack_context__.r("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/experimental/testmode/context.js [middleware-edge] (ecmascript)"); +const _fetch = __turbopack_context__.r("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/experimental/testmode/fetch.js [middleware-edge] (ecmascript)"); +function interceptTestApis() { + return (0, _fetch.interceptFetch)(/*TURBOPACK member replacement*/ __turbopack_context__.g.fetch); +} +function wrapRequestHandler(handler) { + return (req, fn)=>(0, _context.withRequest)(req, _fetch.reader, ()=>handler(req, fn)); +} //# sourceMappingURL=server-edge.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/adapter.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "NextRequestHint", + ()=>NextRequestHint, + "adapter", + ()=>adapter +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/error.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/utils.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$fetch$2d$event$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$request$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/request.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$response$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/response.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$relativize$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$next$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/next-url.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$internal$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/internal-utils.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$app$2d$paths$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/app-router-headers.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$globals$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/globals.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$async$2d$storage$2f$request$2d$store$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/async-storage/request-store.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$async$2d$storage$2f$work$2d$store$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/async-storage/work-store.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$tracer$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/trace/tracer.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/trace/constants.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$web$2d$on$2d$close$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/web-on-close.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$get$2d$edge$2d$preview$2d$props$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/get-edge-preview-props.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$after$2f$builtin$2d$request$2d$context$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/after/builtin-request-context.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$implicit$2d$tags$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/implicit-tags.js [middleware-edge] (ecmascript)"); +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +class NextRequestHint extends __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$request$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextRequest"] { + constructor(params){ + super(params.input, params.init); + this.sourcePage = params.page; + } + get request() { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["PageSignatureError"]({ + page: this.sourcePage + }), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + } + respondWith() { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["PageSignatureError"]({ + page: this.sourcePage + }), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + } + waitUntil() { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["PageSignatureError"]({ + page: this.sourcePage + }), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + } +} +const headersGetter = { + keys: (headers)=>Array.from(headers.keys()), + get: (headers, key)=>headers.get(key) ?? undefined +}; +let propagator = (request, fn)=>{ + const tracer = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$tracer$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getTracer"])(); + return tracer.withPropagatedContext(request.headers, fn, headersGetter); +}; +let testApisIntercepted = false; +function ensureTestApisIntercepted() { + if (!testApisIntercepted) { + testApisIntercepted = true; + if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') { + const { interceptTestApis, wrapRequestHandler } = __turbopack_context__.r("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/experimental/testmode/server-edge.js [middleware-edge] (ecmascript)"); + interceptTestApis(); + propagator = wrapRequestHandler(propagator); + } + } +} +async function adapter(params) { + var _getBuiltinRequestContext; + ensureTestApisIntercepted(); + await (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$globals$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ensureInstrumentationRegistered"])(); + // TODO-APP: use explicit marker for this + const isEdgeRendering = typeof globalThis.__BUILD_MANIFEST !== 'undefined'; + params.request.url = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$app$2d$paths$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["normalizeRscURL"])(params.request.url); + const requestURL = params.bypassNextUrl ? new URL(params.request.url) : new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$next$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextURL"](params.request.url, { + headers: params.request.headers, + nextConfig: params.request.nextConfig + }); + // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator. + // Instead we use the keys before iteration. + const keys = [ + ...requestURL.searchParams.keys() + ]; + for (const key of keys){ + const value = requestURL.searchParams.getAll(key); + const normalizedKey = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["normalizeNextQueryParam"])(key); + if (normalizedKey) { + requestURL.searchParams.delete(normalizedKey); + for (const val of value){ + requestURL.searchParams.append(normalizedKey, val); + } + requestURL.searchParams.delete(key); + } + } + // Ensure users only see page requests, never data requests. + let buildId = process.env.__NEXT_BUILD_ID || ''; + if ('buildId' in requestURL) { + buildId = requestURL.buildId || ''; + requestURL.buildId = ''; + } + const requestHeaders = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["fromNodeOutgoingHttpHeaders"])(params.request.headers); + const isNextDataRequest = requestHeaders.has('x-nextjs-data'); + const isRSCRequest = requestHeaders.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RSC_HEADER"]) === '1'; + if (isNextDataRequest && requestURL.pathname === '/index') { + requestURL.pathname = '/'; + } + const flightHeaders = new Map(); + // Headers should only be stripped for middleware + if (!isEdgeRendering) { + for (const header of __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["FLIGHT_HEADERS"]){ + const value = requestHeaders.get(header); + if (value !== null) { + flightHeaders.set(header, value); + requestHeaders.delete(header); + } + } + } + const normalizeURL = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : requestURL; + const rscHash = normalizeURL.searchParams.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"]); + const request = new NextRequestHint({ + page: params.page, + // Strip internal query parameters off the request. + input: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$internal$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["stripInternalSearchParams"])(normalizeURL).toString(), + init: { + body: params.request.body, + headers: requestHeaders, + method: params.request.method, + nextConfig: params.request.nextConfig, + signal: params.request.signal + } + }); + /** + * This allows to identify the request as a data request. The user doesn't + * need to know about this property neither use it. We add it for testing + * purposes. + */ if (isNextDataRequest) { + Object.defineProperty(request, '__isData', { + enumerable: false, + value: true + }); + } + if (// leverage the shared instance if not we need + // to create a fresh cache instance each time + !globalThis.__incrementalCacheShared && params.IncrementalCache) { + ; + globalThis.__incrementalCache = new params.IncrementalCache({ + CurCacheHandler: params.incrementalCacheHandler, + minimalMode: ("TURBOPACK compile-time value", "development") !== 'development', + fetchCacheKeyPrefix: ("TURBOPACK compile-time value", ""), + dev: ("TURBOPACK compile-time value", "development") === 'development', + requestHeaders: params.request.headers, + getPrerenderManifest: ()=>{ + return { + version: -1, + routes: {}, + dynamicRoutes: {}, + notFoundRoutes: [], + preview: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$get$2d$edge$2d$preview$2d$props$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getEdgePreviewProps"])() + }; + } + }); + } + // if we're in an edge runtime sandbox, we should use the waitUntil + // that we receive from the enclosing NextServer + const outerWaitUntil = params.request.waitUntil ?? ((_getBuiltinRequestContext = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$after$2f$builtin$2d$request$2d$context$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getBuiltinRequestContext"])()) == null ? void 0 : _getBuiltinRequestContext.waitUntil); + const event = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$fetch$2d$event$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextFetchEvent"]({ + request, + page: params.page, + context: outerWaitUntil ? { + waitUntil: outerWaitUntil + } : undefined + }); + let response; + let cookiesFromResponse; + response = await propagator(request, ()=>{ + // we only care to make async storage available for middleware + const isMiddleware = params.page === '/middleware' || params.page === '/src/middleware'; + if (isMiddleware) { + // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`), + // so we have to inject it via DefinePlugin. + // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`). + const waitUntil = event.waitUntil.bind(event); + const closeController = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$web$2d$on$2d$close$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["CloseController"](); + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$tracer$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getTracer"])().trace(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$trace$2f$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["MiddlewareSpan"].execute, { + spanName: `middleware ${request.method} ${request.nextUrl.pathname}`, + attributes: { + 'http.target': request.nextUrl.pathname, + 'http.method': request.method + } + }, async ()=>{ + try { + var _params_request_nextConfig_experimental, _params_request_nextConfig, _params_request_nextConfig_experimental1, _params_request_nextConfig1; + const onUpdateCookies = (cookies)=>{ + cookiesFromResponse = cookies; + }; + const previewProps = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$get$2d$edge$2d$preview$2d$props$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getEdgePreviewProps"])(); + const page = '/' // Fake Work + ; + const fallbackRouteParams = null; + const implicitTags = await (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$implicit$2d$tags$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getImplicitTags"])(page, request.nextUrl, fallbackRouteParams); + const requestStore = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$async$2d$storage$2f$request$2d$store$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createRequestStoreForAPI"])(request, request.nextUrl, implicitTags, onUpdateCookies, previewProps); + const workStore = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$async$2d$storage$2f$work$2d$store$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createWorkStore"])({ + page, + renderOpts: { + cacheLifeProfiles: (_params_request_nextConfig = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental = _params_request_nextConfig.experimental) == null ? void 0 : _params_request_nextConfig_experimental.cacheLife, + experimental: { + isRoutePPREnabled: false, + cacheComponents: false, + authInterrupts: !!((_params_request_nextConfig1 = params.request.nextConfig) == null ? void 0 : (_params_request_nextConfig_experimental1 = _params_request_nextConfig1.experimental) == null ? void 0 : _params_request_nextConfig_experimental1.authInterrupts) + }, + supportsDynamicResponse: true, + waitUntil, + onClose: closeController.onClose.bind(closeController), + onAfterTaskError: undefined + }, + isPrefetchRequest: request.headers.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_ROUTER_PREFETCH_HEADER"]) === '1', + buildId: buildId ?? '', + previouslyRevalidatedTags: [] + }); + return await __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__["workAsyncStorage"].run(workStore, ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__["workUnitAsyncStorage"].run(requestStore, params.handler, request, event)); + } finally{ + // middleware cannot stream, so we can consider the response closed + // as soon as the handler returns. + // we can delay running it until a bit later -- + // if it's needed, we'll have a `waitUntil` lock anyway. + setTimeout(()=>{ + closeController.dispatchClose(); + }, 0); + } + }); + } + return params.handler(request, event); + }); + // check if response is a Response object + if (response && !(response instanceof Response)) { + throw Object.defineProperty(new TypeError('Expected an instance of Response to be returned'), "__NEXT_ERROR_CODE", { + value: "E567", + enumerable: false, + configurable: true + }); + } + if (response && cookiesFromResponse) { + response.headers.set('set-cookie', cookiesFromResponse); + } + /** + * For rewrites we must always include the locale in the final pathname + * so we re-create the NextURL forcing it to include it when the it is + * an internal rewrite. Also we make sure the outgoing rewrite URL is + * a data URL if the request was a data request. + */ const rewrite = response == null ? void 0 : response.headers.get('x-middleware-rewrite'); + if (response && rewrite && (isRSCRequest || !isEdgeRendering)) { + const destination = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$next$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextURL"](rewrite, { + forceLocale: true, + headers: params.request.headers, + nextConfig: params.request.nextConfig + }); + if (!("TURBOPACK compile-time value", void 0) && !isEdgeRendering) { + if (destination.host === request.nextUrl.host) { + destination.buildId = buildId || destination.buildId; + response.headers.set('x-middleware-rewrite', String(destination)); + } + } + /** + * When the request is a data request we must show if there was a rewrite + * with an internal header so the client knows which component to load + * from the data request. + */ const { url: relativeDestination, isRelative } = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$relativize$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["parseRelativeURL"])(destination.toString(), requestURL.toString()); + if (!isEdgeRendering && isNextDataRequest && // if the rewrite is external and external rewrite + // resolving config is enabled don't add this header + // so the upstream app can set it instead + !(("TURBOPACK compile-time value", false) && relativeDestination.match(/http(s)?:\/\//))) { + response.headers.set('x-nextjs-rewrite', relativeDestination); + } + // If this is an RSC request, and the pathname or search has changed, and + // this isn't an external rewrite, we need to set the rewritten pathname and + // query headers. + if (isRSCRequest && isRelative) { + if (requestURL.pathname !== destination.pathname) { + response.headers.set(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_REWRITTEN_PATH_HEADER"], destination.pathname); + } + if (requestURL.search !== destination.search) { + response.headers.set(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_REWRITTEN_QUERY_HEADER"], destination.search.slice(1)); + } + } + } + /** + * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests, + * unless it's already present. This is necessary to ensure that RSC hash validation + * works correctly after a rewrite. For internal rewrites, the server can validate the + * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical. + * However, for external rewrites (where the request is proxied to another Next.js server), + * the external server does not have access to the original URL or its search parameters. + * In these cases, forwarding the `_rsc` parameter is essential so that the external server + * can perform the correct RSC hash validation. + */ if (response && rewrite && isRSCRequest && rscHash) { + const rewriteURL = new URL(rewrite); + if (!rewriteURL.searchParams.has(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"])) { + rewriteURL.searchParams.set(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"], rscHash); + response.headers.set('x-middleware-rewrite', rewriteURL.toString()); + } + } + /** + * For redirects we will not include the locale in case when it is the + * default and we must also make sure the outgoing URL is a data one if + * the incoming request was a data request. + */ const redirect = response == null ? void 0 : response.headers.get('Location'); + if (response && redirect && !isEdgeRendering) { + const redirectURL = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$next$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextURL"](redirect, { + forceLocale: false, + headers: params.request.headers, + nextConfig: params.request.nextConfig + }); + /** + * Responses created from redirects have immutable headers so we have + * to clone the response to be able to modify it. + */ response = new Response(response.body, response); + if ("TURBOPACK compile-time truthy", 1) { + if (redirectURL.host === requestURL.host) { + redirectURL.buildId = buildId || redirectURL.buildId; + response.headers.set('Location', redirectURL.toString()); + } + } + /** + * When the request is a data request we can't use the location header as + * it may end up with CORS error. Instead we map to an internal header so + * the client knows the destination. + */ if (isNextDataRequest) { + response.headers.delete('Location'); + response.headers.set('x-nextjs-redirect', (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$relativize$2d$url$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getRelativeURL"])(redirectURL.toString(), requestURL.toString())); + } + } + const finalResponse = response ? response : __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$response$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextResponse"].next(); + // Flight headers are not overridable / removable so they are applied at the end. + const middlewareOverrideHeaders = finalResponse.headers.get('x-middleware-override-headers'); + const overwrittenHeaders = []; + if (middlewareOverrideHeaders) { + for (const [key, value] of flightHeaders){ + finalResponse.headers.set(`x-middleware-request-${key}`, value); + overwrittenHeaders.push(key); + } + if (overwrittenHeaders.length > 0) { + finalResponse.headers.set('x-middleware-override-headers', middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')); + } + } + return { + response: finalResponse, + waitUntil: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$fetch$2d$event$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["getWaitUntilPromiseFromEvent"])(event) ?? Promise.resolve(), + fetchMetrics: request.fetchMetrics + }; +} //# sourceMappingURL=adapter.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/image-response.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * @deprecated ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead. + * Migration with codemods: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#next-og-import + */ __turbopack_context__.s([ + "ImageResponse", + ()=>ImageResponse +]); +function ImageResponse() { + throw Object.defineProperty(new Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead'), "__NEXT_ERROR_CODE", { + value: "E183", + enumerable: false, + configurable: true + }); +} //# sourceMappingURL=image-response.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/ua-parser-js/ua-parser.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { + +(()=>{ + var i = { + 226: function(i, e) { + (function(o, a) { + "use strict"; + var r = "1.0.35", t = "", n = "?", s = "function", b = "undefined", w = "object", l = "string", d = "major", c = "model", u = "name", p = "type", m = "vendor", f = "version", h = "architecture", v = "console", g = "mobile", k = "tablet", x = "smarttv", _ = "wearable", y = "embedded", q = 350; + var T = "Amazon", S = "Apple", z = "ASUS", N = "BlackBerry", A = "Browser", C = "Chrome", E = "Edge", O = "Firefox", U = "Google", j = "Huawei", P = "LG", R = "Microsoft", M = "Motorola", B = "Opera", V = "Samsung", D = "Sharp", I = "Sony", W = "Viera", F = "Xiaomi", G = "Zebra", H = "Facebook", L = "Chromium OS", Z = "Mac OS"; + var extend = function(i, e) { + var o = {}; + for(var a in i){ + if (e[a] && e[a].length % 2 === 0) { + o[a] = e[a].concat(i[a]); + } else { + o[a] = i[a]; + } + } + return o; + }, enumerize = function(i) { + var e = {}; + for(var o = 0; o < i.length; o++){ + e[i[o].toUpperCase()] = i[o]; + } + return e; + }, has = function(i, e) { + return typeof i === l ? lowerize(e).indexOf(lowerize(i)) !== -1 : false; + }, lowerize = function(i) { + return i.toLowerCase(); + }, majorize = function(i) { + return typeof i === l ? i.replace(/[^\d\.]/g, t).split(".")[0] : a; + }, trim = function(i, e) { + if (typeof i === l) { + i = i.replace(/^\s\s*/, t); + return typeof e === b ? i : i.substring(0, q); + } + }; + var rgxMapper = function(i, e) { + var o = 0, r, t, n, b, l, d; + while(o < e.length && !l){ + var c = e[o], u = e[o + 1]; + r = t = 0; + while(r < c.length && !l){ + if (!c[r]) { + break; + } + l = c[r++].exec(i); + if (!!l) { + for(n = 0; n < u.length; n++){ + d = l[++t]; + b = u[n]; + if (typeof b === w && b.length > 0) { + if (b.length === 2) { + if (typeof b[1] == s) { + this[b[0]] = b[1].call(this, d); + } else { + this[b[0]] = b[1]; + } + } else if (b.length === 3) { + if (typeof b[1] === s && !(b[1].exec && b[1].test)) { + this[b[0]] = d ? b[1].call(this, d, b[2]) : a; + } else { + this[b[0]] = d ? d.replace(b[1], b[2]) : a; + } + } else if (b.length === 4) { + this[b[0]] = d ? b[3].call(this, d.replace(b[1], b[2])) : a; + } + } else { + this[b] = d ? d : a; + } + } + } + } + o += 2; + } + }, strMapper = function(i, e) { + for(var o in e){ + if (typeof e[o] === w && e[o].length > 0) { + for(var r = 0; r < e[o].length; r++){ + if (has(e[o][r], i)) { + return o === n ? a : o; + } + } + } else if (has(e[o], i)) { + return o === n ? a : o; + } + } + return i; + }; + var $ = { + "1.0": "/8", + 1.2: "/1", + 1.3: "/3", + "2.0": "/412", + "2.0.2": "/416", + "2.0.3": "/417", + "2.0.4": "/419", + "?": "/" + }, X = { + ME: "4.90", + "NT 3.11": "NT3.51", + "NT 4.0": "NT4.0", + 2e3: "NT 5.0", + XP: [ + "NT 5.1", + "NT 5.2" + ], + Vista: "NT 6.0", + 7: "NT 6.1", + 8: "NT 6.2", + 8.1: "NT 6.3", + 10: [ + "NT 6.4", + "NT 10.0" + ], + RT: "ARM" + }; + var K = { + browser: [ + [ + /\b(?:crmo|crios)\/([\w\.]+)/i + ], + [ + f, + [ + u, + "Chrome" + ] + ], + [ + /edg(?:e|ios|a)?\/([\w\.]+)/i + ], + [ + f, + [ + u, + "Edge" + ] + ], + [ + /(opera mini)\/([-\w\.]+)/i, + /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, + /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i + ], + [ + u, + f + ], + [ + /opios[\/ ]+([\w\.]+)/i + ], + [ + f, + [ + u, + B + " Mini" + ] + ], + [ + /\bopr\/([\w\.]+)/i + ], + [ + f, + [ + u, + B + ] + ], + [ + /(kindle)\/([\w\.]+)/i, + /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, + /(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, + /(ba?idubrowser)[\/ ]?([\w\.]+)/i, + /(?:ms|\()(ie) ([\w\.]+)/i, + /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, + /(heytap|ovi)browser\/([\d\.]+)/i, + /(weibo)__([\d\.]+)/i + ], + [ + u, + f + ], + [ + /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i + ], + [ + f, + [ + u, + "UC" + A + ] + ], + [ + /microm.+\bqbcore\/([\w\.]+)/i, + /\bqbcore\/([\w\.]+).+microm/i + ], + [ + f, + [ + u, + "WeChat(Win) Desktop" + ] + ], + [ + /micromessenger\/([\w\.]+)/i + ], + [ + f, + [ + u, + "WeChat" + ] + ], + [ + /konqueror\/([\w\.]+)/i + ], + [ + f, + [ + u, + "Konqueror" + ] + ], + [ + /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i + ], + [ + f, + [ + u, + "IE" + ] + ], + [ + /ya(?:search)?browser\/([\w\.]+)/i + ], + [ + f, + [ + u, + "Yandex" + ] + ], + [ + /(avast|avg)\/([\w\.]+)/i + ], + [ + [ + u, + /(.+)/, + "$1 Secure " + A + ], + f + ], + [ + /\bfocus\/([\w\.]+)/i + ], + [ + f, + [ + u, + O + " Focus" + ] + ], + [ + /\bopt\/([\w\.]+)/i + ], + [ + f, + [ + u, + B + " Touch" + ] + ], + [ + /coc_coc\w+\/([\w\.]+)/i + ], + [ + f, + [ + u, + "Coc Coc" + ] + ], + [ + /dolfin\/([\w\.]+)/i + ], + [ + f, + [ + u, + "Dolphin" + ] + ], + [ + /coast\/([\w\.]+)/i + ], + [ + f, + [ + u, + B + " Coast" + ] + ], + [ + /miuibrowser\/([\w\.]+)/i + ], + [ + f, + [ + u, + "MIUI " + A + ] + ], + [ + /fxios\/([-\w\.]+)/i + ], + [ + f, + [ + u, + O + ] + ], + [ + /\bqihu|(qi?ho?o?|360)browser/i + ], + [ + [ + u, + "360 " + A + ] + ], + [ + /(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i + ], + [ + [ + u, + /(.+)/, + "$1 " + A + ], + f + ], + [ + /(comodo_dragon)\/([\w\.]+)/i + ], + [ + [ + u, + /_/g, + " " + ], + f + ], + [ + /(electron)\/([\w\.]+) safari/i, + /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, + /m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i + ], + [ + u, + f + ], + [ + /(metasr)[\/ ]?([\w\.]+)/i, + /(lbbrowser)/i, + /\[(linkedin)app\]/i + ], + [ + u + ], + [ + /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i + ], + [ + [ + u, + H + ], + f + ], + [ + /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, + /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, + /safari (line)\/([\w\.]+)/i, + /\b(line)\/([\w\.]+)\/iab/i, + /(chromium|instagram)[\/ ]([-\w\.]+)/i + ], + [ + u, + f + ], + [ + /\bgsa\/([\w\.]+) .*safari\//i + ], + [ + f, + [ + u, + "GSA" + ] + ], + [ + /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i + ], + [ + f, + [ + u, + "TikTok" + ] + ], + [ + /headlesschrome(?:\/([\w\.]+)| )/i + ], + [ + f, + [ + u, + C + " Headless" + ] + ], + [ + / wv\).+(chrome)\/([\w\.]+)/i + ], + [ + [ + u, + C + " WebView" + ], + f + ], + [ + /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i + ], + [ + f, + [ + u, + "Android " + A + ] + ], + [ + /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i + ], + [ + u, + f + ], + [ + /version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i + ], + [ + f, + [ + u, + "Mobile Safari" + ] + ], + [ + /version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i + ], + [ + f, + u + ], + [ + /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i + ], + [ + u, + [ + f, + strMapper, + $ + ] + ], + [ + /(webkit|khtml)\/([\w\.]+)/i + ], + [ + u, + f + ], + [ + /(navigator|netscape\d?)\/([-\w\.]+)/i + ], + [ + [ + u, + "Netscape" + ], + f + ], + [ + /mobile vr; rv:([\w\.]+)\).+firefox/i + ], + [ + f, + [ + u, + O + " Reality" + ] + ], + [ + /ekiohf.+(flow)\/([\w\.]+)/i, + /(swiftfox)/i, + /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, + /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, + /(firefox)\/([\w\.]+)/i, + /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, + /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, + /(links) \(([\w\.]+)/i, + /panasonic;(viera)/i + ], + [ + u, + f + ], + [ + /(cobalt)\/([\w\.]+)/i + ], + [ + u, + [ + f, + /master.|lts./, + "" + ] + ] + ], + cpu: [ + [ + /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i + ], + [ + [ + h, + "amd64" + ] + ], + [ + /(ia32(?=;))/i + ], + [ + [ + h, + lowerize + ] + ], + [ + /((?:i[346]|x)86)[;\)]/i + ], + [ + [ + h, + "ia32" + ] + ], + [ + /\b(aarch64|arm(v?8e?l?|_?64))\b/i + ], + [ + [ + h, + "arm64" + ] + ], + [ + /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i + ], + [ + [ + h, + "armhf" + ] + ], + [ + /windows (ce|mobile); ppc;/i + ], + [ + [ + h, + "arm" + ] + ], + [ + /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i + ], + [ + [ + h, + /ower/, + t, + lowerize + ] + ], + [ + /(sun4\w)[;\)]/i + ], + [ + [ + h, + "sparc" + ] + ], + [ + /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i + ], + [ + [ + h, + lowerize + ] + ] + ], + device: [ + [ + /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i + ], + [ + c, + [ + m, + V + ], + [ + p, + k + ] + ], + [ + /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, + /samsung[- ]([-\w]+)/i, + /sec-(sgh\w+)/i + ], + [ + c, + [ + m, + V + ], + [ + p, + g + ] + ], + [ + /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i + ], + [ + c, + [ + m, + S + ], + [ + p, + g + ] + ], + [ + /\((ipad);[-\w\),; ]+apple/i, + /applecoremedia\/[\w\.]+ \((ipad)/i, + /\b(ipad)\d\d?,\d\d?[;\]].+ios/i + ], + [ + c, + [ + m, + S + ], + [ + p, + k + ] + ], + [ + /(macintosh);/i + ], + [ + c, + [ + m, + S + ] + ], + [ + /\b(sh-?[altvz]?\d\d[a-ekm]?)/i + ], + [ + c, + [ + m, + D + ], + [ + p, + g + ] + ], + [ + /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i + ], + [ + c, + [ + m, + j + ], + [ + p, + k + ] + ], + [ + /(?:huawei|honor)([-\w ]+)[;\)]/i, + /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i + ], + [ + c, + [ + m, + j + ], + [ + p, + g + ] + ], + [ + /\b(poco[\w ]+)(?: bui|\))/i, + /\b; (\w+) build\/hm\1/i, + /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, + /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, + /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i + ], + [ + [ + c, + /_/g, + " " + ], + [ + m, + F + ], + [ + p, + g + ] + ], + [ + /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i + ], + [ + [ + c, + /_/g, + " " + ], + [ + m, + F + ], + [ + p, + k + ] + ], + [ + /; (\w+) bui.+ oppo/i, + /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i + ], + [ + c, + [ + m, + "OPPO" + ], + [ + p, + g + ] + ], + [ + /vivo (\w+)(?: bui|\))/i, + /\b(v[12]\d{3}\w?[at])(?: bui|;)/i + ], + [ + c, + [ + m, + "Vivo" + ], + [ + p, + g + ] + ], + [ + /\b(rmx[12]\d{3})(?: bui|;|\))/i + ], + [ + c, + [ + m, + "Realme" + ], + [ + p, + g + ] + ], + [ + /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, + /\bmot(?:orola)?[- ](\w*)/i, + /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i + ], + [ + c, + [ + m, + M + ], + [ + p, + g + ] + ], + [ + /\b(mz60\d|xoom[2 ]{0,2}) build\//i + ], + [ + c, + [ + m, + M + ], + [ + p, + k + ] + ], + [ + /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i + ], + [ + c, + [ + m, + P + ], + [ + p, + k + ] + ], + [ + /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, + /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, + /\blg-?([\d\w]+) bui/i + ], + [ + c, + [ + m, + P + ], + [ + p, + g + ] + ], + [ + /(ideatab[-\w ]+)/i, + /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i + ], + [ + c, + [ + m, + "Lenovo" + ], + [ + p, + k + ] + ], + [ + /(?:maemo|nokia).*(n900|lumia \d+)/i, + /nokia[-_ ]?([-\w\.]*)/i + ], + [ + [ + c, + /_/g, + " " + ], + [ + m, + "Nokia" + ], + [ + p, + g + ] + ], + [ + /(pixel c)\b/i + ], + [ + c, + [ + m, + U + ], + [ + p, + k + ] + ], + [ + /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i + ], + [ + c, + [ + m, + U + ], + [ + p, + g + ] + ], + [ + /droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i + ], + [ + c, + [ + m, + I + ], + [ + p, + g + ] + ], + [ + /sony tablet [ps]/i, + /\b(?:sony)?sgp\w+(?: bui|\))/i + ], + [ + [ + c, + "Xperia Tablet" + ], + [ + m, + I + ], + [ + p, + k + ] + ], + [ + / (kb2005|in20[12]5|be20[12][59])\b/i, + /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i + ], + [ + c, + [ + m, + "OnePlus" + ], + [ + p, + g + ] + ], + [ + /(alexa)webm/i, + /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, + /(kf[a-z]+)( bui|\)).+silk\//i + ], + [ + c, + [ + m, + T + ], + [ + p, + k + ] + ], + [ + /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i + ], + [ + [ + c, + /(.+)/g, + "Fire Phone $1" + ], + [ + m, + T + ], + [ + p, + g + ] + ], + [ + /(playbook);[-\w\),; ]+(rim)/i + ], + [ + c, + m, + [ + p, + k + ] + ], + [ + /\b((?:bb[a-f]|st[hv])100-\d)/i, + /\(bb10; (\w+)/i + ], + [ + c, + [ + m, + N + ], + [ + p, + g + ] + ], + [ + /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i + ], + [ + c, + [ + m, + z + ], + [ + p, + k + ] + ], + [ + / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i + ], + [ + c, + [ + m, + z + ], + [ + p, + g + ] + ], + [ + /(nexus 9)/i + ], + [ + c, + [ + m, + "HTC" + ], + [ + p, + k + ] + ], + [ + /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, + /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, + /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i + ], + [ + m, + [ + c, + /_/g, + " " + ], + [ + p, + g + ] + ], + [ + /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i + ], + [ + c, + [ + m, + "Acer" + ], + [ + p, + k + ] + ], + [ + /droid.+; (m[1-5] note) bui/i, + /\bmz-([-\w]{2,})/i + ], + [ + c, + [ + m, + "Meizu" + ], + [ + p, + g + ] + ], + [ + /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i, + /(hp) ([\w ]+\w)/i, + /(asus)-?(\w+)/i, + /(microsoft); (lumia[\w ]+)/i, + /(lenovo)[-_ ]?([-\w]+)/i, + /(jolla)/i, + /(oppo) ?([\w ]+) bui/i + ], + [ + m, + c, + [ + p, + g + ] + ], + [ + /(kobo)\s(ereader|touch)/i, + /(archos) (gamepad2?)/i, + /(hp).+(touchpad(?!.+tablet)|tablet)/i, + /(kindle)\/([\w\.]+)/i, + /(nook)[\w ]+build\/(\w+)/i, + /(dell) (strea[kpr\d ]*[\dko])/i, + /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, + /(trinity)[- ]*(t\d{3}) bui/i, + /(gigaset)[- ]+(q\w{1,9}) bui/i, + /(vodafone) ([\w ]+)(?:\)| bui)/i + ], + [ + m, + c, + [ + p, + k + ] + ], + [ + /(surface duo)/i + ], + [ + c, + [ + m, + R + ], + [ + p, + k + ] + ], + [ + /droid [\d\.]+; (fp\du?)(?: b|\))/i + ], + [ + c, + [ + m, + "Fairphone" + ], + [ + p, + g + ] + ], + [ + /(u304aa)/i + ], + [ + c, + [ + m, + "AT&T" + ], + [ + p, + g + ] + ], + [ + /\bsie-(\w*)/i + ], + [ + c, + [ + m, + "Siemens" + ], + [ + p, + g + ] + ], + [ + /\b(rct\w+) b/i + ], + [ + c, + [ + m, + "RCA" + ], + [ + p, + k + ] + ], + [ + /\b(venue[\d ]{2,7}) b/i + ], + [ + c, + [ + m, + "Dell" + ], + [ + p, + k + ] + ], + [ + /\b(q(?:mv|ta)\w+) b/i + ], + [ + c, + [ + m, + "Verizon" + ], + [ + p, + k + ] + ], + [ + /\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i + ], + [ + c, + [ + m, + "Barnes & Noble" + ], + [ + p, + k + ] + ], + [ + /\b(tm\d{3}\w+) b/i + ], + [ + c, + [ + m, + "NuVision" + ], + [ + p, + k + ] + ], + [ + /\b(k88) b/i + ], + [ + c, + [ + m, + "ZTE" + ], + [ + p, + k + ] + ], + [ + /\b(nx\d{3}j) b/i + ], + [ + c, + [ + m, + "ZTE" + ], + [ + p, + g + ] + ], + [ + /\b(gen\d{3}) b.+49h/i + ], + [ + c, + [ + m, + "Swiss" + ], + [ + p, + g + ] + ], + [ + /\b(zur\d{3}) b/i + ], + [ + c, + [ + m, + "Swiss" + ], + [ + p, + k + ] + ], + [ + /\b((zeki)?tb.*\b) b/i + ], + [ + c, + [ + m, + "Zeki" + ], + [ + p, + k + ] + ], + [ + /\b([yr]\d{2}) b/i, + /\b(dragon[- ]+touch |dt)(\w{5}) b/i + ], + [ + [ + m, + "Dragon Touch" + ], + c, + [ + p, + k + ] + ], + [ + /\b(ns-?\w{0,9}) b/i + ], + [ + c, + [ + m, + "Insignia" + ], + [ + p, + k + ] + ], + [ + /\b((nxa|next)-?\w{0,9}) b/i + ], + [ + c, + [ + m, + "NextBook" + ], + [ + p, + k + ] + ], + [ + /\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i + ], + [ + [ + m, + "Voice" + ], + c, + [ + p, + g + ] + ], + [ + /\b(lvtel\-)?(v1[12]) b/i + ], + [ + [ + m, + "LvTel" + ], + c, + [ + p, + g + ] + ], + [ + /\b(ph-1) /i + ], + [ + c, + [ + m, + "Essential" + ], + [ + p, + g + ] + ], + [ + /\b(v(100md|700na|7011|917g).*\b) b/i + ], + [ + c, + [ + m, + "Envizen" + ], + [ + p, + k + ] + ], + [ + /\b(trio[-\w\. ]+) b/i + ], + [ + c, + [ + m, + "MachSpeed" + ], + [ + p, + k + ] + ], + [ + /\btu_(1491) b/i + ], + [ + c, + [ + m, + "Rotor" + ], + [ + p, + k + ] + ], + [ + /(shield[\w ]+) b/i + ], + [ + c, + [ + m, + "Nvidia" + ], + [ + p, + k + ] + ], + [ + /(sprint) (\w+)/i + ], + [ + m, + c, + [ + p, + g + ] + ], + [ + /(kin\.[onetw]{3})/i + ], + [ + [ + c, + /\./g, + " " + ], + [ + m, + R + ], + [ + p, + g + ] + ], + [ + /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i + ], + [ + c, + [ + m, + G + ], + [ + p, + k + ] + ], + [ + /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i + ], + [ + c, + [ + m, + G + ], + [ + p, + g + ] + ], + [ + /smart-tv.+(samsung)/i + ], + [ + m, + [ + p, + x + ] + ], + [ + /hbbtv.+maple;(\d+)/i + ], + [ + [ + c, + /^/, + "SmartTV" + ], + [ + m, + V + ], + [ + p, + x + ] + ], + [ + /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i + ], + [ + [ + m, + P + ], + [ + p, + x + ] + ], + [ + /(apple) ?tv/i + ], + [ + m, + [ + c, + S + " TV" + ], + [ + p, + x + ] + ], + [ + /crkey/i + ], + [ + [ + c, + C + "cast" + ], + [ + m, + U + ], + [ + p, + x + ] + ], + [ + /droid.+aft(\w)( bui|\))/i + ], + [ + c, + [ + m, + T + ], + [ + p, + x + ] + ], + [ + /\(dtv[\);].+(aquos)/i, + /(aquos-tv[\w ]+)\)/i + ], + [ + c, + [ + m, + D + ], + [ + p, + x + ] + ], + [ + /(bravia[\w ]+)( bui|\))/i + ], + [ + c, + [ + m, + I + ], + [ + p, + x + ] + ], + [ + /(mitv-\w{5}) bui/i + ], + [ + c, + [ + m, + F + ], + [ + p, + x + ] + ], + [ + /Hbbtv.*(technisat) (.*);/i + ], + [ + m, + c, + [ + p, + x + ] + ], + [ + /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, + /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i + ], + [ + [ + m, + trim + ], + [ + c, + trim + ], + [ + p, + x + ] + ], + [ + /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i + ], + [ + [ + p, + x + ] + ], + [ + /(ouya)/i, + /(nintendo) ([wids3utch]+)/i + ], + [ + m, + c, + [ + p, + v + ] + ], + [ + /droid.+; (shield) bui/i + ], + [ + c, + [ + m, + "Nvidia" + ], + [ + p, + v + ] + ], + [ + /(playstation [345portablevi]+)/i + ], + [ + c, + [ + m, + I + ], + [ + p, + v + ] + ], + [ + /\b(xbox(?: one)?(?!; xbox))[\); ]/i + ], + [ + c, + [ + m, + R + ], + [ + p, + v + ] + ], + [ + /((pebble))app/i + ], + [ + m, + c, + [ + p, + _ + ] + ], + [ + /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i + ], + [ + c, + [ + m, + S + ], + [ + p, + _ + ] + ], + [ + /droid.+; (glass) \d/i + ], + [ + c, + [ + m, + U + ], + [ + p, + _ + ] + ], + [ + /droid.+; (wt63?0{2,3})\)/i + ], + [ + c, + [ + m, + G + ], + [ + p, + _ + ] + ], + [ + /(quest( 2| pro)?)/i + ], + [ + c, + [ + m, + H + ], + [ + p, + _ + ] + ], + [ + /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i + ], + [ + m, + [ + p, + y + ] + ], + [ + /(aeobc)\b/i + ], + [ + c, + [ + m, + T + ], + [ + p, + y + ] + ], + [ + /droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i + ], + [ + c, + [ + p, + g + ] + ], + [ + /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i + ], + [ + c, + [ + p, + k + ] + ], + [ + /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i + ], + [ + [ + p, + k + ] + ], + [ + /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i + ], + [ + [ + p, + g + ] + ], + [ + /(android[-\w\. ]{0,9});.+buil/i + ], + [ + c, + [ + m, + "Generic" + ] + ] + ], + engine: [ + [ + /windows.+ edge\/([\w\.]+)/i + ], + [ + f, + [ + u, + E + "HTML" + ] + ], + [ + /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i + ], + [ + f, + [ + u, + "Blink" + ] + ], + [ + /(presto)\/([\w\.]+)/i, + /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, + /ekioh(flow)\/([\w\.]+)/i, + /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, + /(icab)[\/ ]([23]\.[\d\.]+)/i, + /\b(libweb)/i + ], + [ + u, + f + ], + [ + /rv\:([\w\.]{1,9})\b.+(gecko)/i + ], + [ + f, + u + ] + ], + os: [ + [ + /microsoft (windows) (vista|xp)/i + ], + [ + u, + f + ], + [ + /(windows) nt 6\.2; (arm)/i, + /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i, + /(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i + ], + [ + u, + [ + f, + strMapper, + X + ] + ], + [ + /(win(?=3|9|n)|win 9x )([nt\d\.]+)/i + ], + [ + [ + u, + "Windows" + ], + [ + f, + strMapper, + X + ] + ], + [ + /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, + /ios;fbsv\/([\d\.]+)/i, + /cfnetwork\/.+darwin/i + ], + [ + [ + f, + /_/g, + "." + ], + [ + u, + "iOS" + ] + ], + [ + /(mac os x) ?([\w\. ]*)/i, + /(macintosh|mac_powerpc\b)(?!.+haiku)/i + ], + [ + [ + u, + Z + ], + [ + f, + /_/g, + "." + ] + ], + [ + /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i + ], + [ + f, + u + ], + [ + /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, + /(blackberry)\w*\/([\w\.]*)/i, + /(tizen|kaios)[\/ ]([\w\.]+)/i, + /\((series40);/i + ], + [ + u, + f + ], + [ + /\(bb(10);/i + ], + [ + f, + [ + u, + N + ] + ], + [ + /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i + ], + [ + f, + [ + u, + "Symbian" + ] + ], + [ + /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i + ], + [ + f, + [ + u, + O + " OS" + ] + ], + [ + /web0s;.+rt(tv)/i, + /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i + ], + [ + f, + [ + u, + "webOS" + ] + ], + [ + /watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i + ], + [ + f, + [ + u, + "watchOS" + ] + ], + [ + /crkey\/([\d\.]+)/i + ], + [ + f, + [ + u, + C + "cast" + ] + ], + [ + /(cros) [\w]+(?:\)| ([\w\.]+)\b)/i + ], + [ + [ + u, + L + ], + f + ], + [ + /panasonic;(viera)/i, + /(netrange)mmh/i, + /(nettv)\/(\d+\.[\w\.]+)/i, + /(nintendo|playstation) ([wids345portablevuch]+)/i, + /(xbox); +xbox ([^\);]+)/i, + /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, + /(mint)[\/\(\) ]?(\w*)/i, + /(mageia|vectorlinux)[; ]/i, + /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, + /(hurd|linux) ?([\w\.]*)/i, + /(gnu) ?([\w\.]*)/i, + /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, + /(haiku) (\w+)/i + ], + [ + u, + f + ], + [ + /(sunos) ?([\w\.\d]*)/i + ], + [ + [ + u, + "Solaris" + ], + f + ], + [ + /((?:open)?solaris)[-\/ ]?([\w\.]*)/i, + /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, + /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, + /(unix) ?([\w\.]*)/i + ], + [ + u, + f + ] + ] + }; + var UAParser = function(i, e) { + if (typeof i === w) { + e = i; + i = a; + } + if (!(this instanceof UAParser)) { + return new UAParser(i, e).getResult(); + } + var r = typeof o !== b && o.navigator ? o.navigator : a; + var n = i || (r && r.userAgent ? r.userAgent : t); + var v = r && r.userAgentData ? r.userAgentData : a; + var x = e ? extend(K, e) : K; + var _ = r && r.userAgent == n; + this.getBrowser = function() { + var i = {}; + i[u] = a; + i[f] = a; + rgxMapper.call(i, n, x.browser); + i[d] = majorize(i[f]); + if (_ && r && r.brave && typeof r.brave.isBrave == s) { + i[u] = "Brave"; + } + return i; + }; + this.getCPU = function() { + var i = {}; + i[h] = a; + rgxMapper.call(i, n, x.cpu); + return i; + }; + this.getDevice = function() { + var i = {}; + i[m] = a; + i[c] = a; + i[p] = a; + rgxMapper.call(i, n, x.device); + if (_ && !i[p] && v && v.mobile) { + i[p] = g; + } + if (_ && i[c] == "Macintosh" && r && typeof r.standalone !== b && r.maxTouchPoints && r.maxTouchPoints > 2) { + i[c] = "iPad"; + i[p] = k; + } + return i; + }; + this.getEngine = function() { + var i = {}; + i[u] = a; + i[f] = a; + rgxMapper.call(i, n, x.engine); + return i; + }; + this.getOS = function() { + var i = {}; + i[u] = a; + i[f] = a; + rgxMapper.call(i, n, x.os); + if (_ && !i[u] && v && v.platform != "Unknown") { + i[u] = v.platform.replace(/chrome os/i, L).replace(/macos/i, Z); + } + return i; + }; + this.getResult = function() { + return { + ua: this.getUA(), + browser: this.getBrowser(), + engine: this.getEngine(), + os: this.getOS(), + device: this.getDevice(), + cpu: this.getCPU() + }; + }; + this.getUA = function() { + return n; + }; + this.setUA = function(i) { + n = typeof i === l && i.length > q ? trim(i, q) : i; + return this; + }; + this.setUA(n); + return this; + }; + UAParser.VERSION = r; + UAParser.BROWSER = enumerize([ + u, + f, + d + ]); + UAParser.CPU = enumerize([ + h + ]); + UAParser.DEVICE = enumerize([ + c, + m, + p, + v, + g, + x, + k, + _, + y + ]); + UAParser.ENGINE = UAParser.OS = enumerize([ + u, + f + ]); + if (typeof e !== b) { + if ("object" !== b && i.exports) { + e = i.exports = UAParser; + } + e.UAParser = UAParser; + } else { + if (typeof define === s && define.amd) { + ((r)=>r !== undefined && __turbopack_context__.v(r))(function() { + return UAParser; + }(__turbopack_context__.r, exports, module)); + } else if (typeof o !== b) { + o.UAParser = UAParser; + } + } + var Q = typeof o !== b && (o.jQuery || o.Zepto); + if (Q && !Q.ua) { + var Y = new UAParser; + Q.ua = Y.getResult(); + Q.ua.get = function() { + return Y.getUA(); + }; + Q.ua.set = function(i) { + Y.setUA(i); + var e = Y.getResult(); + for(var o in e){ + Q.ua[o] = e[o]; + } + }; + } + })(("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : this); + } + }; + var e = {}; + function __nccwpck_require__(o) { + var a = e[o]; + if (a !== undefined) { + return a.exports; + } + var r = e[o] = { + exports: {} + }; + var t = true; + try { + i[o].call(r.exports, r, r.exports, __nccwpck_require__); + t = false; + } finally{ + if (t) delete e[o]; + } + return r.exports; + } + if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/ua-parser-js") + "/"; + var o = __nccwpck_require__(226); + module.exports = o; +})(); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/user-agent.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "isBot", + ()=>isBot, + "userAgent", + ()=>userAgent, + "userAgentFromString", + ()=>userAgentFromString +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$ua$2d$parser$2d$js$2f$ua$2d$parser$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/ua-parser-js/ua-parser.js [middleware-edge] (ecmascript)"); +; +function isBot(input) { + return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input); +} +function userAgentFromString(input) { + return { + ...(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$ua$2d$parser$2d$js$2f$ua$2d$parser$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"])(input), + isBot: input === undefined ? false : isBot(input) + }; +} +function userAgent({ headers }) { + return userAgentFromString(headers.get('user-agent') || undefined); +} //# sourceMappingURL=user-agent.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "URLPattern", + ()=>GlobalURLPattern +]); +const GlobalURLPattern = typeof URLPattern === 'undefined' ? undefined : URLPattern; +; + //# sourceMappingURL=url-pattern.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/after/after.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "after", + ()=>after +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript) "); +; +function after(task) { + const workStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__["workAsyncStorage"].getStore(); + if (!workStore) { + // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore + throw Object.defineProperty(new Error('`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'), "__NEXT_ERROR_CODE", { + value: "E468", + enumerable: false, + configurable: true + }); + } + const { afterContext } = workStore; + return afterContext.after(task); +} //# sourceMappingURL=after.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/after/index.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$after$2f$after$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/after/after.js [middleware-edge] (ecmascript)"); //# sourceMappingURL=index.js.map +; +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/react/cjs/react.react-server.development.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +/** + * @license React + * react.react-server.development.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ "production" !== ("TURBOPACK compile-time value", "development") && function() { + function noop() {} + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) return null; + maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + try { + testStringCoercion(value); + var JSCompiler_inline_result = !1; + } catch (e) { + JSCompiler_inline_result = !0; + } + if (JSCompiler_inline_result) { + JSCompiler_inline_result = console; + var JSCompiler_temp_const = JSCompiler_inline_result.error; + var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0); + return testStringCoercion(value); + } + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch(type){ + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + } + if ("object" === typeof type) switch("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof){ + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); + return type; + case REACT_MEMO_TYPE: + return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) {} + } + return null; + } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } + function getOwner() { + var dispatcher = ReactSharedInternals.A; + return null === dispatcher ? null : dispatcher.getOwner(); + } + function UnknownOwner() { + return Error("react-stack-top-frame"); + } + function hasValidKey(config) { + if (hasOwnProperty.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) return !1; + } + return void 0 !== config.key; + } + function defineKeyPropWarningGetter(props, displayName) { + function warnAboutAccessingKey() { + specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName)); + } + warnAboutAccessingKey.isReactWarning = !0; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: !0 + }); + } + function elementRefGetterWithDeprecationWarning() { + var componentName = getComponentNameFromType(this.type); + didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")); + componentName = this.props.ref; + return void 0 !== componentName ? componentName : null; + } + function ReactElement(type, key, props, owner, debugStack, debugTask) { + var refProp = props.ref; + type = { + $$typeof: REACT_ELEMENT_TYPE, + type: type, + key: key, + props: props, + _owner: owner + }; + null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", { + enumerable: !1, + get: elementRefGetterWithDeprecationWarning + }) : Object.defineProperty(type, "ref", { + enumerable: !1, + value: null + }); + type._store = {}; + Object.defineProperty(type._store, "validated", { + configurable: !1, + enumerable: !1, + writable: !0, + value: 0 + }); + Object.defineProperty(type, "_debugInfo", { + configurable: !1, + enumerable: !1, + writable: !0, + value: null + }); + Object.defineProperty(type, "_debugStack", { + configurable: !1, + enumerable: !1, + writable: !0, + value: debugStack + }); + Object.defineProperty(type, "_debugTask", { + configurable: !1, + enumerable: !1, + writable: !0, + value: debugTask + }); + Object.freeze && (Object.freeze(type.props), Object.freeze(type)); + return type; + } + function cloneAndReplaceKey(oldElement, newKey) { + newKey = ReactElement(oldElement.type, newKey, oldElement.props, oldElement._owner, oldElement._debugStack, oldElement._debugTask); + oldElement._store && (newKey._store.validated = oldElement._store.validated); + return newKey; + } + function isValidElement(object) { + return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE; + } + function escape(key) { + var escaperLookup = { + "=": "=0", + ":": "=2" + }; + return "$" + key.replace(/[=:]/g, function(match) { + return escaperLookup[match]; + }); + } + function getElementKey(element, index) { + return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36); + } + function resolveThenable(thenable) { + switch(thenable.status){ + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + switch("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(function(fulfilledValue) { + "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue); + }, function(error) { + "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error); + })), thenable.status){ + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + } + throw thenable; + } + function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { + var type = typeof children; + if ("undefined" === type || "boolean" === type) children = null; + var invokeCallback = !1; + if (null === children) invokeCallback = !0; + else switch(type){ + case "bigint": + case "string": + case "number": + invokeCallback = !0; + break; + case "object": + switch(children.$$typeof){ + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = !0; + break; + case REACT_LAZY_TYPE: + return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback); + } + } + if (invokeCallback) { + invokeCallback = children; + callback = callback(invokeCallback); + var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar; + isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) { + return c; + })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(callback, escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + childKey), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback)); + return 1; + } + invokeCallback = 0; + childKey = "" === nameSoFar ? "." : nameSoFar + ":"; + if (isArrayImpl(children)) for(var i = 0; i < children.length; i++)nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback); + else if (i = getIteratorFn(children), "function" === typeof i) for(i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = !0), children = i.call(children), i = 0; !(nameSoFar = children.next()).done;)nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback); + else if ("object" === type) { + if ("function" === typeof children.then) return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback); + array = String(children); + throw Error("Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."); + } + return invokeCallback; + } + function mapChildren(children, func, context) { + if (null == children) return children; + var result = [], count = 0; + mapIntoArray(children, result, "", "", function(child) { + return func.call(context, child, count++); + }); + return result; + } + function resolveDispatcher() { + var dispatcher = ReactSharedInternals.H; + null === dispatcher && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."); + return dispatcher; + } + function lazyInitializer(payload) { + if (-1 === payload._status) { + var ioInfo = payload._ioInfo; + null != ioInfo && (ioInfo.start = ioInfo.end = performance.now()); + ioInfo = payload._result; + var thenable = ioInfo(); + thenable.then(function(moduleObject) { + if (0 === payload._status || -1 === payload._status) { + payload._status = 1; + payload._result = moduleObject; + var _ioInfo = payload._ioInfo; + null != _ioInfo && (_ioInfo.end = performance.now()); + void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject); + } + }, function(error) { + if (0 === payload._status || -1 === payload._status) { + payload._status = 2; + payload._result = error; + var _ioInfo2 = payload._ioInfo; + null != _ioInfo2 && (_ioInfo2.end = performance.now()); + void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error); + } + }); + ioInfo = payload._ioInfo; + if (null != ioInfo) { + ioInfo.value = thenable; + var displayName = thenable.displayName; + "string" === typeof displayName && (ioInfo.name = displayName); + } + -1 === payload._status && (payload._status = 0, payload._result = thenable); + } + if (1 === payload._status) return ioInfo = payload._result, void 0 === ioInfo && console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", ioInfo), "default" in ioInfo || console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", ioInfo), ioInfo.default; + throw payload._result; + } + function createCacheRoot() { + return new WeakMap(); + } + function createCacheNode() { + return { + s: 0, + v: void 0, + o: null, + p: null + }; + } + var ReactSharedInternals = { + H: null, + A: null, + getCurrentStack: null, + recentlyCreatedOwnerStacks: 0 + }, isArrayImpl = Array.isArray, REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign, createTask = console.createTask ? console.createTask : function() { + return null; + }, createFakeCallStack = { + react_stack_bottom_frame: function(callStackForError) { + return callStackForError(); + } + }, specialPropKeyWarningShown, didWarnAboutOldJSXRuntime; + var didWarnAboutElementRef = {}; + var unknownOwnerDebugStack = createFakeCallStack.react_stack_bottom_frame.bind(createFakeCallStack, UnknownOwner)(); + var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner)); + var didWarnAboutMaps = !1, userProvidedKeyEscapeRegex = /\/+/g; + exports.Children = { + map: mapChildren, + forEach: function(children, forEachFunc, forEachContext) { + mapChildren(children, function() { + forEachFunc.apply(this, arguments); + }, forEachContext); + }, + count: function(children) { + var n = 0; + mapChildren(children, function() { + n++; + }); + return n; + }, + toArray: function(children) { + return mapChildren(children, function(child) { + return child; + }) || []; + }, + only: function(children) { + if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child."); + return children; + } + }; + exports.Fragment = REACT_FRAGMENT_TYPE; + exports.Profiler = REACT_PROFILER_TYPE; + exports.StrictMode = REACT_STRICT_MODE_TYPE; + exports.Suspense = REACT_SUSPENSE_TYPE; + exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; + exports.cache = function(fn) { + return function() { + var dispatcher = ReactSharedInternals.A; + if (!dispatcher) return fn.apply(null, arguments); + var fnMap = dispatcher.getCacheForType(createCacheRoot); + dispatcher = fnMap.get(fn); + void 0 === dispatcher && (dispatcher = createCacheNode(), fnMap.set(fn, dispatcher)); + fnMap = 0; + for(var l = arguments.length; fnMap < l; fnMap++){ + var arg = arguments[fnMap]; + if ("function" === typeof arg || "object" === typeof arg && null !== arg) { + var objectCache = dispatcher.o; + null === objectCache && (dispatcher.o = objectCache = new WeakMap()); + dispatcher = objectCache.get(arg); + void 0 === dispatcher && (dispatcher = createCacheNode(), objectCache.set(arg, dispatcher)); + } else objectCache = dispatcher.p, null === objectCache && (dispatcher.p = objectCache = new Map()), dispatcher = objectCache.get(arg), void 0 === dispatcher && (dispatcher = createCacheNode(), objectCache.set(arg, dispatcher)); + } + if (1 === dispatcher.s) return dispatcher.v; + if (2 === dispatcher.s) throw dispatcher.v; + try { + var result = fn.apply(null, arguments); + fnMap = dispatcher; + fnMap.s = 1; + return fnMap.v = result; + } catch (error) { + throw result = dispatcher, result.s = 2, result.v = error, error; + } + }; + }; + exports.cacheSignal = function() { + var dispatcher = ReactSharedInternals.A; + return dispatcher ? dispatcher.cacheSignal() : null; + }; + exports.captureOwnerStack = function() { + var getCurrentStack = ReactSharedInternals.getCurrentStack; + return null === getCurrentStack ? null : getCurrentStack(); + }; + exports.cloneElement = function(element, config, children) { + if (null === element || void 0 === element) throw Error("The argument must be a React element, but you passed " + element + "."); + var props = assign({}, element.props), key = element.key, owner = element._owner; + if (null != config) { + var JSCompiler_inline_result; + a: { + if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(config, "ref").get) && JSCompiler_inline_result.isReactWarning) { + JSCompiler_inline_result = !1; + break a; + } + JSCompiler_inline_result = void 0 !== config.ref; + } + JSCompiler_inline_result && (owner = getOwner()); + hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key); + for(propName in config)!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]); + } + var propName = arguments.length - 2; + if (1 === propName) props.children = children; + else if (1 < propName) { + JSCompiler_inline_result = Array(propName); + for(var i = 0; i < propName; i++)JSCompiler_inline_result[i] = arguments[i + 2]; + props.children = JSCompiler_inline_result; + } + props = ReactElement(element.type, key, props, owner, element._debugStack, element._debugTask); + for(key = 2; key < arguments.length; key++)owner = arguments[key], isValidElement(owner) && owner._store && (owner._store.validated = 1); + return props; + }; + exports.createElement = function(type, config, children) { + for(var i = 2; i < arguments.length; i++){ + var node = arguments[i]; + isValidElement(node) && node._store && (node._store.validated = 1); + } + i = {}; + node = null; + if (null != config) for(propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = !0, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), hasValidKey(config) && (checkKeyStringCoercion(config.key), node = "" + config.key), config)hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]); + var childrenLength = arguments.length - 2; + if (1 === childrenLength) i.children = children; + else if (1 < childrenLength) { + for(var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)childArray[_i] = arguments[_i + 2]; + Object.freeze && Object.freeze(childArray); + i.children = childArray; + } + if (type && type.defaultProps) for(propName in childrenLength = type.defaultProps, childrenLength)void 0 === i[propName] && (i[propName] = childrenLength[propName]); + node && defineKeyPropWarningGetter(i, "function" === typeof type ? type.displayName || type.name || "Unknown" : type); + var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++; + return ReactElement(type, node, i, getOwner(), propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack, propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask); + }; + exports.createRef = function() { + var refObject = { + current: null + }; + Object.seal(refObject); + return refObject; + }; + exports.forwardRef = function(render) { + null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : "function" !== typeof render ? console.error("forwardRef requires a render function but was given %s.", null === render ? "null" : typeof render) : 0 !== render.length && 2 !== render.length && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); + null != render && null != render.defaultProps && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"); + var elementType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render: render + }, ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: !1, + configurable: !0, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + render.name || render.displayName || (Object.defineProperty(render, "name", { + value: name + }), render.displayName = name); + } + }); + return elementType; + }; + exports.isValidElement = isValidElement; + exports.lazy = function(ctor) { + ctor = { + _status: -1, + _result: ctor + }; + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: ctor, + _init: lazyInitializer + }, ioInfo = { + name: "lazy", + start: -1, + end: -1, + value: null, + owner: null, + debugStack: Error("react-stack-top-frame"), + debugTask: console.createTask ? console.createTask("lazy()") : null + }; + ctor._ioInfo = ioInfo; + lazyType._debugInfo = [ + { + awaited: ioInfo + } + ]; + return lazyType; + }; + exports.memo = function(type, compare) { + null == type && console.error("memo: The first argument must be a component. Instead received: %s", null === type ? "null" : typeof type); + compare = { + $$typeof: REACT_MEMO_TYPE, + type: type, + compare: void 0 === compare ? null : compare + }; + var ownName; + Object.defineProperty(compare, "displayName", { + enumerable: !1, + configurable: !0, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + type.name || type.displayName || (Object.defineProperty(type, "name", { + value: name + }), type.displayName = name); + } + }); + return compare; + }; + exports.use = function(usable) { + return resolveDispatcher().use(usable); + }; + exports.useCallback = function(callback, deps) { + return resolveDispatcher().useCallback(callback, deps); + }; + exports.useDebugValue = function(value, formatterFn) { + return resolveDispatcher().useDebugValue(value, formatterFn); + }; + exports.useId = function() { + return resolveDispatcher().useId(); + }; + exports.useMemo = function(create, deps) { + return resolveDispatcher().useMemo(create, deps); + }; + exports.version = "19.2.0-canary-0bdb9206-20250818"; +}(); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/react/react.react-server.js [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable +; +else { + module.exports = __turbopack_context__.r("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/react/cjs/react.react-server.development.js [middleware-edge] (ecmascript)"); +} +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/hooks-server-context.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "DynamicServerError", + ()=>DynamicServerError, + "isDynamicServerError", + ()=>isDynamicServerError +]); +const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; +class DynamicServerError extends Error { + constructor(description){ + super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE; + } +} +function isDynamicServerError(err) { + if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { + return false; + } + return err.digest === DYNAMIC_ERROR_CODE; +} //# sourceMappingURL=hooks-server-context.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/static-generation-bailout.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "StaticGenBailoutError", + ()=>StaticGenBailoutError, + "isStaticGenBailoutError", + ()=>isStaticGenBailoutError +]); +const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; +class StaticGenBailoutError extends Error { + constructor(...args){ + super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; + } +} +function isStaticGenBailoutError(error) { + if (typeof error !== 'object' || error === null || !('code' in error)) { + return false; + } + return error.code === NEXT_STATIC_GEN_BAILOUT; +} //# sourceMappingURL=static-generation-bailout.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/dynamic-rendering-utils.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "isHangingPromiseRejectionError", + ()=>isHangingPromiseRejectionError, + "makeDevtoolsIOAwarePromise", + ()=>makeDevtoolsIOAwarePromise, + "makeHangingPromise", + ()=>makeHangingPromise +]); +function isHangingPromiseRejectionError(err) { + if (typeof err !== 'object' || err === null || !('digest' in err)) { + return false; + } + return err.digest === HANGING_PROMISE_REJECTION; +} +const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; +class HangingPromiseRejectionError extends Error { + constructor(route, expression){ + super(`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}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; + } +} +const abortListenersBySignal = new WeakMap(); +function makeHangingPromise(signal, route, expression) { + if (signal.aborted) { + return Promise.reject(new HangingPromiseRejectionError(route, expression)); + } else { + const hangingPromise = new Promise((_, reject)=>{ + const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); + let currentListeners = abortListenersBySignal.get(signal); + if (currentListeners) { + currentListeners.push(boundRejection); + } else { + const listeners = [ + boundRejection + ]; + abortListenersBySignal.set(signal, listeners); + signal.addEventListener('abort', ()=>{ + for(let i = 0; i < listeners.length; i++){ + listeners[i](); + } + }, { + once: true + }); + } + }); + // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so + // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct + // your own promise out of it you'll need to ensure you handle the error when it rejects. + hangingPromise.catch(ignoreReject); + return hangingPromise; + } +} +function ignoreReject() {} +function makeDevtoolsIOAwarePromise(underlying) { + // in React DevTools if we resolve in a setTimeout we will observe + // the promise resolution as something that can suspend a boundary or root. + return new Promise((resolve)=>{ + // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. + setTimeout(()=>{ + resolve(underlying); + }, 0); + }); +} //# sourceMappingURL=dynamic-rendering-utils.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/framework/boundary-constants.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "METADATA_BOUNDARY_NAME", + ()=>METADATA_BOUNDARY_NAME, + "OUTLET_BOUNDARY_NAME", + ()=>OUTLET_BOUNDARY_NAME, + "ROOT_LAYOUT_BOUNDARY_NAME", + ()=>ROOT_LAYOUT_BOUNDARY_NAME, + "VIEWPORT_BOUNDARY_NAME", + ()=>VIEWPORT_BOUNDARY_NAME +]); +const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; +const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; +const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; +const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/scheduler.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Schedules a function to be called on the next tick after the other promises + * have been resolved. + * + * @param cb the function to schedule + */ __turbopack_context__.s([ + "atLeastOneTask", + ()=>atLeastOneTask, + "scheduleImmediate", + ()=>scheduleImmediate, + "scheduleOnNextTick", + ()=>scheduleOnNextTick, + "waitAtLeastOneReactRenderTask", + ()=>waitAtLeastOneReactRenderTask +]); +const scheduleOnNextTick = (cb)=>{ + // We use Promise.resolve().then() here so that the operation is scheduled at + // the end of the promise job queue, we then add it to the next process tick + // to ensure it's evaluated afterwards. + // + // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255 + // + Promise.resolve().then(()=>{ + if ("TURBOPACK compile-time truthy", 1) { + setTimeout(cb, 0); + } else //TURBOPACK unreachable + ; + }); +}; +const scheduleImmediate = (cb)=>{ + if ("TURBOPACK compile-time truthy", 1) { + setTimeout(cb, 0); + } else //TURBOPACK unreachable + ; +}; +function atLeastOneTask() { + return new Promise((resolve)=>scheduleImmediate(resolve)); +} +function waitAtLeastOneReactRenderTask() { + if ("TURBOPACK compile-time truthy", 1) { + return new Promise((r)=>setTimeout(r, 0)); + } else //TURBOPACK unreachable + ; +} //# sourceMappingURL=scheduler.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +// This has to be a shared module which is shared between client component error boundary and dynamic component +__turbopack_context__.s([ + "BailoutToCSRError", + ()=>BailoutToCSRError, + "isBailoutToCSRError", + ()=>isBailoutToCSRError +]); +const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'; +class BailoutToCSRError extends Error { + constructor(reason){ + super("Bail out to client-side rendering: " + reason), this.reason = reason, this.digest = BAILOUT_TO_CSR; + } +} +function isBailoutToCSRError(err) { + if (typeof err !== 'object' || err === null || !('digest' in err)) { + return false; + } + return err.digest === BAILOUT_TO_CSR; +} //# sourceMappingURL=bailout-to-csr.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/dynamic-rendering.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * The functions provided by this module are used to communicate certain properties + * about the currently running code so that Next.js can make decisions on how to handle + * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. + * + * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. + * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts + * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of + * Dynamic indications. + * + * The first is simply an intention to be dynamic. unstable_noStore is an example of this where + * the currently executing code simply declares that the current scope is dynamic but if you use it + * inside unstable_cache it can still be cached. This type of indication can be removed if we ever + * make the default dynamic to begin with because the only way you would ever be static is inside + * a cache scope which this indication does not affect. + * + * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic + * because it means that it is inappropriate to cache this at all. using a dynamic data source inside + * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should + * read that data outside the cache and pass it in as an argument to the cached function. + */ // Once postpone is in stable we should switch to importing the postpone export directly +__turbopack_context__.s([ + "Postpone", + ()=>Postpone, + "PreludeState", + ()=>PreludeState, + "abortAndThrowOnSynchronousRequestDataAccess", + ()=>abortAndThrowOnSynchronousRequestDataAccess, + "abortOnSynchronousPlatformIOAccess", + ()=>abortOnSynchronousPlatformIOAccess, + "accessedDynamicData", + ()=>accessedDynamicData, + "annotateDynamicAccess", + ()=>annotateDynamicAccess, + "consumeDynamicAccess", + ()=>consumeDynamicAccess, + "createDynamicTrackingState", + ()=>createDynamicTrackingState, + "createDynamicValidationState", + ()=>createDynamicValidationState, + "createHangingInputAbortSignal", + ()=>createHangingInputAbortSignal, + "createRenderInBrowserAbortSignal", + ()=>createRenderInBrowserAbortSignal, + "delayUntilRuntimeStage", + ()=>delayUntilRuntimeStage, + "formatDynamicAPIAccesses", + ()=>formatDynamicAPIAccesses, + "getFirstDynamicReason", + ()=>getFirstDynamicReason, + "isDynamicPostpone", + ()=>isDynamicPostpone, + "isPrerenderInterruptedError", + ()=>isPrerenderInterruptedError, + "logDisallowedDynamicError", + ()=>logDisallowedDynamicError, + "markCurrentScopeAsDynamic", + ()=>markCurrentScopeAsDynamic, + "postponeWithTracking", + ()=>postponeWithTracking, + "throwIfDisallowedDynamic", + ()=>throwIfDisallowedDynamic, + "throwToInterruptStaticGeneration", + ()=>throwToInterruptStaticGeneration, + "trackAllowedDynamicAccess", + ()=>trackAllowedDynamicAccess, + "trackDynamicDataInDynamicRender", + ()=>trackDynamicDataInDynamicRender, + "trackSynchronousPlatformIOAccessInDev", + ()=>trackSynchronousPlatformIOAccessInDev, + "trackSynchronousRequestDataAccessInDev", + ()=>trackSynchronousRequestDataAccessInDev, + "useDynamicRouteParams", + ()=>useDynamicRouteParams, + "warnOnSyncDynamicError", + ()=>warnOnSyncDynamicError +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$react$2e$react$2d$server$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/react/react.react-server.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$hooks$2d$server$2d$context$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/hooks-server-context.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/static-generation-bailout.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/dynamic-rendering-utils.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/framework/boundary-constants.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$scheduler$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/scheduler.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$lazy$2d$dynamic$2f$bailout$2d$to$2d$csr$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/invariant-error.js [middleware-edge] (ecmascript)"); +; +; +; +; +; +; +; +; +; +; +const hasPostpone = typeof __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$react$2e$react$2d$server$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"].unstable_postpone === 'function'; +function createDynamicTrackingState(isDebugDynamicAccesses) { + return { + isDebugDynamicAccesses, + dynamicAccesses: [], + syncDynamicErrorWithStack: null + }; +} +function createDynamicValidationState() { + return { + hasSuspenseAboveBody: false, + hasDynamicMetadata: false, + hasDynamicViewport: false, + hasAllowedDynamic: false, + dynamicErrors: [] + }; +} +function getFirstDynamicReason(trackingState) { + var _trackingState_dynamicAccesses_; + return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; +} +function markCurrentScopeAsDynamic(store, workUnitStore, expression) { + if (workUnitStore) { + switch(workUnitStore.type){ + case 'cache': + case 'unstable-cache': + // Inside cache scopes, marking a scope as dynamic has no effect, + // because the outer cache scope creates a cache boundary. This is + // subtly different from reading a dynamic data source, which is + // forbidden inside a cache scope. + return; + case 'private-cache': + // A private cache scope is already dynamic by definition. + return; + case 'prerender-legacy': + case 'prerender-ppr': + case 'request': + break; + default: + workUnitStore; + } + } + // If we're forcing dynamic rendering or we're forcing static rendering, we + // don't need to do anything here because the entire page is already dynamic + // or it's static and it should not throw or postpone here. + if (store.forceDynamic || store.forceStatic) return; + if (store.dynamicShouldError) { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](`Route ${store.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`), "__NEXT_ERROR_CODE", { + value: "E553", + enumerable: false, + configurable: true + }); + } + if (workUnitStore) { + switch(workUnitStore.type){ + case 'prerender-ppr': + return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); + case 'prerender-legacy': + workUnitStore.revalidate = 0; + // We aren't prerendering, but we are generating a static page. We need + // to bail out of static generation. + const err = Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$hooks$2d$server$2d$context$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["DynamicServerError"](`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { + value: "E550", + enumerable: false, + configurable: true + }); + store.dynamicUsageDescription = expression; + store.dynamicUsageStack = err.stack; + throw err; + case 'request': + if ("TURBOPACK compile-time truthy", 1) { + workUnitStore.usedDynamic = true; + } + break; + default: + workUnitStore; + } + } +} +function throwToInterruptStaticGeneration(expression, store, prerenderStore) { + // We aren't prerendering but we are generating a static page. We need to bail out of static generation + const err = Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$hooks$2d$server$2d$context$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["DynamicServerError"](`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { + value: "E558", + enumerable: false, + configurable: true + }); + prerenderStore.revalidate = 0; + store.dynamicUsageDescription = expression; + store.dynamicUsageStack = err.stack; + throw err; +} +function trackDynamicDataInDynamicRender(workUnitStore) { + switch(workUnitStore.type){ + case 'cache': + case 'unstable-cache': + // Inside cache scopes, marking a scope as dynamic has no effect, + // because the outer cache scope creates a cache boundary. This is + // subtly different from reading a dynamic data source, which is + // forbidden inside a cache scope. + return; + case 'private-cache': + // A private cache scope is already dynamic by definition. + return; + case 'prerender': + case 'prerender-runtime': + case 'prerender-legacy': + case 'prerender-ppr': + case 'prerender-client': + break; + case 'request': + if ("TURBOPACK compile-time truthy", 1) { + workUnitStore.usedDynamic = true; + } + break; + default: + workUnitStore; + } +} +function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { + const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; + const error = createPrerenderInterruptedError(reason); + prerenderStore.controller.abort(error); + const dynamicTracking = prerenderStore.dynamicTracking; + if (dynamicTracking) { + dynamicTracking.dynamicAccesses.push({ + // When we aren't debugging, we don't need to create another error for the + // stack trace. + stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, + expression + }); + } +} +function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { + const dynamicTracking = prerenderStore.dynamicTracking; + abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); + // It is important that we set this tracking value after aborting. Aborts are executed + // synchronously except for the case where you abort during render itself. By setting this + // value late we can use it to determine if any of the aborted tasks are the task that + // called the sync IO expression in the first place. + if (dynamicTracking) { + if (dynamicTracking.syncDynamicErrorWithStack === null) { + dynamicTracking.syncDynamicErrorWithStack = errorWithStack; + } + } +} +function trackSynchronousPlatformIOAccessInDev(requestStore) { + // We don't actually have a controller to abort but we do the semantic equivalent by + // advancing the request store out of prerender mode + requestStore.prerenderPhase = false; +} +function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { + const prerenderSignal = prerenderStore.controller.signal; + if (prerenderSignal.aborted === false) { + // TODO it would be better to move this aborted check into the callsite so we can avoid making + // the error object when it isn't relevant to the aborting of the prerender however + // since we need the throw semantics regardless of whether we abort it is easier to land + // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer + // to ideal implementation + abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); + // It is important that we set this tracking value after aborting. Aborts are executed + // synchronously except for the case where you abort during render itself. By setting this + // value late we can use it to determine if any of the aborted tasks are the task that + // called the sync IO expression in the first place. + const dynamicTracking = prerenderStore.dynamicTracking; + if (dynamicTracking) { + if (dynamicTracking.syncDynamicErrorWithStack === null) { + dynamicTracking.syncDynamicErrorWithStack = errorWithStack; + } + } + } + throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); +} +function warnOnSyncDynamicError(dynamicTracking) { + if (dynamicTracking.syncDynamicErrorWithStack) { + // the server did something sync dynamic, likely + // leading to an early termination of the prerender. + console.error(dynamicTracking.syncDynamicErrorWithStack); + } +} +const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev; +function Postpone({ reason, route }) { + const prerenderStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__["workUnitAsyncStorage"].getStore(); + const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; + postponeWithTracking(route, reason, dynamicTracking); +} +function postponeWithTracking(route, expression, dynamicTracking) { + assertPostpone(); + if (dynamicTracking) { + dynamicTracking.dynamicAccesses.push({ + // When we aren't debugging, we don't need to create another error for the + // stack trace. + stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, + expression + }); + } + __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$react$2e$react$2d$server$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"].unstable_postpone(createPostponeReason(route, expression)); +} +function createPostponeReason(route, expression) { + return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; +} +function isDynamicPostpone(err) { + if (typeof err === 'object' && err !== null && typeof err.message === 'string') { + return isDynamicPostponeReason(err.message); + } + return false; +} +function isDynamicPostponeReason(reason) { + return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); +} +if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { + throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { + value: "E296", + enumerable: false, + configurable: true + }); +} +const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; +function createPrerenderInterruptedError(message) { + const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + error.digest = NEXT_PRERENDER_INTERRUPTED; + return error; +} +function isPrerenderInterruptedError(error) { + return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; +} +function accessedDynamicData(dynamicAccesses) { + return dynamicAccesses.length > 0; +} +function consumeDynamicAccess(serverDynamic, clientDynamic) { + // We mutate because we only call this once we are no longer writing + // to the dynamicTrackingState and it's more efficient than creating a new + // array. + serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); + return serverDynamic.dynamicAccesses; +} +function formatDynamicAPIAccesses(dynamicAccesses) { + return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ + stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as + // well as the first 4 lines of the stack trace which is the distance + // from the user code and the `new Error().stack` call. + .slice(4).filter((line)=>{ + // Exclude Next.js internals from the stack trace. + if (line.includes('node_modules/next/')) { + return false; + } + // Exclude anonymous functions from the stack trace. + if (line.includes(' ()')) { + return false; + } + // Exclude Node.js internals from the stack trace. + if (line.includes(' (node:')) { + return false; + } + return true; + }).join('\n'); + return `Dynamic API Usage Debug - ${expression}:\n${stack}`; + }); +} +function assertPostpone() { + if (!hasPostpone) { + throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { + value: "E224", + enumerable: false, + configurable: true + }); + } +} +function createRenderInBrowserAbortSignal() { + const controller = new AbortController(); + controller.abort(Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$lazy$2d$dynamic$2f$bailout$2d$to$2d$csr$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["BailoutToCSRError"]('Render in Browser'), "__NEXT_ERROR_CODE", { + value: "E721", + enumerable: false, + configurable: true + })); + return controller.signal; +} +function createHangingInputAbortSignal(workUnitStore) { + switch(workUnitStore.type){ + case 'prerender': + case 'prerender-runtime': + const controller = new AbortController(); + if (workUnitStore.cacheSignal) { + // If we have a cacheSignal it means we're in a prospective render. If + // the input we're waiting on is coming from another cache, we do want + // to wait for it so that we can resolve this cache entry too. + workUnitStore.cacheSignal.inputReady().then(()=>{ + controller.abort(); + }); + } else { + // Otherwise we're in the final render and we should already have all + // our caches filled. + // If the prerender uses stages, we have wait until the runtime stage, + // at which point all runtime inputs will be resolved. + // (otherwise, a runtime prerender might consider `cookies()` hanging + // even though they'd resolve in the next task.) + // + // We might still be waiting on some microtasks so we + // wait one tick before giving up. When we give up, we still want to + // render the content of this cache as deeply as we can so that we can + // suspend as deeply as possible in the tree or not at all if we don't + // end up waiting for the input. + const runtimeStagePromise = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__["getRuntimeStagePromise"])(workUnitStore); + if (runtimeStagePromise) { + runtimeStagePromise.then(()=>(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$scheduler$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["scheduleOnNextTick"])(()=>controller.abort())); + } else { + (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$scheduler$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["scheduleOnNextTick"])(()=>controller.abort()); + } + } + return controller.signal; + case 'prerender-client': + case 'prerender-ppr': + case 'prerender-legacy': + case 'request': + case 'cache': + case 'private-cache': + case 'unstable-cache': + return undefined; + default: + workUnitStore; + } +} +function annotateDynamicAccess(expression, prerenderStore) { + const dynamicTracking = prerenderStore.dynamicTracking; + if (dynamicTracking) { + dynamicTracking.dynamicAccesses.push({ + stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, + expression + }); + } +} +function useDynamicRouteParams(expression) { + const workStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__["workAsyncStorage"].getStore(); + const workUnitStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__["workUnitAsyncStorage"].getStore(); + if (workStore && workUnitStore) { + switch(workUnitStore.type){ + case 'prerender-client': + case 'prerender': + { + const fallbackParams = workUnitStore.fallbackRouteParams; + if (fallbackParams && fallbackParams.size > 0) { + // We are in a prerender with cacheComponents semantics. We are going to + // hang here and never resolve. This will cause the currently + // rendering component to effectively be a dynamic hole. + __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$react$2e$react$2d$server$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"].use((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["makeHangingPromise"])(workUnitStore.renderSignal, workStore.route, expression)); + } + break; + } + case 'prerender-ppr': + { + const fallbackParams = workUnitStore.fallbackRouteParams; + if (fallbackParams && fallbackParams.size > 0) { + return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); + } + break; + } + case 'prerender-runtime': + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["InvariantError"](`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { + value: "E771", + enumerable: false, + configurable: true + }); + case 'cache': + case 'private-cache': + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["InvariantError"](`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { + value: "E745", + enumerable: false, + configurable: true + }); + case 'prerender-legacy': + case 'request': + case 'unstable-cache': + break; + default: + workUnitStore; + } + } +} +const hasSuspenseRegex = /\n\s+at Suspense \(\)/; +// Common implicit body tags that React will treat as body when placed directly in html +const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; +// Detects when RootLayoutBoundary (our framework marker component) appears +// after Suspense in the component stack, indicating the root layout is wrapped +// within a Suspense boundary. Ensures no body/html/implicit-body components are in between. +// +// Example matches: +// at Suspense () +// at __next_root_layout_boundary__ () +// +// Or with other components in between (but not body/html/implicit-body): +// at Suspense () +// at SomeComponent () +// at __next_root_layout_boundary__ () +const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ROOT_LAYOUT_BOUNDARY_NAME"]} \\([^\\n]*\\)`); +const hasMetadataRegex = new RegExp(`\\n\\s+at ${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["METADATA_BOUNDARY_NAME"]}[\\n\\s]`); +const hasViewportRegex = new RegExp(`\\n\\s+at ${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["VIEWPORT_BOUNDARY_NAME"]}[\\n\\s]`); +const hasOutletRegex = new RegExp(`\\n\\s+at ${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["OUTLET_BOUNDARY_NAME"]}[\\n\\s]`); +function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { + if (hasOutletRegex.test(componentStack)) { + // We don't need to track that this is dynamic. It is only so when something else is also dynamic. + return; + } else if (hasMetadataRegex.test(componentStack)) { + dynamicValidation.hasDynamicMetadata = true; + return; + } else if (hasViewportRegex.test(componentStack)) { + dynamicValidation.hasDynamicViewport = true; + return; + } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { + // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. + // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense + // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. + dynamicValidation.hasAllowedDynamic = true; + dynamicValidation.hasSuspenseAboveBody = true; + return; + } else if (hasSuspenseRegex.test(componentStack)) { + // this error had a Suspense boundary above it so we don't need to report it as a source + // of disallowed + dynamicValidation.hasAllowedDynamic = true; + return; + } else if (clientDynamic.syncDynamicErrorWithStack) { + // This task was the task that called the sync error. + dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); + return; + } else { + const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`; + const error = createErrorWithComponentOrOwnerStack(message, componentStack); + dynamicValidation.dynamicErrors.push(error); + return; + } +} +/** + * In dev mode, we prefer using the owner stack, otherwise the provided + * component stack is used. + */ function createErrorWithComponentOrOwnerStack(message, componentStack) { + const ownerStack = ("TURBOPACK compile-time value", "development") !== 'production' && __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$react$2e$react$2d$server$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"].captureOwnerStack ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$react$2e$react$2d$server$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["default"].captureOwnerStack() : null; + const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { + value: "E394", + enumerable: false, + configurable: true + }); + error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); + return error; +} +var PreludeState = /*#__PURE__*/ function(PreludeState) { + PreludeState[PreludeState["Full"] = 0] = "Full"; + PreludeState[PreludeState["Empty"] = 1] = "Empty"; + PreludeState[PreludeState["Errored"] = 2] = "Errored"; + return PreludeState; +}({}); +function logDisallowedDynamicError(workStore, error) { + console.error(error); + if (!workStore.dev) { + if (workStore.hasReadableErrorStacks) { + console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); + } else { + console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: + - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. + - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); + } + } +} +function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { + if (prelude !== 0) { + if (dynamicValidation.hasSuspenseAboveBody) { + // This route has opted into allowing fully dynamic rendering + // by including a Suspense boundary above the body. In this case + // a lack of a shell is not considered disallowed so we simply return + return; + } + if (serverDynamic.syncDynamicErrorWithStack) { + // There is no shell and the server did something sync dynamic likely + // leading to an early termination of the prerender before the shell + // could be completed. We terminate the build/validating render. + logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); + throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); + } + // We didn't have any sync bailouts but there may be user code which + // blocked the root. We would have captured these during the prerender + // and can log them here and then terminate the build/validating render + const dynamicErrors = dynamicValidation.dynamicErrors; + if (dynamicErrors.length > 0) { + for(let i = 0; i < dynamicErrors.length; i++){ + logDisallowedDynamicError(workStore, dynamicErrors[i]); + } + throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); + } + // If we got this far then the only other thing that could be blocking + // the root is dynamic Viewport. If this is dynamic then + // you need to opt into that by adding a Suspense boundary above the body + // to indicate your are ok with fully dynamic rendering. + if (dynamicValidation.hasDynamicViewport) { + console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); + throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); + } + if (prelude === 1) { + // If we ever get this far then we messed up the tracking of invalid dynamic. + // We still adhere to the constraint that you must produce a shell but invite the + // user to report this as a bug in Next.js. + console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); + throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); + } + } else { + if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { + console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); + throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); + } + } +} +function delayUntilRuntimeStage(prerenderStore, result) { + if (prerenderStore.runtimeStagePromise) { + return prerenderStore.runtimeStagePromise.then(()=>result); + } + return result; +} //# sourceMappingURL=dynamic-rendering.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/request/utils.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "isRequestAPICallableInsideAfter", + ()=>isRequestAPICallableInsideAfter, + "throwForSearchParamsAccessInUseCache", + ()=>throwForSearchParamsAccessInUseCache, + "throwWithStaticGenerationBailoutError", + ()=>throwWithStaticGenerationBailoutError, + "throwWithStaticGenerationBailoutErrorWithDynamicError", + ()=>throwWithStaticGenerationBailoutErrorWithDynamicError +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/static-generation-bailout.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/after-task-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__afterTaskAsyncStorageInstance__as__afterTaskAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/after-task-async-storage-instance.js [middleware-edge] (ecmascript) "); +; +; +function throwWithStaticGenerationBailoutError(route, expression) { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](`Route ${route} 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`), "__NEXT_ERROR_CODE", { + value: "E576", + enumerable: false, + configurable: true + }); +} +function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](`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`), "__NEXT_ERROR_CODE", { + value: "E543", + enumerable: false, + configurable: true + }); +} +function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { + const error = Object.defineProperty(new Error(`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`), "__NEXT_ERROR_CODE", { + value: "E779", + enumerable: false, + configurable: true + }); + Error.captureStackTrace(error, constructorOpt); + workStore.invalidDynamicUsageError ??= error; + throw error; +} +function isRequestAPICallableInsideAfter() { + const afterTaskStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__afterTaskAsyncStorageInstance__as__afterTaskAsyncStorage$3e$__["afterTaskAsyncStorage"].getStore(); + return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; +} //# sourceMappingURL=utils.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/request/connection.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "connection", + ()=>connection +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/dynamic-rendering.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/static-generation-bailout.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/dynamic-rendering-utils.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/request/utils.js [middleware-edge] (ecmascript)"); +; +; +; +; +; +; +function connection() { + const callingExpression = 'connection'; + const workStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__["workAsyncStorage"].getStore(); + const workUnitStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__["workUnitAsyncStorage"].getStore(); + if (workStore) { + if (workUnitStore && workUnitStore.phase === 'after' && !(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["isRequestAPICallableInsideAfter"])()) { + throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", { + value: "E186", + enumerable: false, + configurable: true + }); + } + if (workStore.forceStatic) { + // When using forceStatic, we override all other logic and always just + // return a resolving promise without tracking. + return Promise.resolve(undefined); + } + if (workStore.dynamicShouldError) { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { + value: "E562", + enumerable: false, + configurable: true + }); + } + if (workUnitStore) { + switch(workUnitStore.type){ + case 'cache': + { + const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { + value: "E752", + enumerable: false, + configurable: true + }); + Error.captureStackTrace(error, connection); + workStore.invalidDynamicUsageError ??= error; + throw error; + } + case 'private-cache': + { + // It might not be intuitive to throw for private caches as well, but + // we don't consider runtime prefetches as "actual requests" (in the + // navigation sense), despite allowing them to read cookies. + const error = Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside "use cache: private". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { + value: "E753", + enumerable: false, + configurable: true + }); + Error.captureStackTrace(error, connection); + workStore.invalidDynamicUsageError ??= error; + throw error; + } + case 'unstable-cache': + throw Object.defineProperty(new Error(`Route ${workStore.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", { + value: "E1", + enumerable: false, + configurable: true + }); + case 'prerender': + case 'prerender-client': + case 'prerender-runtime': + // We return a promise that never resolves to allow the prerender to + // stall at this point. + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["makeHangingPromise"])(workUnitStore.renderSignal, workStore.route, '`connection()`'); + case 'prerender-ppr': + // We use React's postpone API to interrupt rendering here to create a + // dynamic hole + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["postponeWithTracking"])(workStore.route, 'connection', workUnitStore.dynamicTracking); + case 'prerender-legacy': + // We throw an error here to interrupt prerendering to mark the route + // as dynamic + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["throwToInterruptStaticGeneration"])('connection', workStore, workUnitStore); + case 'request': + (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["trackDynamicDataInDynamicRender"])(workUnitStore); + if ("TURBOPACK compile-time truthy", 1) { + // Semantically we only need the dev tracking when running in `next dev` + // but since you would never use next dev with production NODE_ENV we use this + // as a proxy so we can statically exclude this code from production builds. + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["makeDevtoolsIOAwarePromise"])(undefined); + } else //TURBOPACK unreachable + ; + default: + workUnitStore; + } + } + } + // If we end up here, there was no work store or work unit store present. + (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__["throwForMissingRequestStore"])(callingExpression); +} //# sourceMappingURL=connection.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +// This regex will have fast negatives meaning valid identifiers may not pass +// this test. However this is only used during static generation to provide hints +// about why a page bailed out of some or all prerendering and we can use bracket notation +// for example while `ą² _ą² ` is a valid identifier it's ok to print `searchParams['ą² _ą² ']` +// even if this would have been fine too `searchParams.ą² _ą² ` +__turbopack_context__.s([ + "describeHasCheckingStringProperty", + ()=>describeHasCheckingStringProperty, + "describeStringPropertyAccess", + ()=>describeStringPropertyAccess, + "wellKnownProperties", + ()=>wellKnownProperties +]); +const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/; +function describeStringPropertyAccess(target, prop) { + if (isDefinitelyAValidIdentifier.test(prop)) { + return "`" + target + "." + prop + "`"; + } + return "`" + target + "[" + JSON.stringify(prop) + "]`"; +} +function describeHasCheckingStringProperty(target, prop) { + const stringifiedProp = JSON.stringify(prop); + return "`Reflect.has(" + target + ", " + stringifiedProp + ")`, `" + stringifiedProp + " in " + target + "`, or similar"; +} +const wellKnownProperties = new Set([ + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toString', + 'valueOf', + 'toLocaleString', + // Promise prototype + // fallthrough + 'then', + 'catch', + 'finally', + // React Promise extension + // fallthrough + 'status', + // React introspection + 'displayName', + '_debugInfo', + // Common tested properties + // fallthrough + 'toJSON', + '$$typeof', + '__esModule' +]); //# sourceMappingURL=reflect-utils.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "actionAsyncStorageInstance", + ()=>actionAsyncStorageInstance +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/async-local-storage.js [middleware-edge] (ecmascript)"); +; +const actionAsyncStorageInstance = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$async$2d$local$2d$storage$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["createAsyncLocalStorage"])(); //# sourceMappingURL=action-async-storage-instance.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/action-async-storage.external.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +// Share the instance module in the next-shared layer +__turbopack_context__.s([]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$action$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js [middleware-edge] (ecmascript)"); +; +; + //# sourceMappingURL=action-async-storage.external.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "actionAsyncStorage", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$action$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["actionAsyncStorageInstance"] +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$action$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js [middleware-edge] (ecmascript)"); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/picocolors.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +// ISC License +// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// +// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1 +__turbopack_context__.s([ + "bgBlack", + ()=>bgBlack, + "bgBlue", + ()=>bgBlue, + "bgCyan", + ()=>bgCyan, + "bgGreen", + ()=>bgGreen, + "bgMagenta", + ()=>bgMagenta, + "bgRed", + ()=>bgRed, + "bgWhite", + ()=>bgWhite, + "bgYellow", + ()=>bgYellow, + "black", + ()=>black, + "blue", + ()=>blue, + "bold", + ()=>bold, + "cyan", + ()=>cyan, + "dim", + ()=>dim, + "gray", + ()=>gray, + "green", + ()=>green, + "hidden", + ()=>hidden, + "inverse", + ()=>inverse, + "italic", + ()=>italic, + "magenta", + ()=>magenta, + "purple", + ()=>purple, + "red", + ()=>red, + "reset", + ()=>reset, + "strikethrough", + ()=>strikethrough, + "underline", + ()=>underline, + "white", + ()=>white, + "yellow", + ()=>yellow +]); +var _globalThis; +const { env, stdout } = ((_globalThis = globalThis) == null ? void 0 : _globalThis.process) ?? {}; +const enabled = env && !env.NO_COLOR && (env.FORCE_COLOR || (stdout == null ? void 0 : stdout.isTTY) && !env.CI && env.TERM !== 'dumb'); +const replaceClose = (str, close, replace, index)=>{ + const start = str.substring(0, index) + replace; + const end = str.substring(index + close.length); + const nextIndex = end.indexOf(close); + return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end; +}; +const formatter = (open, close, replace = open)=>{ + if (!enabled) return String; + return (input)=>{ + const string = '' + input; + const index = string.indexOf(close, open.length); + return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close; + }; +}; +const reset = enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String; +const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m'); +const dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m'); +const italic = formatter('\x1b[3m', '\x1b[23m'); +const underline = formatter('\x1b[4m', '\x1b[24m'); +const inverse = formatter('\x1b[7m', '\x1b[27m'); +const hidden = formatter('\x1b[8m', '\x1b[28m'); +const strikethrough = formatter('\x1b[9m', '\x1b[29m'); +const black = formatter('\x1b[30m', '\x1b[39m'); +const red = formatter('\x1b[31m', '\x1b[39m'); +const green = formatter('\x1b[32m', '\x1b[39m'); +const yellow = formatter('\x1b[33m', '\x1b[39m'); +const blue = formatter('\x1b[34m', '\x1b[39m'); +const magenta = formatter('\x1b[35m', '\x1b[39m'); +const purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m'); +const cyan = formatter('\x1b[36m', '\x1b[39m'); +const white = formatter('\x1b[37m', '\x1b[39m'); +const gray = formatter('\x1b[90m', '\x1b[39m'); +const bgBlack = formatter('\x1b[40m', '\x1b[49m'); +const bgRed = formatter('\x1b[41m', '\x1b[49m'); +const bgGreen = formatter('\x1b[42m', '\x1b[49m'); +const bgYellow = formatter('\x1b[43m', '\x1b[49m'); +const bgBlue = formatter('\x1b[44m', '\x1b[49m'); +const bgMagenta = formatter('\x1b[45m', '\x1b[49m'); +const bgCyan = formatter('\x1b[46m', '\x1b[49m'); +const bgWhite = formatter('\x1b[47m', '\x1b[49m'); //# sourceMappingURL=picocolors.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/build/output/log.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "bootstrap", + ()=>bootstrap, + "error", + ()=>error, + "event", + ()=>event, + "info", + ()=>info, + "prefixes", + ()=>prefixes, + "ready", + ()=>ready, + "trace", + ()=>trace, + "wait", + ()=>wait, + "warn", + ()=>warn, + "warnOnce", + ()=>warnOnce +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/lib/picocolors.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$lru$2d$cache$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/lib/lru-cache.js [middleware-edge] (ecmascript)"); +; +; +const prefixes = { + wait: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["white"])((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["bold"])('ā—‹')), + error: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["red"])((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["bold"])('⨯')), + warn: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["yellow"])((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["bold"])('⚠')), + ready: 'ā–²', + info: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["white"])((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["bold"])(' ')), + event: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["green"])((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["bold"])('āœ“')), + trace: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["magenta"])((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$picocolors$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["bold"])('Ā»')) +}; +const LOGGING_METHOD = { + log: 'log', + warn: 'warn', + error: 'error' +}; +function prefixedLog(prefixType, ...message) { + if ((message[0] === '' || message[0] === undefined) && message.length === 1) { + message.shift(); + } + const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log'; + const prefix = prefixes[prefixType]; + // If there's no message, don't print the prefix but a new line + if (message.length === 0) { + console[consoleMethod](''); + } else { + // Ensure if there's ANSI escape codes it's concatenated into one string. + // Chrome DevTool can only handle color if it's in one string. + if (message.length === 1 && typeof message[0] === 'string') { + console[consoleMethod](' ' + prefix + ' ' + message[0]); + } else { + console[consoleMethod](' ' + prefix, ...message); + } + } +} +function bootstrap(...message) { + // logging format: ' ' + // e.g. ' āœ“ Compiled successfully' + // Add spaces to align with the indent of other logs + console.log(' ' + message.join(' ')); +} +function wait(...message) { + prefixedLog('wait', ...message); +} +function error(...message) { + prefixedLog('error', ...message); +} +function warn(...message) { + prefixedLog('warn', ...message); +} +function ready(...message) { + prefixedLog('ready', ...message); +} +function info(...message) { + prefixedLog('info', ...message); +} +function event(...message) { + prefixedLog('event', ...message); +} +function trace(...message) { + prefixedLog('trace', ...message); +} +const warnOnceCache = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$lru$2d$cache$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["LRUCache"](10000, (value)=>value.length); +function warnOnce(...message) { + const key = message.join(' '); + if (!warnOnceCache.has(key)) { + warnOnceCache.set(key, key); + warn(...message); + } +} //# sourceMappingURL=log.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/request/root-params.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "getRootParam", + ()=>getRootParam, + "unstable_rootParams", + ()=>unstable_rootParams +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/invariant-error.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/dynamic-rendering.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/work-unit-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/dynamic-rendering-utils.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$action$2d$async$2d$storage$2e$external$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/action-async-storage.external.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$action$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__actionAsyncStorageInstance__as__actionAsyncStorage$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/app-render/action-async-storage-instance.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$build$2f$output$2f$log$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/build/output/log.js [middleware-edge] (ecmascript)"); +; +; +; +; +; +; +; +; +const CachedParams = new WeakMap(); +async function unstable_rootParams() { + (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$build$2f$output$2f$log$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["warnOnce"])('`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'); + const workStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__["workAsyncStorage"].getStore(); + if (!workStore) { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["InvariantError"]('Missing workStore in unstable_rootParams'), "__NEXT_ERROR_CODE", { + value: "E615", + enumerable: false, + configurable: true + }); + } + const workUnitStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__["workUnitAsyncStorage"].getStore(); + if (!workUnitStore) { + throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`), "__NEXT_ERROR_CODE", { + value: "E641", + enumerable: false, + configurable: true + }); + } + switch(workUnitStore.type){ + case 'cache': + case 'unstable-cache': + { + throw Object.defineProperty(new Error(`Route ${workStore.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { + value: "E642", + enumerable: false, + configurable: true + }); + } + case 'prerender': + case 'prerender-client': + case 'prerender-ppr': + case 'prerender-legacy': + return createPrerenderRootParams(workUnitStore.rootParams, workStore, workUnitStore); + case 'private-cache': + case 'prerender-runtime': + case 'request': + return Promise.resolve(workUnitStore.rootParams); + default: + return workUnitStore; + } +} +function createPrerenderRootParams(underlyingParams, workStore, prerenderStore) { + switch(prerenderStore.type){ + case 'prerender-client': + { + const exportName = '`unstable_rootParams`'; + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["InvariantError"](`${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.`), "__NEXT_ERROR_CODE", { + value: "E693", + enumerable: false, + configurable: true + }); + } + case 'prerender': + { + const fallbackParams = prerenderStore.fallbackRouteParams; + if (fallbackParams) { + for(const key in underlyingParams){ + if (fallbackParams.has(key)) { + const cachedParams = CachedParams.get(underlyingParams); + if (cachedParams) { + return cachedParams; + } + const promise = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["makeHangingPromise"])(prerenderStore.renderSignal, workStore.route, '`unstable_rootParams`'); + CachedParams.set(underlyingParams, promise); + return promise; + } + } + } + break; + } + case 'prerender-ppr': + { + const fallbackParams = prerenderStore.fallbackRouteParams; + if (fallbackParams) { + for(const key in underlyingParams){ + if (fallbackParams.has(key)) { + // We have fallback params at this level so we need to make an erroring + // params object which will postpone if you access the fallback params + return makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore); + } + } + } + break; + } + case 'prerender-legacy': + break; + default: + prerenderStore; + } + // We don't have any fallback params so we have an entirely static safe params object + return Promise.resolve(underlyingParams); +} +function makeErroringRootParams(underlyingParams, fallbackParams, workStore, prerenderStore) { + const cachedParams = CachedParams.get(underlyingParams); + if (cachedParams) { + return cachedParams; + } + const augmentedUnderlying = { + ...underlyingParams + }; + // We don't use makeResolvedReactPromise here because params + // supports copying with spread and we don't want to unnecessarily + // instrument the promise with spreadable properties of ReactPromise. + const promise = Promise.resolve(augmentedUnderlying); + CachedParams.set(underlyingParams, promise); + Object.keys(underlyingParams).forEach((prop)=>{ + if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["wellKnownProperties"].has(prop)) { + // These properties cannot be shadowed because they need to be the + // true underlying value for Promises to work correctly at runtime + } else { + if (fallbackParams.has(prop)) { + Object.defineProperty(augmentedUnderlying, prop, { + get () { + const expression = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["describeStringPropertyAccess"])('unstable_rootParams', prop); + // In most dynamic APIs we also throw if `dynamic = "error"` however + // for params is only dynamic when we're generating a fallback shell + // and even when `dynamic = "error"` we still support generating dynamic + // fallback shells + // TODO remove this comment when cacheComponents is the default since there + // will be no `dynamic = "error"` + if (prerenderStore.type === 'prerender-ppr') { + // PPR Prerender (no cacheComponents) + (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["postponeWithTracking"])(workStore.route, expression, prerenderStore.dynamicTracking); + } else { + // Legacy Prerender + (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["throwToInterruptStaticGeneration"])(expression, workStore, prerenderStore); + } + }, + enumerable: true + }); + } else { + ; + promise[prop] = underlyingParams[prop]; + } + } + }); + return promise; +} +function getRootParam(paramName) { + const apiName = `\`import('next/root-params').${paramName}()\``; + const workStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workAsyncStorageInstance__as__workAsyncStorage$3e$__["workAsyncStorage"].getStore(); + if (!workStore) { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["InvariantError"](`Missing workStore in ${apiName}`), "__NEXT_ERROR_CODE", { + value: "E764", + enumerable: false, + configurable: true + }); + } + const workUnitStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__workUnitAsyncStorageInstance__as__workUnitAsyncStorage$3e$__["workUnitAsyncStorage"].getStore(); + if (!workUnitStore) { + throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`), "__NEXT_ERROR_CODE", { + value: "E774", + enumerable: false, + configurable: true + }); + } + const actionStore = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$action$2d$async$2d$storage$2d$instance$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$export__actionAsyncStorageInstance__as__actionAsyncStorage$3e$__["actionAsyncStorage"].getStore(); + if (actionStore) { + if (actionStore.isAppRoute) { + // TODO(root-params): add support for route handlers + throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { + value: "E765", + enumerable: false, + configurable: true + }); + } + if (actionStore.isAction && workUnitStore.phase === 'action') { + // Actions are not fundamentally tied to a route (even if they're always submitted from some page), + // so root params would be inconsistent if an action is called from multiple roots. + // Make sure we check if the phase is "action" - we should not error in the rerender + // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`) + throw Object.defineProperty(new Error(`${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`), "__NEXT_ERROR_CODE", { + value: "E766", + enumerable: false, + configurable: true + }); + } + } + switch(workUnitStore.type){ + case 'unstable-cache': + case 'cache': + { + throw Object.defineProperty(new Error(`Route ${workStore.route} used ${apiName} inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`), "__NEXT_ERROR_CODE", { + value: "E760", + enumerable: false, + configurable: true + }); + } + case 'prerender': + case 'prerender-client': + case 'prerender-ppr': + case 'prerender-legacy': + { + return createPrerenderRootParamPromise(paramName, workStore, workUnitStore, apiName); + } + case 'private-cache': + case 'prerender-runtime': + case 'request': + { + break; + } + default: + { + workUnitStore; + } + } + return Promise.resolve(workUnitStore.rootParams[paramName]); +} +function createPrerenderRootParamPromise(paramName, workStore, prerenderStore, apiName) { + switch(prerenderStore.type){ + case 'prerender-client': + { + throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["InvariantError"](`${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { + value: "E693", + enumerable: false, + configurable: true + }); + } + case 'prerender': + case 'prerender-legacy': + case 'prerender-ppr': + default: + } + const underlyingParams = prerenderStore.rootParams; + switch(prerenderStore.type){ + case 'prerender': + { + // We are in a dynamicIO prerender. + // The param is a fallback, so it should be treated as dynamic. + if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["makeHangingPromise"])(prerenderStore.renderSignal, workStore.route, apiName); + } + break; + } + case 'prerender-ppr': + { + // We aren't in a dynamicIO prerender, but the param is a fallback, + // so we need to make an erroring params object which will postpone/error if you access it + if (prerenderStore.fallbackRouteParams && prerenderStore.fallbackRouteParams.has(paramName)) { + return makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName); + } + break; + } + case 'prerender-legacy': + { + break; + } + default: + { + prerenderStore; + } + } + // If the param is not a fallback param, we just return the statically available value. + return Promise.resolve(underlyingParams[paramName]); +} +/** Deliberately async -- we want to create a rejected promise, not error synchronously. */ async function makeErroringRootParamPromise(paramName, workStore, prerenderStore, apiName) { + const expression = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["describeStringPropertyAccess"])(apiName, paramName); + // In most dynamic APIs, we also throw if `dynamic = "error"`. + // However, root params are only dynamic when we're generating a fallback shell, + // and even with `dynamic = "error"` we still support generating dynamic fallback shells. + // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = "error"` + switch(prerenderStore.type){ + case 'prerender-ppr': + { + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["postponeWithTracking"])(workStore.route, expression, prerenderStore.dynamicTracking); + } + case 'prerender-legacy': + { + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["throwToInterruptStaticGeneration"])(expression, workStore, prerenderStore); + } + default: + { + prerenderStore; + } + } +} //# sourceMappingURL=root-params.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/exports/index.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +// Alias index file of next/server for edge runtime for tree-shaking purpose +__turbopack_context__.s([]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$image$2d$response$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/image-response.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$request$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/request.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$response$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/response.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$user$2d$agent$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/user-agent.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$url$2d$pattern$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$after$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/after/index.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$connection$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/request/connection.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$root$2d$params$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/request/root-params.js [middleware-edge] (ecmascript)"); //# sourceMappingURL=index.js.map +; +; +; +; +; +; +; +; +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/api/server.js [middleware-edge] (ecmascript) ", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$exports$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/exports/index.js [middleware-edge] (ecmascript) "); //# sourceMappingURL=server.js.map +; +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/exports/index.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "ImageResponse", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$image$2d$response$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["ImageResponse"], + "NextRequest", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$request$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextRequest"], + "NextResponse", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$response$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["NextResponse"], + "URLPattern", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$url$2d$pattern$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["URLPattern"], + "after", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$after$2f$after$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["after"], + "connection", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$connection$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["connection"], + "unstable_rootParams", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$root$2d$params$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["unstable_rootParams"], + "userAgent", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$user$2d$agent$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["userAgent"], + "userAgentFromString", + ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$user$2d$agent$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["userAgentFromString"] +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$exports$2f$index$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/exports/index.js [middleware-edge] (ecmascript) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$image$2d$response$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/image-response.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$request$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/request.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$response$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/response.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$user$2d$agent$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/user-agent.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$url$2d$pattern$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/spec-extension/url-pattern.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$after$2f$after$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/after/after.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$connection$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/request/connection.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$root$2d$params$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/request/root-params.js [middleware-edge] (ecmascript)"); +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "HTTPAccessErrorStatus", + ()=>HTTPAccessErrorStatus, + "HTTP_ERROR_FALLBACK_ERROR_CODE", + ()=>HTTP_ERROR_FALLBACK_ERROR_CODE, + "getAccessFallbackErrorTypeByStatus", + ()=>getAccessFallbackErrorTypeByStatus, + "getAccessFallbackHTTPStatus", + ()=>getAccessFallbackHTTPStatus, + "isHTTPAccessFallbackError", + ()=>isHTTPAccessFallbackError +]); +const HTTPAccessErrorStatus = { + NOT_FOUND: 404, + FORBIDDEN: 403, + UNAUTHORIZED: 401 +}; +const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); +const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; +function isHTTPAccessFallbackError(error) { + if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { + return false; + } + const [prefix, httpStatus] = error.digest.split(';'); + return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); +} +function getAccessFallbackHTTPStatus(error) { + const httpStatus = error.digest.split(';')[1]; + return Number(httpStatus); +} +function getAccessFallbackErrorTypeByStatus(status) { + switch(status){ + case 401: + return 'unauthorized'; + case 403: + return 'forbidden'; + case 404: + return 'not-found'; + default: + return; + } +} //# sourceMappingURL=http-access-fallback.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/redirect-status-code.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "RedirectStatusCode", + ()=>RedirectStatusCode +]); +var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { + RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; + RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; + return RedirectStatusCode; +}({}); //# sourceMappingURL=redirect-status-code.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/redirect-error.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "REDIRECT_ERROR_CODE", + ()=>REDIRECT_ERROR_CODE, + "RedirectType", + ()=>RedirectType, + "isRedirectError", + ()=>isRedirectError +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$status$2d$code$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/redirect-status-code.js [middleware-edge] (ecmascript)"); +; +const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; +var RedirectType = /*#__PURE__*/ function(RedirectType) { + RedirectType["push"] = "push"; + RedirectType["replace"] = "replace"; + return RedirectType; +}({}); +function isRedirectError(error) { + if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { + return false; + } + const digest = error.digest.split(';'); + const [errorCode, type] = digest; + const destination = digest.slice(2, -2).join(';'); + const status = digest.at(-2); + const statusCode = Number(status); + return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$status$2d$code$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["RedirectStatusCode"]; +} //# sourceMappingURL=redirect-error.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/is-next-router-error.js [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "isNextRouterError", + ()=>isNextRouterError +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/redirect-error.js [middleware-edge] (ecmascript)"); +; +; +function isNextRouterError(error) { + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["isRedirectError"])(error) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["isHTTPAccessFallbackError"])(error); +} //# sourceMappingURL=is-next-router-error.js.map +}), +"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/build/templates/middleware.js { INNER_MIDDLEWARE_MODULE => \"[project]/apps/web/src/middleware.ts [middleware-edge] (ecmascript)\" } [middleware-edge] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>nHandler +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$globals$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/globals.js [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$adapter$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/server/web/adapter.js [middleware-edge] (ecmascript)"); +// Import the userland code. +var __TURBOPACK__imported__module__$5b$project$5d2f$apps$2f$web$2f$src$2f$middleware$2e$ts__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/apps/web/src/middleware.ts [middleware-edge] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$is$2d$next$2d$router$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/client/components/is-next-router-error.js [middleware-edge] (ecmascript)"); +; +; +; +; +; +const mod = { + ...__TURBOPACK__imported__module__$5b$project$5d2f$apps$2f$web$2f$src$2f$middleware$2e$ts__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__ +}; +const handler = mod.middleware || mod.default; +const page = "/middleware"; +if (typeof handler !== 'function') { + throw Object.defineProperty(new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`), "__NEXT_ERROR_CODE", { + value: "E120", + enumerable: false, + configurable: true + }); +} +// Middleware will only sent out the FetchEvent to next server, +// so load instrumentation module here and track the error inside middleware module. +function errorHandledHandler(fn) { + return async (...args)=>{ + try { + return await fn(...args); + } catch (err) { + // In development, error the navigation API usage in runtime, + // since it's not allowed to be used in middleware as it's outside of react component tree. + if ("TURBOPACK compile-time truthy", 1) { + if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$is$2d$next$2d$router$2d$error$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["isNextRouterError"])(err)) { + err.message = `Next.js navigation API is not allowed to be used in Middleware.`; + throw err; + } + } + const req = args[0]; + const url = new URL(req.url); + const resource = url.pathname + url.search; + await (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$globals$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["edgeInstrumentationOnRequestError"])(err, { + path: resource, + method: req.method, + headers: Object.fromEntries(req.headers.entries()) + }, { + routerKind: 'Pages Router', + routePath: '/middleware', + routeType: 'middleware', + revalidateReason: undefined + }); + throw err; + } + }; +} +function nHandler(opts) { + return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$bun$2f$next$40$15$2e$5$2e$3$2b$6dbf9a050bc9aadb$2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$adapter$2e$js__$5b$middleware$2d$edge$5d$__$28$ecmascript$29$__["adapter"])({ + ...opts, + page, + handler: errorHandledHandler(handler) + }); +} //# sourceMappingURL=middleware.js.map +}), +"[project]/apps/web/edge-wrapper.js { MODULE => \"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/build/templates/middleware.js { INNER_MIDDLEWARE_MODULE => \\\"[project]/apps/web/src/middleware.ts [middleware-edge] (ecmascript)\\\" } [middleware-edge] (ecmascript)\" } [middleware-edge] (ecmascript)", ((__turbopack_context__, module, exports) => { + +self._ENTRIES ||= {}; +const modProm = Promise.resolve().then(()=>__turbopack_context__.i('[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/build/templates/middleware.js { INNER_MIDDLEWARE_MODULE => "[project]/apps/web/src/middleware.ts [middleware-edge] (ecmascript)" } [middleware-edge] (ecmascript)')); +modProm.catch(()=>{}); +self._ENTRIES["middleware_middleware"] = new Proxy(modProm, { + get (modProm, name) { + if (name === "then") { + return (res, rej)=>modProm.then(res, rej); + } + let result = (...args)=>modProm.then((mod)=>(0, mod[name])(...args)); + result.then = (res, rej)=>modProm.then((mod)=>mod[name]).then(res, rej); + return result; + } +}); +}), +]); + +//# sourceMappingURL=_886b33c3._.js.map \ No newline at end of file diff --git a/apps/web/.next/server/edge/chunks/_886b33c3._.js.map b/apps/web/.next/server/edge/chunks/_886b33c3._.js.map new file mode 100644 index 00000000..bfc39920 --- /dev/null +++ b/apps/web/.next/server/edge/chunks/_886b33c3._.js.map @@ -0,0 +1,100 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/globals.ts"],"sourcesContent":["import type {\n InstrumentationModule,\n InstrumentationOnRequestError,\n} from '../instrumentation/types'\n\ndeclare const _ENTRIES: any\n\nexport async function getEdgeInstrumentationModule(): Promise<\n InstrumentationModule | undefined\n> {\n const instrumentation =\n '_ENTRIES' in globalThis &&\n _ENTRIES.middleware_instrumentation &&\n (await _ENTRIES.middleware_instrumentation)\n\n return instrumentation\n}\n\nlet instrumentationModulePromise: Promise | null = null\nasync function registerInstrumentation() {\n // Ensure registerInstrumentation is not called in production build\n if (process.env.NEXT_PHASE === 'phase-production-build') return\n if (!instrumentationModulePromise) {\n instrumentationModulePromise = getEdgeInstrumentationModule()\n }\n const instrumentation = await instrumentationModulePromise\n if (instrumentation?.register) {\n try {\n await instrumentation.register()\n } catch (err: any) {\n err.message = `An error occurred while loading instrumentation hook: ${err.message}`\n throw err\n }\n }\n}\n\nexport async function edgeInstrumentationOnRequestError(\n ...args: Parameters\n) {\n const instrumentation = await getEdgeInstrumentationModule()\n try {\n await instrumentation?.onRequestError?.(...args)\n } catch (err) {\n // Log the soft error and continue, since the original error has already been thrown\n console.error('Error in instrumentation.onRequestError:', err)\n }\n}\n\nlet registerInstrumentationPromise: Promise | null = null\nexport function ensureInstrumentationRegistered() {\n if (!registerInstrumentationPromise) {\n registerInstrumentationPromise = registerInstrumentation()\n }\n return registerInstrumentationPromise\n}\n\nfunction getUnsupportedModuleErrorMessage(module: string) {\n // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found\n return `The edge runtime does not support Node.js '${module}' module.\nLearn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`\n}\n\nfunction __import_unsupported(moduleName: string) {\n const proxy: any = new Proxy(function () {}, {\n get(_obj, prop) {\n if (prop === 'then') {\n return {}\n }\n throw new Error(getUnsupportedModuleErrorMessage(moduleName))\n },\n construct() {\n throw new Error(getUnsupportedModuleErrorMessage(moduleName))\n },\n apply(_target, _this, args) {\n if (typeof args[0] === 'function') {\n return args[0](proxy)\n }\n throw new Error(getUnsupportedModuleErrorMessage(moduleName))\n },\n })\n return new Proxy({}, { get: () => proxy })\n}\n\nfunction enhanceGlobals() {\n if (process.env.NEXT_RUNTIME !== 'edge') {\n return\n }\n\n // The condition is true when the \"process\" module is provided\n if (process !== global.process) {\n // prefer local process but global.process has correct \"env\"\n process.env = global.process.env\n global.process = process\n }\n\n // to allow building code that import but does not use node.js modules,\n // webpack will expect this function to exist in global scope\n try {\n Object.defineProperty(globalThis, '__import_unsupported', {\n value: __import_unsupported,\n enumerable: false,\n configurable: false,\n })\n } catch {}\n\n // Eagerly fire instrumentation hook to make the startup faster.\n void ensureInstrumentationRegistered()\n}\n\nenhanceGlobals()\n"],"names":["getEdgeInstrumentationModule","instrumentation","globalThis","_ENTRIES","middleware_instrumentation","instrumentationModulePromise","registerInstrumentation","process","env","NEXT_PHASE","register","err","message","edgeInstrumentationOnRequestError","args","onRequestError","console","error","registerInstrumentationPromise","ensureInstrumentationRegistered","getUnsupportedModuleErrorMessage","module","__import_unsupported","moduleName","proxy","Proxy","get","_obj","prop","Error","construct","apply","_target","_this","enhanceGlobals","NEXT_RUNTIME","global","Object","defineProperty","value","enumerable","configurable"],"mappings":";;;;;;;;AAOO,eAAeA;IAGpB,MAAMC,kBACJ,cAAcC,cACdC,SAASC,0BAA0B,IAClC,MAAMD,SAASC,0BAA0B;IAE5C,OAAOH;AACT;AAEA,IAAII,+BAAoD;AACxD,eAAeC;IACb,mEAAmE;IACnE,IAAIC,QAAQC,GAAG,CAACC,UAAU,KAAK,0BAA0B;IACzD,IAAI,CAACJ,8BAA8B;QACjCA,+BAA+BL;IACjC;IACA,MAAM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AK,YAAY;gBACjC,OAAOA,IAAI,CAAC,EAAE,CAACU;YACjB;YACA,MAAM,OAAA,cAAuD,CAAvD,IAAIK,MAAMT,iCAAiCG,cAA3C,qBAAA;uBAAA;4BAAA;8BAAA;YAAsD;QAC9D;IACF;IACA,OAAO,IAAIE,MAAM,CAAC,GAAG;QAAEC,KAAK,IAAMF;IAAM;AAC1C;AAEA,SAASU;IACP,IAAI3B,QAAQC,GAAG,CAAC2B,YAAY,KAAK,QAAQ;;IAIzC,8DAA8D;IAC9D,IAAI5B,YAAY6B,yDAAO7B,OAAO,EAAE;QAC9B,4DAA4D;QAC5DA,QAAQC,GAAG,GAAG4B,yDAAO7B,OAAO,CAACC,GAAG;QAChC4B,yDAAO7B,OAAO,GAAGA;IACnB;IAEA,uEAAuE;IACvE,6DAA6D;IAC7D,IAAI;QACF8B,OAAOC,cAAc,CAACpC,YAAY,wBAAwB;YACxDqC,OAAOjB;YACPkB,YAAY;YACZC,cAAc;QAChB;IACF,EAAE,OAAM,CAAC;IAET,gEAAgE;IAChE,KAAKtB;AACP;AAEAe","ignoreList":[0]}}, + {"offset": {"line": 115, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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;IACD;AACF;AAEO,MAAMC,yBAAyBH;IACpCC,aAAc;QACZ,KAAK,CAAC,CAAC;;EAET,CAAC;IACD;AACF;AAEO,MAAMG,uBAAuBJ;IAClCC,aAAc;QACZ,KAAK,CAAC,CAAC;;EAET,CAAC;IACD;AACF","ignoreList":[0]}}, + {"offset": {"line": 153, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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_PREFETCH_SUFFIX = '.prefetch.rsc'\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_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'\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_'\n\n// in seconds\nexport const CACHE_ONE_YEAR = 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// 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\nexport const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`\n\nexport const NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`\n\nexport const SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`\n\nexport const ESLINT_DEFAULT_DIRS = ['app', 'pages', 'components', 'lib', 'src']\n\nexport const SERVER_RUNTIME: Record = {\n edge: 'edge',\n experimentalEdge: 'experimental-edge',\n nodejs: 'nodejs',\n}\n\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */\nconst WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */\n shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */\n reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */\n serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */\n actionBrowser: 'action-browser',\n /**\n * The Node.js bundle layer for the API routes.\n */\n apiNode: 'api-node',\n /**\n * The Edge Lite bundle layer for the API routes.\n */\n apiEdge: 'api-edge',\n /**\n * The layer for the middleware code.\n */\n middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */\n instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */\n edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */\n appPagesBrowser: 'app-pages-browser',\n /**\n * The browser client bundle layer for Pages directory.\n */\n pagesDirBrowser: 'pages-dir-browser',\n /**\n * The Edge Lite bundle layer for Pages directory.\n */\n pagesDirEdge: 'pages-dir-edge',\n /**\n * The Node.js bundle layer for Pages directory.\n */\n pagesDirNode: 'pages-dir-node',\n} as const\n\nexport type WebpackLayerName =\n (typeof WEBPACK_LAYERS_NAMES)[keyof typeof WEBPACK_LAYERS_NAMES]\n\nconst WEBPACK_LAYERS = {\n ...WEBPACK_LAYERS_NAMES,\n GROUP: {\n builtinReact: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n ],\n serverOnly: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware,\n ],\n neutralTarget: [\n // pages api\n WEBPACK_LAYERS_NAMES.apiNode,\n WEBPACK_LAYERS_NAMES.apiEdge,\n ],\n clientOnly: [\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n ],\n bundled: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.shared,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware,\n ],\n appPages: [\n // app router pages and layouts\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n ],\n },\n}\n\nconst WEBPACK_RESOURCE_QUERIES = {\n edgeSSREntry: '__next_edge_ssr_entry__',\n metadata: '__next_metadata__',\n metadataRoute: '__next_metadata_route__',\n metadataImageMeta: '__next_metadata_image_meta__',\n}\n\nexport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES }\n"],"names":["TEXT_PLAIN_CONTENT_TYPE_HEADER","HTML_CONTENT_TYPE_HEADER","JSON_CONTENT_TYPE_HEADER","NEXT_QUERY_PARAM_PREFIX","NEXT_INTERCEPTION_MARKER_PREFIX","MATCHED_PATH_HEADER","PRERENDER_REVALIDATE_HEADER","PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER","RSC_PREFETCH_SUFFIX","RSC_SEGMENTS_DIR_SUFFIX","RSC_SEGMENT_SUFFIX","RSC_SUFFIX","ACTION_SUFFIX","NEXT_DATA_SUFFIX","NEXT_META_SUFFIX","NEXT_BODY_SUFFIX","NEXT_CACHE_TAGS_HEADER","NEXT_CACHE_REVALIDATED_TAGS_HEADER","NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER","NEXT_RESUME_HEADER","NEXT_CACHE_TAG_MAX_ITEMS","NEXT_CACHE_TAG_MAX_LENGTH","NEXT_CACHE_SOFT_TAG_MAX_LENGTH","NEXT_CACHE_IMPLICIT_TAG_ID","CACHE_ONE_YEAR","INFINITE_CACHE","MIDDLEWARE_FILENAME","MIDDLEWARE_LOCATION_REGEXP","INSTRUMENTATION_HOOK_FILENAME","PAGES_DIR_ALIAS","DOT_NEXT_ALIAS","ROOT_DIR_ALIAS","APP_DIR_ALIAS","RSC_MOD_REF_PROXY_ALIAS","RSC_ACTION_VALIDATE_ALIAS","RSC_ACTION_PROXY_ALIAS","RSC_CACHE_WRAPPER_ALIAS","RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS","RSC_ACTION_ENCRYPTION_ALIAS","RSC_ACTION_CLIENT_WRAPPER_ALIAS","PUBLIC_DIR_MIDDLEWARE_CONFLICT","SSG_GET_INITIAL_PROPS_CONFLICT","SERVER_PROPS_GET_INIT_PROPS_CONFLICT","SERVER_PROPS_SSG_CONFLICT","STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR","SERVER_PROPS_EXPORT_ERROR","GSP_NO_RETURNED_VALUE","GSSP_NO_RETURNED_VALUE","UNSTABLE_REVALIDATE_RENAME_ERROR","GSSP_COMPONENT_MEMBER_ERROR","NON_STANDARD_NODE_ENV","SSG_FALLBACK_EXPORT_ERROR","ESLINT_DEFAULT_DIRS","SERVER_RUNTIME","edge","experimentalEdge","nodejs","WEBPACK_LAYERS_NAMES","shared","reactServerComponents","serverSideRendering","actionBrowser","apiNode","apiEdge","middleware","instrument","edgeAsset","appPagesBrowser","pagesDirBrowser","pagesDirEdge","pagesDirNode","WEBPACK_LAYERS","GROUP","builtinReact","serverOnly","neutralTarget","clientOnly","bundled","appPages","WEBPACK_RESOURCE_QUERIES","edgeSSREntry","metadata","metadataRoute","metadataImageMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAAqBI,aAAa;YAClCJ,qBAAqBQ,UAAU;YAC/BR,qBAAqBO,UAAU;SAChC;QACDW,eAAe;YACb,YAAY;YACZlB,qBAAqBK,OAAO;YAC5BL,qBAAqBM,OAAO;SAC7B;QACDa,YAAY;YACVnB,qBAAqBG,mBAAmB;YACxCH,qBAAqBU,eAAe;SACrC;QACDU,SAAS;YACPpB,qBAAqBE,qBAAqB;YAC1CF,qBAAqBI,aAAa;YAClCJ,qBAAqBG,mBAAmB;YACxCH,qBAAqBU,eAAe;YACpCV,qBAAqBC,MAAM;YAC3BD,qBAAqBQ,UAAU;YAC/BR,qBAAqBO,UAAU;SAChC;QACDc,UAAU;YACR,+BAA+B;YAC/BrB,qBAAqBE,qBAAqB;YAC1CF,qBAAqBG,mBAAmB;YACxCH,qBAAqBU,eAAe;YACpCV,qBAAqBI,aAAa;SACnC;IACH;AACF;AAEA,MAAMkB,2BAA2B;IAC/BC,cAAc;IACdC,UAAU;IACVC,eAAe;IACfC,mBAAmB;AACrB","ignoreList":[0]}}, + {"offset": {"line": 428, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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/middleware-relative-urls`,\n { cause: error }\n )\n }\n}\n\n/**\n * Normalizes `nxtP` and `nxtI` query param values to remove the prefix.\n * This function does not mutate the input key.\n */\nexport function normalizeNextQueryParam(key: string): null | string {\n const prefixes = [NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX]\n for (const prefix of prefixes) {\n if (key !== prefix && key.startsWith(prefix)) {\n return key.substring(prefix.length)\n }\n }\n return null\n}\n"],"names":["NEXT_INTERCEPTION_MARKER_PREFIX","NEXT_QUERY_PARAM_PREFIX","fromNodeOutgoingHttpHeaders","nodeHeaders","headers","Headers","key","value","Object","entries","values","Array","isArray","v","toString","append","splitCookiesString","cookiesString","cookiesStrings","pos","start","ch","lastComma","nextStart","cookiesSeparatorFound","skipWhitespace","length","test","charAt","notSpecialChar","push","substring","toNodeOutgoingHttpHeaders","cookies","toLowerCase","validateURL","url","String","URL","error","Error","cause","normalizeNextQueryParam","prefixes","prefix","startsWith"],"mappings":";;;;;;;;;;;;AACA,SACEA,+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AQsC,UAAUtC,IAAIuC,UAAU,CAACD,SAAS;YAC5C,OAAOtC,IAAIyB,SAAS,CAACa,OAAOlB,MAAM;QACpC;IACF;IACA,OAAO;AACT","ignoreList":[0]}}, + {"offset": {"line": 560, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/spec-extension/fetch-event.ts"],"sourcesContent":["import type { WaitUntil } from '../../after/builtin-request-context'\nimport { PageSignatureError } from '../error'\nimport type { NextRequest } from './request'\n\nconst responseSymbol = Symbol('response')\nconst passThroughSymbol = Symbol('passThrough')\nconst waitUntilSymbol = Symbol('waitUntil')\n\nclass FetchEvent {\n // TODO(after): get rid of the 'internal' variant and always use an external waitUntil\n // (this means removing `FetchEventResult.waitUntil` which also requires a builder change)\n readonly [waitUntilSymbol]:\n | { kind: 'internal'; promises: Promise[] }\n | { kind: 'external'; function: WaitUntil };\n\n [responseSymbol]?: Promise;\n [passThroughSymbol] = false\n\n constructor(_request: Request, waitUntil?: WaitUntil) {\n this[waitUntilSymbol] = waitUntil\n ? { kind: 'external', function: waitUntil }\n : { kind: 'internal', promises: [] }\n }\n\n // TODO: is this dead code? NextFetchEvent never lets this get called\n respondWith(response: Response | Promise): void {\n if (!this[responseSymbol]) {\n this[responseSymbol] = Promise.resolve(response)\n }\n }\n\n // TODO: is this dead code? passThroughSymbol is unused\n passThroughOnException(): void {\n this[passThroughSymbol] = true\n }\n\n waitUntil(promise: Promise): void {\n if (this[waitUntilSymbol].kind === 'external') {\n // if we received an external waitUntil, we delegate to it\n // TODO(after): this will make us not go through `getServerError(error, 'edge-server')` in `sandbox`\n const waitUntil = this[waitUntilSymbol].function\n return waitUntil(promise)\n } else {\n // if we didn't receive an external waitUntil, we make it work on our own\n // (and expect the caller to do something with the promises)\n this[waitUntilSymbol].promises.push(promise)\n }\n }\n}\n\nexport function getWaitUntilPromiseFromEvent(\n event: FetchEvent\n): Promise | undefined {\n return event[waitUntilSymbol].kind === 'internal'\n ? Promise.all(event[waitUntilSymbol].promises).then(() => {})\n : undefined\n}\n\nexport class NextFetchEvent extends FetchEvent {\n sourcePage: string\n\n constructor(params: {\n request: NextRequest\n page: string\n context: { waitUntil: WaitUntil } | undefined\n }) {\n super(params.request, params.context?.waitUntil)\n this.sourcePage = params.page\n }\n\n /**\n * @deprecated The `request` is now the first parameter and the API is now async.\n *\n * Read more: https://nextjs.org/docs/messages/middleware-new-signature\n */\n get request() {\n throw new PageSignatureError({\n page: this.sourcePage,\n })\n }\n\n /**\n * @deprecated Using `respondWith` is no longer needed.\n *\n * Read more: https://nextjs.org/docs/messages/middleware-new-signature\n */\n respondWith() {\n throw new PageSignatureError({\n page: this.sourcePage,\n })\n }\n}\n"],"names":["PageSignatureError","responseSymbol","Symbol","passThroughSymbol","waitUntilSymbol","FetchEvent","constructor","_request","waitUntil","kind","function","promises","respondWith","response","Promise","resolve","passThroughOnException","promise","push","getWaitUntilPromiseFromEvent","event","all","then","undefined","NextFetchEvent","params","request","context","sourcePage","page"],"mappings":";;;;;;AACA,SAASA,kBAAkB,QAAQ,WAAU;;AAG7C,MAAMC,iBAAiBC,OAAO;AAC9B,MAAMC,oBAAoBD,OAAO;AACjC,MAAME,kBAAkBF,OAAO;AAE/B,MAAMG;IAUJC,YAAYC,QAAiB,EAAEC,SAAqB,CAAE;YAFtD,CAACL,kBAAkB,GAAG;QAGpB,IAAI,CAACC,gBAAgB,GAAGI,YACpB;YAAEC,MAAM;YAAYC,UAAUF;QAAU,IACxC;YAAEC,MAAM;YAAYE,UAAU,EAAE;QAAC;IACvC;IAEA,qEAAqE;IACrEC,YAAYC,QAAsC,EAAQ;QACxD,IAAI,CAAC,IAAI,CAACZ,eAAe,EAAE;YACzB,IAAI,CAACA,eAAe,GAAGa,QAAQC,OAAO,CAACF;QACzC;IACF;IAEA,uDAAuD;IACvDG,yBAA+B;QAC7B,IAAI,CAACb,kBAAkB,GAAG;IAC5B;IAEAK,UAAUS,OAAqB,EAAQ;QACrC,IAAI,IAAI,CAACb,gBAAgB,CAACK,IAAI,KAAK,YAAY;YAC7C,0DAA0D;YAC1D,oGAAoG;YACpG,MAAMD,YAAY,IAAI,CAACJ,gBAAgB,CAACM,QAAQ;YAChD,OAAOF,UAAUS;QACnB,OAAO;YACL,yEAAyE;YACzE,4DAA4D;YAC5D,IAAI,CAACb,gBAAgB,CAACO,QAAQ,CAACO,IAAI,CAACD;QACtC;IACF;AACF;AAEO,SAASE,6BACdC,KAAiB;IAEjB,OAAOA,KAAK,CAAChB,gBAAgB,CAACK,IAAI,KAAK,aACnCK,QAAQO,GAAG,CAACD,KAAK,CAAChB,gBAAgB,CAACO,QAAQ,EAAEW,IAAI,CAAC,KAAO,KACzDC;AACN;AAEO,MAAMC,uBAAuBnB;IAGlCC,YAAYmB,MAIX,CAAE;YACqBA;QAAtB,KAAK,CAACA,OAAOC,OAAO,EAAA,CAAED,kBAAAA,OAAOE,OAAO,KAAA,OAAA,KAAA,IAAdF,gBAAgBjB,SAAS;QAC/C,IAAI,CAACoB,UAAU,GAAGH,OAAOI,IAAI;IAC/B;IAEA;;;;GAIC,GACD,IAAIH,UAAU;QACZ,MAAM,OAAA,cAEJ,CAFI,IAAI1B,gQAAAA,CAAmB;YAC3B6B,MAAM,IAAI,CAACD,UAAU;QACvB,IAFM,qBAAA;mBAAA;wBAAA;0BAAA;QAEL;IACH;IAEA;;;;GAIC,GACDhB,cAAc;QACZ,MAAM,OAAA,cAEJ,CAFI,IAAIZ,gQAAAA,CAAmB;YAC3B6B,MAAM,IAAI,CAACD,UAAU;QACvB,IAFM,qBAAA;mBAAA;wBAAA;0BAAA;QAEL;IACH;AACF","ignoreList":[0]}}, + {"offset": {"line": 645, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,iBAAAA,CAAiBD,eAAAA,KAAKE,MAAM,KAAA,OAAA,KAAA,IAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,MAAA,CAAA,CACjDC,gBAAAA,KAAKK,OAAO,KAAA,OAAA,KAAA,IAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,eAAAA,GACxD;YACA,OAAOE;QACT;IACF;AACF","ignoreList":[0]}}, + {"offset": {"line": 667, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/shared/lib/router/utils/remove-trailing-slash.ts"],"sourcesContent":["/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n"],"names":["removeTrailingSlash","route","replace"],"mappings":"AAAA;;;;;;CAMC,GACD;;;;AAAO,SAASA,oBAAoBC,KAAa;IAC/C,OAAOA,MAAMC,OAAO,CAAC,OAAO,OAAO;AACrC","ignoreList":[0]}}, + {"offset": {"line": 684, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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": 713, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,kRAAAA,EAAUE;IAC5C,OAAQ,KAAEC,SAASE,WAAWC,QAAQC;AACxC","ignoreList":[0]}}, + {"offset": {"line": 730, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,kRAAAA,EAAUE;IAC5C,OAAQ,KAAEG,WAAWF,SAASG,QAAQC;AACxC","ignoreList":[0]}}, + {"offset": {"line": 747, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,kRAAAA,EAAUE;IAC/B,OAAOE,aAAaD,UAAUC,SAASC,UAAU,CAACF,SAAS;AAC7D","ignoreList":[0]}}, + {"offset": {"line": 764, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,8RAAAA,EAAcM,OAAO,SAAS,OAAOJ;QACzC,QAAIF,8RAAAA,EAAcM,OAAQ,MAAGH,OAAOI,WAAW,KAAO,OAAOL;IAC/D;IAEA,qCAAqC;IACrC,WAAOH,8RAAAA,EAAcG,MAAO,MAAGC;AACjC","ignoreList":[0]}}, + {"offset": {"line": 790, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,kRAAAA,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,0SAAAA,EAAoBM;IACjC;IAEA,IAAID,KAAKG,OAAO,EAAE;QAChBF,eAAWJ,8RAAAA,MACTD,8RAAAA,EAAcK,UAAW,iBAAcD,KAAKG,OAAO,GACnDH,KAAKC,QAAQ,KAAK,MAAM,eAAe;IAE3C;IAEAA,eAAWL,8RAAAA,EAAcK,UAAUD,KAAKQ,QAAQ;IAChD,OAAO,CAACR,KAAKG,OAAO,IAAIH,KAAKO,aAAa,GACtC,CAACN,SAASQ,QAAQ,CAAC,WACjBZ,8RAAAA,EAAcI,UAAU,OACxBA,eACFN,0SAAAA,EAAoBM;AAC1B","ignoreList":[0]}}, + {"offset": {"line": 817, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,CAAAA,WAAAA,OAAAA,KAAAA,IAAAA,QAASE,IAAI,KAAI,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": 841, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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()\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;;;;AACD,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": 891, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,8RAAAA,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,OAAQ,MAAGA;AACb","ignoreList":[0]}}, + {"offset": {"line": 927, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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;QAE0BA;IAA1C,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,aAAa,EAAE,GAAGH,CAAAA,sBAAAA,QAAQI,UAAU,KAAA,OAAlBJ,sBAAsB,CAAC;IACjE,MAAMK,OAAyB;QAC7BN;QACAI,eAAeJ,aAAa,MAAMA,SAASO,QAAQ,CAAC,OAAOH;IAC7D;IAEA,IAAIF,gBAAYJ,8RAAAA,EAAcQ,KAAKN,QAAQ,EAAEE,WAAW;QACtDI,KAAKN,QAAQ,OAAGH,oSAAAA,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,UAAW,MAAGA,MAAMI,KAAK,CAAC,GAAGC,IAAI,CAAC,OAAS;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,+RAAAA,EAAoBU,KAAKN,QAAQ,EAAEG,KAAKiB,OAAO;QAEnDd,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACnBL;QAAhBX,KAAKN,QAAQ,GAAGiB,CAAAA,mBAAAA,OAAOjB,QAAQ,KAAA,OAAfiB,mBAAmBX,KAAKN,QAAQ;QAEhD,IAAI,CAACiB,OAAOK,cAAc,IAAIhB,KAAKO,OAAO,EAAE;YAC1CI,SAAShB,QAAQiB,YAAY,GACzBjB,QAAQiB,YAAY,CAACC,OAAO,CAACX,4BAC7BZ,+RAAAA,EAAoBY,sBAAsBL,KAAKiB,OAAO;YAE1D,IAAIH,OAAOK,cAAc,EAAE;gBACzBhB,KAAKe,MAAM,GAAGJ,OAAOK,cAAc;YACrC;QACF;IACF;IACA,OAAOhB;AACT","ignoreList":[0]}}, + {"offset": {"line": 980, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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 /(?!^https?:\\/\\/)(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 return new URL(\n String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'),\n base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')\n )\n}\n\nconst Internal = Symbol('NextURLInternal')\n\nexport class NextURL {\n private [Internal]: {\n basePath: string\n buildId?: string\n flightSearchParameters?: Record\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 = value\n }\n\n get port() {\n return this[Internal].url.port\n }\n\n set port(value: string) {\n this[Internal].url.port = value\n }\n\n get protocol() {\n return this[Internal].url.protocol\n }\n\n set protocol(value: string) {\n this[Internal].url.protocol = value\n }\n\n get href() {\n const pathname = this.formatPathname()\n const search = this.formatSearch()\n return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`\n }\n\n set href(url: string) {\n this[Internal].url = parseURL(url)\n this.analyze()\n }\n\n get origin() {\n return this[Internal].url.origin\n }\n\n get pathname() {\n return this[Internal].url.pathname\n }\n\n set pathname(value: string) {\n this[Internal].url.pathname = value\n }\n\n get hash() {\n return this[Internal].url.hash\n }\n\n set hash(value: string) {\n this[Internal].url.hash = value\n }\n\n get search() {\n return this[Internal].url.search\n }\n\n set search(value: string) {\n this[Internal].url.search = value\n }\n\n get password() {\n return this[Internal].url.password\n }\n\n set password(value: string) {\n this[Internal].url.password = value\n }\n\n get username() {\n return this[Internal].url.username\n }\n\n set username(value: string) {\n this[Internal].url.username = value\n }\n\n get basePath() {\n return this[Internal].basePath\n }\n\n set basePath(value: string) {\n this[Internal].basePath = value.startsWith('/') ? value : `/${value}`\n }\n\n toString() {\n return this.href\n }\n\n toJSON() {\n return this.href\n }\n\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n href: this.href,\n origin: this.origin,\n protocol: this.protocol,\n username: this.username,\n password: this.password,\n host: this.host,\n hostname: this.hostname,\n port: this.port,\n pathname: this.pathname,\n search: this.search,\n searchParams: this.searchParams,\n hash: this.hash,\n }\n }\n\n clone() {\n return new NextURL(String(this), this[Internal].options)\n }\n}\n"],"names":["detectDomainLocale","formatNextPathnameInfo","getHostname","getNextPathnameInfo","REGEX_LOCALHOST_HOSTNAME","parseURL","url","base","URL","String","replace","Internal","Symbol","NextURL","constructor","input","baseOrOpts","opts","options","basePath","analyze","info","pathname","nextConfig","parseData","process","env","__NEXT_NO_MIDDLEWARE_URL_NORMALIZE","i18nProvider","hostname","headers","domainLocale","i18n","domains","defaultLocale","buildId","locale","trailingSlash","formatPathname","forceLocale","undefined","formatSearch","search","locales","includes","TypeError","searchParams","host","value","port","protocol","href","hash","origin","password","username","startsWith","toString","toJSON","for","clone"],"mappings":";;;;AAIA,SAASA,kBAAkB,QAAQ,6CAA4C;AAC/E,SAASC,sBAAsB,QAAQ,0DAAyD;AAChG,SAAS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;YACvBoB,MAAM,IAAI,CAACA,IAAI;YACf3B,UAAU,IAAI,CAACA,QAAQ;YACvBoB,QAAQ,IAAI,CAACA,MAAM;YACnBI,cAAc,IAAI,CAACA,YAAY;YAC/BM,MAAM,IAAI,CAACA,IAAI;QACjB;IACF;IAEAQ,QAAQ;QACN,OAAO,IAAI/C,QAAQJ,OAAO,IAAI,GAAG,IAAI,CAACE,SAAS,CAACO,OAAO;IACzD;AACF","ignoreList":[0]}}, + {"offset": {"line": 1175, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/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 while (pos < cookiesString.length && notSpecialChar()) {\n pos += 1;\n }\n if (pos < cookiesString.length && cookiesString.charAt(pos) === \"=\") {\n cookiesSeparatorFound = true;\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n\n// src/request-cookies.ts\nvar RequestCookies = class {\n constructor(requestHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n this._headers = requestHeaders;\n const header = requestHeaders.get(\"cookie\");\n if (header) {\n const parsed = parseCookie(header);\n for (const [name, value] of parsed) {\n this._parsed.set(name, { name, value });\n }\n }\n }\n [Symbol.iterator]() {\n return this._parsed[Symbol.iterator]();\n }\n /**\n * The amount of cookies received from the client\n */\n get size() {\n return this._parsed.size;\n }\n get(...args) {\n const name = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(name);\n }\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed);\n if (!args.length) {\n return all.map(([_, value]) => value);\n }\n const name = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter(([n]) => n === name).map(([_, value]) => value);\n }\n has(name) {\n return this._parsed.has(name);\n }\n set(...args) {\n const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;\n const map = this._parsed;\n map.set(name, { name, value });\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join(\"; \")\n );\n return this;\n }\n /**\n * Delete the cookies matching the passed name or names in the request.\n */\n delete(names) {\n const map = this._parsed;\n const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value]) => stringifyCookie(value)).join(\"; \")\n );\n return result;\n }\n /**\n * Delete all the cookies in the cookies in the request.\n */\n clear() {\n this.delete(Array.from(this._parsed.keys()));\n return this;\n }\n /**\n * Format the cookies in the request as a string for logging\n */\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join(\"; \");\n }\n};\n\n// src/response-cookies.ts\nvar ResponseCookies = class {\n constructor(responseHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n var _a, _b, _c;\n this._headers = responseHeaders;\n const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get(\"set-cookie\")) != null ? _c : [];\n const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);\n for (const cookieString of cookieStrings) {\n const parsed = parseSetCookie(cookieString);\n if (parsed)\n this._parsed.set(parsed.name, parsed);\n }\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.\n */\n get(...args) {\n const key = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(key);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.\n */\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed.values());\n if (!args.length) {\n return all;\n }\n const key = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter((c) => c.name === key);\n }\n has(name) {\n return this._parsed.has(name);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.\n */\n set(...args) {\n const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;\n const map = this._parsed;\n map.set(name, normalizeCookie({ name, value, ...cookie }));\n replace(map, this._headers);\n return this;\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.\n */\n delete(...args) {\n const [name, options] = typeof args[0] === \"string\" ? [args[0]] : [args[0].name, args[0]];\n return this.set({ ...options, name, value: \"\", expires: /* @__PURE__ */ new Date(0) });\n }\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map(stringifyCookie).join(\"; \");\n }\n};\nfunction replace(bag, headers) {\n headers.delete(\"set-cookie\");\n for (const [, value] of bag) {\n const serialized = stringifyCookie(value);\n headers.append(\"set-cookie\", serialized);\n }\n}\nfunction normalizeCookie(cookie = { name: \"\", value: \"\" }) {\n if (typeof cookie.expires === \"number\") {\n cookie.expires = new Date(cookie.expires);\n }\n if (cookie.maxAge) {\n cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);\n }\n if (cookie.path === null || cookie.path === void 0) {\n cookie.path = \"/\";\n }\n return cookie;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestCookies,\n ResponseCookies,\n par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AAO,IAAI,KAAK,KAAK,GAAG;QAClD,OAAO,IAAI,GAAG;IAChB;IACA,OAAO;AACT;AACA,6DAA6D;AAC7D,KAAK,CAAC,OAAO,OAAO,GAAG;IACrB;IACA;IACA;IACA;IACA;AACF,CAAC","ignoreList":[0]}}, + {"offset": {"line": 1545, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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": 1552, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,yPAAAA,EAAYW;QAEZ,2DAA2D;QAC3D,oDAAoD;QACpD,sDAAsD;QACtD,oCAAoC;QACpC,IAAIE,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;;QAMzC,IAAIN,iBAAiBF,SAAS,KAAK,CAACE,OAAOC;aACtC,KAAK,CAACC,KAAKD;QAEhB,MAAMQ,UAAU,IAAIpB,2PAAAA,CAAQa,KAAK;YAC/BQ,aAASpB,uQAAAA,EAA0B,IAAI,CAACoB,OAAO;YAC/CC,YAAYV,KAAKU,UAAU;QAC7B;QACA,IAAI,CAAChB,UAAU,GAAG;YAChBiB,SAAS,IAAIlB,gRAAAA,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,KAAK,IAAI,CAACA,GAAG;YACb,kCAAkC;YAClCc,UAAU,IAAI,CAACA,QAAQ;YACvBC,OAAO,IAAI,CAACA,KAAK;YACjBC,aAAa,IAAI,CAACA,WAAW;YAC7BC,aAAa,IAAI,CAACA,WAAW;YAC7BT,SAASU,OAAOC,WAAW,CAAC,IAAI,CAACX,OAAO;YACxCY,WAAW,IAAI,CAACA,SAAS;YACzBC,WAAW,IAAI,CAACA,SAAS;YACzBC,QAAQ,IAAI,CAACA,MAAM;YACnBC,MAAM,IAAI,CAACA,IAAI;YACfC,UAAU,IAAI,CAACA,QAAQ;YACvBC,UAAU,IAAI,CAACA,QAAQ;YACvBC,gBAAgB,IAAI,CAACA,cAAc;YACnCC,QAAQ,IAAI,CAACA,MAAM;QACrB;IACF;IAEA,IAAWjB,UAAU;QACnB,OAAO,IAAI,CAACjB,UAAU,CAACiB,OAAO;IAChC;IAEA,IAAWH,UAAU;QACnB,OAAO,IAAI,CAACd,UAAU,CAACc,OAAO;IAChC;IAEA;;;;GAIC,GACD,IAAWqB,OAAO;QAChB,MAAM,IAAIrC,8PAAAA;IACZ;IAEA;;;;GAIC,GACD,IAAWsC,KAAK;QACd,MAAM,IAAIvC,4PAAAA;IACZ;IAEA,IAAWU,MAAM;QACf,OAAO,IAAI,CAACP,UAAU,CAACO,GAAG;IAC5B;AACF","ignoreList":[0]}}, + {"offset": {"line": 1639, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/spec-extension/adapters/reflect.ts"],"sourcesContent":["export class ReflectAdapter {\n static get(\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(\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(target: T, prop: string | symbol): boolean {\n return Reflect.has(target, prop)\n }\n\n static deleteProperty(\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": 1665, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/spec-extension/response.ts"],"sourcesContent":["import { stringifyCookie } from '../../web/spec-extension/cookies'\nimport type { I18NConfig } from '../../config-shared'\nimport { NextURL } from '../next-url'\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils'\nimport { ReflectAdapter } from './adapters/reflect'\n\nimport { ResponseCookies } from './cookies'\n\nconst INTERNALS = Symbol('internal response')\nconst REDIRECTS = new Set([301, 302, 303, 307, 308])\n\nfunction handleMiddlewareField(\n init: MiddlewareResponseInit | undefined,\n headers: Headers\n) {\n if (init?.request?.headers) {\n if (!(init.request.headers instanceof Headers)) {\n throw new Error('request.headers must be an instance of Headers')\n }\n\n const keys = []\n for (const [key, value] of init.request.headers) {\n headers.set('x-middleware-request-' + key, value)\n keys.push(key)\n }\n\n headers.set('x-middleware-override-headers', keys.join(','))\n }\n}\n\n/**\n * This class extends the [Web `Response` API](https://developer.mozilla.org/docs/Web/API/Response) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextResponse`](https://nextjs.org/docs/app/api-reference/functions/next-response)\n */\nexport class NextResponse extends Response {\n [INTERNALS]: {\n cookies: ResponseCookies\n url?: NextURL\n body?: Body\n }\n\n constructor(body?: BodyInit | null, init: ResponseInit = {}) {\n super(body, init)\n\n const headers = this.headers\n const cookies = new ResponseCookies(headers)\n\n const cookiesProxy = new Proxy(cookies, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'delete':\n case 'set': {\n return (...args: [string, string]) => {\n const result = Reflect.apply(target[prop], target, args)\n const newHeaders = new Headers(headers)\n\n if (result instanceof ResponseCookies) {\n headers.set(\n 'x-middleware-set-cookie',\n result\n .getAll()\n .map((cookie) => stringifyCookie(cookie))\n .join(',')\n )\n }\n\n handleMiddlewareField(init, newHeaders)\n return result\n }\n }\n default:\n return ReflectAdapter.get(target, prop, receiver)\n }\n },\n })\n\n this[INTERNALS] = {\n cookies: cookiesProxy,\n url: init.url\n ? new NextURL(init.url, {\n headers: toNodeOutgoingHttpHeaders(headers),\n nextConfig: init.nextConfig,\n })\n : undefined,\n }\n }\n\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n url: this.url,\n // rest of props come from Response\n body: this.body,\n bodyUsed: this.bodyUsed,\n headers: Object.fromEntries(this.headers),\n ok: this.ok,\n redirected: this.redirected,\n status: this.status,\n statusText: this.statusText,\n type: this.type,\n }\n }\n\n public get cookies() {\n return this[INTERNALS].cookies\n }\n\n static json(\n body: JsonBody,\n init?: ResponseInit\n ): NextResponse {\n const response: Response = Response.json(body, init)\n return new NextResponse(response.body, response)\n }\n\n static redirect(url: string | NextURL | URL, init?: number | ResponseInit) {\n const status = typeof init === 'number' ? init : init?.status ?? 307\n if (!REDIRECTS.has(status)) {\n throw new RangeError(\n 'Failed to execute \"redirect\" on \"response\": Invalid status code'\n )\n }\n const initObj = typeof init === 'object' ? init : {}\n const headers = new Headers(initObj?.headers)\n headers.set('Location', validateURL(url))\n\n return new NextResponse(null, {\n ...initObj,\n headers,\n status,\n })\n }\n\n static rewrite(\n destination: string | NextURL | URL,\n init?: MiddlewareResponseInit\n ) {\n const headers = new Headers(init?.headers)\n headers.set('x-middleware-rewrite', validateURL(destination))\n\n handleMiddlewareField(init, headers)\n return new NextResponse(null, { ...init, headers })\n }\n\n static next(init?: MiddlewareResponseInit) {\n const headers = new Headers(init?.headers)\n headers.set('x-middleware-next', '1')\n\n handleMiddlewareField(init, headers)\n return new NextResponse(null, { ...init, headers })\n }\n}\n\ninterface ResponseInit extends globalThis.ResponseInit {\n nextConfig?: {\n basePath?: string\n i18n?: I18NConfig\n trailingSlash?: boolean\n }\n url?: string\n}\n\ninterface ModifiedRequest {\n /**\n * If this is set, the request headers will be overridden with this value.\n */\n headers?: Headers\n}\n\ninterface MiddlewareResponseInit extends globalThis.ResponseInit {\n /**\n * These fields will override the request from clients.\n */\n request?: ModifiedRequest\n}\n"],"names":["stringifyCookie","NextURL","toNodeOutgoingHttpHeaders","validateURL","ReflectAdapter","ResponseCookies","INTERNALS","Symbol","REDIRECTS","Set","handleMiddlewareField","init","headers","request","Headers","Error","keys","key","value","set","push","join","NextResponse","Response","constructor","body","cookies","cookiesProxy","Proxy","get","target","prop","receiver","args","result","Reflect","apply","newHeaders","getAll","map","cookie","url","nextConfig","undefined","for","bodyUsed","Object","fromEntries","ok","redirected","status","statusText","type","json","response","redirect","has","RangeError","initObj","rewrite","destination","next"],"mappings":";;;;;AAAA,SAASA,eAAe,QAAQ,mCAAkC;AAElE,SAASC,OAAO,QAAQ,cAAa;AACrC,SAASC,yBAAyB,EAAEC,WAAW,QAAQ,WAAU;AACjE,SAASC,cAAc,QAAQ,qBAAoB;;;;;;AAInD,MAAME,YAAYC,OAAO;AACzB,MAAMC,YAAY,IAAIC,IAAI;IAAC;IAAK;IAAK;IAAK;IAAK;CAAI;AAEnD,SAASC,sBACPC,I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;QACF;QACA,MAAMC,UAAU,OAAO/C,SAAS,WAAWA,OAAO,CAAC;QACnD,MAAMC,UAAU,IAAIE,QAAQ4C,WAAAA,OAAAA,KAAAA,IAAAA,QAAS9C,OAAO;QAC5CA,QAAQO,GAAG,CAAC,gBAAYhB,yPAAAA,EAAYsC;QAEpC,OAAO,IAAInB,aAAa,MAAM;YAC5B,GAAGoC,OAAO;YACV9C;YACAsC;QACF;IACF;IAEA,OAAOS,QACLC,WAAmC,EACnCjD,IAA6B,EAC7B;QACA,MAAMC,UAAU,IAAIE,QAAQH,QAAAA,OAAAA,KAAAA,IAAAA,KAAMC,OAAO;QACzCA,QAAQO,GAAG,CAAC,4BAAwBhB,yPAAAA,EAAYyD;QAEhDlD,sBAAsBC,MAAMC;QAC5B,OAAO,IAAIU,aAAa,MAAM;YAAE,GAAGX,IAAI;YAAEC;QAAQ;IACnD;IAEA,OAAOiD,KAAKlD,IAA6B,EAAE;QACzC,MAAMC,UAAU,IAAIE,QAAQH,QAAAA,OAAAA,KAAAA,IAAAA,KAAMC,OAAO;QACzCA,QAAQO,GAAG,CAAC,qBAAqB;QAEjCT,sBAAsBC,MAAMC;QAC5B,OAAO,IAAIU,aAAa,MAAM;YAAE,GAAGX,IAAI;YAAEC;QAAQ;IACnD;AACF","ignoreList":[0]}}, + {"offset": {"line": 1802, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/shared/lib/router/utils/relativize-url.ts"],"sourcesContent":["/**\n * The result of parsing a URL relative to a base URL.\n */\nexport type RelativeURL = {\n /**\n * The relative URL. Either a URL including the origin or a relative URL.\n */\n url: string\n\n /**\n * Whether the URL is relative to the base URL.\n */\n isRelative: boolean\n}\n\nexport function parseRelativeURL(\n url: string | URL,\n base: string | URL\n): RelativeURL {\n const baseURL = typeof base === 'string' ? new URL(base) : base\n const relative = new URL(url, base)\n\n // The URL is relative if the origin is the same as the base URL.\n const isRelative = relative.origin === baseURL.origin\n\n return {\n url: isRelative\n ? relative.toString().slice(baseURL.origin.length)\n : relative.toString(),\n isRelative,\n }\n}\n\n/**\n * Given a URL as a string and a base URL it will make the URL relative\n * if the parsed protocol and host is the same as the one in the base\n * URL. Otherwise it returns the same URL string.\n */\nexport function getRelativeURL(url: string | URL, base: string | URL): string {\n const relative = parseRelativeURL(url, base)\n return relative.url\n}\n"],"names":["parseRelativeURL","url","base","baseURL","URL","relative","isRelative","origin","toString","slice","length","getRelativeURL"],"mappings":"AAAA;;CAEC,GAaD;;;;;;AAAO,SAASA,iBACdC,GAAiB,EACjBC,IAAkB;IAElB,MAAMC,UAAU,OAAOD,SAAS,WAAW,IAAIE,IAAIF,QAAQA;IAC3D,MAAMG,WAAW,IAAID,IAAIH,KAAKC;IAE9B,iEAAiE;IACjE,MAAMI,aAAaD,SAASE,MAAM,KAAKJ,QAAQI,MAAM;IAErD,OAAO;QACLN,KAAKK,aACDD,SAASG,QAAQ,GAAGC,KAAK,CAACN,QAAQI,MAAM,CAACG,MAAM,IAC/CL,SAASG,QAAQ;QACrBF;IACF;AACF;AAOO,SAASK,eAAeV,GAAiB,EAAEC,IAAkB;IAClE,MAAMG,WAAWL,iBAAiBC,KAAKC;IACvC,OAAOG,SAASJ,GAAG;AACrB","ignoreList":[0]}}, + {"offset": {"line": 1828, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' 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\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_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","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"],"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,+BAA+B,4BAAoC;AACzE,MAAMC,WAAW,WAAmB;AACpC,MAAMC,0BAA0B,mBAA2B;AAE3D,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","ignoreList":[0]}}, + {"offset": {"line": 1891, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/internal-utils.ts"],"sourcesContent":["import type { NextParsedUrlQuery } from './request-meta'\n\nimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\n\nconst INTERNAL_QUERY_NAMES = [NEXT_RSC_UNION_QUERY] as const\n\nexport function stripInternalQueries(query: NextParsedUrlQuery) {\n for (const name of INTERNAL_QUERY_NAMES) {\n delete query[name]\n }\n}\n\nexport function stripInternalSearchParams(url: T): T {\n const isStringUrl = typeof url === 'string'\n const instance = isStringUrl ? new URL(url) : (url as URL)\n\n instance.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n return (isStringUrl ? instance.toString() : instance) as T\n}\n"],"names":["NEXT_RSC_UNION_QUERY","INTERNAL_QUERY_NAMES","stripInternalQueries","query","name","stripInternalSearchParams","url","isStringUrl","instance","URL","searchParams","delete","toString"],"mappings":";;;;;;AAEA,SAASA,oBAAoB,QAAQ,0CAAyC;;AAE9E,MAAMC,uBAAuB;IAACD,4RAAAA;CAAqB;AAE5C,SAASE,qBAAqBC,KAAyB;IAC5D,KAAK,MAAMC,QAAQH,qBAAsB;QACvC,OAAOE,KAAK,CAACC,KAAK;IACpB;AACF;AAEO,SAASC,0BAAkDC,GAAM;IACtE,MAAMC,cAAc,OAAOD,QAAQ;IACnC,MAAME,WAAWD,cAAc,IAAIE,IAAIH,OAAQA;IAE/CE,SAASE,YAAY,CAACC,MAAM,CAACX,4RAAAA;IAE7B,OAAQO,cAAcC,SAASI,QAAQ,KAAKJ;AAC9C","ignoreList":[0]}}, + {"offset": {"line": 1917, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,OAAQ,MAAGA;AAC3C","ignoreList":[0]}}, + {"offset": {"line": 1931, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/shared/lib/segment.ts"],"sourcesContent":["import type { Segment } from '../../server/app-render/types'\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\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 const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\n"],"names":["isGroupSegment","segment","endsWith","isParallelRouteSegment","startsWith","addSearchParamsIfPageSegment","searchParams","isPageSegment","includes","PAGE_SEGMENT_KEY","stringifiedQuery","JSON","stringify","DEFAULT_SEGMENT_KEY"],"mappings":";;;;;;;;;;;;AAEO,SAASA,eAAeC,OAAe;IAC5C,sCAAsC;IACtC,OAAOA,OAAO,CAAC,EAAE,KAAK,OAAOA,QAAQC,QAAQ,CAAC;AAChD;AAEO,SAASC,uBAAuBF,OAAe;IACpD,OAAOA,QAAQG,UAAU,CAAC,QAAQH,YAAY;AAChD;AAEO,SAASI,6BACdJ,OAAgB,EAChBK,YAA2D;IAE3D,MAAMC,gBAAgBN,QAAQO,QAAQ,CAACC;IAEvC,IAAIF,eAAe;QACjB,MAAMG,mBAAmBC,KAAKC,SAAS,CAACN;QACxC,OAAOI,qBAAqB,OACxBD,mBAAmB,MAAMC,mBACzBD;IACN;IAEA,OAAOR;AACT;AAEO,MAAMQ,mBAAmB,WAAU;AACnC,MAAMI,sBAAsB,cAAa","ignoreList":[0]}}, + {"offset": {"line": 1964, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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 * 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","normalizeRscURL","url","replace"],"mappings":";;;;;;AAAA,SAASA,kBAAkB,QAAQ,uCAAsC;AACzE,SAASC,cAAc,QAAQ,gBAAe;;;AAqBvC,SAASC,iBAAiBC,KAAa;IAC5C,WAAOH,qSAAAA,EACLG,MAAMC,KAAK,CAAC,KAAKC,MAAM,CAAC,CAACC,UAAUC,SAASC,OAAOC;QACjD,8BAA8B;QAC9B,IAAI,CAACF,SAAS;YACZ,OAAOD;QACT;QAEA,sBAAsB;QACtB,QAAIL,8PAAAA,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,OAAUA,WAAS,MAAGC;IACxB,GAAG;AAEP;AAMO,SAASI,gBAAgBC,GAAW;IACzC,OAAOA,IAAIC,OAAO,CAChB,eACA,AACA,8BAD8B;AAGlC","ignoreList":[0]}}, + {"offset": {"line": 2002, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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(headers, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'append':\n case 'delete':\n case 'set':\n return ReadonlyHeadersError.callable\n default:\n return ReflectAdapter.get(target, prop, receiver)\n }\n },\n })\n }\n\n /**\n * Merges a header value into a string. This stores multiple values as an\n * array, so we need to merge them into a string.\n *\n * @param value a header value\n * @returns a merged header value (a string)\n */\n private merge(value: string | string[]): string {\n if (Array.isArray(value)) return value.join(', ')\n\n return value\n }\n\n /**\n * Creates a Headers instance from a plain object or a Headers instance.\n *\n * @param headers a plain object or a Headers instance\n * @returns a headers instance\n */\n public static from(headers: IncomingHttpHeaders | Headers): Headers {\n if (headers instanceof Headers) return headers\n\n return new HeadersAdapter(headers)\n }\n\n public append(name: string, value: string): void {\n const existing = this.headers[name]\n if (typeof existing === 'string') {\n this.headers[name] = [existing, value]\n } else if (Array.isArray(existing)) {\n existing.push(value)\n } else {\n this.headers[name] = value\n }\n }\n\n public delete(name: string): void {\n delete this.headers[name]\n }\n\n public get(name: string): string | null {\n const value = this.headers[name]\n if (typeof value !== 'undefined') return this.merge(value)\n\n return null\n }\n\n public has(name: string): boolean {\n return typeof this.headers[name] !== 'undefined'\n }\n\n public set(name: string, value: string): void {\n this.headers[name] = value\n }\n\n public forEach(\n callbackfn: (value: string, name: string, parent: Headers) => void,\n thisArg?: any\n ): void {\n for (const [name, value] of this.entries()) {\n callbackfn.call(thisArg, value, name, this)\n }\n }\n\n public *entries(): HeadersIterator<[string, string]> {\n for (const key of Object.keys(this.headers)) {\n const name = key.toLowerCase()\n // We assert here that this is a string because we got it from the\n // Object.keys() call above.\n const value = this.get(name) as string\n\n yield [name, value] as [string, string]\n }\n }\n\n public *keys(): HeadersIterator {\n for (const key of Object.keys(this.headers)) {\n const name = key.toLowerCase()\n yield name\n }\n }\n\n public *values(): HeadersIterator {\n for (const key of Object.keys(this.headers)) {\n // We assert here that this is a string because we got it from the\n // Object.keys() call above.\n const value = this.get(key) as string\n\n yield value\n }\n }\n\n public [Symbol.iterator](): HeadersIterator<[string, string]> {\n return this.entries()\n }\n}\n"],"names":["ReflectAdapter","ReadonlyHeadersError","Error","constructor","callable","HeadersAdapter","Headers","headers","Proxy","get","target","prop","receiver","lowercased","toLowerCase","original","Object","keys","find","o","set","value","has","deleteProperty","seal","merge","Array","isArray","join","from","append","name","existing","push","delete","forEach","callbackfn","thisArg","entries","call","key","values","Symbol","iterator"],"mappings":";;;;;;AAEA,SAASA,cAAc,QAAQ,YAAW;;AAKnC,MAAMC,6BAA6BC;IACxCC,aAAc;QACZ,KAAK,CACH;IAEJ;IAEA,OAAcC,WAAW;QACvB,MAAM,IAAIH;IACZ;AACF;AAUO,MAAMI,uBAAuBC;IAGlCH,YAAYI,OAA4B,CAAE;QACxC,2EAA2E;QAC3E,2EAA2E;QAC3E,KAAK;QAEL,IAAI,CAACA,OAAO,GAAG,IAAIC,MAAMD,SAAS;YAChCE,KAAIC,MAAM,EAAEC,IAAI,EAAEC,QAAQ;gBACxB,sEAAsE;gBACtE,sEAAsE;gBACtE,cAAc;gBACd,IAAI,OAAOD,SAAS,UAAU;oBAC5B,OAAOX,+RAAAA,CAAeS,GAAG,CAACC,QAAQC,MAAMC;gBAC1C;gBAEA,MAAMC,aAAaF,KAAKG,WAAW;gBAEnC,wEAAwE;gBACxE,qEAAqE;gBACrE,kBAAkB;gBAClB,MAAMC,WAAWC,OAAOC,IAAI,CAACV,SAASW,IAAI,CACxC,CAACC,IAAMA,EAAEL,WAAW,OAAOD;gBAG7B,0DAA0D;gBAC1D,IAAI,OAAOE,aAAa,aAAa;gBAErC,mDAAmD;gBACnD,OAAOf,+RAAAA,CAAeS,GAAG,CAACC,QAAQK,UAAUH;YAC9C;YACAQ,KAAIV,MAAM,EAAEC,IAAI,EAAEU,KAAK,EAAET,QAAQ;gBAC/B,IAAI,OAAOD,SAAS,UAAU;oBAC5B,OAAOX,+RAAAA,CAAeoB,GAAG,CAACV,QAAQC,MAAMU,OAAOT;gBACjD;gBAEA,MAAMC,aAAaF,KAAKG,WAAW;gBAEnC,wEAAwE;gBACxE,qEAAqE;gBACrE,kBAAkB;gBAClB,MAAMC,WAAWC,OAAOC,IAAI,CAACV,SAASW,I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A,CAAQO,UAA6C;QACnD,KAAK,MAAME,OAAOxB,OAAOC,IAAI,CAAC,IAAI,CAACV,OAAO,EAAG;YAC3C,MAAMwB,OAAOS,IAAI1B,WAAW;YAC5B,kEAAkE;YAClE,4BAA4B;YAC5B,MAAMO,QAAQ,IAAI,CAACZ,GAAG,CAACsB;YAEvB,MAAM;gBAACA;gBAAMV;aAAM;QACrB;IACF;IAEA,CAAQJ,OAAgC;QACtC,KAAK,MAAMuB,OAAOxB,OAAOC,IAAI,CAAC,IAAI,CAACV,OAAO,EAAG;YAC3C,MAAMwB,OAAOS,IAAI1B,WAAW;YAC5B,MAAMiB;QACR;IACF;IAEA,CAAQU,SAAkC;QACxC,KAAK,MAAMD,OAAOxB,OAAOC,IAAI,CAAC,IAAI,CAACV,OAAO,EAAG;YAC3C,kEAAkE;YAClE,4BAA4B;YAC5B,MAAMc,QAAQ,IAAI,CAACZ,GAAG,CAAC+B;YAEvB,MAAMnB;QACR;IACF;IAEO,CAACqB,OAAOC,QAAQ,CAAC,GAAsC;QAC5D,OAAO,IAAI,CAACL,OAAO;IACrB;AACF","ignoreList":[0]}}, + {"offset": {"line": 2181, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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\n implements AsyncLocalStorage\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 {\n throw sharedAsyncLocalStorageNotAvailableError\n }\n\n exit(): R {\n throw sharedAsyncLocalStorageNotAvailableError\n }\n\n enterWith(): void {\n throw sharedAsyncLocalStorageNotAvailableError\n }\n\n static bind(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 {\n if (maybeGlobalAsyncLocalStorage) {\n return new maybeGlobalAsyncLocalStorage()\n }\n return new FakeAsyncLocalStorage()\n}\n\nexport function bindSnapshot(fn: T): T {\n if (maybeGlobalAsyncLocalStorage) {\n return maybeGlobalAsyncLocalStorage.bind(fn)\n }\n return FakeAsyncLocalStorage.bind(fn)\n}\n\nexport function createSnapshot(): (\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,aAAgBL,EAAK;IACnC,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": 2240, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/app-render/work-async-storage-instance.ts"],"sourcesContent":["import type { WorkAsyncStorage } from './work-async-storage.external'\nimport { createAsyncLocalStorage } from './async-local-storage'\n\nexport const workAsyncStorageInstance: WorkAsyncStorage =\n createAsyncLocalStorage()\n"],"names":["createAsyncLocalStorage","workAsyncStorageInstance"],"mappings":";;;;AACA,SAASA,uBAAuB,QAAQ,wBAAuB;;AAExD,MAAMC,+BACXD,mSAAAA,GAAyB","ignoreList":[0]}}, + {"offset": {"line": 2251, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/app-render/work-async-storage.external.ts"],"sourcesContent":["import type { AsyncLocalStorage } from 'async_hooks'\nimport type { IncrementalCache } from '../lib/incremental-cache'\nimport type { FetchMetrics } from '../base-http'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\nimport type { AppSegmentConfig } from '../../build/segment-config/app/app-segment-config'\nimport type { AfterContext } from '../after/after-context'\nimport type { CacheLife } from '../use-cache/cache-life'\n\n// Share the instance module in the next-shared layer\nimport { workAsyncStorageInstance } from './work-async-storage-instance' with { 'turbopack-transition': 'next-shared' }\nimport type { LazyResult } from '../lib/lazy-result'\n\nexport interface WorkStore {\n readonly isStaticGeneration: boolean\n\n /**\n * The page that is being rendered. This relates to the path to the page file.\n */\n readonly page: string\n\n /**\n * The route that is being rendered. This is the page property without the\n * trailing `/page` or `/route` suffix.\n */\n readonly route: string\n\n readonly incrementalCache?: IncrementalCache\n readonly cacheLifeProfiles?: { [profile: string]: CacheLife }\n\n readonly isOnDemandRevalidate?: boolean\n readonly isBuildTimePrerendering?: boolean\n\n /**\n * This is true when:\n * - source maps are generated\n * - source maps are applied\n * - minification is disabled\n */\n readonly hasReadableErrorStacks?: boolean\n\n readonly isRevalidate?: boolean\n\n forceDynamic?: boolean\n fetchCache?: AppSegmentConfig['fetchCache']\n\n forceStatic?: boolean\n dynamicShouldError?: boolean\n pendingRevalidates?: Record>\n pendingRevalidateWrites?: Array> // This is like pendingRevalidates but isn't used for deduping.\n readonly afterContext: AfterContext\n\n dynamicUsageDescription?: string\n dynamicUsageStack?: string\n\n /**\n * Invalid dynamic usage errors might be caught in userland. We attach them to\n * the work store to ensure we can still fail the build, or show en error in\n * dev mode.\n */\n // TODO: Collect an array of errors, and throw as AggregateError when\n // `serializeError` and the Dev Overlay support it.\n invalidDynamicUsageError?: Error\n\n nextFetchId?: number\n pathWasRevalidated?: boolean\n\n /**\n * Tags that were revalidated during the current request. They need to be sent\n * to cache handlers to propagate their revalidation.\n */\n pendingRevalidatedTags?: string[]\n\n /**\n * Tags that were previously revalidated (e.g. by a redirecting server action)\n * and have already been sent to cache handlers. Retrieved cache entries that\n * include any of these tags must be discarded.\n */\n readonly previouslyRevalidatedTags: readonly string[]\n\n /**\n * This map contains lazy results so that we can evaluate them when the first\n * cache entry is read. It allows us to skip refreshing tags if no caches are\n * read at all.\n */\n readonly refreshTagsByCacheKind: Map>\n\n fetchMetrics?: FetchMetrics\n shouldTrackFetchMetrics: boolean\n\n isDraftMode?: boolean\n isUnstableNoStore?: boolean\n isPrefetchRequest?: boolean\n\n buildId: string\n\n readonly reactLoadableManifest?: DeepReadonly<\n Record\n >\n readonly assetPrefix?: string\n\n cacheComponentsEnabled: boolean\n dev: boolean\n\n /**\n * Run the given function inside a clean AsyncLocalStorage snapshot. This is\n * useful when generating cache entries, to ensure that the cache generation\n * cannot read anything from the context we're currently executing in, which\n * might include request-specific things like `cookies()` inside a\n * `React.cache()`.\n */\n runInCleanSnapshot: (\n fn: (...args: TArgs) => R,\n ...args: TArgs\n ) => R\n}\n\nexport type WorkAsyncStorage = AsyncLocalStorage\n\nexport { workAsyncStorageInstance as workAsyncStorage }\n"],"names":["workAsyncStorageInstance","workAsyncStorage"],"mappings":"AAQA,qDAAqD;;AACrD,SAASA,wBAAwB,QAAQ,qCAAqC","ignoreList":[0]}}, + {"offset": {"line": 2270, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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'\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\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\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]\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['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()\n const updateResponseCookies = () => {\n // TODO-APP: change method of getting workStore\n const workStore = workAsyncStorage.getStore()\n if (workStore) {\n workStore.pathWasRevalidated = true\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 to get the modified cookie values\n case SYMBOL_MODIFY_COOKIE_VALUES:\n return modifiedValues\n\n // TODO: Throw error if trying to set a cookie after the response\n // headers have been set.\n case 'delete':\n return function (...args: [string] | [ResponseCookie]) {\n modifiedCookies.add(\n typeof args[0] === 'string' ? args[0] : args[0].name\n )\n try {\n target.delete(...args)\n return wrappedCookies\n } finally {\n updateResponseCookies()\n }\n }\n case 'set':\n return function (...args: SetCookieArgs) {\n modifiedCookies.add(\n typeof args[0] === 'string' ? args[0] : args[0].name\n )\n try {\n target.set(...args)\n return wrappedCookies\n } finally {\n updateResponseCookies()\n }\n }\n\n default:\n return ReflectAdapter.get(target, prop, receiver)\n }\n },\n })\n\n return wrappedCookies\n }\n}\n\nexport function createCookiesWithMutableAccessCheck(\n requestStore: RequestStore\n): ResponseCookies {\n const wrappedCookies = new Proxy(requestStore.mutableCookies, {\n get(target, prop, receiver) {\n switch (prop) {\n case 'delete':\n return function (...args: [string] | [ResponseCookie]) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().delete')\n target.delete(...args)\n return wrappedCookies\n }\n case 'set':\n return function (...args: SetCookieArgs) {\n ensureCookiesAreStillMutable(requestStore, 'cookies().set')\n target.set(...args)\n return wrappedCookies\n }\n\n default:\n return ReflectAdapter.get(target, prop, receiver)\n }\n },\n })\n return wrappedCookies\n}\n\nexport function areCookiesMutableInCurrentPhase(requestStore: RequestStore) {\n return requestStore.phase === 'action'\n}\n\n/** Ensure that cookies() starts throwing on mutation\n * if we changed phases and can no longer mutate.\n *\n * This can happen when going:\n * 'render' -> 'after'\n * 'action' -> 'render'\n * */\nfunction ensureCookiesAreStillMutable(\n requestStore: RequestStore,\n _callingExpression: string\n) {\n if (!areCookiesMutableInCurrentPhase(requestStore)) {\n // TODO: maybe we can give a more precise error message based on callingExpression?\n throw new ReadonlyRequestCookiesError()\n }\n}\n\nexport function responseCookiesToRequestCookies(\n responseCookies: ResponseCookies\n): RequestCookies {\n const requestCookies = new RequestCookies(new Headers())\n for (const cookie of responseCookies.getAll()) {\n requestCookies.set(cookie)\n }\n return requestCookies\n}\n"],"names":["RequestCookies","ResponseCookies","ReflectAdapter","workAsyncStorage","ReadonlyRequestCookiesError","Error","constructor","callable","RequestCookiesAdapter","seal","cookies","Proxy","get","target","prop","receiver","SYMBOL_MODIFY_COOKIE_VALUES","Symbol","for","getModifiedCookieValues","modified","Array","isArray","length","appendMutableCookies","headers","mutableCookies","modifiedCookieValues","resCookies","returnedCookies","getAll","cookie","set","MutableRequestCookiesAdapter","wrap","onUpdateCookies","responseCookies","Headers","modifiedValues","modifiedCookies","Set","updateResponseCookies","workStore","getStore","pathWasRevalidated","allCookies","filter","c","has","name","serializedCookies","tempCookies","push","toString","wrappedCookies","args","add","delete","createCookiesWithMutableAccessCheck","requestStore","ensureCookiesAreStillMutable","areCookiesMutableInCurrentPhase","phase","_callingExpression","responseCookiesToRequestCookies","requestCookies"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAASA,cAAc,QAAQ,aAAY;AAG3C,SAASE,cAAc,QAAQ,YAAW;;AAC1C,SAASC,gBAAgB,QAAQ,kDAAiD;;;;;AAM3E,MAAMC,oCAAoCC;IAC/CC,aAAc;QACZ,KAAK,CACH;IAEJ;IAEA,OAAcC,WAAW;QACvB,MAAM,IAAIH;IACZ;AACF;AAcO,MAAMI;IACX,OAAcC,KAAKC,OAAuB,EAA0B;QAClE,OAAO,IAAIC,MAAMD,SAAgB;YAC/BE,KAAIC,MAAM,EAAEC,IAAI,EAAEC,QAAQ;gBACxB,OAAQD;oBACN,KAAK;oBACL,KAAK;oBACL,KAAK;wBACH,OAAOV,4BAA4BG,QAAQ;oBAC7C;wBACE,OAAOL,+RAAAA,CAAeU,GAAG,CAACC,QAAQC,MAAMC;gBAC5C;YACF;QACF;IACF;AACF;AAEA,MAAMC,8BAA8BC,OAAOC,GAAG,CAAC;AAExC,SAASC,wBACdT,OAAwB;IAExB,MAAMU,WAA0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,SAAU,GAAGC,IAAmB;wBACrCK,6BAA6BD,cAAc;wBAC3C9C,OAAOmB,GAAG,IAAIuB;wBACd,OAAOD;oBACT;gBAEF;oBACE,OAAOpD,+RAAAA,CAAeU,GAAG,CAACC,QAAQC,MAAMC;YAC5C;QACF;IACF;IACA,OAAOuC;AACT;AAEO,SAASO,gCAAgCF,YAA0B;IACxE,OAAOA,aAAaG,KAAK,KAAK;AAChC;AAEA;;;;;;GAMG,GACH,SAASF,6BACPD,YAA0B,EAC1BI,kBAA0B;IAE1B,IAAI,CAACF,gCAAgCF,eAAe;QAClD,mFAAmF;QACnF,MAAM,IAAIvD;IACZ;AACF;AAEO,SAAS4D,gCACd5B,eAAgC;IAEhC,MAAM6B,iBAAiB,IAAIjE,gRAAAA,CAAe,IAAIqC;IAC9C,KAAK,MAAMN,UAAUK,gBAAgBN,MAAM,GAAI;QAC7CmC,eAAejC,GAAG,CAACD;IACrB;IACA,OAAOkC;AACT","ignoreList":[0]}}, + {"offset": {"line": 2460, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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/* eslint-disable no-shadow */\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 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}\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 = [\n MiddlewareSpan.execute,\n BaseServerSpan.handleRequest,\n RenderSpan.getServerSideProps,\n RenderSpan.getStaticProps,\n AppRenderSpan.fetch,\n AppRenderSpan.getBodyResult,\n RenderSpan.renderDocument,\n NodeSpan.runHandler,\n AppRouteRouteHandlersSpan.runHandler,\n ResolveMetadataSpan.generateMetadata,\n ResolveMetadataSpan.generateViewport,\n NextNodeServerSpan.createComponentTree,\n NextNodeServerSpan.findPageComponents,\n NextNodeServerSpan.getLayoutOrPageModule,\n NextNodeServerSpan.startResponse,\n NextNodeServerSpan.clientComponentLoading,\n]\n\n// These Spans are allowed to be always logged\n// when the otel log prefix env is set\nexport const LogSpanAllowList = [\n NextNodeServerSpan.findPageComponents,\n NextNodeServerSpan.createComponentTree,\n NextNodeServerSpan.clientComponentLoading,\n]\n\nexport {\n BaseServerSpan,\n LoadComponentsSpan,\n NextServerSpan,\n NextNodeServerSpan,\n StartServerSpan,\n RenderSpan,\n RouterSpan,\n AppRenderSpan,\n NodeSpan,\n AppRouteRouteHandlersSpan,\n ResolveMetadataSpan,\n MiddlewareSpan,\n}\n\nexport type { SpanTypes }\n"],"names":["BaseServerSpan","LoadComponentsSpan","NextServerSpan","NextNodeServerSpan","StartServerSpan","RenderSpan","AppRenderSpan","RouterSpan","NodeSpan","AppRouteRouteHandlersSpan","ResolveMetadataSpan","MiddlewareSpan","NextVanillaSpanAllowlist","LogSpanAllowList"],"mappings":"AAAA;;;;;EAKE,GAEF,4CAA4C;AAC5C,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE5B,IAAKA,iBAAAA,WAAAA,GAAAA,SAAAA,cAAAA;;;;;;;;;;;;;WAAAA;EAAAA,kBAAAA,CAAAA;AAeL,IAAKC,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;WAAAA;EAAAA,sBAAAA,CAAAA;AAKL,IAAKC,iBAAAA,WAAAA,GAAAA,SAAAA,cAAAA;;;;;WAAAA;EAAAA,kBAAAA,CAAAA;AAOL,IAAKC,qBAAAA,WAAAA,GAAAA,SAAAA,kBAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BH,wDAAwD;;;;;WA5BrDA;EAAAA,sBAAAA,CAAAA;AAmCL,IAAKC,kBAAAA,WAAAA,GAAAA,SAAAA,eAAAA;;WAAAA;EAAAA,mBAAAA,CAAAA;AAIL,IAAKC,aAAAA,WAAAA,GAAAA,SAAAA,UAAAA;;;;;;WAAAA;EAAAA,cAAAA,CAAAA;AAQL,IAAKC,gBAAAA,WAAAA,GAAAA,SAAAA,aAAAA;;;;;WAAAA;EAAAA,iBAAAA,CAAAA;AAOL,IAAKC,aAAAA,WAAAA,GAAAA,SAAAA,UAAAA;;WAAAA;EAAAA,cAAAA,CAAAA;AAIL,IAAKC,WAAAA,WAAAA,GAAAA,SAAAA,QAAAA;;WAAAA;EAAAA,YAAAA,CAAAA;AAIL,IAAKC,4BAAAA,WAAAA,GAAAA,SAAAA,yBAAAA;;WAAAA;EAAAA,6BAAAA,CAAAA;AAIL,IAAKC,sBAAAA,WAAAA,GAAAA,SAAAA,mBAAAA;;;WAAAA;EAAAA,uBAAAA,CAAAA;AAKL,IAAKC,iBAAAA,WAAAA,GAAAA,SAAAA,cAAAA;;WAAAA;EAAAA,kBAAAA,CAAAA;AAmBE,MAAMC,2BAA2B;;;;;;;;;;;;;;;;;CAiBvC,CAAA;AAIM,MAAMC,mBAAmB;;;;CAI/B,CAAA","ignoreList":[0]}}, + {"offset": {"line": 2626, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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(\n promise: Promise | T\n): promise is Promise {\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": 2641, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/@opentelemetry/api/index.js"],"sourcesContent":["(()=>{\"use strict\";var e={491:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ContextAPI=void 0;const n=r(223);const a=r(172);const o=r(930);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},930:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagAPI=void 0;const n=r(56);const a=r(912);const o=r(957);const i=r(172);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:\"\";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},653:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.MetricsAPI=void 0;const n=r(660);const a=r(172);const o=r(930);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},181:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.PropagationAPI=void 0;const n=r(172);const a=r(874);const o=r(194);const i=r(277);const c=r(369);const s=r(930);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},997:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceAPI=void 0;const n=r(172);const a=r(846);const o=r(139);const i=r(607);const c=r(930);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},277:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;const n=r(491);const a=r(780);const o=(0,a.createContextKey)(\"OpenTelemetry Baggage Key\");function getBaggage(e){return e.getValue(o)||undefined}t.getBaggage=getBaggage;function getActiveBaggage(){return getBaggage(n.ContextAPI.getInstance().active())}t.getActiveBaggage=getActiveBaggage;function setBaggage(e,t){return e.setValue(o,t)}t.setBaggage=setBaggage;function deleteBaggage(e){return e.deleteValue(o)}t.deleteBaggage=deleteBaggage},993:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.BaggageImpl=void 0;class BaggageImpl{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const t=this._entries.get(e);if(!t){return undefined}return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map((([e,t])=>[e,t]))}setEntry(e,t){const r=new BaggageImpl(this._entries);r._entries.set(e,t);return r}removeEntry(e){const t=new BaggageImpl(this._entries);t._entries.delete(e);return t}removeEntries(...e){const t=new BaggageImpl(this._entries);for(const r of e){t._entries.delete(r)}return t}clear(){return new BaggageImpl}}t.BaggageImpl=BaggageImpl},830:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataSymbol=void 0;t.baggageEntryMetadataSymbol=Symbol(\"BaggageEntryMetadata\")},369:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.baggageEntryMetadataFromString=t.createBaggage=void 0;const n=r(930);const a=r(993);const o=r(830);const i=n.DiagAPI.instance();function createBaggage(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))}t.createBaggage=createBaggage;function baggageEntryMetadataFromString(e){if(typeof e!==\"string\"){i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`);e=\"\"}return{__TYPE__:o.baggageEntryMetadataSymbol,toString(){return e}}}t.baggageEntryMetadataFromString=baggageEntryMetadataFromString},67:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.context=void 0;const n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopContextManager=void 0;const n=r(780);class NoopContextManager{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=NoopContextManager},780:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ROOT_CONTEXT=t.createContextKey=void 0;function createContextKey(e){return Symbol.for(e)}t.createContextKey=createContextKey;class BaseContext{constructor(e){const t=this;t._currentContext=e?new Map(e):new Map;t.getValue=e=>t._currentContext.get(e);t.setValue=(e,r)=>{const n=new BaseContext(t._currentContext);n._currentContext.set(e,r);return n};t.deleteValue=e=>{const r=new BaseContext(t._currentContext);r._currentContext.delete(e);return r}}}t.ROOT_CONTEXT=new BaseContext},506:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.diag=void 0;const n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagComponentLogger=void 0;const n=r(172);class DiagComponentLogger{constructor(e){this._namespace=e.namespace||\"DiagComponentLogger\"}debug(...e){return logProxy(\"debug\",this._namespace,e)}error(...e){return logProxy(\"error\",this._namespace,e)}info(...e){return logProxy(\"info\",this._namespace,e)}warn(...e){return logProxy(\"warn\",this._namespace,e)}verbose(...e){return logProxy(\"verbose\",this._namespace,e)}}t.DiagComponentLogger=DiagComponentLogger;function logProxy(e,t,r){const a=(0,n.getGlobal)(\"diag\");if(!a){return}r.unshift(t);return a[e](...r)}},972:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagConsoleLogger=void 0;const r=[{n:\"error\",c:\"error\"},{n:\"warn\",c:\"warn\"},{n:\"info\",c:\"info\"},{n:\"debug\",c:\"debug\"},{n:\"verbose\",c:\"trace\"}];class DiagConsoleLogger{constructor(){function _consoleFunc(e){return function(...t){if(console){let r=console[e];if(typeof r!==\"function\"){r=console.log}if(typeof r===\"function\"){return r.apply(console,t)}}}}for(let e=0;e{Object.defineProperty(t,\"__esModule\",{value:true});t.createLogLevelDiagLogger=void 0;const n=r(957);function createLogLevelDiagLogger(e,t){if(en.DiagLogLevel.ALL){e=n.DiagLogLevel.ALL}t=t||{};function _filterFunc(r,n){const a=t[r];if(typeof a===\"function\"&&e>=n){return a.bind(t)}return function(){}}return{error:_filterFunc(\"error\",n.DiagLogLevel.ERROR),warn:_filterFunc(\"warn\",n.DiagLogLevel.WARN),info:_filterFunc(\"info\",n.DiagLogLevel.INFO),debug:_filterFunc(\"debug\",n.DiagLogLevel.DEBUG),verbose:_filterFunc(\"verbose\",n.DiagLogLevel.VERBOSE)}}t.createLogLevelDiagLogger=createLogLevelDiagLogger},957:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.DiagLogLevel=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"ERROR\"]=30]=\"ERROR\";e[e[\"WARN\"]=50]=\"WARN\";e[e[\"INFO\"]=60]=\"INFO\";e[e[\"DEBUG\"]=70]=\"DEBUG\";e[e[\"VERBOSE\"]=80]=\"VERBOSE\";e[e[\"ALL\"]=9999]=\"ALL\"})(r=t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;const n=r(200);const a=r(521);const o=r(130);const i=a.VERSION.split(\".\")[0];const c=Symbol.for(`opentelemetry.js.api.${i}`);const s=n._globalThis;function registerGlobal(e,t,r,n=false){var o;const i=s[c]=(o=s[c])!==null&&o!==void 0?o:{version:a.VERSION};if(!n&&i[e]){const t=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);r.error(t.stack||t.message);return false}if(i.version!==a.VERSION){const t=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);r.error(t.stack||t.message);return false}i[e]=t;r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`);return true}t.registerGlobal=registerGlobal;function getGlobal(e){var t,r;const n=(t=s[c])===null||t===void 0?void 0:t.version;if(!n||!(0,o.isCompatible)(n)){return}return(r=s[c])===null||r===void 0?void 0:r[e]}t.getGlobal=getGlobal;function unregisterGlobal(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);const r=s[c];if(r){delete r[e]}}t.unregisterGlobal=unregisterGlobal},130:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.isCompatible=t._makeCompatibilityCheck=void 0;const n=r(521);const a=/^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;function _makeCompatibilityCheck(e){const t=new Set([e]);const r=new Set;const n=e.match(a);if(!n){return()=>false}const o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null){return function isExactmatch(t){return t===e}}function _reject(e){r.add(e);return false}function _accept(e){t.add(e);return true}return function isCompatible(e){if(t.has(e)){return true}if(r.has(e)){return false}const n=e.match(a);if(!n){return _reject(e)}const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null){return _reject(e)}if(o.major!==i.major){return _reject(e)}if(o.major===0){if(o.minor===i.minor&&o.patch<=i.patch){return _accept(e)}return _reject(e)}if(o.minor<=i.minor){return _accept(e)}return _reject(e)}}t._makeCompatibilityCheck=_makeCompatibilityCheck;t.isCompatible=_makeCompatibilityCheck(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.metrics=void 0;const n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ValueType=void 0;var r;(function(e){e[e[\"INT\"]=0]=\"INT\";e[e[\"DOUBLE\"]=1]=\"DOUBLE\"})(r=t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class NoopMeter{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=NoopMeter;class NoopMetric{}t.NoopMetric=NoopMetric;class NoopCounterMetric extends NoopMetric{add(e,t){}}t.NoopCounterMetric=NoopCounterMetric;class NoopUpDownCounterMetric extends NoopMetric{add(e,t){}}t.NoopUpDownCounterMetric=NoopUpDownCounterMetric;class NoopHistogramMetric extends NoopMetric{record(e,t){}}t.NoopHistogramMetric=NoopHistogramMetric;class NoopObservableMetric{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=NoopObservableMetric;class NoopObservableCounterMetric extends NoopObservableMetric{}t.NoopObservableCounterMetric=NoopObservableCounterMetric;class NoopObservableGaugeMetric extends NoopObservableMetric{}t.NoopObservableGaugeMetric=NoopObservableGaugeMetric;class NoopObservableUpDownCounterMetric extends NoopObservableMetric{}t.NoopObservableUpDownCounterMetric=NoopObservableUpDownCounterMetric;t.NOOP_METER=new NoopMeter;t.NOOP_COUNTER_METRIC=new NoopCounterMetric;t.NOOP_HISTOGRAM_METRIC=new NoopHistogramMetric;t.NOOP_UP_DOWN_COUNTER_METRIC=new NoopUpDownCounterMetric;t.NOOP_OBSERVABLE_COUNTER_METRIC=new NoopObservableCounterMetric;t.NOOP_OBSERVABLE_GAUGE_METRIC=new NoopObservableGaugeMetric;t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new NoopObservableUpDownCounterMetric;function createNoopMeter(){return t.NOOP_METER}t.createNoopMeter=createNoopMeter},660:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;const n=r(102);class NoopMeterProvider{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=NoopMeterProvider;t.NOOP_METER_PROVIDER=new NoopMeterProvider},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t._globalThis=void 0;t._globalThis=typeof globalThis===\"object\"?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!==\"default\"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,\"__esModule\",{value:true});a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.propagation=void 0;const n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTextMapPropagator=void 0;class NoopTextMapPropagator{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=NoopTextMapPropagator},194:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.defaultTextMapSetter=t.defaultTextMapGetter=void 0;t.defaultTextMapGetter={get(e,t){if(e==null){return undefined}return e[t]},keys(e){if(e==null){return[]}return Object.keys(e)}};t.defaultTextMapSetter={set(e,t,r){if(e==null){return}e[t]=r}}},845:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.trace=void 0;const n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NonRecordingSpan=void 0;const n=r(476);class NonRecordingSpan{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return false}recordException(e,t){}}t.NonRecordingSpan=NonRecordingSpan},614:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracer=void 0;const n=r(491);const a=r(607);const o=r(403);const i=r(139);const c=n.ContextAPI.getInstance();class NoopTracer{startSpan(e,t,r=c.active()){const n=Boolean(t===null||t===void 0?void 0:t.root);if(n){return new o.NonRecordingSpan}const s=r&&(0,a.getSpanContext)(r);if(isSpanContext(s)&&(0,i.isSpanContextValid)(s)){return new o.NonRecordingSpan(s)}else{return new o.NonRecordingSpan}}startActiveSpan(e,t,r,n){let o;let i;let s;if(arguments.length<2){return}else if(arguments.length===2){s=t}else if(arguments.length===3){o=t;s=r}else{o=t;i=r;s=n}const u=i!==null&&i!==void 0?i:c.active();const l=this.startSpan(e,o,u);const g=(0,a.setSpan)(u,l);return c.with(g,s,undefined,l)}}t.NoopTracer=NoopTracer;function isSpanContext(e){return typeof e===\"object\"&&typeof e[\"spanId\"]===\"string\"&&typeof e[\"traceId\"]===\"string\"&&typeof e[\"traceFlags\"]===\"number\"}},124:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.NoopTracerProvider=void 0;const n=r(614);class NoopTracerProvider{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=NoopTracerProvider},125:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracer=void 0;const n=r(614);const a=new n.NoopTracer;class ProxyTracer{constructor(e,t,r,n){this._provider=e;this.name=t;this.version=r;this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){const a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate){return this._delegate}const e=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!e){return a}this._delegate=e;return this._delegate}}t.ProxyTracer=ProxyTracer},846:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.ProxyTracerProvider=void 0;const n=r(125);const a=r(124);const o=new a.NoopTracerProvider;class ProxyTracerProvider{getTracer(e,t,r){var a;return(a=this.getDelegateTracer(e,t,r))!==null&&a!==void 0?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:o}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=ProxyTracerProvider},996:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SamplingDecision=void 0;var r;(function(e){e[e[\"NOT_RECORD\"]=0]=\"NOT_RECORD\";e[e[\"RECORD\"]=1]=\"RECORD\";e[e[\"RECORD_AND_SAMPLED\"]=2]=\"RECORD_AND_SAMPLED\"})(r=t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;const n=r(780);const a=r(403);const o=r(491);const i=(0,n.createContextKey)(\"OpenTelemetry Context Key SPAN\");function getSpan(e){return e.getValue(i)||undefined}t.getSpan=getSpan;function getActiveSpan(){return getSpan(o.ContextAPI.getInstance().active())}t.getActiveSpan=getActiveSpan;function setSpan(e,t){return e.setValue(i,t)}t.setSpan=setSpan;function deleteSpan(e){return e.deleteValue(i)}t.deleteSpan=deleteSpan;function setSpanContext(e,t){return setSpan(e,new a.NonRecordingSpan(t))}t.setSpanContext=setSpanContext;function getSpanContext(e){var t;return(t=getSpan(e))===null||t===void 0?void 0:t.spanContext()}t.getSpanContext=getSpanContext},325:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceStateImpl=void 0;const n=r(564);const a=32;const o=512;const i=\",\";const c=\"=\";class TraceStateImpl{constructor(e){this._internalState=new Map;if(e)this._parse(e)}set(e,t){const r=this._clone();if(r._internalState.has(e)){r._internalState.delete(e)}r._internalState.set(e,t);return r}unset(e){const t=this._clone();t._internalState.delete(e);return t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>{e.push(t+c+this.get(t));return e}),[]).join(i)}_parse(e){if(e.length>o)return;this._internalState=e.split(i).reverse().reduce(((e,t)=>{const r=t.trim();const a=r.indexOf(c);if(a!==-1){const o=r.slice(0,a);const i=r.slice(a+1,t.length);if((0,n.validateKey)(o)&&(0,n.validateValue)(i)){e.set(o,i)}else{}}return e}),new Map);if(this._internalState.size>a){this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,a))}}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const e=new TraceStateImpl;e._internalState=new Map(this._internalState);return e}}t.TraceStateImpl=TraceStateImpl},564:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.validateValue=t.validateKey=void 0;const r=\"[_0-9a-z-*/]\";const n=`[a-z]${r}{0,255}`;const a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`;const o=new RegExp(`^(?:${n}|${a})$`);const i=/^[ -~]{0,255}[!-~]$/;const c=/,|=/;function validateKey(e){return o.test(e)}t.validateKey=validateKey;function validateValue(e){return i.test(e)&&!c.test(e)}t.validateValue=validateValue},98:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.createTraceState=void 0;const n=r(325);function createTraceState(e){return new n.TraceStateImpl(e)}t.createTraceState=createTraceState},476:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;const n=r(475);t.INVALID_SPANID=\"0000000000000000\";t.INVALID_TRACEID=\"00000000000000000000000000000000\";t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanKind=void 0;var r;(function(e){e[e[\"INTERNAL\"]=0]=\"INTERNAL\";e[e[\"SERVER\"]=1]=\"SERVER\";e[e[\"CLIENT\"]=2]=\"CLIENT\";e[e[\"PRODUCER\"]=3]=\"PRODUCER\";e[e[\"CONSUMER\"]=4]=\"CONSUMER\"})(r=t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;const n=r(476);const a=r(403);const o=/^([0-9a-f]{32})$/i;const i=/^[0-9a-f]{16}$/i;function isValidTraceId(e){return o.test(e)&&e!==n.INVALID_TRACEID}t.isValidTraceId=isValidTraceId;function isValidSpanId(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidSpanId=isValidSpanId;function isSpanContextValid(e){return isValidTraceId(e.traceId)&&isValidSpanId(e.spanId)}t.isSpanContextValid=isSpanContextValid;function wrapSpanContext(e){return new a.NonRecordingSpan(e)}t.wrapSpanContext=wrapSpanContext},847:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.SpanStatusCode=void 0;var r;(function(e){e[e[\"UNSET\"]=0]=\"UNSET\";e[e[\"OK\"]=1]=\"OK\";e[e[\"ERROR\"]=2]=\"ERROR\"})(r=t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.TraceFlags=void 0;var r;(function(e){e[e[\"NONE\"]=0]=\"NONE\";e[e[\"SAMPLED\"]=1]=\"SAMPLED\"})(r=t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});t.VERSION=void 0;t.VERSION=\"1.6.0\"}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var a=t[r]={exports:{}};var o=true;try{e[r].call(a.exports,a,a.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var r={};(()=>{var e=r;Object.defineProperty(e,\"__esModule\",{value:true});e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=__nccwpck_require__(369);Object.defineProperty(e,\"baggageEntryMetadataFromString\",{enumerable:true,get:function(){return t.baggageEntryMetadataFromString}});var n=__nccwpck_require__(780);Object.defineProperty(e,\"createContextKey\",{enumerable:true,get:function(){return n.createContextKey}});Object.defineProperty(e,\"ROOT_CONTEXT\",{enumerable:true,get:function(){return n.ROOT_CONTEXT}});var a=__nccwpck_require__(972);Object.defineProperty(e,\"DiagConsoleLogger\",{enumerable:true,get:function(){return a.DiagConsoleLogger}});var o=__nccwpck_require__(957);Object.defineProperty(e,\"DiagLogLevel\",{enumerable:true,get:function(){return o.DiagLogLevel}});var i=__nccwpck_require__(102);Object.defineProperty(e,\"createNoopMeter\",{enumerable:true,get:function(){return i.createNoopMeter}});var c=__nccwpck_require__(901);Object.defineProperty(e,\"ValueType\",{enumerable:true,get:function(){return c.ValueType}});var s=__nccwpck_require__(194);Object.defineProperty(e,\"defaultTextMapGetter\",{enumerable:true,get:function(){return s.defaultTextMapGetter}});Object.defineProperty(e,\"defaultTextMapSetter\",{enumerable:true,get:function(){return s.defaultTextMapSetter}});var u=__nccwpck_require__(125);Object.defineProperty(e,\"ProxyTracer\",{enumerable:true,get:function(){return u.ProxyTracer}});var l=__nccwpck_require__(846);Object.defineProperty(e,\"ProxyTracerProvider\",{enumerable:true,get:function(){return l.ProxyTracerProvider}});var g=__nccwpck_require__(996);Object.defineProperty(e,\"SamplingDecision\",{enumerable:true,get:function(){return g.SamplingDecision}});var p=__nccwpck_require__(357);Object.defineProperty(e,\"SpanKind\",{enumerable:true,get:function(){return p.SpanKind}});var d=__nccwpck_require__(847);Object.defineProperty(e,\"SpanStatusCode\",{enumerable:true,get:function(){return d.SpanStatusCode}});var _=__nccwpck_require__(475);Object.defineProperty(e,\"TraceFlags\",{enumerable:true,get:function(){return _.TraceFlags}});var f=__nccwpck_require__(98);Object.defineProperty(e,\"createTraceState\",{enumerable:true,get:function(){return f.createTraceState}});var b=__nccwpck_require__(139);Object.defineProperty(e,\"isSpanContextValid\",{enumerable:true,get:function(){return b.isSpanContextValid}});Object.defineProperty(e,\"isValidTraceId\",{enumerable:true,get:function(){return b.isValidTraceId}});Object.defineProperty(e,\"isValidSpanId\",{enumerable:true,get:function(){return b.isValidSpanId}});var v=__nccwpck_require__(476);Object.defineProperty(e,\"INVALID_SPANID\",{enumerable:true,get:function(){return v.INVALID_SPANID}});Object.defineProperty(e,\"INVALID_TRACEID\",{enumerable:true,get:function(){return v.INVALID_TRACEID}});Object.defineProperty(e,\"INVALID_SPAN_CONTEXT\",{enumerable:true,get:function(){return v.INVALID_SPAN_CONTEXT}});const O=__nccwpck_require__(67);Object.defineProperty(e,\"context\",{enumerable:true,get:function(){return O.context}});const P=__nccwpck_require__(506);Object.defineProperty(e,\"diag\",{enumerable:true,get:function(){return P.diag}});const N=__nccwpck_require__(886);Object.defineProperty(e,\"metrics\",{enumerable:true,get:function(){return N.metrics}});const S=__nccwpck_require__(939);Object.defineProperty(e,\"propagation\",{enumerable:true,get:function(){return S.propagation}});const C=__nccwpck_require__(845);Object.defineProperty(e,\"trace\",{enumerable:true,get:function(){return C.trace}});e[\"default\"]={context:O.context,diag:P.diag,metrics:N.metrics,propagation:S.propagation,trace:C.trace}})();module.exports=r})();"],"names":[],"mappings":"AAAA,CAAC;IAAK;IAAa,IAAI,IAAE;QAAC,KAAI,CAAC,GAAE,GAAE;YAAK,OAAO,cAAc,CAAC,GAAE,cAAa;gBAAC,OAAM;YAAI;YAAG,EAAE,UAAU,GAAC,KAAK;YAAE,MAAM,IAAE,EAAE;YAAK,MAAM,IAAE,EAAE;YAAK,MAAM,IAAE,EAAE;YAAK,MAAM,IAAE;YAAU,MAAM,IAAE,IAAI,EAAE,kBAAkB;YAAC,MAAM;gBAAW,aAAa,CAAC;gBAAC,OAAO,cAAa;oBAAC,IAAG,CAAC,IAAI,CAAC,SAAS,EAAC;wBAAC,IAAI,CAAC,SAA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C;QAAG,MAAM,IAAE,oBAAoB;QAAK,OAAO,cAAc,CAAC,GAAE,SAAQ;YAAC,YAAW;YAAK,KAAI;gBAAW,OAAO,EAAE,KAAK;YAAA;QAAC;QAAG,CAAC,CAAC,UAAU,GAAC;YAAC,SAAQ,EAAE,OAAO;YAAC,MAAK,EAAE,IAAI;YAAC,SAAQ,EAAE,OAAO;YAAC,aAAY,EAAE,WAAW;YAAC,OAAM,EAAE,KAAK;QAAA;IAAC,CAAC;IAAI,OAAO,OAAO,GAAC;AAAC,CAAC","ignoreList":[0]}}, + {"offset": {"line": 4127, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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 { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants'\n\nimport type {\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\nlet api: typeof import('next/dist/compiled/@opentelemetry/api')\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 & {\n parentSpan?: Span\n spanName?: string\n attributes?: Partial>\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(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise\n ): Promise\n trace(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => T\n ): T\n trace(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise\n ): Promise\n trace(\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) => any>(type: SpanTypes, fn: T): T\n wrap) => any>(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: T\n ): T\n wrap) => any>(\n type: SpanTypes,\n options: (...args: any[]) => TracerSpanOptions,\n fn: T\n ): T\n\n /**\n * Starts and returns a new Span representing a logical unit of work.\n *\n * This method do NOT modify the current Context by default. In result, any inner span will not\n * automatically set its parent context to the span created by this method unless manually activate\n * context via `tracer.getContext().with`. `trace`, or `wrap` is generally recommended as it gracefully\n * handles context activation. (ref: https://github.com/open-telemetry/opentelemetry-js/issues/1923)\n */\n startSpan(type: SpanTypes): Span\n startSpan(type: SpanTypes, options: TracerSpanOptions): Span\n\n /**\n * Returns currently activated span if current context is in the scope of the span.\n * Returns undefined otherwise.\n */\n getActiveScopeSpan(): Span | undefined\n\n /**\n * Returns trace propagation data for the currently active context. The format is equal to data provided\n * through the OpenTelemetry propagator API.\n */\n getTracePropagationData(): ClientTraceDataEntry[]\n}\n\ntype NextAttributeNames =\n | 'next.route'\n | 'next.page'\n | 'next.rsc'\n | 'next.segment'\n | 'next.span_name'\n | 'next.span_type'\n | 'next.clientComponentLoadCount'\ntype OTELAttributeNames = `http.${string}` | `net.${string}`\ntype AttributeNames = NextAttributeNames | OTELAttributeNames\n\n/** we use this map to propagate attributes from nested spans to the top span */\nconst rootSpanAttributesStore = new Map<\n number,\n Map\n>()\nconst rootSpanIdKey = api.createContextKey('next.rootSpanId')\nlet lastSpanId = 0\nconst getSpanId = () => lastSpanId++\n\nexport interface ClientTraceDataEntry {\n key: string\n value: string\n}\n\nconst clientTraceDataSetter: TextMapSetter = {\n set(carrier, key, value) {\n carrier.push({\n key,\n value,\n })\n },\n}\n\nclass NextTracerImpl implements NextTracer {\n /**\n * Returns an instance to the trace with configured name.\n * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization,\n * This should be lazily evaluated.\n */\n private getTracerInstance(): Tracer {\n return trace.getTracer('next.js', '0.0.1')\n }\n\n public getContext(): ContextAPI {\n return context\n }\n\n public getTracePropagationData(): ClientTraceDataEntry[] {\n const activeContext = context.active()\n const entries: ClientTraceDataEntry[] = []\n propagation.inject(activeContext, entries, clientTraceDataSetter)\n return entries\n }\n\n public getActiveScopeSpan(): Span | undefined {\n return trace.getSpan(context?.active())\n }\n\n public withPropagatedContext(\n carrier: C,\n fn: () => T,\n getter?: TextMapGetter\n ): T {\n const activeContext = context.active()\n if (trace.getSpanContext(activeContext)) {\n // Active span is already set, too late to propagate.\n return fn()\n }\n const remoteContext = propagation.extract(activeContext, carrier, getter)\n return context.with(remoteContext, fn)\n }\n\n // Trace, wrap implementation is inspired by datadog trace implementation\n // (https://datadoghq.dev/dd-trace-js/interfaces/tracer.html#trace).\n public trace(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise\n ): Promise\n public trace(\n type: SpanTypes,\n fn: (span?: Span, done?: (error?: Error) => any) => T\n ): T\n public trace(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: (span?: Span, done?: (error?: Error) => any) => Promise\n ): Promise\n public trace(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: (span?: Span, done?: (error?: Error) => any) => T\n ): T\n public trace(...args: Array) {\n const [type, fnOrOptions, fnOrEmpty] = args\n\n // coerce options form overload\n const {\n fn,\n options,\n }: {\n fn: (span?: Span, done?: (error?: Error) => any) => T | Promise\n options: TracerSpanOptions\n } =\n typeof fnOrOptions === 'function'\n ? {\n fn: fnOrOptions,\n options: {},\n }\n : {\n fn: fnOrEmpty,\n options: { ...fnOrOptions },\n }\n\n const spanName = options.spanName ?? type\n\n if (\n (!NextVanillaSpanAllowlist.includes(type) &&\n process.env.NEXT_OTEL_VERBOSE !== '1') ||\n options.hideSpan\n ) {\n return fn()\n }\n\n // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it.\n let spanContext = this.getSpanContext(\n options?.parentSpan ?? this.getActiveScopeSpan()\n )\n let isRootSpan = false\n\n if (!spanContext) {\n spanContext = context?.active() ?? ROOT_CONTEXT\n isRootSpan = true\n } else if (trace.getSpanContext(spanContext)?.isRemote) {\n isRootSpan = true\n }\n\n const spanId = getSpanId()\n\n options.attributes = {\n 'next.span_name': spanName,\n 'next.span_type': type,\n ...options.attributes,\n }\n\n return context.with(spanContext.setValue(rootSpanIdKey, spanId), () =>\n this.getTracerInstance().startActiveSpan(\n spanName,\n options,\n (span: Span) => {\n const startTime =\n 'performance' in globalThis && 'measure' in performance\n ? globalThis.performance.now()\n : undefined\n\n const onCleanup = () => {\n rootSpanAttributesStore.delete(spanId)\n if (\n startTime &&\n process.env.NEXT_OTEL_PERFORMANCE_PREFIX &&\n LogSpanAllowList.includes(type || ('' as any))\n ) {\n performance.measure(\n `${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(\n type.split('.').pop() || ''\n ).replace(\n /[A-Z]/g,\n (match: string) => '-' + match.toLowerCase()\n )}`,\n {\n start: startTime,\n end: performance.now(),\n }\n )\n }\n }\n\n if (isRootSpan) {\n rootSpanAttributesStore.set(\n spanId,\n new Map(\n Object.entries(options.attributes ?? {}) as [\n AttributeNames,\n AttributeValue | undefined,\n ][]\n )\n )\n }\n try {\n if (fn.length > 1) {\n return fn(span, (err) => closeSpanWithError(span, err))\n }\n\n const result = fn(span)\n if (isThenable(result)) {\n // If there's error make sure it throws\n return result\n .then((res) => {\n span.end()\n // Need to pass down the promise result,\n // it could be react stream response with error { error, stream }\n return res\n })\n .catch((err) => {\n closeSpanWithError(span, err)\n throw err\n })\n .finally(onCleanup)\n } else {\n span.end()\n onCleanup()\n }\n\n return result\n } catch (err: any) {\n closeSpanWithError(span, err)\n onCleanup()\n throw err\n }\n }\n )\n )\n }\n\n public wrap) => any>(type: SpanTypes, fn: T): T\n public wrap) => any>(\n type: SpanTypes,\n options: TracerSpanOptions,\n fn: T\n ): T\n public wrap) => any>(\n type: SpanTypes,\n options: (...args: any[]) => TracerSpanOptions,\n fn: T\n ): T\n public wrap(...args: Array) {\n const tracer = this\n const [name, options, fn] =\n args.length === 3 ? args : [args[0], {}, args[1]]\n\n if (\n !NextVanillaSpanAllowlist.includes(name) &&\n process.env.NEXT_OTEL_VERBOSE !== '1'\n ) {\n return fn\n }\n\n return function (this: any) {\n let optionsObj = options\n if (typeof optionsObj === 'function' && typeof fn === 'function') {\n optionsObj = optionsObj.apply(this, arguments)\n }\n\n const lastArgId = arguments.length - 1\n const cb = arguments[lastArgId]\n\n if (typeof cb === 'function') {\n const scopeBoundCb = tracer.getContext().bind(context.active(), cb)\n return tracer.trace(name, optionsObj, (_span, done) => {\n arguments[lastArgId] = function (err: any) {\n done?.(err)\n return scopeBoundCb.apply(this, arguments)\n }\n\n return fn.apply(this, arguments)\n })\n } else {\n return tracer.trace(name, optionsObj, () => fn.apply(this, arguments))\n }\n }\n }\n\n public startSpan(type: SpanTypes): Span\n public startSpan(type: SpanTypes, options: TracerSpanOptions): Span\n public startSpan(...args: Array): Span {\n const [type, options]: [string, TracerSpanOptions | undefined] = args as any\n\n const spanContext = this.getSpanContext(\n options?.parentSpan ?? this.getActiveScopeSpan()\n )\n return this.getTracerInstance().startSpan(type, options, spanContext)\n }\n\n private getSpanContext(parentSpan?: Span) {\n const spanContext = parentSpan\n ? trace.setSpan(context.active(), parentSpan)\n : undefined\n\n return spanContext\n }\n\n public getRootSpanAttributes() {\n const spanId = context.active().getValue(rootSpanIdKey) as number\n return rootSpanAttributesStore.get(spanId)\n }\n\n public setRootSpanAttribute(key: AttributeNames, value: AttributeValue) {\n const spanId = context.active().getValue(rootSpanIdKey) as number\n const attributes = rootSpanAttributesStore.get(spanId)\n if (attributes) {\n attributes.set(key, value)\n }\n }\n}\n\nconst getTracer = (() => {\n const tracer = new NextTracerImpl()\n\n return () => tracer\n})()\n\nexport { getTracer, SpanStatusCode, SpanKind }\nexport type { NextTracer, Span, SpanOptions, ContextAPI, TracerSpanOptions }\n"],"names":["LogSpanAllowList","NextVanillaSpanAllowlist","isThenable","api","process","env","NEXT_RUNTIME","require","err","context","propagation","trace","SpanStatusCode","SpanKind","ROOT_CONTEXT","BubbledError","Error","constructor","bubble","result","isBubbledError","error","closeSpanWithError","span","setAttribute","recordException","name","setStatus","code","ERROR","message","end","rootSpanAttributesStore","Map","rootSpanIdKey","createContextKey","lastSpanId","getSpanId","clientTraceDataSetter","set","carrier","key","value","push","NextTracerImpl","getTracerInstance","getTracer","getContext","getTracePropagationData","activeContext","active","entries","inject","getActiveScopeSpan","getSpan","withPropagatedContext","fn","getter","getSpanContext","remoteContext","extract","with","args","type","fnOrOptions","fnOrEmpty","options","spanName","includes","NEXT_OTEL_VERBOSE","hideSpan","spanContext","parentSpan","isRootSpan","isRemote","spanId","attributes","setValue","startActiveSpan","startTime","globalThis","performance","now","undefined","onCleanup","delete","NEXT_OTEL_PERFORMANCE_PREFIX","measure","split","pop","replace","match","toLowerCase","start","Object","length","then","res","catch","finally","wrap","tracer","optionsObj","apply","arguments","lastArgId","cb","scopeBoundCb","bind","_span","done","startSpan","setSpan","getRootSpanAttributes","getValue","get","setRootSpanAttribute"],"mappings":";;;;;;;;;;;;AAGA,SAASA,gBAAgB,EAAEC,wBAAwB,QAAQ,cAAa;AAUxE,SAASC,UAAU,QAAQ,kCAAiC;;;AAE5D,IAAIC;AAEJ,gFAAgF;AAChF,8EAA8E;AAC9E,uCAAuC;AACvC,0EAA0E;AAC1E,+EAA+E;AAC/E,4CAA4C;AAC5C,6CAA6C;AAC7C,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,OAAQ;IACvCH,MAAMI,QAAQ;AAChB,OAAO;;AASP,MAAM,EAAEE,OAAO,EAAEC,WAAW,EAAEC,KAAK,EAAEC,cAAc,EAAEC,QAAQ,EAAEC,YAAY,EAAE,GAC3EX;AAEK,MAAMY,qBAAqBC;IAChCC,YACkBC,MAAgB,EAChBC,MAAyB,CACzC;QACA,KAAK,IAAA,IAAA,CAHWD,MAAAA,GAAAA,QAAAA,IAAAA,CACAC,MAAAA,GAAAA;IAGlB;AACF;AAEO,SAASC,eAAeC,KAAc;IAC3C,IAAI,OAAOA,UAAU,YAAYA,UAAU,MAAM,OAAO;IACxD,OAAOA,iBAAiBN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AAChD,MAAMG,SAASK;IAC3D;IAEQb,eAAec,UAAiB,EAAE;QACxC,MAAMD,cAAcC,aAChB7D,MAAMqG,OAAO,CAACvG,QAAQyC,MAAM,IAAIsB,cAChCW;QAEJ,OAAOZ;IACT;IAEO0C,wBAAwB;QAC7B,MAAMtC,SAASlE,QAAQyC,MAAM,GAAGgE,QAAQ,CAAChF;QACzC,OAAOF,wBAAwBmF,GAAG,CAACxC;IACrC;IAEOyC,qBAAqB3E,GAAmB,EAAEC,KAAqB,EAAE;QACtE,MAAMiC,SAASlE,QAAQyC,MAAM,GAAGgE,QAAQ,CAAChF;QACzC,MAAM0C,aAAa5C,wBAAwBmF,GAAG,CAACxC;QAC/C,IAAIC,YAAY;YACdA,WAAWrC,GAAG,CAACE,KAAKC;QACtB;IACF;AACF;AAEA,MAAMI,YAAa,CAAA;IACjB,MAAMuD,SAAS,IAAIzD;IAEnB,OAAO,IAAMyD;AACf,CAAA","ignoreList":[0]}}, + {"offset": {"line": 4356, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/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\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 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 {\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 {\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 req: Request | IncomingMessage | BaseNextRequest,\n previewProps: __ApiPreviewProps\n): {\n isOnDemandRevalidate: boolean\n revalidateOnlyGenerated: boolean\n} {\n const headers = HeadersAdapter.from(req.headers)\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\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(\n res: NextApiResponse,\n options: {\n path?: string\n } = {}\n): NextApiResponse {\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 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 ])\n\n Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, {\n value: true,\n enumerable: false,\n })\n return res\n}\n\n/**\n * Custom error class\n */\nexport class ApiError extends Error {\n readonly statusCode: number\n\n constructor(statusCode: number, message: string) {\n super(message)\n this.statusCode = statusCode\n }\n}\n\n/**\n * Sends error in `response`\n * @param res response object\n * @param statusCode of response\n * @param message of response\n */\nexport function sendError(\n res: NextApiResponse,\n statusCode: number,\n message: string\n): void {\n res.statusCode = statusCode\n res.statusMessage = message\n res.end(message)\n}\n\ninterface LazyProps {\n req: IncomingMessage\n}\n\n/**\n * Execute getter function only if its needed\n * @param LazyProps `req` and `params` for lazyProp\n * @param prop name of property\n * @param getter function to get data\n */\nexport function setLazyProp(\n { req }: LazyProps,\n prop: string,\n getter: () => T\n): void {\n const opts = { configurable: true, enumerable: true }\n const optsReset = { ...opts, writable: true }\n\n Object.defineProperty(req, prop, {\n ...opts,\n get: () => {\n const value = getter()\n // we set the property on the object to avoid recalculating it\n Object.defineProperty(req, prop, { ...optsReset, value })\n return value\n },\n set: (value) => {\n Object.defineProperty(req, prop, { ...optsReset, value })\n },\n })\n}\n"],"names":["HeadersAdapter","PRERENDER_REVALIDATE_HEADER","PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER","getTracer","NodeSpan","wrapApiHandler","page","handler","args","setRootSpanAttribute","trace","runHandler","spanName","sendStatusCode","res","statusCode","redirect","statusOrUrl","url","Error","writeHead","Location","write","end","checkIsOnDemandRevalidate","req","previewProps","headers","from","previewModeId","get","isOnDemandRevalidate","revalidateOnlyGenerated","has","COOKIE_NAME_PRERENDER_BYPASS","COOKIE_NAME_PRERENDER_DATA","RESPONSE_LIMIT_DEFAULT","SYMBOL_PREVIEW_DATA","Symbol","SYMBOL_CLEARED_COOKIES","clearPreviewData","options","serialize","require","previous","getHeader","setHeader","Array","isArray","expires","Date","httpOnly","sameSite","process","env","NODE_ENV","secure","path","undefined","Object","defineProperty","value","enumerable","ApiError","constructor","message","sendError","statusMessage","setLazyProp","prop","getter","opts","configurable","optsReset","writable","set"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,SAASA,cAAc,QAAQ,yCAAwC;AACvE,SACEC,2BAA2B,EAC3BC,0CAA0C,QACrC,sBAAqB;AAC5B,SAASC,SAAS,QAAQ,sBAAqB;AAC/C,SAASC,QAAQ,QAAQ,yBAAwB;;;;;AAW1C,SAASC,eACdC,IAAY,EACZC,OAAU;IAEV,OAAQ,CAAC,GAAGC;YACVL,i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,EAClBkD,OAAe;IAEfnD,IAAIC,UAAU,GAAGA;IACjBD,IAAIqD,aAAa,GAAGF;IACpBnD,IAAIS,GAAG,CAAC0C;AACV;AAYO,SAASG,YACd,EAAE3C,GAAG,EAAa,EAClB4C,IAAY,EACZC,MAAe;IAEf,MAAMC,OAAO;QAAEC,cAAc;QAAMV,YAAY;IAAK;IACpD,MAAMW,YAAY;QAAE,GAAGF,IAAI;QAAEG,UAAU;IAAK;IAE5Cf,OAAOC,cAAc,CAACnC,KAAK4C,MAAM;QAC/B,GAAGE,IAAI;QACPzC,KAAK;YACH,MAAM+B,QAAQS;YACd,8DAA8D;YAC9DX,OAAOC,cAAc,CAACnC,KAAK4C,MAAM;gBAAE,GAAGI,SAAS;gBAAEZ;YAAM;YACvD,OAAOA;QACT;QACAc,KAAK,CAACd;YACJF,OAAOC,cAAc,CAACnC,KAAK4C,MAAM;gBAAE,GAAGI,SAAS;gBAAEZ;YAAM;QACzD;IACF;AACF","ignoreList":[0]}}, + {"offset": {"line": 4647, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/async-storage/draft-mode-provider.ts"],"sourcesContent":["import type { IncomingMessage } from 'http'\nimport type { ReadonlyRequestCookies } from '../web/spec-extension/adapters/request-cookies'\nimport type { ResponseCookies } from '../web/spec-extension/cookies'\nimport type { BaseNextRequest } from '../base-http'\nimport type { NextRequest } from '../web/spec-extension/request'\n\nimport {\n COOKIE_NAME_PRERENDER_BYPASS,\n checkIsOnDemandRevalidate,\n} from '../api-utils'\nimport type { __ApiPreviewProps } from '../api-utils'\n\nexport class DraftModeProvider {\n /**\n * @internal - this declaration is stripped via `tsc --stripInternal`\n */\n private _isEnabled: boolean\n\n /**\n * @internal - this declaration is stripped via `tsc --stripInternal`\n */\n private readonly _previewModeId: string | undefined\n\n /**\n * @internal - this declaration is stripped via `tsc --stripInternal`\n */\n private readonly _mutableCookies: ResponseCookies\n\n constructor(\n previewProps: __ApiPreviewProps | undefined,\n req: IncomingMessage | BaseNextRequest | NextRequest,\n cookies: ReadonlyRequestCookies,\n mutableCookies: ResponseCookies\n ) {\n // The logic for draftMode() is very similar to tryGetPreviewData()\n // but Draft Mode does not have any data associated with it.\n const isOnDemandRevalidate =\n previewProps &&\n checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate\n\n const cookieValue = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)?.value\n\n this._isEnabled = Boolean(\n !isOnDemandRevalidate &&\n cookieValue &&\n previewProps &&\n (cookieValue === previewProps.previewModeId ||\n // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`.\n (process.env.NODE_ENV !== 'production' &&\n previewProps.previewModeId === 'development-id'))\n )\n\n this._previewModeId = previewProps?.previewModeId\n this._mutableCookies = mutableCookies\n }\n\n get isEnabled() {\n return this._isEnabled\n }\n\n enable() {\n if (!this._previewModeId) {\n throw new Error(\n 'Invariant: previewProps missing previewModeId this should never happen'\n )\n }\n\n this._mutableCookies.set({\n name: COOKIE_NAME_PRERENDER_BYPASS,\n value: this._previewModeId,\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n })\n\n this._isEnabled = true\n }\n\n disable() {\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 this._mutableCookies.set({\n name: COOKIE_NAME_PRERENDER_BYPASS,\n value: '',\n httpOnly: true,\n sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n secure: process.env.NODE_ENV !== 'development',\n path: '/',\n expires: new Date(0),\n })\n\n this._isEnabled = false\n }\n}\n"],"names":["COOKIE_NAME_PRERENDER_BYPASS","checkIsOnDemandRevalidate","DraftModeProvider","constructor","previewProps","req","cookies","mutableCookies","isOnDemandRevalidate","cookieValue","get","value","_isEnabled","Boolean","previewModeId","process","env","NODE_ENV","_previewModeId","_mutableCookies","isEnabled","enable","Error","set","name","httpOnly","sameSite","secure","path","disable","expires","Date"],"mappings":";;;;AAMA,SACEA,4BAA4B,EAC5BC,yBAAyB,QACpB,eAAc;;AAGd,MAAMC;IAgBXC,YACEC,YAA2C,EAC3CC,GAA6D,EAC7DC,OAA+B,EAC/BC,cAA+B,CAC/B;YAOoBD;QANpB,mEAAmE;QACnE,4DAA4D;QAC5D,MAAME,uBACJJ,oBACAH,gRAAAA,EAA0BI,KAAKD,cAAcI,oBAAoB;QAEnE,MAAMC,cAAAA,CAAcH,eAAAA,QAAQI,GAAG,CAACV,mRAAAA,CAAAA,KAAAA,OAAAA,KAAAA,IAAZM,aAA2CK,KAAK;QAEpE,IAAI,CAACC,UAAU,GAAGC,QAChB,CAACL,wBACCC,eACAL,gBACCK,CAAAA,gBAAgBL,aAAaU,aAAa,IACzC,mHAAmH;QAClHC,QAAQC,GAAG,CAACC,QAAQ,gCAAK,gBACxBb,aAAaU,aAAa,KAAK,gBAAgB;QAGvD,IAAI,CAACI,cAAc,GAAGd,gBAAAA,OAAAA,KAAAA,IAAAA,aAAcU,aAAa;QACjD,IAAI,CAACK,eAAe,GAAGZ;IACzB;IAEA,IAAIa,YAAY;QACd,OAAO,IAAI,CAACR,UAAU;IACxB;IAEAS,SAAS;QACP,IAAI,CAAC,IAAI,CAACH,cAAc,EAAE;YACxB,MAAM,OAAA,cAEL,CAFK,IAAII,MACR,2EADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QAEA,IAAI,CAACH,eAAe,CAACI,GAAG,CAAC;YACvBC,MAAMxB,mRAAAA;YACNW,OAAO,IAAI,CAACO,cAAc;YAC1BO,UAAU;YACVC,UAAUX,QAAQC,GAAG,CAACC,QAAQ,KAAK,aAAgB,0BAAS;YAC5DU,QAAQZ,QAAQC,GAAG,CAACC,QAAQ,gCAAK;YACjCW,MAAM;QACR;QAEA,IAAI,CAAChB,UAAU,GAAG;IACpB;IAEAiB,UAAU;QACR,2DAA2D;QAC3D,oDAAoD;QACpD,wEAAwE;QACxE,IAAI,CAACV,eAAe,CAACI,GAAG,CAAC;YACvBC,MAAMxB,mRAAAA;YACNW,OAAO;YACPc,UAAU;YACVC,UAAUX,QAAQC,GAAG,CAACC,QAAQ,KAAK,aAAgB,0BAAS;YAC5DU,QAAQZ,QAAQC,GAAG,CAACC,QAAQ,gCAAK;YACjCW,MAAM;YACNE,SAAS,IAAIC,KAAK;QACpB;QAEA,IAAI,CAACnB,UAAU,GAAG;IACpB;AACF","ignoreList":[0]}}, + {"offset": {"line": 4706, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/async-storage/request-store.ts"],"sourcesContent":["import type { BaseNextRequest, BaseNextResponse } from '../base-http'\nimport type { IncomingHttpHeaders } from 'http'\nimport type { RequestStore } from '../app-render/work-unit-async-storage.external'\nimport type { RenderOpts } from '../app-render/types'\nimport type { NextRequest } from '../web/spec-extension/request'\nimport type { __ApiPreviewProps } from '../api-utils'\n\nimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'\nimport {\n HeadersAdapter,\n type ReadonlyHeaders,\n} from '../web/spec-extension/adapters/headers'\nimport {\n MutableRequestCookiesAdapter,\n RequestCookiesAdapter,\n responseCookiesToRequestCookies,\n createCookiesWithMutableAccessCheck,\n type ReadonlyRequestCookies,\n} from '../web/spec-extension/adapters/request-cookies'\nimport { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'\nimport { DraftModeProvider } from './draft-mode-provider'\nimport { splitCookiesString } from '../web/utils'\nimport type { ServerComponentsHmrCache } from '../response-cache'\nimport type { RenderResumeDataCache } from '../resume-data-cache/resume-data-cache'\nimport type { Params } from '../request/params'\nimport type { ImplicitTags } from '../lib/implicit-tags'\nimport type { FallbackRouteParams } from '../request/fallback-params'\n\nfunction getHeaders(headers: Headers | IncomingHttpHeaders): ReadonlyHeaders {\n const cleaned = HeadersAdapter.from(headers)\n for (const header of FLIGHT_HEADERS) {\n cleaned.delete(header)\n }\n\n return HeadersAdapter.seal(cleaned)\n}\n\nfunction getMutableCookies(\n headers: Headers | IncomingHttpHeaders,\n onUpdateCookies?: (cookies: string[]) => void\n): ResponseCookies {\n const cookies = new RequestCookies(HeadersAdapter.from(headers))\n return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies)\n}\n\nexport type WrapperRenderOpts = Partial> & {\n previewProps?: __ApiPreviewProps\n}\n\ntype RequestContext = RequestResponsePair & {\n /**\n * The URL of the request. This only specifies the pathname and the search\n * part of the URL. This is only undefined when generating static paths (ie,\n * there is no request in progress, nor do we know one).\n */\n url: {\n /**\n * The pathname of the requested URL.\n */\n pathname: string\n\n /**\n * The search part of the requested URL. If the request did not provide a\n * search part, this will be an empty string.\n */\n search?: string\n }\n phase: RequestStore['phase']\n renderOpts?: WrapperRenderOpts\n isHmrRefresh?: boolean\n serverComponentsHmrCache?: ServerComponentsHmrCache\n implicitTags: ImplicitTags\n}\n\ntype RequestResponsePair =\n | { req: BaseNextRequest; res: BaseNextResponse } // for an app page\n | { req: NextRequest; res: undefined } // in an api route or middleware\n\n/**\n * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`),\n * then merge those into the existing cookie object, so that when `cookies()` is accessed\n * it's able to read the newly set cookies.\n */\nfunction mergeMiddlewareCookies(\n req: RequestContext['req'],\n existingCookies: RequestCookies | ResponseCookies\n) {\n if (\n 'x-middleware-set-cookie' in req.headers &&\n typeof req.headers['x-middleware-set-cookie'] === 'string'\n ) {\n const setCookieValue = req.headers['x-middleware-set-cookie']\n const responseHeaders = new Headers()\n\n for (const cookie of splitCookiesString(setCookieValue)) {\n responseHeaders.append('set-cookie', cookie)\n }\n\n const responseCookies = new ResponseCookies(responseHeaders)\n\n // Transfer cookies from ResponseCookies to RequestCookies\n for (const cookie of responseCookies.getAll()) {\n existingCookies.set(cookie)\n }\n }\n}\n\nexport function createRequestStoreForRender(\n req: RequestContext['req'],\n res: RequestContext['res'],\n url: RequestContext['url'],\n rootParams: Params,\n implicitTags: RequestContext['implicitTags'],\n onUpdateCookies: RenderOpts['onUpdateCookies'],\n previewProps: WrapperRenderOpts['previewProps'],\n isHmrRefresh: RequestContext['isHmrRefresh'],\n serverComponentsHmrCache: RequestContext['serverComponentsHmrCache'],\n renderResumeDataCache: RenderResumeDataCache | undefined,\n devFallbackParams: FallbackRouteParams | null\n): RequestStore {\n return createRequestStoreImpl(\n // Pages start in render phase by default\n 'render',\n req,\n res,\n url,\n rootParams,\n implicitTags,\n onUpdateCookies,\n renderResumeDataCache,\n previewProps,\n isHmrRefresh,\n serverComponentsHmrCache,\n devFallbackParams\n )\n}\n\nexport function createRequestStoreForAPI(\n req: RequestContext['req'],\n url: RequestContext['url'],\n implicitTags: RequestContext['implicitTags'],\n onUpdateCookies: RenderOpts['onUpdateCookies'],\n previewProps: WrapperRenderOpts['previewProps']\n): RequestStore {\n return createRequestStoreImpl(\n // API routes start in action phase by default\n 'action',\n req,\n undefined,\n url,\n {},\n implicitTags,\n onUpdateCookies,\n undefined,\n previewProps,\n false,\n undefined,\n null\n )\n}\n\nfunction createRequestStoreImpl(\n phase: RequestStore['phase'],\n req: RequestContext['req'],\n res: RequestContext['res'],\n url: RequestContext['url'],\n rootParams: Params,\n implicitTags: RequestContext['implicitTags'],\n onUpdateCookies: RenderOpts['onUpdateCookies'],\n renderResumeDataCache: RenderResumeDataCache | undefined,\n previewProps: WrapperRenderOpts['previewProps'],\n isHmrRefresh: RequestContext['isHmrRefresh'],\n serverComponentsHmrCache: RequestContext['serverComponentsHmrCache'],\n devFallbackParams: FallbackRouteParams | null | undefined\n): RequestStore {\n function defaultOnUpdateCookies(cookies: string[]) {\n if (res) {\n res.setHeader('Set-Cookie', cookies)\n }\n }\n\n const cache: {\n headers?: ReadonlyHeaders\n cookies?: ReadonlyRequestCookies\n mutableCookies?: ResponseCookies\n userspaceMutableCookies?: ResponseCookies\n draftMode?: DraftModeProvider\n } = {}\n\n return {\n type: 'request',\n phase,\n implicitTags,\n // Rather than just using the whole `url` here, we pull the parts we want\n // to ensure we don't use parts of the URL that we shouldn't. This also\n // lets us avoid requiring an empty string for `search` in the type.\n url: { pathname: url.pathname, search: url.search ?? '' },\n rootParams,\n get headers() {\n if (!cache.headers) {\n // Seal the headers object that'll freeze out any methods that could\n // mutate the underlying data.\n cache.headers = getHeaders(req.headers)\n }\n\n return cache.headers\n },\n get cookies() {\n if (!cache.cookies) {\n // if middleware is setting cookie(s), then include those in\n // the initial cached cookies so they can be read in render\n const requestCookies = new RequestCookies(\n HeadersAdapter.from(req.headers)\n )\n\n mergeMiddlewareCookies(req, requestCookies)\n\n // Seal the cookies object that'll freeze out any methods that could\n // mutate the underlying data.\n cache.cookies = RequestCookiesAdapter.seal(requestCookies)\n }\n\n return cache.cookies\n },\n set cookies(value: ReadonlyRequestCookies) {\n cache.cookies = value\n },\n get mutableCookies() {\n if (!cache.mutableCookies) {\n const mutableCookies = getMutableCookies(\n req.headers,\n onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)\n )\n\n mergeMiddlewareCookies(req, mutableCookies)\n\n cache.mutableCookies = mutableCookies\n }\n return cache.mutableCookies\n },\n get userspaceMutableCookies() {\n if (!cache.userspaceMutableCookies) {\n const userspaceMutableCookies =\n createCookiesWithMutableAccessCheck(this)\n cache.userspaceMutableCookies = userspaceMutableCookies\n }\n return cache.userspaceMutableCookies\n },\n get draftMode() {\n if (!cache.draftMode) {\n cache.draftMode = new DraftModeProvider(\n previewProps,\n req,\n this.cookies,\n this.mutableCookies\n )\n }\n\n return cache.draftMode\n },\n renderResumeDataCache: renderResumeDataCache ?? null,\n isHmrRefresh,\n serverComponentsHmrCache:\n serverComponentsHmrCache ||\n (globalThis as any).__serverComponentsHmrCache,\n devFallbackParams,\n }\n}\n\nexport function synchronizeMutableCookies(store: RequestStore) {\n // TODO: does this need to update headers as well?\n store.cookies = RequestCookiesAdapter.seal(\n responseCookiesToRequestCookies(store.mutableCookies)\n )\n}\n"],"names":["FLIGHT_HEADERS","HeadersAdapter","MutableRequestCookiesAdapter","RequestCookiesAdapter","responseCookiesToRequestCookies","createCookiesWithMutableAccessCheck","ResponseCookies","RequestCookies","DraftModeProvider","splitCookiesString","getHeaders","headers","cleaned","from","header","delete","seal","getMutableCookies","onUpdateCookies","cookies","wrap","mergeMiddlewareCookies","req","existingCookies","setCookieValue","responseHeaders","Headers","cookie","append","responseCookies","getAll","set","createRequestStoreForRender","res","url","rootParams","implicitTags","previewProps","isHmrRefresh","serverComponentsHmrCache","renderResumeDataCache","devFallbackParams","createRequestStoreImpl","createRequestStoreForAPI","undefined","phase","defaultOnUpdateCookies","setHeader","cache","type","pathname","search","requestCookies","value","mutableCookies","userspaceMutableCookies","draftMode","globalThis","__serverComponentsHmrCache","synchronizeMutableCookies","store"],"mappings":";;;;;;;;AAOA,SAASA,cAAc,QAAQ,6CAA4C;AAC3E,SACEC,cAAc,QAET,yCAAwC;AAC/C,SACEC,4BAA4B,EAC5BC,qBAAqB,EACrBC,+BAA+B,EAC/BC,mCAAmC,QAE9B,iDAAgD;;AACvD,SAASC,eAAe,EAAEC,cAAc,QAAQ,gCAA+B;AAC/E,SAASC,iBAAiB,QAAQ,wBAAuB;AACzD,SAASC,kBAAkB,QAAQ,eAAc;;;;;;;AAOjD,SAASC,WAAWC,OAAsC;IACxD,MAAMC,UAAUX,+RAAAA,CAAeY,IAAI,CAACF;IACpC,KAAK,MAAMG,UAAUd,sRAAAA,CAAgB;QACnCY,QAAQG,MAAM,CAACD;IACjB;IAEA,OAAOb,+RAAAA,CAAee,IAAI,CAACJ;AAC7B;AAEA,SAASK,kBACPN,OAAsC,EACtCO,eAA6C;IAE7C,MAAMC,UAAU,IAAIZ,gRAAAA,CAAeN,+RAAAA,CAAeY,IAAI,CAACF;IACvD,OAAOT,wTAAAA,CAA6BkB,IAAI,CAACD,SAASD;AACpD;AAmCA;;;;CAIC,GACD,SAASG,uBACPC,GA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uB;QACtC;QACA,IAAIC,aAAY;YACd,IAAI,CAACR,MAAMQ,SAAS,EAAE;gBACpBR,MAAMQ,SAAS,GAAG,IAAIhD,gSAAAA,CACpB6B,cACAf,KACA,IAAI,CAACH,OAAO,EACZ,IAAI,CAACmC,cAAc;YAEvB;YAEA,OAAON,MAAMQ,SAAS;QACxB;QACAhB,uBAAuBA,yBAAyB;QAChDF;QACAC,0BACEA,4BACCkB,WAAmBC,0BAA0B;QAChDjB;IACF;AACF;AAEO,SAASkB,0BAA0BC,KAAmB;IAC3D,kDAAkD;IAClDA,MAAMzC,OAAO,GAAGhB,iTAAAA,CAAsBa,IAAI,KACxCZ,2TAAAA,EAAgCwD,MAAMN,cAAc;AAExD","ignoreList":[0]}}, + {"offset": {"line": 4839, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/app-render/work-unit-async-storage-instance.ts"],"sourcesContent":["import { createAsyncLocalStorage } from './async-local-storage'\nimport type { WorkUnitAsyncStorage } from './work-unit-async-storage.external'\n\nexport const workUnitAsyncStorageInstance: WorkUnitAsyncStorage =\n createAsyncLocalStorage()\n"],"names":["createAsyncLocalStorage","workUnitAsyncStorageInstance"],"mappings":";;;;AAAA,SAASA,uBAAuB,QAAQ,wBAAuB;;AAGxD,MAAMC,mCACXD,mSAAAA,GAAyB","ignoreList":[0]}}, + {"offset": {"line": 4850, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,CACF,gBAAaD,CAAAA,QAAQE,QAAQ,CAAC,OAAOF,UAAUA,UAAU,GAAE,IAAE,8BAC9DC;QAEF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0]}}, + {"offset": {"line": 4864, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/app-render/work-unit-async-storage.external.ts"],"sourcesContent":["import type { AsyncLocalStorage } from 'async_hooks'\nimport type { DraftModeProvider } from '../async-storage/draft-mode-provider'\nimport type { ResponseCookies } from '../web/spec-extension/cookies'\nimport type { ReadonlyHeaders } from '../web/spec-extension/adapters/headers'\nimport type { ReadonlyRequestCookies } from '../web/spec-extension/adapters/request-cookies'\nimport type { CacheSignal } from './cache-signal'\nimport type { DynamicTrackingState } from './dynamic-rendering'\nimport type { FallbackRouteParams } from '../request/fallback-params'\n\n// Share the instance module in the next-shared layer\nimport { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }\nimport type { ServerComponentsHmrCache } from '../response-cache'\nimport type {\n RenderResumeDataCache,\n PrerenderResumeDataCache,\n} from '../resume-data-cache/resume-data-cache'\nimport type { Params } from '../request/params'\nimport type { ImplicitTags } from '../lib/implicit-tags'\nimport type { WorkStore } from './work-async-storage.external'\nimport { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../client/components/app-router-headers'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport type WorkUnitPhase = 'action' | 'render' | 'after'\n\nexport interface CommonWorkUnitStore {\n /** NOTE: Will be mutated as phases change */\n phase: WorkUnitPhase\n readonly implicitTags: ImplicitTags\n}\n\nexport interface RequestStore extends CommonWorkUnitStore {\n readonly type: 'request'\n\n /**\n * The URL of the request. This only specifies the pathname and the search\n * part of the URL.\n */\n readonly url: {\n /**\n * The pathname of the requested URL.\n */\n readonly pathname: string\n\n /**\n * The search part of the requested URL. If the request did not provide a\n * search part, this will be an empty string.\n */\n readonly search: string\n }\n\n readonly headers: ReadonlyHeaders\n // This is mutable because we need to reassign it when transitioning from the action phase to the render phase.\n // The cookie object itself is deliberately read only and thus can't be updated.\n cookies: ReadonlyRequestCookies\n readonly mutableCookies: ResponseCookies\n readonly userspaceMutableCookies: ResponseCookies\n readonly draftMode: DraftModeProvider\n readonly isHmrRefresh?: boolean\n readonly serverComponentsHmrCache?: ServerComponentsHmrCache\n\n readonly rootParams: Params\n\n /**\n * The resume data cache for this request. This will be a immutable cache.\n */\n renderResumeDataCache: RenderResumeDataCache | null\n\n // DEV-only\n usedDynamic?: boolean\n prerenderPhase?: boolean\n devFallbackParams?: FallbackRouteParams | null\n}\n\n/**\n * The Prerender store is for tracking information related to prerenders.\n *\n * It can be used for both RSC and SSR prerendering and should be scoped as close\n * to the individual `renderTo...` API call as possible. To keep the type simple\n * we don't distinguish between RSC and SSR prerendering explicitly but instead\n * use conditional object properties to infer which mode we are in. For instance cache tracking\n * only needs to happen during the RSC prerender when we are prospectively prerendering\n * to fill all caches.\n */\nexport type PrerenderStoreModern =\n | PrerenderStoreModernClient\n | PrerenderStoreModernServer\n | PrerenderStoreModernRuntime\n\n/** Like `PrerenderStoreModern`, but only including static prerenders (i.e. not runtime prerenders) */\nexport type StaticPrerenderStoreModern = Exclude<\n PrerenderStoreModern,\n PrerenderStoreModernRuntime\n>\n\nexport interface PrerenderStoreModernClient\n extends PrerenderStoreModernCommon,\n StaticPrerenderStoreCommon {\n readonly type: 'prerender-client'\n}\n\nexport interface PrerenderStoreModernServer\n extends PrerenderStoreModernCommon,\n StaticPrerenderStoreCommon {\n readonly type: 'prerender'\n}\n\nexport interface PrerenderStoreModernRuntime\n extends PrerenderStoreModernCommon {\n readonly type: 'prerender-runtime'\n\n /**\n * A runtime prerender resolves APIs in two tasks:\n *\n * 1. Static data (available in a static prerender)\n * 2. Runtime data (available in a runtime prerender)\n *\n * This separation is achieved by awaiting this promise in \"runtime\" APIs.\n * In the final prerender, the promise will be resolved during the second task,\n * and the render will be aborted in the task that follows it.\n */\n readonly runtimeStagePromise: Promise | null\n\n readonly cookies: RequestStore['cookies']\n readonly draftMode: RequestStore['draftMode']\n}\n\nexport interface RevalidateStore {\n // Collected revalidate times and tags for this document during the prerender.\n revalidate: number // in seconds. 0 means dynamic. INFINITE_CACHE and higher means never revalidate.\n expire: number // server expiration time\n stale: number // client expiration time\n tags: null | string[]\n}\n\ninterface PrerenderStoreModernCommon\n extends CommonWorkUnitStore,\n RevalidateStore {\n /**\n * The render signal is aborted after React's `prerender` function is aborted\n * (using a separate signal), which happens in two cases:\n *\n * 1. When all caches are filled during the prospective prerender.\n * 2. When the final prerender is aborted immediately after the prerender was\n * started.\n *\n * It can be used to reject any pending I/O, including hanging promises. This\n * allows React to properly track the async I/O in dev mode, which yields\n * better owner stacks for dynamic validation errors.\n */\n readonly renderSignal: AbortSignal\n\n /**\n * This is the AbortController which represents the boundary between Prerender\n * and dynamic. In some renders it is the same as the controller for React,\n * but in others it is a separate controller. It should be aborted whenever we\n * are no longer in the prerender phase of rendering. Typically this is after\n * one task, or when you call a sync API which requires the prerender to end\n * immediately.\n */\n readonly controller: AbortController\n\n /**\n * When not null, this signal is used to track cache reads during prerendering\n * and to await all cache reads completing, before aborting the prerender.\n */\n readonly cacheSignal: null | CacheSignal\n\n /**\n * During some prerenders we want to track dynamic access.\n */\n readonly dynamicTracking: null | DynamicTrackingState\n\n readonly rootParams: Params\n\n /**\n * A mutable resume data cache for this prerender.\n */\n prerenderResumeDataCache: PrerenderResumeDataCache | null\n\n /**\n * An immutable resume data cache for this prerender. This may be provided\n * instead of the `prerenderResumeDataCache` if the prerender is not supposed\n * to fill caches, and only read from prefilled caches, e.g. when prerendering\n * an optional fallback shell.\n */\n renderResumeDataCache: RenderResumeDataCache | null\n\n /**\n * The HMR refresh hash is only provided in dev mode. It is needed for the dev\n * warmup render to ensure that the cache keys will be identical for the\n * subsequent dynamic render.\n */\n readonly hmrRefreshHash: string | undefined\n\n /**\n * Only available in dev mode.\n */\n readonly captureOwnerStack: undefined | (() => string | null)\n}\n\ninterface StaticPrerenderStoreCommon {\n /**\n * The set of unknown route parameters. Accessing these will be tracked as\n * a dynamic access.\n */\n readonly fallbackRouteParams: FallbackRouteParams | null\n\n /**\n * When true, the page is prerendered as a fallback shell, while allowing any\n * dynamic accesses to result in an empty shell. This is the case when there\n * are also routes prerendered with a more complete set of params.\n * Prerendering those routes would catch any invalid dynamic accesses.\n */\n readonly allowEmptyStaticShell: boolean\n}\n\nexport interface PrerenderStorePPR\n extends CommonWorkUnitStore,\n RevalidateStore {\n readonly type: 'prerender-ppr'\n readonly rootParams: Params\n readonly dynamicTracking: null | DynamicTrackingState\n\n /**\n * The set of unknown route parameters. Accessing these will be tracked as\n * a dynamic access.\n */\n readonly fallbackRouteParams: FallbackRouteParams | null\n\n /**\n * The resume data cache for this prerender.\n */\n prerenderResumeDataCache: PrerenderResumeDataCache\n}\n\nexport interface PrerenderStoreLegacy\n extends CommonWorkUnitStore,\n RevalidateStore {\n readonly type: 'prerender-legacy'\n readonly rootParams: Params\n}\n\nexport type PrerenderStore =\n | PrerenderStoreLegacy\n | PrerenderStorePPR\n | PrerenderStoreModern\n\n// /** Like `PrerenderStoreModern`, but only including static prerenders (i.e. not runtime prerenders) */\nexport type StaticPrerenderStore = Exclude<\n PrerenderStore,\n PrerenderStoreModernRuntime\n>\n\nexport interface CommonCacheStore\n extends Omit {\n /**\n * A cache work unit store might not always have an outer work unit store,\n * from which implicit tags could be inherited.\n */\n readonly implicitTags: ImplicitTags | undefined\n /**\n * Draft mode is only available if the outer work unit store is a request\n * store and draft mode is enabled.\n */\n readonly draftMode: DraftModeProvider | undefined\n}\n\nexport interface CommonUseCacheStore extends CommonCacheStore, RevalidateStore {\n explicitRevalidate: undefined | number // explicit revalidate time from cacheLife() calls\n explicitExpire: undefined | number // server expiration time\n explicitStale: undefined | number // client expiration time\n readonly hmrRefreshHash: string | undefined\n readonly isHmrRefresh: boolean\n readonly serverComponentsHmrCache: ServerComponentsHmrCache | undefined\n readonly forceRevalidate: boolean\n}\n\nexport interface PublicUseCacheStore extends CommonUseCacheStore {\n readonly type: 'cache'\n}\n\nexport interface PrivateUseCacheStore extends CommonUseCacheStore {\n readonly type: 'private-cache'\n\n /**\n * A runtime prerender resolves APIs in two tasks:\n *\n * 1. Static data (available in a static prerender)\n * 2. Runtime data (available in a runtime prerender)\n *\n * This separation is achieved by awaiting this promise in \"runtime\" APIs.\n * In the final prerender, the promise will be resolved during the second task,\n * and the render will be aborted in the task that follows it.\n */\n readonly runtimeStagePromise: Promise | null\n\n /**\n * As opposed to the public cache store, the private cache store is allowed to\n * access the request cookies.\n */\n readonly cookies: ReadonlyRequestCookies\n\n /**\n * Private caches don't currently need to track root params in the cache key\n * because they're not persisted anywhere, so we can allow root params access\n * (unlike public caches)\n */\n readonly rootParams: Params\n}\n\nexport type UseCacheStore = PublicUseCacheStore | PrivateUseCacheStore\n\nexport interface UnstableCacheStore extends CommonCacheStore {\n readonly type: 'unstable-cache'\n}\n\n/**\n * The Cache store is for tracking information inside a \"use cache\" or\n * unstable_cache context. A cache store shadows an outer request store (if\n * present) as a work unit, so that we never accidentally expose any request or\n * page specific information to cache functions, unless it's explicitly desired.\n * For those exceptions, the data is copied over from the request store to the\n * cache store, instead of generally making the request store available to cache\n * functions.\n */\nexport type CacheStore = UseCacheStore | UnstableCacheStore\n\nexport type WorkUnitStore = RequestStore | CacheStore | PrerenderStore\n\nexport type WorkUnitAsyncStorage = AsyncLocalStorage\n\nexport { workUnitAsyncStorageInstance as workUnitAsyncStorage }\n\nexport function throwForMissingRequestStore(callingExpression: string): never {\n throw new Error(\n `\\`${callingExpression}\\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`\n )\n}\n\nexport function throwInvariantForMissingStore(): never {\n throw new InvariantError('Expected workUnitAsyncStorage to have a store.')\n}\n\nexport function getPrerenderResumeDataCache(\n workUnitStore: WorkUnitStore\n): PrerenderResumeDataCache | null {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-ppr':\n return workUnitStore.prerenderResumeDataCache\n case 'prerender-client':\n // TODO eliminate fetch caching in client scope and stop exposing this data\n // cache during SSR.\n return workUnitStore.prerenderResumeDataCache\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return null\n default:\n return workUnitStore satisfies never\n }\n}\n\nexport function getRenderResumeDataCache(\n workUnitStore: WorkUnitStore\n): RenderResumeDataCache | null {\n switch (workUnitStore.type) {\n case 'request':\n return workUnitStore.renderResumeDataCache\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-client':\n if (workUnitStore.renderResumeDataCache) {\n // If we are in a prerender, we might have a render resume data cache\n // that is used to read from prefilled caches.\n return workUnitStore.renderResumeDataCache\n }\n // fallthrough\n case 'prerender-ppr':\n // Otherwise we return the mutable resume data cache here as an immutable\n // version of the cache as it can also be used for reading.\n return workUnitStore.prerenderResumeDataCache\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-legacy':\n return null\n default:\n return workUnitStore satisfies never\n }\n}\n\nexport function getHmrRefreshHash(\n workStore: WorkStore,\n workUnitStore: WorkUnitStore\n): string | undefined {\n if (workStore.dev) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'private-cache':\n case 'prerender':\n case 'prerender-runtime':\n return workUnitStore.hmrRefreshHash\n case 'request':\n return workUnitStore.cookies.get(NEXT_HMR_REFRESH_HASH_COOKIE)?.value\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n return undefined\n}\n\nexport function isHmrRefresh(\n workStore: WorkStore,\n workUnitStore: WorkUnitStore\n): boolean {\n if (workStore.dev) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'private-cache':\n case 'request':\n return workUnitStore.isHmrRefresh ?? false\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n return false\n}\n\nexport function getServerComponentsHmrCache(\n workStore: WorkStore,\n workUnitStore: WorkUnitStore\n): ServerComponentsHmrCache | undefined {\n if (workStore.dev) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'private-cache':\n case 'request':\n return workUnitStore.serverComponentsHmrCache\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n return undefined\n}\n\n/**\n * Returns a draft mode provider only if draft mode is enabled.\n */\nexport function getDraftModeProviderForCacheScope(\n workStore: WorkStore,\n workUnitStore: WorkUnitStore\n): DraftModeProvider | undefined {\n if (workStore.isDraftMode) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n case 'prerender-runtime':\n case 'request':\n return workUnitStore.draftMode\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n return undefined\n}\n\nexport function getCacheSignal(\n workUnitStore: WorkUnitStore\n): CacheSignal | null {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n return workUnitStore.cacheSignal\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return null\n default:\n return workUnitStore satisfies never\n }\n}\n\nexport function getRuntimeStagePromise(\n workUnitStore: WorkUnitStore\n): Promise | null {\n switch (workUnitStore.type) {\n case 'prerender-runtime':\n case 'private-cache':\n return workUnitStore.runtimeStagePromise\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'unstable-cache':\n return null\n default:\n return workUnitStore satisfies never\n }\n}\n"],"names":["workUnitAsyncStorageInstance","NEXT_HMR_REFRESH_HASH_COOKIE","InvariantError","workUnitAsyncStorage","throwForMissingRequestStore","callingExpression","Error","throwInvariantForMissingStore","getPrerenderResumeDataCache","workUnitStore","type","prerenderResumeDataCache","getRenderResumeDataCache","renderResumeDataCache","getHmrRefreshHash","workStore","dev","hmrRefreshHash","cookies","get","value","undefined","isHmrRefresh","getServerComponentsHmrCache","serverComponentsHmrCache","getDraftModeProviderForCacheScope","isDraftMode","draftMode","getCacheSignal","cacheSignal","getRuntimeStagePromise","runtimeStagePromise"],"mappings":"AASA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;AACrD,SAASA,4BAA4B,QAAQ,0CAA0C;AASvF,SAASC,4BAA4B,QAAQ,6CAA4C;AACzF,SAASC,cAAc,QAAQ,mCAAkC;;;;;AAyT1D,SAASE,4BAA4BC,iBAAyB;IACnE,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,CAAC,EAAE,EAAED,kBAAkB,iHAAiH,CAAC,GADrI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASE;IACd,MAAM,OAAA,cAAoE,CAApE,IAAIL,yQAAAA,CAAe,mDAAnB,qBAAA;eAAA;oBAAA;sBAAA;IAAmE;AAC3E;AAEO,SAASM,4BACdC,aAA4B;IAE5B,OAAQA,cAAcC,IAAI;QACxB,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAOD,cAAcE,wBAAwB;QAC/C,KAAK;YACH,2EAA2E;YAC3E,oBAAoB;YACpB,OAAOF,cAAcE,wBAAwB;QAC/C,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO;QACT;YACE,OAAOF;IACX;AACF;AAEO,SAASG,yBACdH,aAA4B;IAE5B,OAAQA,cAAcC,IAAI;QACxB,KAAK;YACH,OAAOD,cAAcI,qBAAqB;QAC5C,KAAK;QACL,KAAK;QACL,KAAK;YACH,IAAIJ,cAAcI,qBAAqB,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BN,aAA4B;IAE5B,IAAIM,UAAUW,WAAW,EAAE;QACzB,OAAQjB,cAAcC,IAAI;YACxB,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;gBACH,OAAOD,cAAckB,SAAS;YAChC,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;gBACH;YACF;gBACElB;QACJ;IACF;IAEA,OAAOY;AACT;AAEO,SAASO,eACdnB,aAA4B;IAE5B,OAAQA,cAAcC,IAAI;QACxB,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAOD,cAAcoB,WAAW;QAClC,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO;QACT;YACE,OAAOpB;IACX;AACF;AAEO,SAASqB,uBACdrB,aAA4B;IAE5B,OAAQA,cAAcC,IAAI;QACxB,KAAK;QACL,KAAK;YACH,OAAOD,cAAcsB,mBAAmB;QAC1C,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO;QACT;YACE,OAAOtB;IACX;AACF","ignoreList":[0]}}, + {"offset": {"line": 5082, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/p-queue/index.js"],"sourcesContent":["(()=>{\"use strict\";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n=\"~\";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!==\"function\"){throw new TypeError(\"The listener must be a function\")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t[\"default\"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t[\"default\"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name=\"TimeoutError\"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!==\"number\"||t<0){throw new TypeError(\"Expected `milliseconds` to be a positive number\")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n===\"function\"){try{i(n())}catch(e){s(e)}return}const r=typeof n===\"string\"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel===\"function\"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports[\"default\"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n={};(()=>{var e=n;Object.defineProperty(e,\"__esModule\",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap===\"number\"&&e.intervalCap>=1)){throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:\"\"}\\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:\"\"}\\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit(\"active\");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e===\"number\"&&e>=1)){throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${e}\\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit(\"add\")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){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["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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 {\n public readonly key: string\n public data: T\n public size: number\n public prev: LRUNode | SentinelNode | null = null\n public next: LRUNode | SentinelNode | 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 {\n public prev: LRUNode | SentinelNode | null = null\n public next: LRUNode | SentinelNode | 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 {\n private readonly cache: Map> = new Map()\n private readonly head: SentinelNode\n private readonly tail: SentinelNode\n private totalSize: number = 0\n private readonly maxSize: number\n private readonly calculateSize: ((value: T) => number) | undefined\n\n constructor(maxSize: number, calculateSize?: (value: T) => number) {\n this.maxSize = maxSize\n this.calculateSize = calculateSize\n\n // Create sentinel nodes to simplify doubly-linked list operations\n // HEAD <-> TAIL (empty list)\n this.head = new SentinelNode()\n this.tail = new SentinelNode()\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): 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): 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): 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 {\n const lastNode = this.tail.prev as LRUNode\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): void {\n const size = this.calculateSize?.(value) ?? 1\n if (size > this.maxSize) {\n console.warn('Single item size exceeds maxSize')\n return\n }\n\n const existing = this.cache.get(key)\n if (existing) {\n // Update existing node: adjust size and move to head (most recent)\n existing.data = value\n this.totalSize = this.totalSize - existing.size + size\n existing.size = size\n this.moveToHead(existing)\n } else {\n // Add new node at head (most recent position)\n const newNode = new LRUNode(key, value, size)\n this.cache.set(key, newNode)\n this.addToHead(newNode)\n this.totalSize += size\n }\n\n // Evict least recently used items until under capacity\n while (this.totalSize > this.maxSize && this.cache.size > 0) {\n const tail = this.removeTail()\n this.cache.delete(tail.key)\n this.totalSize -= tail.size\n }\n }\n\n /**\n * Checks if a key exists in the cache.\n * This is a pure query operation - does NOT update LRU order.\n *\n * Time Complexity: O(1)\n */\n public has(key: string): boolean {\n return this.cache.has(key)\n }\n\n /**\n * Retrieves a value by key and marks it as most recently used.\n * Moving to head maintains the LRU property for future evictions.\n *\n * Time Complexity: O(1)\n */\n public get(key: string): T | undefined {\n const node = this.cache.get(key)\n if (!node) return undefined\n\n // Mark as most recently used by moving to head\n this.moveToHead(node)\n\n return node.data\n }\n\n /**\n * Returns an iterator over the cache entries. The order is outputted in the\n * order of most recently used to least recently used.\n */\n public *[Symbol.iterator](): IterableIterator<[string, T]> {\n let current = this.head.next\n while (current && current !== this.tail) {\n // Between head and tail, current is always LRUNode\n const node = current as LRUNode\n yield [node.key, node.data]\n current = current.next\n }\n }\n\n /**\n * Removes a specific key from the cache.\n * Updates both the hash map and doubly-linked list.\n *\n * Time Complexity: O(1)\n */\n public remove(key: string): void {\n const node = this.cache.get(key)\n if (!node) return\n\n this.removeNode(node)\n this.cache.delete(key)\n this.totalSize -= node.size\n }\n\n /**\n * Returns the number of items in the cache.\n */\n public get size(): number {\n return this.cache.size\n }\n\n /**\n * Returns the current total size of all cached items.\n * This uses the custom size calculation if provided.\n */\n public get currentSize(): number {\n return this.totalSize\n }\n}\n"],"names":["LRUNode","constructor","key","data","size","prev","next","SentinelNode","LRUCache","maxSize","calculateSize","cache","Map","totalSize","head","tail","addToHead","node","removeNode","moveToHead","removeTail","lastNode","set","value","console","warn","existing","get","newNode","delete","has","undefined","Symbol","iterator","current","remove","currentSize"],"mappings":"AAAA;;;CAGC;;;;AACD,MAAMA;IAOJC,YAAYC,GAAW,EAAEC,IAAO,EAAEC,IAAY,CAAE;aAHzCC,IAAAA,GAA4C;aAC5CC,IAAAA,GAA4C;QAGjD,IAAI,CAACJ,GAAG,GAAGA;QACX,IAAI,CAACC,IAAI,GAAGA;QACZ,IAAI,CAACC,IAAI,GAAGA;IACd;AACF;AAEA;;;CAGC,GACD,MAAMG;;aACGF,IAAAA,GAA4C;aAC5CC,IAAAA,GAA4C;;AACrD;AAoBO,MAAME;IAQXP,YAAYQ,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D,IAAIC,UAAU,IAAI,CAACpB,IAAI,CAACR,IAAI;QAC5B,MAAO4B,WAAWA,YAAY,IAAI,CAACnB,IAAI,CAAE;YACvC,mDAAmD;YACnD,MAAME,OAAOiB;YACb,MAAM;gBAACjB,KAAKf,GAAG;gBAAEe,KAAKd,IAAI;aAAC;YAC3B+B,UAAUA,QAAQ5B,IAAI;QACxB;IACF;IAEA;;;;;GAKC,GACM6B,OAAOjC,GAAW,EAAQ;QAC/B,MAAMe,OAAO,IAAI,CAACN,KAAK,CAACgB,GAAG,CAACzB;QAC5B,IAAI,CAACe,MAAM;QAEX,IAAI,CAACC,UAAU,CAACD;QAChB,IAAI,CAACN,KAAK,CAACkB,MAAM,CAAC3B;QAClB,IAAI,CAACW,SAAS,IAAII,KAAKb,IAAI;IAC7B;IAEA;;GAEC,GACD,IAAWA,OAAe;QACxB,OAAO,IAAI,CAACO,KAAK,CAACP,IAAI;IACxB;IAEA;;;GAGC,GACD,IAAWgC,cAAsB;QAC/B,OAAO,IAAI,CAACvB,SAAS;IACvB;AACF","ignoreList":[0]}}, + {"offset": {"line": 5782, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map()\n\nexport const isStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const revalidatedAt = tagsManifest.get(tag)\n\n if (typeof revalidatedAt === 'number' && revalidatedAt >= timestamp) {\n return true\n }\n }\n\n return false\n}\n"],"names":["tagsManifest","Map","isStale","tags","timestamp","tag","revalidatedAt","get"],"mappings":"AAEA,+EAA+E;AAC/E,qBAAqB;;;;;;;AACd,MAAMA,eAAe,IAAIC,MAAqB;AAE9C,MAAMC,UAAU,CAACC,MAAgBC;IACtC,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,gBAAgBN,aAAaO,GAAG,CAACF;QAEvC,IAAI,OAAOC,kBAAkB,YAAYA,iBAAiBF,WAAW;YACnE,OAAO;QACT;IACF;IAEA,OAAO;AACT,EAAC","ignoreList":[0]}}, + {"offset": {"line": 5804, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/lib/cache-handlers/default.external.ts"],"sourcesContent":["/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandlerV2 } from './types'\nimport {\n isStale,\n tagsManifest,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n entry: CacheEntry\n\n // For the default cache we store errored cache\n // entries and allow them to be used up to 3 times\n // after that we want to dispose it and try for fresh\n\n // If an entry is errored we return no entry\n // three times so that we retry hitting origin (MISS)\n // and then if it still fails to set after the third we\n // return the errored content and use expiration of\n // Math.min(30, entry.expiration)\n isErrored: boolean\n errorRetryCount: number\n\n // compute size on set since we need to read size\n // of the ReadableStream for LRU evicting\n size: number\n}\n\n// LRU cache default to max 50 MB but in future track\nconst memoryCache = new LRUCache(\n 50 * 1024 * 1024,\n (entry) => entry.size\n)\nconst pendingSets = new Map>()\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? console.debug.bind(console, 'DefaultCacheHandler:')\n : undefined\n\nconst DefaultCacheHandler: CacheHandlerV2 = {\n async get(cacheKey) {\n const pendingPromise = pendingSets.get(cacheKey)\n\n if (pendingPromise) {\n debug?.('get', cacheKey, 'pending')\n await pendingPromise\n }\n\n const privateEntry = memoryCache.get(cacheKey)\n\n if (!privateEntry) {\n debug?.('get', cacheKey, 'not found')\n return undefined\n }\n\n const entry = privateEntry.entry\n if (\n performance.timeOrigin + performance.now() >\n entry.timestamp + entry.revalidate * 1000\n ) {\n // In-memory caches should expire after revalidate time because it is\n // unlikely that a new entry will be able to be used before it is dropped\n // from the cache.\n debug?.('get', cacheKey, 'expired')\n\n return undefined\n }\n\n if (isStale(entry.tags, entry.timestamp)) {\n debug?.('get', cacheKey, 'had stale tag')\n\n return undefined\n }\n const [returnStream, newSaved] = entry.value.tee()\n entry.value = newSaved\n\n debug?.('get', cacheKey, 'found', {\n tags: entry.tags,\n timestamp: entry.timestamp,\n revalidate: entry.revalidate,\n expire: entry.expire,\n })\n\n return {\n ...entry,\n value: returnStream,\n }\n },\n\n async set(cacheKey, pendingEntry) {\n debug?.('set', cacheKey, 'start')\n\n let resolvePending: () => void = () => {}\n const pendingPromise = new Promise((resolve) => {\n resolvePending = resolve\n })\n pendingSets.set(cacheKey, pendingPromise)\n\n const entry = await pendingEntry\n\n let size = 0\n\n try {\n const [value, clonedValue] = entry.value.tee()\n entry.value = value\n const reader = clonedValue.getReader()\n\n for (let chunk; !(chunk = await reader.read()).done; ) {\n size += Buffer.from(chunk.value).byteLength\n }\n\n memoryCache.set(cacheKey, {\n entry,\n isErrored: false,\n errorRetryCount: 0,\n size,\n })\n\n debug?.('set', cacheKey, 'done')\n } catch (err) {\n // TODO: store partial buffer with error after we retry 3 times\n debug?.('set', cacheKey, 'failed', err)\n } finally {\n resolvePending()\n pendingSets.delete(cacheKey)\n }\n },\n\n async refreshTags() {\n // Nothing to do for an in-memory cache handler.\n },\n\n async getExpiration(...tags) {\n const expiration = Math.max(\n ...tags.map((tag) => tagsManifest.get(tag) ?? 0)\n )\n\n debug?.('getExpiration', { tags, expiration })\n\n return expiration\n },\n\n async expireTags(...tags) {\n const timestamp = Math.round(performance.timeOrigin + performance.now())\n debug?.('expireTags', { tags, timestamp })\n\n for (const tag of tags) {\n // TODO: update file-system-cache?\n tagsManifest.set(tag, timestamp)\n }\n },\n}\n\nexport default DefaultCacheHandler\n"],"names":["LRUCache","isStale","tagsManifest","memoryCache","entry","size","pendingSets","Map","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","console","bind","undefined","DefaultCacheHandler","get","cacheKey","pendingPromise","privateEntry","performance","timeOrigin","now","timestamp","revalidate","tags","returnStream","newSaved","value","tee","expire","set","pendingEntry","resolvePending","Promise","resolve","clonedValue","reader","getReader","chunk","read","done","Buffer","from","byteLength","isErrored","errorRetryCount","err","delete","refreshTags","getExpiration","expiration","Math","max","map","tag","expireTags","round"],"mappings":"AAAA;;;;;;;CAOC;;;;AA6Ge0C;AA3GhB,SAAS1C,QAAQ,QAAQ,eAAc;AAEvC,SACEC,OAAO,EACPC,YAAY,QACP,8CAA6C;;;AAsBpD,qDAAqD;AACrD,MAAMC,cAAc,IAAIH,6PAAAA,CACtB,KAAK,OAAO,MACZ,CAACI,QAAUA,MAAMC,IAAI;AAEvB,MAAMC,cAAc,IAAIC;AAExB,MAAMC,QAAQC,QAAQC,GAAG,CAACC,wBAAwB,GAC9CC,QAAQJ,KAAK,CAACK,IAAI,CAACD,SAAS,0BAC5BE;AAEJ,MAAMC,sBAAsC;IAC1C,MAAMC,KAAIC,QAAQ;QAChB,MAAMC,iBAAiBZ,YAAYU,GAAG,CAACC;QAEvC,IAAIC,gBAAgB;YAClBV,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,MAAMC;QACR;QAEA,MAAMC,eAAehB,YAAYa,GAAG,CAACC;QAErC,IAAI,CAACE,cAAc;YACjBX,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;YACzB,OAAOH;QACT;QAEA,MAAMV,QAAQe,aAAaf,KAAK;QAChC,IACEgB,YAAYC,UAAU,GAAGD,YAAYE,GAAG,KACxClB,MAAMmB,SAAS,GAAGnB,MAAMoB,UAAU,GAAG,MACrC;YACA,qEAAqE;YACrE,yEAAyE;YACzE,kBA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AAiB;gBACjBzC;YACF;YAEAG,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU;QAC3B,EAAE,OAAO8B,KAAK;YACZ,+DAA+D;YAC/DvC,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,OAAOS,UAAU,UAAU8B;QACrC,SAAU;YACRd;YACA3B,YAAY0C,MAAM,CAAC/B;QACrB;IACF;IAEA,MAAMgC;IACJ,gDAAgD;IAClD;IAEA,MAAMC,eAAc,GAAGzB,IAAI;QACzB,MAAM0B,aAAaC,KAAKC,GAAG,IACtB5B,KAAK6B,GAAG,CAAC,CAACC,MAAQrD,ySAAAA,CAAac,GAAG,CAACuC,QAAQ;QAGhD/C,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,iBAAiB;YAAEiB;YAAM0B;QAAW;QAE5C,OAAOA;IACT;IAEA,MAAMK,YAAW,GAAG/B,IAAI;QACtB,MAAMF,YAAY6B,KAAKK,KAAK,CAACrC,YAAYC,UAAU,GAAGD,YAAYE,GAAG;QACrEd,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,cAAc;YAAEiB;YAAMF;QAAU;QAExC,KAAK,MAAMgC,OAAO9B,KAAM;YACtB,kCAAkC;YAClCvB,ySAAAA,CAAa6B,GAAG,CAACwB,KAAKhC;QACxB;IACF;AACF;uCAEeR,oBAAmB","ignoreList":[0]}}, + {"offset": {"line": 5921, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/use-cache/handlers.ts"],"sourcesContent":["import DefaultCacheHandler from '../lib/cache-handlers/default.external'\nimport type { CacheHandlerCompat } from '../lib/cache-handlers/types'\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n ? (message: string, ...args: any[]) => {\n console.log(`use-cache: ${message}`, ...args)\n }\n : undefined\n\nconst handlersSymbol = Symbol.for('@next/cache-handlers')\nconst handlersMapSymbol = Symbol.for('@next/cache-handlers-map')\nconst handlersSetSymbol = Symbol.for('@next/cache-handlers-set')\n\n/**\n * The reference to the cache handlers. We store the cache handlers on the\n * global object so that we can access the same instance across different\n * boundaries (such as different copies of the same module).\n */\nconst reference: typeof globalThis & {\n [handlersSymbol]?: {\n RemoteCache?: CacheHandlerCompat\n DefaultCache?: CacheHandlerCompat\n }\n [handlersMapSymbol]?: Map\n [handlersSetSymbol]?: Set\n} = globalThis\n\n/**\n * Initialize the cache handlers.\n * @returns `true` if the cache handlers were initialized, `false` if they were already initialized.\n */\nexport function initializeCacheHandlers(): boolean {\n // If the cache handlers have already been initialized, don't do it again.\n if (reference[handlersMapSymbol]) {\n debug?.('cache handlers already initialized')\n return false\n }\n\n debug?.('initializing cache handlers')\n reference[handlersMapSymbol] = new Map()\n\n // Initialize the cache from the symbol contents first.\n if (reference[handlersSymbol]) {\n let fallback: CacheHandlerCompat\n if (reference[handlersSymbol].DefaultCache) {\n debug?.('setting \"default\" cache handler from symbol')\n fallback = reference[handlersSymbol].DefaultCache\n } else {\n debug?.('setting \"default\" cache handler from default')\n fallback = DefaultCacheHandler\n }\n\n reference[handlersMapSymbol].set('default', fallback)\n\n if (reference[handlersSymbol].RemoteCache) {\n debug?.('setting \"remote\" cache handler from symbol')\n reference[handlersMapSymbol].set(\n 'remote',\n reference[handlersSymbol].RemoteCache\n )\n } else {\n debug?.('setting \"remote\" cache handler from default')\n reference[handlersMapSymbol].set('remote', fallback)\n }\n } else {\n debug?.('setting \"default\" cache handler from default')\n reference[handlersMapSymbol].set('default', DefaultCacheHandler)\n debug?.('setting \"remote\" cache handler from default')\n reference[handlersMapSymbol].set('remote', DefaultCacheHandler)\n }\n\n // Create a set of the cache handlers.\n reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values())\n\n return true\n}\n\n/**\n * Get a cache handler by kind.\n * @param kind - The kind of cache handler to get.\n * @returns The cache handler, or `undefined` if it does not exist.\n * @throws If the cache handlers are not initialized.\n */\nexport function getCacheHandler(kind: string): CacheHandlerCompat | undefined {\n // This should never be called before initializeCacheHandlers.\n if (!reference[handlersMapSymbol]) {\n throw new Error('Cache handlers not initialized')\n }\n\n return reference[handlersMapSymbol].get(kind)\n}\n\n/**\n * Get a set iterator over the cache handlers.\n * @returns An iterator over the cache handlers, or `undefined` if they are not\n * initialized.\n */\nexport function getCacheHandlers():\n | SetIterator\n | undefined {\n if (!reference[handlersSetSymbol]) {\n return undefined\n }\n\n return reference[handlersSetSymbol].values()\n}\n\n/**\n * Get a map iterator over the cache handlers (keyed by kind).\n * @returns An iterator over the cache handler entries, or `undefined` if they\n * are not initialized.\n * @throws If the cache handlers are not initialized.\n */\nexport function getCacheHandlerEntries():\n | MapIterator<[string, CacheHandlerCompat]>\n | undefined {\n if (!reference[handlersMapSymbol]) {\n return undefined\n }\n\n return reference[handlersMapSymbol].entries()\n}\n\n/**\n * Set a cache handler by kind.\n * @param kind - The kind of cache handler to set.\n * @param cacheHandler - The cache handler to set.\n */\nexport function setCacheHandler(\n kind: string,\n cacheHandler: CacheHandlerCompat\n): void {\n // This should never be called before initializeCacheHandlers.\n if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) {\n throw new Error('Cache handlers not initialized')\n }\n\n debug?.('setting cache handler for \"%s\"', kind)\n reference[handlersMapSymbol].set(kind, cacheHandler)\n reference[handlersSetSymbol].add(cacheHandler)\n}\n"],"names":["DefaultCacheHandler","debug","process","env","NEXT_PRIVATE_DEBUG_CACHE","message","args","console","log","undefined","handlersSymbol","Symbol","for","handlersMapSymbol","handlersSetSymbol","reference","globalThis","initializeCacheHandlers","Map","fallback","DefaultCache","set","RemoteCache","Set","values","getCacheHandler","kind","Error","get","getCacheHandlers","getCacheHandlerEntries","entries","setCacheHandler","cacheHandler","add"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,yBAAyB,yCAAwC;;AAGxE,MAAMC,QAAQC,QAAQC,GAAG,CAACC,wBAAwB,GAC9C,CAACC,SAAiB,GAAGC;IACnBC,QAAQC,GAAG,CAAC,CAA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ACF,kBAAkB,CAACQ,GAAG,CAAC,UAAUrB,wRAAAA;IAC7C;IAEA,sCAAsC;IACtCe,SAAS,CAACD,kBAAkB,GAAG,IAAIS,IAAIR,SAAS,CAACF,kBAAkB,CAACW,MAAM;IAE1E,OAAO;AACT;AAQO,SAASC,gBAAgBC,IAAY;IAC1C,8DAA8D;IAC9D,IAAI,CAACX,SAAS,CAACF,kBAAkB,EAAE;QACjC,MAAM,OAAA,cAA2C,CAA3C,IAAIc,MAAM,mCAAV,qBAAA;mBAAA;wBAAA;0BAAA;QAA0C;IAClD;IAEA,OAAOZ,SAAS,CAACF,kBAAkB,CAACe,GAAG,CAACF;AAC1C;AAOO,SAASG;IAGd,IAAI,CAACd,SAAS,CAACD,kBAAkB,EAAE;QACjC,OAAOL;IACT;IAEA,OAAOM,SAAS,CAACD,kBAAkB,CAACU,MAAM;AAC5C;AAQO,SAASM;IAGd,IAAI,CAACf,SAAS,CAACF,kBAAkB,EAAE;QACjC,OAAOJ;IACT;IAEA,OAAOM,SAAS,CAACF,kBAAkB,CAACkB,OAAO;AAC7C;AAOO,SAASC,gBACdN,IAAY,EACZO,YAAgC;IAEhC,8DAA8D;IAC9D,IAAI,CAAClB,SAAS,CAACF,kBAAkB,IAAI,CAACE,SAAS,CAACD,kBAAkB,EAAE;QAClE,MAAM,OAAA,cAA2C,CAA3C,IAAIa,MAAM,mCAAV,qBAAA;mBAAA;wBAAA;0BAAA;QAA0C;IAClD;IAEA1B,SAAAA,OAAAA,KAAAA,IAAAA,MAAQ,kCAAkCyB;IAC1CX,SAAS,CAACF,kBAAkB,CAACQ,GAAG,CAACK,MAAMO;IACvClB,SAAS,CAACD,kBAAkB,CAACoB,GAAG,CAACD;AACnC","ignoreList":[0]}}, + {"offset": {"line": 6022, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/revalidation-utils.ts"],"sourcesContent":["import type { WorkStore } from './app-render/work-async-storage.external'\nimport type { IncrementalCache } from './lib/incremental-cache'\nimport { getCacheHandlers } from './use-cache/handlers'\n\n/** Run a callback, and execute any *new* revalidations added during its runtime. */\nexport async function withExecuteRevalidates(\n store: WorkStore | undefined,\n callback: () => Promise\n): Promise {\n if (!store) {\n return callback()\n }\n // If we executed any revalidates during the request, then we don't want to execute them again.\n // save the state so we can check if anything changed after we're done running callbacks.\n const savedRevalidationState = cloneRevalidationState(store)\n try {\n return await callback()\n } finally {\n // Check if we have any new revalidates, and if so, wait until they are all resolved.\n const newRevalidates = diffRevalidationState(\n savedRevalidationState,\n cloneRevalidationState(store)\n )\n await executeRevalidates(store, newRevalidates)\n }\n}\n\ntype RevalidationState = Required<\n Pick<\n WorkStore,\n 'pendingRevalidatedTags' | 'pendingRevalidates' | 'pendingRevalidateWrites'\n >\n>\n\nfunction cloneRevalidationState(store: WorkStore): RevalidationState {\n return {\n pendingRevalidatedTags: store.pendingRevalidatedTags\n ? [...store.pendingRevalidatedTags]\n : [],\n pendingRevalidates: { ...store.pendingRevalidates },\n pendingRevalidateWrites: store.pendingRevalidateWrites\n ? [...store.pendingRevalidateWrites]\n : [],\n }\n}\n\nfunction diffRevalidationState(\n prev: RevalidationState,\n curr: RevalidationState\n): RevalidationState {\n const prevTags = new Set(prev.pendingRevalidatedTags)\n const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites)\n return {\n pendingRevalidatedTags: curr.pendingRevalidatedTags.filter(\n (tag) => !prevTags.has(tag)\n ),\n pendingRevalidates: Object.fromEntries(\n Object.entries(curr.pendingRevalidates).filter(\n ([key]) => !(key in prev.pendingRevalidates)\n )\n ),\n pendingRevalidateWrites: curr.pendingRevalidateWrites.filter(\n (promise) => !prevRevalidateWrites.has(promise)\n ),\n }\n}\n\nasync function revalidateTags(\n tags: string[],\n incrementalCache: IncrementalCache | undefined\n): Promise {\n if (tags.length === 0) {\n return\n }\n\n const promises: Promise[] = []\n\n if (incrementalCache) {\n promises.push(incrementalCache.revalidateTag(tags))\n }\n\n const handlers = getCacheHandlers()\n if (handlers) {\n for (const handler of handlers) {\n promises.push(handler.expireTags(...tags))\n }\n }\n\n await Promise.all(promises)\n}\n\nexport async function executeRevalidates(\n workStore: WorkStore,\n state?: RevalidationState\n) {\n const pendingRevalidatedTags =\n state?.pendingRevalidatedTags ?? workStore.pendingRevalidatedTags ?? []\n\n const pendingRevalidates =\n state?.pendingRevalidates ?? workStore.pendingRevalidates ?? {}\n\n const pendingRevalidateWrites =\n state?.pendingRevalidateWrites ?? workStore.pendingRevalidateWrites ?? []\n\n return Promise.all([\n revalidateTags(pendingRevalidatedTags, workStore.incrementalCache),\n ...Object.values(pendingRevalidates),\n ...pendingRevalidateWrites,\n ])\n}\n"],"names":["getCacheHandlers","withExecuteRevalidates","store","callback","savedRevalidationState","cloneRevalidationState","newRevalidates","diffRevalidationState","executeRevalidates","pendingRevalidatedTags","pendingRevalidates","pendingRevalidateWrites","prev","curr","prevTags","Set","prevRevalidateWrites","filter","tag","has","Object","fromEntries","entries","key","promise","revalidateTags","tags","incrementalCache","length","promises","push","revalidateTag","handlers","handler","expireTags","Promise","all","workStore","state","values"],"mappings":";;;;;;AAEA,SAASA,gBAAgB,QAAQ,uBAAsB;;AAGhD,eAAeC,uBACpBC,KAA4B,EAC5BC,QAA0B;IAE1B,IAAI,CAACD,OAAO;QACV,OAAOC;IACT;IACA,+FAA+F;IAC/F,yFAAyF;IACzF,MAAMC,yBAAyBC,uBAAuBH;IACtD,IAAI;QACF,OAAO,MAAMC;IACf,SAAU;QACR,qFAAqF;QACrF,MAAMG,iBAAiBC,sBACrBH,wBACAC,uBAAuBH;QAEzB,MAAMM,mBAAmBN,OAAOI;IAClC;AACF;AASA,SAASD,uBAAuBH,KAAgB;IAC9C,OAAO;QACLO,wBAAwBP,MAAMO,sBAAsB,GAChD;eAAIP,MAAMO,sBAAsB;SAAC,GACjC,EAAE;QACNC,oBAAoB;YAAE,GAAGR,MAAMQ,kBAAkB;QAAC;QAClDC,yBAAy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E,MAAMC,0BACJ2B,CAAAA,SAAAA,OAAAA,KAAAA,IAAAA,MAAO3B,uBAAuB,KAAI0B,UAAU1B,uBAAuB,IAAI,EAAE;IAE3E,OAAOwB,QAAQC,GAAG,CAAC;QACjBX,eAAehB,wBAAwB4B,UAAUV,gBAAgB;WAC9DP,OAAOmB,MAAM,CAAC7B;WACdC;KACJ;AACH","ignoreList":[0]}}, + {"offset": {"line": 6097, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/app-render/after-task-async-storage-instance.ts"],"sourcesContent":["import type { AfterTaskAsyncStorage } from './after-task-async-storage.external'\nimport { createAsyncLocalStorage } from './async-local-storage'\n\nexport const afterTaskAsyncStorageInstance: AfterTaskAsyncStorage =\n createAsyncLocalStorage()\n"],"names":["createAsyncLocalStorage","afterTaskAsyncStorageInstance"],"mappings":";;;;AACA,SAASA,uBAAuB,QAAQ,wBAAuB;;AAExD,MAAMC,oCACXD,mSAAAA,GAAyB","ignoreList":[0]}}, + {"offset": {"line": 6108, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/app-render/after-task-async-storage.external.ts"],"sourcesContent":["import type { AsyncLocalStorage } from 'async_hooks'\n\n// Share the instance module in the next-shared layer\nimport { afterTaskAsyncStorageInstance as afterTaskAsyncStorage } from './after-task-async-storage-instance' with { 'turbopack-transition': 'next-shared' }\nimport type { WorkUnitStore } from './work-unit-async-storage.external'\n\nexport interface AfterTaskStore {\n /** The phase in which the topmost `after` was called.\n *\n * NOTE: Can be undefined when running `generateStaticParams`,\n * where we only have a `workStore`, no `workUnitStore`.\n */\n readonly rootTaskSpawnPhase: WorkUnitStore['phase'] | undefined\n}\n\nexport type AfterTaskAsyncStorage = AsyncLocalStorage\n\nexport { afterTaskAsyncStorage }\n"],"names":["afterTaskAsyncStorageInstance","afterTaskAsyncStorage"],"mappings":"AAEA,qDAAqD;;AACrD,SAASA,iCAAiCC,qBAAqB,QAAQ,2CAA2C","ignoreList":[0]}}, + {"offset": {"line": 6127, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/after/after-context.ts"],"sourcesContent":["import PromiseQueue from 'next/dist/compiled/p-queue'\nimport type { RequestLifecycleOpts } from '../base-server'\nimport type { AfterCallback, AfterTask } from './after'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { withExecuteRevalidates } from '../revalidation-utils'\nimport { bindSnapshot } from '../app-render/async-local-storage'\nimport {\n workUnitAsyncStorage,\n type WorkUnitStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\n\nexport type AfterContextOpts = {\n waitUntil: RequestLifecycleOpts['waitUntil'] | undefined\n onClose: RequestLifecycleOpts['onClose']\n onTaskError: RequestLifecycleOpts['onAfterTaskError'] | undefined\n}\n\nexport class AfterContext {\n private waitUntil: RequestLifecycleOpts['waitUntil'] | undefined\n private onClose: RequestLifecycleOpts['onClose']\n private onTaskError: RequestLifecycleOpts['onAfterTaskError'] | undefined\n\n private runCallbacksOnClosePromise: Promise | undefined\n private callbackQueue: PromiseQueue\n private workUnitStores = new Set()\n\n constructor({ waitUntil, onClose, onTaskError }: AfterContextOpts) {\n this.waitUntil = waitUntil\n this.onClose = onClose\n this.onTaskError = onTaskError\n\n this.callbackQueue = new PromiseQueue()\n this.callbackQueue.pause()\n }\n\n public after(task: AfterTask): void {\n if (isThenable(task)) {\n if (!this.waitUntil) {\n errorWaitUntilNotAvailable()\n }\n this.waitUntil(\n task.catch((error) => this.reportTaskError('promise', error))\n )\n } else if (typeof task === 'function') {\n // TODO(after): implement tracing\n this.addCallback(task)\n } else {\n throw new Error('`after()`: Argument must be a promise or a function')\n }\n }\n\n private addCallback(callback: AfterCallback) {\n // if something is wrong, throw synchronously, bubbling up to the `after` callsite.\n if (!this.waitUntil) {\n errorWaitUntilNotAvailable()\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n this.workUnitStores.add(workUnitStore)\n }\n\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n\n // This is used for checking if request APIs can be called inside `after`.\n // Note that we need to check the phase in which the *topmost* `after` was called (which should be \"action\"),\n // not the current phase (which might be \"after\" if we're in a nested after).\n // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`.\n const rootTaskSpawnPhase = afterTaskStore\n ? afterTaskStore.rootTaskSpawnPhase // nested after\n : workUnitStore?.phase // topmost after\n\n // this should only happen once.\n if (!this.runCallbacksOnClosePromise) {\n this.runCallbacksOnClosePromise = this.runCallbacksOnClose()\n this.waitUntil(this.runCallbacksOnClosePromise)\n }\n\n // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es).\n // We do this because we want all of these to be equivalent in every regard except timing:\n // after(() => x())\n // after(x())\n // await x()\n const wrappedCallback = bindSnapshot(async () => {\n try {\n await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, () =>\n callback()\n )\n } catch (error) {\n this.reportTaskError('function', error)\n }\n })\n\n this.callbackQueue.add(wrappedCallback)\n }\n\n private async runCallbacksOnClose() {\n await new Promise((resolve) => this.onClose!(resolve))\n return this.runCallbacks()\n }\n\n private async runCallbacks(): Promise {\n if (this.callbackQueue.size === 0) return\n\n for (const workUnitStore of this.workUnitStores) {\n workUnitStore.phase = 'after'\n }\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in AfterContext.runCallbacks')\n }\n\n return withExecuteRevalidates(workStore, () => {\n this.callbackQueue.start()\n return this.callbackQueue.onIdle()\n })\n }\n\n private reportTaskError(taskKind: 'promise' | 'function', error: unknown) {\n // TODO(after): this is fine for now, but will need better intergration with our error reporting.\n // TODO(after): should we log this if we have a onTaskError callback?\n console.error(\n taskKind === 'promise'\n ? `A promise passed to \\`after()\\` rejected:`\n : `An error occurred in a function passed to \\`after()\\`:`,\n error\n )\n if (this.onTaskError) {\n // this is very defensive, but we really don't want anything to blow up in an error handler\n try {\n this.onTaskError?.(error)\n } catch (handlerError) {\n console.error(\n new InvariantError(\n '`onTaskError` threw while handling an error thrown from an `after` task',\n {\n cause: handlerError,\n }\n )\n )\n }\n }\n }\n}\n\nfunction errorWaitUntilNotAvailable(): never {\n throw new Error(\n '`after()` will not work correctly, because `waitUntil` is not available in the current environment.'\n )\n}\n"],"names":["PromiseQueue","InvariantError","isThenable","workAsyncStorage","withExecuteRevalidates","bindSnapshot","workUnitAsyncStorage","afterTaskAsyncStorage","AfterContext","constructor","waitUntil","onClose","onTaskError","workUnitStores","Set","callbackQueue","pause","after","task","errorWaitUntilNotAvailable","catch","error","reportTaskError","addCallback","Error","callback","workUnitStore","getStore","add","afterTaskStore","rootTaskSpawnPhase","phase","runCallbacksOnClosePromise","runCallbacksOnClose","wrappedCallback","run","Promise","resolve","runCallbacks","size","workStore","start","onIdle","taskKind","console","handlerError","cause"],"mappings":";;;;AAAA,OAAOA,kBAAkB,6BAA4B;AAGrD,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SAASC,UAAU,QAAQ,+BAA8B;;AACzD,SAASC,gBAAgB,QAAQ,4CAA2C;AAC5E,SAASC,sBAAsB,QAAQ,wBAAuB;AAC9D,SAASC,YAAY,QAAQ,oCAAmC;;AAChE,SACEC,oBAAoB,QAEf,iDAAgD;;AACvD,SAASC,qBAAqB,QAAQ,kDAAiD;;;;;;;;;AAQhF,MAAMC;IASXC,YAAY,EAAEC,SAAS,EAAEC,OAAO,EAAEC,WAAW,EAAoB,CAAE;aAF3DC,cAAAA,GAAiB,IAAIC;QAG3B,IAAI,CAACJ,SAAS,GAAGA;QACjB,IAAI,CAACC,OAAO,GAAGA;QACf,IAAI,CAACC,WAAW,GAAGA;QAEnB,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;oBACE6C,OAAOD;gBACT,IAJF,qBAAA;2BAAA;gCAAA;kCAAA;gBAKA;YAEJ;QACF;IACF;AACF;AAEA,SAAS1B;IACP,MAAM,OAAA,cAEL,CAFK,IAAIK,MACR,wGADI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF","ignoreList":[0]}}, + {"offset": {"line": 6267, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/lib/lazy-result.ts"],"sourcesContent":["export type LazyResult = PromiseLike & { value?: TValue }\nexport type ResolvedLazyResult = PromiseLike & { value: TValue }\n\n/**\n * Calls the given async 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(\n fn: () => Promise\n): LazyResult {\n let pendingResult: Promise | undefined\n\n const result: LazyResult = {\n then(onfulfilled, onrejected) {\n if (!pendingResult) {\n pendingResult = 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(\n result: LazyResult\n): result is ResolvedLazyResult {\n return result.hasOwnProperty('value')\n}\n"],"names":["createLazyResult","fn","pendingResult","result","then","onfulfilled","onrejected","value","catch","isResolvedLazyResult","hasOwnProperty"],"mappings":"AAGA;;;;CAIC,GACD;;;;;;AAAO,SAASA,iBACdC,EAAyB;IAEzB,IAAIC;IAEJ,MAAMC,SAA6B;QACjCC,MAAKC,WAAW,EAAEC,UAAU;YAC1B,IAAI,CAACJ,eAAe;gBAClBA,gBAAgBD;YAClB;YAEAC,cACGE,IAAI,CAAC,CAACG;gBACLJ,OAAOI,KAAK,GAAGA;YACjB,GACCC,KAAK,CAAC;YACL,sEAAsE;YACtE,qEAAqE;YACrE,aAAa;YACf;YAEF,OAAON,cAAcE,IAAI,CAACC,aAAaC;QACzC;IACF;IAEA,OAAOH;AACT;AAEO,SAASM,qBACdN,MAA0B;IAE1B,OAAOA,OAAOO,cAAc,CAAC;AAC/B","ignoreList":[0]}}, + {"offset": {"line": 6303, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/async-storage/work-store.ts"],"sourcesContent":["import type { WorkStore } from '../app-render/work-async-storage.external'\nimport type { IncrementalCache } from '../lib/incremental-cache'\nimport type { RenderOpts } from '../app-render/types'\nimport type { FetchMetric } from '../base-http'\nimport type { RequestLifecycleOpts } from '../base-server'\nimport type { AppSegmentConfig } from '../../build/segment-config/app/app-segment-config'\nimport type { CacheLife } from '../use-cache/cache-life'\n\nimport { AfterContext } from '../after/after-context'\n\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { createLazyResult, type LazyResult } from '../lib/lazy-result'\nimport { getCacheHandlerEntries } from '../use-cache/handlers'\nimport { createSnapshot } from '../app-render/async-local-storage'\n\nexport type WorkStoreContext = {\n /**\n * The page that is being rendered. This relates to the path to the page file.\n */\n page: string\n\n isPrefetchRequest?: boolean\n renderOpts: {\n cacheLifeProfiles?: { [profile: string]: CacheLife }\n incrementalCache?: IncrementalCache\n isOnDemandRevalidate?: boolean\n fetchCache?: AppSegmentConfig['fetchCache']\n isPossibleServerAction?: boolean\n pendingWaitUntil?: Promise\n experimental: Pick<\n RenderOpts['experimental'],\n 'isRoutePPREnabled' | 'cacheComponents' | 'authInterrupts'\n >\n\n /**\n * Fetch metrics attached in patch-fetch.ts\n **/\n fetchMetrics?: FetchMetric[]\n\n /**\n * A hack around accessing the store value outside the context of the\n * request.\n *\n * @internal\n * @deprecated should only be used as a temporary workaround\n */\n // TODO: remove this when we resolve accessing the store outside the execution context\n store?: WorkStore\n } & Pick<\n // Pull some properties from RenderOpts so that the docs are also\n // mirrored.\n RenderOpts,\n | 'assetPrefix'\n | 'supportsDynamicResponse'\n | 'shouldWaitOnAllReady'\n | 'isRevalidate'\n | 'nextExport'\n | 'isDraftMode'\n | 'isDebugDynamicAccesses'\n | 'dev'\n | 'hasReadableErrorStacks'\n > &\n RequestLifecycleOpts &\n Partial>\n\n /**\n * The build ID of the current build.\n */\n buildId: string\n\n // Tags that were previously revalidated (e.g. by a redirecting server action)\n // and have already been sent to cache handlers.\n previouslyRevalidatedTags: string[]\n}\n\nexport function createWorkStore({\n page,\n renderOpts,\n isPrefetchRequest,\n buildId,\n previouslyRevalidatedTags,\n}: WorkStoreContext): WorkStore {\n /**\n * Rules of Static & Dynamic HTML:\n *\n * 1.) We must generate static HTML unless the caller explicitly opts\n * in to dynamic HTML support.\n *\n * 2.) If dynamic HTML support is requested, we must honor that request\n * or throw an error. It is the sole responsibility of the caller to\n * ensure they aren't e.g. requesting dynamic HTML for an AMP page.\n *\n * 3.) If the request is in draft mode, we must generate dynamic HTML.\n *\n * 4.) If the request is a server action, we must generate dynamic HTML.\n *\n * These rules help ensure that other existing features like request caching,\n * coalescing, and ISR continue working as intended.\n */\n const isStaticGeneration =\n !renderOpts.shouldWaitOnAllReady &&\n !renderOpts.supportsDynamicResponse &&\n !renderOpts.isDraftMode &&\n !renderOpts.isPossibleServerAction\n\n const isDevelopment = renderOpts.dev ?? false\n\n const shouldTrackFetchMetrics =\n isDevelopment ||\n // The only times we want to track fetch metrics outside of development is\n // when we are performing a static generation and we either are in debug\n // mode, or tracking fetch metrics was specifically opted into.\n (isStaticGeneration &&\n (!!process.env.NEXT_DEBUG_BUILD ||\n process.env.NEXT_SSG_FETCH_METRICS === '1'))\n\n const store: WorkStore = {\n isStaticGeneration,\n page,\n route: normalizeAppPath(page),\n incrementalCache:\n // we fallback to a global incremental cache for edge-runtime locally\n // so that it can access the fs cache without mocks\n renderOpts.incrementalCache || (globalThis as any).__incrementalCache,\n cacheLifeProfiles: renderOpts.cacheLifeProfiles,\n isRevalidate: renderOpts.isRevalidate,\n isBuildTimePrerendering: renderOpts.nextExport,\n hasReadableErrorStacks: renderOpts.hasReadableErrorStacks,\n fetchCache: renderOpts.fetchCache,\n isOnDemandRevalidate: renderOpts.isOnDemandRevalidate,\n\n isDraftMode: renderOpts.isDraftMode,\n\n isPrefetchRequest,\n buildId,\n reactLoadableManifest: renderOpts?.reactLoadableManifest || {},\n assetPrefix: renderOpts?.assetPrefix || '',\n\n afterContext: createAfterContext(renderOpts),\n cacheComponentsEnabled: renderOpts.experimental.cacheComponents,\n dev: isDevelopment,\n previouslyRevalidatedTags,\n refreshTagsByCacheKind: createRefreshTagsByCacheKind(),\n runInCleanSnapshot: createSnapshot(),\n shouldTrackFetchMetrics,\n }\n\n // TODO: remove this when we resolve accessing the store outside the execution context\n renderOpts.store = store\n\n return store\n}\n\nfunction createAfterContext(renderOpts: RequestLifecycleOpts): AfterContext {\n const { waitUntil, onClose, onAfterTaskError } = renderOpts\n return new AfterContext({\n waitUntil,\n onClose,\n onTaskError: onAfterTaskError,\n })\n}\n\n/**\n * Creates a map with lazy results that refresh tags for the respective cache\n * kind when they're awaited for the first time.\n */\nfunction createRefreshTagsByCacheKind(): Map> {\n const refreshTagsByCacheKind = new Map>()\n const cacheHandlers = getCacheHandlerEntries()\n\n if (cacheHandlers) {\n for (const [kind, cacheHandler] of cacheHandlers) {\n if ('refreshTags' in cacheHandler) {\n refreshTagsByCacheKind.set(\n kind,\n createLazyResult(async () => cacheHandler.refreshTags())\n )\n }\n }\n }\n\n return refreshTagsByCacheKind\n}\n"],"names":["AfterContext","normalizeAppPath","createLazyResult","getCacheHandlerEntries","createSnapshot","createWorkStore","page","renderOpts","isPrefetchRequest","buildId","previouslyRevalidatedTags","isStaticGeneration","shouldWaitOnAllReady","supportsDynamicResponse","isDraftMode","isPossibleServerAction","isDevelopment","dev","shouldTrackFetchMetrics","process","env","NEXT_DEBUG_BUILD","NEXT_SSG_FETCH_METRICS","store","route","incrementalCache","globalThis","__incrementalCache","cacheLifeProfiles","isRevalidate","isBuildTimePrerendering","nextExport","hasReadableErrorStacks","fetchCache","isOnDemandRevalidate","reactLoadableManifest","assetPrefix","afterContext","createAfterContext","cacheComponentsEnabled","experimental","cacheComponents","refreshTagsByCacheKind","createRefreshTagsByCacheKind","runInCleanSnapshot","waitUntil","onClose","onAfterTaskError","onTaskError","Map","cacheHandlers","kind","cacheHandler","set","refreshTags"],"mappings":";;;;AAQA,SAASA,YAAY,QAAQ,yBAAwB;AAErD,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,gBAAgB,QAAyB,qBAAoB;AACtE,SAASC,sBAAsB,QAAQ,wBAAuB;AAC9D,SAASC,cAAc,QAAQ,oCAAmC;;;;;;AA8D3D,SAASC,gBAAgB,EAC9BC,IAAI,EACJC,UAAU,EACVC,iBAAiB,EACjBC,OAAO,EACPC,yBAAyB,EACR;IACjB;;;;;;;;;;;;;;;;GAgBC,GACD,MAAMC,qBACJ,CAACJ,WAAWK,oBAAoB,IAChC,CAACL,WAAWM,uBAAuB,IACnC,CAACN,WAAWO,WAAW,IACvB,CAACP,WAAWQ,sBAAsB;IAEpC,MAAMC,gBAAgBT,WAAWU,GAAG,IAAI;IAExC,MAAMC,0BACJF,iBACA,0EAA0E;IAC1E,wEAAwE;IACxE,+DAA+D;IAC9DL,sBACE,CAAA,CAAC,CAACQ,QAAQC,GAAG,CAACC,gBAAgB,IAC7BF,QAAQC,GAAG,CAACE,sBAAsB,KAAK,GAAE;IAE/C,MAAMC,QAAmB;QACvBZ;QACAL;QACAkB,WAAOvB,wRAAAA,EAAiBK;QACxBmB,kBACE,AACA,mDAAmD,kBADkB;QAErElB,WAAWkB,gBAAgB,IAAKC,WAAmBC,kBAAkB;QACvEC,mBAAmBrB,WAAWqB,iBAAiB;QAC/CC,cAActB,WAAWsB,YAAY;QACrCC,yBAAyBvB,WAAWwB,UAAU;QAC9CC,wBAAwBzB,WAAWyB,sBAAsB;QACzDC,YAAY1B,WAAW0B,UAAU;QACjCC,sBAAsB3B,WAAW2B,oBAAoB;QAErDpB,aAAaP,WAAWO,WAAW;QAEnCN;QACAC;QACA0B,uBAAuB5B,CAAAA,cAAAA,OAAAA,KAAAA,IAAAA,WAAY4B,qBAAqB,KAAI,CAAC;QAC7DC,aAAa7B,CAAAA,cAAAA,OAAAA,KAAAA,IAAAA,WAAY6B,WAAW,KAAI;QAExCC,cAAcC,mBAAmB/B;QACjCgC,wBAAwBhC,WAAWiC,YAAY,CAACC,eAAe;QAC/DxB,KAAKD;QACLN;QACAgC,wBAAwBC;QACxBC,wBAAoBxC,0RAAAA;QACpBc;IACF;IAEA,sFAAsF;IACtFX,WAAWgB,KAAK,GAAGA;IAEnB,OAAOA;AACT;AAEA,SAASe,mBAAmB/B,UAAgC;IAC1D,MAAM,EAAEsC,SAAS,EAAEC,OAAO,EAAEC,gBAAgB,EAAE,GAAGxC;IACjD,OAAO,IAAIP,uQAAAA,CAAa;QACtB6C;QACAC;QACAE,aAAaD;IACf;AACF;AAEA;;;CAGC,GACD,SAASJ;IACP,MAAMD,yBAAyB,IAAIO;IACnC,MAAMC,oBAAgB/C,gRAAAA;IAEtB,IAAI+C,eAAe;QACjB,KAAK,MAAM,CAACC,MAAMC,aAAa,IAAIF,cAAe;YAChD,IAAI,iBAAiBE,cAAc;gBACjCV,uBAAuBW,GAAG,CACxBF,UACAjD,uQAAAA,EAAiB,UAAYkD,aAAaE,WAAW;YAEzD;QACF;IACF;IAEA,OAAOZ;AACT","ignoreList":[0]}}, + {"offset": {"line": 6396, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/web-on-close.ts"],"sourcesContent":["/** Monitor when the consumer finishes reading the response body.\nthat's as close as we can get to `res.on('close')` using web APIs.\n*/\nexport function trackBodyConsumed(\n body: string | ReadableStream,\n onEnd: () => void\n): BodyInit {\n if (typeof body === 'string') {\n const generator = async function* generate() {\n const encoder = new TextEncoder()\n yield encoder.encode(body)\n onEnd()\n }\n // @ts-expect-error BodyInit typings doesn't seem to include AsyncIterables even though it's supported in practice\n return generator()\n } else {\n return trackStreamConsumed(body, onEnd)\n }\n}\n\nexport function trackStreamConsumed(\n stream: ReadableStream,\n onEnd: () => void\n): ReadableStream {\n // NOTE: This function must handle `stream` being aborted or cancelled,\n // so it can't just be this:\n //\n // return stream.pipeThrough(new TransformStream({ flush() { onEnd() } }))\n //\n // because that doesn't handle cancellations.\n // (and cancellation handling via `Transformer.cancel` is only available in node >20)\n const dest = new TransformStream()\n const runOnEnd = () => onEnd()\n stream.pipeTo(dest.writable).then(runOnEnd, runOnEnd)\n return dest.readable\n}\n\nexport class CloseController {\n private target = new EventTarget()\n listeners = 0\n isClosed = false\n\n onClose(callback: () => void) {\n if (this.isClosed) {\n throw new Error('Cannot subscribe to a closed CloseController')\n }\n\n this.target.addEventListener('close', callback)\n this.listeners++\n }\n\n dispatchClose() {\n if (this.isClosed) {\n throw new Error('Cannot close a CloseController multiple times')\n }\n if (this.listeners > 0) {\n this.target.dispatchEvent(new Event('close'))\n }\n this.isClosed = true\n }\n}\n"],"names":["trackBodyConsumed","body","onEnd","generator","generate","encoder","TextEncoder","encode","trackStreamConsumed","stream","dest","TransformStream","runOnEnd","pipeTo","writable","then","readable","CloseController","onClose","callback","isClosed","Error","target","addEventListener","listeners","dispatchClose","dispatchEvent","Event","EventTarget"],"mappings":"AAAA;;AAEA,GACA;;;;;;;;AAAO,SAASA,kBACdC,IAA6B,EAC7BC,KAAiB;IAEjB,IAAI,OAAOD,SAAS,UAAU;QAC5B,MAAME,YAAY,gBAAgBC;YAChC,MAAMC,UAAU,IAAIC;YACpB,MAAMD,QAAQE,MAAM,CAACN;YACrBC;QACF;QACA,kHAAkH;QAClH,OAAOC;IACT,OAAO;QACL,OAAOK,oBAAoBP,MAAMC;IACnC;AACF;AAEO,SAASM,oBACdC,MAA8B,EAC9BP,KAAiB;IAEjB,uEAAuE;IACvE,4BAA4B;IAC5B,EAAE;IACF,4EAA4E;IAC5E,EAAE;IACF,6CAA6C;IAC7C,qFAAqF;IACrF,MAAMQ,OAAO,IAAIC;IACjB,MAAMC,WAAW,IAAMV;IACvBO,OAAOI,MAAM,CAACH,KAAKI,QAAQ,EAAEC,IAAI,CAACH,UAAUA;IAC5C,OAAOF,KAAKM,QAAQ;AACtB;AAEO,MAAMC;IAKXC,QAAQC,QAAoB,EAAE;QAC5B,IAAI,IAAI,CAACC,QAAQ,EAAE;YACjB,MAAM,OAAA,cAAyD,CAAzD,IAAIC,MAAM,iDAAV,qBAAA;uBAAA;4BAAA;8BAAA;YAAwD;QAChE;QAEA,IAAI,CAACC,MAAM,CAACC,gBAAgB,CAAC,SAASJ;QACtC,IAAI,CAACK,SAAS;IAChB;IAEAC,gBAAgB;QACd,IAAI,IAAI,CAACL,QAAQ,EAAE;YACjB,MAAM,OAAA,cAA0D,CAA1D,IAAIC,MAAM,kDAAV,qBAAA;uBAAA;4BAAA;8BAAA;YAAyD;QACjE;QACA,IAAI,IAAI,CAACG,SAAS,GAAG,GAAG;YACtB,IAAI,CAACF,MAAM,CAACI,aAAa,CAAC,IAAIC,MAAM;QACtC;QACA,IAAI,CAACP,QAAQ,GAAG;IAClB;;aArBQE,MAAAA,GAAS,IAAIM;aACrBJ,SAAAA,GAAY;aACZJ,QAAAA,GAAW;;AAoBb","ignoreList":[0]}}, + {"offset": {"line": 6467, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/get-edge-preview-props.ts"],"sourcesContent":["/**\n * In edge runtime, these props directly accessed from environment variables.\n * - local: env vars will be injected through edge-runtime as runtime env vars\n * - deployment: env vars will be replaced by edge build pipeline\n */\nexport function getEdgePreviewProps() {\n return {\n previewModeId: process.env.__NEXT_PREVIEW_MODE_ID || '',\n previewModeSigningKey: process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY || '',\n previewModeEncryptionKey:\n process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY || '',\n }\n}\n"],"names":["getEdgePreviewProps","previewModeId","process","env","__NEXT_PREVIEW_MODE_ID","previewModeSigningKey","__NEXT_PREVIEW_MODE_SIGNING_KEY","previewModeEncryptionKey","__NEXT_PREVIEW_MODE_ENCRYPTION_KEY"],"mappings":"AAAA;;;;CAIC,GACD;;;;AAAO,SAASA;IACd,OAAO;QACLC,eAAeC,QAAQC,GAAG,CAACC,sBAAsB,IAAI;QACrDC,uBAAuBH,QAAQC,GAAG,CAACG,+BAA+B,IAAI;QACtEC,0BACEL,QAAQC,GAAG,CAACK,kCAAkC,IAAI;IACtD;AACF","ignoreList":[0]}}, + {"offset": {"line": 6486, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/after/builtin-request-context.ts"],"sourcesContent":["import { createAsyncLocalStorage } from '../app-render/async-local-storage'\n\nexport function getBuiltinRequestContext():\n | BuiltinRequestContextValue\n | undefined {\n const _globalThis = globalThis as GlobalThisWithRequestContext\n const ctx = _globalThis[NEXT_REQUEST_CONTEXT_SYMBOL]\n return ctx?.get()\n}\n\nconst NEXT_REQUEST_CONTEXT_SYMBOL = Symbol.for('@next/request-context')\n\ntype GlobalThisWithRequestContext = typeof globalThis & {\n [NEXT_REQUEST_CONTEXT_SYMBOL]?: BuiltinRequestContext\n}\n\n/** A request context provided by the platform. */\nexport type BuiltinRequestContext = {\n get(): BuiltinRequestContextValue | undefined\n}\n\nexport type RunnableBuiltinRequestContext = BuiltinRequestContext & {\n run(value: BuiltinRequestContextValue, callback: () => T): T\n}\n\nexport type BuiltinRequestContextValue = {\n waitUntil?: WaitUntil\n}\nexport type WaitUntil = (promise: Promise) => void\n\n/** \"@next/request-context\" has a different signature from AsyncLocalStorage,\n * matching [AsyncContext.Variable](https://github.com/tc39/proposal-async-context).\n * We don't need a full AsyncContext adapter here, just having `.get()` is enough\n */\nexport function createLocalRequestContext(): RunnableBuiltinRequestContext {\n const storage = createAsyncLocalStorage()\n return {\n get: () => storage.getStore(),\n run: (value, callback) => storage.run(value, callback),\n }\n}\n"],"names":["createAsyncLocalStorage","getBuiltinRequestContext","_globalThis","globalThis","ctx","NEXT_REQUEST_CONTEXT_SYMBOL","get","Symbol","for","createLocalRequestContext","storage","getStore","run","value","callback"],"mappings":";;;;;;AAAA,SAASA,uBAAuB,QAAQ,oCAAmC;;AAEpE,SAASC;IAGd,MAAMC,cAAcC;IACpB,MAAMC,MAAMF,WAAW,CAACG,4BAA4B;IACpD,OAAOD,OAAAA,OAAAA,KAAAA,IAAAA,IAAKE,GAAG;AACjB;AAEA,MAAMD,8BAA8BE,OAAOC,GAAG,CAAC;AAwBxC,SAASC;IACd,MAAMC,cAAUV,mSAAAA;IAChB,OAAO;QACLM,KAAK,IAAMI,QAAQC,QAAQ;QAC3BC,KAAK,CAACC,OAAOC,WAAaJ,QAAQE,GAAG,CAACC,OAAOC;IAC/C;AACF","ignoreList":[0]}}, + {"offset": {"line": 6511, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/lib/implicit-tags.ts"],"sourcesContent":["import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'\nimport type { FallbackRouteParams } from '../request/fallback-params'\nimport { getCacheHandlerEntries } from '../use-cache/handlers'\nimport { createLazyResult, type LazyResult } from './lazy-result'\n\nexport interface ImplicitTags {\n /**\n * For legacy usage, the implicit tags are passed to the incremental cache\n * handler in `get` calls.\n */\n readonly tags: string[]\n\n /**\n * Modern cache handlers don't receive implicit tags. Instead, the implicit\n * tags' expirations are stored in the work unit store, and used to compare\n * with a cache entry's timestamp.\n *\n * Note: This map contains lazy results so that we can evaluate them when the\n * first cache entry is read. It allows us to skip fetching the expiration\n * values if no caches are read at all.\n */\n readonly expirationsByCacheKind: Map>\n}\n\nconst getDerivedTags = (pathname: string): string[] => {\n const derivedTags: string[] = [`/layout`]\n\n // we automatically add the current path segments as tags\n // for revalidatePath handling\n if (pathname.startsWith('/')) {\n const pathnameParts = pathname.split('/')\n\n for (let i = 1; i < pathnameParts.length + 1; i++) {\n let curPathname = pathnameParts.slice(0, i).join('/')\n\n if (curPathname) {\n // all derived tags other than the page are layout tags\n if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) {\n curPathname = `${curPathname}${\n !curPathname.endsWith('/') ? '/' : ''\n }layout`\n }\n derivedTags.push(curPathname)\n }\n }\n }\n return derivedTags\n}\n\n/**\n * Creates a map with lazy results that fetch the expiration value for the given\n * tags and respective cache kind when they're awaited for the first time.\n */\nfunction createTagsExpirationsByCacheKind(\n tags: string[]\n): Map> {\n const expirationsByCacheKind = new Map>()\n const cacheHandlers = getCacheHandlerEntries()\n\n if (cacheHandlers) {\n for (const [kind, cacheHandler] of cacheHandlers) {\n if ('getExpiration' in cacheHandler) {\n expirationsByCacheKind.set(\n kind,\n createLazyResult(async () => cacheHandler.getExpiration(...tags))\n )\n }\n }\n }\n\n return expirationsByCacheKind\n}\n\nexport async function getImplicitTags(\n page: string,\n url: {\n pathname: string\n search?: string\n },\n fallbackRouteParams: null | FallbackRouteParams\n): Promise {\n const tags: string[] = []\n const hasFallbackRouteParams =\n fallbackRouteParams && fallbackRouteParams.size > 0\n\n // Add the derived tags from the page.\n const derivedTags = getDerivedTags(page)\n for (let tag of derivedTags) {\n tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`\n tags.push(tag)\n }\n\n // Add the tags from the pathname. If the route has unknown params, we don't\n // want to add the pathname as a tag, as it will be invalid.\n if (url.pathname && !hasFallbackRouteParams) {\n const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${url.pathname}`\n tags.push(tag)\n }\n\n return {\n tags,\n expirationsByCacheKind: createTagsExpirationsByCacheKind(tags),\n }\n}\n"],"names":["NEXT_CACHE_IMPLICIT_TAG_ID","getCacheHandlerEntries","createLazyResult","getDerivedTags","pathname","derivedTags","startsWith","pathnameParts","split","i","length","curPathname","slice","join","endsWith","push","createTagsExpirationsByCacheKind","tags","expirationsByCacheKind","Map","cacheHandlers","kind","cacheHandler","set","getExpiration","getImplicitTags","page","url","fallbackRouteParams","hasFallbackRouteParams","size","tag"],"mappings":";;;;AAAA,SAASA,0BAA0B,QAAQ,sBAAqB;AAEhE,SAASC,sBAAsB,QAAQ,wBAAuB;AAC9D,SAASC,gBAAgB,QAAyB,gBAAe;;;;AAqBjE,MAAMC,iBAAiB,CAACC;IACtB,MAAMC,cAAwB;QAAC,CAAC,OAAO,CAAC;KAAC;IAEzC,yDAAyD;IACzD,8BAA8B;IAC9B,IAAID,SAASE,UAAU,CAAC,MAAM;QAC5B,MAAMC,gBAAgBH,SAASI,KAAK,CAAC;QAErC,IAAK,IAAIC,IAAI,GAAGA,IAAIF,cAAcG,MAAM,GAAG,GAAGD,IAAK;YACjD,IAAIE,cAAcJ,cAAcK,KAAK,CAAC,GAAGH,GAAGI,IAAI,CAAC;YAEjD,IAAIF,aAAa;gBACf,uDAAuD;gBACvD,IAAI,CAACA,YAAYG,QAAQ,CAAC,YAAY,CAACH,YAAYG,QAAQ,CAAC,WAAW;oBACrEH,cAAc,GAAGA,cACf,CAACA,YAAYG,QAAQ,CAAC,OAAO,MAAM,GACpC,MAAM,CAAC;gBACV;gBACAT,YAAYU,IAAI,CAACJ;YACnB;QACF;IACF;IACA,OAAON;AACT;AAEA;;;CAGC,GACD,SAASW,iCACPC,IAAc;IAEd,MAAMC,yBAAyB,IAAIC;IACnC,MAAMC,oBAAgBnB,gRAAAA;IAEtB,IAAImB,eAAe;QACjB,KAAK,MAAM,CAACC,MAAMC,aAAa,IAAIF,cAAe;YAChD,IAAI,mBAAmBE,cAAc;gBACnCJ,uBAAuBK,GAAG,CACxBF,UACAnB,uQAAAA,EAAiB,UAAYoB,aAAaE,aAAa,IAAIP;YAE/D;QACF;IACF;IAEA,OAAOC;AACT;AAEO,eAAeO,gBACpBC,IAAY,EACZC,GAGC,EACDC,mBAA+C;IAE/C,MAAMX,OAAiB,EAAE;IACzB,MAAMY,yBACJD,uBAAuBA,oBAAoBE,IAAI,GAAG;IAEpD,sCAAsC;IACtC,MAAMzB,cAAcF,eAAeuB;IACnC,KAAK,IAAIK,OAAO1B,YAAa;QAC3B0B,MAAM,GAAG/B,kQAAAA,GAA6B+B,KAAK;QAC3Cd,KAAKF,IAAI,CAACgB;IACZ;IAEA,4EAA4E;IAC5E,4DAA4D;IAC5D,IAAIJ,IAAIvB,QAAQ,IAAI,CAACyB,wBAAwB;QAC3C,MAAME,MAAM,GAAG/B,kQAAAA,GAA6B2B,IAAIvB,QAAQ,EAAE;QAC1Da,KAAKF,IAAI,CAACgB;IACZ;IAEA,OAAO;QACLd;QACAC,wBAAwBF,iCAAiCC;IAC3D;AACF","ignoreList":[0]}}, + {"offset": {"line": 6581, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/src/experimental/testmode/context.ts"],"sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks'\n\nexport interface TestReqInfo {\n url: string\n proxyPort: number\n testData: string\n}\n\nexport interface TestRequestReader {\n url(req: R): string\n header(req: R, name: string): string | null\n}\n\nconst testStorage = new AsyncLocalStorage()\n\nfunction extractTestInfoFromRequest(\n req: R,\n reader: TestRequestReader\n): TestReqInfo | undefined {\n const proxyPortHeader = reader.header(req, 'next-test-proxy-port')\n if (!proxyPortHeader) {\n return undefined\n }\n const url = reader.url(req)\n const proxyPort = Number(proxyPortHeader)\n const testData = reader.header(req, 'next-test-data') || ''\n return { url, proxyPort, testData }\n}\n\nexport function withRequest(\n req: R,\n reader: TestRequestReader,\n fn: () => T\n): T {\n const testReqInfo = extractTestInfoFromRequest(req, reader)\n if (!testReqInfo) {\n return fn()\n }\n return testStorage.run(testReqInfo, fn)\n}\n\nexport function getTestReqInfo(\n req?: R,\n reader?: TestRequestReader\n): TestReqInfo | undefined {\n const testReqInfo = testStorage.getStore()\n if (testReqInfo) {\n return testReqInfo\n }\n if (req && reader) {\n return extractTestInfoFromRequest(req, reader)\n }\n return undefined\n}\n"],"names":["getTestReqInfo","withRequest","testStorage","AsyncLocalStorage","extractTestInfoFromRequest","req","reader","proxyPortHeader","header","undefined","url","proxyPort","Number","testData","fn","testReqInfo","run","getStore"],"mappings":";;;;;;;;;;;;;;IAyCgBA,cAAc,EAAA;eAAdA;;IAZAC,WAAW,EAAA;eAAXA;;;iCA7BkB;AAalC,MAAMC,cAAc,IAAIC,iBAAAA,iBAAiB;AAEzC,SAASC,2BACPC,GAAM,EACNC,MAA4B;IAE5B,MAAMC,kBAAkBD,OAAOE,MAAM,CAACH,KAAK;IAC3C,IAAI,CAACE,iBAAiB;QACpB,OAAOE;IACT;IACA,MAAMC,MAAMJ,OAAOI,GAAG,CAACL;IACvB,MAAMM,YAAYC,OAAOL;IACzB,MAAMM,WAAWP,OAAOE,MAAM,CAACH,KAAK,qBAAqB;IACzD,OAAO;QAAEK;QAAKC;QAAWE;IAAS;AACpC;AAEO,SAASZ,YACdI,GAAM,EACNC,MAA4B,EAC5BQ,EAAW;IAEX,MAAMC,cAAcX,2BAA2BC,KAAKC;IACpD,IAAI,CAACS,aAAa;QAChB,OAAOD;IACT;IACA,OAAOZ,YAAYc,GAAG,CAACD,aAAaD;AACtC;AAEO,SAASd,eACdK,GAAO,EACPC,MAA6B;IAE7B,MAAMS,cAAcb,YAAYe,QAAQ;IACxC,IAAIF,aAAa;QACf,OAAOA;IACT;IACA,IAAIV,OAAOC,QAAQ;QACjB,OAAOF,2BAA2BC,KAAKC;IACzC;IACA,OAAOG;AACT","ignoreList":[0]}}, + {"offset": {"line": 6639, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/src/experimental/testmode/fetch.ts"],"sourcesContent":["import type {\n ProxyFetchRequest,\n ProxyFetchResponse,\n ProxyResponse,\n} from './proxy'\nimport { getTestReqInfo, type TestRequestReader } from './context'\n\ntype Fetch = typeof fetch\ntype FetchInputArg = Parameters[0]\ntype FetchInitArg = Parameters[1]\n\nexport const reader: TestRequestReader = {\n url(req) {\n return req.url\n },\n header(req, name) {\n return req.headers.get(name)\n },\n}\n\nfunction getTestStack(): string {\n let stack = (new Error().stack ?? '').split('\\n')\n // Skip the first line and find first non-empty line.\n for (let i = 1; i < stack.length; i++) {\n if (stack[i].length > 0) {\n stack = stack.slice(i)\n break\n }\n }\n // Filter out franmework lines.\n stack = stack.filter((f) => !f.includes('/next/dist/'))\n // At most 5 lines.\n stack = stack.slice(0, 5)\n // Cleanup some internal info and trim.\n stack = stack.map((s) => s.replace('webpack-internal:///(rsc)/', '').trim())\n return stack.join(' ')\n}\n\nasync function buildProxyRequest(\n testData: string,\n request: Request\n): Promise {\n const {\n url,\n method,\n headers,\n body,\n cache,\n credentials,\n integrity,\n mode,\n redirect,\n referrer,\n referrerPolicy,\n } = request\n return {\n testData,\n api: 'fetch',\n request: {\n url,\n method,\n headers: [...Array.from(headers), ['next-test-stack', getTestStack()]],\n body: body\n ? Buffer.from(await request.arrayBuffer()).toString('base64')\n : null,\n cache,\n credentials,\n integrity,\n mode,\n redirect,\n referrer,\n referrerPolicy,\n },\n }\n}\n\nfunction buildResponse(proxyResponse: ProxyFetchResponse): Response {\n const { status, headers, body } = proxyResponse.response\n return new Response(body ? Buffer.from(body, 'base64') : null, {\n status,\n headers: new Headers(headers),\n })\n}\n\nexport async function handleFetch(\n originalFetch: Fetch,\n request: Request\n): Promise {\n const testInfo = getTestReqInfo(request, reader)\n if (!testInfo) {\n // Passthrough non-test requests.\n return originalFetch(request)\n }\n\n const { testData, proxyPort } = testInfo\n const proxyRequest = await buildProxyRequest(testData, request)\n\n const resp = await originalFetch(`http://localhost:${proxyPort}`, {\n method: 'POST',\n body: JSON.stringify(proxyRequest),\n next: {\n // @ts-ignore\n internal: true,\n },\n })\n if (!resp.ok) {\n throw new Error(`Proxy request failed: ${resp.status}`)\n }\n\n const proxyResponse = (await resp.json()) as ProxyResponse\n const { api } = proxyResponse\n switch (api) {\n case 'continue':\n return originalFetch(request)\n case 'abort':\n case 'unhandled':\n throw new Error(\n `Proxy request aborted [${request.method} ${request.url}]`\n )\n case 'fetch':\n return buildResponse(proxyResponse)\n default:\n return api satisfies never\n }\n}\n\nexport function interceptFetch(originalFetch: Fetch) {\n global.fetch = function testFetch(\n input: FetchInputArg,\n init?: FetchInitArg\n ): Promise {\n // Passthrough internal requests.\n // @ts-ignore\n if (init?.next?.internal) {\n return originalFetch(input, init)\n }\n return handleFetch(originalFetch, new Request(input, init))\n }\n return () => {\n global.fetch = originalFetch\n }\n}\n"],"names":["handleFetch","interceptFetch","reader","url","req","header","name","headers","get","getTestStack","stack","Error","split","i","length","slice","filter","f","includes","map","s","replace","trim","join","buildProxyRequest","testData","request","method","body","cache","credentials","integrity","mode","redirect","referrer","referrerPolicy","api","Array","from","Buffer","arrayBuffer","toString","buildResponse","proxyResponse","status","response","Response","Headers","originalFetch","testInfo","getTestReqInfo","proxyPort","proxyRequest","resp","JSON","stringify","next","internal","ok","json","global","fetch","testFetch","input","init","Request"],"mappings":"AA+DUuC;;;;;;;;;;;;;;;;;IAqBYvC,WAAW,EAAA;eAAXA;;IA0CNC,cAAc,EAAA;eAAdA;;IAnHHC,MAAM,EAAA;eAANA;;;yBAN0C;AAMhD,MAAMA,SAAqC;IAChDC,KAAIC,GAAG;QACL,OAAOA,IAAID,GAAG;IAChB;IACAE,QAAOD,GAAG,EAAEE,IAAI;QACd,OAAOF,IAAIG,OAAO,CAACC,GAAG,CAACF;IACzB;AACF;AAEA,SAASG;IACP,IAAIC,QAAS,CAAA,IAAIC,QAAQD,KAAK,IAAI,EAAC,EAAGE,KAAK,CAAC;IAC5C,qDAAqD;IACrD,IAAK,IAAIC,IAAI,GAAGA,IAAIH,MAAMI,MAAM,EAAED,IAAK;QACrC,IAAIH,KAAK,CAACG,EAAE,CAACC,MAAM,GAAG,GAAG;YACvBJ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{"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/src/experimental/testmode/server-edge.ts"],"sourcesContent":["import { withRequest as withRequestContext } from './context'\nimport { interceptFetch, reader } from './fetch'\n\nexport function interceptTestApis(): () => void {\n return interceptFetch(global.fetch)\n}\n\nexport function wrapRequestHandler(\n handler: (req: TRequest, fn: () => T) => T\n): (req: TRequest, fn: () => T) => T {\n return (req, fn) => withRequestContext(req, reader, () => handler(req, fn))\n}\n"],"names":["interceptTestApis","wrapRequestHandler","interceptFetch","global","fetch","handler","req","fn","withRequestContext","reader"],"mappings":";;;;;;;;;;;;;;IAGgBA,iBAAiB,EAAA;eAAjBA;;IAIAC,kBAAkB,EAAA;eAAlBA;;;yBAPkC;uBACX;AAEhC,SAASD;IACd,OAAOE,CAAAA,GAAAA,OAAAA,cAAc,EAACC,yDAAOC,KAAK;AACpC;AAEO,SAASH,mBACdI,OAA0C;IAE1C,OAAO,CAACC,KAAKC,KAAOC,CAAAA,GAAAA,SAAAA,WAAkB,EAACF,KAAKG,OAAAA,MAAM,EAAE,IAAMJ,QAAQC,KAAKC;AACzE","ignoreList":[0]}}, + {"offset": {"line": 6817, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/adapter.ts"],"sourcesContent":["import type { RequestData, FetchEventResult } from './types'\nimport type { RequestInit } from './spec-extension/request'\nimport { PageSignatureError } from './error'\nimport { fromNodeOutgoingHttpHeaders, normalizeNextQueryParam } from './utils'\nimport {\n NextFetchEvent,\n getWaitUntilPromiseFromEvent,\n} from './spec-extension/fetch-event'\nimport { NextRequest } from './spec-extension/request'\nimport { NextResponse } from './spec-extension/response'\nimport {\n parseRelativeURL,\n getRelativeURL,\n} from '../../shared/lib/router/utils/relativize-url'\nimport { NextURL } from './next-url'\nimport { stripInternalSearchParams } from '../internal-utils'\nimport { normalizeRscURL } from '../../shared/lib/router/utils/app-paths'\nimport {\n FLIGHT_HEADERS,\n NEXT_REWRITTEN_PATH_HEADER,\n NEXT_REWRITTEN_QUERY_HEADER,\n NEXT_RSC_UNION_QUERY,\n RSC_HEADER,\n} from '../../client/components/app-router-headers'\nimport { ensureInstrumentationRegistered } from './globals'\nimport { createRequestStoreForAPI } from '../async-storage/request-store'\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'\nimport { createWorkStore } from '../async-storage/work-store'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { NEXT_ROUTER_PREFETCH_HEADER } from '../../client/components/app-router-headers'\nimport { getTracer } from '../lib/trace/tracer'\nimport type { TextMapGetter } from 'next/dist/compiled/@opentelemetry/api'\nimport { MiddlewareSpan } from '../lib/trace/constants'\nimport { CloseController } from './web-on-close'\nimport { getEdgePreviewProps } from './get-edge-preview-props'\nimport { getBuiltinRequestContext } from '../after/builtin-request-context'\nimport { getImplicitTags } from '../lib/implicit-tags'\n\nexport class NextRequestHint extends NextRequest {\n sourcePage: string\n fetchMetrics: FetchEventResult['fetchMetrics'] | undefined\n\n constructor(params: {\n init: RequestInit\n input: Request | string\n page: string\n }) {\n super(params.input, params.init)\n this.sourcePage = params.page\n }\n\n get request() {\n throw new PageSignatureError({ page: this.sourcePage })\n }\n\n respondWith() {\n throw new PageSignatureError({ page: this.sourcePage })\n }\n\n waitUntil() {\n throw new PageSignatureError({ page: this.sourcePage })\n }\n}\n\nconst headersGetter: TextMapGetter = {\n keys: (headers) => Array.from(headers.keys()),\n get: (headers, key) => headers.get(key) ?? undefined,\n}\n\nexport type AdapterOptions = {\n handler: (req: NextRequestHint, event: NextFetchEvent) => Promise\n page: string\n request: RequestData\n IncrementalCache?: typeof import('../lib/incremental-cache').IncrementalCache\n incrementalCacheHandler?: typeof import('../lib/incremental-cache').CacheHandler\n bypassNextUrl?: boolean\n}\n\nlet propagator: (request: NextRequestHint, fn: () => T) => T = (\n request,\n fn\n) => {\n const tracer = getTracer()\n return tracer.withPropagatedContext(request.headers, fn, headersGetter)\n}\n\nlet testApisIntercepted = false\n\nfunction ensureTestApisIntercepted() {\n if (!testApisIntercepted) {\n testApisIntercepted = true\n if (process.env.NEXT_PRIVATE_TEST_PROXY === 'true') {\n const { interceptTestApis, wrapRequestHandler } =\n // eslint-disable-next-line @next/internal/typechecked-require -- experimental/testmode is not built ins next/dist/esm\n require('next/dist/experimental/testmode/server-edge') as typeof import('../../experimental/testmode/server-edge')\n interceptTestApis()\n propagator = wrapRequestHandler(propagator)\n }\n }\n}\n\nexport async function adapter(\n params: AdapterOptions\n): Promise {\n ensureTestApisIntercepted()\n await ensureInstrumentationRegistered()\n\n // TODO-APP: use explicit marker for this\n const isEdgeRendering =\n typeof (globalThis as any).__BUILD_MANIFEST !== 'undefined'\n\n params.request.url = normalizeRscURL(params.request.url)\n\n const requestURL = params.bypassNextUrl\n ? new URL(params.request.url)\n : new NextURL(params.request.url, {\n headers: params.request.headers,\n nextConfig: params.request.nextConfig,\n })\n\n // Iterator uses an index to keep track of the current iteration. Because of deleting and appending below we can't just use the iterator.\n // Instead we use the keys before iteration.\n const keys = [...requestURL.searchParams.keys()]\n for (const key of keys) {\n const value = requestURL.searchParams.getAll(key)\n\n const normalizedKey = normalizeNextQueryParam(key)\n if (normalizedKey) {\n requestURL.searchParams.delete(normalizedKey)\n for (const val of value) {\n requestURL.searchParams.append(normalizedKey, val)\n }\n requestURL.searchParams.delete(key)\n }\n }\n\n // Ensure users only see page requests, never data requests.\n let buildId = process.env.__NEXT_BUILD_ID || ''\n if ('buildId' in requestURL) {\n buildId = (requestURL as NextURL).buildId || ''\n requestURL.buildId = ''\n }\n\n const requestHeaders = fromNodeOutgoingHttpHeaders(params.request.headers)\n const isNextDataRequest = requestHeaders.has('x-nextjs-data')\n const isRSCRequest = requestHeaders.get(RSC_HEADER) === '1'\n\n if (isNextDataRequest && requestURL.pathname === '/index') {\n requestURL.pathname = '/'\n }\n\n const flightHeaders = new Map()\n\n // Headers should only be stripped for middleware\n if (!isEdgeRendering) {\n for (const header of FLIGHT_HEADERS) {\n const value = requestHeaders.get(header)\n if (value !== null) {\n flightHeaders.set(header, value)\n requestHeaders.delete(header)\n }\n }\n }\n\n const normalizeURL = process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE\n ? new URL(params.request.url)\n : requestURL\n\n const rscHash = normalizeURL.searchParams.get(NEXT_RSC_UNION_QUERY)\n\n const request = new NextRequestHint({\n page: params.page,\n // Strip internal query parameters off the request.\n input: stripInternalSearchParams(normalizeURL).toString(),\n init: {\n body: params.request.body,\n headers: requestHeaders,\n method: params.request.method,\n nextConfig: params.request.nextConfig,\n signal: params.request.signal,\n },\n })\n\n /**\n * This allows to identify the request as a data request. The user doesn't\n * need to know about this property neither use it. We add it for testing\n * purposes.\n */\n if (isNextDataRequest) {\n Object.defineProperty(request, '__isData', {\n enumerable: false,\n value: true,\n })\n }\n\n if (\n // If we are inside of the next start sandbox\n // leverage the shared instance if not we need\n // to create a fresh cache instance each time\n !(globalThis as any).__incrementalCacheShared &&\n (params as any).IncrementalCache\n ) {\n ;(globalThis as any).__incrementalCache = new (\n params as {\n IncrementalCache: typeof import('../lib/incremental-cache').IncrementalCache\n }\n ).IncrementalCache({\n CurCacheHandler: params.incrementalCacheHandler,\n minimalMode: process.env.NODE_ENV !== 'development',\n fetchCacheKeyPrefix: process.env.__NEXT_FETCH_CACHE_KEY_PREFIX,\n dev: process.env.NODE_ENV === 'development',\n requestHeaders: params.request.headers as any,\n\n getPrerenderManifest: () => {\n return {\n version: -1 as any, // letting us know this doesn't conform to spec\n routes: {},\n dynamicRoutes: {},\n notFoundRoutes: [],\n preview: getEdgePreviewProps(),\n }\n },\n })\n }\n\n // if we're in an edge runtime sandbox, we should use the waitUntil\n // that we receive from the enclosing NextServer\n const outerWaitUntil =\n params.request.waitUntil ?? getBuiltinRequestContext()?.waitUntil\n\n const event = new NextFetchEvent({\n request,\n page: params.page,\n context: outerWaitUntil ? { waitUntil: outerWaitUntil } : undefined,\n })\n let response\n let cookiesFromResponse\n\n response = await propagator(request, () => {\n // we only care to make async storage available for middleware\n const isMiddleware =\n params.page === '/middleware' || params.page === '/src/middleware'\n\n if (isMiddleware) {\n // if we're in an edge function, we only get a subset of `nextConfig` (no `experimental`),\n // so we have to inject it via DefinePlugin.\n // in `next start` this will be passed normally (see `NextNodeServer.runMiddleware`).\n\n const waitUntil = event.waitUntil.bind(event)\n const closeController = new CloseController()\n\n return getTracer().trace(\n MiddlewareSpan.execute,\n {\n spanName: `middleware ${request.method} ${request.nextUrl.pathname}`,\n attributes: {\n 'http.target': request.nextUrl.pathname,\n 'http.method': request.method,\n },\n },\n async () => {\n try {\n const onUpdateCookies = (cookies: Array) => {\n cookiesFromResponse = cookies\n }\n const previewProps = getEdgePreviewProps()\n const page = '/' // Fake Work\n const fallbackRouteParams = null\n\n const implicitTags = await getImplicitTags(\n page,\n request.nextUrl,\n fallbackRouteParams\n )\n\n const requestStore = createRequestStoreForAPI(\n request,\n request.nextUrl,\n implicitTags,\n onUpdateCookies,\n previewProps\n )\n\n const workStore = createWorkStore({\n page,\n renderOpts: {\n cacheLifeProfiles:\n params.request.nextConfig?.experimental?.cacheLife,\n experimental: {\n isRoutePPREnabled: false,\n cacheComponents: false,\n authInterrupts:\n !!params.request.nextConfig?.experimental?.authInterrupts,\n },\n supportsDynamicResponse: true,\n waitUntil,\n onClose: closeController.onClose.bind(closeController),\n onAfterTaskError: undefined,\n },\n isPrefetchRequest:\n request.headers.get(NEXT_ROUTER_PREFETCH_HEADER) === '1',\n buildId: buildId ?? '',\n previouslyRevalidatedTags: [],\n })\n\n return await workAsyncStorage.run(workStore, () =>\n workUnitAsyncStorage.run(\n requestStore,\n params.handler,\n request,\n event\n )\n )\n } finally {\n // middleware cannot stream, so we can consider the response closed\n // as soon as the handler returns.\n // we can delay running it until a bit later --\n // if it's needed, we'll have a `waitUntil` lock anyway.\n setTimeout(() => {\n closeController.dispatchClose()\n }, 0)\n }\n }\n )\n }\n return params.handler(request, event)\n })\n\n // check if response is a Response object\n if (response && !(response instanceof Response)) {\n throw new TypeError('Expected an instance of Response to be returned')\n }\n\n if (response && cookiesFromResponse) {\n response.headers.set('set-cookie', cookiesFromResponse)\n }\n\n /**\n * For rewrites we must always include the locale in the final pathname\n * so we re-create the NextURL forcing it to include it when the it is\n * an internal rewrite. Also we make sure the outgoing rewrite URL is\n * a data URL if the request was a data request.\n */\n const rewrite = response?.headers.get('x-middleware-rewrite')\n if (response && rewrite && (isRSCRequest || !isEdgeRendering)) {\n const destination = new NextURL(rewrite, {\n forceLocale: true,\n headers: params.request.headers,\n nextConfig: params.request.nextConfig,\n })\n\n if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE && !isEdgeRendering) {\n if (destination.host === request.nextUrl.host) {\n destination.buildId = buildId || destination.buildId\n response.headers.set('x-middleware-rewrite', String(destination))\n }\n }\n\n /**\n * When the request is a data request we must show if there was a rewrite\n * with an internal header so the client knows which component to load\n * from the data request.\n */\n const { url: relativeDestination, isRelative } = parseRelativeURL(\n destination.toString(),\n requestURL.toString()\n )\n\n if (\n !isEdgeRendering &&\n isNextDataRequest &&\n // if the rewrite is external and external rewrite\n // resolving config is enabled don't add this header\n // so the upstream app can set it instead\n !(\n process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE &&\n relativeDestination.match(/http(s)?:\\/\\//)\n )\n ) {\n response.headers.set('x-nextjs-rewrite', relativeDestination)\n }\n\n // If this is an RSC request, and the pathname or search has changed, and\n // this isn't an external rewrite, we need to set the rewritten pathname and\n // query headers.\n if (isRSCRequest && isRelative) {\n if (requestURL.pathname !== destination.pathname) {\n response.headers.set(NEXT_REWRITTEN_PATH_HEADER, destination.pathname)\n }\n if (requestURL.search !== destination.search) {\n response.headers.set(\n NEXT_REWRITTEN_QUERY_HEADER,\n // remove the leading ? from the search string\n destination.search.slice(1)\n )\n }\n }\n }\n\n /**\n * Always forward the `_rsc` search parameter to the rewritten URL for RSC requests,\n * unless it's already present. This is necessary to ensure that RSC hash validation\n * works correctly after a rewrite. For internal rewrites, the server can validate the\n * RSC hash using the original URL, so forwarding the `_rsc` parameter is less critical.\n * However, for external rewrites (where the request is proxied to another Next.js server),\n * the external server does not have access to the original URL or its search parameters.\n * In these cases, forwarding the `_rsc` parameter is essential so that the external server\n * can perform the correct RSC hash validation.\n */\n if (response && rewrite && isRSCRequest && rscHash) {\n const rewriteURL = new URL(rewrite)\n if (!rewriteURL.searchParams.has(NEXT_RSC_UNION_QUERY)) {\n rewriteURL.searchParams.set(NEXT_RSC_UNION_QUERY, rscHash)\n response.headers.set('x-middleware-rewrite', rewriteURL.toString())\n }\n }\n\n /**\n * For redirects we will not include the locale in case when it is the\n * default and we must also make sure the outgoing URL is a data one if\n * the incoming request was a data request.\n */\n const redirect = response?.headers.get('Location')\n if (response && redirect && !isEdgeRendering) {\n const redirectURL = new NextURL(redirect, {\n forceLocale: false,\n headers: params.request.headers,\n nextConfig: params.request.nextConfig,\n })\n\n /**\n * Responses created from redirects have immutable headers so we have\n * to clone the response to be able to modify it.\n */\n response = new Response(response.body, response)\n\n if (!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE) {\n if (redirectURL.host === requestURL.host) {\n redirectURL.buildId = buildId || redirectURL.buildId\n response.headers.set('Location', redirectURL.toString())\n }\n }\n\n /**\n * When the request is a data request we can't use the location header as\n * it may end up with CORS error. Instead we map to an internal header so\n * the client knows the destination.\n */\n if (isNextDataRequest) {\n response.headers.delete('Location')\n response.headers.set(\n 'x-nextjs-redirect',\n getRelativeURL(redirectURL.toString(), requestURL.toString())\n )\n }\n }\n\n const finalResponse = response ? response : NextResponse.next()\n\n // Flight headers are not overridable / removable so they are applied at the end.\n const middlewareOverrideHeaders = finalResponse.headers.get(\n 'x-middleware-override-headers'\n )\n const overwrittenHeaders: string[] = []\n if (middlewareOverrideHeaders) {\n for (const [key, value] of flightHeaders) {\n finalResponse.headers.set(`x-middleware-request-${key}`, value)\n overwrittenHeaders.push(key)\n }\n\n if (overwrittenHeaders.length > 0) {\n finalResponse.headers.set(\n 'x-middleware-override-headers',\n middlewareOverrideHeaders + ',' + overwrittenHeaders.join(',')\n )\n }\n }\n\n return {\n response: finalResponse,\n waitUntil: getWaitUntilPromiseFromEvent(event) ?? Promise.resolve(),\n fetchMetrics: request.fetchMetrics,\n }\n}\n"],"names":["PageSignatureError","fromNodeOutgoingHttpHeaders","normalizeNextQueryParam","NextFetchEvent","getWaitUntilPromiseFromEvent","NextRequest","NextResponse","parseRelativeURL","getRelativeURL","NextURL","stripInternalSearchParams","normalizeRscURL","FLIGHT_HEADERS","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_RSC_UNION_QUERY","RSC_HEADER","ensureInstrumentationRegistered","createRequestStoreForAPI","workUnitAsyncStorage","createWorkStore","workAsyncStorage","NEXT_ROUTER_PREFETCH_HEADER","getTracer","MiddlewareSpan","CloseController","getEdgePreviewProps","getBuiltinRequestContext","getImplicitTags","NextRequestHint","constructor","params","input","init","sourcePage","page","request","respondWith","waitUntil","headersGetter","keys","headers","Array","from","get","key","undefined","propagator","fn","tracer","withPropagatedContext","testApisIntercepted","ensureTestApisIntercepted","process","env","NEXT_PRIVATE_TEST_PROXY","interceptTestApis","wrapRequestHandler","require","adapter","isEdgeRendering","globalThis","__BUILD_MANIFEST","url","requestURL","bypassNextUrl","URL","nextConfig","searchParams","value","getAll","normalizedKey","delete","val","append","buildId","__NEXT_BUILD_ID","requestHeaders","isNextDataRequest","has","isRSCRequest","pathname","flightHeaders","Map","header","set","normalizeURL","__NEXT_NO_MIDDLEWARE_URL_NORMALIZE","rscHash","toString","body","method","signal","Object","defineProperty","enumerable","__incrementalCacheShared","IncrementalCache","__incrementalCache","CurCacheHandler","incrementalCacheHandler","minimalMode","NODE_ENV","fetchCacheKeyPrefix","__NEXT_FETCH_CACHE_KEY_PREFIX","dev","getPrerenderManifest","version","routes","dynamicRoutes","notFoundRoutes","preview","outerWaitUntil","event","context","response","cookiesFromResponse","isMiddleware","bind","closeController","trace","execute","spanName","nextUrl","attributes","onUpdateCookies","cookies","previewProps","fallbackRouteParams","implicitTags","requestStore","workStore","renderOpts","cacheLifeProfiles","experimental","cacheLife","isRoutePPREnabled","cacheComponents","authInterrupts","supportsDynamicResponse","onClose","onAfterTaskError","isPrefetchRequest","previouslyRevalidatedTags","run","handler","setTimeout","dispatchClose","Response","TypeError","rewrite","destination","forceLocale","host","String","relativeDestination","isRelative","__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE","match","search","slice","rewriteURL","redirect","redirectURL","finalResponse","next","middlewareOverrideHeaders","overwrittenHeaders","push","length","join","Promise","resolve","fetchMetrics"],"mappings":";;;;;;AAEA,SAASA,kBAAkB,QAAQ,UAAS;AAC5C,SAASC,2BAA2B,EAAEC,uBAAuB,QAAQ,UAAS;AAC9E,SACEC,cAAc,EACdC,4BAA4B,QACvB,+BAA8B;AACrC,SAASC,WAAW,QAAQ,2BAA0B;AACtD,SAASC,YAAY,QAAQ,4BAA2B;AACxD,SACEC,gBAAgB,EAChBC,cAAc,QACT,+CAA8C;AACrD,SAASC,OAAO,QAAQ,aAAY;AACpC,SAASC,yBAAyB,QAAQ,oBAAmB;AAC7D,SAASC,eAAe,QAAQ,0CAAyC;AACzE,SACEC,cAAc,EACdC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,oBAAoB,EACpBC,UAAU,QACL,6CAA4C;AACnD,SAASC,+BAA+B,QAAQ,YAAW;AAC3D,SAASC,wBAAwB,QAAQ,iCAAgC;;AACzE,SAASC,oBAAoB,QAAQ,iDAAgD;AACrF,SAASC,eAAe,QAAQ,8BAA6B;;AAC7D,SAASC,gBAAgB,QAAQ,4CAA2C;AAE5E,SAASE,SAAS,QAAQ,sBAAqB;AAE/C,SAASC,cAAc,QAAQ,yBAAwB;AACvD,SAASC,eAAe,QAAQ,iBAAgB;AAChD,SAASC,mBAAmB,QAAQ,2BAA0B;AAC9D,SAASC,wB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,YAAYV,IAAI,KAAKzF,WAAWyF,IAAI,EAAE;gBACxCU,YAAYxF,OAAO,GAAGA,WAAWwF,YAAYxF,OAAO;gBACpDwC,SAAS1E,OAAO,CAAC4C,GAAG,CAAC,YAAY8E,YAAY1E,QAAQ;YACvD;QACF;QAEA;;;;KAIC,GACD,IAAIX,mBAAmB;YACrBqC,SAAS1E,OAAO,CAAC+B,MAAM,CAAC;YACxB2C,SAAS1E,OAAO,CAAC4C,GAAG,CAClB,yBACA7E,2RAAAA,EAAe2J,YAAY1E,QAAQ,IAAIzB,WAAWyB,QAAQ;QAE9D;IACF;IAEA,MAAM2E,gBAAgBjD,WAAWA,WAAW7G,kRAAAA,CAAa+J,IAAI;IAE7D,iFAAiF;IACjF,MAAMC,4BAA4BF,cAAc3H,OAAO,CAACG,GAAG,CACzD;IAEF,MAAM2H,qBAA+B,EAAE;IACvC,IAAID,2BAA2B;QAC7B,KAAK,MAAM,CAACzH,KAAKwB,MAAM,IAAIa,cAAe;YACxCkF,cAAc3H,OAAO,CAAC4C,GAAG,CAAC,CAAC,qBAAqB,EAAExC,KAAK,EAAEwB;YACzDkG,mBAAmBC,IAAI,CAAC3H;QAC1B;QAEA,IAAI0H,mBAAmBE,MAAM,GAAG,GAAG;YACjCL,cAAc3H,OAAO,CAAC4C,GAAG,CACvB,iCACAiF,4BAA4B,MAAMC,mBAAmBG,IAAI,CAAC;QAE9D;IACF;IAEA,OAAO;QACLvD,UAAUiD;QACV9H,eAAWlC,wSAAAA,EAA6B6G,UAAU0D,QAAQC,OAAO;QACjEC,cAAczI,QAAQyI,YAAY;IACpC;AACF","ignoreList":[0]}}, + {"offset": {"line": 7207, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/spec-extension/image-response.ts"],"sourcesContent":["/**\n * @deprecated ImageResponse moved from \"next/server\" to \"next/og\" since Next.js 14, please import from \"next/og\" instead.\n * Migration with codemods: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#next-og-import\n */\nexport function ImageResponse(): never {\n throw new Error(\n 'ImageResponse moved from \"next/server\" to \"next/og\" since Next.js 14, please import from \"next/og\" instead'\n )\n}\n"],"names":["ImageResponse","Error"],"mappings":"AAAA;;;CAGC,GACD;;;;AAAO,SAASA;IACd,MAAM,OAAA,cAEL,CAFK,IAAIC,MACR,+GADI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF","ignoreList":[0]}}, + {"offset": {"line": 7224, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/ua-parser-js/ua-parser.js"],"sourcesContent":["(()=>{var i={226:function(i,e){(function(o,a){\"use strict\";var r=\"1.0.35\",t=\"\",n=\"?\",s=\"function\",b=\"undefined\",w=\"object\",l=\"string\",d=\"major\",c=\"model\",u=\"name\",p=\"type\",m=\"vendor\",f=\"version\",h=\"architecture\",v=\"console\",g=\"mobile\",k=\"tablet\",x=\"smarttv\",_=\"wearable\",y=\"embedded\",q=350;var T=\"Amazon\",S=\"Apple\",z=\"ASUS\",N=\"BlackBerry\",A=\"Browser\",C=\"Chrome\",E=\"Edge\",O=\"Firefox\",U=\"Google\",j=\"Huawei\",P=\"LG\",R=\"Microsoft\",M=\"Motorola\",B=\"Opera\",V=\"Samsung\",D=\"Sharp\",I=\"Sony\",W=\"Viera\",F=\"Xiaomi\",G=\"Zebra\",H=\"Facebook\",L=\"Chromium OS\",Z=\"Mac OS\";var extend=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},enumerize=function(i){var e={};for(var o=0;o0){if(b.length===2){if(typeof b[1]==s){this[b[0]]=b[1].call(this,d)}else{this[b[0]]=b[1]}}else if(b.length===3){if(typeof b[1]===s&&!(b[1].exec&&b[1].test)){this[b[0]]=d?b[1].call(this,d,b[2]):a}else{this[b[0]]=d?d.replace(b[1],b[2]):a}}else if(b.length===4){this[b[0]]=d?b[3].call(this,d.replace(b[1],b[2])):a}}else{this[b]=d?d:a}}}}o+=2}},strMapper=function(i,e){for(var o in e){if(typeof e[o]===w&&e[o].length>0){for(var r=0;r2){i[c]=\"iPad\";i[p]=k}return i};this.getEngine=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.engine);return i};this.getOS=function(){var i={};i[u]=a;i[f]=a;rgxMapper.call(i,n,x.os);if(_&&!i[u]&&v&&v.platform!=\"Unknown\"){i[u]=v.platform.replace(/chrome os/i,L).replace(/macos/i,Z)}return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return n};this.setUA=function(i){n=typeof i===l&&i.length>q?trim(i,q):i;return this};this.setUA(n);return this};UAParser.VERSION=r;UAParser.BROWSER=enumerize([u,f,d]);UAParser.CPU=enumerize([h]);UAParser.DEVICE=enumerize([c,m,p,v,g,x,k,_,y]);UAParser.ENGINE=UAParser.OS=enumerize([u,f]);if(typeof e!==b){if(\"object\"!==b&&i.exports){e=i.exports=UAParser}e.UAParser=UAParser}else{if(typeof define===s&&define.amd){define((function(){return UAParser}))}else if(typeof o!==b){o.UAParser=UAParser}}var Q=typeof o!==b&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var Y=new UAParser;Q.ua=Y.getResult();Q.ua.get=function(){return Y.getUA()};Q.ua.set=function(i){Y.setUA(i);var e=Y.getResult();for(var o in e){Q.ua[o]=e[o]}}}})(typeof window===\"object\"?window:this)}};var e={};function __nccwpck_require__(o){var a=e[o];if(a!==undefined){return a.exports}var r=e[o]={exports:{}};var t=true;try{i[o].call(r.exports,r,r.exports,__nccwpck_require__);t=false}finally{if(t)delete e[o]}return r.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var o=__nccwpck_require__(226);module.exports=o})();"],"names":[],"mappings":"AAAA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,IAAI,IAAE;QAAK,IAAG;YAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAC,GAAE,EAAE,OAAO,EAAC;YAAqB,IAAE;QAAK,SAAQ;YAAC,IAAG,GAAE,OAAO,CAAC,CAAC,EAAE;QAAA;QAAC,OAAO,EAAE,OAAO;IAAA;IAAC,IAAG,OAAO,wBAAsB,aAAY,oBAAoB,EAAE,GAAC,wIAAU;IAAI,IAAI,IAAE,oBAAoB;IAAK,OAAO,OAAO,GAAC;AAAC,CAAC","ignoreList":[0]}}, + {"offset": {"line": 9546, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/spec-extension/user-agent.ts"],"sourcesContent":["import parseua from 'next/dist/compiled/ua-parser-js'\n\ninterface UserAgent {\n isBot: boolean\n ua: string\n browser: {\n name?: string\n version?: string\n major?: string\n }\n device: {\n model?: string\n type?: string\n vendor?: string\n }\n engine: {\n name?: string\n version?: string\n }\n os: {\n name?: string\n version?: string\n }\n cpu: {\n architecture?: string\n }\n}\n\nexport function isBot(input: string): boolean {\n return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(\n input\n )\n}\n\nexport function userAgentFromString(input: string | undefined): UserAgent {\n return {\n ...parseua(input),\n isBot: input === undefined ? false : isBot(input),\n }\n}\n\nexport function userAgent({ headers }: { headers: Headers }): UserAgent {\n return userAgentFromString(headers.get('user-agent') || undefined)\n}\n"],"names":["parseua","isBot","input","test","userAgentFromString","undefined","userAgent","headers","get"],"mappings":";;;;;;;;AAAA,OAAOA,aAAa,kCAAiC;;AA4B9C,SAASC,MAAMC,KAAa;IACjC,OAAO,0WAA0WC,IAAI,CACnXD;AAEJ;AAEO,SAASE,oBAAoBF,KAAyB;IAC3D,OAAO;QACL,OAAGF,sQAAAA,EAAQE,MAAM;QACjBD,OAAOC,UAAUG,YAAY,QAAQJ,MAAMC;IAC7C;AACF;AAEO,SAASI,UAAU,EAAEC,OAAO,EAAwB;IACzD,OAAOH,oBAAoBG,QAAQC,GAAG,CAAC,iBAAiBH;AAC1D","ignoreList":[0]}}, + {"offset": {"line": 9572, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/spec-extension/url-pattern.ts"],"sourcesContent":["const GlobalURLPattern =\n // @ts-expect-error: URLPattern is not available in Node.js\n typeof URLPattern === 'undefined' ? undefined : URLPattern\n\nexport { GlobalURLPattern as URLPattern }\n"],"names":["GlobalURLPattern","URLPattern","undefined"],"mappings":";;;;AAAA,MAAMA,mBACJ,AACA,OAAOC,eAAe,cAAcC,YAAYD,WADW","ignoreList":[0]}}, + {"offset": {"line": 9583, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/after/after.ts"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\n\nexport type AfterTask = Promise | AfterCallback\nexport type AfterCallback = () => T | Promise\n\n/**\n * This function allows you to schedule callbacks to be executed after the current request finishes.\n */\nexport function after(task: AfterTask): void {\n const workStore = workAsyncStorage.getStore()\n\n if (!workStore) {\n // TODO(after): the linked docs page talks about *dynamic* APIs, which after soon won't be anymore\n throw new Error(\n '`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context'\n )\n }\n\n const { afterContext } = workStore\n return afterContext.after(task)\n}\n"],"names":["workAsyncStorage","after","task","workStore","getStore","Error","afterContext"],"mappings":";;;;;AAAA,SAASA,gBAAgB,QAAQ,4CAA2C;;AAQrE,SAASC,MAASC,IAAkB;IACzC,MAAMC,YAAYH,uWAAAA,CAAiBI,QAAQ;IAE3C,IAAI,CAACD,WAAW;QACd,kGAAkG;QAClG,MAAM,OAAA,cAEL,CAFK,IAAIE,MACR,2HADI,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,MAAM,EAAEC,YAAY,EAAE,GAAGH;IACzB,OAAOG,aAAaL,KAAK,CAACC;AAC5B","ignoreList":[0]}}, + {"offset": {"line": 9607, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/after/index.ts"],"sourcesContent":["export * from './after'\n"],"names":[],"mappings":";AAAA,cAAc,UAAS","ignoreList":[0]}}, + {"offset": {"line": 9614, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/react/cjs/react.react-server.development.js"],"sourcesContent":["/**\n * @license React\n * react.react-server.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 noop() {}\n function getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function cloneAndReplaceKey(oldElement, newKey) {\n newKey = ReactElement(\n oldElement.type,\n newKey,\n oldElement.props,\n oldElement._owner,\n oldElement._debugStack,\n oldElement._debugTask\n );\n oldElement._store &&\n (newKey._store.validated = oldElement._store.validated);\n return newKey;\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n }\n function getElementKey(element, index) {\n return \"object\" === typeof element &&\n null !== element &&\n null != element.key\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n : index.toString(36);\n }\n function resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"),\n (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n }\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback) {\n invokeCallback = children;\n callback = callback(invokeCallback);\n var childKey =\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != childKey &&\n (escapedPrefix =\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (null != callback.key &&\n ((invokeCallback && invokeCallback.key === callback.key) ||\n checkKeyStringCoercion(callback.key)),\n (escapedPrefix = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (invokeCallback && invokeCallback.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n childKey\n )),\n \"\" !== nameSoFar &&\n null != invokeCallback &&\n isValidElement(invokeCallback) &&\n null == invokeCallback.key &&\n invokeCallback._store &&\n !invokeCallback._store.validated &&\n (escapedPrefix._store.validated = 2),\n (callback = escapedPrefix)),\n array.push(callback));\n return 1;\n }\n invokeCallback = 0;\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = childKey + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n i === children.entries &&\n (didWarnAboutMaps ||\n console.warn(\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n ),\n (didWarnAboutMaps = !0)),\n children = i.call(children),\n i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = childKey + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n }\n function mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n function lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ioInfo = payload._ioInfo;\n null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());\n ioInfo = payload._result;\n var thenable = ioInfo();\n thenable.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 1;\n payload._result = moduleObject;\n var _ioInfo = payload._ioInfo;\n null != _ioInfo && (_ioInfo.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = moduleObject));\n }\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 2;\n payload._result = error;\n var _ioInfo2 = payload._ioInfo;\n null != _ioInfo2 && (_ioInfo2.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n }\n );\n ioInfo = payload._ioInfo;\n if (null != ioInfo) {\n ioInfo.value = thenable;\n var displayName = thenable.displayName;\n \"string\" === typeof displayName && (ioInfo.name = displayName);\n }\n -1 === payload._status &&\n ((payload._status = 0), (payload._result = thenable));\n }\n if (1 === payload._status)\n return (\n (ioInfo = payload._result),\n void 0 === ioInfo &&\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n ioInfo\n ),\n \"default\" in ioInfo ||\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\n ioInfo\n ),\n ioInfo.default\n );\n throw payload._result;\n }\n function createCacheRoot() {\n return new WeakMap();\n }\n function createCacheNode() {\n return { s: 0, v: void 0, o: null, p: null };\n }\n var ReactSharedInternals = {\n H: null,\n A: null,\n getCurrentStack: null,\n recentlyCreatedOwnerStacks: 0\n },\n isArrayImpl = Array.isArray,\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n hasOwnProperty = Object.prototype.hasOwnProperty,\n assign = Object.assign,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n },\n createFakeCallStack = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n },\n specialPropKeyWarningShown,\n didWarnAboutOldJSXRuntime;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack =\n createFakeCallStack.react_stack_bottom_frame.bind(\n createFakeCallStack,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutMaps = !1,\n userProvidedKeyEscapeRegex = /\\/+/g;\n exports.Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\n exports.cache = function (fn) {\n return function () {\n var dispatcher = ReactSharedInternals.A;\n if (!dispatcher) return fn.apply(null, arguments);\n var fnMap = dispatcher.getCacheForType(createCacheRoot);\n dispatcher = fnMap.get(fn);\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));\n fnMap = 0;\n for (var l = arguments.length; fnMap < l; fnMap++) {\n var arg = arguments[fnMap];\n if (\n \"function\" === typeof arg ||\n (\"object\" === typeof arg && null !== arg)\n ) {\n var objectCache = dispatcher.o;\n null === objectCache &&\n (dispatcher.o = objectCache = new WeakMap());\n dispatcher = objectCache.get(arg);\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()),\n objectCache.set(arg, dispatcher));\n } else\n (objectCache = dispatcher.p),\n null === objectCache && (dispatcher.p = objectCache = new Map()),\n (dispatcher = objectCache.get(arg)),\n void 0 === dispatcher &&\n ((dispatcher = createCacheNode()),\n objectCache.set(arg, dispatcher));\n }\n if (1 === dispatcher.s) return dispatcher.v;\n if (2 === dispatcher.s) throw dispatcher.v;\n try {\n var result = fn.apply(null, arguments);\n fnMap = dispatcher;\n fnMap.s = 1;\n return (fnMap.v = result);\n } catch (error) {\n throw (\n ((result = dispatcher), (result.s = 2), (result.v = error), error)\n );\n }\n };\n };\n exports.cacheSignal = function () {\n var dispatcher = ReactSharedInternals.A;\n return dispatcher ? dispatcher.cacheSignal() : null;\n };\n exports.captureOwnerStack = function () {\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\n return null === getCurrentStack ? null : getCurrentStack();\n };\n exports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" +\n element +\n \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = element._owner;\n if (null != config) {\n var JSCompiler_inline_result;\n a: {\n if (\n hasOwnProperty.call(config, \"ref\") &&\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n config,\n \"ref\"\n ).get) &&\n JSCompiler_inline_result.isReactWarning\n ) {\n JSCompiler_inline_result = !1;\n break a;\n }\n JSCompiler_inline_result = void 0 !== config.ref;\n }\n JSCompiler_inline_result && (owner = getOwner());\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n for (propName in config)\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n }\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n JSCompiler_inline_result = Array(propName);\n for (var i = 0; i < propName; i++)\n JSCompiler_inline_result[i] = arguments[i + 2];\n props.children = JSCompiler_inline_result;\n }\n props = ReactElement(\n element.type,\n key,\n props,\n owner,\n element._debugStack,\n element._debugTask\n );\n for (key = 2; key < arguments.length; key++)\n (owner = arguments[key]),\n isValidElement(owner) && owner._store && (owner._store.validated = 1);\n return props;\n };\n exports.createElement = function (type, config, children) {\n for (var i = 2; i < arguments.length; i++) {\n var node = arguments[i];\n isValidElement(node) && node._store && (node._store.validated = 1);\n }\n i = {};\n node = null;\n if (null != config)\n for (propName in (didWarnAboutOldJSXRuntime ||\n !(\"__self\" in config) ||\n \"key\" in config ||\n ((didWarnAboutOldJSXRuntime = !0),\n console.warn(\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n )),\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (node = \"\" + config.key)),\n config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (i[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) i.children = children;\n else if (1 < childrenLength) {\n for (\n var childArray = Array(childrenLength), _i = 0;\n _i < childrenLength;\n _i++\n )\n childArray[_i] = arguments[_i + 2];\n Object.freeze && Object.freeze(childArray);\n i.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n node &&\n defineKeyPropWarningGetter(\n i,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return ReactElement(\n type,\n node,\n i,\n getOwner(),\n propName ? Error(\"react-stack-top-frame\") : unknownOwnerDebugStack,\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.createRef = function () {\n var refObject = { current: null };\n Object.seal(refObject);\n return refObject;\n };\n exports.forwardRef = function (render) {\n null != render && render.$$typeof === REACT_MEMO_TYPE\n ? console.error(\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n )\n : \"function\" !== typeof render\n ? console.error(\n \"forwardRef requires a render function but was given %s.\",\n null === render ? \"null\" : typeof render\n )\n : 0 !== render.length &&\n 2 !== render.length &&\n console.error(\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n 1 === render.length\n ? \"Did you forget to use the ref parameter?\"\n : \"Any additional parameter will be undefined.\"\n );\n null != render &&\n null != render.defaultProps &&\n console.error(\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n );\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n ownName;\n Object.defineProperty(elementType, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n render.name ||\n render.displayName ||\n (Object.defineProperty(render, \"name\", { value: name }),\n (render.displayName = name));\n }\n });\n return elementType;\n };\n exports.isValidElement = isValidElement;\n exports.lazy = function (ctor) {\n ctor = { _status: -1, _result: ctor };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: ctor,\n _init: lazyInitializer\n },\n ioInfo = {\n name: \"lazy\",\n start: -1,\n end: -1,\n value: null,\n owner: null,\n debugStack: Error(\"react-stack-top-frame\"),\n debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n };\n ctor._ioInfo = ioInfo;\n lazyType._debugInfo = [{ awaited: ioInfo }];\n return lazyType;\n };\n exports.memo = function (type, compare) {\n null == type &&\n console.error(\n \"memo: The first argument must be a component. Instead received: %s\",\n null === type ? \"null\" : typeof type\n );\n compare = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n var ownName;\n Object.defineProperty(compare, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n type.name ||\n type.displayName ||\n (Object.defineProperty(type, \"name\", { value: name }),\n (type.displayName = name));\n }\n });\n return compare;\n };\n exports.use = function (usable) {\n return resolveDispatcher().use(usable);\n };\n exports.useCallback = function (callback, deps) {\n return resolveDispatcher().useCallback(callback, deps);\n };\n exports.useDebugValue = function (value, formatterFn) {\n return resolveDispatcher().useDebugValue(value, formatterFn);\n };\n exports.useId = function () {\n return resolveDispatcher().useId();\n };\n exports.useMemo = function (create, deps) {\n return resolveDispatcher().useMemo(create, deps);\n };\n exports.version = \"19.2.0-canary-0bdb9206-20250818\";\n })();\n"],"names":[],"mappings":"AAAA;;;;;;;;CAQC,GAGD,oEACE,AAAC;IACC,SAAS,QAAQ;IACjB,SAAS,cAAc,aAAa;QAClC,IAAI,SAAS,iBAAiB,aAAa,OAAO,eAChD,OAAO;QACT,gBACE,AAAC,yBAAyB,aAAa,CAAC,sBAAsB,IAC9D,aAAa,CAAC,aAAa;QAC7B,OAAO,eAAe,OAAO,gBAAgB,gBAAgB;IAC/D;IACA,SAAS,mBAAmB,KAAK;QAC/B,OAAO,KAAK;IACd;IACA,SAAS,uBAAuB,KAAK;QACnC,IAAI;YACF,mBAAmB;YACnB,IAAI,2BAA2B,CAAC;QAClC,EAAE,OAAO,GAAG;YACV,2BAA2B,CAAC;QAC9B;QACA,IAAI,0BAA0B;YAC5B,2BAA2B;YAC3B,IAAI,wBAAwB,yBAAyB,KAAK;YAC1D,IAAI,oCACF,AAAC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nD;IACA,QAAQ,aAAa,GAAG,SAAU,KAAK,EAAE,WAAW;QAClD,OAAO,oBAAoB,aAAa,CAAC,OAAO;IAClD;IACA,QAAQ,KAAK,GAAG;QACd,OAAO,oBAAoB,KAAK;IAClC;IACA,QAAQ,OAAO,GAAG,SAAU,MAAM,EAAE,IAAI;QACtC,OAAO,oBAAoB,OAAO,CAAC,QAAQ;IAC7C;IACA,QAAQ,OAAO,GAAG;AACpB","ignoreList":[0]}}, + {"offset": {"line": 10140, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/compiled/react/react.react-server.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.react-server.production.js');\n} else {\n module.exports = require('./cjs/react.react-server.development.js');\n}\n"],"names":[],"mappings":"AAEA;;KAEO;IACL,OAAO,OAAO;AAChB","ignoreList":[0]}}, + {"offset": {"line": 10149, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,CAAE,2BAAwBA,cAAAA,IAAAA,CADLA,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": 10171, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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": 10193, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/dynamic-rendering-utils.ts"],"sourcesContent":["export 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\ntype AbortListeners = Array<(err: unknown) => void>\nconst abortListenersBySignal = new WeakMap()\n\n/**\n * This function constructs a promise that will never resolve. This is primarily\n * useful for cacheComponents where we use promise resolution timing to determine which\n * parts of a render can be included in a prerender.\n *\n * @internal\n */\nexport function makeHangingPromise(\n signal: AbortSignal,\n route: string,\n expression: string\n): Promise {\n if (signal.aborted) {\n return Promise.reject(new HangingPromiseRejectionError(route, expression))\n } else {\n const hangingPromise = new Promise((_, reject) => {\n const boundRejection = reject.bind(\n null,\n new HangingPromiseRejectionError(route, expression)\n )\n let currentListeners = abortListenersBySignal.get(signal)\n if (currentListeners) {\n currentListeners.push(boundRejection)\n } else {\n const listeners = [boundRejection]\n abortListenersBySignal.set(signal, listeners)\n signal.addEventListener(\n 'abort',\n () => {\n for (let i = 0; i < listeners.length; i++) {\n listeners[i]()\n }\n },\n { once: true }\n )\n }\n })\n // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so\n // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct\n // your own promise out of it you'll need to ensure you handle the error when it rejects.\n hangingPromise.catch(ignoreReject)\n return hangingPromise\n }\n}\n\nfunction ignoreReject() {}\n\nexport function makeDevtoolsIOAwarePromise(underlying: T): Promise {\n // in React DevTools if we resolve in a setTimeout we will observe\n // the promise resolution as something that can suspend a boundary or root.\n return new Promise((resolve) => {\n // Must use setTimeout to be considered IO React DevTools. setImmediate will not work.\n setTimeout(() => {\n resolve(underlying)\n }, 0)\n })\n}\n"],"names":["isHangingPromiseRejectionError","err","digest","HANGING_PROMISE_REJECTION","HangingPromiseRejectionError","Error","constructor","route","expression","abortListenersBySignal","WeakMap","makeHangingPromise","signal","aborted","Promise","reject","hangingPromise","_","boundRejection","bind","currentListeners","get","push","listeners","set","addEventListener","i","length","once","catch","ignoreReject","makeDevtoolsIOAwarePromise","underlying","resolve","setTimeout"],"mappings":";;;;;;;;AAAO,SAASA,+BACdC,GAAY;IAEZ,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAE,GAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIC,MAAM,KAAKC;AACxB;AAEA,MAAMA,4BAA4B;AAElC,MAAMC,qCAAqCC;IAGzCC,YACkBC,KAAa,EACbC,UAAkB,CAClC;QACA,KAAK,CACH,CAAC,qBAAqB,EAAEA,WAAW,qGAAqG,EAAEA,WAAW,8KAA8K,EAAED,MAAM,EAAE,CAAC,GAAA,IAAA,CAJhUA,KAAAA,GAAAA,OAAAA,IAAAA,CACAC,UAAAA,GAAAA,YAAAA,IAAAA,CAJFN,MAAAA,GAASC;IASzB;AACF;AAGA,MAAMM,yBAAyB,IAAIC;AAS5B,SAASC,mBACdC,MAAmB,EACnBL,KAAa,EACbC,UAAkB;IAElB,IAAII,OAAOC,OAAO,EAAE;QAClB,OAAOC,QAAQC,MAAM,CAAC,IAAIX,6BAA6BG,OAAOC;IAChE,OAAO;QACL,MAAMQ,iBAAiB,IAAIF,QAAW,CAACG,GAAGF;YACxC,MAAMG,iBAAiBH,OAAOI,IAAI,CAChC,MACA,IAAIf,6BAA6BG,OAAOC;YAE1C,IAAIY,mBAAmBX,uBAAuBY,GAAG,CAACT;YAClD,IAAIQ,kBAAkB;gBACpBA,iBAAiBE,IAAI,CAACJ;YACxB,OAAO;gBACL,MAAMK,YAAY;oBAACL;iBAAe;gBAClCT,uBAAuBe,GAAG,CAACZ,QAAQW;gBACnCX,OAAOa,gBAAgB,CACrB,SACA;oBACE,IAAK,IAAIC,IAAI,GAAGA,IAAIH,UAAUI,MAAM,EAAED,IAAK;wBACzCH,SAAS,CAACG,EAAE;oBACd;gBACF,GACA;oBAAEE,MAAM;gBAAK;YAEjB;QACF;QACA,2GAA2G;QAC3G,6GAA6G;QAC7G,yFAAyF;QACzFZ,eAAea,KAAK,CAACC;QACrB,OAAOd;IACT;AACF;AAEA,SAASc,gBAAgB;AAElB,SAASC,2BAA8BC,UAAa;IACzD,kEAAkE;IAClE,2EAA2E;IAC3E,OAAO,IAAIlB,QAAW,CAACmB;QACrB,sFAAsF;QACtFC,WAAW;YACTD,QAAQD;QACV,GAAG;IACL;AACF","ignoreList":[0]}}, + {"offset": {"line": 10259, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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": 10277, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/lib/scheduler.ts"],"sourcesContent":["export type ScheduledFn = () => T | PromiseLike\nexport type SchedulerFn = (cb: ScheduledFn) => 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) => {\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 => {\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((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 {\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,OAAQ;YACvCC,WAAWP,IAAI;QACjB,OAAO;;IAGT;AACF,EAAC;AAQM,MAAMS,oBAAoB,CAACT;IAChC,IAAII,QAAQC,GAAG,CAACC,YAAY,KAAK,OAAQ;QACvCC,WAAWP,IAAI;IACjB,OAAO;;AAGT,EAAC;AAOM,SAASW;IACd,OAAO,IAAIV,QAAc,CAACC,UAAYO,kBAAkBP;AAC1D;AAWO,SAASU;IACd,IAAIR,QAAQC,GAAG,CAACC,YAAY,KAAK,OAAQ;QACvC,OAAO,IAAIL,QAAQ,CAACY,IAAMN,WAAWM,GAAG;IAC1C,OAAO;;AAGT","ignoreList":[0]}}, + {"offset": {"line": 10325, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,CAAE,wCAAqCA,SAAAA,IAAAA,CADlBA,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": 10348, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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 RequestStore,\n PrerenderStoreLegacy,\n PrerenderStoreModern,\n PrerenderStoreModernRuntime,\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 getRuntimeStagePromise,\n workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise } 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 { InvariantError } from '../../shared/lib/invariant-error'\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\n\n syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n hasSuspenseAboveBody: boolean\n hasDynamicMetadata: boolean\n hasDynamicViewport: boolean\n hasAllowedDynamic: boolean\n dynamicErrors: Array\n}\n\nexport function createDynamicTrackingState(\n isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n return {\n isDebugDynamicAccesses,\n dynamicAccesses: [],\n syncDynamicErrorWithStack: null,\n }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n return {\n hasSuspenseAboveBody: false,\n hasDynamicMetadata: false,\n hasDynamicViewport: false,\n hasAllowedDynamic: false,\n dynamicErrors: [],\n }\n}\n\nexport function getFirstDynamicReason(\n trackingState: DynamicTrackingState\n): undefined | string {\n return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n store: WorkStore,\n workUnitStore: undefined | Exclude,\n expression: string\n): void {\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'request':\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n // If we're forcing dynamic rendering or we're forcing static rendering, we\n // don't need to do anything here because the entire page is already dynamic\n // or it's static and it should not throw or postpone here.\n if (store.forceDynamic || store.forceStatic) return\n\n if (store.dynamicShouldError) {\n throw new StaticGenBailoutError(\n `Route ${store.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\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n // We aren't prerendering, but we are generating a static page. We need\n // to bail out of static generation.\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n expression: string,\n store: WorkStore,\n prerenderStore: PrerenderStoreLegacy\n): never {\n // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n\n prerenderStore.revalidate = 0\n\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n // Inside cache scopes, marking a scope as dynamic has no effect,\n // because the outer cache scope creates a cache boundary. This is\n // subtly different from reading a dynamic data source, which is\n // forbidden inside a cache scope.\n return\n case 'private-cache':\n // A private cache scope is already dynamic by definition.\n return\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-legacy':\n case 'prerender-ppr':\n case 'prerender-client':\n break\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n route: string,\n expression: string,\n prerenderStore: PrerenderStoreModern\n): void {\n const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n const error = createPrerenderInterruptedError(reason)\n\n prerenderStore.controller.abort(error)\n\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): void {\n const dynamicTracking = prerenderStore.dynamicTracking\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n}\n\nexport function trackSynchronousPlatformIOAccessInDev(\n requestStore: RequestStore\n): void {\n // We don't actually have a controller to abort but we do the semantic equivalent by\n // advancing the request store out of prerender mode\n requestStore.prerenderPhase = false\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n route: string,\n expression: string,\n errorWithStack: Error,\n prerenderStore: PrerenderStoreModern\n): never {\n const prerenderSignal = prerenderStore.controller.signal\n if (prerenderSignal.aborted === false) {\n // TODO it would be better to move this aborted check into the callsite so we can avoid making\n // the error object when it isn't relevant to the aborting of the prerender however\n // since we need the throw semantics regardless of whether we abort it is easier to land\n // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n // to ideal implementation\n abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n // It is important that we set this tracking value after aborting. Aborts are executed\n // synchronously except for the case where you abort during render itself. By setting this\n // value late we can use it to determine if any of the aborted tasks are the task that\n // called the sync IO expression in the first place.\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n if (dynamicTracking.syncDynamicErrorWithStack === null) {\n dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n }\n }\n }\n throw createPrerenderInterruptedError(\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n )\n}\n\n/**\n * Use this function when dynamically prerendering with dynamicIO.\n * We don't want to error, because it's better to return something\n * (and we've already aborted the render at the point where the sync dynamic error occured),\n * but we should log an error server-side.\n * @internal\n */\nexport function warnOnSyncDynamicError(dynamicTracking: DynamicTrackingState) {\n if (dynamicTracking.syncDynamicErrorWithStack) {\n // the server did something sync dynamic, likely\n // leading to an early termination of the prerender.\n console.error(dynamicTracking.syncDynamicErrorWithStack)\n }\n}\n\n// For now these implementations are the same so we just reexport\nexport const trackSynchronousRequestDataAccessInDev =\n trackSynchronousPlatformIOAccessInDev\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n reason: string\n route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n const prerenderStore = workUnitAsyncStorage.getStore()\n const dynamicTracking =\n prerenderStore && prerenderStore.type === 'prerender-ppr'\n ? prerenderStore.dynamicTracking\n : null\n postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n route: string,\n expression: string,\n dynamicTracking: null | DynamicTrackingState\n): never {\n assertPostpone()\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n // When we aren't debugging, we don't need to create another error for the\n // stack trace.\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n\n React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n return (\n `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n `React throws this special object to indicate where. It should not be caught by ` +\n `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n if (\n typeof err === 'object' &&\n err !== null &&\n typeof (err as any).message === 'string'\n ) {\n return isDynamicPostponeReason((err as any).message)\n }\n return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n return (\n reason.includes(\n 'needs to bail out of prerendering at this point because it used'\n ) &&\n reason.includes(\n 'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n )\n )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n throw new Error(\n 'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n const error = new Error(message)\n ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n return error\n}\n\ntype DigestError = Error & {\n digest: string\n}\n\nexport function isPrerenderInterruptedError(\n error: unknown\n): error is DigestError {\n return (\n typeof error === 'object' &&\n error !== null &&\n (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n 'name' in error &&\n 'message' in error &&\n error instanceof Error\n )\n}\n\nexport function accessedDynamicData(\n dynamicAccesses: Array\n): boolean {\n return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n serverDynamic: DynamicTrackingState,\n clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n // We mutate because we only call this once we are no longer writing\n // to the dynamicTrackingState and it's more efficient than creating a new\n // array.\n serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n dynamicAccesses: Array\n): string[] {\n return dynamicAccesses\n .filter(\n (access): access is Required =>\n typeof access.stack === 'string' && access.stack.length > 0\n )\n .map(({ expression, stack }) => {\n stack = stack\n .split('\\n')\n // Remove the \"Error: \" prefix from the first line of the stack trace as\n // well as the first 4 lines of the stack trace which is the distance\n // from the user code and the `new Error().stack` call.\n .slice(4)\n .filter((line) => {\n // Exclude Next.js internals from the stack trace.\n if (line.includes('node_modules/next/')) {\n return false\n }\n\n // Exclude anonymous functions from the stack trace.\n if (line.includes(' ()')) {\n return false\n }\n\n // Exclude Node.js internals from the stack trace.\n if (line.includes(' (node:')) {\n return false\n }\n\n return true\n })\n .join('\\n')\n return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n })\n}\n\nfunction assertPostpone() {\n if (!hasPostpone) {\n throw new Error(\n `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n )\n }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n const controller = new AbortController()\n controller.abort(new BailoutToCSRError('Render in Browser'))\n return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n const controller = new AbortController()\n\n if (workUnitStore.cacheSignal) {\n // If we have a cacheSignal it means we're in a prospective render. If\n // the input we're waiting on is coming from another cache, we do want\n // to wait for it so that we can resolve this cache entry too.\n workUnitStore.cacheSignal.inputReady().then(() => {\n controller.abort()\n })\n } else {\n // Otherwise we're in the final render and we should already have all\n // our caches filled.\n // If the prerender uses stages, we have wait until the runtime stage,\n // at which point all runtime inputs will be resolved.\n // (otherwise, a runtime prerender might consider `cookies()` hanging\n // even though they'd resolve in the next task.)\n //\n // We might still be waiting on some microtasks so we\n // wait one tick before giving up. When we give up, we still want to\n // render the content of this cache as deeply as we can so that we can\n // suspend as deeply as possible in the tree or not at all if we don't\n // end up waiting for the input.\n const runtimeStagePromise = getRuntimeStagePromise(workUnitStore)\n if (runtimeStagePromise) {\n runtimeStagePromise.then(() =>\n scheduleOnNextTick(() => controller.abort())\n )\n } else {\n scheduleOnNextTick(() => controller.abort())\n }\n }\n\n return controller.signal\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n return undefined\n default:\n workUnitStore satisfies never\n }\n}\n\nexport function annotateDynamicAccess(\n expression: string,\n prerenderStore: PrerenderStoreModern\n) {\n const dynamicTracking = prerenderStore.dynamicTracking\n if (dynamicTracking) {\n dynamicTracking.dynamicAccesses.push({\n stack: dynamicTracking.isDebugDynamicAccesses\n ? new Error().stack\n : undefined,\n expression,\n })\n }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workStore && workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender-client':\n case 'prerender': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n // We are in a prerender with cacheComponents semantics. We are going to\n // hang here and never resolve. This will cause the currently\n // rendering component to effectively be a dynamic hole.\n React.use(\n makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n expression\n )\n )\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = workUnitStore.fallbackRouteParams\n if (fallbackParams && fallbackParams.size > 0) {\n return postponeWithTracking(\n workStore.route,\n expression,\n workUnitStore.dynamicTracking\n )\n }\n break\n }\n case 'prerender-runtime':\n throw new InvariantError(\n `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'cache':\n case 'private-cache':\n throw new InvariantError(\n `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n )\n case 'prerender-legacy':\n case 'request':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n// at Suspense ()\n// at __next_root_layout_boundary__ ()\n//\n// Or with other components in between (but not body/html/implicit-body):\n// at Suspense ()\n// at SomeComponent ()\n// at __next_root_layout_boundary__ ()\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n `\\\\n\\\\s+at Suspense \\\\(\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nexport function trackAllowedDynamicAccess(\n workStore: WorkStore,\n componentStack: string,\n dynamicValidation: DynamicValidationState,\n clientDynamic: DynamicTrackingState\n) {\n if (hasOutletRegex.test(componentStack)) {\n // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n return\n } else if (hasMetadataRegex.test(componentStack)) {\n dynamicValidation.hasDynamicMetadata = true\n return\n } else if (hasViewportRegex.test(componentStack)) {\n dynamicValidation.hasDynamicViewport = true\n return\n } else if (\n hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n componentStack\n )\n ) {\n // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n dynamicValidation.hasAllowedDynamic = true\n dynamicValidation.hasSuspenseAboveBody = true\n return\n } else if (hasSuspenseRegex.test(componentStack)) {\n // this error had a Suspense boundary above it so we don't need to report it as a source\n // of disallowed\n dynamicValidation.hasAllowedDynamic = true\n return\n } else if (clientDynamic.syncDynamicErrorWithStack) {\n // This task was the task that called the sync error.\n dynamicValidation.dynamicErrors.push(\n clientDynamic.syncDynamicErrorWithStack\n )\n return\n } else {\n const message = `Route \"${workStore.route}\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`\n const error = createErrorWithComponentOrOwnerStack(message, componentStack)\n dynamicValidation.dynamicErrors.push(error)\n return\n }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n */\nfunction createErrorWithComponentOrOwnerStack(\n message: string,\n componentStack: string\n) {\n const ownerStack =\n process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n ? React.captureOwnerStack()\n : null\n\n const error = new Error(message)\n error.stack = error.name + ': ' + message + (ownerStack ?? componentStack)\n return error\n}\n\nexport enum PreludeState {\n Full = 0,\n Empty = 1,\n Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n workStore: WorkStore,\n error: Error\n): void {\n console.error(error)\n\n if (!workStore.dev) {\n if (workStore.hasReadableErrorStacks) {\n console.error(\n `To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n )\n } else {\n console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n }\n }\n}\n\nexport function throwIfDisallowedDynamic(\n workStore: WorkStore,\n prelude: PreludeState,\n dynamicValidation: DynamicValidationState,\n serverDynamic: DynamicTrackingState\n): void {\n if (prelude !== PreludeState.Full) {\n if (dynamicValidation.hasSuspenseAboveBody) {\n // This route has opted into allowing fully dynamic rendering\n // by including a Suspense boundary above the body. In this case\n // a lack of a shell is not considered disallowed so we simply return\n return\n }\n\n if (serverDynamic.syncDynamicErrorWithStack) {\n // There is no shell and the server did something sync dynamic likely\n // leading to an early termination of the prerender before the shell\n // could be completed. We terminate the build/validating render.\n logDisallowedDynamicError(\n workStore,\n serverDynamic.syncDynamicErrorWithStack\n )\n throw new StaticGenBailoutError()\n }\n\n // We didn't have any sync bailouts but there may be user code which\n // blocked the root. We would have captured these during the prerender\n // and can log them here and then terminate the build/validating render\n const dynamicErrors = dynamicValidation.dynamicErrors\n if (dynamicErrors.length > 0) {\n for (let i = 0; i < dynamicErrors.length; i++) {\n logDisallowedDynamicError(workStore, dynamicErrors[i])\n }\n\n throw new StaticGenBailoutError()\n }\n\n // If we got this far then the only other thing that could be blocking\n // the root is dynamic Viewport. If this is dynamic then\n // you need to opt into that by adding a Suspense boundary above the body\n // to indicate your are ok with fully dynamic rendering.\n if (dynamicValidation.hasDynamicViewport) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n )\n throw new StaticGenBailoutError()\n }\n\n if (prelude === PreludeState.Empty) {\n // If we ever get this far then we messed up the tracking of invalid dynamic.\n // We still adhere to the constraint that you must produce a shell but invite the\n // user to report this as a bug in Next.js.\n console.error(\n `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n )\n throw new StaticGenBailoutError()\n }\n } else {\n if (\n dynamicValidation.hasAllowedDynamic === false &&\n dynamicValidation.hasDynamicMetadata\n ) {\n console.error(\n `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n )\n throw new StaticGenBailoutError()\n }\n }\n}\n\nexport function delayUntilRuntimeStage(\n prerenderStore: PrerenderStoreModernRuntime,\n result: Promise\n): Promise {\n if (prerenderStore.runtimeStagePromise) {\n return prerenderStore.runtimeStagePromise.then(() => result)\n }\n return result\n}\n"],"names":["React","DynamicServerError","StaticGenBailoutError","getRuntimeStagePromise","workUnitAsyncStorage","workAsyncStorage","makeHangingPromise","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","scheduleOnNextTick","BailoutToCSRError","InvariantError","hasPostpone","unstable_postpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","store","workUnitStore","type","forceDynamic","forceStatic","dynamicShouldError","route","postponeWithTracking","dynamicTracking","revalidate","err","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","reason","error","createPrerenderInterruptedError","controller","abort","push","Error","undefined","abortOnSynchronousPlatformIOAccess","errorWithStack","trackSynchronousPlatformIOAccessInDev","requestStore","prerenderPhase","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","signal","aborted","warnOnSyncDynamicError","console","trackSynchronousRequestDataAccessInDev","Postpone","getStore","assertPostpone","createPostponeReason","isDynamicPostpone","message","isDynamicPostponeReason","includes","NEXT_PRERENDER_INTERRUPTED","digest","isPrerenderInterruptedError","accessedDynamicData","length","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","filter","access","map","split","slice","line","join","createRenderInBrowserAbortSignal","AbortController","createHangingInputAbortSignal","cacheSignal","inputReady","then","runtimeStagePromise","annotateDynamicAccess","useDynamicRouteParams","workStore","fallbackParams","fallbackRouteParams","size","use","renderSignal","hasSuspenseRegex","bodyAndImplicitTags","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","RegExp","hasMetadataRegex","hasViewportRegex","hasOutletRegex","trackAllowedDynamicAccess","componentStack","dynamicValidation","test","createErrorWithComponentOrOwnerStack","ownerStack","captureOwnerStack","name","PreludeState","logDisallowedDynamicError","dev","hasReadableErrorStacks","throwIfDisallowedDynamic","prelude","i","delayUntilRuntimeStage","result"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;CAoBC,GAWD,wFAAwF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACxF,OAAOA,WAAW,QAAO;AAEzB,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SAASC,qBAAqB,QAAQ,oDAAmD;;AACzF,SACEC,sBAAsB,EACtBC,oBAAoB,QACf,qCAAoC;;AAC3C,SAASC,gBAAgB,QAAQ,4CAA2C;AAC5E,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SACEC,sBAAsB,EACtBC,sBAAsB,EACtBC,oBAAoB,EACpBC,yBAAyB,QACpB,yCAAwC;AAC/C,SAASC,kBAAkB,QAAQ,sBAAqB;AACxD,SAASC,iBAAiB,QAAQ,+CAA8C;AAChF,SAASC,cAAc,QAAQ,mCAAkC;;;;;;;;;;;AAEjE,MAAMC,cAAc,OAAOd,qQAAAA,CAAMe,iBAAiB,KAAK;AAwChD,SAASC,2BACdC,sBAA2C;IAE3C,OAAO;QACLA;QACAC,iBAAiB,EAAE;QACnBC,2BAA2B;IAC7B;AACF;AAEO,SAASC;IACd,OAAO;QACLC,sBAAsB;QACtBC,oBAAoB;QACpBC,oBAAoB;QACpBC,mBAAmB;QACnBC,eAAe,EAAE;IACnB;AACF;AAEO,SAASC,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E,gEAAgE;YAChE4G,0BACEtB,WACAnB,cAAcnE,yBAAyB;YAEzC,MAAM,IAAIjB,oSAAAA;QACZ;QAEA,oEAAoE;QACpE,sEAAsE;QACtE,uEAAuE;QACvE,MAAMuB,gBAAgB+F,kBAAkB/F,aAAa;QACrD,IAAIA,cAAc2D,MAAM,GAAG,GAAG;YAC5B,IAAK,IAAIgD,IAAI,GAAGA,IAAI3G,cAAc2D,MAAM,EAAEgD,IAAK;gBAC7CL,0BAA0BtB,WAAWhF,aAAa,CAAC2G,EAAE;YACvD;YAEA,MAAM,IAAIlI,oSAAAA;QACZ;QAEA,sEAAsE;QACtE,wDAAwD;QACxD,yEAAyE;QACzE,wDAAwD;QACxD,IAAIsH,kBAAkBjG,kBAAkB,EAAE;YACxC+C,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8QAA8Q,CAAC;YAE3S,MAAM,IAAIlC,oSAAAA;QACZ;QAEA,IAAIiI,YAAAA,GAAgC;YAClC,6EAA6E;YAC7E,iFAAiF;YACjF,2CAA2C;YAC3C7D,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,wGAAwG,CAAC;YAErI,MAAM,IAAIlC,oSAAAA;QACZ;IACF,OAAO;QACL,IACEsH,kBAAkBhG,iBAAiB,KAAK,SACxCgG,kBAAkBlG,kBAAkB,EACpC;YACAgD,QAAQjB,KAAK,CACX,CAAC,OAAO,EAAEoD,UAAUrE,KAAK,CAAC,8PAA8P,CAAC;YAE3R,MAAM,IAAIlC,oSAAAA;QACZ;IACF;AACF;AAEO,SAASmI,uBACdpF,cAA2C,EAC3CqF,MAAkB;IAElB,IAAIrF,eAAeqD,mBAAmB,EAAE;QACtC,OAAOrD,eAAeqD,mBAAmB,CAACD,IAAI,CAAC,IAAMiC;IACvD;IACA,OAAOA;AACT","ignoreList":[0]}}, + {"offset": {"line": 10968, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/request/utils.ts"],"sourcesContent":["import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\n\nexport function throwWithStaticGenerationBailoutError(\n route: string,\n expression: string\n): never {\n throw new StaticGenBailoutError(\n `Route ${route} 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 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 isRequestAPICallableInsideAfter() {\n const afterTaskStore = afterTaskAsyncStorage.getStore()\n return afterTaskStore?.rootTaskSpawnPhase === 'action'\n}\n"],"names":["StaticGenBailoutError","afterTaskAsyncStorage","throwWithStaticGenerationBailoutError","route","expression","throwWithStaticGenerationBailoutErrorWithDynamicError","throwForSearchParamsAccessInUseCache","workStore","constructorOpt","error","Error","captureStackTrace","invalidDynamicUsageError","isRequestAPICallableInsideAfter","afterTaskStore","getStore","rootTaskSpawnPhase"],"mappings":";;;;;;;;;;AAAA,SAASA,qBAAqB,QAAQ,oDAAmD;;AACzF,SAASC,qBAAqB,QAAQ,kDAAiD;;;AAGhF,SAASC,sCACdC,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,oSAAAA,CACR,CAAC,MAAM,EAAEG,MAAM,iDAAiD,EAAEC,WAAW,0HAA0H,CAAC,GADpM,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASC,sDACdF,KAAa,EACbC,UAAkB;IAElB,MAAM,OAAA,cAEL,CAFK,IAAIJ,oSAAAA,CACR,CAAC,MAAM,EAAEG,MAAM,4EAA4E,EAAEC,WAAW,0HAA0H,CAAC,GAD/N,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEO,SAASE,qCACdC,SAAoB,EACpBC,cAAwB;IAExB,MAAMC,QAAQ,OAAA,cAEb,CAFa,IAAIC,MAChB,CAAC,MAAM,EAAEH,UAAUJ,KAAK,CAAC,uXAAuX,CAAC,GADrY,qBAAA;eAAA;oBAAA;sBAAA;IAEd;IAEAO,MAAMC,iBAAiB,CAACF,OAAOD;IAC/BD,UAAUK,wBAAwB,KAAKH;IAEvC,MAAMA;AACR;AAEO,SAASI;IACd,MAAMC,iBAAiBb,+XAAAA,CAAsBc,QAAQ;IACrD,OAAOD,CAAAA,kBAAAA,OAAAA,KAAAA,IAAAA,eAAgBE,kBAAkB,MAAK;AAChD","ignoreList":[0]}}, + {"offset": {"line": 11015, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/request/connection.ts"],"sourcesContent":["import { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport {\n throwForMissingRequestStore,\n workUnitAsyncStorage,\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 makeHangingPromise,\n makeDevtoolsIOAwarePromise,\n} from '../dynamic-rendering-utils'\nimport { isRequestAPICallableInsideAfter } from './utils'\n\n/**\n * This function allows you to indicate that you require an actual user Request before continuing.\n *\n * During prerendering it will never resolve and during rendering it resolves immediately.\n */\nexport function connection(): Promise {\n const callingExpression = 'connection'\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workStore) {\n if (\n workUnitStore &&\n workUnitStore.phase === 'after' &&\n !isRequestAPICallableInsideAfter()\n ) {\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside \"after(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but \"after(...)\" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`\n )\n }\n\n if (workStore.forceStatic) {\n // When using forceStatic, we override all other logic and always just\n // return a resolving promise without tracking.\n return Promise.resolve(undefined)\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 \\`connection\\`. 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 \"connection\" inside \"use cache\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual request, but caches must be able to be produced before a request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'private-cache': {\n // It might not be intuitive to throw for private caches as well, but\n // we don't consider runtime prefetches as \"actual requests\" (in the\n // navigation sense), despite allowing them to read cookies.\n const error = new Error(\n `Route ${workStore.route} used \"connection\" inside \"use cache: private\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual navigation request, but caches must be able to be produced before a navigation request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n Error.captureStackTrace(error, connection)\n workStore.invalidDynamicUsageError ??= error\n throw error\n }\n case 'unstable-cache':\n throw new Error(\n `Route ${workStore.route} used \"connection\" inside a function cached with \"unstable_cache(...)\". The \\`connection()\\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n case 'prerender':\n case 'prerender-client':\n case 'prerender-runtime':\n // We return a promise that never resolves to allow the prerender to\n // stall at this point.\n return makeHangingPromise(\n workUnitStore.renderSignal,\n workStore.route,\n '`connection()`'\n )\n case 'prerender-ppr':\n // We use React's postpone API to interrupt rendering here to create a\n // dynamic hole\n return postponeWithTracking(\n workStore.route,\n 'connection',\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n // We throw an error here to interrupt prerendering to mark the route\n // as dynamic\n return throwToInterruptStaticGeneration(\n 'connection',\n workStore,\n workUnitStore\n )\n case 'request':\n trackDynamicDataInDynamicRender(workUnitStore)\n if (process.env.NODE_ENV === 'development') {\n // Semantically we only need the dev tracking when running in `next dev`\n // but since you would never use next dev with production NODE_ENV we use this\n // as a proxy so we can statically exclude this code from production builds.\n return makeDevtoolsIOAwarePromise(undefined)\n } else {\n return Promise.resolve(undefined)\n }\n default:\n workUnitStore satisfies never\n }\n }\n }\n\n // If we end up here, there was no work store or work unit store present.\n throwForMissingRequestStore(callingExpression)\n}\n"],"names":["workAsyncStorage","throwForMissingRequestStore","workUnitAsyncStorage","postponeWithTracking","throwToInterruptStaticGeneration","trackDynamicDataInDynamicRender","StaticGenBailoutError","makeHangingPromise","makeDevtoolsIOAwarePromise","isRequestAPICallableInsideAfter","connection","callingExpression","workStore","getStore","workUnitStore","phase","Error","route","forceStatic","Promise","resolve","undefined","dynamicShouldError","type","error","captureStackTrace","invalidDynamicUsageError","renderSignal","dynamicTracking","process","env","NODE_ENV"],"mappings":";;;;;AAAA,SAASA,gBAAg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BACpB,qEAAqE;wBACrE,oEAAoE;wBACpE,4DAA4D;wBAC5D,MAAMA,QAAQ,OAAA,cAEb,CAFa,IAAIR,MAChB,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,iXAAiX,CAAC,GAD/X,qBAAA;mCAAA;wCAAA;0CAAA;wBAEd;wBACAD,MAAMS,iBAAiB,CAACD,OAAOd;wBAC/BE,UAAUc,wBAAwB,KAAKF;wBACvC,MAAMA;oBACR;gBACA,KAAK;oBACH,MAAM,OAAA,cAEL,CAFK,IAAIR,MACR,CAAC,MAAM,EAAEJ,UAAUK,KAAK,CAAC,0XAA0X,CAAC,GADhZ,qBAAA;+BAAA;oCAAA;sCAAA;oBAEN;gBACF,KAAK;gBACL,KAAK;gBACL,KAAK;oBACH,oEAAoE;oBACpE,uBAAuB;oBACvB,WAAOV,iRAAAA,EACLO,cAAca,YAAY,EAC1Bf,UAAUK,KAAK,EACf;gBAEJ,KAAK;oBACH,sEAAsE;oBACtE,eAAe;oBACf,WAAOd,2RAAAA,EACLS,UAAUK,KAAK,EACf,cACAH,cAAcc,eAAe;gBAEjC,KAAK;oBACH,qEAAqE;oBACrE,aAAa;oBACb,WAAOxB,uSAAAA,EACL,cACAQ,WACAE;gBAEJ,KAAK;wBACHT,sSAAAA,EAAgCS;oBAChC,IAAIe,QAAQC,GAAG,CAACC,QAAQ,KAAK,WAAe;wBAC1C,wEAAwE;wBACxE,8EAA8E;wBAC9E,4EAA4E;wBAC5E,WAAOvB,yRAAAA,EAA2Ba;oBACpC,OAAO;;gBAGT;oBACEP;YACJ;QACF;IACF;IAEA,yEAAyE;QACzEb,0UAAAA,EAA4BU;AAC9B","ignoreList":[0]}}, + {"offset": {"line": 11125, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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 // fallthrough\n 'then',\n 'catch',\n 'finally',\n\n // React Promise extension\n // fallthrough\n 'status',\n\n // React introspection\n 'displayName',\n '_debugInfo',\n\n // Common tested properties\n // fallthrough\n 'toJSON',\n '$$typeof',\n '__esModule',\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,OAAQ,MAAID,SAAO,MAAGC,OAAK;IAC7B;IACA,OAAQ,MAAID,SAAO,MAAGG,KAAKC,SAAS,CAACH,QAAM;AAC7C;AAEO,SAASI,kCACdL,MAAc,EACdC,IAAY;IAEZ,MAAMK,kBAAkBH,KAAKC,SAAS,CAACH;IACvC,OAAQ,kBAAgBD,SAAO,OAAIM,kBAAgB,UAASA,kBAAgB,SAAMN,SAAO;AAC3F;AAEO,MAAMO,sBAAsB,IAAIC,IAAI;IACzC;IACA;IACA;IACA;IACA;IACA;IAEA,oBAAoB;IACpB,cAAc;IACd;IACA;IACA;IAEA,0BAA0B;IAC1B,cAAc;IACd;IAEA,sBAAsB;IACtB;IACA;IAEA,2BAA2B;IAC3B,cAAc;IACd;IACA;IACA;CACD,EAAC","ignoreList":[0]}}, + {"offset": {"line": 11177, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/app-render/action-async-storage-instance.ts"],"sourcesContent":["import type { ActionAsyncStorage } from './action-async-storage.external'\nimport { createAsyncLocalStorage } from './async-local-storage'\n\nexport const actionAsyncStorageInstance: ActionAsyncStorage =\n createAsyncLocalStorage()\n"],"names":["createAsyncLocalStorage","actionAsyncStorageInstance"],"mappings":";;;;AACA,SAASA,uBAAuB,QAAQ,wBAAuB;;AAExD,MAAMC,iCACXD,mSAAAA,GAAyB","ignoreList":[0]}}, + {"offset": {"line": 11188, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/app-render/action-async-storage.external.ts"],"sourcesContent":["import type { AsyncLocalStorage } from 'async_hooks'\n\n// Share the instance module in the next-shared layer\nimport { actionAsyncStorageInstance } from './action-async-storage-instance' with { 'turbopack-transition': 'next-shared' }\nexport interface ActionStore {\n readonly isAction?: boolean\n readonly isAppRoute?: boolean\n}\n\nexport type ActionAsyncStorage = AsyncLocalStorage\n\nexport { actionAsyncStorageInstance as actionAsyncStorage }\n"],"names":["actionAsyncStorageInstance","actionAsyncStorage"],"mappings":"AAEA,qDAAqD;;AACrD,SAASA,0BAA0B,QAAQ,uCAAuC","ignoreList":[0]}}, + {"offset": {"line": 11207, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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","bgC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AAc,CAAC,OAAO,EAAEA,EAAE,OAAO,CAAC,GAAGJ,OAAM;AACpE,MAAMK,OAAOP,UAAU,WAAW,YAAY,mBAAkB;AAChE,MAAMQ,MAAMR,UAAU,WAAW,YAAY,mBAAkB;AAC/D,MAAMS,SAAST,UAAU,WAAW,YAAW;AAC/C,MAAMU,YAAYV,UAAU,WAAW,YAAW;AAClD,MAAMW,UAAUX,UAAU,WAAW,YAAW;AAChD,MAAMY,SAASZ,UAAU,WAAW,YAAW;AAC/C,MAAMa,gBAAgBb,UAAU,WAAW,YAAW;AACtD,MAAMc,QAAQd,UAAU,YAAY,YAAW;AAC/C,MAAMe,MAAMf,UAAU,YAAY,YAAW;AAC7C,MAAMgB,QAAQhB,UAAU,YAAY,YAAW;AAC/C,MAAMiB,SAASjB,UAAU,YAAY,YAAW;AAChD,MAAMkB,OAAOlB,UAAU,YAAY,YAAW;AAC9C,MAAMmB,UAAUnB,UAAU,YAAY,YAAW;AACjD,MAAMoB,SAASpB,UAAU,0BAA0B,YAAW;AAC9D,MAAMqB,OAAOrB,UAAU,YAAY,YAAW;AAC9C,MAAMsB,QAAQtB,UAAU,YAAY,YAAW;AAC/C,MAAMuB,OAAOvB,UAAU,YAAY,YAAW;AAC9C,MAAMwB,UAAUxB,UAAU,YAAY,YAAW;AACjD,MAAMyB,QAAQzB,UAAU,YAAY,YAAW;AAC/C,MAAM0B,UAAU1B,UAAU,YAAY,YAAW;AACjD,MAAM2B,WAAW3B,UAAU,YAAY,YAAW;AAClD,MAAM4B,SAAS5B,UAAU,YAAY,YAAW;AAChD,MAAM6B,YAAY7B,UAAU,YAAY,YAAW;AACnD,MAAM8B,SAAS9B,UAAU,YAAY,YAAW;AAChD,MAAM+B,UAAU/B,UAAU,YAAY,YAAW","ignoreList":[0]}}, + {"offset": {"line": 11322, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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 // logging format: ' '\n // e.g. ' āœ“ Compiled successfully'\n // Add spaces to align with the indent of other logs\n console.log(' ' + message.join(' '))\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(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"],"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","join","warnOnceCache","value","warnOnce","key","has","set"],"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,8OAAAA,MAAML,6OAAAA,EAAK;IACjBS,WAAON,4OAAAA,MAAIH,6OAAAA,EAAK;IAChBU,UAAMN,+OAAAA,MAAOJ,6OAAAA,EAAK;IAClBW,OAAO;IACPC,UAAMP,8OAAAA,MAAML,6OAAAA,EAAK;IACjBa,WAAOZ,8OAAAA,MAAMD,6OAAAA,EAAK;IAClBc,WAAOZ,gPAAAA,MAAQF,6OAAAA,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,CAAC,MAAMC,SAAS,MAAML,OAAO,CAAC,EAAE;QACxD,OAAO;YACLM,OAAO,CAACF,cAAc,CAAC,MAAMC,WAAWL;QAC1C;IACF;AACF;AAEO,SAASO,UAAU,GAAGP,OAAiB;IAC5C,wCAAwC;IACxC,kCAAkC;IAClC,oDAAoD;IACpDM,QAAQT,GAAG,CAAC,QAAQG,QAAQQ,IAAI,CAAC;AACnC;AAEO,SAASnB,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,MAAMS,gBAAgB,IAAItB,6PAAAA,CAAiB,OAAQ,CAACuB,QAAUA,MAAMR,MAAM;AACnE,SAASS,SAAS,GAAGX,OAAc;IACxC,MAAMY,MAAMZ,QAAQQ,IAAI,CAAC;IACzB,IAAI,CAACC,cAAcI,GAAG,CAACD,MAAM;QAC3BH,cAAcK,GAAG,CAACF,KAAKA;QACvBrB,QAAQS;IACV;AACF","ignoreList":[0]}}, + {"offset": {"line": 11420, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/request/root-params.ts"],"sourcesContent":["import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n postponeWithTracking,\n throwToInterruptStaticGeneration,\n} from '../app-render/dynamic-rendering'\nimport {\n workAsyncStorage,\n type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport {\n workUnitAsyncStorage,\n type PrerenderStoreLegacy,\n type PrerenderStorePPR,\n type StaticPrerenderStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FallbackRouteParams } from './fallback-params'\nimport type { Params, ParamValue } from './params'\nimport {\n describeStringPropertyAccess,\n wellKnownProperties,\n} from '../../shared/lib/utils/reflect-utils'\nimport { actionAsyncStorage } from '../app-render/action-async-storage.external'\nimport { warnOnce } from '../../build/output/log'\n\ninterface CacheLifetime {}\nconst CachedParams = new WeakMap>()\n\n/**\n * @deprecated import specific root params from `next/root-params` instead.\n */\nexport async function unstable_rootParams(): Promise {\n warnOnce(\n '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'\n )\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError('Missing workStore in unstable_rootParams')\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` in Pages Router. This API is only available within App Router.`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache': {\n throw new Error(\n `Route ${workStore.route} used \\`unstable_rootParams()\\` inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n return createPrerenderRootParams(\n workUnitStore.rootParams,\n workStore,\n workUnitStore\n )\n case 'private-cache':\n case 'prerender-runtime':\n case 'request':\n return Promise.resolve(workUnitStore.rootParams)\n default:\n return workUnitStore satisfies never\n }\n}\n\nfunction createPrerenderRootParams(\n underlyingParams: Params,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n const exportName = '`unstable_rootParams`'\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 'prerender': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const promise = makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n '`unstable_rootParams`'\n )\n CachedParams.set(underlyingParams, promise)\n\n return promise\n }\n }\n }\n break\n }\n case 'prerender-ppr': {\n const fallbackParams = prerenderStore.fallbackRouteParams\n if (fallbackParams) {\n for (const key in underlyingParams) {\n if (fallbackParams.has(key)) {\n // We have fallback params at this level so we need to make an erroring\n // params object which will postpone if you access the fallback params\n return makeErroringRootParams(\n underlyingParams,\n fallbackParams,\n workStore,\n prerenderStore\n )\n }\n }\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(underlyingParams)\n}\n\nfunction makeErroringRootParams(\n underlyingParams: Params,\n fallbackParams: FallbackRouteParams,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy\n): Promise {\n const cachedParams = CachedParams.get(underlyingParams)\n if (cachedParams) {\n return cachedParams\n }\n\n const augmentedUnderlying = { ...underlyingParams }\n\n // We don't use makeResolvedReactPromise here because params\n // supports copying with spread and we don't want to unnecessarily\n // instrument the promise with spreadable properties of ReactPromise.\n const promise = Promise.resolve(augmentedUnderlying)\n CachedParams.set(underlyingParams, promise)\n\n Object.keys(underlyingParams).forEach((prop) => {\n if (wellKnownProperties.has(prop)) {\n // These properties cannot be shadowed because they need to be the\n // true underlying value for Promises to work correctly at runtime\n } else {\n if (fallbackParams.has(prop)) {\n Object.defineProperty(augmentedUnderlying, prop, {\n get() {\n const expression = describeStringPropertyAccess(\n 'unstable_rootParams',\n prop\n )\n // In most dynamic APIs we also throw if `dynamic = \"error\"` however\n // for params is only dynamic when we're generating a fallback shell\n // and even when `dynamic = \"error\"` we still support generating dynamic\n // fallback shells\n // TODO remove this comment when cacheComponents is the default since there\n // will be no `dynamic = \"error\"`\n if (prerenderStore.type === 'prerender-ppr') {\n // PPR Prerender (no cacheComponents)\n postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n } else {\n // Legacy Prerender\n throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n },\n enumerable: true,\n })\n } else {\n ;(promise as any)[prop] = underlyingParams[prop]\n }\n }\n })\n\n return promise\n}\n\n/**\n * Used for the compiler-generated `next/root-params` module.\n * @internal\n */\nexport function getRootParam(paramName: string): Promise {\n const apiName = `\\`import('next/root-params').${paramName}()\\``\n\n const workStore = workAsyncStorage.getStore()\n if (!workStore) {\n throw new InvariantError(`Missing workStore in ${apiName}`)\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) {\n throw new Error(\n `Route ${workStore.route} used ${apiName} outside of a Server Component. This is not allowed.`\n )\n }\n\n const actionStore = actionAsyncStorage.getStore()\n if (actionStore) {\n if (actionStore.isAppRoute) {\n // TODO(root-params): add support for route handlers\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js.`\n )\n }\n if (actionStore.isAction && workUnitStore.phase === 'action') {\n // Actions are not fundamentally tied to a route (even if they're always submitted from some page),\n // so root params would be inconsistent if an action is called from multiple roots.\n // Make sure we check if the phase is \"action\" - we should not error in the rerender\n // after an action revalidates or updates cookies (which will still have `actionStore.isAction === true`)\n throw new Error(\n `${apiName} was used inside a Server Action. This is not supported. Functions from 'next/root-params' can only be called in the context of a route.`\n )\n }\n }\n\n switch (workUnitStore.type) {\n case 'unstable-cache':\n case 'cache': {\n throw new Error(\n `Route ${workStore.route} used ${apiName} inside \\`\"use cache\"\\` or \\`unstable_cache\\`. Support for this API inside cache scopes is planned for a future version of Next.js.`\n )\n }\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy': {\n return createPrerenderRootParamPromise(\n paramName,\n workStore,\n workUnitStore,\n apiName\n )\n }\n case 'private-cache':\n case 'prerender-runtime':\n case 'request': {\n break\n }\n default: {\n workUnitStore satisfies never\n }\n }\n return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: StaticPrerenderStore,\n apiName: string\n): Promise {\n switch (prerenderStore.type) {\n case 'prerender-client': {\n throw new InvariantError(\n `${apiName} must not be used within a client component. Next.js should be preventing ${apiName} from being included in client components statically, but did not in this case.`\n )\n }\n case 'prerender':\n case 'prerender-legacy':\n case 'prerender-ppr':\n default:\n }\n\n const underlyingParams = prerenderStore.rootParams\n\n switch (prerenderStore.type) {\n case 'prerender': {\n // We are in a dynamicIO prerender.\n // The param is a fallback, so it should be treated as dynamic.\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeHangingPromise(\n prerenderStore.renderSignal,\n workStore.route,\n apiName\n )\n }\n break\n }\n case 'prerender-ppr': {\n // We aren't in a dynamicIO prerender, but the param is a fallback,\n // so we need to make an erroring params object which will postpone/error if you access it\n if (\n prerenderStore.fallbackRouteParams &&\n prerenderStore.fallbackRouteParams.has(paramName)\n ) {\n return makeErroringRootParamPromise(\n paramName,\n workStore,\n prerenderStore,\n apiName\n )\n }\n break\n }\n case 'prerender-legacy': {\n // legacy prerenders can't have fallback params\n break\n }\n default: {\n prerenderStore satisfies never\n }\n }\n\n // If the param is not a fallback param, we just return the statically available value.\n return Promise.resolve(underlyingParams[paramName])\n}\n\n/** Deliberately async -- we want to create a rejected promise, not error synchronously. */\nasync function makeErroringRootParamPromise(\n paramName: string,\n workStore: WorkStore,\n prerenderStore: PrerenderStorePPR | PrerenderStoreLegacy,\n apiName: string\n): Promise {\n const expression = describeStringPropertyAccess(apiName, paramName)\n // In most dynamic APIs, we also throw if `dynamic = \"error\"`.\n // However, root params are only dynamic when we're generating a fallback shell,\n // and even with `dynamic = \"error\"` we still support generating dynamic fallback shells.\n // TODO: remove this comment when dynamicIO is the default since there will be no `dynamic = \"error\"`\n switch (prerenderStore.type) {\n case 'prerender-ppr': {\n return postponeWithTracking(\n workStore.route,\n expression,\n prerenderStore.dynamicTracking\n )\n }\n case 'prerender-legacy': {\n return throwToInterruptStaticGeneration(\n expression,\n workStore,\n prerenderStore\n )\n }\n default: {\n prerenderStore satisfies never\n }\n }\n}\n"],"names":["InvariantError","postponeWithTracking","throwToInterruptStaticGeneration","workAsyncStorage","workUnitAsyncStorage","makeHangingPromise","describeStringPropertyAccess","wellKnownProperties","actionAsyncStorage","warnOnce","CachedParams","WeakMap","unstable_rootParams","workStore","getStore","workUnitStore","Error","route","type","createPrerenderRootParams","rootParams","Promise","resolve","underlyingParams","prerenderStore","exportName","fallbackParams","fallbackRouteParams","key","has","cachedParams","get","promise","renderSignal","set","makeErroringRootParams","augmentedUnderlying","Object","keys","forEach","prop","defineProperty","expression","dynamicTracking","enumerable","getRootParam","paramName","apiName","actionStore","isAppRoute","isAction","phase","createPrerenderRootParamPromise","makeErroringRootParamPromise"],"mappings":";;;;;;AAAA,SAASA,cAAc,QAAQ,mCAAkC;AACjE,SACEC,oBAAoB,EACpBC,gCAAgC,QAC3B,kCAAiC;;AACxC,SACEC,gBAAgB,QAEX,4CAA2C;;AAClD,SACEC,oBAAoB,QAIf,iDAAgD;AACvD,SAASC,kBAAkB,QAAQ,6BAA4B;AAG/D,SACEC,4BAA4B,EAC5BC,mBAAmB,QACd,uCAAsC;;AAC7C,SAASC,kBAAkB,QAAQ,8CAA6C;AAChF,SAASC,QAAQ,QAAQ,yBAAwB;;;;;;;;;AAGjD,MAAMC,eAAe,IAAIC;AAKlB,eAAeC;QACpBH,sPAAAA,EACE;IAEF,MAAMI,YAAYV,uWAAAA,CAAiBW,QAA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mE;gBACnE,0FAA0F;gBAC1F,IACEvB,eAAeG,mBAAmB,IAClCH,eAAeG,mBAAmB,CAACE,GAAG,CAACiB,YACvC;oBACA,OAAOO,6BACLP,WACAjC,WACAW,gBACAuB;gBAEJ;gBACA;YACF;QACA,KAAK;YAAoB;gBAEvB;YACF;QACA;YAAS;gBACPvB;YACF;IACF;IAEA,uFAAuF;IACvF,OAAOH,QAAQC,OAAO,CAACC,gBAAgB,CAACuB,UAAU;AACpD;AAEA,yFAAyF,GACzF,eAAeO,6BACbP,SAAiB,EACjBjC,SAAoB,EACpBW,cAAwD,EACxDuB,OAAe;IAEf,MAAML,iBAAapC,8RAAAA,EAA6ByC,SAASD;IACzD,8DAA8D;IAC9D,gFAAgF;IAChF,yFAAyF;IACzF,qGAAqG;IACrG,OAAQtB,eAAeN,IAAI;QACzB,KAAK;YAAiB;gBACpB,WAAOjB,2RAAAA,EACLY,UAAUI,KAAK,EACfyB,YACAlB,eAAemB,eAAe;YAElC;QACA,KAAK;YAAoB;gBACvB,WAAOzC,uSAAAA,EACLwC,YACA7B,WACAW;YAEJ;QACA;YAAS;gBACPA;YACF;IACF;AACF","ignoreList":[0]}}, + {"offset": {"line": 11726, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/server/web/exports/index.ts"],"sourcesContent":["// Alias index file of next/server for edge runtime for tree-shaking purpose\n\nexport { ImageResponse } from '../spec-extension/image-response'\nexport { NextRequest } from '../spec-extension/request'\nexport { NextResponse } from '../spec-extension/response'\nexport { userAgent, userAgentFromString } from '../spec-extension/user-agent'\nexport { URLPattern } from '../spec-extension/url-pattern'\nexport { after } from '../../after'\nexport { connection } from '../../request/connection'\nexport { unstable_rootParams } from '../../request/root-params'\n"],"names":["ImageResponse","NextRequest","NextResponse","userAgent","userAgentFromString","URLPattern","after","connection","unstable_rootParams"],"mappings":"AAAA,4EAA4E;;AAE5E,SAASA,aAAa,QAAQ,mCAAkC;AAChE,SAASC,WAAW,QAAQ,4BAA2B;AACvD,SAASC,YAAY,QAAQ,6BAA4B;AACzD,SAASC,SAAS,EAAEC,mBAAmB,QAAQ,+BAA8B;AAC7E,SAASC,UAAU,QAAQ,gCAA+B;AAC1D,SAASC,KAAK,QAAQ,cAAa;AACnC,SAASC,UAAU,QAAQ,2BAA0B;AACrD,SAASC,mBAAmB,QAAQ,4BAA2B","ignoreList":[0]}}, + {"offset": {"line": 11748, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/api/server.ts"],"sourcesContent":["export * from '../server/web/exports/index'\n"],"names":[],"mappings":";AAAA,cAAc,8BAA6B","ignoreList":[0]}}, + {"offset": {"line": 11788, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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": 11834, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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": 11848, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\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","RedirectType","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,IAAKC,eAAAA,WAAAA,GAAAA,SAAAA,YAAAA;;;WAAAA;MAGX;AAaM,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,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAK,KACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd,4RAAAA;AAElB","ignoreList":[0]}}, + {"offset": {"line": 11879, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/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,gRAAAA,EAAgBE,cAAUH,iUAAAA,EAA0BG;AAC7D","ignoreList":[0]}}, + {"offset": {"line": 11894, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/src/build/templates/middleware.ts"],"sourcesContent":["import type { AdapterOptions } from '../../server/web/adapter'\n\nimport '../../server/web/globals'\n\nimport { adapter } from '../../server/web/adapter'\n\n// Import the userland code.\nimport * as _mod from 'VAR_USERLAND'\nimport { edgeInstrumentationOnRequestError } from '../../server/web/globals'\nimport { isNextRouterError } from '../../client/components/is-next-router-error'\n\nconst mod = { ..._mod }\nconst handler = mod.middleware || mod.default\n\nconst page = 'VAR_DEFINITION_PAGE'\n\nif (typeof handler !== 'function') {\n throw new Error(\n `The Middleware \"${page}\" must export a \\`middleware\\` or a \\`default\\` function`\n )\n}\n\n// Middleware will only sent out the FetchEvent to next server,\n// so load instrumentation module here and track the error inside middleware module.\nfunction errorHandledHandler(fn: AdapterOptions['handler']) {\n return async (...args: Parameters) => {\n try {\n return await fn(...args)\n } catch (err) {\n // In development, error the navigation API usage in runtime,\n // since it's not allowed to be used in middleware as it's outside of react component tree.\n if (process.env.NODE_ENV !== 'production') {\n if (isNextRouterError(err)) {\n err.message = `Next.js navigation API is not allowed to be used in Middleware.`\n throw err\n }\n }\n const req = args[0]\n const url = new URL(req.url)\n const resource = url.pathname + url.search\n await edgeInstrumentationOnRequestError(\n err,\n {\n path: resource,\n method: req.method,\n headers: Object.fromEntries(req.headers.entries()),\n },\n {\n routerKind: 'Pages Router',\n routePath: '/middleware',\n routeType: 'middleware',\n revalidateReason: undefined,\n }\n )\n\n throw err\n }\n }\n}\n\nexport default function nHandler(\n opts: Omit\n) {\n return adapter({\n ...opts,\n page,\n handler: errorHandledHandler(handler),\n })\n}\n"],"names":["adapter","_mod","edgeInstrumentationOnRequestError","isNextRouterError","mod","handler","middleware","default","page","Error","errorHandledHandler","fn","args","err","process","env","NODE_ENV","message","req","url","URL","resource","pathname","search","path","method","headers","Object","fromEntries","entries","routerKind","routePath","routeType","revalidate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,GAAGoC,IAAI;QACP5B;QACAH,SAASK,oBAAoBL;IAC/B;AACF","ignoreList":[0]}}, + {"offset": {"line": 11962, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/apps/web/edge-wrapper.js"],"sourcesContent":["self._ENTRIES ||= {};\nconst modProm = import('MODULE');\nmodProm.catch(() => {});\nself._ENTRIES[\"middleware_middleware\"] = new Proxy(modProm, {\n get(modProm, name) {\n if (name === \"then\") {\n return (res, rej) => modProm.then(res, rej);\n }\n let result = (...args) => modProm.then((mod) => (0, mod[name])(...args));\n result.then = (res, rej) => modProm.then((mod) => mod[name]).then(res, rej);\n return result;\n },\n});\n"],"names":[],"mappings":"AAAA,KAAK,QAAQ,KAAK,CAAC;AACnB,MAAM;AACN,QAAQ,KAAK,CAAC,KAAO;AACrB,KAAK,QAAQ,CAAC,wBAAwB,GAAG,IAAI,MAAM,SAAS;IACxD,KAAI,OAAO,EAAE,IAAI;QACb,IAAI,SAAS,QAAQ;YACjB,OAAO,CAAC,KAAK,MAAQ,QAAQ,IAAI,CAAC,KAAK;QAC3C;QACA,IAAI,SAAS,CAAC,GAAG,OAAS,QAAQ,IAAI,CAAC,CAAC,MAAQ,CAAC,GAAG,GAAG,CAAC,KAAK,KAAK;QAClE,OAAO,IAAI,GAAG,CAAC,KAAK,MAAQ,QAAQ,IAAI,CAAC,CAAC,MAAQ,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK;QACvE,OAAO;IACX;AACJ"}}] +} \ No newline at end of file diff --git a/apps/web/.next/server/edge/chunks/apps_web_edge-wrapper_53e34dd4.js.map b/apps/web/.next/server/edge/chunks/apps_web_edge-wrapper_53e34dd4.js.map new file mode 100644 index 00000000..e7b902b9 --- /dev/null +++ b/apps/web/.next/server/edge/chunks/apps_web_edge-wrapper_53e34dd4.js.map @@ -0,0 +1,11 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime-utils.ts"],"sourcesContent":["/**\r\n * This file contains runtime types and functions that are shared between all\r\n * TurboPack ECMAScript runtimes.\r\n *\r\n * It will be prepended to the runtime code of each runtime.\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\n\r\n/// \r\n\r\ntype EsmNamespaceObject = Record\r\n\r\n// @ts-ignore Defined in `dev-base.ts`\r\ndeclare function getOrInstantiateModuleFromParent(\r\n id: ModuleId,\r\n sourceModule: M\r\n): M\r\n\r\nconst REEXPORTED_OBJECTS = new WeakMap()\r\n\r\n/**\r\n * Constructs the `__turbopack_context__` object for a module.\r\n */\r\nfunction Context(\r\n this: TurbopackBaseContext,\r\n module: Module,\r\n exports: Exports\r\n) {\r\n this.m = module\r\n // We need to store this here instead of accessing it from the module object to:\r\n // 1. Make it available to factories directly, since we rewrite `this` to\r\n // `__turbopack_context__.e` in CJS modules.\r\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\r\n // can still access the original exports object from functions like\r\n // `esmExport`\r\n // Ideally we could find a new approach for async modules and drop this property altogether.\r\n this.e = exports\r\n}\r\nconst contextPrototype = Context.prototype as TurbopackBaseContext\r\n\r\ntype ModuleContextMap = Record\r\n\r\ninterface ModuleContextEntry {\r\n id: () => ModuleId\r\n module: () => any\r\n}\r\n\r\ninterface ModuleContext {\r\n // require call\r\n (moduleId: ModuleId): Exports | EsmNamespaceObject\r\n\r\n // async import call\r\n import(moduleId: ModuleId): Promise\r\n\r\n keys(): ModuleId[]\r\n\r\n resolve(moduleId: ModuleId): ModuleId\r\n}\r\n\r\ntype GetOrInstantiateModuleFromParent = (\r\n moduleId: M['id'],\r\n parentModule: M\r\n) => M\r\n\r\ndeclare function getOrInstantiateRuntimeModule(\r\n chunkPath: ChunkPath,\r\n moduleId: ModuleId\r\n): Module\r\n\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty\r\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\r\n\r\nfunction defineProp(\r\n obj: any,\r\n name: PropertyKey,\r\n options: PropertyDescriptor & ThisType\r\n) {\r\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\r\n}\r\n\r\nfunction getOverwrittenModule(\r\n moduleCache: ModuleCache,\r\n id: ModuleId\r\n): Module {\r\n let module = moduleCache[id]\r\n if (!module) {\r\n // This is invoked when a module is merged into another module, thus it wasn't invoked via\r\n // instantiateModule and the cache entry wasn't created yet.\r\n module = createModuleObject(id)\r\n moduleCache[id] = module\r\n }\r\n return module\r\n}\r\n\r\n/**\r\n * Creates the module object. Only done here to ensure all module objects have the same shape.\r\n */\r\nfunction createModuleObject(id: ModuleId): Module {\r\n return {\r\n exports: {},\r\n error: undefined,\r\n id,\r\n namespaceObject: undefined,\r\n }\r\n}\r\n\r\n/**\r\n * Adds the getters to the exports object.\r\n */\r\nfunction esm(\r\n exports: Exports,\r\n getters: Array unknown) | ((v: unknown) => void)>\r\n) {\r\n defineProp(exports, '__esModule', { value: true })\r\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\r\n let i = 0\r\n while (i < getters.length) {\r\n const propName = getters[i++] as string\r\n // TODO(luke.sandberg): we could support raw values here, but would need a discriminator beyond 'not a function'\r\n const getter = getters[i++] as () => unknown\r\n if (typeof getters[i] === 'function') {\r\n // a setter\r\n defineProp(exports, propName, {\r\n get: getter,\r\n set: getters[i++] as (v: unknown) => void,\r\n enumerable: true,\r\n })\r\n } else {\r\n defineProp(exports, propName, { get: getter, enumerable: true })\r\n }\r\n }\r\n Object.seal(exports)\r\n}\r\n\r\n/**\r\n * Makes the module an ESM with exports\r\n */\r\nfunction esmExport(\r\n this: TurbopackBaseContext,\r\n getters: Array unknown) | ((v: unknown) => void)>,\r\n id: ModuleId | undefined\r\n) {\r\n let module: Module\r\n let exports: Module['exports']\r\n if (id != null) {\r\n module = getOverwrittenModule(this.c, id)\r\n exports = module.exports\r\n } else {\r\n module = this.m\r\n exports = this.e\r\n }\r\n module.namespaceObject = exports\r\n esm(exports, getters)\r\n}\r\ncontextPrototype.s = esmExport\r\n\r\ntype ReexportedObjects = Record[]\r\nfunction ensureDynamicExports(\r\n module: Module,\r\n exports: Exports\r\n): ReexportedObjects {\r\n let reexportedObjects: ReexportedObjects | undefined =\r\n REEXPORTED_OBJECTS.get(module)\r\n\r\n if (!reexportedObjects) {\r\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\r\n module.exports = module.namespaceObject = new Proxy(exports, {\r\n get(target, prop) {\r\n if (\r\n hasOwnProperty.call(target, prop) ||\r\n prop === 'default' ||\r\n prop === '__esModule'\r\n ) {\r\n return Reflect.get(target, prop)\r\n }\r\n for (const obj of reexportedObjects!) {\r\n const value = Reflect.get(obj, prop)\r\n if (value !== undefined) return value\r\n }\r\n return undefined\r\n },\r\n ownKeys(target) {\r\n const keys = Reflect.ownKeys(target)\r\n for (const obj of reexportedObjects!) {\r\n for (const key of Reflect.ownKeys(obj)) {\r\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\r\n }\r\n }\r\n return keys\r\n },\r\n })\r\n }\r\n return reexportedObjects\r\n}\r\n\r\n/**\r\n * Dynamically exports properties from an object\r\n */\r\nfunction dynamicExport(\r\n this: TurbopackBaseContext,\r\n object: Record,\r\n id: ModuleId | undefined\r\n) {\r\n let module: Module\r\n let exports: Module['exports']\r\n if (id != null) {\r\n module = getOverwrittenModule(this.c, id)\r\n exports = module.exports\r\n } else {\r\n module = this.m\r\n exports = this.e\r\n }\r\n const reexportedObjects = ensureDynamicExports(module, exports)\r\n\r\n if (typeof object === 'object' && object !== null) {\r\n reexportedObjects.push(object)\r\n }\r\n}\r\ncontextPrototype.j = dynamicExport\r\n\r\nfunction exportValue(\r\n this: TurbopackBaseContext,\r\n value: any,\r\n id: ModuleId | undefined\r\n) {\r\n let module: Module\r\n if (id != null) {\r\n module = getOverwrittenModule(this.c, id)\r\n } else {\r\n module = this.m\r\n }\r\n module.exports = value\r\n}\r\ncontextPrototype.v = exportValue\r\n\r\nfunction exportNamespace(\r\n this: TurbopackBaseContext,\r\n namespace: any,\r\n id: ModuleId | undefined\r\n) {\r\n let module: Module\r\n if (id != null) {\r\n module = getOverwrittenModule(this.c, id)\r\n } else {\r\n module = this.m\r\n }\r\n module.exports = module.namespaceObject = namespace\r\n}\r\ncontextPrototype.n = exportNamespace\r\n\r\nfunction createGetter(obj: Record, key: string | symbol) {\r\n return () => obj[key]\r\n}\r\n\r\n/**\r\n * @returns prototype of the object\r\n */\r\nconst getProto: (obj: any) => any = Object.getPrototypeOf\r\n ? (obj) => Object.getPrototypeOf(obj)\r\n : (obj) => obj.__proto__\r\n\r\n/** Prototypes that are not expanded for exports */\r\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\r\n\r\n/**\r\n * @param raw\r\n * @param ns\r\n * @param allowExportDefault\r\n * * `false`: will have the raw module as default export\r\n * * `true`: will have the default property as default export\r\n */\r\nfunction interopEsm(\r\n raw: Exports,\r\n ns: EsmNamespaceObject,\r\n allowExportDefault?: boolean\r\n) {\r\n const getters: Array unknown) | ((v: unknown) => void)> = []\r\n // The index of the `default` export if any\r\n let defaultLocation = -1\r\n for (\r\n let current = raw;\r\n (typeof current === 'object' || typeof current === 'function') &&\r\n !LEAF_PROTOTYPES.includes(current);\r\n current = getProto(current)\r\n ) {\r\n for (const key of Object.getOwnPropertyNames(current)) {\r\n getters.push(key, createGetter(raw, key))\r\n if (defaultLocation === -1 && key === 'default') {\r\n defaultLocation = getters.length - 1\r\n }\r\n }\r\n }\r\n\r\n // this is not really correct\r\n // we should set the `default` getter if the imported module is a `.cjs file`\r\n if (!(allowExportDefault && defaultLocation >= 0)) {\r\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\r\n if (defaultLocation >= 0) {\r\n getters[defaultLocation] = () => raw\r\n } else {\r\n getters.push('default', () => raw)\r\n }\r\n }\r\n\r\n esm(ns, getters)\r\n return ns\r\n}\r\n\r\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\r\n if (typeof raw === 'function') {\r\n return function (this: any, ...args: any[]) {\r\n return raw.apply(this, args)\r\n }\r\n } else {\r\n return Object.create(null)\r\n }\r\n}\r\n\r\nfunction esmImport(\r\n this: TurbopackBaseContext,\r\n id: ModuleId\r\n): Exclude {\r\n const module = getOrInstantiateModuleFromParent(id, this.m)\r\n\r\n // any ES module has to have `module.namespaceObject` defined.\r\n if (module.namespaceObject) return module.namespaceObject\r\n\r\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\r\n const raw = module.exports\r\n return (module.namespaceObject = interopEsm(\r\n raw,\r\n createNS(raw),\r\n raw && (raw as any).__esModule\r\n ))\r\n}\r\ncontextPrototype.i = esmImport\r\n\r\nfunction asyncLoader(\r\n this: TurbopackBaseContext,\r\n moduleId: ModuleId\r\n): Promise {\r\n const loader = this.r(moduleId) as (\r\n importFunction: EsmImport\r\n ) => Promise\r\n return loader(this.i.bind(this))\r\n}\r\ncontextPrototype.A = asyncLoader\r\n\r\n// Add a simple runtime require so that environments without one can still pass\r\n// `typeof require` CommonJS checks so that exports are correctly registered.\r\nconst runtimeRequire =\r\n // @ts-ignore\r\n typeof require === 'function'\r\n ? // @ts-ignore\r\n require\r\n : function require() {\r\n throw new Error('Unexpected use of runtime require')\r\n }\r\ncontextPrototype.t = runtimeRequire\r\n\r\nfunction commonJsRequire(\r\n this: TurbopackBaseContext,\r\n id: ModuleId\r\n): Exports {\r\n return getOrInstantiateModuleFromParent(id, this.m).exports\r\n}\r\ncontextPrototype.r = commonJsRequire\r\n\r\n/**\r\n * `require.context` and require/import expression runtime.\r\n */\r\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\r\n function moduleContext(id: ModuleId): Exports {\r\n if (hasOwnProperty.call(map, id)) {\r\n return map[id].module()\r\n }\r\n\r\n const e = new Error(`Cannot find module '${id}'`)\r\n ;(e as any).code = 'MODULE_NOT_FOUND'\r\n throw e\r\n }\r\n\r\n moduleContext.keys = (): ModuleId[] => {\r\n return Object.keys(map)\r\n }\r\n\r\n moduleContext.resolve = (id: ModuleId): ModuleId => {\r\n if (hasOwnProperty.call(map, id)) {\r\n return map[id].id()\r\n }\r\n\r\n const e = new Error(`Cannot find module '${id}'`)\r\n ;(e as any).code = 'MODULE_NOT_FOUND'\r\n throw e\r\n }\r\n\r\n moduleContext.import = async (id: ModuleId) => {\r\n return await (moduleContext(id) as Promise)\r\n }\r\n\r\n return moduleContext\r\n}\r\ncontextPrototype.f = moduleContext\r\n\r\n/**\r\n * Returns the path of a chunk defined by its data.\r\n */\r\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\r\n return typeof chunkData === 'string' ? chunkData : chunkData.path\r\n}\r\n\r\nfunction isPromise(maybePromise: any): maybePromise is Promise {\r\n return (\r\n maybePromise != null &&\r\n typeof maybePromise === 'object' &&\r\n 'then' in maybePromise &&\r\n typeof maybePromise.then === 'function'\r\n )\r\n}\r\n\r\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\r\n return turbopackQueues in obj\r\n}\r\n\r\nfunction createPromise() {\r\n let resolve: (value: T | PromiseLike) => void\r\n let reject: (reason?: any) => void\r\n\r\n const promise = new Promise((res, rej) => {\r\n reject = rej\r\n resolve = res\r\n })\r\n\r\n return {\r\n promise,\r\n resolve: resolve!,\r\n reject: reject!,\r\n }\r\n}\r\n\r\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\r\n// The CompressedModuleFactories format is\r\n// - 1 or more module ids\r\n// - a module factory function\r\n// So walking this is a little complex but the flat structure is also fast to\r\n// traverse, we can use `typeof` operators to distinguish the two cases.\r\nfunction installCompressedModuleFactories(\r\n chunkModules: CompressedModuleFactories,\r\n offset: number,\r\n moduleFactories: ModuleFactories,\r\n newModuleId?: (id: ModuleId) => void\r\n) {\r\n let i = offset\r\n while (i < chunkModules.length) {\r\n let moduleId = chunkModules[i] as ModuleId\r\n let end = i + 1\r\n // Find our factory function\r\n while (\r\n end < chunkModules.length &&\r\n typeof chunkModules[end] !== 'function'\r\n ) {\r\n end++\r\n }\r\n if (end === chunkModules.length) {\r\n throw new Error('malformed chunk format, expected a factory function')\r\n }\r\n // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already\r\n // present we know all the additional ids are also present, so we don't need to check.\r\n if (!moduleFactories.has(moduleId)) {\r\n const moduleFactoryFn = chunkModules[end] as Function\r\n applyModuleFactoryName(moduleFactoryFn)\r\n newModuleId?.(moduleId)\r\n for (; i < end; i++) {\r\n moduleId = chunkModules[i] as ModuleId\r\n moduleFactories.set(moduleId, moduleFactoryFn)\r\n }\r\n }\r\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\r\n }\r\n}\r\n\r\n// everything below is adapted from webpack\r\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\r\n\r\nconst turbopackQueues = Symbol('turbopack queues')\r\nconst turbopackExports = Symbol('turbopack exports')\r\nconst turbopackError = Symbol('turbopack error')\r\n\r\nconst enum QueueStatus {\r\n Unknown = -1,\r\n Unresolved = 0,\r\n Resolved = 1,\r\n}\r\n\r\ntype AsyncQueueFn = (() => void) & { queueCount: number }\r\ntype AsyncQueue = AsyncQueueFn[] & {\r\n status: QueueStatus\r\n}\r\n\r\nfunction resolveQueue(queue?: AsyncQueue) {\r\n if (queue && queue.status !== QueueStatus.Resolved) {\r\n queue.status = QueueStatus.Resolved\r\n queue.forEach((fn) => fn.queueCount--)\r\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\r\n }\r\n}\r\n\r\ntype Dep = Exports | AsyncModulePromise | Promise\r\n\r\ntype AsyncModuleExt = {\r\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\r\n [turbopackExports]: Exports\r\n [turbopackError]?: any\r\n}\r\n\r\ntype AsyncModulePromise = Promise & AsyncModuleExt\r\n\r\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\r\n return deps.map((dep): AsyncModuleExt => {\r\n if (dep !== null && typeof dep === 'object') {\r\n if (isAsyncModuleExt(dep)) return dep\r\n if (isPromise(dep)) {\r\n const queue: AsyncQueue = Object.assign([], {\r\n status: QueueStatus.Unresolved,\r\n })\r\n\r\n const obj: AsyncModuleExt = {\r\n [turbopackExports]: {},\r\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\r\n }\r\n\r\n dep.then(\r\n (res) => {\r\n obj[turbopackExports] = res\r\n resolveQueue(queue)\r\n },\r\n (err) => {\r\n obj[turbopackError] = err\r\n resolveQueue(queue)\r\n }\r\n )\r\n\r\n return obj\r\n }\r\n }\r\n\r\n return {\r\n [turbopackExports]: dep,\r\n [turbopackQueues]: () => {},\r\n }\r\n })\r\n}\r\n\r\nfunction asyncModule(\r\n this: TurbopackBaseContext,\r\n body: (\r\n handleAsyncDependencies: (\r\n deps: Dep[]\r\n ) => Exports[] | Promise<() => Exports[]>,\r\n asyncResult: (err?: any) => void\r\n ) => void,\r\n hasAwait: boolean\r\n) {\r\n const module = this.m\r\n const queue: AsyncQueue | undefined = hasAwait\r\n ? Object.assign([], { status: QueueStatus.Unknown })\r\n : undefined\r\n\r\n const depQueues: Set = new Set()\r\n\r\n const { resolve, reject, promise: rawPromise } = createPromise()\r\n\r\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\r\n [turbopackExports]: module.exports,\r\n [turbopackQueues]: (fn) => {\r\n queue && fn(queue)\r\n depQueues.forEach(fn)\r\n promise['catch'](() => {})\r\n },\r\n } satisfies AsyncModuleExt)\r\n\r\n const attributes: PropertyDescriptor = {\r\n get(): any {\r\n return promise\r\n },\r\n set(v: any) {\r\n // Calling `esmExport` leads to this.\r\n if (v !== promise) {\r\n promise[turbopackExports] = v\r\n }\r\n },\r\n }\r\n\r\n Object.defineProperty(module, 'exports', attributes)\r\n Object.defineProperty(module, 'namespaceObject', attributes)\r\n\r\n function handleAsyncDependencies(deps: Dep[]) {\r\n const currentDeps = wrapDeps(deps)\r\n\r\n const getResult = () =>\r\n currentDeps.map((d) => {\r\n if (d[turbopackError]) throw d[turbopackError]\r\n return d[turbopackExports]\r\n })\r\n\r\n const { promise, resolve } = createPromise<() => Exports[]>()\r\n\r\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\r\n queueCount: 0,\r\n })\r\n\r\n function fnQueue(q: AsyncQueue) {\r\n if (q !== queue && !depQueues.has(q)) {\r\n depQueues.add(q)\r\n if (q && q.status === QueueStatus.Unresolved) {\r\n fn.queueCount++\r\n q.push(fn)\r\n }\r\n }\r\n }\r\n\r\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\r\n\r\n return fn.queueCount ? promise : getResult()\r\n }\r\n\r\n function asyncResult(err?: any) {\r\n if (err) {\r\n reject((promise[turbopackError] = err))\r\n } else {\r\n resolve(promise[turbopackExports])\r\n }\r\n\r\n resolveQueue(queue)\r\n }\r\n\r\n body(handleAsyncDependencies, asyncResult)\r\n\r\n if (queue && queue.status === QueueStatus.Unknown) {\r\n queue.status = QueueStatus.Unresolved\r\n }\r\n}\r\ncontextPrototype.a = asyncModule\r\n\r\n/**\r\n * A pseudo \"fake\" URL object to resolve to its relative path.\r\n *\r\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\r\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\r\n * hydration mismatch.\r\n *\r\n * This is based on webpack's existing implementation:\r\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\r\n */\r\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\r\n const realUrl = new URL(inputUrl, 'x:/')\r\n const values: Record = {}\r\n for (const key in realUrl) values[key] = (realUrl as any)[key]\r\n values.href = inputUrl\r\n values.pathname = inputUrl.replace(/[?#].*/, '')\r\n values.origin = values.protocol = ''\r\n values.toString = values.toJSON = (..._args: Array) => inputUrl\r\n for (const key in values)\r\n Object.defineProperty(this, key, {\r\n enumerable: true,\r\n configurable: true,\r\n value: values[key],\r\n })\r\n}\r\nrelativeURL.prototype = URL.prototype\r\ncontextPrototype.U = relativeURL\r\n\r\n/**\r\n * Utility function to ensure all variants of an enum are handled.\r\n */\r\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\r\n throw new Error(`Invariant: ${computeMessage(never)}`)\r\n}\r\n\r\n/**\r\n * A stub function to make `require` available but non-functional in ESM.\r\n */\r\nfunction requireStub(_moduleId: ModuleId): never {\r\n throw new Error('dynamic usage of require is not supported')\r\n}\r\ncontextPrototype.z = requireStub\r\n\r\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\r\ncontextPrototype.g = globalThis\r\n\r\ntype ContextConstructor = {\r\n new (module: Module, exports: Exports): TurbopackBaseContext\r\n}\r\n\r\nfunction applyModuleFactoryName(factory: Function) {\r\n // Give the module factory a nice name to improve stack traces.\r\n Object.defineProperty(factory, 'name', {\r\n value: '__TURBOPACK__module__evaluation__',\r\n })\r\n}\r\n"],"names":[],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAU7C,MAAM,qBAAqB,IAAI;AAE/B;;CAEC,GACD,SAAS,QAEP,MAAc,EACd,OAAgB;IAEhB,IAAI,CAAC,CAAC,GAAG;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAsE;IACtE,iBAAiB;IACjB,4FAA4F;IAC5F,IAAI,CAAC,CAAC,GAAG;AACX;AACA,MAAM,mBAAmB,QAAQ,SAAS;AA+B1C,MAAM,iBAAiB,OAAO,SAAS,CAAC,cAAc;AACtD,MAAM,cAAc,OAAO,WAAW,eAAe,OAAO,WAAW;AAEvE,SAAS,WACP,GAAQ,EACR,IAAiB,EACjB,OAA2C;IAE3C,IAAI,CAAC,eAAe,IAAI,CAAC,KAAK,OAAO,OAAO,cAAc,CAAC,KAAK,MAAM;AACxE;AAEA,SAAS,qBACP,WAAgC,EAChC,EAAY;IAEZ,IAAI,SAAS,WAAW,CAAC,GAAG;IAC5B,IAAI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": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\r\n * This file contains runtime types and functions that are shared between all\r\n * Turbopack *development* ECMAScript runtimes.\r\n *\r\n * It will be appended to the runtime code of each runtime right after the\r\n * shared runtime utils.\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\n\r\n/// \r\n/// \r\n\r\n// Used in WebWorkers to tell the runtime about the chunk base path\r\ndeclare var TURBOPACK_WORKER_LOCATION: string\r\n// Used in WebWorkers to tell the runtime about the current chunk url since it can't be detected via document.currentScript\r\n// Note it's stored in reversed order to use push and pop\r\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\r\n\r\n// Injected by rust code\r\ndeclare var CHUNK_BASE_PATH: string\r\ndeclare var CHUNK_SUFFIX_PATH: string\r\n\r\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\r\n R: ResolvePathFromModule\r\n}\r\n\r\nconst browserContextPrototype =\r\n Context.prototype as TurbopackBrowserBaseContext\r\n\r\n// Provided by build or dev base\r\ndeclare function instantiateModule(\r\n id: ModuleId,\r\n sourceType: SourceType,\r\n sourceData: SourceData\r\n): Module\r\n\r\ntype RuntimeParams = {\r\n otherChunks: ChunkData[]\r\n runtimeModuleIds: ModuleId[]\r\n}\r\n\r\ntype ChunkRegistration = [\r\n chunkPath: ChunkScript,\r\n ...([RuntimeParams] | CompressedModuleFactories),\r\n]\r\n\r\ntype ChunkList = {\r\n script: ChunkListScript\r\n chunks: ChunkData[]\r\n source: 'entry' | 'dynamic'\r\n}\r\n\r\nenum SourceType {\r\n /**\r\n * The module was instantiated because it was included in an evaluated chunk's\r\n * runtime.\r\n * SourceData is a ChunkPath.\r\n */\r\n Runtime = 0,\r\n /**\r\n * The module was instantiated because a parent module imported it.\r\n * SourceData is a ModuleId.\r\n */\r\n Parent = 1,\r\n /**\r\n * The module was instantiated because it was included in a chunk's hot module\r\n * update.\r\n * SourceData is an array of ModuleIds or undefined.\r\n */\r\n Update = 2,\r\n}\r\n\r\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\r\ninterface RuntimeBackend {\r\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\r\n /**\r\n * Returns the same Promise for the same chunk URL.\r\n */\r\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\r\n loadWebAssembly: (\r\n sourceType: SourceType,\r\n sourceData: SourceData,\r\n wasmChunkPath: ChunkPath,\r\n edgeModule: () => WebAssembly.Module,\r\n importsObj: WebAssembly.Imports\r\n ) => Promise\r\n loadWebAssemblyModule: (\r\n sourceType: SourceType,\r\n sourceData: SourceData,\r\n wasmChunkPath: ChunkPath,\r\n edgeModule: () => WebAssembly.Module\r\n ) => Promise\r\n}\r\n\r\ninterface DevRuntimeBackend {\r\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\r\n unloadChunk?: (chunkUrl: ChunkUrl) => void\r\n restart: () => void\r\n}\r\n\r\nconst moduleFactories: ModuleFactories = new Map()\r\ncontextPrototype.M = moduleFactories\r\n\r\nconst availableModules: Map | true> = new Map()\r\n\r\nconst availableModuleChunks: Map | true> = new Map()\r\n\r\nfunction factoryNotAvailable(\r\n moduleId: ModuleId,\r\n sourceType: SourceType,\r\n sourceData: SourceData\r\n): never {\r\n let instantiationReason\r\n switch (sourceType) {\r\n case SourceType.Runtime:\r\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\r\n break\r\n case SourceType.Parent:\r\n instantiationReason = `because it was required from module ${sourceData}`\r\n break\r\n case SourceType.Update:\r\n instantiationReason = 'because of an HMR update'\r\n break\r\n default:\r\n invariant(\r\n sourceType,\r\n (sourceType) => `Unknown source type: ${sourceType}`\r\n )\r\n }\r\n throw new Error(\r\n `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available. It might have been deleted in an HMR update.`\r\n )\r\n}\r\n\r\nfunction loadChunk(\r\n this: TurbopackBrowserBaseContext,\r\n chunkData: ChunkData\r\n): Promise {\r\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\r\n}\r\nbrowserContextPrototype.l = loadChunk\r\n\r\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\r\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\r\n}\r\n\r\nasync function loadChunkInternal(\r\n sourceType: SourceType,\r\n sourceData: SourceData,\r\n chunkData: ChunkData\r\n): Promise {\r\n if (typeof chunkData === 'string') {\r\n return loadChunkPath(sourceType, sourceData, chunkData)\r\n }\r\n\r\n const includedList = chunkData.included || []\r\n const modulesPromises = includedList.map((included) => {\r\n if (moduleFactories.has(included)) return true\r\n return availableModules.get(included)\r\n })\r\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\r\n // When all included items are already loaded or loading, we can skip loading ourselves\r\n await Promise.all(modulesPromises)\r\n return\r\n }\r\n\r\n const includedModuleChunksList = chunkData.moduleChunks || []\r\n const moduleChunksPromises = includedModuleChunksList\r\n .map((included) => {\r\n // TODO(alexkirsz) Do we need this check?\r\n // if (moduleFactories[included]) return true;\r\n return availableModuleChunks.get(included)\r\n })\r\n .filter((p) => p)\r\n\r\n let promise: Promise\r\n if (moduleChunksPromises.length > 0) {\r\n // Some module chunks are already loaded or loading.\r\n\r\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\r\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\r\n await Promise.all(moduleChunksPromises)\r\n return\r\n }\r\n\r\n const moduleChunksToLoad: Set = new Set()\r\n for (const moduleChunk of includedModuleChunksList) {\r\n if (!availableModuleChunks.has(moduleChunk)) {\r\n moduleChunksToLoad.add(moduleChunk)\r\n }\r\n }\r\n\r\n for (const moduleChunkToLoad of moduleChunksToLoad) {\r\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\r\n\r\n availableModuleChunks.set(moduleChunkToLoad, promise)\r\n\r\n moduleChunksPromises.push(promise)\r\n }\r\n\r\n promise = Promise.all(moduleChunksPromises)\r\n } else {\r\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\r\n\r\n // Mark all included module chunks as loading if they are not already loaded or loading.\r\n for (const includedModuleChunk of includedModuleChunksList) {\r\n if (!availableModuleChunks.has(includedModuleChunk)) {\r\n availableModuleChunks.set(includedModuleChunk, promise)\r\n }\r\n }\r\n }\r\n\r\n for (const included of includedList) {\r\n if (!availableModules.has(included)) {\r\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\r\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\r\n availableModules.set(included, promise)\r\n }\r\n }\r\n\r\n await promise\r\n}\r\n\r\nconst loadedChunk = Promise.resolve(undefined)\r\nconst instrumentedBackendLoadChunks = new WeakMap<\r\n Promise,\r\n Promise | typeof loadedChunk\r\n>()\r\n// Do not make this async. React relies on referential equality of the returned Promise.\r\nfunction loadChunkByUrl(\r\n this: TurbopackBrowserBaseContext,\r\n chunkUrl: ChunkUrl\r\n) {\r\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\r\n}\r\nbrowserContextPrototype.L = loadChunkByUrl\r\n\r\n// Do not make this async. React relies on referential equality of the returned Promise.\r\nfunction loadChunkByUrlInternal(\r\n sourceType: SourceType,\r\n sourceData: SourceData,\r\n chunkUrl: ChunkUrl\r\n): Promise {\r\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\r\n let entry = instrumentedBackendLoadChunks.get(thenable)\r\n if (entry === undefined) {\r\n const resolve = instrumentedBackendLoadChunks.set.bind(\r\n instrumentedBackendLoadChunks,\r\n thenable,\r\n loadedChunk\r\n )\r\n entry = thenable.then(resolve).catch((error) => {\r\n let loadReason: string\r\n switch (sourceType) {\r\n case SourceType.Runtime:\r\n loadReason = `as a runtime dependency of chunk ${sourceData}`\r\n break\r\n case SourceType.Parent:\r\n loadReason = `from module ${sourceData}`\r\n break\r\n case SourceType.Update:\r\n loadReason = 'from an HMR update'\r\n break\r\n default:\r\n invariant(\r\n sourceType,\r\n (sourceType) => `Unknown source type: ${sourceType}`\r\n )\r\n }\r\n throw new Error(\r\n `Failed to load chunk ${chunkUrl} ${loadReason}${\r\n error ? `: ${error}` : ''\r\n }`,\r\n error\r\n ? {\r\n cause: error,\r\n }\r\n : undefined\r\n )\r\n })\r\n instrumentedBackendLoadChunks.set(thenable, entry)\r\n }\r\n\r\n return entry\r\n}\r\n\r\n// Do not make this async. React relies on referential equality of the returned Promise.\r\nfunction loadChunkPath(\r\n sourceType: SourceType,\r\n sourceData: SourceData,\r\n chunkPath: ChunkPath\r\n): Promise {\r\n const url = getChunkRelativeUrl(chunkPath)\r\n return loadChunkByUrlInternal(sourceType, sourceData, url)\r\n}\r\n\r\n/**\r\n * Returns an absolute url to an asset.\r\n */\r\nfunction resolvePathFromModule(\r\n this: TurbopackBaseContext,\r\n moduleId: string\r\n): string {\r\n const exported = this.r(moduleId)\r\n return exported?.default ?? exported\r\n}\r\nbrowserContextPrototype.R = resolvePathFromModule\r\n\r\n/**\r\n * no-op for browser\r\n * @param modulePath\r\n */\r\nfunction resolveAbsolutePath(modulePath?: string): string {\r\n return `/ROOT/${modulePath ?? ''}`\r\n}\r\nbrowserContextPrototype.P = resolveAbsolutePath\r\n\r\n/**\r\n * Returns a blob URL for the worker.\r\n * @param chunks list of chunks to load\r\n */\r\nfunction getWorkerBlobURL(chunks: ChunkPath[]): string {\r\n // It is important to reverse the array so when bootstrapping we can infer what chunk is being\r\n // evaluated by poping urls off of this array. See `getPathFromScript`\r\n let bootstrap = `self.TURBOPACK_WORKER_LOCATION = ${JSON.stringify(location.origin)};\r\nself.TURBOPACK_NEXT_CHUNK_URLS = ${JSON.stringify(chunks.reverse().map(getChunkRelativeUrl), null, 2)};\r\nimportScripts(...self.TURBOPACK_NEXT_CHUNK_URLS.map(c => self.TURBOPACK_WORKER_LOCATION + c).reverse());`\r\n let blob = new Blob([bootstrap], { type: 'text/javascript' })\r\n return URL.createObjectURL(blob)\r\n}\r\nbrowserContextPrototype.b = getWorkerBlobURL\r\n\r\n/**\r\n * Instantiates a runtime module.\r\n */\r\nfunction instantiateRuntimeModule(\r\n moduleId: ModuleId,\r\n chunkPath: ChunkPath\r\n): Module {\r\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\r\n}\r\n/**\r\n * Returns the URL relative to the origin where a chunk can be fetched from.\r\n */\r\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\r\n return `${CHUNK_BASE_PATH}${chunkPath\r\n .split('/')\r\n .map((p) => encodeURIComponent(p))\r\n .join('/')}${CHUNK_SUFFIX_PATH}` as ChunkUrl\r\n}\r\n\r\n/**\r\n * Return the ChunkPath from a ChunkScript.\r\n */\r\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\r\nfunction getPathFromScript(\r\n chunkScript: ChunkListPath | ChunkListScript\r\n): ChunkListPath\r\nfunction getPathFromScript(\r\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\r\n): ChunkPath | ChunkListPath {\r\n if (typeof chunkScript === 'string') {\r\n return chunkScript as ChunkPath | ChunkListPath\r\n }\r\n const chunkUrl =\r\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\r\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\r\n : chunkScript.getAttribute('src')!\r\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\r\n const path = src.startsWith(CHUNK_BASE_PATH)\r\n ? src.slice(CHUNK_BASE_PATH.length)\r\n : src\r\n return path as ChunkPath | ChunkListPath\r\n}\r\n\r\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\r\n/**\r\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\r\n */\r\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\r\n return regexJsUrl.test(chunkUrlOrPath)\r\n}\r\n\r\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\r\n/**\r\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\r\n */\r\nfunction isCss(chunkUrl: ChunkUrl): boolean {\r\n return regexCssUrl.test(chunkUrl)\r\n}\r\n\r\nfunction loadWebAssembly(\r\n this: TurbopackBaseContext,\r\n chunkPath: ChunkPath,\r\n edgeModule: () => WebAssembly.Module,\r\n importsObj: WebAssembly.Imports\r\n): Promise {\r\n return BACKEND.loadWebAssembly(\r\n SourceType.Parent,\r\n this.m.id,\r\n chunkPath,\r\n edgeModule,\r\n importsObj\r\n )\r\n}\r\ncontextPrototype.w = loadWebAssembly\r\n\r\nfunction loadWebAssemblyModule(\r\n this: TurbopackBaseContext,\r\n chunkPath: ChunkPath,\r\n edgeModule: () => WebAssembly.Module\r\n): Promise {\r\n return BACKEND.loadWebAssemblyModule(\r\n SourceType.Parent,\r\n this.m.id,\r\n chunkPath,\r\n edgeModule\r\n )\r\n}\r\ncontextPrototype.u = loadWebAssemblyModule\r\n"],"names":[],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,mEAAmE;AAcnE,MAAM,0BACJ,QAAQ,SAAS;AAyBnB,IAAA,AAAK,oCAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBE;EAAA;AAgDL,MAAM,kBAAmC,IAAI;AAC7C,iBAAiB,CAAC,GAAG;AAErB,MAAM,mBAAuD,IAAI;AAEjE,MAAM,wBAA6D,IAAI;AAEvE,SAAS,oBACP,QAAkB,EAClB,UAAsB,EACtB,UAAsB;IAEtB,IAAI;IACJ,OAAQ;QACN;YACE,sBAAsB,CAAC,4BAA4B,EAAE,YAAY;YACjE;QACF;YACE,sBAAsB,CAAC,oCAAoC,EAAE,YAAY;YACzE;QACF;YACE,sBAAsB;YACtB;QACF;YACE,UACE,YACA,CAAC,aAAe,CAAC,qBAAqB,EAAE,YAAY;IAE1D;IACA,MAAM,IAAI,MACR,CAAC,OAAO,EAAE,SAAS,kBAAkB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IACA,MAAM,WACJ,OAAO,8BAA8B,cACjC,0BAA0B,GAAG,KAC7B,YAAY,YAAY,CAAC;IAC/B,MAAM,MAAM,mBAAmB,SAAS,OAAO,CAAC,WAAW;IAC3D,MAAM,OAAO,IAAI,UAAU,CAAC,mBACxB,IAAI,KAAK,CAAC,gBAAgB,MAAM,IAChC;IACJ,OAAO;AACT;AAEA,MAAM,aAAa;AACnB;;CAEC,GACD,SAAS,KAAK,cAAoC;IAChD,OAAO,WAAW,IAAI,CAAC;AACzB;AAEA,MAAM,cAAc;AACpB;;CAEC,GACD,SAAS,MAAM,QAAkB;IAC/B,OAAO,YAAY,IAAI,CAAC;AAC1B;AAEA,SAAS,gBAEP,SAAoB,EACpB,UAAoC,EACpC,UAA+B;IAE/B,OAAO,QAAQ,eAAe,IAE5B,IAAI,CAAC,CAAC,CAAC,EAAE,EACT,WACA,YACA;AAEJ;AACA,iBAAiB,CAAC,GAAG;AAErB,SAAS,sBAEP,SAAoB,EACpB,UAAoC;IAEpC,OAAO,QAAQ,qBAAqB,IAElC,IAAI,CAAC,CAAC,CAAC,EAAE,EACT,WACA;AAEJ;AACA,iBAAiB,CAAC,GAAG","ignoreList":[0]}}, + {"offset": {"line": 704, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \r\n/// \r\n/// \r\n\r\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\r\n k: RefreshContext\r\n}\r\n\r\nconst devContextPrototype = Context.prototype as TurbopackDevContext\r\n\r\n/**\r\n * This file contains runtime types and functions that are shared between all\r\n * Turbopack *development* ECMAScript runtimes.\r\n *\r\n * It will be appended to the runtime code of each runtime right after the\r\n * shared runtime utils.\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\n\r\nconst devModuleCache: ModuleCache = Object.create(null)\r\ndevContextPrototype.c = devModuleCache\r\n\r\n// This file must not use `import` and `export` statements. Otherwise, it\r\n// becomes impossible to augment interfaces declared in ``d files\r\n// (e.g. `Module`). Hence, the need for `import()` here.\r\ntype RefreshRuntimeGlobals =\r\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\r\n\r\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\r\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\r\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\r\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\r\n\r\ntype RefreshContext = {\r\n register: RefreshRuntimeGlobals['$RefreshReg$']\r\n signature: RefreshRuntimeGlobals['$RefreshSig$']\r\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\r\n}\r\n\r\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\r\n\r\ntype ModuleFactory = (\r\n this: Module['exports'],\r\n context: TurbopackDevContext\r\n) => unknown\r\n\r\ninterface DevRuntimeBackend {\r\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\r\n unloadChunk?: (chunkUrl: ChunkUrl) => void\r\n restart: () => void\r\n}\r\n\r\nclass UpdateApplyError extends Error {\r\n name = 'UpdateApplyError'\r\n\r\n dependencyChain: ModuleId[]\r\n\r\n constructor(message: string, dependencyChain: ModuleId[]) {\r\n super(message)\r\n this.dependencyChain = dependencyChain\r\n }\r\n}\r\n\r\n/**\r\n * Module IDs that are instantiated as part of the runtime of a chunk.\r\n */\r\nconst runtimeModules: Set = new Set()\r\n\r\n/**\r\n * Map from module ID to the chunks that contain this module.\r\n *\r\n * In HMR, we need to keep track of which modules are contained in which so\r\n * chunks. This is so we don't eagerly dispose of a module when it is removed\r\n * from chunk A, but still exists in chunk B.\r\n */\r\nconst moduleChunksMap: Map> = new Map()\r\n/**\r\n * Map from a chunk path to all modules it contains.\r\n */\r\nconst chunkModulesMap: Map> = new Map()\r\n/**\r\n * Chunk lists that contain a runtime. When these chunk lists receive an update\r\n * that can't be reconciled with the current state of the page, we need to\r\n * reload the runtime entirely.\r\n */\r\nconst runtimeChunkLists: Set = new Set()\r\n/**\r\n * Map from a chunk list to the chunk paths it contains.\r\n */\r\nconst chunkListChunksMap: Map> = new Map()\r\n/**\r\n * Map from a chunk path to the chunk lists it belongs to.\r\n */\r\nconst chunkChunkListsMap: Map> = new Map()\r\n\r\n/**\r\n * Maps module IDs to persisted data between executions of their hot module\r\n * implementation (`hot.data`).\r\n */\r\nconst moduleHotData: Map = new Map()\r\n/**\r\n * Maps module instances to their hot module state.\r\n */\r\nconst moduleHotState: Map = new Map()\r\n/**\r\n * Modules that call `module.hot.invalidate()` (while being updated).\r\n */\r\nconst queuedInvalidatedModules: Set = new Set()\r\n\r\n/**\r\n * Gets or instantiates a runtime module.\r\n */\r\n// @ts-ignore\r\nfunction getOrInstantiateRuntimeModule(\r\n chunkPath: ChunkPath,\r\n moduleId: ModuleId\r\n): Module {\r\n const module = devModuleCache[moduleId]\r\n if (module) {\r\n if (module.error) {\r\n throw module.error\r\n }\r\n return module\r\n }\r\n\r\n // @ts-ignore\r\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\r\n}\r\n\r\n/**\r\n * Retrieves a module from the cache, or instantiate it if it is not cached.\r\n */\r\n// @ts-ignore Defined in `runtime-utils.ts`\r\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\r\n HotModule\r\n> = (id, sourceModule) => {\r\n if (!sourceModule.hot.active) {\r\n console.warn(\r\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\r\n )\r\n }\r\n\r\n const module = devModuleCache[id]\r\n\r\n if (sourceModule.children.indexOf(id) === -1) {\r\n sourceModule.children.push(id)\r\n }\r\n\r\n if (module) {\r\n if (module.error) {\r\n throw module.error\r\n }\r\n\r\n if (module.parents.indexOf(sourceModule.id) === -1) {\r\n module.parents.push(sourceModule.id)\r\n }\r\n\r\n return module\r\n }\r\n\r\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\r\n}\r\n\r\nfunction DevContext(\r\n this: TurbopackDevContext,\r\n module: HotModule,\r\n exports: Exports,\r\n refresh: RefreshContext\r\n) {\r\n Context.call(this, module, exports)\r\n this.k = refresh\r\n}\r\nDevContext.prototype = Context.prototype\r\n\r\ntype DevContextConstructor = {\r\n new (\r\n module: HotModule,\r\n exports: Exports,\r\n refresh: RefreshContext\r\n ): TurbopackDevContext\r\n}\r\n\r\nfunction instantiateModule(\r\n moduleId: ModuleId,\r\n sourceType: SourceType,\r\n sourceData: SourceData\r\n): Module {\r\n // We are in development, this is always a string.\r\n let id = moduleId as string\r\n\r\n const moduleFactory = moduleFactories.get(id)\r\n if (typeof moduleFactory !== 'function') {\r\n // This can happen if modules incorrectly handle HMR disposes/updates,\r\n // e.g. when they keep a `setTimeout` around which still executes old code\r\n // and contains e.g. a `require(\"something\")` call.\r\n factoryNotAvailable(id, sourceType, sourceData)\r\n }\r\n\r\n const hotData = moduleHotData.get(id)!\r\n const { hot, hotState } = createModuleHot(id, hotData)\r\n\r\n let parents: ModuleId[]\r\n switch (sourceType) {\r\n case SourceType.Runtime:\r\n runtimeModules.add(id)\r\n parents = []\r\n break\r\n case SourceType.Parent:\r\n // No need to add this module as a child of the parent module here, this\r\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\r\n parents = [sourceData as ModuleId]\r\n break\r\n case SourceType.Update:\r\n parents = (sourceData as ModuleId[]) || []\r\n break\r\n default:\r\n invariant(\r\n sourceType,\r\n (sourceType) => `Unknown source type: ${sourceType}`\r\n )\r\n }\r\n\r\n const module: HotModule = createModuleObject(id) as HotModule\r\n const exports = module.exports\r\n module.parents = parents\r\n module.children = []\r\n module.hot = hot\r\n\r\n devModuleCache[id] = module\r\n moduleHotState.set(module, hotState)\r\n\r\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\r\n try {\r\n runModuleExecutionHooks(module, (refresh) => {\r\n const context = new (DevContext as any as DevContextConstructor)(\r\n module,\r\n exports,\r\n refresh\r\n )\r\n moduleFactory(context, module, exports)\r\n })\r\n } catch (error) {\r\n module.error = error as any\r\n throw error\r\n }\r\n\r\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\r\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\r\n interopEsm(module.exports, module.namespaceObject)\r\n }\r\n\r\n return module\r\n}\r\n\r\nconst DUMMY_REFRESH_CONTEXT = {\r\n register: (_type: unknown, _id: unknown) => {},\r\n signature: () => (_type: unknown) => {},\r\n registerExports: (_module: unknown, _helpers: unknown) => {},\r\n}\r\n\r\n/**\r\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\r\n * Next.js' React Refresh runtime hooks into to add module context to the\r\n * refresh registry.\r\n */\r\nfunction runModuleExecutionHooks(\r\n module: HotModule,\r\n executeModule: (ctx: RefreshContext) => void\r\n) {\r\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\r\n const cleanupReactRefreshIntercept =\r\n globalThis.$RefreshInterceptModuleExecution$(module.id)\r\n try {\r\n executeModule({\r\n register: globalThis.$RefreshReg$,\r\n signature: globalThis.$RefreshSig$,\r\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\r\n })\r\n } finally {\r\n // Always cleanup the intercept, even if module execution failed.\r\n cleanupReactRefreshIntercept()\r\n }\r\n } else {\r\n // If the react refresh hooks are not installed we need to bind dummy functions.\r\n // This is expected when running in a Web Worker. It is also common in some of\r\n // our test environments.\r\n executeModule(DUMMY_REFRESH_CONTEXT)\r\n }\r\n}\r\n\r\n/**\r\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\r\n */\r\nfunction registerExportsAndSetupBoundaryForReactRefresh(\r\n module: HotModule,\r\n helpers: RefreshHelpers\r\n) {\r\n const currentExports = module.exports\r\n const prevExports = module.hot.data.prevExports ?? null\r\n\r\n helpers.registerExportsForReactRefresh(currentExports, module.id)\r\n\r\n // A module can be accepted automatically based on its exports, e.g. when\r\n // it is a Refresh Boundary.\r\n if (helpers.isReactRefreshBoundary(currentExports)) {\r\n // Save the previous exports on update, so we can compare the boundary\r\n // signatures.\r\n module.hot.dispose((data) => {\r\n data.prevExports = currentExports\r\n })\r\n // Unconditionally accept an update to this module, we'll check if it's\r\n // still a Refresh Boundary later.\r\n module.hot.accept()\r\n\r\n // This field is set when the previous version of this module was a\r\n // Refresh Boundary, letting us know we need to check for invalidation or\r\n // enqueue an update.\r\n if (prevExports !== null) {\r\n // A boundary can become ineligible if its exports are incompatible\r\n // with the previous exports.\r\n //\r\n // For example, if you add/remove/change exports, we'll want to\r\n // re-execute the importing modules, and force those components to\r\n // re-render. Similarly, if you convert a class component to a\r\n // function, we want to invalidate the boundary.\r\n if (\r\n helpers.shouldInvalidateReactRefreshBoundary(\r\n helpers.getRefreshBoundarySignature(prevExports),\r\n helpers.getRefreshBoundarySignature(currentExports)\r\n )\r\n ) {\r\n module.hot.invalidate()\r\n } else {\r\n helpers.scheduleUpdate()\r\n }\r\n }\r\n } else {\r\n // Since we just executed the code for the module, it's possible that the\r\n // new exports made it ineligible for being a boundary.\r\n // We only care about the case when we were _previously_ a boundary,\r\n // because we already accepted this update (accidental side effect).\r\n const isNoLongerABoundary = prevExports !== null\r\n if (isNoLongerABoundary) {\r\n module.hot.invalidate()\r\n }\r\n }\r\n}\r\n\r\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\r\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\r\n}\r\n\r\nfunction computeOutdatedModules(\r\n added: Map,\r\n modified: Map\r\n): {\r\n outdatedModules: Set\r\n newModuleFactories: Map\r\n} {\r\n const newModuleFactories = new Map()\r\n\r\n for (const [moduleId, entry] of added) {\r\n if (entry != null) {\r\n newModuleFactories.set(moduleId, _eval(entry))\r\n }\r\n }\r\n\r\n const outdatedModules = computedInvalidatedModules(modified.keys())\r\n\r\n for (const [moduleId, entry] of modified) {\r\n newModuleFactories.set(moduleId, _eval(entry))\r\n }\r\n\r\n return { outdatedModules, newModuleFactories }\r\n}\r\n\r\nfunction computedInvalidatedModules(\r\n invalidated: Iterable\r\n): Set {\r\n const outdatedModules = new Set()\r\n\r\n for (const moduleId of invalidated) {\r\n const effect = getAffectedModuleEffects(moduleId)\r\n\r\n switch (effect.type) {\r\n case 'unaccepted':\r\n throw new UpdateApplyError(\r\n `cannot apply update: unaccepted module. ${formatDependencyChain(\r\n effect.dependencyChain\r\n )}.`,\r\n effect.dependencyChain\r\n )\r\n case 'self-declined':\r\n throw new UpdateApplyError(\r\n `cannot apply update: self-declined module. ${formatDependencyChain(\r\n effect.dependencyChain\r\n )}.`,\r\n effect.dependencyChain\r\n )\r\n case 'accepted':\r\n for (const outdatedModuleId of effect.outdatedModules) {\r\n outdatedModules.add(outdatedModuleId)\r\n }\r\n break\r\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\r\n default:\r\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\r\n }\r\n }\r\n\r\n return outdatedModules\r\n}\r\n\r\nfunction computeOutdatedSelfAcceptedModules(\r\n outdatedModules: Iterable\r\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\r\n const outdatedSelfAcceptedModules: {\r\n moduleId: ModuleId\r\n errorHandler: true | Function\r\n }[] = []\r\n for (const moduleId of outdatedModules) {\r\n const module = devModuleCache[moduleId]\r\n const hotState = moduleHotState.get(module)!\r\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\r\n outdatedSelfAcceptedModules.push({\r\n moduleId,\r\n errorHandler: hotState.selfAccepted,\r\n })\r\n }\r\n }\r\n return outdatedSelfAcceptedModules\r\n}\r\n\r\n/**\r\n * Adds, deletes, and moves modules between chunks. This must happen before the\r\n * dispose phase as it needs to know which modules were removed from all chunks,\r\n * which we can only compute *after* taking care of added and moved modules.\r\n */\r\nfunction updateChunksPhase(\r\n chunksAddedModules: Map>,\r\n chunksDeletedModules: Map>\r\n): { disposedModules: Set } {\r\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\r\n for (const moduleId of addedModuleIds) {\r\n addModuleToChunk(moduleId, chunkPath)\r\n }\r\n }\r\n\r\n const disposedModules: Set = new Set()\r\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\r\n for (const moduleId of addedModuleIds) {\r\n if (removeModuleFromChunk(moduleId, chunkPath)) {\r\n disposedModules.add(moduleId)\r\n }\r\n }\r\n }\r\n\r\n return { disposedModules }\r\n}\r\n\r\nfunction disposePhase(\r\n outdatedModules: Iterable,\r\n disposedModules: Iterable\r\n): { outdatedModuleParents: Map> } {\r\n for (const moduleId of outdatedModules) {\r\n disposeModule(moduleId, 'replace')\r\n }\r\n\r\n for (const moduleId of disposedModules) {\r\n disposeModule(moduleId, 'clear')\r\n }\r\n\r\n // Removing modules from the module cache is a separate step.\r\n // We also want to keep track of previous parents of the outdated modules.\r\n const outdatedModuleParents = new Map()\r\n for (const moduleId of outdatedModules) {\r\n const oldModule = devModuleCache[moduleId]\r\n outdatedModuleParents.set(moduleId, oldModule?.parents)\r\n delete devModuleCache[moduleId]\r\n }\r\n\r\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\r\n // children.\r\n\r\n return { outdatedModuleParents }\r\n}\r\n\r\n/**\r\n * Disposes of an instance of a module.\r\n *\r\n * Returns the persistent hot data that should be kept for the next module\r\n * instance.\r\n *\r\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\r\n * This must be done in a separate step afterwards.\r\n * This is important because all modules need to be disposed to update the\r\n * parent/child relationships before they are actually removed from the devModuleCache.\r\n * If this was done in this method, the following disposeModule calls won't find\r\n * the module from the module id in the cache.\r\n */\r\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\r\n const module = devModuleCache[moduleId]\r\n if (!module) {\r\n return\r\n }\r\n\r\n const hotState = moduleHotState.get(module)!\r\n const data = {}\r\n\r\n // Run the `hot.dispose` handler, if any, passing in the persistent\r\n // `hot.data` object.\r\n for (const disposeHandler of hotState.disposeHandlers) {\r\n disposeHandler(data)\r\n }\r\n\r\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\r\n // module is still importing other modules.\r\n module.hot.active = false\r\n\r\n moduleHotState.delete(module)\r\n\r\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\r\n\r\n // Remove the disposed module from its children's parent list.\r\n // It will be added back once the module re-instantiates and imports its\r\n // children again.\r\n for (const childId of module.children) {\r\n const child = devModuleCache[childId]\r\n if (!child) {\r\n continue\r\n }\r\n\r\n const idx = child.parents.indexOf(module.id)\r\n if (idx >= 0) {\r\n child.parents.splice(idx, 1)\r\n }\r\n }\r\n\r\n switch (mode) {\r\n case 'clear':\r\n delete devModuleCache[module.id]\r\n moduleHotData.delete(module.id)\r\n break\r\n case 'replace':\r\n moduleHotData.set(module.id, data)\r\n break\r\n default:\r\n invariant(mode, (mode) => `invalid mode: ${mode}`)\r\n }\r\n}\r\n\r\nfunction applyPhase(\r\n outdatedSelfAcceptedModules: {\r\n moduleId: ModuleId\r\n errorHandler: true | Function\r\n }[],\r\n newModuleFactories: Map,\r\n outdatedModuleParents: Map>,\r\n reportError: (err: any) => void\r\n) {\r\n // Update module factories.\r\n for (const [moduleId, factory] of newModuleFactories.entries()) {\r\n applyModuleFactoryName(factory)\r\n moduleFactories.set(moduleId, factory)\r\n }\r\n\r\n // TODO(alexkirsz) Run new runtime entries here.\r\n\r\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\r\n\r\n // Re-instantiate all outdated self-accepted modules.\r\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\r\n try {\r\n instantiateModule(\r\n moduleId,\r\n SourceType.Update,\r\n outdatedModuleParents.get(moduleId)\r\n )\r\n } catch (err) {\r\n if (typeof errorHandler === 'function') {\r\n try {\r\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\r\n } catch (err2) {\r\n reportError(err2)\r\n reportError(err)\r\n }\r\n } else {\r\n reportError(err)\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction applyUpdate(update: PartialUpdate) {\r\n switch (update.type) {\r\n case 'ChunkListUpdate':\r\n applyChunkListUpdate(update)\r\n break\r\n default:\r\n invariant(update, (update) => `Unknown update type: ${update.type}`)\r\n }\r\n}\r\n\r\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\r\n if (update.merged != null) {\r\n for (const merged of update.merged) {\r\n switch (merged.type) {\r\n case 'EcmascriptMergedUpdate':\r\n applyEcmascriptMergedUpdate(merged)\r\n break\r\n default:\r\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\r\n }\r\n }\r\n }\r\n\r\n if (update.chunks != null) {\r\n for (const [chunkPath, chunkUpdate] of Object.entries(\r\n update.chunks\r\n ) as Array<[ChunkPath, ChunkUpdate]>) {\r\n const chunkUrl = getChunkRelativeUrl(chunkPath)\r\n\r\n switch (chunkUpdate.type) {\r\n case 'added':\r\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\r\n break\r\n case 'total':\r\n DEV_BACKEND.reloadChunk?.(chunkUrl)\r\n break\r\n case 'deleted':\r\n DEV_BACKEND.unloadChunk?.(chunkUrl)\r\n break\r\n case 'partial':\r\n invariant(\r\n chunkUpdate.instruction,\r\n (instruction) =>\r\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\r\n )\r\n break\r\n default:\r\n invariant(\r\n chunkUpdate,\r\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\r\n )\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\r\n const { entries = {}, chunks = {} } = update\r\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\r\n entries,\r\n chunks\r\n )\r\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\r\n added,\r\n modified\r\n )\r\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\r\n\r\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\r\n}\r\n\r\nfunction applyInvalidatedModules(outdatedModules: Set) {\r\n if (queuedInvalidatedModules.size > 0) {\r\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\r\n outdatedModules.add(moduleId)\r\n })\r\n\r\n queuedInvalidatedModules.clear()\r\n }\r\n\r\n return outdatedModules\r\n}\r\n\r\nfunction applyInternal(\r\n outdatedModules: Set,\r\n disposedModules: Iterable,\r\n newModuleFactories: Map\r\n) {\r\n outdatedModules = applyInvalidatedModules(outdatedModules)\r\n\r\n const outdatedSelfAcceptedModules =\r\n computeOutdatedSelfAcceptedModules(outdatedModules)\r\n\r\n const { outdatedModuleParents } = disposePhase(\r\n outdatedModules,\r\n disposedModules\r\n )\r\n\r\n // we want to continue on error and only throw the error after we tried applying all updates\r\n let error: any\r\n\r\n function reportError(err: any) {\r\n if (!error) error = err\r\n }\r\n\r\n applyPhase(\r\n outdatedSelfAcceptedModules,\r\n newModuleFactories,\r\n outdatedModuleParents,\r\n reportError\r\n )\r\n\r\n if (error) {\r\n throw error\r\n }\r\n\r\n if (queuedInvalidatedModules.size > 0) {\r\n applyInternal(new Set(), [], new Map())\r\n }\r\n}\r\n\r\nfunction computeChangedModules(\r\n entries: Record,\r\n updates: Record\r\n): {\r\n added: Map\r\n modified: Map\r\n deleted: Set\r\n chunksAdded: Map>\r\n chunksDeleted: Map>\r\n} {\r\n const chunksAdded = new Map()\r\n const chunksDeleted = new Map()\r\n const added: Map = new Map()\r\n const modified = new Map()\r\n const deleted: Set = new Set()\r\n\r\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\r\n [ChunkPath, EcmascriptMergedChunkUpdate]\r\n >) {\r\n switch (mergedChunkUpdate.type) {\r\n case 'added': {\r\n const updateAdded = new Set(mergedChunkUpdate.modules)\r\n for (const moduleId of updateAdded) {\r\n added.set(moduleId, entries[moduleId])\r\n }\r\n chunksAdded.set(chunkPath, updateAdded)\r\n break\r\n }\r\n case 'deleted': {\r\n // We could also use `mergedChunkUpdate.modules` here.\r\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\r\n for (const moduleId of updateDeleted) {\r\n deleted.add(moduleId)\r\n }\r\n chunksDeleted.set(chunkPath, updateDeleted)\r\n break\r\n }\r\n case 'partial': {\r\n const updateAdded = new Set(mergedChunkUpdate.added)\r\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\r\n for (const moduleId of updateAdded) {\r\n added.set(moduleId, entries[moduleId])\r\n }\r\n for (const moduleId of updateDeleted) {\r\n deleted.add(moduleId)\r\n }\r\n chunksAdded.set(chunkPath, updateAdded)\r\n chunksDeleted.set(chunkPath, updateDeleted)\r\n break\r\n }\r\n default:\r\n invariant(\r\n mergedChunkUpdate,\r\n (mergedChunkUpdate) =>\r\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\r\n )\r\n }\r\n }\r\n\r\n // If a module was added from one chunk and deleted from another in the same update,\r\n // consider it to be modified, as it means the module was moved from one chunk to another\r\n // AND has new code in a single update.\r\n for (const moduleId of added.keys()) {\r\n if (deleted.has(moduleId)) {\r\n added.delete(moduleId)\r\n deleted.delete(moduleId)\r\n }\r\n }\r\n\r\n for (const [moduleId, entry] of Object.entries(entries)) {\r\n // Modules that haven't been added to any chunk but have new code are considered\r\n // to be modified.\r\n // This needs to be under the previous loop, as we need it to get rid of modules\r\n // that were added and deleted in the same update.\r\n if (!added.has(moduleId)) {\r\n modified.set(moduleId, entry)\r\n }\r\n }\r\n\r\n return { added, deleted, modified, chunksAdded, chunksDeleted }\r\n}\r\n\r\ntype ModuleEffect =\r\n | {\r\n type: 'unaccepted'\r\n dependencyChain: ModuleId[]\r\n }\r\n | {\r\n type: 'self-declined'\r\n dependencyChain: ModuleId[]\r\n moduleId: ModuleId\r\n }\r\n | {\r\n type: 'accepted'\r\n moduleId: ModuleId\r\n outdatedModules: Set\r\n }\r\n\r\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\r\n const outdatedModules: Set = new Set()\r\n\r\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\r\n\r\n const queue: QueueItem[] = [\r\n {\r\n moduleId,\r\n dependencyChain: [],\r\n },\r\n ]\r\n\r\n let nextItem\r\n while ((nextItem = queue.shift())) {\r\n const { moduleId, dependencyChain } = nextItem\r\n\r\n if (moduleId != null) {\r\n if (outdatedModules.has(moduleId)) {\r\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\r\n continue\r\n }\r\n\r\n outdatedModules.add(moduleId)\r\n }\r\n\r\n // We've arrived at the runtime of the chunk, which means that nothing\r\n // else above can accept this update.\r\n if (moduleId === undefined) {\r\n return {\r\n type: 'unaccepted',\r\n dependencyChain,\r\n }\r\n }\r\n\r\n const module = devModuleCache[moduleId]\r\n const hotState = moduleHotState.get(module)!\r\n\r\n if (\r\n // The module is not in the cache. Since this is a \"modified\" update,\r\n // it means that the module was never instantiated before.\r\n !module || // The module accepted itself without invalidating globalThis.\r\n // TODO is that right?\r\n (hotState.selfAccepted && !hotState.selfInvalidated)\r\n ) {\r\n continue\r\n }\r\n\r\n if (hotState.selfDeclined) {\r\n return {\r\n type: 'self-declined',\r\n dependencyChain,\r\n moduleId,\r\n }\r\n }\r\n\r\n if (runtimeModules.has(moduleId)) {\r\n queue.push({\r\n moduleId: undefined,\r\n dependencyChain: [...dependencyChain, moduleId],\r\n })\r\n continue\r\n }\r\n\r\n for (const parentId of module.parents) {\r\n const parent = devModuleCache[parentId]\r\n\r\n if (!parent) {\r\n // TODO(alexkirsz) Is this even possible?\r\n continue\r\n }\r\n\r\n // TODO(alexkirsz) Dependencies: check accepted and declined\r\n // dependencies here.\r\n\r\n queue.push({\r\n moduleId: parentId,\r\n dependencyChain: [...dependencyChain, moduleId],\r\n })\r\n }\r\n }\r\n\r\n return {\r\n type: 'accepted',\r\n moduleId,\r\n outdatedModules,\r\n }\r\n}\r\n\r\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\r\n switch (update.type) {\r\n case 'partial': {\r\n // This indicates that the update is can be applied to the current state of the application.\r\n applyUpdate(update.instruction)\r\n break\r\n }\r\n case 'restart': {\r\n // This indicates that there is no way to apply the update to the\r\n // current state of the application, and that the application must be\r\n // restarted.\r\n DEV_BACKEND.restart()\r\n break\r\n }\r\n case 'notFound': {\r\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\r\n // or the page itself was deleted.\r\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\r\n // If it is a runtime chunk list, we restart the application.\r\n if (runtimeChunkLists.has(chunkListPath)) {\r\n DEV_BACKEND.restart()\r\n } else {\r\n disposeChunkList(chunkListPath)\r\n }\r\n break\r\n }\r\n default:\r\n throw new Error(`Unknown update type: ${update.type}`)\r\n }\r\n}\r\n\r\nfunction createModuleHot(\r\n moduleId: ModuleId,\r\n hotData: HotData\r\n): { hot: Hot; hotState: HotState } {\r\n const hotState: HotState = {\r\n selfAccepted: false,\r\n selfDeclined: false,\r\n selfInvalidated: false,\r\n disposeHandlers: [],\r\n }\r\n\r\n const hot: Hot = {\r\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\r\n // decide whether to warn whenever an HMR-disposed module required other\r\n // modules. We might want to remove it.\r\n active: true,\r\n\r\n data: hotData ?? {},\r\n\r\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\r\n accept: (\r\n modules?: string | string[] | AcceptErrorHandler,\r\n _callback?: AcceptCallback,\r\n _errorHandler?: AcceptErrorHandler\r\n ) => {\r\n if (modules === undefined) {\r\n hotState.selfAccepted = true\r\n } else if (typeof modules === 'function') {\r\n hotState.selfAccepted = modules\r\n } else {\r\n throw new Error('unsupported `accept` signature')\r\n }\r\n },\r\n\r\n decline: (dep) => {\r\n if (dep === undefined) {\r\n hotState.selfDeclined = true\r\n } else {\r\n throw new Error('unsupported `decline` signature')\r\n }\r\n },\r\n\r\n dispose: (callback) => {\r\n hotState.disposeHandlers.push(callback)\r\n },\r\n\r\n addDisposeHandler: (callback) => {\r\n hotState.disposeHandlers.push(callback)\r\n },\r\n\r\n removeDisposeHandler: (callback) => {\r\n const idx = hotState.disposeHandlers.indexOf(callback)\r\n if (idx >= 0) {\r\n hotState.disposeHandlers.splice(idx, 1)\r\n }\r\n },\r\n\r\n invalidate: () => {\r\n hotState.selfInvalidated = true\r\n queuedInvalidatedModules.add(moduleId)\r\n },\r\n\r\n // NOTE(alexkirsz) This is part of the management API, which we don't\r\n // implement, but the Next.js React Refresh runtime uses this to decide\r\n // whether to schedule an update.\r\n status: () => 'idle',\r\n\r\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\r\n addStatusHandler: (_handler) => {},\r\n removeStatusHandler: (_handler) => {},\r\n\r\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\r\n // want the webpack code paths to ever update (the turbopack paths handle\r\n // this already).\r\n check: () => Promise.resolve(null),\r\n }\r\n\r\n return { hot, hotState }\r\n}\r\n\r\n/**\r\n * Removes a module from a chunk.\r\n * Returns `true` if there are no remaining chunks including this module.\r\n */\r\nfunction removeModuleFromChunk(\r\n moduleId: ModuleId,\r\n chunkPath: ChunkPath\r\n): boolean {\r\n const moduleChunks = moduleChunksMap.get(moduleId)!\r\n moduleChunks.delete(chunkPath)\r\n\r\n const chunkModules = chunkModulesMap.get(chunkPath)!\r\n chunkModules.delete(moduleId)\r\n\r\n const noRemainingModules = chunkModules.size === 0\r\n if (noRemainingModules) {\r\n chunkModulesMap.delete(chunkPath)\r\n }\r\n\r\n const noRemainingChunks = moduleChunks.size === 0\r\n if (noRemainingChunks) {\r\n moduleChunksMap.delete(moduleId)\r\n }\r\n\r\n return noRemainingChunks\r\n}\r\n\r\n/**\r\n * Disposes of a chunk list and its corresponding exclusive chunks.\r\n */\r\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\r\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\r\n if (chunkPaths == null) {\r\n return false\r\n }\r\n chunkListChunksMap.delete(chunkListPath)\r\n\r\n for (const chunkPath of chunkPaths) {\r\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\r\n chunkChunkLists.delete(chunkListPath)\r\n\r\n if (chunkChunkLists.size === 0) {\r\n chunkChunkListsMap.delete(chunkPath)\r\n disposeChunk(chunkPath)\r\n }\r\n }\r\n\r\n // We must also dispose of the chunk list's chunk itself to ensure it may\r\n // be reloaded properly in the future.\r\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\r\n\r\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\r\n\r\n return true\r\n}\r\n\r\n/**\r\n * Disposes of a chunk and its corresponding exclusive modules.\r\n *\r\n * @returns Whether the chunk was disposed of.\r\n */\r\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\r\n const chunkUrl = getChunkRelativeUrl(chunkPath)\r\n // This should happen whether the chunk has any modules in it or not.\r\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\r\n DEV_BACKEND.unloadChunk?.(chunkUrl)\r\n\r\n const chunkModules = chunkModulesMap.get(chunkPath)\r\n if (chunkModules == null) {\r\n return false\r\n }\r\n chunkModules.delete(chunkPath)\r\n\r\n for (const moduleId of chunkModules) {\r\n const moduleChunks = moduleChunksMap.get(moduleId)!\r\n moduleChunks.delete(chunkPath)\r\n\r\n const noRemainingChunks = moduleChunks.size === 0\r\n if (noRemainingChunks) {\r\n moduleChunksMap.delete(moduleId)\r\n disposeModule(moduleId, 'clear')\r\n availableModules.delete(moduleId)\r\n }\r\n }\r\n\r\n return true\r\n}\r\n\r\n/**\r\n * Adds a module to a chunk.\r\n */\r\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\r\n let moduleChunks = moduleChunksMap.get(moduleId)\r\n if (!moduleChunks) {\r\n moduleChunks = new Set([chunkPath])\r\n moduleChunksMap.set(moduleId, moduleChunks)\r\n } else {\r\n moduleChunks.add(chunkPath)\r\n }\r\n\r\n let chunkModules = chunkModulesMap.get(chunkPath)\r\n if (!chunkModules) {\r\n chunkModules = new Set([moduleId])\r\n chunkModulesMap.set(chunkPath, chunkModules)\r\n } else {\r\n chunkModules.add(moduleId)\r\n }\r\n}\r\n\r\n/**\r\n * Marks a chunk list as a runtime chunk list. There can be more than one\r\n * runtime chunk list. For instance, integration tests can have multiple chunk\r\n * groups loaded at runtime, each with its own chunk list.\r\n */\r\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\r\n runtimeChunkLists.add(chunkListPath)\r\n}\r\n\r\nfunction registerChunk(registration: ChunkRegistration) {\r\n const chunkPath = getPathFromScript(registration[0])\r\n let runtimeParams: RuntimeParams | undefined\r\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\r\n if (registration.length === 2) {\r\n runtimeParams = registration[1] as RuntimeParams\r\n } else {\r\n runtimeParams = undefined\r\n installCompressedModuleFactories(\r\n registration as CompressedModuleFactories,\r\n /* offset= */ 1,\r\n moduleFactories,\r\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\r\n )\r\n }\r\n return BACKEND.registerChunk(chunkPath, runtimeParams)\r\n}\r\n\r\n/**\r\n * Subscribes to chunk list updates from the update server and applies them.\r\n */\r\nfunction registerChunkList(chunkList: ChunkList) {\r\n const chunkListScript = chunkList.script\r\n const chunkListPath = getPathFromScript(chunkListScript)\r\n // The \"chunk\" is also registered to finish the loading in the backend\r\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\r\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\r\n chunkListPath,\r\n handleApply.bind(null, chunkListPath),\r\n ])\r\n\r\n // Adding chunks to chunk lists and vice versa.\r\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\r\n chunkListChunksMap.set(chunkListPath, chunkPaths)\r\n for (const chunkPath of chunkPaths) {\r\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\r\n if (!chunkChunkLists) {\r\n chunkChunkLists = new Set([chunkListPath])\r\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\r\n } else {\r\n chunkChunkLists.add(chunkListPath)\r\n }\r\n }\r\n\r\n if (chunkList.source === 'entry') {\r\n markChunkList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cAAc,YAA+B;IACpD,MAAM,YAAY,kBAAkB,YAAY,CAAC,EAAE;IACnD,IAAI;IACJ,8GAA8G;IAC9G,IAAI,aAAa,MAAM,KAAK,GAAG;QAC7B,gBAAgB,YAAY,CAAC,EAAE;IACjC,OAAO;QACL,gBAAgB;QAChB,iCACE,cACA,WAAW,GAAG,GACd,iBACA,CAAC,KAAiB,iBAAiB,IAAI;IAE3C;IACA,OAAO,QAAQ,aAAa,CAAC,WAAW;AAC1C;AAEA;;CAEC,GACD,SAAS,kBAAkB,SAAoB;IAC7C,MAAM,kBAAkB,UAAU,MAAM;IACxC,MAAM,gBAAgB,kBAAkB;IACxC,sEAAsE;IACtE,QAAQ,aAAa,CAAC;IACtB,WAAW,gCAAgC,CAAE,IAAI,CAAC;QAChD;QACA,YAAY,IAAI,CAAC,MAAM;KACxB;IAED,+CAA+C;IAC/C,MAAM,aAAa,IAAI,IAAI,UAAU,MAAM,CAAC,GAAG,CAAC;IAChD,mBAAmB,GAAG,CAAC,eAAe;IACtC,KAAK,MAAM,aAAa,WAAY;QAClC,IAAI,kBAAkB,mBAAmB,GAAG,CAAC;QAC7C,IAAI,CAAC,iBAAiB;YACpB,kBAAkB,IAAI,IAAI;gBAAC;aAAc;YACzC,mBAAmB,GAAG,CAAC,WAAW;QACpC,OAAO;YACL,gBAAgB,GAAG,CAAC;QACtB;IACF;IAEA,IAAI,UAAU,MAAM,KAAK,SAAS;QAChC,uBAAuB;IACzB;AACF;AAEA,WAAW,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, + {"offset": {"line": 1558, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/base-externals-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\n\r\n/// \r\n\r\n/// A 'base' utilities to support runtime can have externals.\r\n/// Currently this is for node.js / edge runtime both.\r\n/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.\r\n\r\nasync function externalImport(id: DependencySpecifier) {\r\n let raw\r\n try {\r\n raw = await import(id)\r\n } catch (err) {\r\n // TODO(alexkirsz) This can happen when a client-side module tries to load\r\n // an external module we don't provide a shim for (e.g. querystring, url).\r\n // For now, we fail semi-silently, but in the future this should be a\r\n // compilation error.\r\n throw new Error(`Failed to load external module ${id}: ${err}`)\r\n }\r\n\r\n if (raw && raw.__esModule && raw.default && 'default' in raw.default) {\r\n return interopEsm(raw.default, createNS(raw), true)\r\n }\r\n\r\n return raw\r\n}\r\ncontextPrototype.y = externalImport\r\n\r\nfunction externalRequire(\r\n id: ModuleId,\r\n thunk: () => any,\r\n esm: boolean = false\r\n): Exports | EsmNamespaceObject {\r\n let raw\r\n try {\r\n raw = thunk()\r\n } catch (err) {\r\n // TODO(alexkirsz) This can happen when a client-side module tries to load\r\n // an external module we don't provide a shim for (e.g. querystring, url).\r\n // For now, we fail semi-silently, but in the future this should be a\r\n // compilation error.\r\n throw new Error(`Failed to load external module ${id}: ${err}`)\r\n }\r\n\r\n if (!esm || raw.__esModule) {\r\n return raw\r\n }\r\n\r\n return interopEsm(raw, createNS(raw), true)\r\n}\r\n\r\nexternalRequire.resolve = (\r\n id: string,\r\n options?: {\r\n paths?: string[]\r\n }\r\n) => {\r\n return require.resolve(id, options)\r\n}\r\ncontextPrototype.x = externalRequire\r\n"],"names":[],"mappings":"AAAA,oDAAoD,GAEpD,mDAAmD;AAEnD,6DAA6D;AAC7D,sDAAsD;AACtD,qGAAqG;AAErG,eAAe,eAAe,EAAuB;IACnD,IAAI;IACJ,IAAI;QACF,MAAM,MAAM,MAAM,CAAC;IACrB,EAAE,OAAO,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAI,MAAM,CAAC,+BAA+B,EAAE,GAAG,EAAE,EAAE,KAAK;IAChE;IAEA,IAAI,OAAO,IAAI,UAAU,IAAI,IAAI,OAAO,IAAI,aAAa,IAAI,OAAO,EAAE;QACpE,OAAO,WAAW,IAAI,OAAO,EAAE,SAAS,MAAM;IAChD;IAEA,OAAO;AACT;AACA,iBAAiB,CAAC,GAAG;AAErB,SAAS,gBACP,EAAY,EACZ,KAAgB,EAChB,MAAe,KAAK;IAEpB,IAAI;IACJ,IAAI;QACF,MAAM;IACR,EAAE,OAAO,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAI,MAAM,CAAC,+BAA+B,EAAE,GAAG,EAAE,EAAE,KAAK;IAChE;IAEA,IAAI,CAAC,OAAO,IAAI,UAAU,EAAE;QAC1B,OAAO;IACT;IAEA,OAAO,WAAW,KAAK,SAAS,MAAM;AACxC;AAEA,gBAAgB,OAAO,GAAG,CACxB,IACA;IAIA,OAAO,QAAQ,OAAO,CAAC,IAAI;AAC7B;AACA,iBAAiB,CAAC,GAAG","ignoreList":[0]}}, + {"offset": {"line": 1599, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/edge/runtime-backend-edge.ts"],"sourcesContent":["/**\r\n * This file contains the runtime code specific to the Turbopack development\r\n * ECMAScript \"None\" runtime (e.g. for Edge).\r\n *\r\n * It will be appended to the base development runtime code.\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\n\r\n/// \r\n/// \r\n/// \r\n\r\ntype ChunkRunner = {\r\n requiredChunks: Set\r\n chunkPath: ChunkPath\r\n runtimeModuleIds: ModuleId[]\r\n}\r\n\r\nlet BACKEND: RuntimeBackend\r\n;(() => {\r\n BACKEND = {\r\n // The \"none\" runtime expects all chunks within the same chunk group to be\r\n // registered before any of them are instantiated.\r\n // Furthermore, modules must be instantiated synchronously, hence we don't\r\n // use promises here.\r\n registerChunk(chunkPath, params) {\r\n registeredChunks.add(chunkPath)\r\n instantiateDependentChunks(chunkPath)\r\n\r\n if (params == null) {\r\n return\r\n }\r\n\r\n if (params.otherChunks.length === 0) {\r\n // The current chunk does not depend on any other chunks, it can be\r\n // instantiated immediately.\r\n instantiateRuntimeModules(params.runtimeModuleIds, chunkPath)\r\n } else {\r\n // The current chunk depends on other chunks, so we need to wait for\r\n // those chunks to be registered before instantiating the runtime\r\n // modules.\r\n registerChunkRunner(\r\n chunkPath,\r\n params.otherChunks.filter((chunk) =>\r\n // The none runtime can only handle JS chunks, so we only wait for these\r\n isJs(getChunkPath(chunk))\r\n ),\r\n params.runtimeModuleIds\r\n )\r\n }\r\n },\r\n\r\n loadChunkCached(_sourceType: SourceType, _chunkUrl: ChunkUrl) {\r\n throw new Error('chunk loading is not supported')\r\n },\r\n\r\n async loadWebAssembly(\r\n _sourceType: SourceType,\r\n _sourceData: SourceData,\r\n chunkPath: ChunkPath,\r\n edgeModule: () => WebAssembly.Module,\r\n imports: WebAssembly.Imports\r\n ): Promise {\r\n const module = await loadEdgeWasm(chunkPath, edgeModule)\r\n\r\n return await WebAssembly.instantiate(module, imports)\r\n },\r\n\r\n async loadWebAssemblyModule(\r\n _sourceType: SourceType,\r\n _sourceData: SourceData,\r\n chunkPath: ChunkPath,\r\n edgeModule: () => WebAssembly.Module\r\n ): Promise {\r\n return loadEdgeWasm(chunkPath, edgeModule)\r\n },\r\n }\r\n\r\n const registeredChunks: Set = new Set()\r\n const runners: Map> = new Map()\r\n\r\n /**\r\n * Registers a chunk runner that will be instantiated once all of the\r\n * dependencies of the chunk have been registered.\r\n */\r\n function registerChunkRunner(\r\n chunkPath: ChunkPath,\r\n otherChunks: ChunkData[],\r\n runtimeModuleIds: ModuleId[]\r\n ) {\r\n const requiredChunks: Set = new Set()\r\n const runner = {\r\n runtimeModuleIds,\r\n chunkPath,\r\n requiredChunks,\r\n }\r\n\r\n for (const otherChunkData of otherChunks) {\r\n const otherChunkPath = getChunkPath(otherChunkData)\r\n if (registeredChunks.has(otherChunkPath)) {\r\n continue\r\n }\r\n\r\n requiredChunks.add(otherChunkPath)\r\n let runnersForChunk = runners.get(otherChunkPath)\r\n if (runnersForChunk == null) {\r\n runnersForChunk = new Set()\r\n runners.set(otherChunkPath, runnersForChunk)\r\n }\r\n runnersForChunk.add(runner)\r\n }\r\n // When all chunks are already registered, we can instantiate the runtime module\r\n if (runner.requiredChunks.size === 0) {\r\n instantiateRuntimeModules(runner.runtimeModuleIds, runner.chunkPath)\r\n }\r\n }\r\n\r\n /**\r\n * Instantiates any chunk runners that were waiting for the given chunk to be\r\n * registered.\r\n */\r\n function instantiateDependentChunks(chunkPath: ChunkPath) {\r\n // Run any chunk runners that were waiting for this chunk to be\r\n // registered.\r\n const runnersForChunk = runners.get(chunkPath)\r\n if (runnersForChunk != null) {\r\n for (const runner of runnersForChunk) {\r\n runner.requiredChunks.delete(chunkPath)\r\n\r\n if (runner.requiredChunks.size === 0) {\r\n instantiateRuntimeModules(runner.runtimeModuleIds, runner.chunkPath)\r\n }\r\n }\r\n runners.delete(chunkPath)\r\n }\r\n }\r\n\r\n /**\r\n * Instantiates the runtime modules for the given chunk.\r\n */\r\n function instantiateRuntimeModules(\r\n runtimeModuleIds: ModuleId[],\r\n chunkPath: ChunkPath\r\n ) {\r\n for (const moduleId of runtimeModuleIds) {\r\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\r\n }\r\n }\r\n\r\n async function loadEdgeWasm(\r\n chunkPath: ChunkPath,\r\n edgeModule: () => WebAssembly.Module\r\n ): Promise {\r\n let module\r\n try {\r\n module = edgeModule()\r\n } catch (_e) {}\r\n\r\n if (!module) {\r\n throw new Error(\r\n `dynamically loading WebAssembly is not supported in this runtime as global was not injected for chunk '${chunkPath}'`\r\n )\r\n }\r\n\r\n return module\r\n }\r\n})()\r\n"],"names":[],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,gDAAgD;AAChD,0DAA0D;AAC1D,qEAAqE;AAQrE,IAAI;AACH,CAAC;IACA,UAAU;QACR,0EAA0E;QAC1E,kDAAkD;QAClD,0EAA0E;QAC1E,qBAAqB;QACrB,eAAc,SAAS,EAAE,MAAM;YAC7B,iBAAiB,GAAG,CAAC;YACrB,2BAA2B;YAE3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AgB,EAAE,OAAO,SAAS;QACrE;IACF;IAEA;;;GAGC,GACD,SAAS,2BAA2B,SAAoB;QACtD,+DAA+D;QAC/D,cAAc;QACd,MAAM,kBAAkB,QAAQ,GAAG,CAAC;QACpC,IAAI,mBAAmB,MAAM;YAC3B,KAAK,MAAM,UAAU,gBAAiB;gBACpC,OAAO,cAAc,CAAC,MAAM,CAAC;gBAE7B,IAAI,OAAO,cAAc,CAAC,IAAI,KAAK,GAAG;oBACpC,0BAA0B,OAAO,gBAAgB,EAAE,OAAO,SAAS;gBACrE;YACF;YACA,QAAQ,MAAM,CAAC;QACjB;IACF;IAEA;;GAEC,GACD,SAAS,0BACP,gBAA4B,EAC5B,SAAoB;QAEpB,KAAK,MAAM,YAAY,iBAAkB;YACvC,8BAA8B,WAAW;QAC3C;IACF;IAEA,eAAe,aACb,SAAoB,EACpB,UAAoC;QAEpC,IAAI;QACJ,IAAI;YACF,SAAS;QACX,EAAE,OAAO,IAAI,CAAC;QAEd,IAAI,CAAC,QAAQ;YACX,MAAM,IAAI,MACR,CAAC,uGAAuG,EAAE,UAAU,CAAC,CAAC;QAE1H;QAEA,OAAO;IACT;AACF,CAAC","ignoreList":[0]}}, + {"offset": {"line": 1708, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/edge/dev-backend-edge.ts"],"sourcesContent":["/**\r\n * This file contains the runtime code specific to the Turbopack development\r\n * ECMAScript \"None\" runtime (e.g. for Edge).\r\n *\r\n * It will be appended to the base development runtime code.\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\n\r\n/// \r\n\r\nlet DEV_BACKEND: DevRuntimeBackend\r\n;(() => {\r\n DEV_BACKEND = {\r\n restart: () => {\r\n throw new Error('restart is not supported')\r\n },\r\n }\r\n})()\r\n\r\nfunction _eval(_: EcmascriptModuleEntry) {\r\n throw new Error('HMR evaluation is not implemented on this backend')\r\n}\r\n"],"names":[],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,kDAAkD;AAElD,IAAI;AACH,CAAC;IACA,cAAc;QACZ,SAAS;YACP,MAAM,IAAI,MAAM;QAClB;IACF;AACF,CAAC;AAED,SAAS,MAAM,CAAwB;IACrC,MAAM,IAAI,MAAM;AAClB","ignoreList":[0]}}] +} \ No newline at end of file diff --git a/apps/web/.next/server/edge/chunks/turbopack-apps_web_edge-wrapper_53e34dd4.js b/apps/web/.next/server/edge/chunks/turbopack-apps_web_edge-wrapper_53e34dd4.js new file mode 100644 index 00000000..cc4ecf52 --- /dev/null +++ b/apps/web/.next/server/edge/chunks/turbopack-apps_web_edge-wrapper_53e34dd4.js @@ -0,0 +1,1735 @@ +(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([ + "chunks/turbopack-apps_web_edge-wrapper_53e34dd4.js", + {"otherChunks":["chunks/_886b33c3._.js","chunks/[root-of-the-server]__8bd37c4c._.js"],"runtimeModuleIds":["[project]/apps/web/edge-wrapper.js { MODULE => \"[project]/node_modules/.bun/next@15.5.3+6dbf9a050bc9aadb/node_modules/next/dist/esm/build/templates/middleware.js { INNER_MIDDLEWARE_MODULE => \\\"[project]/apps/web/src/middleware.ts [middleware-edge] (ecmascript)\\\" } [middleware-edge] (ecmascript)\" } [middleware-edge] (ecmascript)"]} +]); +(() => { +if (!Array.isArray(globalThis.TURBOPACK)) { + return; +} + +const CHUNK_BASE_PATH = ""; +const CHUNK_SUFFIX_PATH = ""; +const RELATIVE_ROOT_PATH = "../../.."; +const RUNTIME_PUBLIC_PATH = ""; +/** + * This file contains runtime types and functions that are shared between all + * TurboPack ECMAScript runtimes. + * + * It will be prepended to the runtime code of each runtime. + */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// +const REEXPORTED_OBJECTS = new WeakMap(); +/** + * Constructs the `__turbopack_context__` object for a module. + */ function Context(module, exports) { + this.m = module; + // We need to store this here instead of accessing it from the module object to: + // 1. Make it available to factories directly, since we rewrite `this` to + // `__turbopack_context__.e` in CJS modules. + // 2. Support async modules which rewrite `module.exports` to a promise, so we + // can still access the original exports object from functions like + // `esmExport` + // Ideally we could find a new approach for async modules and drop this property altogether. + this.e = exports; +} +const contextPrototype = Context.prototype; +const hasOwnProperty = Object.prototype.hasOwnProperty; +const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag; +function defineProp(obj, name, options) { + if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options); +} +function getOverwrittenModule(moduleCache, id) { + let module = moduleCache[id]; + if (!module) { + // This is invoked when a module is merged into another module, thus it wasn't invoked via + // instantiateModule and the cache entry wasn't created yet. + module = createModuleObject(id); + moduleCache[id] = module; + } + return module; +} +/** + * Creates the module object. Only done here to ensure all module objects have the same shape. + */ function createModuleObject(id) { + return { + exports: {}, + error: undefined, + id, + namespaceObject: undefined + }; +} +/** + * Adds the getters to the exports object. + */ function esm(exports, getters) { + defineProp(exports, '__esModule', { + value: true + }); + if (toStringTag) defineProp(exports, toStringTag, { + value: 'Module' + }); + let i = 0; + while(i < getters.length){ + const propName = getters[i++]; + // TODO(luke.sandberg): we could support raw values here, but would need a discriminator beyond 'not a function' + const getter = getters[i++]; + if (typeof getters[i] === 'function') { + // a setter + defineProp(exports, propName, { + get: getter, + set: getters[i++], + enumerable: true + }); + } else { + defineProp(exports, propName, { + get: getter, + enumerable: true + }); + } + } + Object.seal(exports); +} +/** + * Makes the module an ESM with exports + */ function esmExport(getters, id) { + let module; + let exports; + if (id != null) { + module = getOverwrittenModule(this.c, id); + exports = module.exports; + } else { + module = this.m; + exports = this.e; + } + module.namespaceObject = exports; + esm(exports, getters); +} +contextPrototype.s = esmExport; +function ensureDynamicExports(module, exports) { + let reexportedObjects = REEXPORTED_OBJECTS.get(module); + if (!reexportedObjects) { + REEXPORTED_OBJECTS.set(module, reexportedObjects = []); + module.exports = module.namespaceObject = new Proxy(exports, { + get (target, prop) { + if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') { + return Reflect.get(target, prop); + } + for (const obj of reexportedObjects){ + const value = Reflect.get(obj, prop); + if (value !== undefined) return value; + } + return undefined; + }, + ownKeys (target) { + const keys = Reflect.ownKeys(target); + for (const obj of reexportedObjects){ + for (const key of Reflect.ownKeys(obj)){ + if (key !== 'default' && !keys.includes(key)) keys.push(key); + } + } + return keys; + } + }); + } + return reexportedObjects; +} +/** + * Dynamically exports properties from an object + */ function dynamicExport(object, id) { + let module; + let exports; + if (id != null) { + module = getOverwrittenModule(this.c, id); + exports = module.exports; + } else { + module = this.m; + exports = this.e; + } + const reexportedObjects = ensureDynamicExports(module, exports); + if (typeof object === 'object' && object !== null) { + reexportedObjects.push(object); + } +} +contextPrototype.j = dynamicExport; +function exportValue(value, id) { + let module; + if (id != null) { + module = getOverwrittenModule(this.c, id); + } else { + module = this.m; + } + module.exports = value; +} +contextPrototype.v = exportValue; +function exportNamespace(namespace, id) { + let module; + if (id != null) { + module = getOverwrittenModule(this.c, id); + } else { + module = this.m; + } + module.exports = module.namespaceObject = namespace; +} +contextPrototype.n = exportNamespace; +function createGetter(obj, key) { + return ()=>obj[key]; +} +/** + * @returns prototype of the object + */ const getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__; +/** Prototypes that are not expanded for exports */ const LEAF_PROTOTYPES = [ + null, + getProto({}), + getProto([]), + getProto(getProto) +]; +/** + * @param raw + * @param ns + * @param allowExportDefault + * * `false`: will have the raw module as default export + * * `true`: will have the default property as default export + */ function interopEsm(raw, ns, allowExportDefault) { + const getters = []; + // The index of the `default` export if any + let defaultLocation = -1; + for(let current = raw; (typeof current === 'object' || typeof current === 'function') && !LEAF_PROTOTYPES.includes(current); current = getProto(current)){ + for (const key of Object.getOwnPropertyNames(current)){ + getters.push(key, createGetter(raw, key)); + if (defaultLocation === -1 && key === 'default') { + defaultLocation = getters.length - 1; + } + } + } + // this is not really correct + // we should set the `default` getter if the imported module is a `.cjs file` + if (!(allowExportDefault && defaultLocation >= 0)) { + // Replace the binding with one for the namespace itself in order to preserve iteration order. + if (defaultLocation >= 0) { + getters[defaultLocation] = ()=>raw; + } else { + getters.push('default', ()=>raw); + } + } + esm(ns, getters); + return ns; +} +function createNS(raw) { + if (typeof raw === 'function') { + return function(...args) { + return raw.apply(this, args); + }; + } else { + return Object.create(null); + } +} +function esmImport(id) { + const module = getOrInstantiateModuleFromParent(id, this.m); + // any ES module has to have `module.namespaceObject` defined. + if (module.namespaceObject) return module.namespaceObject; + // only ESM can be an async module, so we don't need to worry about exports being a promise here. + const raw = module.exports; + return module.namespaceObject = interopEsm(raw, createNS(raw), raw && raw.__esModule); +} +contextPrototype.i = esmImport; +function asyncLoader(moduleId) { + const loader = this.r(moduleId); + return loader(this.i.bind(this)); +} +contextPrototype.A = asyncLoader; +// Add a simple runtime require so that environments without one can still pass +// `typeof require` CommonJS checks so that exports are correctly registered. +const runtimeRequire = // @ts-ignore +typeof require === 'function' ? require : function require1() { + throw new Error('Unexpected use of runtime require'); +}; +contextPrototype.t = runtimeRequire; +function commonJsRequire(id) { + return getOrInstantiateModuleFromParent(id, this.m).exports; +} +contextPrototype.r = commonJsRequire; +/** + * `require.context` and require/import expression runtime. + */ function moduleContext(map) { + function moduleContext(id) { + if (hasOwnProperty.call(map, id)) { + return map[id].module(); + } + const e = new Error(`Cannot find module '${id}'`); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + moduleContext.keys = ()=>{ + return Object.keys(map); + }; + moduleContext.resolve = (id)=>{ + if (hasOwnProperty.call(map, id)) { + return map[id].id(); + } + const e = new Error(`Cannot find module '${id}'`); + e.code = 'MODULE_NOT_FOUND'; + throw e; + }; + moduleContext.import = async (id)=>{ + return await moduleContext(id); + }; + return moduleContext; +} +contextPrototype.f = moduleContext; +/** + * Returns the path of a chunk defined by its data. + */ function getChunkPath(chunkData) { + return typeof chunkData === 'string' ? chunkData : chunkData.path; +} +function isPromise(maybePromise) { + return maybePromise != null && typeof maybePromise === 'object' && 'then' in maybePromise && typeof maybePromise.then === 'function'; +} +function isAsyncModuleExt(obj) { + return turbopackQueues in obj; +} +function createPromise() { + let resolve; + let reject; + const promise = new Promise((res, rej)=>{ + reject = rej; + resolve = res; + }); + return { + promise, + resolve: resolve, + reject: reject + }; +} +// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map. +// The CompressedModuleFactories format is +// - 1 or more module ids +// - a module factory function +// So walking this is a little complex but the flat structure is also fast to +// traverse, we can use `typeof` operators to distinguish the two cases. +function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) { + let i = offset; + while(i < chunkModules.length){ + let moduleId = chunkModules[i]; + let end = i + 1; + // Find our factory function + while(end < chunkModules.length && typeof chunkModules[end] !== 'function'){ + end++; + } + if (end === chunkModules.length) { + throw new Error('malformed chunk format, expected a factory function'); + } + // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already + // present we know all the additional ids are also present, so we don't need to check. + if (!moduleFactories.has(moduleId)) { + const moduleFactoryFn = chunkModules[end]; + applyModuleFactoryName(moduleFactoryFn); + newModuleId?.(moduleId); + for(; i < end; i++){ + moduleId = chunkModules[i]; + moduleFactories.set(moduleId, moduleFactoryFn); + } + } + i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array. + } +} +// everything below is adapted from webpack +// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13 +const turbopackQueues = Symbol('turbopack queues'); +const turbopackExports = Symbol('turbopack exports'); +const turbopackError = Symbol('turbopack error'); +function resolveQueue(queue) { + if (queue && queue.status !== 1) { + queue.status = 1; + queue.forEach((fn)=>fn.queueCount--); + queue.forEach((fn)=>fn.queueCount-- ? fn.queueCount++ : fn()); + } +} +function wrapDeps(deps) { + return deps.map((dep)=>{ + if (dep !== null && typeof dep === 'object') { + if (isAsyncModuleExt(dep)) return dep; + if (isPromise(dep)) { + const queue = Object.assign([], { + status: 0 + }); + const obj = { + [turbopackExports]: {}, + [turbopackQueues]: (fn)=>fn(queue) + }; + dep.then((res)=>{ + obj[turbopackExports] = res; + resolveQueue(queue); + }, (err)=>{ + obj[turbopackError] = err; + resolveQueue(queue); + }); + return obj; + } + } + return { + [turbopackExports]: dep, + [turbopackQueues]: ()=>{} + }; + }); +} +function asyncModule(body, hasAwait) { + const module = this.m; + const queue = hasAwait ? Object.assign([], { + status: -1 + }) : undefined; + const depQueues = new Set(); + const { resolve, reject, promise: rawPromise } = createPromise(); + const promise = Object.assign(rawPromise, { + [turbopackExports]: module.exports, + [turbopackQueues]: (fn)=>{ + queue && fn(queue); + depQueues.forEach(fn); + promise['catch'](()=>{}); + } + }); + const attributes = { + get () { + return promise; + }, + set (v) { + // Calling `esmExport` leads to this. + if (v !== promise) { + promise[turbopackExports] = v; + } + } + }; + Object.defineProperty(module, 'exports', attributes); + Object.defineProperty(module, 'namespaceObject', attributes); + function handleAsyncDependencies(deps) { + const currentDeps = wrapDeps(deps); + const getResult = ()=>currentDeps.map((d)=>{ + if (d[turbopackError]) throw d[turbopackError]; + return d[turbopackExports]; + }); + const { promise, resolve } = createPromise(); + const fn = Object.assign(()=>resolve(getResult), { + queueCount: 0 + }); + function fnQueue(q) { + if (q !== queue && !depQueues.has(q)) { + depQueues.add(q); + if (q && q.status === 0) { + fn.queueCount++; + q.push(fn); + } + } + } + currentDeps.map((dep)=>dep[turbopackQueues](fnQueue)); + return fn.queueCount ? promise : getResult(); + } + function asyncResult(err) { + if (err) { + reject(promise[turbopackError] = err); + } else { + resolve(promise[turbopackExports]); + } + resolveQueue(queue); + } + body(handleAsyncDependencies, asyncResult); + if (queue && queue.status === -1) { + queue.status = 0; + } +} +contextPrototype.a = asyncModule; +/** + * A pseudo "fake" URL object to resolve to its relative path. + * + * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this + * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid + * hydration mismatch. + * + * This is based on webpack's existing implementation: + * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js + */ const relativeURL = function relativeURL(inputUrl) { + const realUrl = new URL(inputUrl, 'x:/'); + const values = {}; + for(const key in realUrl)values[key] = realUrl[key]; + values.href = inputUrl; + values.pathname = inputUrl.replace(/[?#].*/, ''); + values.origin = values.protocol = ''; + values.toString = values.toJSON = (..._args)=>inputUrl; + for(const key in values)Object.defineProperty(this, key, { + enumerable: true, + configurable: true, + value: values[key] + }); +}; +relativeURL.prototype = URL.prototype; +contextPrototype.U = relativeURL; +/** + * Utility function to ensure all variants of an enum are handled. + */ function invariant(never, computeMessage) { + throw new Error(`Invariant: ${computeMessage(never)}`); +} +/** + * A stub function to make `require` available but non-functional in ESM. + */ function requireStub(_moduleId) { + throw new Error('dynamic usage of require is not supported'); +} +contextPrototype.z = requireStub; +// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable. +contextPrototype.g = globalThis; +function applyModuleFactoryName(factory) { + // Give the module factory a nice name to improve stack traces. + Object.defineProperty(factory, 'name', { + value: '__TURBOPACK__module__evaluation__' + }); +} +/** + * This file contains runtime types and functions that are shared between all + * Turbopack *development* ECMAScript runtimes. + * + * It will be appended to the runtime code of each runtime right after the + * shared runtime utils. + */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// +/// +// Used in WebWorkers to tell the runtime about the chunk base path +const browserContextPrototype = Context.prototype; +var SourceType = /*#__PURE__*/ function(SourceType) { + /** + * The module was instantiated because it was included in an evaluated chunk's + * runtime. + * SourceData is a ChunkPath. + */ SourceType[SourceType["Runtime"] = 0] = "Runtime"; + /** + * The module was instantiated because a parent module imported it. + * SourceData is a ModuleId. + */ SourceType[SourceType["Parent"] = 1] = "Parent"; + /** + * The module was instantiated because it was included in a chunk's hot module + * update. + * SourceData is an array of ModuleIds or undefined. + */ SourceType[SourceType["Update"] = 2] = "Update"; + return SourceType; +}(SourceType || {}); +const moduleFactories = new Map(); +contextPrototype.M = moduleFactories; +const availableModules = new Map(); +const availableModuleChunks = new Map(); +function factoryNotAvailable(moduleId, sourceType, sourceData) { + let instantiationReason; + switch(sourceType){ + case 0: + instantiationReason = `as a runtime entry of chunk ${sourceData}`; + break; + case 1: + instantiationReason = `because it was required from module ${sourceData}`; + break; + case 2: + instantiationReason = 'because of an HMR update'; + break; + default: + invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`); + } + throw new Error(`Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available. It might have been deleted in an HMR update.`); +} +function loadChunk(chunkData) { + return loadChunkInternal(1, this.m.id, chunkData); +} +browserContextPrototype.l = loadChunk; +function loadInitialChunk(chunkPath, chunkData) { + return loadChunkInternal(0, chunkPath, chunkData); +} +async function loadChunkInternal(sourceType, sourceData, chunkData) { + if (typeof chunkData === 'string') { + return loadChunkPath(sourceType, sourceData, chunkData); + } + const includedList = chunkData.included || []; + const modulesPromises = includedList.map((included)=>{ + if (moduleFactories.has(included)) return true; + return availableModules.get(included); + }); + if (modulesPromises.length > 0 && modulesPromises.every((p)=>p)) { + // When all included items are already loaded or loading, we can skip loading ourselves + await Promise.all(modulesPromises); + return; + } + const includedModuleChunksList = chunkData.moduleChunks || []; + const moduleChunksPromises = includedModuleChunksList.map((included)=>{ + // TODO(alexkirsz) Do we need this check? + // if (moduleFactories[included]) return true; + return availableModuleChunks.get(included); + }).filter((p)=>p); + let promise; + if (moduleChunksPromises.length > 0) { + // Some module chunks are already loaded or loading. + if (moduleChunksPromises.length === includedModuleChunksList.length) { + // When all included module chunks are already loaded or loading, we can skip loading ourselves + await Promise.all(moduleChunksPromises); + return; + } + const moduleChunksToLoad = new Set(); + for (const moduleChunk of includedModuleChunksList){ + if (!availableModuleChunks.has(moduleChunk)) { + moduleChunksToLoad.add(moduleChunk); + } + } + for (const moduleChunkToLoad of moduleChunksToLoad){ + const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad); + availableModuleChunks.set(moduleChunkToLoad, promise); + moduleChunksPromises.push(promise); + } + promise = Promise.all(moduleChunksPromises); + } else { + promise = loadChunkPath(sourceType, sourceData, chunkData.path); + // Mark all included module chunks as loading if they are not already loaded or loading. + for (const includedModuleChunk of includedModuleChunksList){ + if (!availableModuleChunks.has(includedModuleChunk)) { + availableModuleChunks.set(includedModuleChunk, promise); + } + } + } + for (const included of includedList){ + if (!availableModules.has(included)) { + // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier. + // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway. + availableModules.set(included, promise); + } + } + await promise; +} +const loadedChunk = Promise.resolve(undefined); +const instrumentedBackendLoadChunks = new WeakMap(); +// Do not make this async. React relies on referential equality of the returned Promise. +function loadChunkByUrl(chunkUrl) { + return loadChunkByUrlInternal(1, this.m.id, chunkUrl); +} +browserContextPrototype.L = loadChunkByUrl; +// Do not make this async. React relies on referential equality of the returned Promise. +function loadChunkByUrlInternal(sourceType, sourceData, chunkUrl) { + const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl); + let entry = instrumentedBackendLoadChunks.get(thenable); + if (entry === undefined) { + const resolve = instrumentedBackendLoadChunks.set.bind(instrumentedBackendLoadChunks, thenable, loadedChunk); + entry = thenable.then(resolve).catch((error)=>{ + let loadReason; + switch(sourceType){ + case 0: + loadReason = `as a runtime dependency of chunk ${sourceData}`; + break; + case 1: + loadReason = `from module ${sourceData}`; + break; + case 2: + loadReason = 'from an HMR update'; + break; + default: + invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`); + } + throw new Error(`Failed to load chunk ${chunkUrl} ${loadReason}${error ? `: ${error}` : ''}`, error ? { + cause: error + } : undefined); + }); + instrumentedBackendLoadChunks.set(thenable, entry); + } + return entry; +} +// Do not make this async. React relies on referential equality of the returned Promise. +function loadChunkPath(sourceType, sourceData, chunkPath) { + const url = getChunkRelativeUrl(chunkPath); + return loadChunkByUrlInternal(sourceType, sourceData, url); +} +/** + * Returns an absolute url to an asset. + */ function resolvePathFromModule(moduleId) { + const exported = this.r(moduleId); + return exported?.default ?? exported; +} +browserContextPrototype.R = resolvePathFromModule; +/** + * no-op for browser + * @param modulePath + */ function resolveAbsolutePath(modulePath) { + return `/ROOT/${modulePath ?? ''}`; +} +browserContextPrototype.P = resolveAbsolutePath; +/** + * Returns a blob URL for the worker. + * @param chunks list of chunks to load + */ function getWorkerBlobURL(chunks) { + // It is important to reverse the array so when bootstrapping we can infer what chunk is being + // evaluated by poping urls off of this array. See `getPathFromScript` + let bootstrap = `self.TURBOPACK_WORKER_LOCATION = ${JSON.stringify(location.origin)}; +self.TURBOPACK_NEXT_CHUNK_URLS = ${JSON.stringify(chunks.reverse().map(getChunkRelativeUrl), null, 2)}; +importScripts(...self.TURBOPACK_NEXT_CHUNK_URLS.map(c => self.TURBOPACK_WORKER_LOCATION + c).reverse());`; + let blob = new Blob([ + bootstrap + ], { + type: 'text/javascript' + }); + return URL.createObjectURL(blob); +} +browserContextPrototype.b = getWorkerBlobURL; +/** + * Instantiates a runtime module. + */ function instantiateRuntimeModule(moduleId, chunkPath) { + return instantiateModule(moduleId, 0, chunkPath); +} +/** + * Returns the URL relative to the origin where a chunk can be fetched from. + */ function getChunkRelativeUrl(chunkPath) { + return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${CHUNK_SUFFIX_PATH}`; +} +function getPathFromScript(chunkScript) { + if (typeof chunkScript === 'string') { + return chunkScript; + } + const chunkUrl = typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined' ? TURBOPACK_NEXT_CHUNK_URLS.pop() : chunkScript.getAttribute('src'); + const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, '')); + const path = src.startsWith(CHUNK_BASE_PATH) ? src.slice(CHUNK_BASE_PATH.length) : src; + return path; +} +const regexJsUrl = /\.js(?:\?[^#]*)?(?:#.*)?$/; +/** + * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment. + */ function isJs(chunkUrlOrPath) { + return regexJsUrl.test(chunkUrlOrPath); +} +const regexCssUrl = /\.css(?:\?[^#]*)?(?:#.*)?$/; +/** + * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment. + */ function isCss(chunkUrl) { + return regexCssUrl.test(chunkUrl); +} +function loadWebAssembly(chunkPath, edgeModule, importsObj) { + return BACKEND.loadWebAssembly(1, this.m.id, chunkPath, edgeModule, importsObj); +} +contextPrototype.w = loadWebAssembly; +function loadWebAssemblyModule(chunkPath, edgeModule) { + return BACKEND.loadWebAssemblyModule(1, this.m.id, chunkPath, edgeModule); +} +contextPrototype.u = loadWebAssemblyModule; +/// +/// +/// +const devContextPrototype = Context.prototype; +/** + * This file contains runtime types and functions that are shared between all + * Turbopack *development* ECMAScript runtimes. + * + * It will be appended to the runtime code of each runtime right after the + * shared runtime utils. + */ /* eslint-disable @typescript-eslint/no-unused-vars */ const devModuleCache = Object.create(null); +devContextPrototype.c = devModuleCache; +class UpdateApplyError extends Error { + name = 'UpdateApplyError'; + dependencyChain; + constructor(message, dependencyChain){ + super(message); + this.dependencyChain = dependencyChain; + } +} +/** + * Module IDs that are instantiated as part of the runtime of a chunk. + */ const runtimeModules = new Set(); +/** + * Map from module ID to the chunks that contain this module. + * + * In HMR, we need to keep track of which modules are contained in which so + * chunks. This is so we don't eagerly dispose of a module when it is removed + * from chunk A, but still exists in chunk B. + */ const moduleChunksMap = new Map(); +/** + * Map from a chunk path to all modules it contains. + */ const chunkModulesMap = new Map(); +/** + * Chunk lists that contain a runtime. When these chunk lists receive an update + * that can't be reconciled with the current state of the page, we need to + * reload the runtime entirely. + */ const runtimeChunkLists = new Set(); +/** + * Map from a chunk list to the chunk paths it contains. + */ const chunkListChunksMap = new Map(); +/** + * Map from a chunk path to the chunk lists it belongs to. + */ const chunkChunkListsMap = new Map(); +/** + * Maps module IDs to persisted data between executions of their hot module + * implementation (`hot.data`). + */ const moduleHotData = new Map(); +/** + * Maps module instances to their hot module state. + */ const moduleHotState = new Map(); +/** + * Modules that call `module.hot.invalidate()` (while being updated). + */ const queuedInvalidatedModules = new Set(); +/** + * Gets or instantiates a runtime module. + */ // @ts-ignore +function getOrInstantiateRuntimeModule(chunkPath, moduleId) { + const module = devModuleCache[moduleId]; + if (module) { + if (module.error) { + throw module.error; + } + return module; + } + // @ts-ignore + return instantiateModule(moduleId, SourceType.Runtime, chunkPath); +} +/** + * Retrieves a module from the cache, or instantiate it if it is not cached. + */ // @ts-ignore Defined in `runtime-utils.ts` +const getOrInstantiateModuleFromParent = (id, sourceModule)=>{ + if (!sourceModule.hot.active) { + console.warn(`Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`); + } + const module = devModuleCache[id]; + if (sourceModule.children.indexOf(id) === -1) { + sourceModule.children.push(id); + } + if (module) { + if (module.error) { + throw module.error; + } + if (module.parents.indexOf(sourceModule.id) === -1) { + module.parents.push(sourceModule.id); + } + return module; + } + return instantiateModule(id, SourceType.Parent, sourceModule.id); +}; +function DevContext(module, exports, refresh) { + Context.call(this, module, exports); + this.k = refresh; +} +DevContext.prototype = Context.prototype; +function instantiateModule(moduleId, sourceType, sourceData) { + // We are in development, this is always a string. + let id = moduleId; + const moduleFactory = moduleFactories.get(id); + if (typeof moduleFactory !== 'function') { + // This can happen if modules incorrectly handle HMR disposes/updates, + // e.g. when they keep a `setTimeout` around which still executes old code + // and contains e.g. a `require("something")` call. + factoryNotAvailable(id, sourceType, sourceData); + } + const hotData = moduleHotData.get(id); + const { hot, hotState } = createModuleHot(id, hotData); + let parents; + switch(sourceType){ + case SourceType.Runtime: + runtimeModules.add(id); + parents = []; + break; + case SourceType.Parent: + // No need to add this module as a child of the parent module here, this + // has already been taken care of in `getOrInstantiateModuleFromParent`. + parents = [ + sourceData + ]; + break; + case SourceType.Update: + parents = sourceData || []; + break; + default: + invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`); + } + const module = createModuleObject(id); + const exports = module.exports; + module.parents = parents; + module.children = []; + module.hot = hot; + devModuleCache[id] = module; + moduleHotState.set(module, hotState); + // NOTE(alexkirsz) This can fail when the module encounters a runtime error. + try { + runModuleExecutionHooks(module, (refresh)=>{ + const context = new DevContext(module, exports, refresh); + moduleFactory(context, module, exports); + }); + } catch (error) { + module.error = error; + throw error; + } + if (module.namespaceObject && module.exports !== module.namespaceObject) { + // in case of a circular dependency: cjs1 -> esm2 -> cjs1 + interopEsm(module.exports, module.namespaceObject); + } + return module; +} +const DUMMY_REFRESH_CONTEXT = { + register: (_type, _id)=>{}, + signature: ()=>(_type)=>{}, + registerExports: (_module, _helpers)=>{} +}; +/** + * NOTE(alexkirsz) Webpack has a "module execution" interception hook that + * Next.js' React Refresh runtime hooks into to add module context to the + * refresh registry. + */ function runModuleExecutionHooks(module, executeModule) { + if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') { + const cleanupReactRefreshIntercept = globalThis.$RefreshInterceptModuleExecution$(module.id); + try { + executeModule({ + register: globalThis.$RefreshReg$, + signature: globalThis.$RefreshSig$, + registerExports: registerExportsAndSetupBoundaryForReactRefresh + }); + } finally{ + // Always cleanup the intercept, even if module execution failed. + cleanupReactRefreshIntercept(); + } + } else { + // If the react refresh hooks are not installed we need to bind dummy functions. + // This is expected when running in a Web Worker. It is also common in some of + // our test environments. + executeModule(DUMMY_REFRESH_CONTEXT); + } +} +/** + * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts + */ function registerExportsAndSetupBoundaryForReactRefresh(module, helpers) { + const currentExports = module.exports; + const prevExports = module.hot.data.prevExports ?? null; + helpers.registerExportsForReactRefresh(currentExports, module.id); + // A module can be accepted automatically based on its exports, e.g. when + // it is a Refresh Boundary. + if (helpers.isReactRefreshBoundary(currentExports)) { + // Save the previous exports on update, so we can compare the boundary + // signatures. + module.hot.dispose((data)=>{ + data.prevExports = currentExports; + }); + // Unconditionally accept an update to this module, we'll check if it's + // still a Refresh Boundary later. + module.hot.accept(); + // This field is set when the previous version of this module was a + // Refresh Boundary, letting us know we need to check for invalidation or + // enqueue an update. + if (prevExports !== null) { + // A boundary can become ineligible if its exports are incompatible + // with the previous exports. + // + // For example, if you add/remove/change exports, we'll want to + // re-execute the importing modules, and force those components to + // re-render. Similarly, if you convert a class component to a + // function, we want to invalidate the boundary. + if (helpers.shouldInvalidateReactRefreshBoundary(helpers.getRefreshBoundarySignature(prevExports), helpers.getRefreshBoundarySignature(currentExports))) { + module.hot.invalidate(); + } else { + helpers.scheduleUpdate(); + } + } + } else { + // Since we just executed the code for the module, it's possible that the + // new exports made it ineligible for being a boundary. + // We only care about the case when we were _previously_ a boundary, + // because we already accepted this update (accidental side effect). + const isNoLongerABoundary = prevExports !== null; + if (isNoLongerABoundary) { + module.hot.invalidate(); + } + } +} +function formatDependencyChain(dependencyChain) { + return `Dependency chain: ${dependencyChain.join(' -> ')}`; +} +function computeOutdatedModules(added, modified) { + const newModuleFactories = new Map(); + for (const [moduleId, entry] of added){ + if (entry != null) { + newModuleFactories.set(moduleId, _eval(entry)); + } + } + const outdatedModules = computedInvalidatedModules(modified.keys()); + for (const [moduleId, entry] of modified){ + newModuleFactories.set(moduleId, _eval(entry)); + } + return { + outdatedModules, + newModuleFactories + }; +} +function computedInvalidatedModules(invalidated) { + const outdatedModules = new Set(); + for (const moduleId of invalidated){ + const effect = getAffectedModuleEffects(moduleId); + switch(effect.type){ + case 'unaccepted': + throw new UpdateApplyError(`cannot apply update: unaccepted module. ${formatDependencyChain(effect.dependencyChain)}.`, effect.dependencyChain); + case 'self-declined': + throw new UpdateApplyError(`cannot apply update: self-declined module. ${formatDependencyChain(effect.dependencyChain)}.`, effect.dependencyChain); + case 'accepted': + for (const outdatedModuleId of effect.outdatedModules){ + outdatedModules.add(outdatedModuleId); + } + break; + // TODO(alexkirsz) Dependencies: handle dependencies effects. + default: + invariant(effect, (effect)=>`Unknown effect type: ${effect?.type}`); + } + } + return outdatedModules; +} +function computeOutdatedSelfAcceptedModules(outdatedModules) { + const outdatedSelfAcceptedModules = []; + for (const moduleId of outdatedModules){ + const module = devModuleCache[moduleId]; + const hotState = moduleHotState.get(module); + if (module && hotState.selfAccepted && !hotState.selfInvalidated) { + outdatedSelfAcceptedModules.push({ + moduleId, + errorHandler: hotState.selfAccepted + }); + } + } + return outdatedSelfAcceptedModules; +} +/** + * Adds, deletes, and moves modules between chunks. This must happen before the + * dispose phase as it needs to know which modules were removed from all chunks, + * which we can only compute *after* taking care of added and moved modules. + */ function updateChunksPhase(chunksAddedModules, chunksDeletedModules) { + for (const [chunkPath, addedModuleIds] of chunksAddedModules){ + for (const moduleId of addedModuleIds){ + addModuleToChunk(moduleId, chunkPath); + } + } + const disposedModules = new Set(); + for (const [chunkPath, addedModuleIds] of chunksDeletedModules){ + for (const moduleId of addedModuleIds){ + if (removeModuleFromChunk(moduleId, chunkPath)) { + disposedModules.add(moduleId); + } + } + } + return { + disposedModules + }; +} +function disposePhase(outdatedModules, disposedModules) { + for (const moduleId of outdatedModules){ + disposeModule(moduleId, 'replace'); + } + for (const moduleId of disposedModules){ + disposeModule(moduleId, 'clear'); + } + // Removing modules from the module cache is a separate step. + // We also want to keep track of previous parents of the outdated modules. + const outdatedModuleParents = new Map(); + for (const moduleId of outdatedModules){ + const oldModule = devModuleCache[moduleId]; + outdatedModuleParents.set(moduleId, oldModule?.parents); + delete devModuleCache[moduleId]; + } + // TODO(alexkirsz) Dependencies: remove outdated dependency from module + // children. + return { + outdatedModuleParents + }; +} +/** + * Disposes of an instance of a module. + * + * Returns the persistent hot data that should be kept for the next module + * instance. + * + * NOTE: mode = "replace" will not remove modules from the devModuleCache + * This must be done in a separate step afterwards. + * This is important because all modules need to be disposed to update the + * parent/child relationships before they are actually removed from the devModuleCache. + * If this was done in this method, the following disposeModule calls won't find + * the module from the module id in the cache. + */ function disposeModule(moduleId, mode) { + const module = devModuleCache[moduleId]; + if (!module) { + return; + } + const hotState = moduleHotState.get(module); + const data = {}; + // Run the `hot.dispose` handler, if any, passing in the persistent + // `hot.data` object. + for (const disposeHandler of hotState.disposeHandlers){ + disposeHandler(data); + } + // This used to warn in `getOrInstantiateModuleFromParent` when a disposed + // module is still importing other modules. + module.hot.active = false; + moduleHotState.delete(module); + // TODO(alexkirsz) Dependencies: delete the module from outdated deps. + // Remove the disposed module from its children's parent list. + // It will be added back once the module re-instantiates and imports its + // children again. + for (const childId of module.children){ + const child = devModuleCache[childId]; + if (!child) { + continue; + } + const idx = child.parents.indexOf(module.id); + if (idx >= 0) { + child.parents.splice(idx, 1); + } + } + switch(mode){ + case 'clear': + delete devModuleCache[module.id]; + moduleHotData.delete(module.id); + break; + case 'replace': + moduleHotData.set(module.id, data); + break; + default: + invariant(mode, (mode)=>`invalid mode: ${mode}`); + } +} +function applyPhase(outdatedSelfAcceptedModules, newModuleFactories, outdatedModuleParents, reportError) { + // Update module factories. + for (const [moduleId, factory] of newModuleFactories.entries()){ + applyModuleFactoryName(factory); + moduleFactories.set(moduleId, factory); + } + // TODO(alexkirsz) Run new runtime entries here. + // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps. + // Re-instantiate all outdated self-accepted modules. + for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules){ + try { + instantiateModule(moduleId, SourceType.Update, outdatedModuleParents.get(moduleId)); + } catch (err) { + if (typeof errorHandler === 'function') { + try { + errorHandler(err, { + moduleId, + module: devModuleCache[moduleId] + }); + } catch (err2) { + reportError(err2); + reportError(err); + } + } else { + reportError(err); + } + } + } +} +function applyUpdate(update) { + switch(update.type){ + case 'ChunkListUpdate': + applyChunkListUpdate(update); + break; + default: + invariant(update, (update)=>`Unknown update type: ${update.type}`); + } +} +function applyChunkListUpdate(update) { + if (update.merged != null) { + for (const merged of update.merged){ + switch(merged.type){ + case 'EcmascriptMergedUpdate': + applyEcmascriptMergedUpdate(merged); + break; + default: + invariant(merged, (merged)=>`Unknown merged type: ${merged.type}`); + } + } + } + if (update.chunks != null) { + for (const [chunkPath, chunkUpdate] of Object.entries(update.chunks)){ + const chunkUrl = getChunkRelativeUrl(chunkPath); + switch(chunkUpdate.type){ + case 'added': + BACKEND.loadChunkCached(SourceType.Update, chunkUrl); + break; + case 'total': + DEV_BACKEND.reloadChunk?.(chunkUrl); + break; + case 'deleted': + DEV_BACKEND.unloadChunk?.(chunkUrl); + break; + case 'partial': + invariant(chunkUpdate.instruction, (instruction)=>`Unknown partial instruction: ${JSON.stringify(instruction)}.`); + break; + default: + invariant(chunkUpdate, (chunkUpdate)=>`Unknown chunk update type: ${chunkUpdate.type}`); + } + } + } +} +function applyEcmascriptMergedUpdate(update) { + const { entries = {}, chunks = {} } = update; + const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(entries, chunks); + const { outdatedModules, newModuleFactories } = computeOutdatedModules(added, modified); + const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted); + applyInternal(outdatedModules, disposedModules, newModuleFactories); +} +function applyInvalidatedModules(outdatedModules) { + if (queuedInvalidatedModules.size > 0) { + computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId)=>{ + outdatedModules.add(moduleId); + }); + queuedInvalidatedModules.clear(); + } + return outdatedModules; +} +function applyInternal(outdatedModules, disposedModules, newModuleFactories) { + outdatedModules = applyInvalidatedModules(outdatedModules); + const outdatedSelfAcceptedModules = computeOutdatedSelfAcceptedModules(outdatedModules); + const { outdatedModuleParents } = disposePhase(outdatedModules, disposedModules); + // we want to continue on error and only throw the error after we tried applying all updates + let error; + function reportError(err) { + if (!error) error = err; + } + applyPhase(outdatedSelfAcceptedModules, newModuleFactories, outdatedModuleParents, reportError); + if (error) { + throw error; + } + if (queuedInvalidatedModules.size > 0) { + applyInternal(new Set(), [], new Map()); + } +} +function computeChangedModules(entries, updates) { + const chunksAdded = new Map(); + const chunksDeleted = new Map(); + const added = new Map(); + const modified = new Map(); + const deleted = new Set(); + for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates)){ + switch(mergedChunkUpdate.type){ + case 'added': + { + const updateAdded = new Set(mergedChunkUpdate.modules); + for (const moduleId of updateAdded){ + added.set(moduleId, entries[moduleId]); + } + chunksAdded.set(chunkPath, updateAdded); + break; + } + case 'deleted': + { + // We could also use `mergedChunkUpdate.modules` here. + const updateDeleted = new Set(chunkModulesMap.get(chunkPath)); + for (const moduleId of updateDeleted){ + deleted.add(moduleId); + } + chunksDeleted.set(chunkPath, updateDeleted); + break; + } + case 'partial': + { + const updateAdded = new Set(mergedChunkUpdate.added); + const updateDeleted = new Set(mergedChunkUpdate.deleted); + for (const moduleId of updateAdded){ + added.set(moduleId, entries[moduleId]); + } + for (const moduleId of updateDeleted){ + deleted.add(moduleId); + } + chunksAdded.set(chunkPath, updateAdded); + chunksDeleted.set(chunkPath, updateDeleted); + break; + } + default: + invariant(mergedChunkUpdate, (mergedChunkUpdate)=>`Unknown merged chunk update type: ${mergedChunkUpdate.type}`); + } + } + // If a module was added from one chunk and deleted from another in the same update, + // consider it to be modified, as it means the module was moved from one chunk to another + // AND has new code in a single update. + for (const moduleId of added.keys()){ + if (deleted.has(moduleId)) { + added.delete(moduleId); + deleted.delete(moduleId); + } + } + for (const [moduleId, entry] of Object.entries(entries)){ + // Modules that haven't been added to any chunk but have new code are considered + // to be modified. + // This needs to be under the previous loop, as we need it to get rid of modules + // that were added and deleted in the same update. + if (!added.has(moduleId)) { + modified.set(moduleId, entry); + } + } + return { + added, + deleted, + modified, + chunksAdded, + chunksDeleted + }; +} +function getAffectedModuleEffects(moduleId) { + const outdatedModules = new Set(); + const queue = [ + { + moduleId, + dependencyChain: [] + } + ]; + let nextItem; + while(nextItem = queue.shift()){ + const { moduleId, dependencyChain } = nextItem; + if (moduleId != null) { + if (outdatedModules.has(moduleId)) { + continue; + } + outdatedModules.add(moduleId); + } + // We've arrived at the runtime of the chunk, which means that nothing + // else above can accept this update. + if (moduleId === undefined) { + return { + type: 'unaccepted', + dependencyChain + }; + } + const module = devModuleCache[moduleId]; + const hotState = moduleHotState.get(module); + if (// The module is not in the cache. Since this is a "modified" update, + // it means that the module was never instantiated before. + !module || hotState.selfAccepted && !hotState.selfInvalidated) { + continue; + } + if (hotState.selfDeclined) { + return { + type: 'self-declined', + dependencyChain, + moduleId + }; + } + if (runtimeModules.has(moduleId)) { + queue.push({ + moduleId: undefined, + dependencyChain: [ + ...dependencyChain, + moduleId + ] + }); + continue; + } + for (const parentId of module.parents){ + const parent = devModuleCache[parentId]; + if (!parent) { + continue; + } + // TODO(alexkirsz) Dependencies: check accepted and declined + // dependencies here. + queue.push({ + moduleId: parentId, + dependencyChain: [ + ...dependencyChain, + moduleId + ] + }); + } + } + return { + type: 'accepted', + moduleId, + outdatedModules + }; +} +function handleApply(chunkListPath, update) { + switch(update.type){ + case 'partial': + { + // This indicates that the update is can be applied to the current state of the application. + applyUpdate(update.instruction); + break; + } + case 'restart': + { + // This indicates that there is no way to apply the update to the + // current state of the application, and that the application must be + // restarted. + DEV_BACKEND.restart(); + break; + } + case 'notFound': + { + // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed, + // or the page itself was deleted. + // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to. + // If it is a runtime chunk list, we restart the application. + if (runtimeChunkLists.has(chunkListPath)) { + DEV_BACKEND.restart(); + } else { + disposeChunkList(chunkListPath); + } + break; + } + default: + throw new Error(`Unknown update type: ${update.type}`); + } +} +function createModuleHot(moduleId, hotData) { + const hotState = { + selfAccepted: false, + selfDeclined: false, + selfInvalidated: false, + disposeHandlers: [] + }; + const hot = { + // TODO(alexkirsz) This is not defined in the HMR API. It was used to + // decide whether to warn whenever an HMR-disposed module required other + // modules. We might want to remove it. + active: true, + data: hotData ?? {}, + // TODO(alexkirsz) Support full (dep, callback, errorHandler) form. + accept: (modules, _callback, _errorHandler)=>{ + if (modules === undefined) { + hotState.selfAccepted = true; + } else if (typeof modules === 'function') { + hotState.selfAccepted = modules; + } else { + throw new Error('unsupported `accept` signature'); + } + }, + decline: (dep)=>{ + if (dep === undefined) { + hotState.selfDeclined = true; + } else { + throw new Error('unsupported `decline` signature'); + } + }, + dispose: (callback)=>{ + hotState.disposeHandlers.push(callback); + }, + addDisposeHandler: (callback)=>{ + hotState.disposeHandlers.push(callback); + }, + removeDisposeHandler: (callback)=>{ + const idx = hotState.disposeHandlers.indexOf(callback); + if (idx >= 0) { + hotState.disposeHandlers.splice(idx, 1); + } + }, + invalidate: ()=>{ + hotState.selfInvalidated = true; + queuedInvalidatedModules.add(moduleId); + }, + // NOTE(alexkirsz) This is part of the management API, which we don't + // implement, but the Next.js React Refresh runtime uses this to decide + // whether to schedule an update. + status: ()=>'idle', + // NOTE(alexkirsz) Since we always return "idle" for now, these are no-ops. + addStatusHandler: (_handler)=>{}, + removeStatusHandler: (_handler)=>{}, + // NOTE(jridgewell) Check returns the list of updated modules, but we don't + // want the webpack code paths to ever update (the turbopack paths handle + // this already). + check: ()=>Promise.resolve(null) + }; + return { + hot, + hotState + }; +} +/** + * Removes a module from a chunk. + * Returns `true` if there are no remaining chunks including this module. + */ function removeModuleFromChunk(moduleId, chunkPath) { + const moduleChunks = moduleChunksMap.get(moduleId); + moduleChunks.delete(chunkPath); + const chunkModules = chunkModulesMap.get(chunkPath); + chunkModules.delete(moduleId); + const noRemainingModules = chunkModules.size === 0; + if (noRemainingModules) { + chunkModulesMap.delete(chunkPath); + } + const noRemainingChunks = moduleChunks.size === 0; + if (noRemainingChunks) { + moduleChunksMap.delete(moduleId); + } + return noRemainingChunks; +} +/** + * Disposes of a chunk list and its corresponding exclusive chunks. + */ function disposeChunkList(chunkListPath) { + const chunkPaths = chunkListChunksMap.get(chunkListPath); + if (chunkPaths == null) { + return false; + } + chunkListChunksMap.delete(chunkListPath); + for (const chunkPath of chunkPaths){ + const chunkChunkLists = chunkChunkListsMap.get(chunkPath); + chunkChunkLists.delete(chunkListPath); + if (chunkChunkLists.size === 0) { + chunkChunkListsMap.delete(chunkPath); + disposeChunk(chunkPath); + } + } + // We must also dispose of the chunk list's chunk itself to ensure it may + // be reloaded properly in the future. + const chunkListUrl = getChunkRelativeUrl(chunkListPath); + DEV_BACKEND.unloadChunk?.(chunkListUrl); + return true; +} +/** + * Disposes of a chunk and its corresponding exclusive modules. + * + * @returns Whether the chunk was disposed of. + */ function disposeChunk(chunkPath) { + const chunkUrl = getChunkRelativeUrl(chunkPath); + // This should happen whether the chunk has any modules in it or not. + // For instance, CSS chunks have no modules in them, but they still need to be unloaded. + DEV_BACKEND.unloadChunk?.(chunkUrl); + const chunkModules = chunkModulesMap.get(chunkPath); + if (chunkModules == null) { + return false; + } + chunkModules.delete(chunkPath); + for (const moduleId of chunkModules){ + const moduleChunks = moduleChunksMap.get(moduleId); + moduleChunks.delete(chunkPath); + const noRemainingChunks = moduleChunks.size === 0; + if (noRemainingChunks) { + moduleChunksMap.delete(moduleId); + disposeModule(moduleId, 'clear'); + availableModules.delete(moduleId); + } + } + return true; +} +/** + * Adds a module to a chunk. + */ function addModuleToChunk(moduleId, chunkPath) { + let moduleChunks = moduleChunksMap.get(moduleId); + if (!moduleChunks) { + moduleChunks = new Set([ + chunkPath + ]); + moduleChunksMap.set(moduleId, moduleChunks); + } else { + moduleChunks.add(chunkPath); + } + let chunkModules = chunkModulesMap.get(chunkPath); + if (!chunkModules) { + chunkModules = new Set([ + moduleId + ]); + chunkModulesMap.set(chunkPath, chunkModules); + } else { + chunkModules.add(moduleId); + } +} +/** + * Marks a chunk list as a runtime chunk list. There can be more than one + * runtime chunk list. For instance, integration tests can have multiple chunk + * groups loaded at runtime, each with its own chunk list. + */ function markChunkListAsRuntime(chunkListPath) { + runtimeChunkLists.add(chunkListPath); +} +function registerChunk(registration) { + const chunkPath = getPathFromScript(registration[0]); + let runtimeParams; + // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length + if (registration.length === 2) { + runtimeParams = registration[1]; + } else { + runtimeParams = undefined; + installCompressedModuleFactories(registration, /* offset= */ 1, moduleFactories, (id)=>addModuleToChunk(id, chunkPath)); + } + return BACKEND.registerChunk(chunkPath, runtimeParams); +} +/** + * Subscribes to chunk list updates from the update server and applies them. + */ function registerChunkList(chunkList) { + const chunkListScript = chunkList.script; + const chunkListPath = getPathFromScript(chunkListScript); + // The "chunk" is also registered to finish the loading in the backend + BACKEND.registerChunk(chunkListPath); + globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS.push([ + chunkListPath, + handleApply.bind(null, chunkListPath) + ]); + // Adding chunks to chunk lists and vice versa. + const chunkPaths = new Set(chunkList.chunks.map(getChunkPath)); + chunkListChunksMap.set(chunkListPath, chunkPaths); + for (const chunkPath of chunkPaths){ + let chunkChunkLists = chunkChunkListsMap.get(chunkPath); + if (!chunkChunkLists) { + chunkChunkLists = new Set([ + chunkListPath + ]); + chunkChunkListsMap.set(chunkPath, chunkChunkLists); + } else { + chunkChunkLists.add(chunkListPath); + } + } + if (chunkList.source === 'entry') { + markChunkListAsRuntime(chunkListPath); + } +} +globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []; +/* eslint-disable @typescript-eslint/no-unused-vars */ /// +/// A 'base' utilities to support runtime can have externals. +/// Currently this is for node.js / edge runtime both. +/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead. +async function externalImport(id) { + let raw; + try { + raw = await import(id); + } catch (err) { + // TODO(alexkirsz) This can happen when a client-side module tries to load + // an external module we don't provide a shim for (e.g. querystring, url). + // For now, we fail semi-silently, but in the future this should be a + // compilation error. + throw new Error(`Failed to load external module ${id}: ${err}`); + } + if (raw && raw.__esModule && raw.default && 'default' in raw.default) { + return interopEsm(raw.default, createNS(raw), true); + } + return raw; +} +contextPrototype.y = externalImport; +function externalRequire(id, thunk, esm = false) { + let raw; + try { + raw = thunk(); + } catch (err) { + // TODO(alexkirsz) This can happen when a client-side module tries to load + // an external module we don't provide a shim for (e.g. querystring, url). + // For now, we fail semi-silently, but in the future this should be a + // compilation error. + throw new Error(`Failed to load external module ${id}: ${err}`); + } + if (!esm || raw.__esModule) { + return raw; + } + return interopEsm(raw, createNS(raw), true); +} +externalRequire.resolve = (id, options)=>{ + return require.resolve(id, options); +}; +contextPrototype.x = externalRequire; +/** + * This file contains the runtime code specific to the Turbopack development + * ECMAScript "None" runtime (e.g. for Edge). + * + * It will be appended to the base development runtime code. + */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// +/// +/// +let BACKEND; +(()=>{ + BACKEND = { + // The "none" runtime expects all chunks within the same chunk group to be + // registered before any of them are instantiated. + // Furthermore, modules must be instantiated synchronously, hence we don't + // use promises here. + registerChunk (chunkPath, params) { + registeredChunks.add(chunkPath); + instantiateDependentChunks(chunkPath); + if (params == null) { + return; + } + if (params.otherChunks.length === 0) { + // The current chunk does not depend on any other chunks, it can be + // instantiated immediately. + instantiateRuntimeModules(params.runtimeModuleIds, chunkPath); + } else { + // The current chunk depends on other chunks, so we need to wait for + // those chunks to be registered before instantiating the runtime + // modules. + registerChunkRunner(chunkPath, params.otherChunks.filter((chunk)=>// The none runtime can only handle JS chunks, so we only wait for these + isJs(getChunkPath(chunk))), params.runtimeModuleIds); + } + }, + loadChunkCached (_sourceType, _chunkUrl) { + throw new Error('chunk loading is not supported'); + }, + async loadWebAssembly (_sourceType, _sourceData, chunkPath, edgeModule, imports) { + const module = await loadEdgeWasm(chunkPath, edgeModule); + return await WebAssembly.instantiate(module, imports); + }, + async loadWebAssemblyModule (_sourceType, _sourceData, chunkPath, edgeModule) { + return loadEdgeWasm(chunkPath, edgeModule); + } + }; + const registeredChunks = new Set(); + const runners = new Map(); + /** + * Registers a chunk runner that will be instantiated once all of the + * dependencies of the chunk have been registered. + */ function registerChunkRunner(chunkPath, otherChunks, runtimeModuleIds) { + const requiredChunks = new Set(); + const runner = { + runtimeModuleIds, + chunkPath, + requiredChunks + }; + for (const otherChunkData of otherChunks){ + const otherChunkPath = getChunkPath(otherChunkData); + if (registeredChunks.has(otherChunkPath)) { + continue; + } + requiredChunks.add(otherChunkPath); + let runnersForChunk = runners.get(otherChunkPath); + if (runnersForChunk == null) { + runnersForChunk = new Set(); + runners.set(otherChunkPath, runnersForChunk); + } + runnersForChunk.add(runner); + } + // When all chunks are already registered, we can instantiate the runtime module + if (runner.requiredChunks.size === 0) { + instantiateRuntimeModules(runner.runtimeModuleIds, runner.chunkPath); + } + } + /** + * Instantiates any chunk runners that were waiting for the given chunk to be + * registered. + */ function instantiateDependentChunks(chunkPath) { + // Run any chunk runners that were waiting for this chunk to be + // registered. + const runnersForChunk = runners.get(chunkPath); + if (runnersForChunk != null) { + for (const runner of runnersForChunk){ + runner.requiredChunks.delete(chunkPath); + if (runner.requiredChunks.size === 0) { + instantiateRuntimeModules(runner.runtimeModuleIds, runner.chunkPath); + } + } + runners.delete(chunkPath); + } + } + /** + * Instantiates the runtime modules for the given chunk. + */ function instantiateRuntimeModules(runtimeModuleIds, chunkPath) { + for (const moduleId of runtimeModuleIds){ + getOrInstantiateRuntimeModule(chunkPath, moduleId); + } + } + async function loadEdgeWasm(chunkPath, edgeModule) { + let module; + try { + module = edgeModule(); + } catch (_e) {} + if (!module) { + throw new Error(`dynamically loading WebAssembly is not supported in this runtime as global was not injected for chunk '${chunkPath}'`); + } + return module; + } +})(); +/** + * This file contains the runtime code specific to the Turbopack development + * ECMAScript "None" runtime (e.g. for Edge). + * + * It will be appended to the base development runtime code. + */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// +let DEV_BACKEND; +(()=>{ + DEV_BACKEND = { + restart: ()=>{ + throw new Error('restart is not supported'); + } + }; +})(); +function _eval(_) { + throw new Error('HMR evaluation is not implemented on this backend'); +} +const chunksToRegister = globalThis.TURBOPACK; +globalThis.TURBOPACK = { push: registerChunk }; +chunksToRegister.forEach(registerChunk); +const chunkListsToRegister = globalThis.TURBOPACK_CHUNK_LISTS || []; +globalThis.TURBOPACK_CHUNK_LISTS = { push: registerChunkList }; +chunkListsToRegister.forEach(registerChunkList); +})(); + + +//# sourceMappingURL=apps_web_edge-wrapper_53e34dd4.js.map \ No newline at end of file diff --git a/apps/web/.next/server/interception-route-rewrite-manifest.js b/apps/web/.next/server/interception-route-rewrite-manifest.js new file mode 100644 index 00000000..24f77ba7 --- /dev/null +++ b/apps/web/.next/server/interception-route-rewrite-manifest.js @@ -0,0 +1 @@ +self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST="[]"; \ No newline at end of file diff --git a/apps/web/.next/server/middleware-build-manifest.js b/apps/web/.next/server/middleware-build-manifest.js new file mode 100644 index 00000000..23330f8a --- /dev/null +++ b/apps/web/.next/server/middleware-build-manifest.js @@ -0,0 +1,16 @@ +globalThis.__BUILD_MANIFEST = { + "pages": { + "/_app": [] + }, + "devFiles": [], + "ampDevFiles": [], + "polyfillFiles": [], + "lowPriorityFiles": [], + "rootMainFiles": [], + "ampFirstPages": [] +}; +globalThis.__BUILD_MANIFEST.lowPriorityFiles = [ +"/static/" + process.env.__NEXT_BUILD_ID + "/_buildManifest.js", +,"/static/" + process.env.__NEXT_BUILD_ID + "/_ssgManifest.js", + +]; \ No newline at end of file diff --git a/apps/web/.next/server/middleware-manifest.json b/apps/web/.next/server/middleware-manifest.json new file mode 100644 index 00000000..47cb5c76 --- /dev/null +++ b/apps/web/.next/server/middleware-manifest.json @@ -0,0 +1,33 @@ +{ + "version": 3, + "middleware": { + "/": { + "files": [ + "server/edge/chunks/_886b33c3._.js", + "server/edge/chunks/[root-of-the-server]__8bd37c4c._.js", + "server/edge/chunks/turbopack-apps_web_edge-wrapper_53e34dd4.js" + ], + "name": "middleware", + "page": "/", + "matchers": [ + { + "regexp": "^(?:\\/(_next\\/data\\/[^/]{1,}))?(?:\\/((?!api|_next\\/static|_next\\/image|favicon.ico).*))(\\\\.json)?[\\/#\\?]?$", + "originalSource": "/((?!api|_next/static|_next/image|favicon.ico).*)" + } + ], + "wasm": [], + "assets": [], + "env": { + "__NEXT_BUILD_ID": "development", + "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "qDHbHIqItmhsNnDDb1zJxgaLO9R4RpheEkUFqJlwCAc=", + "__NEXT_PREVIEW_MODE_ID": "69359808c9a0e2ef1d49645b631e2df3", + "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "9ba5e3b1ce2abf798e2d8442c165a811960360c5a8cdc5fe7ebbe0df296d2d62", + "__NEXT_PREVIEW_MODE_SIGNING_KEY": "3633002c1292b21a2ca6234134d5ac8399c49df49cb048069e9f8e2abb74e43f" + } + } + }, + "sortedMiddleware": [ + "/" + ], + "functions": {} +} \ No newline at end of file diff --git a/apps/web/.next/server/middleware/middleware-manifest.json b/apps/web/.next/server/middleware/middleware-manifest.json new file mode 100644 index 00000000..b1907c85 --- /dev/null +++ b/apps/web/.next/server/middleware/middleware-manifest.json @@ -0,0 +1,31 @@ +{ + "sorted_middleware": [], + "middleware": { + "/": { + "files": [ + "server/edge/chunks/_886b33c3._.js", + "server/edge/chunks/[root-of-the-server]__8bd37c4c._.js", + "server/edge/chunks/turbopack-apps_web_edge-wrapper_53e34dd4.js" + ], + "name": "middleware", + "page": "/", + "matchers": [ + { + "regexp": "/:nextData(_next/data/[^/]{1,})?/((?!api|_next/static|_next/image|favicon.ico).*){(\\\\.json)}?", + "originalSource": "/((?!api|_next/static|_next/image|favicon.ico).*)" + } + ], + "wasm": [], + "assets": [], + "env": { + "__NEXT_BUILD_ID": "development", + "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "qDHbHIqItmhsNnDDb1zJxgaLO9R4RpheEkUFqJlwCAc=", + "__NEXT_PREVIEW_MODE_ID": "69359808c9a0e2ef1d49645b631e2df3", + "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "9ba5e3b1ce2abf798e2d8442c165a811960360c5a8cdc5fe7ebbe0df296d2d62", + "__NEXT_PREVIEW_MODE_SIGNING_KEY": "3633002c1292b21a2ca6234134d5ac8399c49df49cb048069e9f8e2abb74e43f" + } + } + }, + "instrumentation": null, + "functions": {} +} \ No newline at end of file diff --git a/apps/web/.next/server/next-font-manifest.js b/apps/web/.next/server/next-font-manifest.js new file mode 100644 index 00000000..dcd06977 --- /dev/null +++ b/apps/web/.next/server/next-font-manifest.js @@ -0,0 +1 @@ +self.__NEXT_FONT_MANIFEST="{\n \"app\": {},\n \"appUsingSizeAdjust\": false,\n \"pages\": {},\n \"pagesUsingSizeAdjust\": false\n}" \ No newline at end of file diff --git a/apps/web/.next/server/next-font-manifest.json b/apps/web/.next/server/next-font-manifest.json new file mode 100644 index 00000000..7b7649c1 --- /dev/null +++ b/apps/web/.next/server/next-font-manifest.json @@ -0,0 +1,6 @@ +{ + "app": {}, + "appUsingSizeAdjust": false, + "pages": {}, + "pagesUsingSizeAdjust": false +} \ No newline at end of file diff --git a/apps/web/.next/server/pages-manifest.json b/apps/web/.next/server/pages-manifest.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/apps/web/.next/server/pages-manifest.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/apps/web/.next/server/server-reference-manifest.js b/apps/web/.next/server/server-reference-manifest.js new file mode 100644 index 00000000..3425977f --- /dev/null +++ b/apps/web/.next/server/server-reference-manifest.js @@ -0,0 +1 @@ +self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"qDHbHIqItmhsNnDDb1zJxgaLO9R4RpheEkUFqJlwCAc=\"\n}" \ No newline at end of file diff --git a/apps/web/.next/server/server-reference-manifest.json b/apps/web/.next/server/server-reference-manifest.json new file mode 100644 index 00000000..20b372ff --- /dev/null +++ b/apps/web/.next/server/server-reference-manifest.json @@ -0,0 +1,5 @@ +{ + "node": {}, + "edge": {}, + "encryptionKey": "qDHbHIqItmhsNnDDb1zJxgaLO9R4RpheEkUFqJlwCAc=" +} \ No newline at end of file diff --git a/apps/web/.next/static/development/_buildManifest.js b/apps/web/.next/static/development/_buildManifest.js new file mode 100644 index 00000000..d01c30c3 --- /dev/null +++ b/apps/web/.next/static/development/_buildManifest.js @@ -0,0 +1,18 @@ +self.__BUILD_MANIFEST = { + "__rewrites": { + "afterFiles": [ + { + "source": "/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/a-4-a/c.js" + }, + { + "source": "/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/:path*" + } + ], + "beforeFiles": [], + "fallback": [] + }, + "sortedPages": [ + "/_app", + "/_error" + ] +};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() \ No newline at end of file diff --git a/apps/web/.next/static/development/_clientMiddlewareManifest.json b/apps/web/.next/static/development/_clientMiddlewareManifest.json new file mode 100644 index 00000000..7f264e3b --- /dev/null +++ b/apps/web/.next/static/development/_clientMiddlewareManifest.json @@ -0,0 +1,6 @@ +[ + { + "regexp": "^(?:\\/(_next\\/data\\/[^/]{1,}))?(?:\\/((?!api|_next\\/static|_next\\/image|favicon.ico).*))(\\\\.json)?[\\/#\\?]?$", + "originalSource": "/((?!api|_next/static|_next/image|favicon.ico).*)" + } +] \ No newline at end of file diff --git a/apps/web/.next/static/development/_ssgManifest.js b/apps/web/.next/static/development/_ssgManifest.js new file mode 100644 index 00000000..2260768d --- /dev/null +++ b/apps/web/.next/static/development/_ssgManifest.js @@ -0,0 +1 @@ +self.__SSG_MANIFEST=new Set;self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/apps/web/.next/trace b/apps/web/.next/trace new file mode 100644 index 00000000..ddc4246e --- /dev/null +++ b/apps/web/.next/trace @@ -0,0 +1,2 @@ +[{"name":"hot-reloader","duration":51,"timestamp":35746272416,"id":3,"tags":{"version":"15.5.3"},"startTime":1764359805524,"traceId":"5f6e64cd6ea5810f"},{"name":"compile-path","duration":168336,"timestamp":35746356050,"id":4,"tags":{"trigger":"middleware"},"startTime":1764359805608,"traceId":"5f6e64cd6ea5810f"}] +[{"name":"next-dev","duration":2410420,"timestamp":35745076240,"id":1,"tags":{},"startTime":1764359804328,"traceId":"5f6e64cd6ea5810f"}] diff --git a/apps/web/.next/types/routes.d.ts b/apps/web/.next/types/routes.d.ts new file mode 100644 index 00000000..8cdffa90 --- /dev/null +++ b/apps/web/.next/types/routes.d.ts @@ -0,0 +1,90 @@ +// This file is generated automatically by Next.js +// Do not edit this file manually + +type AppRoutes = "/" | "/blog" | "/blog/[slug]" | "/contributors" | "/editor/[project_id]" | "/privacy" | "/projects" | "/roadmap" | "/sponsors" | "/terms" +type AppRouteHandlerRoutes = "/api/auth/[...all]" | "/api/get-upload-url" | "/api/health" | "/api/sounds/search" | "/api/transcribe" | "/rss.xml" +type PageRoutes = never +type LayoutRoutes = "/" | "/editor/[project_id]" +type RedirectRoutes = never +type RewriteRoutes = "/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/[[...path]]" | "/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/a-4-a/c.js" +type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes | AppRouteHandlerRoutes + + +interface ParamMap { + "/": {} + "/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/[[...path]]": { "path"?: string[]; } + "/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/a-4-a/c.js": {} + "/api/auth/[...all]": { "all": string[]; } + "/api/get-upload-url": {} + "/api/health": {} + "/api/sounds/search": {} + "/api/transcribe": {} + "/blog": {} + "/blog/[slug]": { "slug": string; } + "/contributors": {} + "/editor/[project_id]": { "project_id": string; } + "/privacy": {} + "/projects": {} + "/roadmap": {} + "/rss.xml": {} + "/sponsors": {} + "/terms": {} +} + + +export type ParamsOf = ParamMap[Route] + +interface LayoutSlotMap { + "/": never + "/editor/[project_id]": never +} + + +export type { AppRoutes, PageRoutes, LayoutRoutes, RedirectRoutes, RewriteRoutes, ParamMap, AppRouteHandlerRoutes } + +declare global { + /** + * Props for Next.js App Router page components + * @example + * ```tsx + * export default function Page(props: PageProps<'/blog/[slug]'>) { + * const { slug } = await props.params + * return
Blog post: {slug}
+ * } + * ``` + */ + interface PageProps { + params: Promise + searchParams: Promise> + } + + /** + * Props for Next.js App Router layout components + * @example + * ```tsx + * export default function Layout(props: LayoutProps<'/dashboard'>) { + * return
{props.children}
+ * } + * ``` + */ + type LayoutProps = { + params: Promise + children: React.ReactNode + } & { + [K in LayoutSlotMap[LayoutRoute]]: React.ReactNode + } + + /** + * Context for Next.js App Router route handlers + * @example + * ```tsx + * export async function GET(request: NextRequest, context: RouteContext<'/api/users/[id]'>) { + * const { id } = await context.params + * return Response.json({ id }) + * } + * ``` + */ + interface RouteContext { + params: Promise + } +} diff --git a/apps/web/package.json b/apps/web/package.json index 9113274e..bed46576 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -22,6 +22,7 @@ "@hello-pangea/dnd": "^18.0.1", "@hookform/resolvers": "^3.9.1", "@opencut/env": "workspace:*", + "@opencut/hooks": "workspace:*", "@opencut/ui": "workspace:*", "@radix-ui/react-separator": "^1.1.7", "@upstash/ratelimit": "^2.0.6", @@ -43,7 +44,7 @@ "lucide-react": "^0.468.0", "motion": "^12.18.1", "nanoid": "^5.1.5", - "next": "^15.5.3", + "next": "15.5.7", "next-themes": "^0.4.4", "pg": "^8.16.2", "radix-ui": "^1.4.2", diff --git a/apps/web/src/app/editor/[project_id]/page.tsx b/apps/web/src/app/editor/[project_id]/page.tsx index 3bbec0ac..84b5cf15 100644 --- a/apps/web/src/app/editor/[project_id]/page.tsx +++ b/apps/web/src/app/editor/[project_id]/page.tsx @@ -1,25 +1,44 @@ "use client"; -import { useEffect, useRef } from "react"; -import { useParams, useRouter } from "next/navigation"; +import { useParams } from "next/navigation"; import { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from "@/components/ui/resizable"; -import { MediaPanel } from "@/components/editor/media-panel"; +import { AssetsPanel } from "@/components/editor/assets-panel"; import { PropertiesPanel } from "@/components/editor/properties-panel"; import { Timeline } from "@/components/editor/timeline"; import { PreviewPanel } from "@/components/editor/preview-panel"; import { EditorHeader } from "@/components/editor/editor-header"; import { usePanelStore } from "@/stores/panel-store"; -import { useProjectStore } from "@/stores/project-store"; import { EditorProvider } from "@/components/providers/editor-provider"; -import { usePlaybackControls } from "@/hooks/use-playback-controls"; import { Onboarding } from "@/components/editor/onboarding"; +import { useProjectInitialization } from "@/hooks/use-project-initialization"; export default function Editor() { + const params = useParams(); + const projectId = params.project_id as string; + + useProjectInitialization({ projectId }); + + return ( + +
+ +
+ +
+ +
+
+ ); +} + +function EditorLayout({}: {}) { const { + activePreset, + resetCounter, toolsPanel, previewPanel, mainContent, @@ -29,269 +48,54 @@ export default function Editor() { setMainContent, setTimeline, propertiesPanel, - setPropertiesPanel, - activePreset, - resetCounter, + setPropertiesPanel, } = usePanelStore(); - const { - activeProject, - loadProject, - createNewProject, - isInvalidProjectId, - markProjectIdAsInvalid, - } = useProjectStore(); - const params = useParams(); - const router = useRouter(); - const projectId = params.project_id as string; - const handledProjectIds = useRef>(new Set()); - const isInitializingRef = useRef(false); + return activePreset === "media" ? ( + + + + - usePlaybackControls(); + - useEffect(() => { - let isCancelled = false; - - const initProject = async () => { - if (!projectId) { - return; - } - - // Prevent duplicate initialization - if (isInitializingRef.current) { - return; - } - - // Check if project is already loaded - if (activeProject?.id === projectId) { - return; - } - - // Check global invalid tracking first (most important for preventing duplicates) - if (isInvalidProjectId(projectId)) { - return; - } - - // Check if we've already handled this project ID locally - if (handledProjectIds.current.has(projectId)) { - return; - } - - // Mark as initializing to prevent race conditions - isInitializingRef.current = true; - handledProjectIds.current.add(projectId); - - try { - await loadProject(projectId); - - // Check if component was unmounted during async operation - if (isCancelled) { - return; - } - - // Project loaded successfully - isInitializingRef.current = false; - } catch (error) { - // Check if component was unmounted during async operation - if (isCancelled) { - return; - } - - // More specific error handling - only create new project for actual "not found" errors - const isProjectNotFound = - error instanceof Error && - (error.message.includes("not found") || - error.message.includes("does not exist") || - error.message.includes("Project not found")); - - if (isProjectNotFound) { - // Mark this project ID as invalid globally BEFORE creating project - markProjectIdAsInvalid(projectId); - - try { - const newProjectId = await createNewProject("Untitled Project"); - - // Check again if component was unmounted - if (isCancelled) { - return; - } - - router.replace(`/editor/${newProjectId}`); - } catch (createError) { - console.error("Failed to create new project:", createError); - } - } else { - // For other errors (storage issues, corruption, etc.), don't create new project - console.error( - "Project loading failed with recoverable error:", - error, - ); - // Remove from handled set so user can retry - handledProjectIds.current.delete(projectId); - } - - isInitializingRef.current = false; - } - }; - - initProject(); - - // Cleanup function to cancel async operations - return () => { - isCancelled = true; - isInitializingRef.current = false; - }; - }, [ - projectId, - loadProject, - createNewProject, - router, - isInvalidProjectId, - markProjectIdAsInvalid, - ]); - - return ( - -
- -
- {activePreset === "media" ? ( + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) : activePreset === "inspector" ? ( - - setPropertiesPanel(100 - size)} - className="min-h-0 min-w-0" + onResize={setPreviewPanel} + className="min-h-0 min-w-0 flex-1" > - - - - - - - - - - - - - - - - - - - - - + @@ -301,74 +105,62 @@ export default function Editor() { minSize={15} maxSize={40} onResize={setPropertiesPanel} - className="min-h-0 min-w-0" + className="min-w-0" > - ) : activePreset === "vertical-preview" ? ( + + + + + + + + + + + ) : activePreset === "inspector" ? ( + + setPropertiesPanel(100 - size)} + className="min-h-0 min-w-0" + > + + setPreviewPanel(100 - size)} - className="min-h-0 min-w-0" + defaultSize={toolsPanel} + minSize={15} + maxSize={40} + onResize={setToolsPanel} + className="min-w-0 rounded-sm" > - - - - - - - - - - - - - - - - - - - - - + @@ -377,83 +169,178 @@ export default function Editor() { defaultSize={previewPanel} minSize={30} onResize={setPreviewPanel} - className="min-h-0 min-w-0" + className="min-h-0 min-w-0 flex-1" > - ) : ( + + + + + + + + + + + + + + + + + ) : activePreset === "vertical-preview" ? ( + + setPreviewPanel(100 - size)} + className="min-h-0 min-w-0" + > + + - {/* Main content area */} - - {/* Tools Panel */} - - - - - - - {/* Preview Area */} - - - - - - - - - - + - {/* Timeline */} - + - )} -
- -
-
+ + + + + + + +
+ + + + + + + + + ) : ( + + + + + + + + + + + + + + + + + + + + + + + + + + + ); } diff --git a/apps/web/src/app/projects/page.tsx b/apps/web/src/app/projects/page.tsx index 3d66a3c5..5729857c 100644 --- a/apps/web/src/app/projects/page.tsx +++ b/apps/web/src/app/projects/page.tsx @@ -53,15 +53,16 @@ export default function ProjectsPage() { Record >({}); const [_loadingThumbnails, setLoadingThumbnails] = useState>( - new Set() + new Set(), ); const [isSelectionMode, setIsSelectionMode] = useState(false); const [selectedProjects, setSelectedProjects] = useState>( - new Set() + new Set(), ); const [isBulkDeleteDialogOpen, setIsBulkDeleteDialogOpen] = useState(false); const [searchQuery, setSearchQuery] = useState(""); const [sortOption, setSortOption] = useState("createdAt-desc"); + const { getProjectThumbnail } = useTimelineStore(); const router = useRouter(); const getProjectThumbnail = useCallback( @@ -73,9 +74,7 @@ export default function ProjectsPage() { setLoadingThumbnails((prev) => new Set(prev).add(projectId)); try { - const thumbnail = await useTimelineStore - .getState() - .getProjectThumbnail(projectId); + const thumbnail = await getProjectThumbnail(projectId); setThumbnailCache((prev) => ({ ...prev, [projectId]: thumbnail })); return thumbnail; } finally { @@ -86,7 +85,7 @@ export default function ProjectsPage() { }); } }, - [] + [], ); const handleCreateProject = async () => { @@ -120,7 +119,7 @@ export default function ProjectsPage() { const handleBulkDelete = async () => { await Promise.all( - Array.from(selectedProjects).map((projectId) => deleteProject(projectId)) + Array.from(selectedProjects).map((projectId) => deleteProject(projectId)), ); setSelectedProjects(new Set()); setIsSelectionMode(false); @@ -136,11 +135,11 @@ export default function ProjectsPage() { selectedProjects.size > 0 && selectedProjects.size < sortedProjects.length; return ( -
-
+
+
Back @@ -172,17 +171,17 @@ export default function ProjectsPage() { )}
-
+
-

+

Your Projects

{savedProjects.length}{" "} {savedProjects.length === 1 ? "project" : "projects"} {isSelectionMode && selectedProjects.size > 0 && ( - + • {selectedProjects.size} selected )} @@ -221,7 +220,7 @@ export default function ProjectsPage() {

-
+
{allSelected ? "Deselect All" : "Select All"} - + ({selectedProjects.size} of {sortedProjects.length} selected) )} {isLoading || !isInitialized ? ( -
+
{Array.from({ length: 8 }, (_, index) => (
- -
- + +
+
- - + +
@@ -344,7 +343,7 @@ export default function ProjectsPage() { onClearSearch={() => setSearchQuery("")} /> ) : ( -
+
{sortedProjects.map((project) => (
{isSelectionMode && ( -
-
+
+
onSelect?.(project.id, checked as boolean) } onClick={(e) => e.stopPropagation()} - className="w-4 h-4" + className="h-4 w-4" />
@@ -468,8 +467,8 @@ function ProjectCard({
{isLoadingThumbnail ? ( -
- +
+
) : dynamicThumbnail ? ( ) : ( -
-
- +
-

+

{project.name}

{!isSelectionMode && ( @@ -500,7 +499,7 @@ function ProjectCard({ ) : ( - + {cardContent} )} @@ -606,10 +605,10 @@ function CreateButton({ onClick }: { onClick?: () => void }) { function NoProjects({ onCreateProject }: { onCreateProject: () => void }) { return (
-
-