diff --git a/peersync/.github/workflows/pr-validator.yml b/.github/workflows/pr-validator.yml
similarity index 69%
rename from peersync/.github/workflows/pr-validator.yml
rename to .github/workflows/pr-validator.yml
index cf04d4e..3a48e56 100644
--- a/peersync/.github/workflows/pr-validator.yml
+++ b/.github/workflows/pr-validator.yml
@@ -17,7 +17,7 @@ jobs:
- name: Check code formatting
uses: creyD/prettier_action@v4.3
with:
- prettier_options: "--check ./client/**/*.{js,jsx,ts,tsx,css,scss,json,md} ./server/**/*.{ts,json,md}"
+ prettier_options: "--check ./peersync/client/**/*.{js,jsx,ts,tsx,css,scss,json,md} ./peersync/server/**/*.{ts,json,md}"
dry: True
@@ -39,28 +39,31 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- cache: 'pnpm'
+
+ - name: Install root dependencies
+ working-directory: ./peersync
+ run: pnpm install
- name: Install client dependencies
- working-directory: ./client
+ working-directory: ./peersync/client
run: pnpm install
- name: Lint client
- working-directory: ./client
+ working-directory: ./peersync/client
run: pnpm lint
- name: Build client
- working-directory: ./client
+ working-directory: ./peersync/client
run: pnpm build
- name: Install server dependencies
- working-directory: ./server
+ working-directory: ./peersync/server
run: pnpm install
- name: Lint server
- working-directory: ./server
+ working-directory: ./peersync/server
run: pnpm lint
- name: Build server
- working-directory: ./server
+ working-directory: ./peersync/server
run: pnpm build
\ No newline at end of file
diff --git a/peersync/.prettierignore b/peersync/.prettierignore
new file mode 100644
index 0000000..9ff4dd6
--- /dev/null
+++ b/peersync/.prettierignore
@@ -0,0 +1,18 @@
+# Dependencies
+**/node_modules
+**/.pnpm
+
+# Build outputs
+**/dist
+**/.next
+**/build
+
+# Cache
+**/.cache
+**/.eslintcache
+
+# Environment files
+**/.env*
+
+# Lock files
+**/pnpm-lock.yaml
\ No newline at end of file
diff --git a/peersync/.prettierrc b/peersync/.prettierrc
new file mode 100644
index 0000000..0040558
--- /dev/null
+++ b/peersync/.prettierrc
@@ -0,0 +1,7 @@
+{
+ "semi": true,
+ "trailingComma": "es5",
+ "singleQuote": true,
+ "tabWidth": 2,
+ "useTabs": false
+ }
\ No newline at end of file
diff --git a/peersync/client/components.json b/peersync/client/components.json
index 0e8b633..405a08c 100644
--- a/peersync/client/components.json
+++ b/peersync/client/components.json
@@ -18,4 +18,4 @@
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
-}
\ No newline at end of file
+}
diff --git a/peersync/client/next.config.ts b/peersync/client/next.config.ts
index e9ffa30..5e891cf 100644
--- a/peersync/client/next.config.ts
+++ b/peersync/client/next.config.ts
@@ -1,4 +1,4 @@
-import type { NextConfig } from "next";
+import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
/* config options here */
diff --git a/peersync/client/package.json b/peersync/client/package.json
index a3e6183..bf3fad9 100644
--- a/peersync/client/package.json
+++ b/peersync/client/package.json
@@ -14,6 +14,7 @@
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-toast": "^1.2.4",
"@upstash/redis": "^1.34.3",
+ "@vercel/analytics": "^1.4.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"downloadjs": "^1.4.7",
diff --git a/peersync/client/pnpm-lock.yaml b/peersync/client/pnpm-lock.yaml
index f781700..5df74de 100644
--- a/peersync/client/pnpm-lock.yaml
+++ b/peersync/client/pnpm-lock.yaml
@@ -23,6 +23,9 @@ importers:
'@upstash/redis':
specifier: ^1.34.3
version: 1.34.3
+ '@vercel/analytics':
+ specifier: ^1.4.1
+ version: 1.4.1(next@15.1.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
@@ -769,6 +772,32 @@ packages:
'@upstash/redis@1.34.3':
resolution: {integrity: sha512-VT25TyODGy/8ljl7GADnJoMmtmJ1F8d84UXfGonRRF8fWYJz7+2J6GzW+a6ETGtk4OyuRTt7FRSvFG5GvrfSdQ==}
+ '@vercel/analytics@1.4.1':
+ resolution: {integrity: sha512-ekpL4ReX2TH3LnrRZTUKjHHNpNy9S1I7QmS+g/RQXoSUQ8ienzosuX7T9djZ/s8zPhBx1mpHP/Rw5875N+zQIQ==}
+ peerDependencies:
+ '@remix-run/react': ^2
+ '@sveltejs/kit': ^1 || ^2
+ next: '>= 13'
+ react: ^18 || ^19 || ^19.0.0-rc
+ svelte: '>= 4'
+ vue: ^3
+ vue-router: ^4
+ peerDependenciesMeta:
+ '@remix-run/react':
+ optional: true
+ '@sveltejs/kit':
+ optional: true
+ next:
+ optional: true
+ react:
+ optional: true
+ svelte:
+ optional: true
+ vue:
+ optional: true
+ vue-router:
+ optional: true
+
acorn-jsx@5.3.2:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
@@ -2857,6 +2886,11 @@ snapshots:
dependencies:
crypto-js: 4.2.0
+ '@vercel/analytics@1.4.1(next@15.1.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)':
+ optionalDependencies:
+ next: 15.1.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
+ react: 19.0.0
+
acorn-jsx@5.3.2(acorn@8.14.0):
dependencies:
acorn: 8.14.0
diff --git a/peersync/client/src/app/api/sessions/create/route.ts b/peersync/client/src/app/api/sessions/create/route.ts
index d817724..8be8f94 100644
--- a/peersync/client/src/app/api/sessions/create/route.ts
+++ b/peersync/client/src/app/api/sessions/create/route.ts
@@ -1,12 +1,14 @@
-import { createSession } from "../../../../lib/session";
-import { NextResponse } from "next/server";
+import { createSession } from '../../../../lib/session';
+import { NextResponse } from 'next/server';
export async function POST() {
- try{
- const sessionId = await createSession();
- return NextResponse.json({ sessionId }, { status: 200 });
- } catch {
- return NextResponse.json({ error: "Failed to create session" }, { status: 500 });
- }
-
-}
\ No newline at end of file
+ try {
+ const sessionId = await createSession();
+ return NextResponse.json({ sessionId }, { status: 200 });
+ } catch {
+ return NextResponse.json(
+ { error: 'Failed to create session' },
+ { status: 500 }
+ );
+ }
+}
diff --git a/peersync/client/src/app/api/sessions/delete/[sessionId]/route.ts b/peersync/client/src/app/api/sessions/delete/[sessionId]/route.ts
index e294662..006fbf8 100644
--- a/peersync/client/src/app/api/sessions/delete/[sessionId]/route.ts
+++ b/peersync/client/src/app/api/sessions/delete/[sessionId]/route.ts
@@ -1,15 +1,18 @@
-import { NextRequest, NextResponse } from "next/server";
-import { deleteSession } from "@/lib/session";
+import { NextRequest, NextResponse } from 'next/server';
+import { deleteSession } from '@/lib/session';
export async function DELETE(request: NextRequest) {
- const sessionId = request.nextUrl.pathname.split('/').pop();
- if(!sessionId){
- return NextResponse.json({ message: "Invalid session" }, { status: 404 });
- }
- try{
- await deleteSession(sessionId);
- return NextResponse.json({ message: "Session deleted" }, { status: 200 });
- } catch {
- return NextResponse.json({ message: "Failed to delete session" }, { status: 500 });
- }
-}
\ No newline at end of file
+ const sessionId = request.nextUrl.pathname.split('/').pop();
+ if (!sessionId) {
+ return NextResponse.json({ message: 'Invalid session' }, { status: 404 });
+ }
+ try {
+ await deleteSession(sessionId);
+ return NextResponse.json({ message: 'Session deleted' }, { status: 200 });
+ } catch {
+ return NextResponse.json(
+ { message: 'Failed to delete session' },
+ { status: 500 }
+ );
+ }
+}
diff --git a/peersync/client/src/app/api/sessions/validate/[sessionId]/route.ts b/peersync/client/src/app/api/sessions/validate/[sessionId]/route.ts
index 925d77e..1931f76 100644
--- a/peersync/client/src/app/api/sessions/validate/[sessionId]/route.ts
+++ b/peersync/client/src/app/api/sessions/validate/[sessionId]/route.ts
@@ -1,29 +1,41 @@
-import { NextResponse, NextRequest } from "next/server";
-import { getSession,deleteSession } from "../../../../../lib/session";
+import { NextResponse, NextRequest } from 'next/server';
+import { getSession, deleteSession } from '../../../../../lib/session';
export async function GET(request: NextRequest) {
- try{
- const sessionId = request.nextUrl.pathname.split('/').pop();
- if (!sessionId) {
- return NextResponse.json({ valid: false, message: "Invalid session" }, { status: 404 });
- }
- const session = await getSession(sessionId);
- if (!session) {
- return NextResponse.json({
- valid: false,
- message: "Invalid session"
- }, { status: 404 });
- }
-
- if (Date.now() > session.expiresAt) {
- await deleteSession(sessionId);
- return NextResponse.json({
- valid: false,
- message: "Session expired"
- }, { status: 410 });
- }
- return NextResponse.json({valid: true}, {status: 200});
- } catch {
- return NextResponse.json({ valid: false, message: "Server error"}, {status: 500});
+ try {
+ const sessionId = request.nextUrl.pathname.split('/').pop();
+ if (!sessionId) {
+ return NextResponse.json(
+ { valid: false, message: 'Invalid session' },
+ { status: 404 }
+ );
}
-}
\ No newline at end of file
+ const session = await getSession(sessionId);
+ if (!session) {
+ return NextResponse.json(
+ {
+ valid: false,
+ message: 'Invalid session',
+ },
+ { status: 404 }
+ );
+ }
+
+ if (Date.now() > session.expiresAt) {
+ await deleteSession(sessionId);
+ return NextResponse.json(
+ {
+ valid: false,
+ message: 'Session expired',
+ },
+ { status: 410 }
+ );
+ }
+ return NextResponse.json({ valid: true }, { status: 200 });
+ } catch {
+ return NextResponse.json(
+ { valid: false, message: 'Server error' },
+ { status: 500 }
+ );
+ }
+}
diff --git a/peersync/client/src/app/error/page.tsx b/peersync/client/src/app/error/page.tsx
index 0c0e7cd..f1b4f80 100644
--- a/peersync/client/src/app/error/page.tsx
+++ b/peersync/client/src/app/error/page.tsx
@@ -1,9 +1,9 @@
-"use client";
+'use client';
-import { Header } from "../../components/layout/header";
-import { Button } from "../../components/ui/button";
-import { useSearchParams, useRouter } from "next/navigation";
-import { Suspense } from "react";
+import { Header } from '../../components/layout/header';
+import { Button } from '../../components/ui/button';
+import { useSearchParams, useRouter } from 'next/navigation';
+import { Suspense } from 'react';
function ErrorContent() {
const searchParams = useSearchParams();
@@ -14,23 +14,26 @@ function ErrorContent() {
switch (error) {
case 'expired-session':
return {
- title: "Session Expired",
- description: "This sharing session has expired. Please request a new sharing link."
+ title: 'Session Expired',
+ description:
+ 'This sharing session has expired. Please request a new sharing link.',
};
case 'invalid-session':
return {
- title: "Invalid Session",
- description: "This sharing link is invalid. Please request a new one."
- };
+ title: 'Invalid Session',
+ description:
+ 'This sharing link is invalid. Please request a new one.',
+ };
case 'connection-error':
return {
- title: "Connection Error",
- description: "The connection was lost. This could be due to network issues or because the transfer was cancelled. Please try again."
+ title: 'Connection Error',
+ description:
+ 'The connection was lost. This could be due to network issues or because the transfer was cancelled. Please try again.',
};
default:
return {
- title: "Error",
- description: "Something went wrong. Please try again."
+ title: 'Error',
+ description: 'Something went wrong. Please try again.',
};
}
};
@@ -41,10 +44,7 @@ function ErrorContent() {
{title}
{description}
-
@@ -62,4 +62,4 @@ export default function ErrorPage() {
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/app/layout.tsx b/peersync/client/src/app/layout.tsx
index 3fc79f6..78d656b 100644
--- a/peersync/client/src/app/layout.tsx
+++ b/peersync/client/src/app/layout.tsx
@@ -8,7 +8,8 @@ const inter = Inter({ subsets: ['latin'] });
export const metadata: Metadata = {
title: 'PeerSync | Free Secure File Sharing',
- description: 'Share files instantly with end-to-end encryption. No signup required, completely free peer-to-peer file transfer.',
+ description:
+ 'Share files instantly with end-to-end encryption. No signup required, completely free peer-to-peer file transfer.',
};
export default function RootLayout({
diff --git a/peersync/client/src/app/page.tsx b/peersync/client/src/app/page.tsx
index e790e00..f6f37b1 100644
--- a/peersync/client/src/app/page.tsx
+++ b/peersync/client/src/app/page.tsx
@@ -1,10 +1,10 @@
-"use client";
+'use client';
-import { useState } from "react";
-import { useDropzone } from "react-dropzone";
-import { Header } from "../components/layout/header";
-import { HomeContent } from "../components/layout/home-content";
-import { DragOverlay } from "../components/file-upload/drag-overlay";
+import { useState } from 'react';
+import { useDropzone } from 'react-dropzone';
+import { Header } from '../components/layout/header';
+import { HomeContent } from '../components/layout/home-content';
+import { DragOverlay } from '../components/file-upload/drag-overlay';
export default function Home() {
const [file, setFile] = useState(null);
@@ -34,9 +34,12 @@ export default function Home() {
Site Under Maintenance
-
Due to server cost issues, the site is currently down. It will be back online Feburary 1st 12 am PST.
+
+ Due to server cost issues, the site is currently down. It will be back
+ online Feburary 1st 12 am PST.
+
-
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/app/receive/[sessionId]/page.tsx b/peersync/client/src/app/receive/[sessionId]/page.tsx
index 25290b4..6ce200b 100644
--- a/peersync/client/src/app/receive/[sessionId]/page.tsx
+++ b/peersync/client/src/app/receive/[sessionId]/page.tsx
@@ -1,20 +1,20 @@
-"use client";
+'use client';
-import { Header } from "../../../components/layout/header";
-import { Hero } from "../../../components/layout/hero";
-import { Button } from "../../../components/ui/button";
-import { Progress } from "../../../components/ui/progress";
-import { usePeerConnection } from "../../../hooks/usePeerConnection";
-import { useParams, useRouter } from "next/navigation";
+import { Header } from '../../../components/layout/header';
+import { Hero } from '../../../components/layout/hero';
+import { Button } from '../../../components/ui/button';
+import { Progress } from '../../../components/ui/progress';
+import { usePeerConnection } from '../../../hooks/usePeerConnection';
+import { useParams, useRouter } from 'next/navigation';
export default function ReceivePage() {
const params = useParams();
const router = useRouter();
const sessionId = params.sessionId as string;
-
- const { isConnected, receivedFileData, progress} = usePeerConnection({
+
+ const { isConnected, receivedFileData, progress } = usePeerConnection({
sessionId,
- mode: 'receiver'
+ mode: 'receiver',
});
return (
@@ -23,37 +23,34 @@ export default function ReceivePage() {
-
- {!isConnected && !receivedFileData &&
Connecting to peer...
}
- {isConnected && !receivedFileData && (
-
-
Waiting for file...
- {progress > 0 && (
-
-
-
-
- {Math.round(progress * 100)}%
-
+
+ {!isConnected && !receivedFileData &&
Connecting to peer...
}
+ {isConnected && !receivedFileData && (
+
+
Waiting for file...
+ {progress > 0 && (
+
+
+
+
+ {Math.round(progress * 100)}%
+
+
-
- )}
+ )}
+
+ )}
+ {receivedFileData && (
+
+
File received successfully!
+
router.push('/')} size="sm">
+ Share a File
+
- )}
- {receivedFileData && (
-
-
File received successfully!
-
router.push('/')}
- size="sm"
- >
- Share a File
-
-
- )}
+ )}
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/file-share/share-info.tsx b/peersync/client/src/components/file-share/share-info.tsx
index 1a072cc..7f89d95 100644
--- a/peersync/client/src/components/file-share/share-info.tsx
+++ b/peersync/client/src/components/file-share/share-info.tsx
@@ -1,5 +1,5 @@
-import QRCode from "react-qr-code";
-import { CopyButton } from "../ui/copy-button";
+import QRCode from 'react-qr-code';
+import { CopyButton } from '../ui/copy-button';
interface ShareInfoProps {
sessionId: string;
@@ -10,7 +10,7 @@ export function ShareInfo({ sessionId }: ShareInfoProps) {
return (
-
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/file-share/transfer-progress.tsx b/peersync/client/src/components/file-share/transfer-progress.tsx
index bb19f2c..cff1b49 100644
--- a/peersync/client/src/components/file-share/transfer-progress.tsx
+++ b/peersync/client/src/components/file-share/transfer-progress.tsx
@@ -1,5 +1,5 @@
-import { Button } from "../ui/button";
-import { Progress } from "../ui/progress";
+import { Button } from '../ui/button';
+import { Progress } from '../ui/progress';
interface TransferProgressProps {
isConnected: boolean;
@@ -7,7 +7,11 @@ interface TransferProgressProps {
onTerminate: () => void;
}
-export function TransferProgress({ isConnected, progress, onTerminate }: TransferProgressProps) {
+export function TransferProgress({
+ isConnected,
+ progress,
+ onTerminate,
+}: TransferProgressProps) {
const getStatusMessage = () => {
if (!isConnected) return 'Waiting for peer...';
if (progress === 0) return 'Connected - Ready to transfer';
@@ -24,18 +28,16 @@ export function TransferProgress({ isConnected, progress, onTerminate }: Transfe
-
- {getStatusMessage()}
-
-
{getStatusMessage()}
+
- {progress === 1 ? "Share Another File" : "Terminate"}
+ {progress === 1 ? 'Share Another File' : 'Terminate'}
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/file-upload/drag-overlay.tsx b/peersync/client/src/components/file-upload/drag-overlay.tsx
index e42c8db..1de1378 100644
--- a/peersync/client/src/components/file-upload/drag-overlay.tsx
+++ b/peersync/client/src/components/file-upload/drag-overlay.tsx
@@ -12,4 +12,4 @@ export function DragOverlay({ isVisible }: DragOverlayProps) {
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/file-upload/file-card.tsx b/peersync/client/src/components/file-upload/file-card.tsx
index 77a4ac8..f5e5e2f 100644
--- a/peersync/client/src/components/file-upload/file-card.tsx
+++ b/peersync/client/src/components/file-upload/file-card.tsx
@@ -1,4 +1,4 @@
-import { Card, CardContent, CardHeader, CardTitle } from "../ui/card";
+import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
interface FileCardProps {
file: File;
@@ -8,7 +8,7 @@ export function FileCard({ file }: FileCardProps) {
const formatFileSize = (bytes: number) => {
const mb = bytes / (1024 * 1024);
const kb = bytes / 1024;
-
+
if (mb >= 1) {
return `${mb.toFixed(2)} MB`;
}
@@ -29,4 +29,4 @@ export function FileCard({ file }: FileCardProps) {
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/file-upload/upload-zone.tsx b/peersync/client/src/components/file-upload/upload-zone.tsx
index 2e4ad5d..7932a15 100644
--- a/peersync/client/src/components/file-upload/upload-zone.tsx
+++ b/peersync/client/src/components/file-upload/upload-zone.tsx
@@ -1,14 +1,14 @@
-"use client";
+'use client';
-import { Button } from "../ui/button";
-import { Card} from "../ui/card";
-import { File } from "lucide-react";
+import { Button } from '../ui/button';
+import { Card } from '../ui/card';
+import { File } from 'lucide-react';
interface UploadZoneProps {
onFileSelect: (file: File) => void;
}
-export function UploadZone({ onFileSelect}: UploadZoneProps) {
+export function UploadZone({ onFileSelect }: UploadZoneProps) {
const handleFileInput = (e: React.ChangeEvent) => {
if (e.target.files && e.target.files.length > 0) {
onFileSelect(e.target.files[0]);
@@ -31,7 +31,7 @@ export function UploadZone({ onFileSelect}: UploadZoneProps) {
/>
document.getElementById("file-upload")?.click()}
+ onClick={() => document.getElementById('file-upload')?.click()}
>
Select File
@@ -39,4 +39,4 @@ export function UploadZone({ onFileSelect}: UploadZoneProps) {
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/layout/features.tsx b/peersync/client/src/components/layout/features.tsx
index 81e539e..f9f799e 100644
--- a/peersync/client/src/components/layout/features.tsx
+++ b/peersync/client/src/components/layout/features.tsx
@@ -1,22 +1,22 @@
-import { Card, CardContent, CardHeader, CardTitle } from "../ui/card";
-import { Share2, Shield, Zap } from "lucide-react";
+import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
+import { Share2, Shield, Zap } from 'lucide-react';
const features = [
{
icon: ,
- title: "Instant Sharing",
- description: "Share files seamlessly with peers in real-time"
+ title: 'Instant Sharing',
+ description: 'Share files seamlessly with peers in real-time',
},
{
icon: ,
- title: "Secure Transfer",
- description: "End-to-end encryption for your file transfers"
+ title: 'Secure Transfer',
+ description: 'End-to-end encryption for your file transfers',
},
{
icon: ,
- title: "Lightning Fast",
- description: "Optimized for speed and reliability"
- }
+ title: 'Lightning Fast',
+ description: 'Optimized for speed and reliability',
+ },
];
export function Features() {
@@ -37,4 +37,4 @@ export function Features() {
))}
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/layout/header.tsx b/peersync/client/src/components/layout/header.tsx
index af121d2..62ac295 100644
--- a/peersync/client/src/components/layout/header.tsx
+++ b/peersync/client/src/components/layout/header.tsx
@@ -1,6 +1,6 @@
-"use client";
+'use client';
-import { ThemeToggle } from "../theme-toggle";
+import { ThemeToggle } from '../theme-toggle';
export function Header() {
return (
@@ -11,4 +11,4 @@ export function Header() {
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/layout/hero.tsx b/peersync/client/src/components/layout/hero.tsx
index 673fe93..0b8bcfb 100644
--- a/peersync/client/src/components/layout/hero.tsx
+++ b/peersync/client/src/components/layout/hero.tsx
@@ -1,26 +1,26 @@
-interface HeroProps{
- mode: "share" | "receive"
+interface HeroProps {
+ mode: 'share' | 'receive';
}
-export function Hero({mode}: HeroProps) {
+export function Hero({ mode }: HeroProps) {
const content = {
- share:{
- title: "Secure File Sharing Made Simple",
- description: "Share files instantly with your peers."
+ share: {
+ title: 'Secure File Sharing Made Simple',
+ description: 'Share files instantly with your peers.',
},
- receive:{
- title: "Receive Files Instantly",
- description: "Receive files from your peers with ease."
- }
- }
- return (
-
-
- {content[mode].title}
-
-
- {content[mode].description}
-
-
- );
- }
\ No newline at end of file
+ receive: {
+ title: 'Receive Files Instantly',
+ description: 'Receive files from your peers with ease.',
+ },
+ };
+ return (
+
+
+ {content[mode].title}
+
+
+ {content[mode].description}
+
+
+ );
+}
diff --git a/peersync/client/src/components/layout/home-content.tsx b/peersync/client/src/components/layout/home-content.tsx
index 4c7780b..eca719f 100644
--- a/peersync/client/src/components/layout/home-content.tsx
+++ b/peersync/client/src/components/layout/home-content.tsx
@@ -1,15 +1,15 @@
-"use client";
+'use client';
-import { Hero } from "./hero";
-import { UploadZone } from "../file-upload/upload-zone";
-import { FileCard } from "../file-upload/file-card";
-import { ShareInfo } from "../file-share/share-info";
-import { useEffect, useState } from "react";
-import { Button } from "../ui/button";
-import { usePeerConnection } from "../../hooks/usePeerConnection";
+import { Hero } from './hero';
+import { UploadZone } from '../file-upload/upload-zone';
+import { FileCard } from '../file-upload/file-card';
+import { ShareInfo } from '../file-share/share-info';
+import { useEffect, useState } from 'react';
+import { Button } from '../ui/button';
+import { usePeerConnection } from '../../hooks/usePeerConnection';
-import { useToast } from "../../hooks/use-toast";
-import { TransferProgress } from "../file-share/transfer-progress";
+import { useToast } from '../../hooks/use-toast';
+import { TransferProgress } from '../file-share/transfer-progress';
interface HomeContentProps {
file: File | null;
@@ -19,7 +19,7 @@ interface HomeContentProps {
setSessionId: (sessionId: string | null) => void;
}
-export function HomeContent ({
+export function HomeContent({
file,
onFileSelect,
sessionId,
@@ -29,26 +29,25 @@ export function HomeContent ({
const [isSharing, setIsSharing] = useState(false);
const { isConnected, sendFile, disconnect, progress } = usePeerConnection({
sessionId: sessionId,
- mode: 'sender'
+ mode: 'sender',
});
const { toast } = useToast();
const handleShare = async () => {
- try{
+ try {
const response = await fetch('/api/sessions/create', {
method: 'POST',
});
- const {sessionId} = await response.json();
+ const { sessionId } = await response.json();
setIsSharing(true);
setSessionId(sessionId);
} catch {
toast({
- variant: "destructive",
- title: "Error creating session",
- description: "Could not create sharing session. Please try again.",
+ variant: 'destructive',
+ title: 'Error creating session',
+ description: 'Could not create sharing session. Please try again.',
});
setIsSharing(false);
}
-
};
const handleTerminate = () => {
@@ -69,18 +68,14 @@ export function HomeContent ({
return (
-
+
- {file && isSharing && sessionId && (
-
- )}
+ {file && isSharing && sessionId && }
{!isSharing && (
- )}
+ )}
{file && (
@@ -89,16 +84,20 @@ export function HomeContent ({
Share Now
- {
- setFile(null);
- setSessionId(null);
- }}>
+ {
+ setFile(null);
+ setSessionId(null);
+ }}
+ >
Cancel
)}
{isSharing && (
-
);
-};
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/theme-provider.tsx b/peersync/client/src/components/theme-provider.tsx
index 09e5837..ae038df 100644
--- a/peersync/client/src/components/theme-provider.tsx
+++ b/peersync/client/src/components/theme-provider.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import * as React from "react";
-import { ThemeProvider as NextThemesProvider } from "next-themes";
-import { type ThemeProviderProps } from "next-themes";
+import * as React from 'react';
+import { ThemeProvider as NextThemesProvider } from 'next-themes';
+import { type ThemeProviderProps } from 'next-themes';
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return {children};
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/theme-toggle.tsx b/peersync/client/src/components/theme-toggle.tsx
index 791053b..163846a 100644
--- a/peersync/client/src/components/theme-toggle.tsx
+++ b/peersync/client/src/components/theme-toggle.tsx
@@ -1,15 +1,15 @@
-"use client";
+'use client';
-import * as React from "react";
-import { Moon, Sun } from "lucide-react";
-import { useTheme } from "next-themes";
-import { Button } from "./ui/button";
+import * as React from 'react';
+import { Moon, Sun } from 'lucide-react';
+import { useTheme } from 'next-themes';
+import { Button } from './ui/button';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
-} from "./ui/dropdown-menu";
+} from './ui/dropdown-menu';
export function ThemeToggle() {
const { setTheme } = useTheme();
@@ -24,16 +24,16 @@ export function ThemeToggle() {
- setTheme("light")}>
+ setTheme('light')}>
Light
- setTheme("dark")}>
+ setTheme('dark')}>
Dark
- setTheme("system")}>
+ setTheme('system')}>
System
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/ui/button.tsx b/peersync/client/src/components/ui/button.tsx
index dcfee0c..6fa6bca 100644
--- a/peersync/client/src/components/ui/button.tsx
+++ b/peersync/client/src/components/ui/button.tsx
@@ -1,57 +1,57 @@
-import * as React from "react"
-import { Slot } from "@radix-ui/react-slot"
-import { cva, type VariantProps } from "class-variance-authority"
+import * as React from 'react';
+import { Slot } from '@radix-ui/react-slot';
+import { cva, type VariantProps } from 'class-variance-authority';
-import { cn } from "../../lib/utils"
+import { cn } from '../../lib/utils';
const buttonVariants = cva(
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
+ 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
{
variants: {
variant: {
default:
- "bg-primary text-primary-foreground shadow hover:bg-primary/90",
+ 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
destructive:
- "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
+ 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
outline:
- "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
+ 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
secondary:
- "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
- ghost: "hover:bg-accent hover:text-accent-foreground",
- link: "text-primary underline-offset-4 hover:underline",
+ 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
+ link: 'text-primary underline-offset-4 hover:underline',
},
size: {
- default: "h-9 px-4 py-2",
- sm: "h-8 rounded-md px-3 text-xs",
- lg: "h-10 rounded-md px-8",
- icon: "h-9 w-9",
+ default: 'h-9 px-4 py-2',
+ sm: 'h-8 rounded-md px-3 text-xs',
+ lg: 'h-10 rounded-md px-8',
+ icon: 'h-9 w-9',
},
},
defaultVariants: {
- variant: "default",
- size: "default",
+ variant: 'default',
+ size: 'default',
},
}
-)
+);
export interface ButtonProps
extends React.ButtonHTMLAttributes,
VariantProps {
- asChild?: boolean
+ asChild?: boolean;
}
const Button = React.forwardRef(
({ className, variant, size, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button"
+ const Comp = asChild ? Slot : 'button';
return (
- )
+ );
}
-)
-Button.displayName = "Button"
+);
+Button.displayName = 'Button';
-export { Button, buttonVariants }
+export { Button, buttonVariants };
diff --git a/peersync/client/src/components/ui/card.tsx b/peersync/client/src/components/ui/card.tsx
index 5f23552..b6f064d 100644
--- a/peersync/client/src/components/ui/card.tsx
+++ b/peersync/client/src/components/ui/card.tsx
@@ -1,6 +1,6 @@
-import * as React from "react"
+import * as React from 'react';
-import { cn } from "../../lib/utils"
+import { cn } from '../../lib/utils';
const Card = React.forwardRef<
HTMLDivElement,
@@ -9,13 +9,13 @@ const Card = React.forwardRef<
-))
-Card.displayName = "Card"
+));
+Card.displayName = 'Card';
const CardHeader = React.forwardRef<
HTMLDivElement,
@@ -23,11 +23,11 @@ const CardHeader = React.forwardRef<
>(({ className, ...props }, ref) => (
-))
-CardHeader.displayName = "CardHeader"
+));
+CardHeader.displayName = 'CardHeader';
const CardTitle = React.forwardRef<
HTMLDivElement,
@@ -35,11 +35,11 @@ const CardTitle = React.forwardRef<
>(({ className, ...props }, ref) => (
-))
-CardTitle.displayName = "CardTitle"
+));
+CardTitle.displayName = 'CardTitle';
const CardDescription = React.forwardRef<
HTMLDivElement,
@@ -47,19 +47,19 @@ const CardDescription = React.forwardRef<
>(({ className, ...props }, ref) => (
-))
-CardDescription.displayName = "CardDescription"
+));
+CardDescription.displayName = 'CardDescription';
const CardContent = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes
>(({ className, ...props }, ref) => (
-
-))
-CardContent.displayName = "CardContent"
+
+));
+CardContent.displayName = 'CardContent';
const CardFooter = React.forwardRef<
HTMLDivElement,
@@ -67,10 +67,17 @@ const CardFooter = React.forwardRef<
>(({ className, ...props }, ref) => (
-))
-CardFooter.displayName = "CardFooter"
+));
+CardFooter.displayName = 'CardFooter';
-export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
+export {
+ Card,
+ CardHeader,
+ CardFooter,
+ CardTitle,
+ CardDescription,
+ CardContent,
+};
diff --git a/peersync/client/src/components/ui/copy-button.tsx b/peersync/client/src/components/ui/copy-button.tsx
index 53c7877..2b4d596 100644
--- a/peersync/client/src/components/ui/copy-button.tsx
+++ b/peersync/client/src/components/ui/copy-button.tsx
@@ -1,9 +1,9 @@
-"use client";
+'use client';
-import { useState } from "react";
-import { Copy, Check } from "lucide-react";
-import { Button } from "./button";
-import { copyToClipboard } from "../../utils/clipboard";
+import { useState } from 'react';
+import { Copy, Check } from 'lucide-react';
+import { Button } from './button';
+import { copyToClipboard } from '../../utils/clipboard';
interface CopyButtonProps {
value: string;
@@ -12,7 +12,7 @@ interface CopyButtonProps {
export function CopyButton({ value, className }: CopyButtonProps) {
const [copied, setCopied] = useState(false);
-
+
const handleCopy = async () => {
const success = await copyToClipboard(value);
if (success) {
@@ -22,18 +22,14 @@ export function CopyButton({ value, className }: CopyButtonProps) {
};
return (
-
- {copied ? (
-
- ) : (
-
- )}
+ {copied ? : }
Copy to clipboard
);
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/components/ui/dropdown-menu.tsx b/peersync/client/src/components/ui/dropdown-menu.tsx
index 24d9d6d..5c61d7e 100644
--- a/peersync/client/src/components/ui/dropdown-menu.tsx
+++ b/peersync/client/src/components/ui/dropdown-menu.tsx
@@ -1,34 +1,34 @@
-"use client"
+'use client';
-import * as React from "react"
-import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
-import { Check, ChevronRight, Circle } from "lucide-react"
+import * as React from 'react';
+import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
+import { Check, ChevronRight, Circle } from 'lucide-react';
-import { cn } from "../../lib/utils"
+import { cn } from '../../lib/utils';
-const DropdownMenu = DropdownMenuPrimitive.Root
+const DropdownMenu = DropdownMenuPrimitive.Root;
-const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
+const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
-const DropdownMenuGroup = DropdownMenuPrimitive.Group
+const DropdownMenuGroup = DropdownMenuPrimitive.Group;
-const DropdownMenuPortal = DropdownMenuPrimitive.Portal
+const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
-const DropdownMenuSub = DropdownMenuPrimitive.Sub
+const DropdownMenuSub = DropdownMenuPrimitive.Sub;
-const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
+const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
const DropdownMenuSubTrigger = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef & {
- inset?: boolean
+ inset?: boolean;
}
>(({ className, inset, children, ...props }, ref) => (
-))
+));
DropdownMenuSubTrigger.displayName =
- DropdownMenuPrimitive.SubTrigger.displayName
+ DropdownMenuPrimitive.SubTrigger.displayName;
const DropdownMenuSubContent = React.forwardRef<
React.ElementRef,
@@ -47,14 +47,14 @@ const DropdownMenuSubContent = React.forwardRef<
-))
+));
DropdownMenuSubContent.displayName =
- DropdownMenuPrimitive.SubContent.displayName
+ DropdownMenuPrimitive.SubContent.displayName;
const DropdownMenuContent = React.forwardRef<
React.ElementRef,
@@ -65,33 +65,33 @@ const DropdownMenuContent = React.forwardRef<
ref={ref}
sideOffset={sideOffset}
className={cn(
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
- "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 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md',
+ '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}
/>
-))
-DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
+));
+DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
const DropdownMenuItem = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef & {
- inset?: boolean
+ inset?: boolean;
}
>(({ className, inset, ...props }, ref) => (
svg]:size-4 [&>svg]:shrink-0",
- inset && "pl-8",
+ 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',
+ inset && 'pl-8',
className
)}
{...props}
/>
-))
-DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
+));
+DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
const DropdownMenuCheckboxItem = React.forwardRef<
React.ElementRef,
@@ -100,7 +100,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
{children}
-))
+));
DropdownMenuCheckboxItem.displayName =
- DropdownMenuPrimitive.CheckboxItem.displayName
+ DropdownMenuPrimitive.CheckboxItem.displayName;
const DropdownMenuRadioItem = React.forwardRef<
React.ElementRef,
@@ -124,7 +124,7 @@ const DropdownMenuRadioItem = React.forwardRef<
{children}
-))
-DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
+));
+DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
const DropdownMenuLabel = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef & {
- inset?: boolean
+ inset?: boolean;
}
>(({ className, inset, ...props }, ref) => (
-))
-DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
+));
+DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
const DropdownMenuSeparator = React.forwardRef<
React.ElementRef,
@@ -163,11 +163,11 @@ const DropdownMenuSeparator = React.forwardRef<
>(({ className, ...props }, ref) => (
-))
-DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
+));
+DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
const DropdownMenuShortcut = ({
className,
@@ -175,12 +175,12 @@ const DropdownMenuShortcut = ({
}: React.HTMLAttributes) => {
return (
- )
-}
-DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
+ );
+};
+DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
export {
DropdownMenu,
@@ -198,4 +198,4 @@ export {
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuRadioGroup,
-}
+};
diff --git a/peersync/client/src/components/ui/progress.tsx b/peersync/client/src/components/ui/progress.tsx
index b14bfd7..43ac45d 100644
--- a/peersync/client/src/components/ui/progress.tsx
+++ b/peersync/client/src/components/ui/progress.tsx
@@ -1,9 +1,9 @@
-"use client"
+'use client';
-import * as React from "react"
-import * as ProgressPrimitive from "@radix-ui/react-progress"
+import * as React from 'react';
+import * as ProgressPrimitive from '@radix-ui/react-progress';
-import { cn } from "../../lib/utils"
+import { cn } from '../../lib/utils';
const Progress = React.forwardRef<
React.ElementRef,
@@ -12,7 +12,7 @@ const Progress = React.forwardRef<
-))
-Progress.displayName = ProgressPrimitive.Root.displayName
+));
+Progress.displayName = ProgressPrimitive.Root.displayName;
-export { Progress }
+export { Progress };
diff --git a/peersync/client/src/components/ui/toast.tsx b/peersync/client/src/components/ui/toast.tsx
index 55a8c60..c42ae62 100644
--- a/peersync/client/src/components/ui/toast.tsx
+++ b/peersync/client/src/components/ui/toast.tsx
@@ -1,13 +1,13 @@
-"use client"
+'use client';
-import * as React from "react"
-import * as ToastPrimitives from "@radix-ui/react-toast"
-import { cva, type VariantProps } from "class-variance-authority"
-import { X } from "lucide-react"
+import * as React from 'react';
+import * as ToastPrimitives from '@radix-ui/react-toast';
+import { cva, type VariantProps } from 'class-variance-authority';
+import { X } from 'lucide-react';
-import { cn } from "../../lib/utils"
+import { cn } from '../../lib/utils';
-const ToastProvider = ToastPrimitives.Provider
+const ToastProvider = ToastPrimitives.Provider;
const ToastViewport = React.forwardRef<
React.ElementRef,
@@ -16,29 +16,29 @@ const ToastViewport = React.forwardRef<
-))
-ToastViewport.displayName = ToastPrimitives.Viewport.displayName
+));
+ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
const toastVariants = cva(
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
+ 'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full',
{
variants: {
variant: {
- default: "border bg-background text-foreground",
+ default: 'border bg-background text-foreground',
destructive:
- "destructive group border-destructive bg-destructive text-destructive-foreground",
+ 'destructive group border-destructive bg-destructive text-destructive-foreground',
},
},
defaultVariants: {
- variant: "default",
+ variant: 'default',
},
}
-)
+);
const Toast = React.forwardRef<
React.ElementRef,
@@ -51,9 +51,9 @@ const Toast = React.forwardRef<
className={cn(toastVariants({ variant }), className)}
{...props}
/>
- )
-})
-Toast.displayName = ToastPrimitives.Root.displayName
+ );
+});
+Toast.displayName = ToastPrimitives.Root.displayName;
const ToastAction = React.forwardRef<
React.ElementRef,
@@ -62,13 +62,13 @@ const ToastAction = React.forwardRef<
-))
-ToastAction.displayName = ToastPrimitives.Action.displayName
+));
+ToastAction.displayName = ToastPrimitives.Action.displayName;
const ToastClose = React.forwardRef<
React.ElementRef,
@@ -77,7 +77,7 @@ const ToastClose = React.forwardRef<
-))
-ToastClose.displayName = ToastPrimitives.Close.displayName
+));
+ToastClose.displayName = ToastPrimitives.Close.displayName;
const ToastTitle = React.forwardRef<
React.ElementRef,
@@ -94,11 +94,11 @@ const ToastTitle = React.forwardRef<
>(({ className, ...props }, ref) => (
-))
-ToastTitle.displayName = ToastPrimitives.Title.displayName
+));
+ToastTitle.displayName = ToastPrimitives.Title.displayName;
const ToastDescription = React.forwardRef<
React.ElementRef,
@@ -106,15 +106,15 @@ const ToastDescription = React.forwardRef<
>(({ className, ...props }, ref) => (
-))
-ToastDescription.displayName = ToastPrimitives.Description.displayName
+));
+ToastDescription.displayName = ToastPrimitives.Description.displayName;
-type ToastProps = React.ComponentPropsWithoutRef
+type ToastProps = React.ComponentPropsWithoutRef;
-type ToastActionElement = React.ReactElement
+type ToastActionElement = React.ReactElement;
export {
type ToastProps,
@@ -126,4 +126,4 @@ export {
ToastDescription,
ToastClose,
ToastAction,
-}
+};
diff --git a/peersync/client/src/components/ui/toaster.tsx b/peersync/client/src/components/ui/toaster.tsx
index 9ab7757..385b2ea 100644
--- a/peersync/client/src/components/ui/toaster.tsx
+++ b/peersync/client/src/components/ui/toaster.tsx
@@ -1,6 +1,6 @@
-"use client"
+'use client';
-import { useToast } from "../../hooks/use-toast"
+import { useToast } from '../../hooks/use-toast';
import {
Toast,
ToastClose,
@@ -8,10 +8,10 @@ import {
ToastProvider,
ToastTitle,
ToastViewport,
-} from "./toast"
+} from './toast';
export function Toaster() {
- const { toasts } = useToast()
+ const { toasts } = useToast();
return (
@@ -27,9 +27,9 @@ export function Toaster() {
{action}
- )
+ );
})}
- )
+ );
}
diff --git a/peersync/client/src/hooks/use-toast.ts b/peersync/client/src/hooks/use-toast.ts
index 2840754..f484e35 100644
--- a/peersync/client/src/hooks/use-toast.ts
+++ b/peersync/client/src/hooks/use-toast.ts
@@ -1,105 +1,101 @@
-"use client"
+'use client';
// Inspired by react-hot-toast library
-import * as React from "react"
+import * as React from 'react';
-import type {
- ToastActionElement,
- ToastProps,
-} from "../components/ui/toast"
+import type { ToastActionElement, ToastProps } from '../components/ui/toast';
-const TOAST_LIMIT = 1
-const TOAST_REMOVE_DELAY = 1000000
+const TOAST_LIMIT = 1;
+const TOAST_REMOVE_DELAY = 1000000;
type ToasterToast = ToastProps & {
- id: string
- title?: React.ReactNode
- description?: React.ReactNode
- action?: ToastActionElement
-}
+ id: string;
+ title?: React.ReactNode;
+ description?: React.ReactNode;
+ action?: ToastActionElement;
+};
type ActionType = {
- ADD_TOAST: "ADD_TOAST",
- UPDATE_TOAST: "UPDATE_TOAST",
- DISMISS_TOAST: "DISMISS_TOAST",
- REMOVE_TOAST: "REMOVE_TOAST",
-}
+ ADD_TOAST: 'ADD_TOAST';
+ UPDATE_TOAST: 'UPDATE_TOAST';
+ DISMISS_TOAST: 'DISMISS_TOAST';
+ REMOVE_TOAST: 'REMOVE_TOAST';
+};
-let count = 0
+let count = 0;
function genId() {
- count = (count + 1) % Number.MAX_SAFE_INTEGER
- return count.toString()
+ count = (count + 1) % Number.MAX_SAFE_INTEGER;
+ return count.toString();
}
-
type Action =
| {
- type: ActionType["ADD_TOAST"]
- toast: ToasterToast
+ type: ActionType['ADD_TOAST'];
+ toast: ToasterToast;
}
| {
- type: ActionType["UPDATE_TOAST"]
- toast: Partial
+ type: ActionType['UPDATE_TOAST'];
+ toast: Partial;
}
| {
- type: ActionType["DISMISS_TOAST"]
- toastId?: ToasterToast["id"]
+ type: ActionType['DISMISS_TOAST'];
+ toastId?: ToasterToast['id'];
}
| {
- type: ActionType["REMOVE_TOAST"]
- toastId?: ToasterToast["id"]
- }
+ type: ActionType['REMOVE_TOAST'];
+ toastId?: ToasterToast['id'];
+ };
interface State {
- toasts: ToasterToast[]
+ toasts: ToasterToast[];
}
-const toastTimeouts = new Map>()
+const toastTimeouts = new Map>();
const addToRemoveQueue = (toastId: string) => {
if (toastTimeouts.has(toastId)) {
- return
+ return;
}
const timeout = setTimeout(() => {
- toastTimeouts.delete(toastId)
+ toastTimeouts.delete(toastId);
dispatch({
- type: "REMOVE_TOAST",
+ type: 'REMOVE_TOAST',
toastId: toastId,
- })
- }, TOAST_REMOVE_DELAY)
+ });
+ }, TOAST_REMOVE_DELAY);
- toastTimeouts.set(toastId, timeout)
-}
+ toastTimeouts.set(toastId, timeout);
+};
export const reducer = (state: State, action: Action): State => {
switch (action.type) {
- case "ADD_TOAST":
+ case 'ADD_TOAST':
return {
...state,
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
- }
+ };
- case "UPDATE_TOAST":
+ case 'UPDATE_TOAST':
return {
...state,
toasts: state.toasts.map((t) =>
t.id === action.toast.id ? { ...t, ...action.toast } : t
),
- }
+ };
- case "DISMISS_TOAST": {
- const { toastId } = action
+ case 'DISMISS_TOAST': {
+ const { toastId } = action;
// ! Side effects ! - This could be extracted into a dismissToast() action,
// but I'll keep it here for simplicity
if (toastId) {
- addToRemoveQueue(toastId)
+ addToRemoveQueue(toastId);
} else {
state.toasts.forEach((toast) => {
- addToRemoveQueue(toast.id)
- })
+ addToRemoveQueue(toast.id);
+ });
}
return {
@@ -112,82 +108,82 @@ export const reducer = (state: State, action: Action): State => {
}
: t
),
- }
+ };
}
- case "REMOVE_TOAST":
+ case 'REMOVE_TOAST':
if (action.toastId === undefined) {
return {
...state,
toasts: [],
- }
+ };
}
return {
...state,
toasts: state.toasts.filter((t) => t.id !== action.toastId),
- }
+ };
}
-}
+};
-const listeners: Array<(state: State) => void> = []
+const listeners: Array<(state: State) => void> = [];
-let memoryState: State = { toasts: [] }
+let memoryState: State = { toasts: [] };
function dispatch(action: Action) {
- memoryState = reducer(memoryState, action)
+ memoryState = reducer(memoryState, action);
listeners.forEach((listener) => {
- listener(memoryState)
- })
+ listener(memoryState);
+ });
}
-type Toast = Omit
+type Toast = Omit;
function toast({ ...props }: Toast) {
- const id = genId()
+ const id = genId();
const update = (props: ToasterToast) =>
dispatch({
- type: "UPDATE_TOAST",
+ type: 'UPDATE_TOAST',
toast: { ...props, id },
- })
- const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id })
+ });
+ const dismiss = () => dispatch({ type: 'DISMISS_TOAST', toastId: id });
dispatch({
- type: "ADD_TOAST",
+ type: 'ADD_TOAST',
toast: {
...props,
id,
open: true,
onOpenChange: (open) => {
- if (!open) dismiss()
+ if (!open) dismiss();
},
},
- })
+ });
return {
id: id,
dismiss,
update,
- }
+ };
}
function useToast() {
- const [state, setState] = React.useState(memoryState)
+ const [state, setState] = React.useState(memoryState);
React.useEffect(() => {
- listeners.push(setState)
+ listeners.push(setState);
return () => {
- const index = listeners.indexOf(setState)
+ const index = listeners.indexOf(setState);
if (index > -1) {
- listeners.splice(index, 1)
+ listeners.splice(index, 1);
}
- }
- }, [state])
+ };
+ }, [state]);
return {
...state,
toast,
- dismiss: (toastId?: string) => dispatch({ type: "DISMISS_TOAST", toastId }),
- }
+ dismiss: (toastId?: string) => dispatch({ type: 'DISMISS_TOAST', toastId }),
+ };
}
-export { useToast, toast }
+export { useToast, toast };
diff --git a/peersync/client/src/hooks/usePeerConnection.ts b/peersync/client/src/hooks/usePeerConnection.ts
index 9ca41a4..b25d421 100644
--- a/peersync/client/src/hooks/usePeerConnection.ts
+++ b/peersync/client/src/hooks/usePeerConnection.ts
@@ -1,67 +1,70 @@
-import { useState, useEffect, useCallback, useRef } from "react";
-import { Connection } from "../services/Connection";
-import { useRouter } from "next/navigation";
+import { useState, useEffect, useCallback, useRef } from 'react';
+import { Connection } from '../services/Connection';
+import { useRouter } from 'next/navigation';
interface UsePeerConnectionProps {
- sessionId: string | null;
- mode: 'sender' | 'receiver';
+ sessionId: string | null;
+ mode: 'sender' | 'receiver';
}
export function usePeerConnection({ sessionId, mode }: UsePeerConnectionProps) {
- const [isConnected, setIsConnected] = useState(false);
- const [receivedFileData, setReceivedFileData] = useState(false);
- const [progress, setProgress] = useState(0);
- const connectionRef = useRef(null);
- const router = useRouter();
+ const [isConnected, setIsConnected] = useState(false);
+ const [receivedFileData, setReceivedFileData] = useState(false);
+ const [progress, setProgress] = useState(0);
+ const connectionRef = useRef(null);
+ const router = useRouter();
- useEffect(() => {
- if (!sessionId) return;
+ useEffect(() => {
+ if (!sessionId) return;
- const connection = new Connection(sessionId, mode);
- connectionRef.current = connection;
+ const connection = new Connection(sessionId, mode);
+ connectionRef.current = connection;
- connection.connect({
- onConnected: () => setIsConnected(true),
- onProgress: (p) => setProgress(p),
- onStatus: (status) => {
- switch (status) {
- case 'completed':
- setReceivedFileData(true);
- setProgress(1);
- break;
- case 'connection-error':
- router.push('/error?type=connection-error');
- break;
- }
- }
- });
+ connection.connect({
+ onConnected: () => setIsConnected(true),
+ onProgress: (p) => setProgress(p),
+ onStatus: (status) => {
+ switch (status) {
+ case 'completed':
+ setReceivedFileData(true);
+ setProgress(1);
+ break;
+ case 'connection-error':
+ router.push('/error?type=connection-error');
+ break;
+ }
+ },
+ });
- return () => {
- connectionRef.current?.disconnect();
- connectionRef.current = null;
- };
- }, [sessionId, mode, router]);
+ return () => {
+ connectionRef.current?.disconnect();
+ connectionRef.current = null;
+ };
+ }, [sessionId, mode, router]);
- const sendFile = useCallback((file: File) => {
- if (connectionRef.current && isConnected) {
- connectionRef.current.sendFile(file, setProgress).catch(() => {
- router.push('/error?type=transfer-failed');
- });
- }
- }, [isConnected, router]);
+ const sendFile = useCallback(
+ (file: File) => {
+ if (connectionRef.current && isConnected) {
+ connectionRef.current.sendFile(file, setProgress).catch(() => {
+ router.push('/error?type=transfer-failed');
+ });
+ }
+ },
+ [isConnected, router]
+ );
- const disconnect = useCallback(() => {
- connectionRef.current?.disconnect();
- setIsConnected(false);
- setReceivedFileData(false);
- setProgress(0);
- }, []);
+ const disconnect = useCallback(() => {
+ connectionRef.current?.disconnect();
+ setIsConnected(false);
+ setReceivedFileData(false);
+ setProgress(0);
+ }, []);
- return {
- isConnected,
- sendFile,
- disconnect,
- receivedFileData,
- progress
- };
-}
\ No newline at end of file
+ return {
+ isConnected,
+ sendFile,
+ disconnect,
+ receivedFileData,
+ progress,
+ };
+}
diff --git a/peersync/client/src/lib/redis.ts b/peersync/client/src/lib/redis.ts
index 47464e7..01b39ba 100644
--- a/peersync/client/src/lib/redis.ts
+++ b/peersync/client/src/lib/redis.ts
@@ -1,6 +1,6 @@
-import { Redis } from '@upstash/redis'
+import { Redis } from '@upstash/redis';
export const redis = new Redis({
- url: process.env.KV_REST_API_URL,
- token: process.env.KV_REST_API_TOKEN,
- })
\ No newline at end of file
+ url: process.env.KV_REST_API_URL,
+ token: process.env.KV_REST_API_TOKEN,
+});
diff --git a/peersync/client/src/lib/session.ts b/peersync/client/src/lib/session.ts
index 12170ca..4514b45 100644
--- a/peersync/client/src/lib/session.ts
+++ b/peersync/client/src/lib/session.ts
@@ -1,35 +1,35 @@
-import { randomBytes } from "crypto";
-import { redis } from "./redis";
+import { randomBytes } from 'crypto';
+import { redis } from './redis';
export interface Session {
- id: string;
- createdAt: number;
- expiresAt: number;
- fileInfo?: {
- name: string;
- size: number;
- type: string;
- };
+ id: string;
+ createdAt: number;
+ expiresAt: number;
+ fileInfo?: {
+ name: string;
+ size: number;
+ type: string;
+ };
}
-export async function createSession(): Promise{
- const sessionId = randomBytes(16).toString('hex');
- const session: Session = {
- id: sessionId,
- createdAt: Date.now(),
- expiresAt: Date.now() + 15 * 60 * 1000,
- }
- await redis.set(`session:${sessionId}`, JSON.stringify(session), {
- ex: 900
- });
- return sessionId;
+export async function createSession(): Promise {
+ const sessionId = randomBytes(16).toString('hex');
+ const session: Session = {
+ id: sessionId,
+ createdAt: Date.now(),
+ expiresAt: Date.now() + 15 * 60 * 1000,
+ };
+ await redis.set(`session:${sessionId}`, JSON.stringify(session), {
+ ex: 900,
+ });
+ return sessionId;
}
-export async function getSession(sessionId: string): Promise{
- const session = await redis.get(`session:${sessionId}`);
- return session
+export async function getSession(sessionId: string): Promise {
+ const session = await redis.get(`session:${sessionId}`);
+ return session;
}
-export async function deleteSession(sessionId: string): Promise{
- await redis.del(`session:${sessionId}`);
-}
\ No newline at end of file
+export async function deleteSession(sessionId: string): Promise {
+ await redis.del(`session:${sessionId}`);
+}
diff --git a/peersync/client/src/middleware.ts b/peersync/client/src/middleware.ts
index 807e50e..f7dd76a 100644
--- a/peersync/client/src/middleware.ts
+++ b/peersync/client/src/middleware.ts
@@ -1,30 +1,34 @@
-import { NextResponse } from 'next/server'
-import type { NextRequest } from 'next/server'
+import { NextResponse } from 'next/server';
+import type { NextRequest } from 'next/server';
-export async function middleware(request: NextRequest){
- if(!request.nextUrl.pathname.startsWith('/receive')){
- return NextResponse.next();
- }
-
- const sessionId = request.nextUrl.pathname.split('/').pop();
- try{
- const response = await fetch(`${request.nextUrl.origin}/api/sessions/validate/${sessionId}`, {method: 'GET'});
- const data = await response.json();
- if(data.valid){
- return NextResponse.next();
- }
- const redirectUrl = new URL('/error', request.url);
- redirectUrl.searchParams.set('type', data.message === 'Session expired' ? 'expired-session' : 'invalid-session');
- return NextResponse.redirect(redirectUrl);
+export async function middleware(request: NextRequest) {
+ if (!request.nextUrl.pathname.startsWith('/receive')) {
+ return NextResponse.next();
+ }
- } catch {
- const redirectUrl = new URL('/error', request.url);
- redirectUrl.searchParams.set('type', 'invalid-session');
- return NextResponse.redirect(redirectUrl);
+ const sessionId = request.nextUrl.pathname.split('/').pop();
+ try {
+ const response = await fetch(
+ `${request.nextUrl.origin}/api/sessions/validate/${sessionId}`,
+ { method: 'GET' }
+ );
+ const data = await response.json();
+ if (data.valid) {
+ return NextResponse.next();
}
+ const redirectUrl = new URL('/error', request.url);
+ redirectUrl.searchParams.set(
+ 'type',
+ data.message === 'Session expired' ? 'expired-session' : 'invalid-session'
+ );
+ return NextResponse.redirect(redirectUrl);
+ } catch {
+ const redirectUrl = new URL('/error', request.url);
+ redirectUrl.searchParams.set('type', 'invalid-session');
+ return NextResponse.redirect(redirectUrl);
+ }
}
-
export const config = {
- matcher: '/receive/:path*',
-};
\ No newline at end of file
+ matcher: '/receive/:path*',
+};
diff --git a/peersync/client/src/services/Connection.ts b/peersync/client/src/services/Connection.ts
index 03e01fb..23f8042 100644
--- a/peersync/client/src/services/Connection.ts
+++ b/peersync/client/src/services/Connection.ts
@@ -1,174 +1,184 @@
-import { Socket, io } from "socket.io-client";
-import SimplePeer from "simple-peer";
-import { ConnectionCallbacks, PeerMode, TransferStatus } from "../types";
-import download from "downloadjs";
+import { Socket, io } from 'socket.io-client';
+import SimplePeer from 'simple-peer';
+import { ConnectionCallbacks, PeerMode, TransferStatus } from '../types';
+import download from 'downloadjs';
export class Connection {
- private peer: SimplePeer.Instance | null = null;
- private socket: Socket | null = null;
- private isConnected: boolean = false;
- private mode: PeerMode;
- private roomId: string;
- private targetId: string | null = null;
- private receivedChunks: Uint8Array[] = [];
- private readonly CHUNK_SIZE = 16 * 1024;
- private totalFileSize: number | null = null;
-
- constructor(roomId: string, mode: PeerMode) {
- this.roomId = roomId;
- this.mode = mode;
- }
-
- connect(callbacks: {
- onConnected: () => void,
- onProgress: (progress: number) => void,
- onStatus: (status: TransferStatus) => void
- }) {
- // Connect socket
- this.socket = io(process.env.NEXT_PUBLIC_SIGNALING_SERVER_URL,{
- transports: ['websocket'],
- });
- this.socket.on('connect_error', () => {
- callbacks.onStatus('connection-error');
- this.deleteSession();
- });
-
- this.socket.on('connect', () => {
- this.socket?.emit('join-room', this.roomId);
- });
-
- // Setup peer based on mode
- if (this.mode === 'sender') {
- this.socket.on('peer-joined', (peerId: string) => {
- this.targetId = peerId;
- this.createPeer(true, callbacks);
- });
- } else {
- this.socket.on('existing-peers', (peers: string[]) => {
- if (peers.length > 0) {
- this.targetId = peers[0];
- this.createPeer(false, callbacks);
- }
- });
+ private peer: SimplePeer.Instance | null = null;
+ private socket: Socket | null = null;
+ private isConnected: boolean = false;
+ private mode: PeerMode;
+ private roomId: string;
+ private targetId: string | null = null;
+ private receivedChunks: Uint8Array[] = [];
+ private readonly CHUNK_SIZE = 16 * 1024;
+ private totalFileSize: number | null = null;
+
+ constructor(roomId: string, mode: PeerMode) {
+ this.roomId = roomId;
+ this.mode = mode;
+ }
+
+ connect(callbacks: {
+ onConnected: () => void;
+ onProgress: (progress: number) => void;
+ onStatus: (status: TransferStatus) => void;
+ }) {
+ // Connect socket
+ this.socket = io(process.env.NEXT_PUBLIC_SIGNALING_SERVER_URL, {
+ transports: ['websocket'],
+ });
+ this.socket.on('connect_error', () => {
+ callbacks.onStatus('connection-error');
+ this.deleteSession();
+ });
+
+ this.socket.on('connect', () => {
+ this.socket?.emit('join-room', this.roomId);
+ });
+
+ // Setup peer based on mode
+ if (this.mode === 'sender') {
+ this.socket.on('peer-joined', (peerId: string) => {
+ this.targetId = peerId;
+ this.createPeer(true, callbacks);
+ });
+ } else {
+ this.socket.on('existing-peers', (peers: string[]) => {
+ if (peers.length > 0) {
+ this.targetId = peers[0];
+ this.createPeer(false, callbacks);
}
-
- // Handle signaling
- this.socket.on('signal', ({ signal }) => {
- this.peer?.signal(signal);
- });
+ });
}
- private createPeer(initiator: boolean, callbacks: ConnectionCallbacks) {
- const config = {
- initiator,
- config: {
- iceServers: [
- { urls: 'stun:stun.l.google.com:19302' },
- { urls: 'stun:stun1.l.google.com:19302' }
- ]
- }
- }
- this.peer = new SimplePeer(config);
-
- this.peer.on('signal', signal => {
- if (this.targetId) {
- this.socket?.emit('signal', {
- targetId: this.targetId,
- signal
- });
- }
- });
-
- this.peer.on('connect', () => {
- this.isConnected = true;
- callbacks.onConnected();
- });
-
- this.peer.on('data', (data) => this.handleData(data, callbacks));
-
- this.peer.on('error', () => {
- this.isConnected = false;
- callbacks.onStatus('connection-error');
- this.deleteSession();
+ // Handle signaling
+ this.socket.on('signal', ({ signal }) => {
+ this.peer?.signal(signal);
+ });
+ }
+
+ private createPeer(initiator: boolean, callbacks: ConnectionCallbacks) {
+ const config = {
+ initiator,
+ config: {
+ iceServers: [
+ { urls: 'stun:stun.l.google.com:19302' },
+ { urls: 'stun:stun1.l.google.com:19302' },
+ ],
+ },
+ };
+ this.peer = new SimplePeer(config);
+
+ this.peer.on('signal', (signal) => {
+ if (this.targetId) {
+ this.socket?.emit('signal', {
+ targetId: this.targetId,
+ signal,
});
- }
-
- async sendFile(file: File, onProgress: (progress: number) => void) {
+ }
+ });
+
+ this.peer.on('connect', () => {
+ this.isConnected = true;
+ callbacks.onConnected();
+ });
+
+ this.peer.on('data', (data) => this.handleData(data, callbacks));
+
+ this.peer.on('error', () => {
+ this.isConnected = false;
+ callbacks.onStatus('connection-error');
+ this.deleteSession();
+ });
+ }
+
+ async sendFile(file: File, onProgress: (progress: number) => void) {
+ if (!this.isConnected || !this.peer) return;
+
+ this.peer.send(
+ JSON.stringify({
+ totalSize: file.size,
+ })
+ );
+
+ let offset = 0;
+ const sendChunk = () => {
+ const slice = file.slice(offset, offset + this.CHUNK_SIZE);
+ const reader = new FileReader();
+
+ reader.onload = () => {
if (!this.isConnected || !this.peer) return;
-
- this.peer.send(JSON.stringify({
- totalSize: file.size
- }));
-
- let offset = 0;
- const sendChunk = () => {
- const slice = file.slice(offset, offset + this.CHUNK_SIZE);
- const reader = new FileReader();
-
- reader.onload = () => {
- if (!this.isConnected || !this.peer) return;
- if (reader.result instanceof ArrayBuffer) {
- this.peer?.send(new Uint8Array(reader.result));
- offset += slice.size;
- onProgress(offset / file.size);
-
- if (offset < file.size) {
- sendChunk();
- } else {
- this.peer?.send(JSON.stringify({
- done: true,
- name: file.name,
- type: file.type,
- }));
- }
- }
- };
- reader.readAsArrayBuffer(slice);
- };
-
- sendChunk();
- }
-
- private handleData(data: Uint8Array | string, callbacks: ConnectionCallbacks) {
- try {
- const parsed = JSON.parse(data.toString());
- if (parsed.done) {
- const blob = new Blob(this.receivedChunks, { type: parsed.type });
- download(blob, parsed.name);
- callbacks.onStatus('completed');
- this.receivedChunks = [];
- this.deleteSession();
- } else if (parsed.totalSize) {
- this.totalFileSize = parsed.totalSize;
- }
- } catch {
- if (data instanceof Uint8Array) {
- this.receivedChunks.push(data);
- if (this.totalFileSize) {
- const receivedSize = this.receivedChunks.reduce((acc, chunk) => acc + chunk.byteLength, 0);
- callbacks.onProgress(receivedSize / this.totalFileSize);
- }
- }
+ if (reader.result instanceof ArrayBuffer) {
+ this.peer?.send(new Uint8Array(reader.result));
+ offset += slice.size;
+ onProgress(offset / file.size);
+
+ if (offset < file.size) {
+ sendChunk();
+ } else {
+ this.peer?.send(
+ JSON.stringify({
+ done: true,
+ name: file.name,
+ type: file.type,
+ })
+ );
+ }
}
- }
-
- private async deleteSession() {
- if (this.mode !== 'sender') return;
- try {
- await fetch(`/api/sessions/delete/${this.roomId}`, {
- method: 'DELETE',
- });
- } catch (error) {
- console.error('Failed to delete session:', error);
- }
- }
-
- disconnect() {
- this.peer?.destroy();
- this.socket?.disconnect();
- this.isConnected = false;
- this.targetId = null;
+ };
+ reader.readAsArrayBuffer(slice);
+ };
+
+ sendChunk();
+ }
+
+ private handleData(
+ data: Uint8Array | string,
+ callbacks: ConnectionCallbacks
+ ) {
+ try {
+ const parsed = JSON.parse(data.toString());
+ if (parsed.done) {
+ const blob = new Blob(this.receivedChunks, { type: parsed.type });
+ download(blob, parsed.name);
+ callbacks.onStatus('completed');
this.receivedChunks = [];
this.deleteSession();
+ } else if (parsed.totalSize) {
+ this.totalFileSize = parsed.totalSize;
+ }
+ } catch {
+ if (data instanceof Uint8Array) {
+ this.receivedChunks.push(data);
+ if (this.totalFileSize) {
+ const receivedSize = this.receivedChunks.reduce(
+ (acc, chunk) => acc + chunk.byteLength,
+ 0
+ );
+ callbacks.onProgress(receivedSize / this.totalFileSize);
+ }
+ }
+ }
+ }
+
+ private async deleteSession() {
+ if (this.mode !== 'sender') return;
+ try {
+ await fetch(`/api/sessions/delete/${this.roomId}`, {
+ method: 'DELETE',
+ });
+ } catch (error) {
+ console.error('Failed to delete session:', error);
}
-}
\ No newline at end of file
+ }
+
+ disconnect() {
+ this.peer?.destroy();
+ this.socket?.disconnect();
+ this.isConnected = false;
+ this.targetId = null;
+ this.receivedChunks = [];
+ this.deleteSession();
+ }
+}
diff --git a/peersync/client/src/types/index.ts b/peersync/client/src/types/index.ts
index f28e79b..db7f935 100644
--- a/peersync/client/src/types/index.ts
+++ b/peersync/client/src/types/index.ts
@@ -2,42 +2,42 @@ import type SimplePeer from 'simple-peer';
// Basic shared types
export type PeerMode = 'sender' | 'receiver';
-export type TransferStatus = 'completed'| 'connection-error';
+export type TransferStatus = 'completed' | 'connection-error';
// For usePeerConnection hook
export interface UsePeerConnectionProps {
- sessionId: string | null;
- mode: PeerMode;
+ sessionId: string | null;
+ mode: PeerMode;
}
export interface UsePeerConnectionReturn {
- isConnected: boolean;
- sendFile: (file: File) => void;
- disconnect: () => void;
- receivedFileData: boolean;
- progress: number;
+ isConnected: boolean;
+ sendFile: (file: File) => void;
+ disconnect: () => void;
+ receivedFileData: boolean;
+ progress: number;
}
// For Connection class
export interface ConnectionCallbacks {
- onConnected: () => void;
- onProgress: (progress: number) => void;
- onStatus: (status: TransferStatus) => void;
+ onConnected: () => void;
+ onProgress: (progress: number) => void;
+ onStatus: (status: TransferStatus) => void;
}
export interface SignalData {
- targetId: string;
- signal: SimplePeer.SignalData;
+ targetId: string;
+ signal: SimplePeer.SignalData;
}
export interface PeerSignalData {
- peerId: string;
- signal: SimplePeer.SignalData;
+ peerId: string;
+ signal: SimplePeer.SignalData;
}
// Optional: If you want to type the metadata for file transfers
export interface FileMetadata {
- done: boolean;
- name: string;
- type: string;
-}
\ No newline at end of file
+ done: boolean;
+ name: string;
+ type: string;
+}
diff --git a/peersync/client/src/utils/chunking.ts b/peersync/client/src/utils/chunking.ts
index f221910..79bbed4 100644
--- a/peersync/client/src/utils/chunking.ts
+++ b/peersync/client/src/utils/chunking.ts
@@ -18,13 +18,16 @@ export function* getFileChunks(file: File) {
}
}
-export async function reconstructFile(chunks: Blob[], metadata: {
- fileName: string;
- fileType: string;
- fileSize: number;
-}) {
+export async function reconstructFile(
+ chunks: Blob[],
+ metadata: {
+ fileName: string;
+ fileType: string;
+ fileSize: number;
+ }
+) {
const file = new File(chunks, metadata.fileName, {
type: metadata.fileType,
});
return file;
-}
\ No newline at end of file
+}
diff --git a/peersync/client/src/utils/clipboard.ts b/peersync/client/src/utils/clipboard.ts
index 200588c..0865bb7 100644
--- a/peersync/client/src/utils/clipboard.ts
+++ b/peersync/client/src/utils/clipboard.ts
@@ -1,9 +1,9 @@
export async function copyToClipboard(text: string): Promise {
- try {
- await navigator.clipboard.writeText(text);
- return true;
- } catch (err) {
- console.error('Failed to copy text: ', err);
- return false;
- }
-}
\ No newline at end of file
+ try {
+ await navigator.clipboard.writeText(text);
+ return true;
+ } catch (err) {
+ console.error('Failed to copy text: ', err);
+ return false;
+ }
+}
diff --git a/peersync/client/tailwind.config.ts b/peersync/client/tailwind.config.ts
index 266c06d..2e92e03 100644
--- a/peersync/client/tailwind.config.ts
+++ b/peersync/client/tailwind.config.ts
@@ -1,62 +1,62 @@
-import type { Config } from "tailwindcss";
+import type { Config } from 'tailwindcss';
export default {
- darkMode: ["class"],
- content: [
- "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
- "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
- "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
+ darkMode: ['class'],
+ content: [
+ './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
+ './src/components/**/*.{js,ts,jsx,tsx,mdx}',
+ './src/app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
- extend: {
- colors: {
- background: 'hsl(var(--background))',
- foreground: 'hsl(var(--foreground))',
- card: {
- DEFAULT: 'hsl(var(--card))',
- foreground: 'hsl(var(--card-foreground))'
- },
- popover: {
- DEFAULT: 'hsl(var(--popover))',
- foreground: 'hsl(var(--popover-foreground))'
- },
- primary: {
- DEFAULT: 'hsl(var(--primary))',
- foreground: 'hsl(var(--primary-foreground))'
- },
- secondary: {
- DEFAULT: 'hsl(var(--secondary))',
- foreground: 'hsl(var(--secondary-foreground))'
- },
- muted: {
- DEFAULT: 'hsl(var(--muted))',
- foreground: 'hsl(var(--muted-foreground))'
- },
- accent: {
- DEFAULT: 'hsl(var(--accent))',
- foreground: 'hsl(var(--accent-foreground))'
- },
- destructive: {
- DEFAULT: 'hsl(var(--destructive))',
- foreground: 'hsl(var(--destructive-foreground))'
- },
- border: 'hsl(var(--border))',
- input: 'hsl(var(--input))',
- ring: 'hsl(var(--ring))',
- chart: {
- '1': 'hsl(var(--chart-1))',
- '2': 'hsl(var(--chart-2))',
- '3': 'hsl(var(--chart-3))',
- '4': 'hsl(var(--chart-4))',
- '5': 'hsl(var(--chart-5))'
- }
- },
- borderRadius: {
- lg: 'var(--radius)',
- md: 'calc(var(--radius) - 2px)',
- sm: 'calc(var(--radius) - 4px)'
- }
- }
+ extend: {
+ colors: {
+ background: 'hsl(var(--background))',
+ foreground: 'hsl(var(--foreground))',
+ card: {
+ DEFAULT: 'hsl(var(--card))',
+ foreground: 'hsl(var(--card-foreground))',
+ },
+ popover: {
+ DEFAULT: 'hsl(var(--popover))',
+ foreground: 'hsl(var(--popover-foreground))',
+ },
+ primary: {
+ DEFAULT: 'hsl(var(--primary))',
+ foreground: 'hsl(var(--primary-foreground))',
+ },
+ secondary: {
+ DEFAULT: 'hsl(var(--secondary))',
+ foreground: 'hsl(var(--secondary-foreground))',
+ },
+ muted: {
+ DEFAULT: 'hsl(var(--muted))',
+ foreground: 'hsl(var(--muted-foreground))',
+ },
+ accent: {
+ DEFAULT: 'hsl(var(--accent))',
+ foreground: 'hsl(var(--accent-foreground))',
+ },
+ destructive: {
+ DEFAULT: 'hsl(var(--destructive))',
+ foreground: 'hsl(var(--destructive-foreground))',
+ },
+ border: 'hsl(var(--border))',
+ input: 'hsl(var(--input))',
+ ring: 'hsl(var(--ring))',
+ chart: {
+ '1': 'hsl(var(--chart-1))',
+ '2': 'hsl(var(--chart-2))',
+ '3': 'hsl(var(--chart-3))',
+ '4': 'hsl(var(--chart-4))',
+ '5': 'hsl(var(--chart-5))',
+ },
+ },
+ borderRadius: {
+ lg: 'var(--radius)',
+ md: 'calc(var(--radius) - 2px)',
+ sm: 'calc(var(--radius) - 4px)',
+ },
+ },
},
- plugins: [require("tailwindcss-animate")],
+ plugins: [require('tailwindcss-animate')],
} satisfies Config;
diff --git a/peersync/client/tsconfig.json b/peersync/client/tsconfig.json
index 524b6ce..23b959a 100644
--- a/peersync/client/tsconfig.json
+++ b/peersync/client/tsconfig.json
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "ES2017",
- "lib": [
- "dom",
- "dom.iterable",
- "esnext"
- ],
+ "lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
@@ -23,9 +19,7 @@
}
],
"paths": {
- "@/*": [
- "./src/*"
- ]
+ "@/*": ["./src/*"]
}
},
"include": [
@@ -35,7 +29,5 @@
"next-env.d.ts",
".next/types/**/*.ts"
],
- "exclude": [
- "node_modules"
- ]
+ "exclude": ["node_modules"]
}
diff --git a/peersync/node_modules/.bin/prettier b/peersync/node_modules/.bin/prettier
new file mode 100755
index 0000000..7210f07
--- /dev/null
+++ b/peersync/node_modules/.bin/prettier
@@ -0,0 +1,17 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -z "$NODE_PATH" ]; then
+ export NODE_PATH="/Users/samgoyal/PeerSync/peersync/node_modules/.pnpm/prettier@3.4.2/node_modules/prettier/bin/node_modules:/Users/samgoyal/PeerSync/peersync/node_modules/.pnpm/prettier@3.4.2/node_modules/prettier/node_modules:/Users/samgoyal/PeerSync/peersync/node_modules/.pnpm/prettier@3.4.2/node_modules:/Users/samgoyal/PeerSync/peersync/node_modules/.pnpm/node_modules"
+else
+ export NODE_PATH="/Users/samgoyal/PeerSync/peersync/node_modules/.pnpm/prettier@3.4.2/node_modules/prettier/bin/node_modules:/Users/samgoyal/PeerSync/peersync/node_modules/.pnpm/prettier@3.4.2/node_modules/prettier/node_modules:/Users/samgoyal/PeerSync/peersync/node_modules/.pnpm/prettier@3.4.2/node_modules:/Users/samgoyal/PeerSync/peersync/node_modules/.pnpm/node_modules:$NODE_PATH"
+fi
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../prettier/bin/prettier.cjs" "$@"
+else
+ exec node "$basedir/../prettier/bin/prettier.cjs" "$@"
+fi
diff --git a/peersync/node_modules/.modules.yaml b/peersync/node_modules/.modules.yaml
index e0bafe7..ab87061 100644
--- a/peersync/node_modules/.modules.yaml
+++ b/peersync/node_modules/.modules.yaml
@@ -10,7 +10,7 @@ layoutVersion: 5
nodeLinker: isolated
packageManager: pnpm@9.15.0
pendingBuilds: []
-prunedAt: Mon, 20 Jan 2025 01:52:32 GMT
+prunedAt: Wed, 29 Jan 2025 01:24:58 GMT
publicHoistPattern:
- '*eslint*'
- '*prettier*'
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/LICENSE b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/LICENSE
deleted file mode 100644
index fa0086a..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/LICENSE
+++ /dev/null
@@ -1,373 +0,0 @@
-Mozilla Public License Version 2.0
-==================================
-
-1. Definitions
---------------
-
-1.1. "Contributor"
- means each individual or legal entity that creates, contributes to
- the creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
- means the combination of the Contributions of others (if any) used
- by a Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
- means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
- means Source Code Form to which the initial Contributor has attached
- the notice in Exhibit A, the Executable Form of such Source Code
- Form, and Modifications of such Source Code Form, in each case
- including portions thereof.
-
-1.5. "Incompatible With Secondary Licenses"
- means
-
- (a) that the initial Contributor has attached the notice described
- in Exhibit B to the Covered Software; or
-
- (b) that the Covered Software was made available under the terms of
- version 1.1 or earlier of the License, but not also under the
- terms of a Secondary License.
-
-1.6. "Executable Form"
- means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
- means a work that combines Covered Software with other material, in
- a separate file or files, that is not Covered Software.
-
-1.8. "License"
- means this document.
-
-1.9. "Licensable"
- means having the right to grant, to the maximum extent possible,
- whether at the time of the initial grant or subsequently, any and
- all of the rights conveyed by this License.
-
-1.10. "Modifications"
- means any of the following:
-
- (a) any file in Source Code Form that results from an addition to,
- deletion from, or modification of the contents of Covered
- Software; or
-
- (b) any new file in Source Code Form that contains any Covered
- Software.
-
-1.11. "Patent Claims" of a Contributor
- means any patent claim(s), including without limitation, method,
- process, and apparatus claims, in any patent Licensable by such
- Contributor that would be infringed, but for the grant of the
- License, by the making, using, selling, offering for sale, having
- made, import, or transfer of either its Contributions or its
- Contributor Version.
-
-1.12. "Secondary License"
- means either the GNU General Public License, Version 2.0, the GNU
- Lesser General Public License, Version 2.1, the GNU Affero General
- Public License, Version 3.0, or any later versions of those
- licenses.
-
-1.13. "Source Code Form"
- means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
- means an individual or a legal entity exercising rights under this
- License. For legal entities, "You" includes any entity that
- controls, is controlled by, or is under common control with You. For
- purposes of this definition, "control" means (a) the power, direct
- or indirect, to cause the direction or management of such entity,
- whether by contract or otherwise, or (b) ownership of more than
- fifty percent (50%) of the outstanding shares or beneficial
- ownership of such entity.
-
-2. License Grants and Conditions
---------------------------------
-
-2.1. Grants
-
-Each Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark)
- Licensable by such Contributor to use, reproduce, make available,
- modify, display, perform, distribute, and otherwise exploit its
- Contributions, either on an unmodified basis, with Modifications, or
- as part of a Larger Work; and
-
-(b) under Patent Claims of such Contributor to make, use, sell, offer
- for sale, have made, import, and otherwise transfer either its
- Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-The licenses granted in Section 2.1 with respect to any Contribution
-become effective for each Contribution on the date the Contributor first
-distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-The licenses granted in this Section 2 are the only rights granted under
-this License. No additional rights or licenses will be implied from the
-distribution or licensing of Covered Software under this License.
-Notwithstanding Section 2.1(b) above, no patent license is granted by a
-Contributor:
-
-(a) for any code that a Contributor has removed from Covered Software;
- or
-
-(b) for infringements caused by: (i) Your and any other third party's
- modifications of Covered Software, or (ii) the combination of its
- Contributions with other software (except as part of its Contributor
- Version); or
-
-(c) under Patent Claims infringed by Covered Software in the absence of
- its Contributions.
-
-This License does not grant any rights in the trademarks, service marks,
-or logos of any Contributor (except as may be necessary to comply with
-the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-No Contributor makes additional grants as a result of Your choice to
-distribute the Covered Software under a subsequent version of this
-License (see Section 10.2) or under the terms of a Secondary License (if
-permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-Each Contributor represents that the Contributor believes its
-Contributions are its original creation(s) or it has sufficient rights
-to grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-This License is not intended to limit any rights You have under
-applicable copyright doctrines of fair use, fair dealing, or other
-equivalents.
-
-2.7. Conditions
-
-Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
-in Section 2.1.
-
-3. Responsibilities
--------------------
-
-3.1. Distribution of Source Form
-
-All distribution of Covered Software in Source Code Form, including any
-Modifications that You create or to which You contribute, must be under
-the terms of this License. You must inform recipients that the Source
-Code Form of the Covered Software is governed by the terms of this
-License, and how they can obtain a copy of this License. You may not
-attempt to alter or restrict the recipients' rights in the Source Code
-Form.
-
-3.2. Distribution of Executable Form
-
-If You distribute Covered Software in Executable Form then:
-
-(a) such Covered Software must also be made available in Source Code
- Form, as described in Section 3.1, and You must inform recipients of
- the Executable Form how they can obtain a copy of such Source Code
- Form by reasonable means in a timely manner, at a charge no more
- than the cost of distribution to the recipient; and
-
-(b) You may distribute such Executable Form under the terms of this
- License, or sublicense it under different terms, provided that the
- license for the Executable Form does not attempt to limit or alter
- the recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-You may create and distribute a Larger Work under terms of Your choice,
-provided that You also comply with the requirements of this License for
-the Covered Software. If the Larger Work is a combination of Covered
-Software with a work governed by one or more Secondary Licenses, and the
-Covered Software is not Incompatible With Secondary Licenses, this
-License permits You to additionally distribute such Covered Software
-under the terms of such Secondary License(s), so that the recipient of
-the Larger Work may, at their option, further distribute the Covered
-Software under the terms of either this License or such Secondary
-License(s).
-
-3.4. Notices
-
-You may not remove or alter the substance of any license notices
-(including copyright notices, patent notices, disclaimers of warranty,
-or limitations of liability) contained within the Source Code Form of
-the Covered Software, except that You may alter any license notices to
-the extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-You may choose to offer, and to charge a fee for, warranty, support,
-indemnity or liability obligations to one or more recipients of Covered
-Software. However, You may do so only on Your own behalf, and not on
-behalf of any Contributor. You must make it absolutely clear that any
-such warranty, support, indemnity, or liability obligation is offered by
-You alone, and You hereby agree to indemnify every Contributor for any
-liability incurred by such Contributor as a result of warranty, support,
-indemnity or liability terms You offer. You may include additional
-disclaimers of warranty and limitations of liability specific to any
-jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
----------------------------------------------------
-
-If it is impossible for You to comply with any of the terms of this
-License with respect to some or all of the Covered Software due to
-statute, judicial order, or regulation then You must: (a) comply with
-the terms of this License to the maximum extent possible; and (b)
-describe the limitations and the code they affect. Such description must
-be placed in a text file included with all distributions of the Covered
-Software under this License. Except to the extent prohibited by statute
-or regulation, such description must be sufficiently detailed for a
-recipient of ordinary skill to be able to understand it.
-
-5. Termination
---------------
-
-5.1. The rights granted under this License will terminate automatically
-if You fail to comply with any of its terms. However, if You become
-compliant, then the rights granted under this License from a particular
-Contributor are reinstated (a) provisionally, unless and until such
-Contributor explicitly and finally terminates Your grants, and (b) on an
-ongoing basis, if such Contributor fails to notify You of the
-non-compliance by some reasonable means prior to 60 days after You have
-come back into compliance. Moreover, Your grants from a particular
-Contributor are reinstated on an ongoing basis if such Contributor
-notifies You of the non-compliance by some reasonable means, this is the
-first time You have received notice of non-compliance with this License
-from such Contributor, and You become compliant prior to 30 days after
-Your receipt of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-infringement claim (excluding declaratory judgment actions,
-counter-claims, and cross-claims) alleging that a Contributor Version
-directly or indirectly infringes any patent, then the rights granted to
-You by any and all Contributors for the Covered Software under Section
-2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all
-end user license agreements (excluding distributors and resellers) which
-have been validly granted by You or Your distributors under this License
-prior to termination shall survive termination.
-
-************************************************************************
-* *
-* 6. Disclaimer of Warranty *
-* ------------------------- *
-* *
-* Covered Software is provided under this License on an "as is" *
-* basis, without warranty of any kind, either expressed, implied, or *
-* statutory, including, without limitation, warranties that the *
-* Covered Software is free of defects, merchantable, fit for a *
-* particular purpose or non-infringing. The entire risk as to the *
-* quality and performance of the Covered Software is with You. *
-* Should any Covered Software prove defective in any respect, You *
-* (not any Contributor) assume the cost of any necessary servicing, *
-* repair, or correction. This disclaimer of warranty constitutes an *
-* essential part of this License. No use of any Covered Software is *
-* authorized under this License except under this disclaimer. *
-* *
-************************************************************************
-
-************************************************************************
-* *
-* 7. Limitation of Liability *
-* -------------------------- *
-* *
-* Under no circumstances and under no legal theory, whether tort *
-* (including negligence), contract, or otherwise, shall any *
-* Contributor, or anyone who distributes Covered Software as *
-* permitted above, be liable to You for any direct, indirect, *
-* special, incidental, or consequential damages of any character *
-* including, without limitation, damages for lost profits, loss of *
-* goodwill, work stoppage, computer failure or malfunction, or any *
-* and all other commercial damages or losses, even if such party *
-* shall have been informed of the possibility of such damages. This *
-* limitation of liability shall not apply to liability for death or *
-* personal injury resulting from such party's negligence to the *
-* extent applicable law prohibits such limitation. Some *
-* jurisdictions do not allow the exclusion or limitation of *
-* incidental or consequential damages, so this exclusion and *
-* limitation may not apply to You. *
-* *
-************************************************************************
-
-8. Litigation
--------------
-
-Any litigation relating to this License may be brought only in the
-courts of a jurisdiction where the defendant maintains its principal
-place of business and such litigation shall be governed by laws of that
-jurisdiction, without reference to its conflict-of-law provisions.
-Nothing in this Section shall prevent a party's ability to bring
-cross-claims or counter-claims.
-
-9. Miscellaneous
-----------------
-
-This License represents the complete agreement concerning the subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent
-necessary to make it enforceable. Any law or regulation which provides
-that the language of a contract shall be construed against the drafter
-shall not be used to construe this License against a Contributor.
-
-10. Versions of the License
----------------------------
-
-10.1. New Versions
-
-Mozilla Foundation is the license steward. Except as provided in Section
-10.3, no one other than the license steward has the right to modify or
-publish new versions of this License. Each version will be given a
-distinguishing version number.
-
-10.2. Effect of New Versions
-
-You may distribute the Covered Software under the terms of the version
-of the License under which You originally received the Covered Software,
-or under the terms of any subsequent version published by the license
-steward.
-
-10.3. Modified Versions
-
-If you create software not governed by this License, and you want to
-create a new license for such software, you may create and use a
-modified version of this License if you rename the license and remove
-any references to the name of the license steward (except to note that
-such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-Licenses
-
-If You choose to distribute Source Code Form that is Incompatible With
-Secondary Licenses under the terms of this version of the License, the
-notice described in Exhibit B of this License must be attached.
-
-Exhibit A - Source Code Form License Notice
--------------------------------------------
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular
-file, then You may include the notice in a location (such as a LICENSE
-file in a relevant directory) where a recipient would be likely to look
-for such a notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
----------------------------------------------------------
-
- This Source Code Form is "Incompatible With Secondary Licenses", as
- defined by the Mozilla Public License, v. 2.0.
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/README.md b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/README.md
deleted file mode 100644
index 043e285..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-Vercel Web Analytics
-Privacy-friendly, real-time traffic insights
-
-
-
-## Overview
-
-`@vercel/analytics` allows you to track page views and custom events in your Next.js app or any other website that is deployed to Vercel.
-
-All page views are automatically tracked in your app.
-
-This package does **not** track data in development mode.
-
-## Quickstart
-
-1. Enable Vercel Web Analytics for a project in the [Vercel Dashboard](https://vercel.com/dashboard).
-2. Add the `@vercel/analytics` package to your project
-3. Inject the Analytics script to your app
-
- - If you are using **Next.js** or **React**, you can use the `` component to inject the script into your app.
- - To add the tracking script for other frameworks, use the `inject` function.
- - If you want to use Vercel Web Analytics on a static site without npm, follow the instructions in the [documentation](https://vercel.com/docs/analytics/quickstart).
-
-4. Deploy your app to Vercel and see data flowing in.
-
-## Documentation
-
-Find more details about this package in our [documentation](https://vercel.com/docs/analytics/quickstart).
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/astro/component.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/astro/component.ts
deleted file mode 100644
index 5e390a5..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/astro/component.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-// @ts-expect-error typescript doesn't handle ./index.astro properly, but it's needed to generate types
-// eslint-disable-next-line import/no-default-export, no-useless-rename -- Exporting everything doesn't yield the desired outcome
-export { default as default } from './index.astro';
-export type {
- AnalyticsProps,
- BeforeSend,
- BeforeSendEvent,
- // @ts-expect-error this filed is copied to dist, so it's ok to reference the generated index.d.ts
-} from '../index.d.ts';
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/astro/index.astro b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/astro/index.astro
deleted file mode 100644
index 37078de..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/astro/index.astro
+++ /dev/null
@@ -1,40 +0,0 @@
----
-// Since this file will not be bundled by Tsup, it is referencing bundled files relative to dist/astro/
-import type { AnalyticsProps } from '../index.d.ts';
-type Props = Omit;
-
-const propsStr = JSON.stringify(Astro.props);
-const paramsStr = JSON.stringify(Astro.params);
----
-
-
-
-
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.d.mts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.d.mts
deleted file mode 100644
index 42c0e5d..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.d.mts
+++ /dev/null
@@ -1,74 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type AllowedPropertyValues = string | number | boolean | null;
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-type PlainFlags = Record;
-type FlagsDataInput = (string | PlainFlags)[] | PlainFlags;
-
-declare function computeRoute(pathname: string | null, pathParams: Record | null): string | null;
-
-declare const DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-declare const PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-/**
- * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).
- * @param [props] - Analytics options.
- * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.
- * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.
- * - `production` - Always use the production script. (Sends events to the server)
- * - `development` - Always use the development script. (Logs events to the console)
- * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.
- * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.
- * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.
- * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().
- */
-declare function inject(props?: AnalyticsProps & {
- framework?: string;
- disableAutoTrack?: boolean;
-}): void;
-/**
- * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.
- * @param name - The name of the event.
- * * Examples: `Purchase`, `Click Button`, or `Play Video`.
- * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.
- */
-declare function track(name: string, properties?: Record, options?: {
- flags?: FlagsDataInput;
-}): void;
-declare function pageview({ route, path, }: {
- route?: string | null;
- path?: string;
-}): void;
-
-declare const _default: {
- inject: typeof inject;
- track: typeof track;
- computeRoute: typeof computeRoute;
-};
-
-export { AnalyticsProps, BeforeSend, BeforeSendEvent, DEV_SCRIPT_URL, PROD_SCRIPT_URL, computeRoute, _default as default, inject, pageview, track };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.d.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.d.ts
deleted file mode 100644
index 42c0e5d..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.d.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type AllowedPropertyValues = string | number | boolean | null;
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-type PlainFlags = Record;
-type FlagsDataInput = (string | PlainFlags)[] | PlainFlags;
-
-declare function computeRoute(pathname: string | null, pathParams: Record | null): string | null;
-
-declare const DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-declare const PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-/**
- * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).
- * @param [props] - Analytics options.
- * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.
- * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.
- * - `production` - Always use the production script. (Sends events to the server)
- * - `development` - Always use the development script. (Logs events to the console)
- * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.
- * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.
- * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.
- * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().
- */
-declare function inject(props?: AnalyticsProps & {
- framework?: string;
- disableAutoTrack?: boolean;
-}): void;
-/**
- * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.
- * @param name - The name of the event.
- * * Examples: `Purchase`, `Click Button`, or `Play Video`.
- * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.
- */
-declare function track(name: string, properties?: Record, options?: {
- flags?: FlagsDataInput;
-}): void;
-declare function pageview({ route, path, }: {
- route?: string | null;
- path?: string;
-}): void;
-
-declare const _default: {
- inject: typeof inject;
- track: typeof track;
- computeRoute: typeof computeRoute;
-};
-
-export { AnalyticsProps, BeforeSend, BeforeSendEvent, DEV_SCRIPT_URL, PROD_SCRIPT_URL, computeRoute, _default as default, inject, pageview, track };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.js
deleted file mode 100644
index c308426..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.js
+++ /dev/null
@@ -1,231 +0,0 @@
-"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 name2 in all)
- __defProp(target, name2, { get: all[name2], 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/generic.ts
-var generic_exports = {};
-__export(generic_exports, {
- DEV_SCRIPT_URL: () => DEV_SCRIPT_URL,
- PROD_SCRIPT_URL: () => PROD_SCRIPT_URL,
- computeRoute: () => computeRoute,
- default: () => generic_default,
- inject: () => inject,
- pageview: () => pageview,
- track: () => track
-});
-module.exports = __toCommonJS(generic_exports);
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isProduction() {
- return getMode() === "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function removeKey(key, { [key]: _, ...rest }) {
- return rest;
-}
-function parseProperties(properties, options) {
- if (!properties)
- return void 0;
- let props = properties;
- const errorProperties = [];
- for (const [key, value] of Object.entries(properties)) {
- if (typeof value === "object" && value !== null) {
- if (options.strip) {
- props = removeKey(key, props);
- } else {
- errorProperties.push(key);
- }
- }
- }
- if (errorProperties.length > 0 && !options.strip) {
- throw Error(
- `The following properties are not valid: ${errorProperties.join(
- ", "
- )}. Only strings, numbers, booleans, and null are allowed.`
- );
- }
- return props;
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function track(name2, properties, options) {
- var _a, _b;
- if (!isBrowser()) {
- const msg = "[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";
- if (isProduction()) {
- console.warn(msg);
- } else {
- throw new Error(msg);
- }
- return;
- }
- if (!properties) {
- (_a = window.va) == null ? void 0 : _a.call(window, "event", { name: name2, options });
- return;
- }
- try {
- const props = parseProperties(properties, {
- strip: isProduction()
- });
- (_b = window.va) == null ? void 0 : _b.call(window, "event", {
- name: name2,
- data: props,
- options
- });
- } catch (err) {
- if (err instanceof Error && isDevelopment()) {
- console.error(err);
- }
- }
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-var generic_default = {
- inject,
- track,
- computeRoute
-};
-// Annotate the CommonJS export names for ESM import in node:
-0 && (module.exports = {
- DEV_SCRIPT_URL,
- PROD_SCRIPT_URL,
- computeRoute,
- inject,
- pageview,
- track
-});
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.js.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.js.map
deleted file mode 100644
index 47ee2e6..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../src/generic.ts","../package.json","../src/queue.ts","../src/utils.ts"],"sourcesContent":["import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCE,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,SAAS,GAAG;AAAA,EAEZ;AACA,SAAO;AACT;AAEO,SAAS,QAAQ,OAAa,QAAc;AACjD,MAAI,SAAS,QAAQ;AACnB,WAAO,MAAM,kBAAkB;AAC/B;AAAA,EACF;AAEA,SAAO,MAAM;AACf;AAEO,SAAS,UAAgB;AAC9B,QAAM,OAAO,UAAU,IAAI,OAAO,MAAM,kBAAkB;AAC1D,SAAO,QA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OAAO;AAC5C,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;AAQA,SAAS,MACPA,OACA,YACA,SAGM;AAxGR;AAyGE,MAAI,CAAC,UAAU,GAAG;AAChB,UAAM,MACJ;AAEF,QAAI,aAAa,GAAG;AAElB,cAAQ,KAAK,GAAG;AAAA,IAClB,OAAO;AACL,YAAM,IAAI,MAAM,GAAG;AAAA,IACrB;AAEA;AAAA,EACF;AAEA,MAAI,CAAC,YAAY;AACf,iBAAO,OAAP,gCAAY,SAAS,EAAE,MAAAA,OAAM,QAAQ;AACrC;AAAA,EACF;AAEA,MAAI;AACF,UAAM,QAAQ,gBAAgB,YAAY;AAAA,MACxC,OAAO,aAAa;AAAA,IACtB,CAAC;AAED,iBAAO,OAAP,gCAAY,SAAS;AAAA,MACnB,MAAAA;AAAA,MACA,MAAM;AAAA,MACN;AAAA,IACF;AAAA,EACF,SAAS,KAAK;AACZ,QAAI,eAAe,SAAS,cAAc,GAAG;AAE3C,cAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF;AAEA,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AACF,GAGS;AApJT;AAqJE,eAAO,OAAP,gCAAY,YAAY,EAAE,OAAO,KAAK;AACxC;AAMA,IAAO,kBAAQ;AAAA,EACb;AAAA,EACA;AAAA,EACA;AACF;","names":["name"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.mjs b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.mjs
deleted file mode 100644
index d8e25e7..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.mjs
+++ /dev/null
@@ -1,199 +0,0 @@
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isProduction() {
- return getMode() === "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function removeKey(key, { [key]: _, ...rest }) {
- return rest;
-}
-function parseProperties(properties, options) {
- if (!properties)
- return void 0;
- let props = properties;
- const errorProperties = [];
- for (const [key, value] of Object.entries(properties)) {
- if (typeof value === "object" && value !== null) {
- if (options.strip) {
- props = removeKey(key, props);
- } else {
- errorProperties.push(key);
- }
- }
- }
- if (errorProperties.length > 0 && !options.strip) {
- throw Error(
- `The following properties are not valid: ${errorProperties.join(
- ", "
- )}. Only strings, numbers, booleans, and null are allowed.`
- );
- }
- return props;
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function track(name2, properties, options) {
- var _a, _b;
- if (!isBrowser()) {
- const msg = "[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";
- if (isProduction()) {
- console.warn(msg);
- } else {
- throw new Error(msg);
- }
- return;
- }
- if (!properties) {
- (_a = window.va) == null ? void 0 : _a.call(window, "event", { name: name2, options });
- return;
- }
- try {
- const props = parseProperties(properties, {
- strip: isProduction()
- });
- (_b = window.va) == null ? void 0 : _b.call(window, "event", {
- name: name2,
- data: props,
- options
- });
- } catch (err) {
- if (err instanceof Error && isDevelopment()) {
- console.error(err);
- }
- }
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-var generic_default = {
- inject,
- track,
- computeRoute
-};
-export {
- DEV_SCRIPT_URL,
- PROD_SCRIPT_URL,
- computeRoute,
- generic_default as default,
- inject,
- pageview,
- track
-};
-//# sourceMappingURL=index.mjs.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.mjs.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.mjs.map
deleted file mode 100644
index 91f1828..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/index.mjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../package.json","../src/queue.ts","../src/utils.ts","../src/generic.ts"],"sourcesContent":["{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n"],"mappings":";AACE,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,SAAS,GAAG;AAAA,EAEZ;AACA,SAAO;AACT;AAEO,SAAS,QAAQ,O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M;AAAA,EAC7B;AAEA,SAAO,UAAU,MAAY;AAC3B,UAAM,eAAe,cAAc,IAC/B,+DACA;AAGJ,YAAQ;AAAA,MACN,qDAAqD,GAAG,KAAK,YAAY;AAAA,IAC3E;AAAA,EACF;AAEA,MAAI,cAAc,KAAK,MAAM,UAAU,OAAO;AAC5C,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;AAQA,SAAS,MACPA,OACA,YACA,SAGM;AAxGR;AAyGE,MAAI,CAAC,UAAU,GAAG;AAChB,UAAM,MACJ;AAEF,QAAI,aAAa,GAAG;AAElB,cAAQ,KAAK,GAAG;AAAA,IAClB,OAAO;AACL,YAAM,IAAI,MAAM,GAAG;AAAA,IACrB;AAEA;AAAA,EACF;AAEA,MAAI,CAAC,YAAY;AACf,iBAAO,OAAP,gCAAY,SAAS,EAAE,MAAAA,OAAM,QAAQ;AACrC;AAAA,EACF;AAEA,MAAI;AACF,UAAM,QAAQ,gBAAgB,YAAY;AAAA,MACxC,OAAO,aAAa;AAAA,IACtB,CAAC;AAED,iBAAO,OAAP,gCAAY,SAAS;AAAA,MACnB,MAAAA;AAAA,MACA,MAAM;AAAA,MACN;AAAA,IACF;AAAA,EACF,SAAS,KAAK;AACZ,QAAI,eAAe,SAAS,cAAc,GAAG;AAE3C,cAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF;AAEA,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AACF,GAGS;AApJT;AAqJE,eAAO,OAAP,gCAAY,YAAY,EAAE,OAAO,KAAK;AACxC;AAMA,IAAO,kBAAQ;AAAA,EACb;AAAA,EACA;AAAA,EACA;AACF;","names":["name"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.d.mts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.d.mts
deleted file mode 100644
index 28fa5c5..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.d.mts
+++ /dev/null
@@ -1,34 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-
-type Props = Omit;
-declare function Analytics(props: Props): null;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.d.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.d.ts
deleted file mode 100644
index 28fa5c5..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.d.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-
-type Props = Omit;
-declare function Analytics(props: Props): null;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.js
deleted file mode 100644
index 0bba81e..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.js
+++ /dev/null
@@ -1,216 +0,0 @@
-"use client";
-"use strict";
-var __create = Object.create;
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getProtoOf = Object.getPrototypeOf;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name2 in all)
- __defProp(target, name2, { get: all[name2], 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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
- // If the importer is in node compatibility mode or this is not an ESM
- // file that has been converted to a CommonJS file using a Babel-
- // compatible transform (i.e. "__esModule" has not been set), then set
- // "default" to the CommonJS "module.exports" for node compatibility.
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
- mod
-));
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
-
-// src/nextjs/index.tsx
-var nextjs_exports = {};
-__export(nextjs_exports, {
- Analytics: () => Analytics2
-});
-module.exports = __toCommonJS(nextjs_exports);
-var import_react2 = __toESM(require("react"));
-
-// src/react.tsx
-var import_react = require("react");
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/react.tsx
-function Analytics(props) {
- (0, import_react.useEffect)(() => {
- var _a;
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- }, [props.beforeSend]);
- (0, import_react.useEffect)(() => {
- inject({
- framework: props.framework || "react",
- ...props.route !== void 0 && { disableAutoTrack: true },
- ...props
- });
- }, []);
- (0, import_react.useEffect)(() => {
- if (props.route && props.path) {
- pageview({ route: props.route, path: props.path });
- }
- }, [props.route, props.path]);
- return null;
-}
-
-// src/nextjs/utils.ts
-var import_navigation = require("next/navigation.js");
-var useRoute = () => {
- const params = (0, import_navigation.useParams)();
- const searchParams = (0, import_navigation.useSearchParams)();
- const path = (0, import_navigation.usePathname)();
- if (!params) {
- return { route: null, path };
- }
- const finalParams = Object.keys(params).length ? params : Object.fromEntries(searchParams.entries());
- return { route: computeRoute(path, finalParams), path };
-};
-
-// src/nextjs/index.tsx
-function AnalyticsComponent(props) {
- const { route, path } = useRoute();
- return /* @__PURE__ */ import_react2.default.createElement(Analytics, { path, route, ...props, framework: "next" });
-}
-function Analytics2(props) {
- return /* @__PURE__ */ import_react2.default.createElement(import_react2.Suspense, { fallback: null }, /* @__PURE__ */ import_react2.default.createElement(AnalyticsComponent, { ...props }));
-}
-// Annotate the CommonJS export names for ESM import in node:
-0 && (module.exports = {
- Analytics
-});
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.js.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.js.map
deleted file mode 100644
index 1f0c674..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/nextjs/index.tsx","../../src/react.tsx","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts","../../src/nextjs/utils.ts"],"sourcesContent":["import React, { Suspense, type ReactNode } from 'react';\nimport { Analytics as AnalyticsScript } from '../react';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { useRoute } from './utils';\n\ntype Props = Omit;\n\nfunction AnalyticsComponent(props: Props): ReactNode {\n const { route, path } = useRoute();\n return (\n \n );\n}\n\nexport function Analytics(props: Props): null {\n // Because of incompatible types between ReactNode in React 19 and React 18 we return null (which is also what we render)\n return (\n \n \n \n ) as never;\n}\n\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","'use client';\nimport { useEffect } from 'react';\nimport { inject, track, pageview } from './generic';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from './types';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @example\n * ```js\n * import { Analytics } from '@vercel/analytics/react';\n *\n * export default function App() {\n * return (\n * \n * );\n * }\n * ```\n */\nfunction Analytics(\n props: AnalyticsProps & {\n framework?: string;\n route?: string | null;\n path?: string | null;\n }\n): null {\n useEffect(() => {\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n }, [props.beforeSend]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: only run once\n useEffect(() => {\n inject({\n framework: props.framework || 'react',\n ...(props.route !== undefined && { disableAutoTrack: true }),\n ...props,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only run once\n }, []);\n\n useEffect(() => {\n // explicitely track page view, since we disabled auto tracking\n if (props.route && props.path) {\n pageview({ route: props.route, path: props.path });\n }\n }, [props.route, props.path]);\n\n return null;\n}\n\nexport { track, Analytics };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n","'use client';\n/* eslint-disable @typescript-eslint/no-unnecessary-condition -- can be empty in pages router */\nimport { useParams, usePathname, useSearchParams } from 'next/navigation.js';\nimport { computeRoute } from '../utils';\n\nexport const useRoute = (): {\n route: string | null;\n path: string;\n} => {\n const params = useParams();\n const searchParams = useSearchParams();\n const path = usePathname();\n\n // Until we have route parameters, we don't compute the route\n if (!params) {\n return { route: null, path };\n }\n // in Next.js@13, useParams() could return an empty object for pages router, and we default to searchParams.\n const finalParams = Object.keys(params).length\n ? params\n : Object.fromEntries(searchParams.entries());\n return { route: computeRoute(path, finalParams), path };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,mBAAAA;AAAA;AAAA;AAAA,IAAAC,gBAAgD;;;ACChD,mBAA0B;;;ACAxB,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,SAAS,GAAG;AAAA,EAEZ;AACA,SAAO;AACT;AAEO,SAAS,QAAQ,OAAa,QAAc;AACjD,MAAI,SAAS,QAAQ;AACnB,WAAO,MAAM,kBAAkB;AAC/B;AAAA,EACF;AAEA,SAAO,MAAM;AACf;AAEO,SAAS,UAAgB;AAC9B,QAAM,OAAO,UAAU,IAAI,OAAO,MAAM,kBAAkB;AAC1D,SAAO,QAAQ;AACjB;AAMO,SAAS,gBAAyB;AACvC,SAAO,QAAQ,MAAM;AACvB;AAsCO,SAAS,aACd,UACA,YACe;AACf,MAAI,CAAC,YAAY,CAAC,YAAY;AAC5B,WAAO;AAAA,EACT;AAEA,MAAI,SAAS;AACb,MAAI;AACF,UAAM,UAAU,OAAO,QAAQ,UAAU;AAEzC,eAAW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AY;AAGzB,MAAI,CAAC,QAAQ;AACX,WAAO,EAAE,OAAO,MAAM,KAAK;AAAA,EAC7B;AAEA,QAAM,cAAc,OAAO,KAAK,MAAM,EAAE,SACpC,SACA,OAAO,YAAY,aAAa,QAAQ,CAAC;AAC7C,SAAO,EAAE,OAAO,aAAa,MAAM,WAAW,GAAG,KAAK;AACxD;;;ANfA,SAAS,mBAAmB,OAAyB;AACnD,QAAM,EAAE,OAAO,KAAK,IAAI,SAAS;AACjC,SACE,8BAAAC,QAAA,cAAC,aAAgB,MAAY,OAAe,GAAG,OAAO,WAAU,QAAO;AAE3E;AAEO,SAASC,WAAU,OAAoB;AAE5C,SACE,8BAAAD,QAAA,cAAC,0BAAS,UAAU,QAClB,8BAAAA,QAAA,cAAC,sBAAoB,GAAG,OAAO,CACjC;AAEJ;","names":["Analytics","import_react","React","Analytics"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.mjs b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.mjs
deleted file mode 100644
index e389c51..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.mjs
+++ /dev/null
@@ -1,182 +0,0 @@
-"use client";
-
-// src/nextjs/index.tsx
-import React, { Suspense } from "react";
-
-// src/react.tsx
-import { useEffect } from "react";
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/react.tsx
-function Analytics(props) {
- useEffect(() => {
- var _a;
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- }, [props.beforeSend]);
- useEffect(() => {
- inject({
- framework: props.framework || "react",
- ...props.route !== void 0 && { disableAutoTrack: true },
- ...props
- });
- }, []);
- useEffect(() => {
- if (props.route && props.path) {
- pageview({ route: props.route, path: props.path });
- }
- }, [props.route, props.path]);
- return null;
-}
-
-// src/nextjs/utils.ts
-import { useParams, usePathname, useSearchParams } from "next/navigation.js";
-var useRoute = () => {
- const params = useParams();
- const searchParams = useSearchParams();
- const path = usePathname();
- if (!params) {
- return { route: null, path };
- }
- const finalParams = Object.keys(params).length ? params : Object.fromEntries(searchParams.entries());
- return { route: computeRoute(path, finalParams), path };
-};
-
-// src/nextjs/index.tsx
-function AnalyticsComponent(props) {
- const { route, path } = useRoute();
- return /* @__PURE__ */ React.createElement(Analytics, { path, route, ...props, framework: "next" });
-}
-function Analytics2(props) {
- return /* @__PURE__ */ React.createElement(Suspense, { fallback: null }, /* @__PURE__ */ React.createElement(AnalyticsComponent, { ...props }));
-}
-export {
- Analytics2 as Analytics
-};
-//# sourceMappingURL=index.mjs.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.mjs.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.mjs.map
deleted file mode 100644
index 390a0c6..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/next/index.mjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/nextjs/index.tsx","../../src/react.tsx","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts","../../src/nextjs/utils.ts"],"sourcesContent":["import React, { Suspense, type ReactNode } from 'react';\nimport { Analytics as AnalyticsScript } from '../react';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { useRoute } from './utils';\n\ntype Props = Omit;\n\nfunction AnalyticsComponent(props: Props): ReactNode {\n const { route, path } = useRoute();\n return (\n \n );\n}\n\nexport function Analytics(props: Props): null {\n // Because of incompatible types between ReactNode in React 19 and React 18 we return null (which is also what we render)\n return (\n \n \n \n ) as never;\n}\n\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","'use client';\nimport { useEffect } from 'react';\nimport { inject, track, pageview } from './generic';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from './types';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @example\n * ```js\n * import { Analytics } from '@vercel/analytics/react';\n *\n * export default function App() {\n * return (\n * \n * );\n * }\n * ```\n */\nfunction Analytics(\n props: AnalyticsProps & {\n framework?: string;\n route?: string | null;\n path?: string | null;\n }\n): null {\n useEffect(() => {\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n }, [props.beforeSend]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: only run once\n useEffect(() => {\n inject({\n framework: props.framework || 'react',\n ...(props.route !== undefined && { disableAutoTrack: true }),\n ...props,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only run once\n }, []);\n\n useEffect(() => {\n // explicitely track page view, since we disabled auto tracking\n if (props.route && props.path) {\n pageview({ route: props.route, path: props.path });\n }\n }, [props.route, props.path]);\n\n return null;\n}\n\nexport { track, Analytics };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n","'use client';\n/* eslint-disable @typescript-eslint/no-unnecessary-condition -- can be empty in pages router */\nimport { useParams, usePathname, useSearchParams } from 'next/navigation.js';\nimport { computeRoute } from '../utils';\n\nexport const useRoute = (): {\n route: string | null;\n path: string;\n} => {\n const params = useParams();\n const searchParams = useSearchParams();\n const path = usePathname();\n\n // Until we have route parameters, we don't compute the route\n if (!params) {\n return { route: null, path };\n }\n // in Next.js@13, useParams() could return an empty object for pages router, and we default to searchParams.\n const finalParams = Object.keys(params).length\n ? params\n : Object.fromEntries(searchParams.entries());\n return { route: computeRoute(path, finalParams), path };\n};\n"],"mappings":";;;AAAA,OAAO,SAAS,gBAAgC;;;ACChD,SAAS,iBAAiB;;;ACAxB,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SA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,YAAU,MAAM;AAnClB;AAoCI,QAAI,MAAM,YAAY;AACpB,mBAAO,OAAP,gCAAY,cAAc,MAAM;AAAA,IAClC;AAAA,EACF,GAAG,CAAC,MAAM,UAAU,CAAC;AAGrB,YAAU,MAAM;AACd,WAAO;AAAA,MACL,WAAW,MAAM,aAAa;AAAA,MAC9B,GAAI,MAAM,UAAU,UAAa,EAAE,kBAAkB,KAAK;AAAA,MAC1D,GAAG;AAAA,IACL,CAAC;AAAA,EAEH,GAAG,CAAC,CAAC;AAEL,YAAU,MAAM;AAEd,QAAI,MAAM,SAAS,MAAM,MAAM;AAC7B,eAAS,EAAE,OAAO,MAAM,OAAO,MAAM,MAAM,KAAK,CAAC;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,MAAM,IAAI,CAAC;AAE5B,SAAO;AACT;;;AKzDA,SAAS,WAAW,aAAa,uBAAuB;AAGjD,IAAM,WAAW,MAGnB;AACH,QAAM,SAAS,UAAU;AACzB,QAAM,eAAe,gBAAgB;AACrC,QAAM,OAAO,YAAY;AAGzB,MAAI,CAAC,QAAQ;AACX,WAAO,EAAE,OAAO,MAAM,KAAK;AAAA,EAC7B;AAEA,QAAM,cAAc,OAAO,KAAK,MAAM,EAAE,SACpC,SACA,OAAO,YAAY,aAAa,QAAQ,CAAC;AAC7C,SAAO,EAAE,OAAO,aAAa,MAAM,WAAW,GAAG,KAAK;AACxD;;;ANfA,SAAS,mBAAmB,OAAyB;AACnD,QAAM,EAAE,OAAO,KAAK,IAAI,SAAS;AACjC,SACE,oCAAC,aAAgB,MAAY,OAAe,GAAG,OAAO,WAAU,QAAO;AAE3E;AAEO,SAASA,WAAU,OAAoB;AAE5C,SACE,oCAAC,YAAS,UAAU,QAClB,oCAAC,sBAAoB,GAAG,OAAO,CACjC;AAEJ;","names":["Analytics"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.d.mts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.d.mts
deleted file mode 100644
index d5d346c..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.d.mts
+++ /dev/null
@@ -1,33 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-
-declare const Analytics: any;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.d.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.d.ts
deleted file mode 100644
index d5d346c..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.d.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-
-declare const Analytics: any;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.js
deleted file mode 100644
index c8c19b9..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.js
+++ /dev/null
@@ -1,193 +0,0 @@
-"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 name2 in all)
- __defProp(target, name2, { get: all[name2], 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/nuxt/index.ts
-var nuxt_exports = {};
-__export(nuxt_exports, {
- Analytics: () => Analytics
-});
-module.exports = __toCommonJS(nuxt_exports);
-
-// src/vue/create-component.ts
-var import_vue = require("vue");
-var import_vue_router = require("vue-router");
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/vue/create-component.ts
-function createComponent(framework = "vue") {
- return (0, import_vue.defineComponent)({
- props: ["dsn", "beforeSend", "debug", "scriptSrc", "endpoint", "mode"],
- setup(props) {
- const route = (0, import_vue_router.useRoute)();
- inject({
- ...props,
- // keep auto-tracking unless we have route support (Nuxt or vue-router).
- disableAutoTrack: Boolean(route),
- framework
- });
- if (route && typeof window !== "undefined") {
- const changeRoute = () => {
- pageview({
- route: computeRoute(route.path, route.params),
- path: route.path
- });
- };
- changeRoute();
- (0, import_vue.watch)(route, changeRoute);
- }
- },
- // Vue component must have a render function, or a template.
- render() {
- return null;
- }
- });
-}
-
-// src/nuxt/index.ts
-var Analytics = createComponent("nuxt");
-// Annotate the CommonJS export names for ESM import in node:
-0 && (module.exports = {
- Analytics
-});
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.js.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.js.map
deleted file mode 100644
index 9c9278d..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/nuxt/index.ts","../../src/vue/create-component.ts","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts"],"sourcesContent":["import type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { createComponent } from '../vue/create-component';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- vue's defineComponent return type is any\nexport const Analytics = createComponent('nuxt');\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","import { defineComponent, watch } from 'vue';\n// for barebone vue project, vite will issue a warning since 'vue-router' import can't be resolved,\nimport { useRoute } from 'vue-router';\nimport { inject, pageview, type AnalyticsProps } from '../generic';\nimport { computeRoute } from '../utils';\n\nexport function createComponent(\n framework = 'vue'\n): ReturnType {\n return defineComponent({\n props: ['dsn', 'beforeSend', 'debug', 'scriptSrc', 'endpoint', 'mode'],\n setup(props: Omit) {\n // eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a React component.\n const route = useRoute();\n inject({\n ...props,\n // keep auto-tracking unless we have route support (Nuxt or vue-router).\n disableAutoTrack: Boolean(route),\n framework,\n });\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- route is undefined for barebone vue project.\n if (route && typeof window !== 'undefined') {\n const changeRoute = (): void => {\n pageview({\n route: computeRoute(route.path, route.params),\n path: route.path,\n });\n };\n changeRoute();\n watch(route, changeRoute);\n }\n },\n // Vue component must have a render function, or a template.\n render() {\n return null;\n },\n });\n}\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n"],"mappings":";;;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GAAG,KAAK,YAAY;AAAA,IAC3E;AAAA,EACF;AAEA,MAAI,cAAc,KAAK,MAAM,UAAU,OAAO;AAC5C,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;AAoDA,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AACF,GAGS;AApJT;AAqJE,eAAO,OAAP,gCAAY,YAAY,EAAE,OAAO,KAAK;AACxC;;;AJhJO,SAAS,gBACd,YAAY,OACwB;AACpC,aAAO,4BAAgB;AAAA,IACrB,OAAO,CAAC,OAAO,cAAc,SAAS,aAAa,YAAY,MAAM;AAAA,IACrE,MAAM,OAA0C;AAE9C,YAAM,YAAQ,4BAAS;AACvB,aAAO;AAAA,QACL,GAAG;AAAA;AAAA,QAEH,kBAAkB,QAAQ,KAAK;AAAA,QAC/B;AAAA,MACF,CAAC;AAED,UAAI,SAAS,OAAO,WAAW,aAAa;AAC1C,cAAM,cAAc,MAAY;AAC9B,mBAAS;AAAA,YACP,OAAO,aAAa,MAAM,MAAM,MAAM,MAAM;AAAA,YAC5C,MAAM,MAAM;AAAA,UACd,CAAC;AAAA,QACH;AACA,oBAAY;AACZ,8BAAM,OAAO,WAAW;AAAA,MAC1B;AAAA,IACF;AAAA;AAAA,IAEA,SAAS;AACP,aAAO;AAAA,IACT;AAAA,EACF,CAAC;AACH;;;ADjCO,IAAM,YAAY,gBAAgB,MAAM;","names":[]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.mjs b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.mjs
deleted file mode 100644
index 09eef70..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.mjs
+++ /dev/null
@@ -1,166 +0,0 @@
-// src/vue/create-component.ts
-import { defineComponent, watch } from "vue";
-import { useRoute } from "vue-router";
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/vue/create-component.ts
-function createComponent(framework = "vue") {
- return defineComponent({
- props: ["dsn", "beforeSend", "debug", "scriptSrc", "endpoint", "mode"],
- setup(props) {
- const route = useRoute();
- inject({
- ...props,
- // keep auto-tracking unless we have route support (Nuxt or vue-router).
- disableAutoTrack: Boolean(route),
- framework
- });
- if (route && typeof window !== "undefined") {
- const changeRoute = () => {
- pageview({
- route: computeRoute(route.path, route.params),
- path: route.path
- });
- };
- changeRoute();
- watch(route, changeRoute);
- }
- },
- // Vue component must have a render function, or a template.
- render() {
- return null;
- }
- });
-}
-
-// src/nuxt/index.ts
-var Analytics = createComponent("nuxt");
-export {
- Analytics
-};
-//# sourceMappingURL=index.mjs.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.mjs.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.mjs.map
deleted file mode 100644
index d6403ab..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/nuxt/index.mjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/vue/create-component.ts","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts","../../src/nuxt/index.ts"],"sourcesContent":["import { defineComponent, watch } from 'vue';\n// for barebone vue project, vite will issue a warning since 'vue-router' import can't be resolved,\nimport { useRoute } from 'vue-router';\nimport { inject, pageview, type AnalyticsProps } from '../generic';\nimport { computeRoute } from '../utils';\n\nexport function createComponent(\n framework = 'vue'\n): ReturnType {\n return defineComponent({\n props: ['dsn', 'beforeSend', 'debug', 'scriptSrc', 'endpoint', 'mode'],\n setup(props: Omit) {\n // eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a React component.\n const route = useRoute();\n inject({\n ...props,\n // keep auto-tracking unless we have route support (Nuxt or vue-router).\n disableAutoTrack: Boolean(route),\n framework,\n });\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- route is undefined for barebone vue project.\n if (route && typeof window !== 'undefined') {\n const changeRoute = (): void => {\n pageview({\n route: computeRoute(route.path, route.params),\n path: route.path,\n });\n };\n changeRoute();\n watch(route, changeRoute);\n }\n },\n // Vue component must have a render function, or a template.\n render() {\n return null;\n },\n });\n}\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n","import type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { createComponent } from '../vue/create-component';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- vue's defineComponent return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/B,+DACA;AAGJ,YAAQ;AAAA,MACN,qDAAqD,GAAG,KAAK,YAAY;AAAA,IAC3E;AAAA,EACF;AAEA,MAAI,cAAc,KAAK,MAAM,UAAU,OAAO;AAC5C,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;AAoDA,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AACF,GAGS;AApJT;AAqJE,eAAO,OAAP,gCAAY,YAAY,EAAE,OAAO,KAAK;AACxC;;;AJhJO,SAAS,gBACd,YAAY,OACwB;AACpC,SAAO,gBAAgB;AAAA,IACrB,OAAO,CAAC,OAAO,cAAc,SAAS,aAAa,YAAY,MAAM;AAAA,IACrE,MAAM,OAA0C;AAE9C,YAAM,QAAQ,SAAS;AACvB,aAAO;AAAA,QACL,GAAG;AAAA;AAAA,QAEH,kBAAkB,QAAQ,KAAK;AAAA,QAC/B;AAAA,MACF,CAAC;AAED,UAAI,SAAS,OAAO,WAAW,aAAa;AAC1C,cAAM,cAAc,MAAY;AAC9B,mBAAS;AAAA,YACP,OAAO,aAAa,MAAM,MAAM,MAAM,MAAM;AAAA,YAC5C,MAAM,MAAM;AAAA,UACd,CAAC;AAAA,QACH;AACA,oBAAY;AACZ,cAAM,OAAO,WAAW;AAAA,MAC1B;AAAA,IACF;AAAA;AAAA,IAEA,SAAS;AACP,aAAO;AAAA,IACT;AAAA,EACF,CAAC;AACH;;;AKjCO,IAAM,YAAY,gBAAgB,MAAM;","names":[]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.d.mts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.d.mts
deleted file mode 100644
index 90f5e91..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.d.mts
+++ /dev/null
@@ -1,73 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type AllowedPropertyValues = string | number | boolean | null;
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-type PlainFlags = Record;
-type FlagsDataInput = (string | PlainFlags)[] | PlainFlags;
-
-/**
- * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.
- * @param name - The name of the event.
- * * Examples: `Purchase`, `Click Button`, or `Play Video`.
- * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.
- */
-declare function track(name: string, properties?: Record, options?: {
- flags?: FlagsDataInput;
-}): void;
-
-/**
- * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).
- * @param [props] - Analytics options.
- * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.
- * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.
- * - `production` - Always use the production script. (Sends events to the server)
- * - `development` - Always use the development script. (Logs events to the console)
- * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.
- * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.
- * @example
- * ```js
- * import { Analytics } from '@vercel/analytics/react';
- *
- * export default function App() {
- * return (
- *
- * );
- * }
- * ```
- */
-declare function Analytics(props: AnalyticsProps & {
- framework?: string;
- route?: string | null;
- path?: string | null;
-}): null;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent, track };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.d.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.d.ts
deleted file mode 100644
index 90f5e91..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.d.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type AllowedPropertyValues = string | number | boolean | null;
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-type PlainFlags = Record;
-type FlagsDataInput = (string | PlainFlags)[] | PlainFlags;
-
-/**
- * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.
- * @param name - The name of the event.
- * * Examples: `Purchase`, `Click Button`, or `Play Video`.
- * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.
- */
-declare function track(name: string, properties?: Record, options?: {
- flags?: FlagsDataInput;
-}): void;
-
-/**
- * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).
- * @param [props] - Analytics options.
- * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.
- * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.
- * - `production` - Always use the production script. (Sends events to the server)
- * - `development` - Always use the development script. (Logs events to the console)
- * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.
- * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.
- * @example
- * ```js
- * import { Analytics } from '@vercel/analytics/react';
- *
- * export default function App() {
- * return (
- *
- * );
- * }
- * ```
- */
-declare function Analytics(props: AnalyticsProps & {
- framework?: string;
- route?: string | null;
- path?: string | null;
-}): null;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent, track };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.js
deleted file mode 100644
index 4fcb183..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.js
+++ /dev/null
@@ -1,208 +0,0 @@
-"use strict";
-"use client";
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name2 in all)
- __defProp(target, name2, { get: all[name2], 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/react.tsx
-var react_exports = {};
-__export(react_exports, {
- Analytics: () => Analytics,
- track: () => track
-});
-module.exports = __toCommonJS(react_exports);
-var import_react = require("react");
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isProduction() {
- return getMode() === "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function removeKey(key, { [key]: _, ...rest }) {
- return rest;
-}
-function parseProperties(properties, options) {
- if (!properties)
- return void 0;
- let props = properties;
- const errorProperties = [];
- for (const [key, value] of Object.entries(properties)) {
- if (typeof value === "object" && value !== null) {
- if (options.strip) {
- props = removeKey(key, props);
- } else {
- errorProperties.push(key);
- }
- }
- }
- if (errorProperties.length > 0 && !options.strip) {
- throw Error(
- `The following properties are not valid: ${errorProperties.join(
- ", "
- )}. Only strings, numbers, booleans, and null are allowed.`
- );
- }
- return props;
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function track(name2, properties, options) {
- var _a, _b;
- if (!isBrowser()) {
- const msg = "[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";
- if (isProduction()) {
- console.warn(msg);
- } else {
- throw new Error(msg);
- }
- return;
- }
- if (!properties) {
- (_a = window.va) == null ? void 0 : _a.call(window, "event", { name: name2, options });
- return;
- }
- try {
- const props = parseProperties(properties, {
- strip: isProduction()
- });
- (_b = window.va) == null ? void 0 : _b.call(window, "event", {
- name: name2,
- data: props,
- options
- });
- } catch (err) {
- if (err instanceof Error && isDevelopment()) {
- console.error(err);
- }
- }
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/react.tsx
-function Analytics(props) {
- (0, import_react.useEffect)(() => {
- var _a;
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- }, [props.beforeSend]);
- (0, import_react.useEffect)(() => {
- inject({
- framework: props.framework || "react",
- ...props.route !== void 0 && { disableAutoTrack: true },
- ...props
- });
- }, []);
- (0, import_react.useEffect)(() => {
- if (props.route && props.path) {
- pageview({ route: props.route, path: props.path });
- }
- }, [props.route, props.path]);
- return null;
-}
-// Annotate the CommonJS export names for ESM import in node:
-0 && (module.exports = {
- Analytics,
- track
-});
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.js.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.js.map
deleted file mode 100644
index e9e8a62..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/react.tsx","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts"],"sourcesContent":["'use client';\nimport { useEffect } from 'react';\nimport { inject, track, pageview } from './generic';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from './types';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @example\n * ```js\n * import { Analytics } from '@vercel/analytics/react';\n *\n * export default function App() {\n * return (\n * \n * );\n * }\n * ```\n */\nfunction Analytics(\n props: AnalyticsProps & {\n framework?: string;\n route?: string | null;\n path?: string | null;\n }\n): null {\n useEffect(() => {\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n }, [props.beforeSend]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: only run once\n useEffect(() => {\n inject({\n framework: props.framework || 'react',\n ...(props.route !== undefined && { disableAutoTrack: true }),\n ...props,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only run once\n }, []);\n\n useEffect(() => {\n // explicitely track page view, since we disabled auto tracking\n if (props.route && props.path) {\n pageview({ route: props.route, path: props.path });\n }\n }, [props.route, props.path]);\n\n return null;\n}\n\nexport { track, Analytics };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA0B;;;ACAxB,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,SAAS,GAAG;AAAA,EAEZ;AACA,SAAO;AACT;AAEO,SAAS,QAAQ,OAAa,QAAc;AACjD,MAAI,SAAS,QAAQ;AACnB,WAAO,MAAM,kBAAkB;AAC/B;AAAA,EACF;AAEA,SAAO,MAAM;AACf;AAEO,SAAS,UAAgB;AAC9B,QAAM,OAAO,UAAU,IAAI,OAAO,MAAM,kBAAkB;AAC1D,SAAO,QAAQ;AACjB;AAEO,SAAS,eAAwB;AACtC,SAAO,QAAQ,MAAM;AACvB;AAEO,SAAS,gBAAyB;AACvC,SAAO,QAAQ,MAAM;AACvB;AAEA,SAAS,U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d,WAAO;AAAA,MACL,WAAW,MAAM,aAAa;AAAA,MAC9B,GAAI,MAAM,UAAU,UAAa,EAAE,kBAAkB,KAAK;AAAA,MAC1D,GAAG;AAAA,IACL,CAAC;AAAA,EAEH,GAAG,CAAC,CAAC;AAEL,8BAAU,MAAM;AAEd,QAAI,MAAM,SAAS,MAAM,MAAM;AAC7B,eAAS,EAAE,OAAO,MAAM,OAAO,MAAM,MAAM,KAAK,CAAC;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,MAAM,IAAI,CAAC;AAE5B,SAAO;AACT;","names":["name"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.mjs b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.mjs
deleted file mode 100644
index 764cc7a..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.mjs
+++ /dev/null
@@ -1,183 +0,0 @@
-"use client";
-
-// src/react.tsx
-import { useEffect } from "react";
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isProduction() {
- return getMode() === "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function removeKey(key, { [key]: _, ...rest }) {
- return rest;
-}
-function parseProperties(properties, options) {
- if (!properties)
- return void 0;
- let props = properties;
- const errorProperties = [];
- for (const [key, value] of Object.entries(properties)) {
- if (typeof value === "object" && value !== null) {
- if (options.strip) {
- props = removeKey(key, props);
- } else {
- errorProperties.push(key);
- }
- }
- }
- if (errorProperties.length > 0 && !options.strip) {
- throw Error(
- `The following properties are not valid: ${errorProperties.join(
- ", "
- )}. Only strings, numbers, booleans, and null are allowed.`
- );
- }
- return props;
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function track(name2, properties, options) {
- var _a, _b;
- if (!isBrowser()) {
- const msg = "[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";
- if (isProduction()) {
- console.warn(msg);
- } else {
- throw new Error(msg);
- }
- return;
- }
- if (!properties) {
- (_a = window.va) == null ? void 0 : _a.call(window, "event", { name: name2, options });
- return;
- }
- try {
- const props = parseProperties(properties, {
- strip: isProduction()
- });
- (_b = window.va) == null ? void 0 : _b.call(window, "event", {
- name: name2,
- data: props,
- options
- });
- } catch (err) {
- if (err instanceof Error && isDevelopment()) {
- console.error(err);
- }
- }
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/react.tsx
-function Analytics(props) {
- useEffect(() => {
- var _a;
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- }, [props.beforeSend]);
- useEffect(() => {
- inject({
- framework: props.framework || "react",
- ...props.route !== void 0 && { disableAutoTrack: true },
- ...props
- });
- }, []);
- useEffect(() => {
- if (props.route && props.path) {
- pageview({ route: props.route, path: props.path });
- }
- }, [props.route, props.path]);
- return null;
-}
-export {
- Analytics,
- track
-};
-//# sourceMappingURL=index.mjs.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.mjs.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.mjs.map
deleted file mode 100644
index 148a152..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/react/index.mjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/react.tsx","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts"],"sourcesContent":["'use client';\nimport { useEffect } from 'react';\nimport { inject, track, pageview } from './generic';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from './types';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @example\n * ```js\n * import { Analytics } from '@vercel/analytics/react';\n *\n * export default function App() {\n * return (\n * \n * );\n * }\n * ```\n */\nfunction Analytics(\n props: AnalyticsProps & {\n framework?: string;\n route?: string | null;\n path?: string | null;\n }\n): null {\n useEffect(() => {\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n }, [props.beforeSend]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: only run once\n useEffect(() => {\n inject({\n framework: props.framework || 'react',\n ...(props.route !== undefined && { disableAutoTrack: true }),\n ...props,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only run once\n }, []);\n\n useEffect(() => {\n // explicitely track page view, since we disabled auto tracking\n if (props.route && props.path) {\n pageview({ route: props.route, path: props.path });\n }\n }, [props.route, props.path]);\n\n return null;\n}\n\nexport { track, Analytics };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n"],"mappings":";;;AACA,SAAS,iBAAiB;;;ACAxB,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO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QAAQ;AACrC;AAAA,EACF;AAEA,MAAI;AACF,UAAM,QAAQ,gBAAgB,YAAY;AAAA,MACxC,OAAO,aAAa;AAAA,IACtB,CAAC;AAED,iBAAO,OAAP,gCAAY,SAAS;AAAA,MACnB,MAAAA;AAAA,MACA,MAAM;AAAA,MACN;AAAA,IACF;AAAA,EACF,SAAS,KAAK;AACZ,QAAI,eAAe,SAAS,cAAc,GAAG;AAE3C,cAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF;AAEA,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AACF,GAGS;AApJT;AAqJE,eAAO,OAAP,gCAAY,YAAY,EAAE,OAAO,KAAK;AACxC;;;AJ1HA,SAAS,UACP,OAKM;AACN,YAAU,MAAM;AAnClB;AAoCI,QAAI,MAAM,YAAY;AACpB,mBAAO,OAAP,gCAAY,cAAc,MAAM;AAAA,IAClC;AAAA,EACF,GAAG,CAAC,MAAM,UAAU,CAAC;AAGrB,YAAU,MAAM;AACd,WAAO;AAAA,MACL,WAAW,MAAM,aAAa;AAAA,MAC9B,GAAI,MAAM,UAAU,UAAa,EAAE,kBAAkB,KAAK;AAAA,MAC1D,GAAG;AAAA,IACL,CAAC;AAAA,EAEH,GAAG,CAAC,CAAC;AAEL,YAAU,MAAM;AAEd,QAAI,MAAM,SAAS,MAAM,MAAM;AAC7B,eAAS,EAAE,OAAO,MAAM,OAAO,MAAM,MAAM,KAAK,CAAC;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,MAAM,IAAI,CAAC;AAE5B,SAAO;AACT;","names":["name"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.d.mts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.d.mts
deleted file mode 100644
index 2fa975b..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.d.mts
+++ /dev/null
@@ -1,33 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-
-declare function Analytics(props: Omit): JSX.Element;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.d.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.d.ts
deleted file mode 100644
index 2fa975b..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.d.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-
-declare function Analytics(props: Omit): JSX.Element;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.js
deleted file mode 100644
index e0d7a5c..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.js
+++ /dev/null
@@ -1,206 +0,0 @@
-"use strict";
-var __create = Object.create;
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getProtoOf = Object.getPrototypeOf;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name2 in all)
- __defProp(target, name2, { get: all[name2], 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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
- // If the importer is in node compatibility mode or this is not an ESM
- // file that has been converted to a CommonJS file using a Babel-
- // compatible transform (i.e. "__esModule" has not been set), then set
- // "default" to the CommonJS "module.exports" for node compatibility.
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
- mod
-));
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
-
-// src/remix/index.tsx
-var remix_exports = {};
-__export(remix_exports, {
- Analytics: () => Analytics2
-});
-module.exports = __toCommonJS(remix_exports);
-var import_react3 = __toESM(require("react"));
-
-// src/react.tsx
-var import_react = require("react");
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/react.tsx
-function Analytics(props) {
- (0, import_react.useEffect)(() => {
- var _a;
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- }, [props.beforeSend]);
- (0, import_react.useEffect)(() => {
- inject({
- framework: props.framework || "react",
- ...props.route !== void 0 && { disableAutoTrack: true },
- ...props
- });
- }, []);
- (0, import_react.useEffect)(() => {
- if (props.route && props.path) {
- pageview({ route: props.route, path: props.path });
- }
- }, [props.route, props.path]);
- return null;
-}
-
-// src/remix/utils.ts
-var import_react2 = require("@remix-run/react");
-var useRoute = () => {
- const params = (0, import_react2.useParams)();
- const { pathname: path } = (0, import_react2.useLocation)();
- return { route: computeRoute(path, params), path };
-};
-
-// src/remix/index.tsx
-function Analytics2(props) {
- return /* @__PURE__ */ import_react3.default.createElement(Analytics, { ...useRoute(), ...props, framework: "remix" });
-}
-// Annotate the CommonJS export names for ESM import in node:
-0 && (module.exports = {
- Analytics
-});
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.js.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.js.map
deleted file mode 100644
index fe4223b..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/remix/index.tsx","../../src/react.tsx","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts","../../src/remix/utils.ts"],"sourcesContent":["import React from 'react';\nimport { Analytics as AnalyticsScript } from '../react';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { useRoute } from './utils';\n\nexport function Analytics(props: Omit): JSX.Element {\n return ;\n}\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","'use client';\nimport { useEffect } from 'react';\nimport { inject, track, pageview } from './generic';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from './types';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @example\n * ```js\n * import { Analytics } from '@vercel/analytics/react';\n *\n * export default function App() {\n * return (\n * \n * );\n * }\n * ```\n */\nfunction Analytics(\n props: AnalyticsProps & {\n framework?: string;\n route?: string | null;\n path?: string | null;\n }\n): null {\n useEffect(() => {\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n }, [props.beforeSend]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: only run once\n useEffect(() => {\n inject({\n framework: props.framework || 'react',\n ...(props.route !== undefined && { disableAutoTrack: true }),\n ...props,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only run once\n }, []);\n\n useEffect(() => {\n // explicitely track page view, since we disabled auto tracking\n if (props.route && props.path) {\n pageview({ route: props.route, path: props.path });\n }\n }, [props.route, props.path]);\n\n return null;\n}\n\nexport { track, Analytics };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n","import { useLocation, useParams } from '@remix-run/react';\nimport { computeRoute } from '../utils';\n\nexport const useRoute = (): { route: string | null; path: string } => {\n const params = useParams();\n const { pathname: path } = useLocation();\n return { route: computeRoute(path, params as never), path };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,mBAAAA;AAAA;AAAA;AAAA,IAAAC,gBAAkB;;;ACClB,mBAA0B;;;ACAxB,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAA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AC,MAAM,UAAU,CAAC;AAGrB,8BAAU,MAAM;AACd,WAAO;AAAA,MACL,WAAW,MAAM,aAAa;AAAA,MAC9B,GAAI,MAAM,UAAU,UAAa,EAAE,kBAAkB,KAAK;AAAA,MAC1D,GAAG;AAAA,IACL,CAAC;AAAA,EAEH,GAAG,CAAC,CAAC;AAEL,8BAAU,MAAM;AAEd,QAAI,MAAM,SAAS,MAAM,MAAM;AAC7B,eAAS,EAAE,OAAO,MAAM,OAAO,MAAM,MAAM,KAAK,CAAC;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,MAAM,IAAI,CAAC;AAE5B,SAAO;AACT;;;AK3DA,IAAAC,gBAAuC;AAGhC,IAAM,WAAW,MAA8C;AACpE,QAAM,aAAS,yBAAU;AACzB,QAAM,EAAE,UAAU,KAAK,QAAI,2BAAY;AACvC,SAAO,EAAE,OAAO,aAAa,MAAM,MAAe,GAAG,KAAK;AAC5D;;;ANFO,SAASC,WAAU,OAAmD;AAC3E,SAAO,8BAAAC,QAAA,cAAC,aAAiB,GAAG,SAAS,GAAI,GAAG,OAAO,WAAU,SAAQ;AACvE;","names":["Analytics","import_react","import_react","Analytics","React"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.mjs b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.mjs
deleted file mode 100644
index 7e9155d..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.mjs
+++ /dev/null
@@ -1,171 +0,0 @@
-// src/remix/index.tsx
-import React from "react";
-
-// src/react.tsx
-import { useEffect } from "react";
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/react.tsx
-function Analytics(props) {
- useEffect(() => {
- var _a;
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- }, [props.beforeSend]);
- useEffect(() => {
- inject({
- framework: props.framework || "react",
- ...props.route !== void 0 && { disableAutoTrack: true },
- ...props
- });
- }, []);
- useEffect(() => {
- if (props.route && props.path) {
- pageview({ route: props.route, path: props.path });
- }
- }, [props.route, props.path]);
- return null;
-}
-
-// src/remix/utils.ts
-import { useLocation, useParams } from "@remix-run/react";
-var useRoute = () => {
- const params = useParams();
- const { pathname: path } = useLocation();
- return { route: computeRoute(path, params), path };
-};
-
-// src/remix/index.tsx
-function Analytics2(props) {
- return /* @__PURE__ */ React.createElement(Analytics, { ...useRoute(), ...props, framework: "remix" });
-}
-export {
- Analytics2 as Analytics
-};
-//# sourceMappingURL=index.mjs.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.mjs.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.mjs.map
deleted file mode 100644
index bf309de..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/remix/index.mjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/remix/index.tsx","../../src/react.tsx","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts","../../src/remix/utils.ts"],"sourcesContent":["import React from 'react';\nimport { Analytics as AnalyticsScript } from '../react';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { useRoute } from './utils';\n\nexport function Analytics(props: Omit): JSX.Element {\n return ;\n}\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","'use client';\nimport { useEffect } from 'react';\nimport { inject, track, pageview } from './generic';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from './types';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @example\n * ```js\n * import { Analytics } from '@vercel/analytics/react';\n *\n * export default function App() {\n * return (\n * \n * );\n * }\n * ```\n */\nfunction Analytics(\n props: AnalyticsProps & {\n framework?: string;\n route?: string | null;\n path?: string | null;\n }\n): null {\n useEffect(() => {\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n }, [props.beforeSend]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: only run once\n useEffect(() => {\n inject({\n framework: props.framework || 'react',\n ...(props.route !== undefined && { disableAutoTrack: true }),\n ...props,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only run once\n }, []);\n\n useEffect(() => {\n // explicitely track page view, since we disabled auto tracking\n if (props.route && props.path) {\n pageview({ route: props.route, path: props.path });\n }\n }, [props.route, props.path]);\n\n return null;\n}\n\nexport { track, Analytics };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n","import { useLocation, useParams } from '@remix-run/react';\nimport { computeRoute } from '../utils';\n\nexport const useRoute = (): { route: string | null; path: string } => {\n const params = useParams();\n const { pathname: path } = useLocation();\n return { route: computeRoute(path, params as never), path };\n};\n"],"mappings":";AAAA,OAAO,WAAW;;;ACClB,SAAS,iBAAiB;;;ACAxB,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,SAAS,GAAG;AAAA,EAEZ;AACA,SAAO;AACT;AAEO,SAAS,QAAQ,OAAa,QAAc;AACjD,MAAI,SAAS,QAAQ;AACnB,WAAO,MAAM,kBAAkB;AAC/B;AAAA,EACF;AAEA,SAAO,MAAM;AACf;AAEO,SAAS,UAAgB;AAC9B,QAAM,OAAO,UAAU,IAAI,OAAO,MAAM,kBAAkB;AAC1D,SAAO,QAAQ;AACj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,KAAK,CAAC;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,MAAM,IAAI,CAAC;AAE5B,SAAO;AACT;;;AK3DA,SAAS,aAAa,iBAAiB;AAGhC,IAAM,WAAW,MAA8C;AACpE,QAAM,SAAS,UAAU;AACzB,QAAM,EAAE,UAAU,KAAK,IAAI,YAAY;AACvC,SAAO,EAAE,OAAO,aAAa,MAAM,MAAe,GAAG,KAAK;AAC5D;;;ANFO,SAASA,WAAU,OAAmD;AAC3E,SAAO,oCAAC,aAAiB,GAAG,SAAS,GAAI,GAAG,OAAO,WAAU,SAAQ;AACvE;","names":["Analytics"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.d.mts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.d.mts
deleted file mode 100644
index 3116f35..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.d.mts
+++ /dev/null
@@ -1,37 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type AllowedPropertyValues = string | number | boolean | null;
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-type PlainFlags = Record;
-type FlagsDataInput = (string | PlainFlags)[] | PlainFlags;
-
-type HeadersObject = Record;
-type AllowedHeaders = Headers | HeadersObject;
-interface Options {
- flags?: FlagsDataInput;
- headers?: AllowedHeaders;
- request?: {
- headers: AllowedHeaders;
- };
-}
-declare function track(eventName: string, properties?: Record, options?: Options): Promise;
-
-export { track };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.d.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.d.ts
deleted file mode 100644
index 3116f35..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.d.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type AllowedPropertyValues = string | number | boolean | null;
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-type PlainFlags = Record;
-type FlagsDataInput = (string | PlainFlags)[] | PlainFlags;
-
-type HeadersObject = Record;
-type AllowedHeaders = Headers | HeadersObject;
-interface Options {
- flags?: FlagsDataInput;
- headers?: AllowedHeaders;
- request?: {
- headers: AllowedHeaders;
- };
-}
-declare function track(eventName: string, properties?: Record, options?: Options): Promise;
-
-export { track };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.js
deleted file mode 100644
index 4ce0867..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.js
+++ /dev/null
@@ -1,203 +0,0 @@
-"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/server/index.ts
-var server_exports = {};
-__export(server_exports, {
- track: () => track
-});
-module.exports = __toCommonJS(server_exports);
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isProduction() {
- return getMode() === "production";
-}
-function removeKey(key, { [key]: _, ...rest }) {
- return rest;
-}
-function parseProperties(properties, options) {
- if (!properties)
- return void 0;
- let props = properties;
- const errorProperties = [];
- for (const [key, value] of Object.entries(properties)) {
- if (typeof value === "object" && value !== null) {
- if (options.strip) {
- props = removeKey(key, props);
- } else {
- errorProperties.push(key);
- }
- }
- }
- if (errorProperties.length > 0 && !options.strip) {
- throw Error(
- `The following properties are not valid: ${errorProperties.join(
- ", "
- )}. Only strings, numbers, booleans, and null are allowed.`
- );
- }
- return props;
-}
-
-// src/server/index.ts
-function isHeaders(headers) {
- if (!headers)
- return false;
- return typeof headers.entries === "function";
-}
-var symbol = Symbol.for("@vercel/request-context");
-var logPrefix = "[Vercel Web Analytics]";
-async function track(eventName, properties, options) {
- var _a;
- const ENDPOINT = process.env.VERCEL_WEB_ANALYTICS_ENDPOINT || process.env.VERCEL_URL;
- const DISABLE_LOGS = Boolean(process.env.VERCEL_WEB_ANALYTICS_DISABLE_LOGS);
- const BYPASS_SECRET = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
- if (typeof window !== "undefined") {
- if (!isProduction()) {
- throw new Error(
- `${logPrefix} It seems like you imported the \`track\` function from \`@vercel/web-analytics/server\` in a browser environment. This function is only meant to be used in a server environment.`
- );
- }
- return;
- }
- const props = parseProperties(properties, {
- strip: isProduction()
- });
- if (!ENDPOINT) {
- if (isProduction()) {
- console.log(
- `${logPrefix} Can't find VERCEL_URL in environment variables.`
- );
- } else if (!DISABLE_LOGS) {
- console.log(
- `${logPrefix} Track "${eventName}" ${props ? `with data ${JSON.stringify(props)}` : ""}`
- );
- }
- return;
- }
- try {
- const requestContext = (_a = globalThis[symbol]) == null ? void 0 : _a.get();
- let headers;
- if (options && "headers" in options) {
- headers = options.headers;
- } else if (options == null ? void 0 : options.request) {
- headers = options.request.headers;
- } else if (requestContext == null ? void 0 : requestContext.headers) {
- headers = requestContext.headers;
- }
- let tmp = {};
- if (headers && isHeaders(headers)) {
- headers.forEach((value, key) => {
- tmp[key] = value;
- });
- } else if (headers) {
- tmp = headers;
- }
- const origin = (requestContext == null ? void 0 : requestContext.url) || tmp.referer || `https://${ENDPOINT}`;
- const url = new URL(origin);
- const body = {
- o: origin,
- ts: (/* @__PURE__ */ new Date()).getTime(),
- r: "",
- en: eventName,
- ed: props,
- f: safeGetFlags(options == null ? void 0 : options.flags, requestContext)
- };
- const hasHeaders = Boolean(headers);
- if (!hasHeaders) {
- throw new Error(
- "No session context found. Pass `request` or `headers` to the `track` function."
- );
- }
- const promise = fetch(`${url.origin}/_vercel/insights/event`, {
- headers: {
- "content-type": "application/json",
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- The throwing is temporary until we add support for non Vercel hosted environments
- ...hasHeaders ? {
- "user-agent": tmp["user-agent"],
- "x-vercel-ip": tmp["x-forwarded-for"],
- "x-va-server": "1",
- cookie: tmp.cookie
- } : {
- "x-va-server": "2"
- },
- ...BYPASS_SECRET ? { "x-vercel-protection-bypass": BYPASS_SECRET } : {}
- },
- body: JSON.stringify(body),
- method: "POST"
- }).then((response) => response.text()).catch((err) => {
- if (err instanceof Error && "response" in err) {
- console.error(err.response);
- } else {
- console.error(err);
- }
- });
- if (requestContext == null ? void 0 : requestContext.waitUntil) {
- requestContext.waitUntil(promise);
- } else {
- await promise;
- }
- return void 0;
- } catch (err) {
- console.error(err);
- }
-}
-function safeGetFlags(flags, requestContext) {
- var _a;
- try {
- if (!requestContext || !flags)
- return;
- if (!Array.isArray(flags)) {
- return { p: flags };
- }
- const plainFlags = {};
- const resolvedPlainFlags = ((_a = requestContext.flags) == null ? void 0 : _a.getValues()) ?? {};
- for (const flag of flags) {
- if (typeof flag === "string") {
- plainFlags[flag] = resolvedPlainFlags[flag];
- } else {
- Object.assign(plainFlags, flag);
- }
- }
- return { p: plainFlags };
- } catch {
- }
-}
-// Annotate the CommonJS export names for ESM import in node:
-0 && (module.exports = {
- track
-});
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.js.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.js.map
deleted file mode 100644
index 6227483..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/server/index.ts","../../src/utils.ts"],"sourcesContent":["/* eslint-disable no-console -- Allow logging on the server */\nimport type {\n AllowedPropertyValues,\n FlagsDataInput,\n PlainFlags,\n} from '../types';\nimport { isProduction, parseProperties } from '../utils';\n\ntype HeadersObject = Record;\ntype AllowedHeaders = Headers | HeadersObject;\n\nfunction isHeaders(headers?: AllowedHeaders): headers is Headers {\n if (!headers) return false;\n return typeof (headers as HeadersObject).entries === 'function';\n}\n\ninterface Options {\n flags?: FlagsDataInput;\n headers?: AllowedHeaders;\n request?: { headers: AllowedHeaders };\n}\n\ninterface RequestContext {\n get: () => {\n headers: Record;\n url: string;\n waitUntil?: (promise: Promise) => void;\n flags?: {\n getValues: () => PlainFlags;\n reportValue: (key: string, value: unknown) => void;\n };\n };\n}\n\nconst symbol = Symbol.for('@vercel/request-context');\nconst logPrefix = '[Vercel Web Analytics]';\n\nexport async function track(\n eventName: string,\n properties?: Record,\n options?: Options\n): Promise {\n const ENDPOINT =\n process.env.VERCEL_WEB_ANALYTICS_ENDPOINT || process.env.VERCEL_URL;\n const DISABLE_LOGS = Boolean(process.env.VERCEL_WEB_ANALYTICS_DISABLE_LOGS);\n const BYPASS_SECRET = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;\n\n if (typeof window !== 'undefined') {\n if (!isProduction()) {\n throw new Error(\n `${logPrefix} It seems like you imported the \\`track\\` function from \\`@vercel/web-analytics/server\\` in a browser environment. This function is only meant to be used in a server environment.`\n );\n }\n\n return;\n }\n\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n if (!ENDPOINT) {\n if (isProduction()) {\n console.log(\n `${logPrefix} Can't find VERCEL_URL in environment variables.`\n );\n } else if (!DISABLE_LOGS) {\n console.log(\n `${logPrefix} Track \"${eventName}\" ${\n props ? `with data ${JSON.stringify(props)}` : ''\n }`\n );\n }\n return;\n }\n try {\n const requestContext = (\n (globalThis as never)[symbol] as RequestContext | undefined\n )?.get();\n\n let headers: AllowedHeaders | undefined;\n\n if (options && 'headers' in options) {\n headers = options.headers;\n } else if (options?.request) {\n headers = options.request.headers;\n } else if (requestContext?.headers) {\n // not explicitly passed in context, so take it from async storage\n headers = requestContext.headers;\n }\n\n let tmp: HeadersObject = {};\n if (headers && isHeaders(headers)) {\n headers.forEach((value, key) => {\n tmp[key] = value;\n });\n } else if (headers) {\n tmp = headers;\n }\n\n const origin =\n requestContext?.url || (tmp.referer as string) || `https://${ENDPOINT}`;\n\n const url = new URL(origin);\n\n const body = {\n o: origin,\n ts: new Date().getTime(),\n r: '',\n en: eventName,\n ed: props,\n f: safeGetFlags(options?.flags, requestContext),\n };\n\n const hasHeaders = Boolean(headers);\n\n if (!hasHeaders) {\n throw new Error(\n 'No session context found. Pass `request` or `headers` to the `track` function.'\n );\n }\n\n const promise = fetch(`${url.origin}/_vercel/insights/event`, {\n headers: {\n 'content-type': 'application/json',\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- The throwing is temporary until we add support for non Vercel hosted environments\n ...(hasHeaders\n ? {\n 'user-agent': tmp['user-agent'] as string,\n 'x-vercel-ip': tmp['x-forwarded-for'] as string,\n 'x-va-server': '1',\n cookie: tmp.cookie as string,\n }\n : {\n 'x-va-server': '2',\n }),\n ...(BYPASS_SECRET\n ? { 'x-vercel-protection-bypass': BYPASS_SECRET }\n : {}),\n },\n body: JSON.stringify(body),\n method: 'POST',\n })\n // We want to always consume the body; some cloud providers track fetch concurrency\n // and may not release the connection until the body is consumed.\n .then((response) => response.text())\n .catch((err: unknown) => {\n if (err instanceof Error && 'response' in err) {\n console.error(err.response);\n } else {\n console.error(err);\n }\n });\n\n if (requestContext?.waitUntil) {\n requestContext.waitUntil(promise);\n } else {\n await promise;\n }\n\n return void 0;\n } catch (err) {\n console.error(err);\n }\n}\n\nfunction safeGetFlags(\n flags: Options['flags'],\n requestContext?: ReturnType\n):\n | {\n p: PlainFlags;\n }\n | undefined {\n try {\n if (!requestContext || !flags) return;\n // In the case plain flags are passed, just return them\n if (!Array.isArray(flags)) {\n return { p: flags };\n }\n\n const plainFlags: Record = {};\n // returns all available plain flags\n const resolvedPlainFlags = requestContext.flags?.getValues() ?? {};\n\n for (const flag of flags) {\n if (typeof flag === 'string') {\n // only picks the desired flags\n plainFlags[flag] = resolvedPlainFlags[flag];\n } else {\n // merge user-provided values with resolved values\n Object.assign(plainFlags, flag);\n }\n }\n\n return { p: plainFlags };\n } catch {\n /* empty */\n }\n}\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegEx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GAAG;AACzB,aAAO,EAAE,GAAG,MAAM;AAAA,IACpB;AAEA,UAAM,aAAsC,CAAC;AAE7C,UAAM,uBAAqB,oBAAe,UAAf,mBAAsB,gBAAe,CAAC;AAEjE,eAAW,QAAQ,OAAO;AACxB,UAAI,OAAO,SAAS,UAAU;AAE5B,mBAAW,IAAI,IAAI,mBAAmB,IAAI;AAAA,MAC5C,OAAO;AAEL,eAAO,OAAO,YAAY,IAAI;AAAA,MAChC;AAAA,IACF;AAEA,WAAO,EAAE,GAAG,WAAW;AAAA,EACzB,QAAQ;AAAA,EAER;AACF;","names":[]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.mjs b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.mjs
deleted file mode 100644
index 37adf02..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.mjs
+++ /dev/null
@@ -1,176 +0,0 @@
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isProduction() {
- return getMode() === "production";
-}
-function removeKey(key, { [key]: _, ...rest }) {
- return rest;
-}
-function parseProperties(properties, options) {
- if (!properties)
- return void 0;
- let props = properties;
- const errorProperties = [];
- for (const [key, value] of Object.entries(properties)) {
- if (typeof value === "object" && value !== null) {
- if (options.strip) {
- props = removeKey(key, props);
- } else {
- errorProperties.push(key);
- }
- }
- }
- if (errorProperties.length > 0 && !options.strip) {
- throw Error(
- `The following properties are not valid: ${errorProperties.join(
- ", "
- )}. Only strings, numbers, booleans, and null are allowed.`
- );
- }
- return props;
-}
-
-// src/server/index.ts
-function isHeaders(headers) {
- if (!headers)
- return false;
- return typeof headers.entries === "function";
-}
-var symbol = Symbol.for("@vercel/request-context");
-var logPrefix = "[Vercel Web Analytics]";
-async function track(eventName, properties, options) {
- var _a;
- const ENDPOINT = process.env.VERCEL_WEB_ANALYTICS_ENDPOINT || process.env.VERCEL_URL;
- const DISABLE_LOGS = Boolean(process.env.VERCEL_WEB_ANALYTICS_DISABLE_LOGS);
- const BYPASS_SECRET = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
- if (typeof window !== "undefined") {
- if (!isProduction()) {
- throw new Error(
- `${logPrefix} It seems like you imported the \`track\` function from \`@vercel/web-analytics/server\` in a browser environment. This function is only meant to be used in a server environment.`
- );
- }
- return;
- }
- const props = parseProperties(properties, {
- strip: isProduction()
- });
- if (!ENDPOINT) {
- if (isProduction()) {
- console.log(
- `${logPrefix} Can't find VERCEL_URL in environment variables.`
- );
- } else if (!DISABLE_LOGS) {
- console.log(
- `${logPrefix} Track "${eventName}" ${props ? `with data ${JSON.stringify(props)}` : ""}`
- );
- }
- return;
- }
- try {
- const requestContext = (_a = globalThis[symbol]) == null ? void 0 : _a.get();
- let headers;
- if (options && "headers" in options) {
- headers = options.headers;
- } else if (options == null ? void 0 : options.request) {
- headers = options.request.headers;
- } else if (requestContext == null ? void 0 : requestContext.headers) {
- headers = requestContext.headers;
- }
- let tmp = {};
- if (headers && isHeaders(headers)) {
- headers.forEach((value, key) => {
- tmp[key] = value;
- });
- } else if (headers) {
- tmp = headers;
- }
- const origin = (requestContext == null ? void 0 : requestContext.url) || tmp.referer || `https://${ENDPOINT}`;
- const url = new URL(origin);
- const body = {
- o: origin,
- ts: (/* @__PURE__ */ new Date()).getTime(),
- r: "",
- en: eventName,
- ed: props,
- f: safeGetFlags(options == null ? void 0 : options.flags, requestContext)
- };
- const hasHeaders = Boolean(headers);
- if (!hasHeaders) {
- throw new Error(
- "No session context found. Pass `request` or `headers` to the `track` function."
- );
- }
- const promise = fetch(`${url.origin}/_vercel/insights/event`, {
- headers: {
- "content-type": "application/json",
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- The throwing is temporary until we add support for non Vercel hosted environments
- ...hasHeaders ? {
- "user-agent": tmp["user-agent"],
- "x-vercel-ip": tmp["x-forwarded-for"],
- "x-va-server": "1",
- cookie: tmp.cookie
- } : {
- "x-va-server": "2"
- },
- ...BYPASS_SECRET ? { "x-vercel-protection-bypass": BYPASS_SECRET } : {}
- },
- body: JSON.stringify(body),
- method: "POST"
- }).then((response) => response.text()).catch((err) => {
- if (err instanceof Error && "response" in err) {
- console.error(err.response);
- } else {
- console.error(err);
- }
- });
- if (requestContext == null ? void 0 : requestContext.waitUntil) {
- requestContext.waitUntil(promise);
- } else {
- await promise;
- }
- return void 0;
- } catch (err) {
- console.error(err);
- }
-}
-function safeGetFlags(flags, requestContext) {
- var _a;
- try {
- if (!requestContext || !flags)
- return;
- if (!Array.isArray(flags)) {
- return { p: flags };
- }
- const plainFlags = {};
- const resolvedPlainFlags = ((_a = requestContext.flags) == null ? void 0 : _a.getValues()) ?? {};
- for (const flag of flags) {
- if (typeof flag === "string") {
- plainFlags[flag] = resolvedPlainFlags[flag];
- } else {
- Object.assign(plainFlags, flag);
- }
- }
- return { p: plainFlags };
- } catch {
- }
-}
-export {
- track
-};
-//# sourceMappingURL=index.mjs.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.mjs.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.mjs.map
deleted file mode 100644
index 46bcb38..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/server/index.mjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/utils.ts","../../src/server/index.ts"],"sourcesContent":["import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","/* eslint-disable no-console -- Allow logging on the server */\nimport type {\n AllowedPropertyValues,\n FlagsDataInput,\n PlainFlags,\n} from '../types';\nimport { isProduction, parseProperties } from '../utils';\n\ntype HeadersObject = Record;\ntype AllowedHeaders = Headers | HeadersObject;\n\nfunction isHeaders(headers?: AllowedHeaders): headers is Headers {\n if (!headers) return false;\n return typeof (headers as HeadersObject).entries === 'function';\n}\n\ninterface Options {\n flags?: FlagsDataInput;\n headers?: AllowedHeaders;\n request?: { headers: AllowedHeaders };\n}\n\ninterface RequestContext {\n get: () => {\n headers: Record;\n url: string;\n waitUntil?: (promise: Promise) => void;\n flags?: {\n getValues: () => PlainFlags;\n reportValue: (key: string, value: unknown) => void;\n };\n };\n}\n\nconst symbol = Symbol.for('@vercel/request-context');\nconst logPrefix = '[Vercel Web Analytics]';\n\nexport async function track(\n eventName: string,\n properties?: Record,\n options?: Options\n): Promise {\n const ENDPOINT =\n process.env.VERCEL_WEB_ANALYTICS_ENDPOINT || process.env.VERCEL_URL;\n const DISABLE_LOGS = Boolean(process.env.VERCEL_WEB_ANALYTICS_DISABLE_LOGS);\n const BYPASS_SECRET = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;\n\n if (typeof window !== 'undefined') {\n if (!isProduction()) {\n throw new Error(\n `${logPrefix} It seems like you imported the \\`track\\` function from \\`@vercel/web-analytics/server\\` in a browser environment. This function is only meant to be used in a server environment.`\n );\n }\n\n return;\n }\n\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n if (!ENDPOINT) {\n if (isProduction()) {\n console.log(\n `${logPrefix} Can't find VERCEL_URL in environment variables.`\n );\n } else if (!DISABLE_LOGS) {\n console.log(\n `${logPrefix} Track \"${eventName}\" ${\n props ? `with data ${JSON.stringify(props)}` : ''\n }`\n );\n }\n return;\n }\n try {\n const requestContext = (\n (globalThis as never)[symbol] as RequestContext | undefined\n )?.get();\n\n let headers: AllowedHeaders | undefined;\n\n if (options && 'headers' in options) {\n headers = options.headers;\n } else if (options?.request) {\n headers = options.request.headers;\n } else if (requestContext?.headers) {\n // not explicitly passed in context, so take it from async storage\n headers = requestContext.headers;\n }\n\n let tmp: HeadersObject = {};\n if (headers && isHeaders(headers)) {\n headers.forEach((value, key) => {\n tmp[key] = value;\n });\n } else if (headers) {\n tmp = headers;\n }\n\n const origin =\n requestContext?.url || (tmp.referer as string) || `https://${ENDPOINT}`;\n\n const url = new URL(origin);\n\n const body = {\n o: origin,\n ts: new Date().getTime(),\n r: '',\n en: eventName,\n ed: props,\n f: safeGetFlags(options?.flags, requestContext),\n };\n\n const hasHeaders = Boolean(headers);\n\n if (!hasHeaders) {\n throw new Error(\n 'No session context found. Pass `request` or `headers` to the `track` function.'\n );\n }\n\n const promise = fetch(`${url.origin}/_vercel/insights/event`, {\n headers: {\n 'content-type': 'application/json',\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- The throwing is temporary until we add support for non Vercel hosted environments\n ...(hasHeaders\n ? {\n 'user-agent': tmp['user-agent'] as string,\n 'x-vercel-ip': tmp['x-forwarded-for'] as string,\n 'x-va-server': '1',\n cookie: tmp.cookie as string,\n }\n : {\n 'x-va-server': '2',\n }),\n ...(BYPASS_SECRET\n ? { 'x-vercel-protection-bypass': BYPASS_SECRET }\n : {}),\n },\n body: JSON.stringify(body),\n method: 'POST',\n })\n // We want to always consume the body; some cloud providers track fetch concurrency\n // and may not release the connection until the body is consumed.\n .then((response) => response.text())\n .catch((err: unknown) => {\n if (err instanceof Error && 'response' in err) {\n console.error(err.response);\n } else {\n console.error(err);\n }\n });\n\n if (requestContext?.waitUntil) {\n requestContext.waitUntil(promise);\n } else {\n await promise;\n }\n\n return void 0;\n } catch (err) {\n console.error(err);\n }\n}\n\nfunction safeGetFlags(\n flags: Options['flags'],\n requestContext?: ReturnType\n):\n | {\n p: PlainFlags;\n }\n | undefined {\n try {\n if (!requestContext || !flags) return;\n // In the case plain flags are passed, just return them\n if (!Array.isArray(flags)) {\n return { p: flags };\n }\n\n const plainFlags: Record = {};\n // returns all available plain flags\n const resolvedPlainFlags = requestContext.flags?.getValues() ?? {};\n\n for (const flag of flags) {\n if (typeof flag === 'string') {\n // only picks the desired flags\n plainFlags[flag] = resolvedPlainFlags[flag];\n } else {\n // merge user-provided values with resolved values\n Object.assign(plainFlags, flag);\n }\n }\n\n return { p: plainFlags };\n } catch {\n /* empty */\n }\n}\n"],"mappings":";AAEO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,SAAS,GAAG;AAAA,EAEZ;AACA,SAAO;AACT;AAWO,SAAS,UAAgB;AAC9B,QAAM,OAAO,UAAU,IAAI,OAAO,MAAM,kBAAkB;AAC1D,SAAO,QAAQ;AACjB;AAEO,SAAS,eAAwB;AACtC,SAAO,QAAQ,MAAM;AACvB;AAMA,SAAS,UACP,KACA,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,KAAK,GACK;AACzB,SAAO;AACT;AAEO,SAAS,gBACd,YACA,SAG2D;AAC3D,MAAI,CAAC;AAAY,WAAO;AACxB,MAAI,QAAQ;AACZ,QAAM,kBAA4B,CAAC;AACnC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,UAAU,GAAG;AACrD,QAAI,OAAO,UAAU,YAAY,UAAU,MAAM;AAC/C,UAAI,QAAQ,OAAO;AACjB,gBAAQ,UAAU,KAAK,KAAK;AAAA,MAC9B,OAAO;AACL,wBAAgB,KAAK,GAAG;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAEA,MAAI,gBAAgB,SAAS,KAAK,CAAC,QAAQ,OAAO;AAChD,UAAM;AAAA,MACJ,2CAA2C,gBAAgB;AAAA,QACzD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AG;AAAA,EACnB;AACF;AAEA,SAAS,aACP,OACA,gBAKY;AA7Kd;AA8KE,MAAI;AACF,QAAI,CAAC,kBAAkB,CAAC;AAAO;AAE/B,QAAI,CAAC,MAAM,QAAQ,KAAK,GAAG;AACzB,aAAO,EAAE,GAAG,MAAM;AAAA,IACpB;AAEA,UAAM,aAAsC,CAAC;AAE7C,UAAM,uBAAqB,oBAAe,UAAf,mBAAsB,gBAAe,CAAC;AAEjE,eAAW,QAAQ,OAAO;AACxB,UAAI,OAAO,SAAS,UAAU;AAE5B,mBAAW,IAAI,IAAI,mBAAmB,IAAI;AAAA,MAC5C,OAAO;AAEL,eAAO,OAAO,YAAY,IAAI;AAAA,MAChC;AAAA,IACF;AAEA,WAAO,EAAE,GAAG,WAAW;AAAA,EACzB,QAAQ;AAAA,EAER;AACF;","names":[]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.d.mts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.d.mts
deleted file mode 100644
index 5def0f9..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.d.mts
+++ /dev/null
@@ -1,46 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type AllowedPropertyValues = string | number | boolean | null;
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-type PlainFlags = Record;
-type FlagsDataInput = (string | PlainFlags)[] | PlainFlags;
-
-/**
- * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.
- * @param name - The name of the event.
- * * Examples: `Purchase`, `Click Button`, or `Play Video`.
- * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.
- */
-declare function track(name: string, properties?: Record, options?: {
- flags?: FlagsDataInput;
-}): void;
-
-declare function injectAnalytics(props?: Omit): void;
-
-export { AnalyticsProps, BeforeSend, BeforeSendEvent, injectAnalytics, track };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.d.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.d.ts
deleted file mode 100644
index 5def0f9..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type AllowedPropertyValues = string | number | boolean | null;
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-type PlainFlags = Record;
-type FlagsDataInput = (string | PlainFlags)[] | PlainFlags;
-
-/**
- * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.
- * @param name - The name of the event.
- * * Examples: `Purchase`, `Click Button`, or `Play Video`.
- * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.
- */
-declare function track(name: string, properties?: Record, options?: {
- flags?: FlagsDataInput;
-}): void;
-
-declare function injectAnalytics(props?: Omit): void;
-
-export { AnalyticsProps, BeforeSend, BeforeSendEvent, injectAnalytics, track };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.js
deleted file mode 100644
index 87aeba1..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.js
+++ /dev/null
@@ -1,201 +0,0 @@
-"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 name2 in all)
- __defProp(target, name2, { get: all[name2], 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/sveltekit/index.ts
-var sveltekit_exports = {};
-__export(sveltekit_exports, {
- injectAnalytics: () => injectAnalytics,
- track: () => track
-});
-module.exports = __toCommonJS(sveltekit_exports);
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isProduction() {
- return getMode() === "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function removeKey(key, { [key]: _, ...rest }) {
- return rest;
-}
-function parseProperties(properties, options) {
- if (!properties)
- return void 0;
- let props = properties;
- const errorProperties = [];
- for (const [key, value] of Object.entries(properties)) {
- if (typeof value === "object" && value !== null) {
- if (options.strip) {
- props = removeKey(key, props);
- } else {
- errorProperties.push(key);
- }
- }
- }
- if (errorProperties.length > 0 && !options.strip) {
- throw Error(
- `The following properties are not valid: ${errorProperties.join(
- ", "
- )}. Only strings, numbers, booleans, and null are allowed.`
- );
- }
- return props;
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function track(name2, properties, options) {
- var _a, _b;
- if (!isBrowser()) {
- const msg = "[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";
- if (isProduction()) {
- console.warn(msg);
- } else {
- throw new Error(msg);
- }
- return;
- }
- if (!properties) {
- (_a = window.va) == null ? void 0 : _a.call(window, "event", { name: name2, options });
- return;
- }
- try {
- const props = parseProperties(properties, {
- strip: isProduction()
- });
- (_b = window.va) == null ? void 0 : _b.call(window, "event", {
- name: name2,
- data: props,
- options
- });
- } catch (err) {
- if (err instanceof Error && isDevelopment()) {
- console.error(err);
- }
- }
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/sveltekit/index.ts
-var import_stores = require("$app/stores");
-var import_environment = require("$app/environment");
-function injectAnalytics(props = {}) {
- if (import_environment.browser) {
- inject({
- ...props,
- disableAutoTrack: true,
- framework: "sveltekit"
- });
- import_stores.page.subscribe(({ route, url }) => {
- if (route == null ? void 0 : route.id) {
- pageview({ route: route.id, path: url.pathname });
- }
- });
- }
-}
-// Annotate the CommonJS export names for ESM import in node:
-0 && (module.exports = {
- injectAnalytics,
- track
-});
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.js.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.js.map
deleted file mode 100644
index cc874e5..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/sveltekit/index.ts","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts"],"sourcesContent":["import { inject, pageview, track } from '../generic';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { page } from '$app/stores';\nimport { browser } from '$app/environment';\nimport type {} from '@sveltejs/kit';\n\nfunction injectAnalytics(props: Omit = {}): void {\n if (browser) {\n inject({\n ...props,\n disableAutoTrack: true,\n framework: 'sveltekit',\n });\n\n page.subscribe(({ route, url }) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- route could be undefined in layout.js file\n if (route?.id) {\n pageview({ route: route.id, path: url.pathname });\n }\n });\n }\n}\n\nexport { injectAnalytics, track };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCE,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW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AAA,IACtB,CAAC;AAED,iBAAO,OAAP,gCAAY,SAAS;AAAA,MACnB,MAAAA;AAAA,MACA,MAAM;AAAA,MACN;AAAA,IACF;AAAA,EACF,SAAS,KAAK;AACZ,QAAI,eAAe,SAAS,cAAc,GAAG;AAE3C,cAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF;AAEA,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AACF,GAGS;AApJT;AAqJE,eAAO,OAAP,gCAAY,YAAY,EAAE,OAAO,KAAK;AACxC;;;AJpJA,oBAAqB;AACrB,yBAAwB;AAGxB,SAAS,gBAAgB,QAA2C,CAAC,GAAS;AAC5E,MAAI,4BAAS;AACX,WAAO;AAAA,MACL,GAAG;AAAA,MACH,kBAAkB;AAAA,MAClB,WAAW;AAAA,IACb,CAAC;AAED,uBAAK,UAAU,CAAC,EAAE,OAAO,IAAI,MAAM;AAEjC,UAAI,+BAAO,IAAI;AACb,iBAAS,EAAE,OAAO,MAAM,IAAI,MAAM,IAAI,SAAS,CAAC;AAAA,MAClD;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":["name"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.mjs b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.mjs
deleted file mode 100644
index 4c829c2..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.mjs
+++ /dev/null
@@ -1,173 +0,0 @@
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isProduction() {
- return getMode() === "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function removeKey(key, { [key]: _, ...rest }) {
- return rest;
-}
-function parseProperties(properties, options) {
- if (!properties)
- return void 0;
- let props = properties;
- const errorProperties = [];
- for (const [key, value] of Object.entries(properties)) {
- if (typeof value === "object" && value !== null) {
- if (options.strip) {
- props = removeKey(key, props);
- } else {
- errorProperties.push(key);
- }
- }
- }
- if (errorProperties.length > 0 && !options.strip) {
- throw Error(
- `The following properties are not valid: ${errorProperties.join(
- ", "
- )}. Only strings, numbers, booleans, and null are allowed.`
- );
- }
- return props;
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function track(name2, properties, options) {
- var _a, _b;
- if (!isBrowser()) {
- const msg = "[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";
- if (isProduction()) {
- console.warn(msg);
- } else {
- throw new Error(msg);
- }
- return;
- }
- if (!properties) {
- (_a = window.va) == null ? void 0 : _a.call(window, "event", { name: name2, options });
- return;
- }
- try {
- const props = parseProperties(properties, {
- strip: isProduction()
- });
- (_b = window.va) == null ? void 0 : _b.call(window, "event", {
- name: name2,
- data: props,
- options
- });
- } catch (err) {
- if (err instanceof Error && isDevelopment()) {
- console.error(err);
- }
- }
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/sveltekit/index.ts
-import { page } from "$app/stores";
-import { browser } from "$app/environment";
-function injectAnalytics(props = {}) {
- if (browser) {
- inject({
- ...props,
- disableAutoTrack: true,
- framework: "sveltekit"
- });
- page.subscribe(({ route, url }) => {
- if (route == null ? void 0 : route.id) {
- pageview({ route: route.id, path: url.pathname });
- }
- });
- }
-}
-export {
- injectAnalytics,
- track
-};
-//# sourceMappingURL=index.mjs.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.mjs.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.mjs.map
deleted file mode 100644
index 85e9834..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/sveltekit/index.mjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts","../../src/sveltekit/index.ts"],"sourcesContent":["{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n","import { inject, pageview, track } from '../generic';\nimport type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { page } from '$app/stores';\nimport { browser } from '$app/environment';\nimport type {} from '@sveltejs/kit';\n\nfunction injectAnalytics(props: Omit = {}): void {\n if (browser) {\n inject({\n ...props,\n disableAutoTrack: true,\n framework: 'sveltekit',\n });\n\n page.subscribe(({ route, url }) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- route could be undefined in layout.js file\n if (route?.id) {\n pageview({ route: route.id, path: url.pathname });\n }\n });\n }\n}\n\nexport { injectAnalytics, track };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n"],"mappings":";AACE,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,SAAS,GAAG;AAAA,EAEZ;AACA,SAAO;AACT;AAEO,SAAS,QAAQ,OAAa,QAAc;AACjD,MAAI,SAAS,QAAQ;AACnB,WAAO,MAAM,kB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AGS;AApJT;AAqJE,eAAO,OAAP,gCAAY,YAAY,EAAE,OAAO,KAAK;AACxC;;;ACpJA,SAAS,YAAY;AACrB,SAAS,eAAe;AAGxB,SAAS,gBAAgB,QAA2C,CAAC,GAAS;AAC5E,MAAI,SAAS;AACX,WAAO;AAAA,MACL,GAAG;AAAA,MACH,kBAAkB;AAAA,MAClB,WAAW;AAAA,IACb,CAAC;AAED,SAAK,UAAU,CAAC,EAAE,OAAO,IAAI,MAAM;AAEjC,UAAI,+BAAO,IAAI;AACb,iBAAS,EAAE,OAAO,MAAM,IAAI,MAAM,IAAI,SAAS,CAAC;AAAA,MAClD;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":["name"]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.d.mts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.d.mts
deleted file mode 100644
index d5d346c..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.d.mts
+++ /dev/null
@@ -1,33 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-
-declare const Analytics: any;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.d.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.d.ts
deleted file mode 100644
index d5d346c..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.d.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-interface PageViewEvent {
- type: 'pageview';
- url: string;
-}
-interface CustomEvent {
- type: 'event';
- url: string;
-}
-type BeforeSendEvent = PageViewEvent | CustomEvent;
-type Mode = 'auto' | 'development' | 'production';
-type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null;
-interface AnalyticsProps {
- beforeSend?: BeforeSend;
- debug?: boolean;
- mode?: Mode;
- scriptSrc?: string;
- endpoint?: string;
- dsn?: string;
-}
-declare global {
- interface Window {
- va?: (event: 'beforeSend' | 'event' | 'pageview', properties?: unknown) => void;
- vaq?: [string, unknown?][];
- vai?: boolean;
- vam?: Mode;
- /** used by Astro component only */
- webAnalyticsBeforeSend?: BeforeSend;
- }
-}
-
-declare const Analytics: any;
-
-export { Analytics, AnalyticsProps, BeforeSend, BeforeSendEvent };
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.js
deleted file mode 100644
index 33a584b..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.js
+++ /dev/null
@@ -1,193 +0,0 @@
-"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 name2 in all)
- __defProp(target, name2, { get: all[name2], 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/vue/index.ts
-var vue_exports = {};
-__export(vue_exports, {
- Analytics: () => Analytics
-});
-module.exports = __toCommonJS(vue_exports);
-
-// src/vue/create-component.ts
-var import_vue = require("vue");
-var import_vue_router = require("vue-router");
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/vue/create-component.ts
-function createComponent(framework = "vue") {
- return (0, import_vue.defineComponent)({
- props: ["dsn", "beforeSend", "debug", "scriptSrc", "endpoint", "mode"],
- setup(props) {
- const route = (0, import_vue_router.useRoute)();
- inject({
- ...props,
- // keep auto-tracking unless we have route support (Nuxt or vue-router).
- disableAutoTrack: Boolean(route),
- framework
- });
- if (route && typeof window !== "undefined") {
- const changeRoute = () => {
- pageview({
- route: computeRoute(route.path, route.params),
- path: route.path
- });
- };
- changeRoute();
- (0, import_vue.watch)(route, changeRoute);
- }
- },
- // Vue component must have a render function, or a template.
- render() {
- return null;
- }
- });
-}
-
-// src/vue/index.ts
-var Analytics = createComponent();
-// Annotate the CommonJS export names for ESM import in node:
-0 && (module.exports = {
- Analytics
-});
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.js.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.js.map
deleted file mode 100644
index 0e77966..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/vue/index.ts","../../src/vue/create-component.ts","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts"],"sourcesContent":["import type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { createComponent } from './create-component';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- vue's defineComponent return type is any\nexport const Analytics = createComponent();\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n","import { defineComponent, watch } from 'vue';\n// for barebone vue project, vite will issue a warning since 'vue-router' import can't be resolved,\nimport { useRoute } from 'vue-router';\nimport { inject, pageview, type AnalyticsProps } from '../generic';\nimport { computeRoute } from '../utils';\n\nexport function createComponent(\n framework = 'vue'\n): ReturnType {\n return defineComponent({\n props: ['dsn', 'beforeSend', 'debug', 'scriptSrc', 'endpoint', 'mode'],\n setup(props: Omit) {\n // eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a React component.\n const route = useRoute();\n inject({\n ...props,\n // keep auto-tracking unless we have route support (Nuxt or vue-router).\n disableAutoTrack: Boolean(route),\n framework,\n });\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- route is undefined for barebone vue project.\n if (route && typeof window !== 'undefined') {\n const changeRoute = (): void => {\n pageview({\n route: computeRoute(route.path, route.params),\n path: route.path,\n });\n };\n changeRoute();\n watch(route, changeRoute);\n }\n },\n // Vue component must have a render function, or a template.\n render() {\n return null;\n },\n });\n}\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBAAuC;AAEvC,wBAAyB;;;ACDvB,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,SAAS,GAAG;AAAA,EAEZ;AACA,SAAO;AACT;AAEO,SAAS,QAAQ,OAAa,QAAc;AACjD,MAAI,SAAS,QAAQ;AACnB,WAAO,MAAM,kBAAkB;AAC/B;AAAA,EACF;AAEA,SAAO,MAAM;AACf;AAEO,SAAS,UAAgB;AAC9B,QAAM,OAAO,UAAU,IAAI,OAAO,MAAM,kBAAkB;AAC1D,SAAO,QAAQ;AACjB;AAMO,SAAS,gBAAyB;AACvC,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,MAC1B;AAAA,IACF;AAAA;AAAA,IAEA,SAAS;AACP,aAAO;AAAA,IACT;AAAA,EACF,CAAC;AACH;;;ADjCO,IAAM,YAAY,gBAAgB;","names":[]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.mjs b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.mjs
deleted file mode 100644
index 6445524..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.mjs
+++ /dev/null
@@ -1,166 +0,0 @@
-// src/vue/create-component.ts
-import { defineComponent, watch } from "vue";
-import { useRoute } from "vue-router";
-
-// package.json
-var name = "@vercel/analytics";
-var version = "1.4.1";
-
-// src/queue.ts
-var initQueue = () => {
- if (window.va)
- return;
- window.va = function a(...params) {
- (window.vaq = window.vaq || []).push(params);
- };
-};
-
-// src/utils.ts
-function isBrowser() {
- return typeof window !== "undefined";
-}
-function detectEnvironment() {
- try {
- const env = process.env.NODE_ENV;
- if (env === "development" || env === "test") {
- return "development";
- }
- } catch (e) {
- }
- return "production";
-}
-function setMode(mode = "auto") {
- if (mode === "auto") {
- window.vam = detectEnvironment();
- return;
- }
- window.vam = mode;
-}
-function getMode() {
- const mode = isBrowser() ? window.vam : detectEnvironment();
- return mode || "production";
-}
-function isDevelopment() {
- return getMode() === "development";
-}
-function computeRoute(pathname, pathParams) {
- if (!pathname || !pathParams) {
- return pathname;
- }
- let result = pathname;
- try {
- const entries = Object.entries(pathParams);
- for (const [key, value] of entries) {
- if (!Array.isArray(value)) {
- const matcher = turnValueToRegExp(value);
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[${key}]`);
- }
- }
- }
- for (const [key, value] of entries) {
- if (Array.isArray(value)) {
- const matcher = turnValueToRegExp(value.join("/"));
- if (matcher.test(result)) {
- result = result.replace(matcher, `/[...${key}]`);
- }
- }
- }
- return result;
- } catch (e) {
- return pathname;
- }
-}
-function turnValueToRegExp(value) {
- return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);
-}
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-// src/generic.ts
-var DEV_SCRIPT_URL = "https://va.vercel-scripts.com/v1/script.debug.js";
-var PROD_SCRIPT_URL = "/_vercel/insights/script.js";
-function inject(props = {
- debug: true
-}) {
- var _a;
- if (!isBrowser())
- return;
- setMode(props.mode);
- initQueue();
- if (props.beforeSend) {
- (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend);
- }
- const src = props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);
- if (document.head.querySelector(`script[src*="${src}"]`))
- return;
- const script = document.createElement("script");
- script.src = src;
- script.defer = true;
- script.dataset.sdkn = name + (props.framework ? `/${props.framework}` : "");
- script.dataset.sdkv = version;
- if (props.disableAutoTrack) {
- script.dataset.disableAutoTrack = "1";
- }
- if (props.endpoint) {
- script.dataset.endpoint = props.endpoint;
- }
- if (props.dsn) {
- script.dataset.dsn = props.dsn;
- }
- script.onerror = () => {
- const errorMessage = isDevelopment() ? "Please check if any ad blockers are enabled and try again." : "Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";
- console.log(
- `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`
- );
- };
- if (isDevelopment() && props.debug === false) {
- script.dataset.debug = "false";
- }
- document.head.appendChild(script);
-}
-function pageview({
- route,
- path
-}) {
- var _a;
- (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path });
-}
-
-// src/vue/create-component.ts
-function createComponent(framework = "vue") {
- return defineComponent({
- props: ["dsn", "beforeSend", "debug", "scriptSrc", "endpoint", "mode"],
- setup(props) {
- const route = useRoute();
- inject({
- ...props,
- // keep auto-tracking unless we have route support (Nuxt or vue-router).
- disableAutoTrack: Boolean(route),
- framework
- });
- if (route && typeof window !== "undefined") {
- const changeRoute = () => {
- pageview({
- route: computeRoute(route.path, route.params),
- path: route.path
- });
- };
- changeRoute();
- watch(route, changeRoute);
- }
- },
- // Vue component must have a render function, or a template.
- render() {
- return null;
- }
- });
-}
-
-// src/vue/index.ts
-var Analytics = createComponent();
-export {
- Analytics
-};
-//# sourceMappingURL=index.mjs.map
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.mjs.map b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.mjs.map
deleted file mode 100644
index edce086..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/dist/vue/index.mjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../src/vue/create-component.ts","../../package.json","../../src/queue.ts","../../src/utils.ts","../../src/generic.ts","../../src/vue/index.ts"],"sourcesContent":["import { defineComponent, watch } from 'vue';\n// for barebone vue project, vite will issue a warning since 'vue-router' import can't be resolved,\nimport { useRoute } from 'vue-router';\nimport { inject, pageview, type AnalyticsProps } from '../generic';\nimport { computeRoute } from '../utils';\n\nexport function createComponent(\n framework = 'vue'\n): ReturnType {\n return defineComponent({\n props: ['dsn', 'beforeSend', 'debug', 'scriptSrc', 'endpoint', 'mode'],\n setup(props: Omit) {\n // eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a React component.\n const route = useRoute();\n inject({\n ...props,\n // keep auto-tracking unless we have route support (Nuxt or vue-router).\n disableAutoTrack: Boolean(route),\n framework,\n });\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- route is undefined for barebone vue project.\n if (route && typeof window !== 'undefined') {\n const changeRoute = (): void => {\n pageview({\n route: computeRoute(route.path, route.params),\n path: route.path,\n });\n };\n changeRoute();\n watch(route, changeRoute);\n }\n },\n // Vue component must have a render function, or a template.\n render() {\n return null;\n },\n });\n}\n","{\n \"name\": \"@vercel/analytics\",\n \"version\": \"1.4.1\",\n \"description\": \"Gain real-time traffic insights with Vercel Web Analytics\",\n \"keywords\": [\n \"analytics\",\n \"vercel\"\n ],\n \"repository\": {\n \"url\": \"github:vercel/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.mjs\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./astro\": {\n \"import\": \"./dist/astro/component.ts\"\n },\n \"./next\": {\n \"browser\": \"./dist/next/index.mjs\",\n \"import\": \"./dist/next/index.mjs\",\n \"require\": \"./dist/next/index.js\"\n },\n \"./nuxt\": {\n \"browser\": \"./dist/nuxt/index.mjs\",\n \"import\": \"./dist/nuxt/index.mjs\",\n \"require\": \"./dist/nuxt/index.js\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.mjs\",\n \"import\": \"./dist/react/index.mjs\",\n \"require\": \"./dist/react/index.js\"\n },\n \"./remix\": {\n \"browser\": \"./dist/remix/index.mjs\",\n \"import\": \"./dist/remix/index.mjs\",\n \"require\": \"./dist/remix/index.js\"\n },\n \"./server\": {\n \"node\": \"./dist/server/index.js\",\n \"edge-light\": \"./dist/server/index.mjs\",\n \"import\": \"./dist/server/index.mjs\",\n \"require\": \"./dist/server/index.js\",\n \"default\": \"./dist/server/index.js\"\n },\n \"./sveltekit\": {\n \"svelte\": \"./dist/sveltekit/index.mjs\",\n \"types\": \"./dist/sveltekit/index.d.ts\"\n },\n \"./vue\": {\n \"browser\": \"./dist/vue/index.mjs\",\n \"import\": \"./dist/vue/index.mjs\",\n \"require\": \"./dist/vue/index.js\"\n }\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"next\": [\n \"dist/next/index.d.ts\"\n ],\n \"nuxt\": [\n \"dist/nuxt/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ],\n \"remix\": [\n \"dist/remix/index.d.ts\"\n ],\n \"server\": [\n \"dist/server/index.d.ts\"\n ],\n \"sveltekit\": [\n \"dist/sveltekit/index.d.ts\"\n ],\n \"vue\": [\n \"dist/vue/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm copy-astro\",\n \"copy-astro\": \"cp -R src/astro dist/\",\n \"dev\": \"pnpm copy-astro && tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"test\": \"jest\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@vercel/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n },\n \"ignorePatterns\": [\n \"jest.setup.ts\"\n ]\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^29.7.0\",\n \"@swc/core\": \"^1.8.0\",\n \"@swc/jest\": \"^0.2.37\",\n \"@testing-library/jest-dom\": \"^6.6.3\",\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/node\": \"^20.17.6\",\n \"@types/react\": \"^18.3.12\",\n \"@vercel/eslint-config\": \"workspace:0.0.0\",\n \"jest\": \"^29.7.0\",\n \"jest-environment-jsdom\": \"^29.7.0\",\n \"server-only\": \"^0.0.1\",\n \"svelte\": \"^5.1.10\",\n \"tsup\": \"7.1.0\",\n \"vue\": \"^3.5.12\",\n \"vue-router\": \"^4.4.5\"\n },\n \"peerDependencies\": {\n \"@remix-run/react\": \"^2\",\n \"@sveltejs/kit\": \"^1 || ^2\",\n \"next\": \">= 13\",\n \"react\": \"^18 || ^19 || ^19.0.0-rc\",\n \"svelte\": \">= 4\",\n \"vue\": \"^3\",\n \"vue-router\": \"^4\"\n },\n \"peerDependenciesMeta\": {\n \"@remix-run/react\": {\n \"optional\": true\n },\n \"@sveltejs/kit\": {\n \"optional\": true\n },\n \"next\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n },\n \"svelte\": {\n \"optional\": true\n },\n \"vue\": {\n \"optional\": true\n },\n \"vue-router\": {\n \"optional\": true\n }\n }\n}\n","export const initQueue = (): void => {\n // initialize va until script is loaded\n if (window.va) return;\n\n window.va = function a(...params): void {\n (window.vaq = window.vaq || []).push(params);\n };\n};\n","import type { AllowedPropertyValues, Mode } from './types';\n\nexport function isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction detectEnvironment(): 'development' | 'production' {\n try {\n const env = process.env.NODE_ENV;\n if (env === 'development' || env === 'test') {\n return 'development';\n }\n } catch (e) {\n // do nothing, this is okay\n }\n return 'production';\n}\n\nexport function setMode(mode: Mode = 'auto'): void {\n if (mode === 'auto') {\n window.vam = detectEnvironment();\n return;\n }\n\n window.vam = mode;\n}\n\nexport function getMode(): Mode {\n const mode = isBrowser() ? window.vam : detectEnvironment();\n return mode || 'production';\n}\n\nexport function isProduction(): boolean {\n return getMode() === 'production';\n}\n\nexport function isDevelopment(): boolean {\n return getMode() === 'development';\n}\n\nfunction removeKey(\n key: string,\n { [key]: _, ...rest }\n): Record {\n return rest;\n}\n\nexport function parseProperties(\n properties: Record | undefined,\n options: {\n strip?: boolean;\n }\n): Error | Record | undefined {\n if (!properties) return undefined;\n let props = properties;\n const errorProperties: string[] = [];\n for (const [key, value] of Object.entries(properties)) {\n if (typeof value === 'object' && value !== null) {\n if (options.strip) {\n props = removeKey(key, props);\n } else {\n errorProperties.push(key);\n }\n }\n }\n\n if (errorProperties.length > 0 && !options.strip) {\n throw Error(\n `The following properties are not valid: ${errorProperties.join(\n ', '\n )}. Only strings, numbers, booleans, and null are allowed.`\n );\n }\n return props as Record;\n}\n\nexport function computeRoute(\n pathname: string | null,\n pathParams: Record | null\n): string | null {\n if (!pathname || !pathParams) {\n return pathname;\n }\n\n let result = pathname;\n try {\n const entries = Object.entries(pathParams);\n // simple keys must be handled first\n for (const [key, value] of entries) {\n if (!Array.isArray(value)) {\n const matcher = turnValueToRegExp(value);\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[${key}]`);\n }\n }\n }\n // array values next\n for (const [key, value] of entries) {\n if (Array.isArray(value)) {\n const matcher = turnValueToRegExp(value.join('/'));\n if (matcher.test(result)) {\n result = result.replace(matcher, `/[...${key}]`);\n }\n }\n }\n return result;\n } catch (e) {\n return pathname;\n }\n}\n\nfunction turnValueToRegExp(value: string): RegExp {\n return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`);\n}\n\nfunction escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { name as packageName, version } from '../package.json';\nimport { initQueue } from './queue';\nimport type {\n AllowedPropertyValues,\n AnalyticsProps,\n FlagsDataInput,\n BeforeSend,\n BeforeSendEvent,\n} from './types';\nimport {\n isBrowser,\n parseProperties,\n setMode,\n isDevelopment,\n isProduction,\n computeRoute,\n} from './utils';\n\nexport const DEV_SCRIPT_URL =\n 'https://va.vercel-scripts.com/v1/script.debug.js';\nexport const PROD_SCRIPT_URL = '/_vercel/insights/script.js';\n\n/**\n * Injects the Vercel Web Analytics script into the page head and starts tracking page views. Read more in our [documentation](https://vercel.com/docs/concepts/analytics/package).\n * @param [props] - Analytics options.\n * @param [props.mode] - The mode to use for the analytics script. Defaults to `auto`.\n * - `auto` - Automatically detect the environment. Uses `production` if the environment cannot be determined.\n * - `production` - Always use the production script. (Sends events to the server)\n * - `development` - Always use the development script. (Logs events to the console)\n * @param [props.debug] - Whether to enable debug logging in development. Defaults to `true`.\n * @param [props.beforeSend] - A middleware function to modify events before they are sent. Should return the event object or `null` to cancel the event.\n * @param [props.dsn] - The DSN of the project to send events to. Only required when self-hosting.\n * @param [props.disableAutoTrack] - Whether the injected script should track page views from pushState events. Disable if route is updated after pushState, a manually call page pageview().\n */\nfunction inject(\n props: AnalyticsProps & {\n framework?: string;\n disableAutoTrack?: boolean;\n } = {\n debug: true,\n }\n): void {\n if (!isBrowser()) return;\n\n setMode(props.mode);\n\n initQueue();\n\n if (props.beforeSend) {\n window.va?.('beforeSend', props.beforeSend);\n }\n\n const src =\n props.scriptSrc || (isDevelopment() ? DEV_SCRIPT_URL : PROD_SCRIPT_URL);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = true;\n script.dataset.sdkn =\n packageName + (props.framework ? `/${props.framework}` : '');\n script.dataset.sdkv = version;\n\n if (props.disableAutoTrack) {\n script.dataset.disableAutoTrack = '1';\n }\n if (props.endpoint) {\n script.dataset.endpoint = props.endpoint;\n }\n if (props.dsn) {\n script.dataset.dsn = props.dsn;\n }\n\n script.onerror = (): void => {\n const errorMessage = isDevelopment()\n ? 'Please check if any ad blockers are enabled and try again.'\n : 'Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.';\n\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(\n `[Vercel Web Analytics] Failed to load script from ${src}. ${errorMessage}`\n );\n };\n\n if (isDevelopment() && props.debug === false) {\n script.dataset.debug = 'false';\n }\n\n document.head.appendChild(script);\n}\n\n/**\n * Tracks a custom event. Please refer to the [documentation](https://vercel.com/docs/concepts/analytics/custom-events) for more information on custom events.\n * @param name - The name of the event.\n * * Examples: `Purchase`, `Click Button`, or `Play Video`.\n * @param [properties] - Additional properties of the event. Nested objects are not supported. Allowed values are `string`, `number`, `boolean`, and `null`.\n */\nfunction track(\n name: string,\n properties?: Record,\n options?: {\n flags?: FlagsDataInput;\n }\n): void {\n if (!isBrowser()) {\n const msg =\n '[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment';\n\n if (isProduction()) {\n // eslint-disable-next-line no-console -- Show warning in production\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n\n return;\n }\n\n if (!properties) {\n window.va?.('event', { name, options });\n return;\n }\n\n try {\n const props = parseProperties(properties, {\n strip: isProduction(),\n });\n\n window.va?.('event', {\n name,\n data: props,\n options,\n });\n } catch (err) {\n if (err instanceof Error && isDevelopment()) {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.error(err);\n }\n }\n}\n\nfunction pageview({\n route,\n path,\n}: {\n route?: string | null;\n path?: string;\n}): void {\n window.va?.('pageview', { route, path });\n}\n\nexport { inject, track, pageview, computeRoute };\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n track,\n computeRoute,\n};\n","import type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types';\nimport { createComponent } from './create-component';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- vue's defineComponent return type is any\nexport const Analytics = createComponent();\nexport type { AnalyticsProps, BeforeSend, BeforeSendEvent };\n"],"mappings":";AAAA,SAAS,iBAAiB,aAAa;AAEvC,SAAS,gBAAgB;;;ACDvB,WAAQ;AACR,cAAW;;;ACFN,IAAM,YAAY,MAAY;AAEnC,MAAI,OAAO;AAAI;AAEf,SAAO,KAAK,SAAS,KAAK,QAAc;AACtC,KAAC,OAAO,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK,MAAM;AAAA,EAC7C;AACF;;;ACLO,SAAS,YAAqB;AACnC,SAAO,OAAO,WAAW;AAC3B;AAEA,SAAS,oBAAkD;AACzD,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,QAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,SAAS,GAAG;AAAA,EAEZ;AACA,SAAO;AACT;AAEO,SAAS,QAAQ,OAAa,QAAc;AACjD,MAAI,SAAS,QAAQ;AACnB,WAAO,MAAM,kBAAkB;AAC/B;AAAA,EACF;AAEA,SAAO,MAAM;AACf;AAEO,SAAS,UAAgB;AAC9B,QAAM,OAAO,UAAU,IAAI,OAAO,MAAM,kBAAkB;AAC1D,SAAO,QAAQ;AACjB;AAMO,SAAS,gBAAyB;AACvC,SA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1B;AAAA,IACF;AAAA;AAAA,IAEA,SAAS;AACP,aAAO;AAAA,IACT;AAAA,EACF,CAAC;AACH;;;AKjCO,IAAM,YAAY,gBAAgB;","names":[]}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/jest.config.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/jest.config.js
deleted file mode 100644
index f45b9dd..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/jest.config.js
+++ /dev/null
@@ -1,9 +0,0 @@
-module.exports = {
- testEnvironment: 'jsdom',
- transform: {
- '^.+\\.(t|j)sx?$': '@swc/jest',
- },
- coverageReporters: ['text', 'html'],
- setupFilesAfterEnv: ['/jest.setup.ts'],
- reporters: ['default', 'github-actions'],
-};
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/jest.setup.ts b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/jest.setup.ts
deleted file mode 100644
index 9321410..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/jest.setup.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { beforeEach } from '@jest/globals';
-import '@testing-library/jest-dom';
-// Adds helpers like `.toHaveAttribute`
-import '@testing-library/jest-dom/jest-globals';
-
-beforeEach(() => {
- // reset dom before each test
- const html = document.getElementsByTagName('html')[0];
- if (html) {
- html.innerHTML = '';
- }
-});
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/package.json b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/package.json
deleted file mode 100644
index c47f963..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/package.json
+++ /dev/null
@@ -1,160 +0,0 @@
-{
- "name": "@vercel/analytics",
- "version": "1.4.1",
- "description": "Gain real-time traffic insights with Vercel Web Analytics",
- "keywords": [
- "analytics",
- "vercel"
- ],
- "repository": {
- "url": "github:vercel/analytics",
- "directory": "packages/web"
- },
- "license": "MPL-2.0",
- "exports": {
- "./package.json": "./package.json",
- ".": {
- "browser": "./dist/index.mjs",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- },
- "./astro": {
- "import": "./dist/astro/component.ts"
- },
- "./next": {
- "browser": "./dist/next/index.mjs",
- "import": "./dist/next/index.mjs",
- "require": "./dist/next/index.js"
- },
- "./nuxt": {
- "browser": "./dist/nuxt/index.mjs",
- "import": "./dist/nuxt/index.mjs",
- "require": "./dist/nuxt/index.js"
- },
- "./react": {
- "browser": "./dist/react/index.mjs",
- "import": "./dist/react/index.mjs",
- "require": "./dist/react/index.js"
- },
- "./remix": {
- "browser": "./dist/remix/index.mjs",
- "import": "./dist/remix/index.mjs",
- "require": "./dist/remix/index.js"
- },
- "./server": {
- "node": "./dist/server/index.js",
- "edge-light": "./dist/server/index.mjs",
- "import": "./dist/server/index.mjs",
- "require": "./dist/server/index.js",
- "default": "./dist/server/index.js"
- },
- "./sveltekit": {
- "svelte": "./dist/sveltekit/index.mjs",
- "types": "./dist/sveltekit/index.d.ts"
- },
- "./vue": {
- "browser": "./dist/vue/index.mjs",
- "import": "./dist/vue/index.mjs",
- "require": "./dist/vue/index.js"
- }
- },
- "main": "./dist/index.mjs",
- "types": "./dist/index.d.ts",
- "typesVersions": {
- "*": {
- "*": [
- "dist/index.d.ts"
- ],
- "next": [
- "dist/next/index.d.ts"
- ],
- "nuxt": [
- "dist/nuxt/index.d.ts"
- ],
- "react": [
- "dist/react/index.d.ts"
- ],
- "remix": [
- "dist/remix/index.d.ts"
- ],
- "server": [
- "dist/server/index.d.ts"
- ],
- "sveltekit": [
- "dist/sveltekit/index.d.ts"
- ],
- "vue": [
- "dist/vue/index.d.ts"
- ]
- }
- },
- "eslintConfig": {
- "extends": [
- "@vercel/eslint-config"
- ],
- "rules": {
- "tsdoc/syntax": "off"
- },
- "ignorePatterns": [
- "jest.setup.ts"
- ]
- },
- "devDependencies": {
- "@jest/globals": "^29.7.0",
- "@swc/core": "^1.8.0",
- "@swc/jest": "^0.2.37",
- "@testing-library/jest-dom": "^6.6.3",
- "@testing-library/react": "^16.0.1",
- "@types/node": "^20.17.6",
- "@types/react": "^18.3.12",
- "@vercel/eslint-config": "0.0.0",
- "jest": "^29.7.0",
- "jest-environment-jsdom": "^29.7.0",
- "server-only": "^0.0.1",
- "svelte": "^5.1.10",
- "tsup": "7.1.0",
- "vue": "^3.5.12",
- "vue-router": "^4.4.5"
- },
- "peerDependencies": {
- "@remix-run/react": "^2",
- "@sveltejs/kit": "^1 || ^2",
- "next": ">= 13",
- "react": "^18 || ^19 || ^19.0.0-rc",
- "svelte": ">= 4",
- "vue": "^3",
- "vue-router": "^4"
- },
- "peerDependenciesMeta": {
- "@remix-run/react": {
- "optional": true
- },
- "@sveltejs/kit": {
- "optional": true
- },
- "next": {
- "optional": true
- },
- "react": {
- "optional": true
- },
- "svelte": {
- "optional": true
- },
- "vue": {
- "optional": true
- },
- "vue-router": {
- "optional": true
- }
- },
- "scripts": {
- "build": "tsup && pnpm copy-astro",
- "copy-astro": "cp -R src/astro dist/",
- "dev": "pnpm copy-astro && tsup --watch",
- "lint": "eslint .",
- "lint-fix": "eslint . --fix",
- "test": "jest",
- "type-check": "tsc --noEmit"
- }
-}
\ No newline at end of file
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/tsconfig.json b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/tsconfig.json
deleted file mode 100644
index 6a4fe18..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../tsconfig.json",
- "compilerOptions": {
- "module": "esnext"
- },
- "include": ["src", "./jest.setup.ts"]
-}
diff --git a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/tsup.config.js b/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/tsup.config.js
deleted file mode 100644
index e117ab4..0000000
--- a/peersync/node_modules/.pnpm/@vercel+analytics@1.4.1/node_modules/@vercel/analytics/tsup.config.js
+++ /dev/null
@@ -1,81 +0,0 @@
-import { defineConfig } from 'tsup';
-
-const cfg = {
- splitting: false,
- sourcemap: true,
- clean: true,
- treeshake: false,
- dts: true,
- format: ['esm', 'cjs'],
-};
-
-export default defineConfig([
- {
- ...cfg,
- entry: {
- index: 'src/generic.ts',
- },
- outDir: 'dist',
- },
- {
- ...cfg,
- entry: {
- index: 'src/nextjs/index.tsx',
- },
- external: ['react', 'next'],
- outDir: 'dist/next',
- esbuildOptions: (options) => {
- // Append "use client" to the top of the react entry point
- options.banner = {
- js: '"use client";',
- };
- },
- },
- {
- ...cfg,
- entry: {
- index: 'src/nuxt/index.ts',
- },
- external: ['vue', 'vue-router'],
- outDir: 'dist/nuxt',
- },
- {
- ...cfg,
- entry: {
- index: 'src/react.tsx',
- },
- external: ['react'],
- outDir: 'dist/react',
- },
- {
- ...cfg,
- entry: {
- index: 'src/remix/index.tsx',
- },
- external: ['react', '@remix-run/react', 'react-router'],
- outDir: 'dist/remix',
- },
- {
- ...cfg,
- entry: {
- index: 'src/server/index.ts',
- },
- outDir: 'dist/server',
- },
- {
- ...cfg,
- entry: {
- index: 'src/sveltekit/index.ts',
- },
- external: ['svelte', '@sveltejs/kit', '$app'],
- outDir: 'dist/sveltekit',
- },
- {
- ...cfg,
- entry: {
- index: 'src/vue/index.ts',
- },
- external: ['vue', 'vue-router'],
- outDir: 'dist/vue',
- },
-]);
diff --git a/peersync/node_modules/.pnpm/lock.yaml b/peersync/node_modules/.pnpm/lock.yaml
index 719e0b9..c5c41fb 100644
--- a/peersync/node_modules/.pnpm/lock.yaml
+++ b/peersync/node_modules/.pnpm/lock.yaml
@@ -7,39 +7,18 @@ settings:
importers:
.:
- dependencies:
- '@vercel/analytics':
- specifier: ^1.4.1
- version: 1.4.1
+ devDependencies:
+ prettier:
+ specifier: ^3.4.2
+ version: 3.4.2
packages:
- '@vercel/analytics@1.4.1':
- resolution: {integrity: sha512-ekpL4ReX2TH3LnrRZTUKjHHNpNy9S1I7QmS+g/RQXoSUQ8ienzosuX7T9djZ/s8zPhBx1mpHP/Rw5875N+zQIQ==}
- peerDependencies:
- '@remix-run/react': ^2
- '@sveltejs/kit': ^1 || ^2
- next: '>= 13'
- react: ^18 || ^19 || ^19.0.0-rc
- svelte: '>= 4'
- vue: ^3
- vue-router: ^4
- peerDependenciesMeta:
- '@remix-run/react':
- optional: true
- '@sveltejs/kit':
- optional: true
- next:
- optional: true
- react:
- optional: true
- svelte:
- optional: true
- vue:
- optional: true
- vue-router:
- optional: true
+ prettier@3.4.2:
+ resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==}
+ engines: {node: '>=14'}
+ hasBin: true
snapshots:
- '@vercel/analytics@1.4.1': {}
+ prettier@3.4.2: {}
diff --git a/peersync/node_modules/.pnpm/prettier@3.4.2/node_modules/prettier/LICENSE b/peersync/node_modules/.pnpm/prettier@3.4.2/node_modules/prettier/LICENSE
new file mode 100644
index 0000000..2987241
--- /dev/null
+++ b/peersync/node_modules/.pnpm/prettier@3.4.2/node_modules/prettier/LICENSE
@@ -0,0 +1,4380 @@
+# Prettier license
+
+Prettier is released under the MIT license:
+
+Copyright © James Long and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+## Licenses of bundled dependencies
+
+The published Prettier artifact additionally contains code with the following licenses:
+MIT, ISC, BSD-2-Clause, BSD-3-Clause, Apache-2.0
+
+## Bundled dependencies
+
+### @angular/compiler@v19.0.1
+
+> Angular - the compiler library
+
+License: MIT
+Repository:
+Author: angular
+
+> The MIT License
+>
+> Copyright (c) 2010-2024 Google LLC. https://angular.dev/license
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in
+> all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+> THE SOFTWARE.
+
+----------------------------------------
+
+### @babel/code-frame@v7.26.2
+
+> Generate errors that contain a code frame that point to source locations.
+
+License: MIT
+Homepage:
+Repository:
+Author: The Babel Team (https://babel.dev/team)
+
+> MIT License
+>
+> Copyright (c) 2014-present Sebastian McKenzie and other contributors
+>
+> Permission is hereby granted, free of charge, to any person obtaining
+> a copy of this software and associated documentation files (the
+> "Software"), to deal in the Software without restriction, including
+> without limitation the rights to use, copy, modify, merge, publish,
+> distribute, sublicense, and/or sell copies of the Software, and to
+> permit persons to whom the Software is furnished to do so, subject to
+> the following conditions:
+>
+> The above copyright notice and this permission notice shall be
+> included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### @babel/helper-validator-identifier@v7.25.9
+
+> Validate identifier/keywords name
+
+License: MIT
+Repository:
+Author: The Babel Team (https://babel.dev/team)
+
+> MIT License
+>
+> Copyright (c) 2014-present Sebastian McKenzie and other contributors
+>
+> Permission is hereby granted, free of charge, to any person obtaining
+> a copy of this software and associated documentation files (the
+> "Software"), to deal in the Software without restriction, including
+> without limitation the rights to use, copy, modify, merge, publish,
+> distribute, sublicense, and/or sell copies of the Software, and to
+> permit persons to whom the Software is furnished to do so, subject to
+> the following conditions:
+>
+> The above copyright notice and this permission notice shall be
+> included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### @babel/parser@v7.26.2
+
+> A JavaScript parser
+
+License: MIT
+Homepage:
+Repository:
+Author: The Babel Team (https://babel.dev/team)
+
+> Copyright (C) 2012-2014 by various contributors (see AUTHORS)
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in
+> all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+> THE SOFTWARE.
+
+----------------------------------------
+
+### @glimmer/env@v0.1.7
+
+> Glimmer application environment variables stub
+
+License: MIT
+
+> Copyright (c) 2017 Martin Muñoz and contributors.
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy of
+> this software and associated documentation files (the "Software"), to deal in
+> the Software without restriction, including without limitation the rights to
+> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+> of the Software, and to permit persons to whom the Software is furnished to do
+> so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @glimmer/syntax@v0.93.1
+
+License: MIT
+
+> Copyright (c) 2015 Tilde, Inc.
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy of
+> this software and associated documentation files (the "Software"), to deal in
+> the Software without restriction, including without limitation the rights to
+> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+> of the Software, and to permit persons to whom the Software is furnished to do
+> so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @glimmer/util@v0.93.1
+
+> Common utilities used in Glimmer
+
+License: MIT
+
+> Copyright (c) 2015 Tilde, Inc.
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy of
+> this software and associated documentation files (the "Software"), to deal in
+> the Software without restriction, including without limitation the rights to
+> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+> of the Software, and to permit persons to whom the Software is furnished to do
+> so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @glimmer/wire-format@v0.93.1
+
+License: MIT
+
+> Copyright (c) 2015 Tilde, Inc.
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy of
+> this software and associated documentation files (the "Software"), to deal in
+> the Software without restriction, including without limitation the rights to
+> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+> of the Software, and to permit persons to whom the Software is furnished to do
+> so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @handlebars/parser@v2.0.0
+
+> The parser for the Handlebars language
+
+License: ISC
+Homepage:
+Repository:
+
+----------------------------------------
+
+### @nodelib/fs.scandir@v2.1.5
+
+> List files and directories inside the specified directory
+
+License: MIT
+
+> The MIT License (MIT)
+>
+> Copyright (c) Denis Malinochkin
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @nodelib/fs.stat@v2.0.5
+
+> Get the status of a file with some features
+
+License: MIT
+
+> The MIT License (MIT)
+>
+> Copyright (c) Denis Malinochkin
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @nodelib/fs.walk@v1.2.8
+
+> A library for efficiently walking a directory recursively
+
+License: MIT
+
+> The MIT License (MIT)
+>
+> Copyright (c) Denis Malinochkin
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @prettier/is-es5-identifier-name@v0.2.0
+
+> Check if provided string is an `IdentifierName` as specified in ECMA262 edition 5.1 section 7.6.
+
+License: MIT
+Author: fisker Cheung
+
+> MIT License
+>
+> Copyright (c) fisker Cheung (https://www.fiskercheung.com/)
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @prettier/parse-srcset@v3.1.0
+
+> A spec-conformant JavaScript parser for the HTML5 srcset attribute
+
+License: MIT
+Homepage:
+Author: Alex Bell
+
+> The MIT License (MIT)
+>
+> Copyright (c) 2014 Alex Bell
+> Copyright (c) fisker Cheung
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @typescript-eslint/types@v8.16.0
+
+> Types for the TypeScript-ESTree AST spec
+
+License: MIT
+Homepage:
+Repository:
+
+> MIT License
+>
+> Copyright (c) 2019 typescript-eslint and other contributors
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### @typescript-eslint/typescript-estree@v8.16.0
+
+> A parser that converts TypeScript source code into an ESTree compatible form
+
+License: BSD-2-Clause
+Homepage:
+Repository:
+
+> BSD 2-Clause License
+>
+> TypeScript ESTree
+>
+> Originally extracted from:
+>
+> TypeScript ESLint Parser
+> Copyright JS Foundation and other contributors, https://js.foundation
+>
+> Redistribution and use in source and binary forms, with or without
+> modification, are permitted provided that the following conditions are met:
+>
+> - Redistributions of source code must retain the above copyright
+> notice, this list of conditions and the following disclaimer.
+> - Redistributions in binary form must reproduce the above copyright
+> notice, this list of conditions and the following disclaimer in the
+> documentation and/or other materials provided with the distribution.
+>
+> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+> ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
+> DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+> (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+> ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+> (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+> THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------
+
+### acorn@v8.14.0
+
+> ECMAScript parser
+
+License: MIT
+Homepage:
+Repository:
+
+> MIT License
+>
+> Copyright (C) 2012-2022 by various contributors (see AUTHORS)
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in
+> all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+> THE SOFTWARE.
+
+----------------------------------------
+
+### acorn-jsx@v5.3.2
+
+> Modern, fast React.js JSX parser
+
+License: MIT
+Homepage:
+Repository:
+
+> Copyright (C) 2012-2017 by Ingvar Stepanyan
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in
+> all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+> THE SOFTWARE.
+
+----------------------------------------
+
+### angular-estree-parser@v10.2.0
+
+> A parser that converts Angular source code into an ESTree-compatible form
+
+License: MIT
+Homepage:
+Author: Ika (https://github.com/ikatyang)
+
+> MIT License
+>
+> Copyright (c) Ika (https://github.com/ikatyang)
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### angular-html-parser@v8.0.1
+
+> A HTML parser extracted from Angular with some modifications
+
+License: MIT
+Homepage:
+Author: Ika (https://github.com/ikatyang)
+
+> MIT License
+>
+> Copyright (c) Ika (https://github.com/ikatyang)
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### ansi-regex@v6.1.0
+
+> Regular expression for matching ANSI escape codes
+
+License: MIT
+Author: Sindre Sorhus (https://sindresorhus.com)
+
+> MIT License
+>
+> Copyright (c) Sindre Sorhus (https://sindresorhus.com)
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### bail@v1.0.5
+
+> Throw a given error
+
+License: MIT
+Author: Titus Wormer (https://wooorm.com)
+Contributors:
+ - Titus Wormer (https://wooorm.com)
+
+> (The MIT License)
+>
+> Copyright (c) 2015 Titus Wormer
+>
+> Permission is hereby granted, free of charge, to any person obtaining
+> a copy of this software and associated documentation files (the
+> 'Software'), to deal in the Software without restriction, including
+> without limitation the rights to use, copy, modify, merge, publish,
+> distribute, sublicense, and/or sell copies of the Software, and to
+> permit persons to whom the Software is furnished to do so, subject to
+> the following conditions:
+>
+> The above copyright notice and this permission notice shall be
+> included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### braces@v3.0.3
+
+> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.
+
+License: MIT
+Homepage:
+Author: Jon Schlinkert (https://github.com/jonschlinkert)
+Contributors:
+ - Brian Woodward (https://twitter.com/doowb)
+ - Elan Shanker (https://github.com/es128)
+ - Eugene Sharygin (https://github.com/eush77)
+ - hemanth.hm (http://h3manth.com)
+ - Jon Schlinkert (http://twitter.com/jonschlinkert)
+
+> The MIT License (MIT)
+>
+> Copyright (c) 2014-present, Jon Schlinkert.
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in
+> all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+> THE SOFTWARE.
+
+----------------------------------------
+
+### camelcase@v8.0.0
+
+> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
+
+License: MIT
+Author: Sindre Sorhus (https://sindresorhus.com)
+
+> MIT License
+>
+> Copyright (c) Sindre Sorhus (https://sindresorhus.com)
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### ccount@v1.1.0
+
+> Count characters
+
+License: MIT
+Author: Titus Wormer (https://wooorm.com)
+Contributors:
+ - Titus Wormer (https://wooorm.com)
+
+> (The MIT License)
+>
+> Copyright (c) 2015 Titus Wormer
+>
+> Permission is hereby granted, free of charge, to any person obtaining
+> a copy of this software and associated documentation files (the
+> 'Software'), to deal in the Software without restriction, including
+> without limitation the rights to use, copy, modify, merge, publish,
+> distribute, sublicense, and/or sell copies of the Software, and to
+> permit persons to whom the Software is furnished to do so, subject to
+> the following conditions:
+>
+> The above copyright notice and this permission notice shall be
+> included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### chalk@v5.3.0
+
+> Terminal string styling done right
+
+License: MIT
+
+> MIT License
+>
+> Copyright (c) Sindre Sorhus (https://sindresorhus.com)
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### character-entities@v1.2.4
+
+> HTML character entity information
+
+License: MIT
+Author: Titus Wormer (https://wooorm.com)
+Contributors:
+ - Titus Wormer (https://wooorm.com)
+
+> (The MIT License)
+>
+> Copyright (c) 2015 Titus Wormer
+>
+> Permission is hereby granted, free of charge, to any person obtaining
+> a copy of this software and associated documentation files (the
+> 'Software'), to deal in the Software without restriction, including
+> without limitation the rights to use, copy, modify, merge, publish,
+> distribute, sublicense, and/or sell copies of the Software, and to
+> permit persons to whom the Software is furnished to do so, subject to
+> the following conditions:
+>
+> The above copyright notice and this permission notice shall be
+> included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### character-entities-legacy@v1.1.4
+
+> HTML legacy character entity information
+
+License: MIT
+Author: Titus Wormer (https://wooorm.com)
+Contributors:
+ - Titus Wormer (https://wooorm.com)
+
+> (The MIT License)
+>
+> Copyright (c) 2015 Titus Wormer
+>
+> Permission is hereby granted, free of charge, to any person obtaining
+> a copy of this software and associated documentation files (the
+> 'Software'), to deal in the Software without restriction, including
+> without limitation the rights to use, copy, modify, merge, publish,
+> distribute, sublicense, and/or sell copies of the Software, and to
+> permit persons to whom the Software is furnished to do so, subject to
+> the following conditions:
+>
+> The above copyright notice and this permission notice shall be
+> included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### character-reference-invalid@v1.1.4
+
+> HTML invalid numeric character reference information
+
+License: MIT
+Author: Titus Wormer (https://wooorm.com)
+Contributors:
+ - Titus Wormer (https://wooorm.com)
+
+> (The MIT License)
+>
+> Copyright (c) 2015 Titus Wormer
+>
+> Permission is hereby granted, free of charge, to any person obtaining
+> a copy of this software and associated documentation files (the
+> 'Software'), to deal in the Software without restriction, including
+> without limitation the rights to use, copy, modify, merge, publish,
+> distribute, sublicense, and/or sell copies of the Software, and to
+> permit persons to whom the Software is furnished to do so, subject to
+> the following conditions:
+>
+> The above copyright notice and this permission notice shall be
+> included in all copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------
+
+### ci-info@v4.1.0
+
+> Get details about the current Continuous Integration environment
+
+License: MIT
+Homepage:
+Author: Thomas Watson Steen (https://twitter.com/wa7son)
+Contributors:
+ - Sibiraj (https://github.com/sibiraj-s)
+
+> The MIT License (MIT)
+>
+> Copyright (c) 2016 Thomas Watson Steen
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
+
+----------------------------------------
+
+### collapse-white-space@v1.0.6
+
+> Replace multiple white-space characters with a single space
+
+License: MIT
+Author: Titus Wormer (https://wooorm.com)
+Contributors:
+ - Titus Wormer