diff --git a/keep-notes/prisma/client-generated/default.d.ts b/keep-notes/prisma/client-generated/default.d.ts deleted file mode 100644 index bc20c6c..0000000 --- a/keep-notes/prisma/client-generated/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./index" \ No newline at end of file diff --git a/keep-notes/prisma/client-generated/default.js b/keep-notes/prisma/client-generated/default.js deleted file mode 100644 index fa52f0c..0000000 --- a/keep-notes/prisma/client-generated/default.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { ...require('.') } \ No newline at end of file diff --git a/keep-notes/prisma/client-generated/edge.d.ts b/keep-notes/prisma/client-generated/edge.d.ts deleted file mode 100644 index 274b8fa..0000000 --- a/keep-notes/prisma/client-generated/edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./default" \ No newline at end of file diff --git a/keep-notes/prisma/client-generated/edge.js b/keep-notes/prisma/client-generated/edge.js deleted file mode 100644 index fc8825b..0000000 --- a/keep-notes/prisma/client-generated/edge.js +++ /dev/null @@ -1,341 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - NotFoundError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime -} = require('./runtime/edge.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 5.22.0 - * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 - */ -Prisma.prismaVersion = { - client: "5.22.0", - engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.NotFoundError = NotFoundError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - - - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - Serializable: 'Serializable' -}); - -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.AccountScalarFieldEnum = { - userId: 'userId', - type: 'type', - provider: 'provider', - providerAccountId: 'providerAccountId', - refresh_token: 'refresh_token', - access_token: 'access_token', - expires_at: 'expires_at', - token_type: 'token_type', - scope: 'scope', - id_token: 'id_token', - session_state: 'session_state', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SessionScalarFieldEnum = { - sessionToken: 'sessionToken', - userId: 'userId', - expires: 'expires', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.VerificationTokenScalarFieldEnum = { - identifier: 'identifier', - token: 'token', - expires: 'expires' -}; - -exports.Prisma.NotebookScalarFieldEnum = { - id: 'id', - name: 'name', - icon: 'icon', - color: 'color', - order: 'order', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.LabelScalarFieldEnum = { - id: 'id', - name: 'name', - color: 'color', - notebookId: 'notebookId', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.NoteScalarFieldEnum = { - id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' -}; - -exports.Prisma.NoteShareScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SystemConfigScalarFieldEnum = { - key: 'key', - value: 'value' -}; - -exports.Prisma.AiFeedbackScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - feedbackType: 'feedbackType', - feature: 'feature', - originalContent: 'originalContent', - correctedContent: 'correctedContent', - metadata: 'metadata', - createdAt: 'createdAt' -}; - -exports.Prisma.MemoryEchoInsightScalarFieldEnum = { - id: 'id', - userId: 'userId', - note1Id: 'note1Id', - note2Id: 'note2Id', - similarityScore: 'similarityScore', - insight: 'insight', - insightDate: 'insightDate', - viewed: 'viewed', - feedback: 'feedback', - dismissed: 'dismissed' -}; - -exports.Prisma.UserAISettingsScalarFieldEnum = { - userId: 'userId', - titleSuggestions: 'titleSuggestions', - semanticSearch: 'semanticSearch', - paragraphRefactor: 'paragraphRefactor', - memoryEcho: 'memoryEcho', - memoryEchoFrequency: 'memoryEchoFrequency', - aiProvider: 'aiProvider', - preferredLanguage: 'preferredLanguage', - fontSize: 'fontSize', - demoMode: 'demoMode' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - User: 'User', - Account: 'Account', - Session: 'Session', - VerificationToken: 'VerificationToken', - Notebook: 'Notebook', - Label: 'Label', - Note: 'Note', - NoteShare: 'NoteShare', - SystemConfig: 'SystemConfig', - AiFeedback: 'AiFeedback', - MemoryEchoInsight: 'MemoryEchoInsight', - UserAISettings: 'UserAISettings' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "D:\\dev_new_pc\\Keep\\keep-notes\\prisma\\client-generated", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "windows", - "native": true - } - ], - "previewFeatures": [], - "sourceFilePath": "D:\\dev_new_pc\\Keep\\keep-notes\\prisma\\schema.prisma", - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": null, - "schemaEnvPath": "../../.env" - }, - "relativePath": "..", - "clientVersion": "5.22.0", - "engineVersion": "605197351a3c8bdd595af2d2a9bc3025bca48ea2", - "datasourceNames": [ - "db" - ], - "activeProvider": "sqlite", - "postinstall": false, - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"./client-generated\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String? // Hashed password\n role String @default(\"USER\") // \"USER\" or \"ADMIN\"\n image String?\n theme String @default(\"light\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n accounts Account[]\n sessions Session[]\n notes Note[]\n labels Label[]\n notebooks Notebook[] // NEW: Relation to notebooks\n receivedShares NoteShare[] @relation(\"ReceivedShares\")\n sentShares NoteShare[] @relation(\"SentShares\")\n\n // Phase 1 AI Relations\n aiFeedback AiFeedback[]\n aiSettings UserAISettings?\n memoryEchoInsights MemoryEchoInsight[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\n// NEW: Notebook model for organizing notes\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String? // Emoji or icon name\n color String? // Hex color for personalization\n order Int // Manual order for drag & drop\n userId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n notes Note[] // Notes can belong to a notebook\n labels Label[] // Labels are contextual to this notebook\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([userId, order])\n @@index([userId])\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String? // TEMPORARY: Optional for migration, will be required later\n notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: Cascade)\n notes Note[] // NEW: Many-to-many relation with notes\n userId String? // DEPRECATED: Kept for migration, will be removed after migration\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([notebookId, name]) // NEW: Labels are unique within a notebook (ignored if notebookId is null)\n @@index([notebookId])\n @@index([userId]) // DEPRECATED: Keep for now, remove after migration\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n type String @default(\"text\") // \"text\" or \"checklist\"\n checkItems String? // For checklist items stored as JSON string\n labels String? // Array of label names stored as JSON string (DEPRECATED)\n images String? // Array of image URLs stored as JSON string\n links String? // Array of link metadata stored as JSON string\n reminder DateTime? // Reminder date and time\n isReminderDone Boolean @default(false)\n reminderRecurrence String? // \"none\", \"daily\", \"weekly\", \"monthly\", \"custom\"\n reminderLocation String? // Location for location-based reminders\n isMarkdown Boolean @default(false) // Whether content uses Markdown\n size String @default(\"small\") // \"small\", \"medium\", \"large\"\n embedding String? // Vector embeddings stored as JSON string for semantic search\n sharedWith String? // Array of user IDs (collaborators) stored as JSON string\n userId String? // Owner of the note\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n shares NoteShare[] // All share records for this note\n order Int @default(0)\n\n // NEW: Notebook relation (optional - null = \"Notes générales\" / Inbox)\n notebookId String? // NULL = note is in general notes\n notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: SetNull)\n\n // NEW: Many-to-many relation with labels\n labelRelations Label[] // Uses implicit _NoteToLabel junction table\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Phase 1 AI Extensions\n autoGenerated Boolean? // True if title/content was AI-generated\n aiProvider String? // 'openai' | 'ollama'\n aiConfidence Int? // 0-100 (collected Phase 1, UI Phase 3)\n language String? // ISO 639-1: 'fr', 'en', 'es', 'de', 'fa'\n languageConfidence Float? // 0.0-1.0\n lastAiAnalysis DateTime? // Timestamp of last AI analysis\n\n // Relations for Phase 1 AI\n aiFeedback AiFeedback[]\n memoryEchoAsNote1 MemoryEchoInsight[] @relation(\"EchoNote1\")\n memoryEchoAsNote2 MemoryEchoInsight[] @relation(\"EchoNote2\")\n\n @@index([isPinned])\n @@index([isArchived])\n @@index([order])\n @@index([reminder])\n @@index([userId])\n @@index([userId, notebookId]) // NEW: For filtering notes by notebook\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n userId String\n user User @relation(\"ReceivedShares\", fields: [userId], references: [id], onDelete: Cascade)\n sharedBy String // User ID who shared the note\n sharer User @relation(\"SentShares\", fields: [sharedBy], references: [id], onDelete: Cascade)\n status String @default(\"pending\") // \"pending\", \"accepted\", \"declined\", \"removed\"\n permission String @default(\"view\") // \"view\", \"comment\", \"edit\"\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([noteId, userId])\n @@index([userId])\n @@index([status])\n @@index([sharedBy])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\n// Phase 1 MVP AI Models\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String // 'thumbs_up' | 'thumbs_down' | 'correction'\n feature String // 'title_suggestion' | 'memory_echo' | 'semantic_search' | 'paragraph_refactor'\n originalContent String // JSON string of AI-generated content\n correctedContent String? // User's modified version\n metadata String? // JSON string for additional data (provider, model, timestamp)\n createdAt DateTime @default(now())\n\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([noteId])\n @@index([userId])\n @@index([feature])\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String // AI-generated explanation of the connection\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String? // 'thumbs_up' | 'thumbs_down'\n dismissed Boolean @default(false) // User dismissed this connection\n\n note1 Note @relation(\"EchoNote1\", fields: [note1Id], references: [id], onDelete: Cascade)\n note2 Note @relation(\"EchoNote2\", fields: [note2Id], references: [id], onDelete: Cascade)\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@unique([userId, insightDate])\n @@index([userId, insightDate])\n @@index([userId, dismissed]) // For filtering dismissed connections\n}\n\nmodel UserAISettings {\n userId String @id\n\n // Feature Flags (granular ON/OFF)\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n\n // Configuration\n memoryEchoFrequency String @default(\"daily\") // 'daily' | 'weekly' | 'custom'\n aiProvider String @default(\"auto\") // 'auto' | 'openai' | 'ollama'\n preferredLanguage String @default(\"auto\") // 'auto' | 'en' | 'fr' | 'es' | 'de' | 'fa' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'nl' | 'pl'\n fontSize String @default(\"medium\") // 'small' | 'medium' | 'large' | 'extra-large'\n demoMode Boolean @default(false) // Demo mode for testing Memory Echo\n\n // Relation\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n // Indexes for analytics\n @@index([memoryEcho])\n @@index([aiProvider])\n @@index([memoryEchoFrequency])\n @@index([preferredLanguage])\n}\n", - "inlineSchemaHash": "6c4a81b9b57c01ec47e65b3e37434d4a6d7c226bfa74f4f083425d1dcedac8ec", - "copyEngine": true -} -config.dirname = '/' - -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailVerified\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"USER\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"theme\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"light\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetTokenExpiry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accounts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Account\",\"relationName\":\"AccountToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sessions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Session\",\"relationName\":\"SessionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebooks\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"NotebookToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"receivedShares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"ReceivedShares\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentShares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"SentShares\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiFeedback\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AiFeedback\",\"relationName\":\"AiFeedbackToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiSettings\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserAISettings\",\"relationName\":\"UserToUserAISettings\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoInsights\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"MemoryEchoInsightToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Account\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"providerAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"access_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"id_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"session_state\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AccountToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"provider\",\"providerAccountId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Session\":{\"dbName\":null,\"fields\":[{\"name\":\"sessionToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SessionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"VerificationToken\":{\"dbName\":null,\"fields\":[{\"name\":\"identifier\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"identifier\",\"token\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notebook\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"NotebookToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNotebook\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToNotebook\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Label\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"gray\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebook\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"LabelToNotebook\",\"relationFromFields\":[\"notebookId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"LabelToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"LabelToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[[\"notebookId\",\"name\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"notebookId\",\"name\"]}],\"isGenerated\":false},\"Note\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"default\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isPinned\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"text\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"checkItems\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"links\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isReminderDone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderRecurrence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderLocation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMarkdown\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"size\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"small\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"embedding\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedWith\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"NoteToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"NoteToNoteShare\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebook\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"NoteToNotebook\",\"relationFromFields\":[\"notebookId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labelRelations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"autoGenerated\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"language\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"languageConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastAiAnalysis\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiFeedback\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AiFeedback\",\"relationName\":\"AiFeedbackToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoAsNote1\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"EchoNote1\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoAsNote2\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"EchoNote2\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NoteShare\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNoteShare\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"ReceivedShares\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SentShares\",\"relationFromFields\":[\"sharedBy\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"pending\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permission\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"view\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifiedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"respondedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[[\"noteId\",\"userId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"noteId\",\"userId\"]}],\"isGenerated\":false},\"SystemConfig\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AiFeedback\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedbackType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feature\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"correctedContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"AiFeedbackToNote\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AiFeedbackToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MemoryEchoInsight\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"similarityScore\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insightDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"viewed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedback\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dismissed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"EchoNote1\",\"relationFromFields\":[\"note1Id\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"EchoNote2\",\"relationFromFields\":[\"note2Id\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"MemoryEchoInsightToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"insightDate\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"insightDate\"]}],\"isGenerated\":false},\"UserAISettings\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"titleSuggestions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"semanticSearch\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"paragraphRefactor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEcho\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoFrequency\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"daily\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preferredLanguage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fontSize\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"medium\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"UserToUserAISettings\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined - -config.injectableEdgeEnv = () => ({ - parsed: { - DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined - } -}) - -if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { - Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) -} - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - diff --git a/keep-notes/prisma/client-generated/index-browser.js b/keep-notes/prisma/client-generated/index-browser.js deleted file mode 100644 index 9370b33..0000000 --- a/keep-notes/prisma/client-generated/index-browser.js +++ /dev/null @@ -1,332 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, - skip -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 5.22.0 - * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 - */ -Prisma.prismaVersion = { - client: "5.22.0", - engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.NotFoundError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - Serializable: 'Serializable' -}); - -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.AccountScalarFieldEnum = { - userId: 'userId', - type: 'type', - provider: 'provider', - providerAccountId: 'providerAccountId', - refresh_token: 'refresh_token', - access_token: 'access_token', - expires_at: 'expires_at', - token_type: 'token_type', - scope: 'scope', - id_token: 'id_token', - session_state: 'session_state', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SessionScalarFieldEnum = { - sessionToken: 'sessionToken', - userId: 'userId', - expires: 'expires', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.VerificationTokenScalarFieldEnum = { - identifier: 'identifier', - token: 'token', - expires: 'expires' -}; - -exports.Prisma.NotebookScalarFieldEnum = { - id: 'id', - name: 'name', - icon: 'icon', - color: 'color', - order: 'order', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.LabelScalarFieldEnum = { - id: 'id', - name: 'name', - color: 'color', - notebookId: 'notebookId', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.NoteScalarFieldEnum = { - id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' -}; - -exports.Prisma.NoteShareScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SystemConfigScalarFieldEnum = { - key: 'key', - value: 'value' -}; - -exports.Prisma.AiFeedbackScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - feedbackType: 'feedbackType', - feature: 'feature', - originalContent: 'originalContent', - correctedContent: 'correctedContent', - metadata: 'metadata', - createdAt: 'createdAt' -}; - -exports.Prisma.MemoryEchoInsightScalarFieldEnum = { - id: 'id', - userId: 'userId', - note1Id: 'note1Id', - note2Id: 'note2Id', - similarityScore: 'similarityScore', - insight: 'insight', - insightDate: 'insightDate', - viewed: 'viewed', - feedback: 'feedback', - dismissed: 'dismissed' -}; - -exports.Prisma.UserAISettingsScalarFieldEnum = { - userId: 'userId', - titleSuggestions: 'titleSuggestions', - semanticSearch: 'semanticSearch', - paragraphRefactor: 'paragraphRefactor', - memoryEcho: 'memoryEcho', - memoryEchoFrequency: 'memoryEchoFrequency', - aiProvider: 'aiProvider', - preferredLanguage: 'preferredLanguage', - fontSize: 'fontSize', - demoMode: 'demoMode' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - User: 'User', - Account: 'Account', - Session: 'Session', - VerificationToken: 'VerificationToken', - Notebook: 'Notebook', - Label: 'Label', - Note: 'Note', - NoteShare: 'NoteShare', - SystemConfig: 'SystemConfig', - AiFeedback: 'AiFeedback', - MemoryEchoInsight: 'MemoryEchoInsight', - UserAISettings: 'UserAISettings' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma) diff --git a/keep-notes/prisma/client-generated/index.d.ts b/keep-notes/prisma/client-generated/index.d.ts deleted file mode 100644 index 90ceb04..0000000 --- a/keep-notes/prisma/client-generated/index.d.ts +++ /dev/null @@ -1,23238 +0,0 @@ - -/** - * Client -**/ - -import * as runtime from './runtime/library.js'; -import $Types = runtime.Types // general types -import $Public = runtime.Types.Public -import $Utils = runtime.Types.Utils -import $Extensions = runtime.Types.Extensions -import $Result = runtime.Types.Result - -export type PrismaPromise = $Public.PrismaPromise - - -/** - * Model User - * - */ -export type User = $Result.DefaultSelection -/** - * Model Account - * - */ -export type Account = $Result.DefaultSelection -/** - * Model Session - * - */ -export type Session = $Result.DefaultSelection -/** - * Model VerificationToken - * - */ -export type VerificationToken = $Result.DefaultSelection -/** - * Model Notebook - * - */ -export type Notebook = $Result.DefaultSelection -/** - * Model Label - * - */ -export type Label = $Result.DefaultSelection -/** - * Model Note - * - */ -export type Note = $Result.DefaultSelection -/** - * Model NoteShare - * - */ -export type NoteShare = $Result.DefaultSelection -/** - * Model SystemConfig - * - */ -export type SystemConfig = $Result.DefaultSelection -/** - * Model AiFeedback - * - */ -export type AiFeedback = $Result.DefaultSelection -/** - * Model MemoryEchoInsight - * - */ -export type MemoryEchoInsight = $Result.DefaultSelection -/** - * Model UserAISettings - * - */ -export type UserAISettings = $Result.DefaultSelection - -/** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Users - * const users = await prisma.user.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ -export class PrismaClient< - ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, - U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs -> { - [K: symbol]: { types: Prisma.TypeMap['other'] } - - /** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Users - * const users = await prisma.user.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ - - constructor(optionsArg ?: Prisma.Subset); - $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; - - /** - * Connect with the database - */ - $connect(): $Utils.JsPromise; - - /** - * Disconnect from the database - */ - $disconnect(): $Utils.JsPromise; - - /** - * Add a middleware - * @deprecated since 4.16.0. For new code, prefer client extensions instead. - * @see https://pris.ly/d/extensions - */ - $use(cb: Prisma.Middleware): void - -/** - * Executes a prepared raw query and returns the number of affected rows. - * @example - * ``` - * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Executes a raw query and returns the number of affected rows. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a prepared raw query and returns the `SELECT` data. - * @example - * ``` - * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a raw query and returns the `SELECT` data. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - - /** - * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. - * @example - * ``` - * const [george, bob, alice] = await prisma.$transaction([ - * prisma.user.create({ data: { name: 'George' } }), - * prisma.user.create({ data: { name: 'Bob' } }), - * prisma.user.create({ data: { name: 'Alice' } }), - * ]) - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). - */ - $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> - - $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise - - - $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs> - - /** - * `prisma.user`: Exposes CRUD operations for the **User** model. - * Example usage: - * ```ts - * // Fetch zero or more Users - * const users = await prisma.user.findMany() - * ``` - */ - get user(): Prisma.UserDelegate; - - /** - * `prisma.account`: Exposes CRUD operations for the **Account** model. - * Example usage: - * ```ts - * // Fetch zero or more Accounts - * const accounts = await prisma.account.findMany() - * ``` - */ - get account(): Prisma.AccountDelegate; - - /** - * `prisma.session`: Exposes CRUD operations for the **Session** model. - * Example usage: - * ```ts - * // Fetch zero or more Sessions - * const sessions = await prisma.session.findMany() - * ``` - */ - get session(): Prisma.SessionDelegate; - - /** - * `prisma.verificationToken`: Exposes CRUD operations for the **VerificationToken** model. - * Example usage: - * ```ts - * // Fetch zero or more VerificationTokens - * const verificationTokens = await prisma.verificationToken.findMany() - * ``` - */ - get verificationToken(): Prisma.VerificationTokenDelegate; - - /** - * `prisma.notebook`: Exposes CRUD operations for the **Notebook** model. - * Example usage: - * ```ts - * // Fetch zero or more Notebooks - * const notebooks = await prisma.notebook.findMany() - * ``` - */ - get notebook(): Prisma.NotebookDelegate; - - /** - * `prisma.label`: Exposes CRUD operations for the **Label** model. - * Example usage: - * ```ts - * // Fetch zero or more Labels - * const labels = await prisma.label.findMany() - * ``` - */ - get label(): Prisma.LabelDelegate; - - /** - * `prisma.note`: Exposes CRUD operations for the **Note** model. - * Example usage: - * ```ts - * // Fetch zero or more Notes - * const notes = await prisma.note.findMany() - * ``` - */ - get note(): Prisma.NoteDelegate; - - /** - * `prisma.noteShare`: Exposes CRUD operations for the **NoteShare** model. - * Example usage: - * ```ts - * // Fetch zero or more NoteShares - * const noteShares = await prisma.noteShare.findMany() - * ``` - */ - get noteShare(): Prisma.NoteShareDelegate; - - /** - * `prisma.systemConfig`: Exposes CRUD operations for the **SystemConfig** model. - * Example usage: - * ```ts - * // Fetch zero or more SystemConfigs - * const systemConfigs = await prisma.systemConfig.findMany() - * ``` - */ - get systemConfig(): Prisma.SystemConfigDelegate; - - /** - * `prisma.aiFeedback`: Exposes CRUD operations for the **AiFeedback** model. - * Example usage: - * ```ts - * // Fetch zero or more AiFeedbacks - * const aiFeedbacks = await prisma.aiFeedback.findMany() - * ``` - */ - get aiFeedback(): Prisma.AiFeedbackDelegate; - - /** - * `prisma.memoryEchoInsight`: Exposes CRUD operations for the **MemoryEchoInsight** model. - * Example usage: - * ```ts - * // Fetch zero or more MemoryEchoInsights - * const memoryEchoInsights = await prisma.memoryEchoInsight.findMany() - * ``` - */ - get memoryEchoInsight(): Prisma.MemoryEchoInsightDelegate; - - /** - * `prisma.userAISettings`: Exposes CRUD operations for the **UserAISettings** model. - * Example usage: - * ```ts - * // Fetch zero or more UserAISettings - * const userAISettings = await prisma.userAISettings.findMany() - * ``` - */ - get userAISettings(): Prisma.UserAISettingsDelegate; -} - -export namespace Prisma { - export import DMMF = runtime.DMMF - - export type PrismaPromise = $Public.PrismaPromise - - /** - * Validator - */ - export import validator = runtime.Public.validator - - /** - * Prisma Errors - */ - export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError - export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError - export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError - export import PrismaClientInitializationError = runtime.PrismaClientInitializationError - export import PrismaClientValidationError = runtime.PrismaClientValidationError - export import NotFoundError = runtime.NotFoundError - - /** - * Re-export of sql-template-tag - */ - export import sql = runtime.sqltag - export import empty = runtime.empty - export import join = runtime.join - export import raw = runtime.raw - export import Sql = runtime.Sql - - - - /** - * Decimal.js - */ - export import Decimal = runtime.Decimal - - export type DecimalJsLike = runtime.DecimalJsLike - - /** - * Metrics - */ - export type Metrics = runtime.Metrics - export type Metric = runtime.Metric - export type MetricHistogram = runtime.MetricHistogram - export type MetricHistogramBucket = runtime.MetricHistogramBucket - - /** - * Extensions - */ - export import Extension = $Extensions.UserArgs - export import getExtensionContext = runtime.Extensions.getExtensionContext - export import Args = $Public.Args - export import Payload = $Public.Payload - export import Result = $Public.Result - export import Exact = $Public.Exact - - /** - * Prisma Client JS version: 5.22.0 - * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 - */ - export type PrismaVersion = { - client: string - } - - export const prismaVersion: PrismaVersion - - /** - * Utility Types - */ - - - export import JsonObject = runtime.JsonObject - export import JsonArray = runtime.JsonArray - export import JsonValue = runtime.JsonValue - export import InputJsonObject = runtime.InputJsonObject - export import InputJsonArray = runtime.InputJsonArray - export import InputJsonValue = runtime.InputJsonValue - - /** - * Types of the values used to represent different kinds of `null` values when working with JSON fields. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - namespace NullTypes { - /** - * Type of `Prisma.DbNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class DbNull { - private DbNull: never - private constructor() - } - - /** - * Type of `Prisma.JsonNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class JsonNull { - private JsonNull: never - private constructor() - } - - /** - * Type of `Prisma.AnyNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class AnyNull { - private AnyNull: never - private constructor() - } - } - - /** - * Helper for filtering JSON entries that have `null` on the database (empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const DbNull: NullTypes.DbNull - - /** - * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const JsonNull: NullTypes.JsonNull - - /** - * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const AnyNull: NullTypes.AnyNull - - type SelectAndInclude = { - select: any - include: any - } - - type SelectAndOmit = { - select: any - omit: any - } - - /** - * Get the type of the value, that the Promise holds. - */ - export type PromiseType> = T extends PromiseLike ? U : T; - - /** - * Get the return type of a function which returns a Promise. - */ - export type PromiseReturnType $Utils.JsPromise> = PromiseType> - - /** - * From T, pick a set of properties whose keys are in the union K - */ - type Prisma__Pick = { - [P in K]: T[P]; - }; - - - export type Enumerable = T | Array; - - export type RequiredKeys = { - [K in keyof T]-?: {} extends Prisma__Pick ? never : K - }[keyof T] - - export type TruthyKeys = keyof { - [K in keyof T as T[K] extends false | undefined | null ? never : K]: K - } - - export type TrueKeys = TruthyKeys>> - - /** - * Subset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection - */ - export type Subset = { - [key in keyof T]: key extends keyof U ? T[key] : never; - }; - - /** - * SelectSubset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. - * Additionally, it validates, if both select and include are present. If the case, it errors. - */ - export type SelectSubset = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - (T extends SelectAndInclude - ? 'Please either choose `select` or `include`.' - : T extends SelectAndOmit - ? 'Please either choose `select` or `omit`.' - : {}) - - /** - * Subset + Intersection - * @desc From `T` pick properties that exist in `U` and intersect `K` - */ - export type SubsetIntersection = { - [key in keyof T]: key extends keyof U ? T[key] : never - } & - K - - type Without = { [P in Exclude]?: never }; - - /** - * XOR is needed to have a real mutually exclusive union type - * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types - */ - type XOR = - T extends object ? - U extends object ? - (Without & U) | (Without & T) - : U : T - - - /** - * Is T a Record? - */ - type IsObject = T extends Array - ? False - : T extends Date - ? False - : T extends Uint8Array - ? False - : T extends BigInt - ? False - : T extends object - ? True - : False - - - /** - * If it's T[], return T - */ - export type UnEnumerate = T extends Array ? U : T - - /** - * From ts-toolbelt - */ - - type __Either = Omit & - { - // Merge all but K - [P in K]: Prisma__Pick // With K possibilities - }[K] - - type EitherStrict = Strict<__Either> - - type EitherLoose = ComputeRaw<__Either> - - type _Either< - O extends object, - K extends Key, - strict extends Boolean - > = { - 1: EitherStrict - 0: EitherLoose - }[strict] - - type Either< - O extends object, - K extends Key, - strict extends Boolean = 1 - > = O extends unknown ? _Either : never - - export type Union = any - - type PatchUndefined = { - [K in keyof O]: O[K] extends undefined ? At : O[K] - } & {} - - /** Helper Types for "Merge" **/ - export type IntersectOf = ( - U extends unknown ? (k: U) => void : never - ) extends (k: infer I) => void - ? I - : never - - export type Overwrite = { - [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; - } & {}; - - type _Merge = IntersectOf; - }>>; - - type Key = string | number | symbol; - type AtBasic = K extends keyof O ? O[K] : never; - type AtStrict = O[K & keyof O]; - type AtLoose = O extends unknown ? AtStrict : never; - export type At = { - 1: AtStrict; - 0: AtLoose; - }[strict]; - - export type ComputeRaw = A extends Function ? A : { - [K in keyof A]: A[K]; - } & {}; - - export type OptionalFlat = { - [K in keyof O]?: O[K]; - } & {}; - - type _Record = { - [P in K]: T; - }; - - // cause typescript not to expand types and preserve names - type NoExpand = T extends unknown ? T : never; - - // this type assumes the passed object is entirely optional - type AtLeast = NoExpand< - O extends unknown - ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) - | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O - : never>; - - type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; - - export type Strict = ComputeRaw<_Strict>; - /** End Helper Types for "Merge" **/ - - export type Merge = ComputeRaw<_Merge>>; - - /** - A [[Boolean]] - */ - export type Boolean = True | False - - // /** - // 1 - // */ - export type True = 1 - - /** - 0 - */ - export type False = 0 - - export type Not = { - 0: 1 - 1: 0 - }[B] - - export type Extends = [A1] extends [never] - ? 0 // anything `never` is false - : A1 extends A2 - ? 1 - : 0 - - export type Has = Not< - Extends, U1> - > - - export type Or = { - 0: { - 0: 0 - 1: 1 - } - 1: { - 0: 1 - 1: 1 - } - }[B1][B2] - - export type Keys = U extends unknown ? keyof U : never - - type Cast = A extends B ? A : B; - - export const type: unique symbol; - - - - /** - * Used by group by - */ - - export type GetScalarType = O extends object ? { - [P in keyof T]: P extends keyof O - ? O[P] - : never - } : never - - type FieldPaths< - T, - U = Omit - > = IsObject extends True ? U : T - - type GetHavingFields = { - [K in keyof T]: Or< - Or, Extends<'AND', K>>, - Extends<'NOT', K> - > extends True - ? // infer is only needed to not hit TS limit - // based on the brilliant idea of Pierre-Antoine Mills - // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 - T[K] extends infer TK - ? GetHavingFields extends object ? Merge> : never> - : never - : {} extends FieldPaths - ? never - : K - }[keyof T] - - /** - * Convert tuple to union - */ - type _TupleToUnion = T extends (infer E)[] ? E : never - type TupleToUnion = _TupleToUnion - type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T - - /** - * Like `Pick`, but additionally can also accept an array of keys - */ - type PickEnumerable | keyof T> = Prisma__Pick> - - /** - * Exclude all keys with underscores - */ - type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T - - - export type FieldRef = runtime.FieldRef - - type FieldRefInputType = Model extends never ? never : FieldRef - - - export const ModelName: { - User: 'User', - Account: 'Account', - Session: 'Session', - VerificationToken: 'VerificationToken', - Notebook: 'Notebook', - Label: 'Label', - Note: 'Note', - NoteShare: 'NoteShare', - SystemConfig: 'SystemConfig', - AiFeedback: 'AiFeedback', - MemoryEchoInsight: 'MemoryEchoInsight', - UserAISettings: 'UserAISettings' - }; - - export type ModelName = (typeof ModelName)[keyof typeof ModelName] - - - export type Datasources = { - db?: Datasource - } - - interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record> { - returns: Prisma.TypeMap - } - - export type TypeMap = { - meta: { - modelProps: "user" | "account" | "session" | "verificationToken" | "notebook" | "label" | "note" | "noteShare" | "systemConfig" | "aiFeedback" | "memoryEchoInsight" | "userAISettings" - txIsolationLevel: Prisma.TransactionIsolationLevel - } - model: { - User: { - payload: Prisma.$UserPayload - fields: Prisma.UserFieldRefs - operations: { - findUnique: { - args: Prisma.UserFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.UserFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.UserFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.UserFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.UserFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.UserCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.UserCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.UserCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.UserDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.UserUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.UserDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.UserUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.UserUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.UserAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.UserGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.UserCountArgs - result: $Utils.Optional | number - } - } - } - Account: { - payload: Prisma.$AccountPayload - fields: Prisma.AccountFieldRefs - operations: { - findUnique: { - args: Prisma.AccountFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.AccountFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.AccountFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.AccountFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.AccountFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.AccountCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.AccountCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.AccountCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.AccountDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.AccountUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.AccountDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.AccountUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.AccountUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.AccountAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.AccountGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.AccountCountArgs - result: $Utils.Optional | number - } - } - } - Session: { - payload: Prisma.$SessionPayload - fields: Prisma.SessionFieldRefs - operations: { - findUnique: { - args: Prisma.SessionFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.SessionFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.SessionFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.SessionFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.SessionFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.SessionCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.SessionCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.SessionCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.SessionDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.SessionUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.SessionDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.SessionUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.SessionUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.SessionAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.SessionGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.SessionCountArgs - result: $Utils.Optional | number - } - } - } - VerificationToken: { - payload: Prisma.$VerificationTokenPayload - fields: Prisma.VerificationTokenFieldRefs - operations: { - findUnique: { - args: Prisma.VerificationTokenFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.VerificationTokenFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.VerificationTokenFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.VerificationTokenFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.VerificationTokenFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.VerificationTokenCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.VerificationTokenCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.VerificationTokenCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.VerificationTokenDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.VerificationTokenUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.VerificationTokenDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.VerificationTokenUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.VerificationTokenUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.VerificationTokenAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.VerificationTokenGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.VerificationTokenCountArgs - result: $Utils.Optional | number - } - } - } - Notebook: { - payload: Prisma.$NotebookPayload - fields: Prisma.NotebookFieldRefs - operations: { - findUnique: { - args: Prisma.NotebookFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.NotebookFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.NotebookFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.NotebookFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.NotebookFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.NotebookCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.NotebookCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.NotebookCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.NotebookDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.NotebookUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.NotebookDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.NotebookUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.NotebookUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.NotebookAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.NotebookGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.NotebookCountArgs - result: $Utils.Optional | number - } - } - } - Label: { - payload: Prisma.$LabelPayload - fields: Prisma.LabelFieldRefs - operations: { - findUnique: { - args: Prisma.LabelFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.LabelFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.LabelFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.LabelFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.LabelFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.LabelCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.LabelCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.LabelCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.LabelDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.LabelUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.LabelDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.LabelUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.LabelUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.LabelAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.LabelGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.LabelCountArgs - result: $Utils.Optional | number - } - } - } - Note: { - payload: Prisma.$NotePayload - fields: Prisma.NoteFieldRefs - operations: { - findUnique: { - args: Prisma.NoteFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.NoteFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.NoteFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.NoteFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.NoteFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.NoteCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.NoteCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.NoteCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.NoteDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.NoteUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.NoteDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.NoteUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.NoteUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.NoteAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.NoteGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.NoteCountArgs - result: $Utils.Optional | number - } - } - } - NoteShare: { - payload: Prisma.$NoteSharePayload - fields: Prisma.NoteShareFieldRefs - operations: { - findUnique: { - args: Prisma.NoteShareFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.NoteShareFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.NoteShareFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.NoteShareFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.NoteShareFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.NoteShareCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.NoteShareCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.NoteShareCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.NoteShareDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.NoteShareUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.NoteShareDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.NoteShareUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.NoteShareUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.NoteShareAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.NoteShareGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.NoteShareCountArgs - result: $Utils.Optional | number - } - } - } - SystemConfig: { - payload: Prisma.$SystemConfigPayload - fields: Prisma.SystemConfigFieldRefs - operations: { - findUnique: { - args: Prisma.SystemConfigFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.SystemConfigFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.SystemConfigFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.SystemConfigFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.SystemConfigFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.SystemConfigCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.SystemConfigCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.SystemConfigCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.SystemConfigDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.SystemConfigUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.SystemConfigDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.SystemConfigUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.SystemConfigUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.SystemConfigAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.SystemConfigGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.SystemConfigCountArgs - result: $Utils.Optional | number - } - } - } - AiFeedback: { - payload: Prisma.$AiFeedbackPayload - fields: Prisma.AiFeedbackFieldRefs - operations: { - findUnique: { - args: Prisma.AiFeedbackFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.AiFeedbackFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.AiFeedbackFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.AiFeedbackFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.AiFeedbackFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.AiFeedbackCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.AiFeedbackCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.AiFeedbackCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.AiFeedbackDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.AiFeedbackUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.AiFeedbackDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.AiFeedbackUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.AiFeedbackUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.AiFeedbackAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.AiFeedbackGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.AiFeedbackCountArgs - result: $Utils.Optional | number - } - } - } - MemoryEchoInsight: { - payload: Prisma.$MemoryEchoInsightPayload - fields: Prisma.MemoryEchoInsightFieldRefs - operations: { - findUnique: { - args: Prisma.MemoryEchoInsightFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.MemoryEchoInsightFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.MemoryEchoInsightFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.MemoryEchoInsightFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.MemoryEchoInsightFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.MemoryEchoInsightCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.MemoryEchoInsightCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.MemoryEchoInsightCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.MemoryEchoInsightDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.MemoryEchoInsightUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.MemoryEchoInsightDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.MemoryEchoInsightUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.MemoryEchoInsightUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.MemoryEchoInsightAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.MemoryEchoInsightGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.MemoryEchoInsightCountArgs - result: $Utils.Optional | number - } - } - } - UserAISettings: { - payload: Prisma.$UserAISettingsPayload - fields: Prisma.UserAISettingsFieldRefs - operations: { - findUnique: { - args: Prisma.UserAISettingsFindUniqueArgs - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.UserAISettingsFindUniqueOrThrowArgs - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.UserAISettingsFindFirstArgs - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.UserAISettingsFindFirstOrThrowArgs - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.UserAISettingsFindManyArgs - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.UserAISettingsCreateArgs - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.UserAISettingsCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.UserAISettingsCreateManyAndReturnArgs - result: $Utils.PayloadToResult[] - } - delete: { - args: Prisma.UserAISettingsDeleteArgs - result: $Utils.PayloadToResult - } - update: { - args: Prisma.UserAISettingsUpdateArgs - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.UserAISettingsDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.UserAISettingsUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.UserAISettingsUpsertArgs - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.UserAISettingsAggregateArgs - result: $Utils.Optional - } - groupBy: { - args: Prisma.UserAISettingsGroupByArgs - result: $Utils.Optional[] - } - count: { - args: Prisma.UserAISettingsCountArgs - result: $Utils.Optional | number - } - } - } - } - } & { - other: { - payload: any - operations: { - $executeRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - $executeRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - $queryRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], - result: any - } - $queryRawUnsafe: { - args: [query: string, ...values: any[]], - result: any - } - } - } - } - export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> - export type DefaultPrismaClient = PrismaClient - export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' - export interface PrismaClientOptions { - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasourceUrl?: string - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat - /** - * @example - * ``` - * // Defaults to stdout - * log: ['query', 'info', 'warn', 'error'] - * - * // Emit as events - * log: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * { emit: 'stdout', level: 'error' } - * ] - * ``` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: (LogLevel | LogDefinition)[] - /** - * The default values for transactionOptions - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: { - maxWait?: number - timeout?: number - isolationLevel?: Prisma.TransactionIsolationLevel - } - } - - - /* Types for Logging */ - export type LogLevel = 'info' | 'query' | 'warn' | 'error' - export type LogDefinition = { - level: LogLevel - emit: 'stdout' | 'event' - } - - export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never - export type GetEvents = T extends Array ? - GetLogType | GetLogType | GetLogType | GetLogType - : never - - export type QueryEvent = { - timestamp: Date - query: string - params: string - duration: number - target: string - } - - export type LogEvent = { - timestamp: Date - message: string - target: string - } - /* End Types for Logging */ - - - export type PrismaAction = - | 'findUnique' - | 'findUniqueOrThrow' - | 'findMany' - | 'findFirst' - | 'findFirstOrThrow' - | 'create' - | 'createMany' - | 'createManyAndReturn' - | 'update' - | 'updateMany' - | 'upsert' - | 'delete' - | 'deleteMany' - | 'executeRaw' - | 'queryRaw' - | 'aggregate' - | 'count' - | 'runCommandRaw' - | 'findRaw' - | 'groupBy' - - /** - * These options are being passed into the middleware as "params" - */ - export type MiddlewareParams = { - model?: ModelName - action: PrismaAction - args: any - dataPath: string[] - runInTransaction: boolean - } - - /** - * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation - */ - export type Middleware = ( - params: MiddlewareParams, - next: (params: MiddlewareParams) => $Utils.JsPromise, - ) => $Utils.JsPromise - - // tested in getLogLevel.test.ts - export function getLogLevel(log: Array): LogLevel | undefined; - - /** - * `PrismaClient` proxy available in interactive transactions. - */ - export type TransactionClient = Omit - - export type Datasource = { - url?: string - } - - /** - * Count Types - */ - - - /** - * Count Type UserCountOutputType - */ - - export type UserCountOutputType = { - accounts: number - sessions: number - notes: number - labels: number - notebooks: number - receivedShares: number - sentShares: number - aiFeedback: number - memoryEchoInsights: number - } - - export type UserCountOutputTypeSelect = { - accounts?: boolean | UserCountOutputTypeCountAccountsArgs - sessions?: boolean | UserCountOutputTypeCountSessionsArgs - notes?: boolean | UserCountOutputTypeCountNotesArgs - labels?: boolean | UserCountOutputTypeCountLabelsArgs - notebooks?: boolean | UserCountOutputTypeCountNotebooksArgs - receivedShares?: boolean | UserCountOutputTypeCountReceivedSharesArgs - sentShares?: boolean | UserCountOutputTypeCountSentSharesArgs - aiFeedback?: boolean | UserCountOutputTypeCountAiFeedbackArgs - memoryEchoInsights?: boolean | UserCountOutputTypeCountMemoryEchoInsightsArgs - } - - // Custom InputTypes - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the UserCountOutputType - */ - select?: UserCountOutputTypeSelect | null - } - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountAccountsArgs = { - where?: AccountWhereInput - } - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountSessionsArgs = { - where?: SessionWhereInput - } - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountNotesArgs = { - where?: NoteWhereInput - } - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountLabelsArgs = { - where?: LabelWhereInput - } - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountNotebooksArgs = { - where?: NotebookWhereInput - } - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountReceivedSharesArgs = { - where?: NoteShareWhereInput - } - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountSentSharesArgs = { - where?: NoteShareWhereInput - } - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountAiFeedbackArgs = { - where?: AiFeedbackWhereInput - } - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountMemoryEchoInsightsArgs = { - where?: MemoryEchoInsightWhereInput - } - - - /** - * Count Type NotebookCountOutputType - */ - - export type NotebookCountOutputType = { - notes: number - labels: number - } - - export type NotebookCountOutputTypeSelect = { - notes?: boolean | NotebookCountOutputTypeCountNotesArgs - labels?: boolean | NotebookCountOutputTypeCountLabelsArgs - } - - // Custom InputTypes - /** - * NotebookCountOutputType without action - */ - export type NotebookCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the NotebookCountOutputType - */ - select?: NotebookCountOutputTypeSelect | null - } - - /** - * NotebookCountOutputType without action - */ - export type NotebookCountOutputTypeCountNotesArgs = { - where?: NoteWhereInput - } - - /** - * NotebookCountOutputType without action - */ - export type NotebookCountOutputTypeCountLabelsArgs = { - where?: LabelWhereInput - } - - - /** - * Count Type LabelCountOutputType - */ - - export type LabelCountOutputType = { - notes: number - } - - export type LabelCountOutputTypeSelect = { - notes?: boolean | LabelCountOutputTypeCountNotesArgs - } - - // Custom InputTypes - /** - * LabelCountOutputType without action - */ - export type LabelCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the LabelCountOutputType - */ - select?: LabelCountOutputTypeSelect | null - } - - /** - * LabelCountOutputType without action - */ - export type LabelCountOutputTypeCountNotesArgs = { - where?: NoteWhereInput - } - - - /** - * Count Type NoteCountOutputType - */ - - export type NoteCountOutputType = { - shares: number - labelRelations: number - aiFeedback: number - memoryEchoAsNote1: number - memoryEchoAsNote2: number - } - - export type NoteCountOutputTypeSelect = { - shares?: boolean | NoteCountOutputTypeCountSharesArgs - labelRelations?: boolean | NoteCountOutputTypeCountLabelRelationsArgs - aiFeedback?: boolean | NoteCountOutputTypeCountAiFeedbackArgs - memoryEchoAsNote1?: boolean | NoteCountOutputTypeCountMemoryEchoAsNote1Args - memoryEchoAsNote2?: boolean | NoteCountOutputTypeCountMemoryEchoAsNote2Args - } - - // Custom InputTypes - /** - * NoteCountOutputType without action - */ - export type NoteCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the NoteCountOutputType - */ - select?: NoteCountOutputTypeSelect | null - } - - /** - * NoteCountOutputType without action - */ - export type NoteCountOutputTypeCountSharesArgs = { - where?: NoteShareWhereInput - } - - /** - * NoteCountOutputType without action - */ - export type NoteCountOutputTypeCountLabelRelationsArgs = { - where?: LabelWhereInput - } - - /** - * NoteCountOutputType without action - */ - export type NoteCountOutputTypeCountAiFeedbackArgs = { - where?: AiFeedbackWhereInput - } - - /** - * NoteCountOutputType without action - */ - export type NoteCountOutputTypeCountMemoryEchoAsNote1Args = { - where?: MemoryEchoInsightWhereInput - } - - /** - * NoteCountOutputType without action - */ - export type NoteCountOutputTypeCountMemoryEchoAsNote2Args = { - where?: MemoryEchoInsightWhereInput - } - - - /** - * Models - */ - - /** - * Model User - */ - - export type AggregateUser = { - _count: UserCountAggregateOutputType | null - _min: UserMinAggregateOutputType | null - _max: UserMaxAggregateOutputType | null - } - - export type UserMinAggregateOutputType = { - id: string | null - name: string | null - email: string | null - emailVerified: Date | null - password: string | null - role: string | null - image: string | null - theme: string | null - resetToken: string | null - resetTokenExpiry: Date | null - createdAt: Date | null - updatedAt: Date | null - } - - export type UserMaxAggregateOutputType = { - id: string | null - name: string | null - email: string | null - emailVerified: Date | null - password: string | null - role: string | null - image: string | null - theme: string | null - resetToken: string | null - resetTokenExpiry: Date | null - createdAt: Date | null - updatedAt: Date | null - } - - export type UserCountAggregateOutputType = { - id: number - name: number - email: number - emailVerified: number - password: number - role: number - image: number - theme: number - resetToken: number - resetTokenExpiry: number - createdAt: number - updatedAt: number - _all: number - } - - - export type UserMinAggregateInputType = { - id?: true - name?: true - email?: true - emailVerified?: true - password?: true - role?: true - image?: true - theme?: true - resetToken?: true - resetTokenExpiry?: true - createdAt?: true - updatedAt?: true - } - - export type UserMaxAggregateInputType = { - id?: true - name?: true - email?: true - emailVerified?: true - password?: true - role?: true - image?: true - theme?: true - resetToken?: true - resetTokenExpiry?: true - createdAt?: true - updatedAt?: true - } - - export type UserCountAggregateInputType = { - id?: true - name?: true - email?: true - emailVerified?: true - password?: true - role?: true - image?: true - theme?: true - resetToken?: true - resetTokenExpiry?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type UserAggregateArgs = { - /** - * Filter which User to aggregate. - */ - where?: UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Users - **/ - _count?: true | UserCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: UserMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: UserMaxAggregateInputType - } - - export type GetUserAggregateType = { - [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type UserGroupByArgs = { - where?: UserWhereInput - orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[] - by: UserScalarFieldEnum[] | UserScalarFieldEnum - having?: UserScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: UserCountAggregateInputType | true - _min?: UserMinAggregateInputType - _max?: UserMaxAggregateInputType - } - - export type UserGroupByOutputType = { - id: string - name: string | null - email: string - emailVerified: Date | null - password: string | null - role: string - image: string | null - theme: string - resetToken: string | null - resetTokenExpiry: Date | null - createdAt: Date - updatedAt: Date - _count: UserCountAggregateOutputType | null - _min: UserMinAggregateOutputType | null - _max: UserMaxAggregateOutputType | null - } - - type GetUserGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type UserSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - emailVerified?: boolean - password?: boolean - role?: boolean - image?: boolean - theme?: boolean - resetToken?: boolean - resetTokenExpiry?: boolean - createdAt?: boolean - updatedAt?: boolean - accounts?: boolean | User$accountsArgs - sessions?: boolean | User$sessionsArgs - notes?: boolean | User$notesArgs - labels?: boolean | User$labelsArgs - notebooks?: boolean | User$notebooksArgs - receivedShares?: boolean | User$receivedSharesArgs - sentShares?: boolean | User$sentSharesArgs - aiFeedback?: boolean | User$aiFeedbackArgs - aiSettings?: boolean | User$aiSettingsArgs - memoryEchoInsights?: boolean | User$memoryEchoInsightsArgs - _count?: boolean | UserCountOutputTypeDefaultArgs - }, ExtArgs["result"]["user"]> - - export type UserSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - email?: boolean - emailVerified?: boolean - password?: boolean - role?: boolean - image?: boolean - theme?: boolean - resetToken?: boolean - resetTokenExpiry?: boolean - createdAt?: boolean - updatedAt?: boolean - }, ExtArgs["result"]["user"]> - - export type UserSelectScalar = { - id?: boolean - name?: boolean - email?: boolean - emailVerified?: boolean - password?: boolean - role?: boolean - image?: boolean - theme?: boolean - resetToken?: boolean - resetTokenExpiry?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - export type UserInclude = { - accounts?: boolean | User$accountsArgs - sessions?: boolean | User$sessionsArgs - notes?: boolean | User$notesArgs - labels?: boolean | User$labelsArgs - notebooks?: boolean | User$notebooksArgs - receivedShares?: boolean | User$receivedSharesArgs - sentShares?: boolean | User$sentSharesArgs - aiFeedback?: boolean | User$aiFeedbackArgs - aiSettings?: boolean | User$aiSettingsArgs - memoryEchoInsights?: boolean | User$memoryEchoInsightsArgs - _count?: boolean | UserCountOutputTypeDefaultArgs - } - export type UserIncludeCreateManyAndReturn = {} - - export type $UserPayload = { - name: "User" - objects: { - accounts: Prisma.$AccountPayload[] - sessions: Prisma.$SessionPayload[] - notes: Prisma.$NotePayload[] - labels: Prisma.$LabelPayload[] - notebooks: Prisma.$NotebookPayload[] - receivedShares: Prisma.$NoteSharePayload[] - sentShares: Prisma.$NoteSharePayload[] - aiFeedback: Prisma.$AiFeedbackPayload[] - aiSettings: Prisma.$UserAISettingsPayload | null - memoryEchoInsights: Prisma.$MemoryEchoInsightPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: string - name: string | null - email: string - emailVerified: Date | null - password: string | null - role: string - image: string | null - theme: string - resetToken: string | null - resetTokenExpiry: Date | null - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["user"]> - composites: {} - } - - type UserGetPayload = $Result.GetResult - - type UserCountArgs = - Omit & { - select?: UserCountAggregateInputType | true - } - - export interface UserDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } - /** - * Find zero or one User that matches the filter. - * @param {UserFindUniqueArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one User that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first User that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindFirstArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first User that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more Users that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Users - * const users = await prisma.user.findMany() - * - * // Get first 10 Users - * const users = await prisma.user.findMany({ take: 10 }) - * - * // Only select the `id` - * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a User. - * @param {UserCreateArgs} args - Arguments to create a User. - * @example - * // Create one User - * const User = await prisma.user.create({ - * data: { - * // ... data to create a User - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many Users. - * @param {UserCreateManyArgs} args - Arguments to create many Users. - * @example - * // Create many Users - * const user = await prisma.user.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Users and returns the data saved in the database. - * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users. - * @example - * // Create many Users - * const user = await prisma.user.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Users and only return the `id` - * const userWithIdOnly = await prisma.user.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a User. - * @param {UserDeleteArgs} args - Arguments to delete one User. - * @example - * // Delete one User - * const User = await prisma.user.delete({ - * where: { - * // ... filter to delete one User - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one User. - * @param {UserUpdateArgs} args - Arguments to update one User. - * @example - * // Update one User - * const user = await prisma.user.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more Users. - * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. - * @example - * // Delete a few Users - * const { count } = await prisma.user.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Users. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Users - * const user = await prisma.user.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one User. - * @param {UserUpsertArgs} args - Arguments to update or create a User. - * @example - * // Update or create a User - * const user = await prisma.user.upsert({ - * create: { - * // ... data to create a User - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the User we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of Users. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserCountArgs} args - Arguments to filter Users to count. - * @example - * // Count the number of Users - * const count = await prisma.user.count({ - * where: { - * // ... the filter for the Users we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a User. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by User. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends UserGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: UserGroupByArgs['orderBy'] } - : { orderBy?: UserGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the User model - */ - readonly fields: UserFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for User. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__UserClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - accounts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - sessions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - notes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - labels = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - notebooks = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - receivedShares = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - sentShares = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - aiFeedback = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - aiSettings = {}>(args?: Subset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> - memoryEchoInsights = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the User model - */ - interface UserFieldRefs { - readonly id: FieldRef<"User", 'String'> - readonly name: FieldRef<"User", 'String'> - readonly email: FieldRef<"User", 'String'> - readonly emailVerified: FieldRef<"User", 'DateTime'> - readonly password: FieldRef<"User", 'String'> - readonly role: FieldRef<"User", 'String'> - readonly image: FieldRef<"User", 'String'> - readonly theme: FieldRef<"User", 'String'> - readonly resetToken: FieldRef<"User", 'String'> - readonly resetTokenExpiry: FieldRef<"User", 'DateTime'> - readonly createdAt: FieldRef<"User", 'DateTime'> - readonly updatedAt: FieldRef<"User", 'DateTime'> - } - - - // Custom InputTypes - /** - * User findUnique - */ - export type UserFindUniqueArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - /** - * Filter, which User to fetch. - */ - where: UserWhereUniqueInput - } - - /** - * User findUniqueOrThrow - */ - export type UserFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - /** - * Filter, which User to fetch. - */ - where: UserWhereUniqueInput - } - - /** - * User findFirst - */ - export type UserFindFirstArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - /** - * Filter, which User to fetch. - */ - where?: UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Users. - */ - cursor?: UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Users. - */ - distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] - } - - /** - * User findFirstOrThrow - */ - export type UserFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - /** - * Filter, which User to fetch. - */ - where?: UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Users. - */ - cursor?: UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Users. - */ - distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] - } - - /** - * User findMany - */ - export type UserFindManyArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - /** - * Filter, which Users to fetch. - */ - where?: UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Users. - */ - cursor?: UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] - } - - /** - * User create - */ - export type UserCreateArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - /** - * The data needed to create a User. - */ - data: XOR - } - - /** - * User createMany - */ - export type UserCreateManyArgs = { - /** - * The data used to create many Users. - */ - data: UserCreateManyInput | UserCreateManyInput[] - } - - /** - * User createManyAndReturn - */ - export type UserCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelectCreateManyAndReturn | null - /** - * The data used to create many Users. - */ - data: UserCreateManyInput | UserCreateManyInput[] - } - - /** - * User update - */ - export type UserUpdateArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - /** - * The data needed to update a User. - */ - data: XOR - /** - * Choose, which User to update. - */ - where: UserWhereUniqueInput - } - - /** - * User updateMany - */ - export type UserUpdateManyArgs = { - /** - * The data used to update Users. - */ - data: XOR - /** - * Filter which Users to update - */ - where?: UserWhereInput - } - - /** - * User upsert - */ - export type UserUpsertArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - /** - * The filter to search for the User to update in case it exists. - */ - where: UserWhereUniqueInput - /** - * In case the User found by the `where` argument doesn't exist, create a new User with this data. - */ - create: XOR - /** - * In case the User was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * User delete - */ - export type UserDeleteArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - /** - * Filter which User to delete. - */ - where: UserWhereUniqueInput - } - - /** - * User deleteMany - */ - export type UserDeleteManyArgs = { - /** - * Filter which Users to delete - */ - where?: UserWhereInput - } - - /** - * User.accounts - */ - export type User$accountsArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - where?: AccountWhereInput - orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] - cursor?: AccountWhereUniqueInput - take?: number - skip?: number - distinct?: AccountScalarFieldEnum | AccountScalarFieldEnum[] - } - - /** - * User.sessions - */ - export type User$sessionsArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - where?: SessionWhereInput - orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] - cursor?: SessionWhereUniqueInput - take?: number - skip?: number - distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] - } - - /** - * User.notes - */ - export type User$notesArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - where?: NoteWhereInput - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] - cursor?: NoteWhereUniqueInput - take?: number - skip?: number - distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] - } - - /** - * User.labels - */ - export type User$labelsArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - where?: LabelWhereInput - orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] - cursor?: LabelWhereUniqueInput - take?: number - skip?: number - distinct?: LabelScalarFieldEnum | LabelScalarFieldEnum[] - } - - /** - * User.notebooks - */ - export type User$notebooksArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - where?: NotebookWhereInput - orderBy?: NotebookOrderByWithRelationInput | NotebookOrderByWithRelationInput[] - cursor?: NotebookWhereUniqueInput - take?: number - skip?: number - distinct?: NotebookScalarFieldEnum | NotebookScalarFieldEnum[] - } - - /** - * User.receivedShares - */ - export type User$receivedSharesArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - where?: NoteShareWhereInput - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - cursor?: NoteShareWhereUniqueInput - take?: number - skip?: number - distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] - } - - /** - * User.sentShares - */ - export type User$sentSharesArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - where?: NoteShareWhereInput - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - cursor?: NoteShareWhereUniqueInput - take?: number - skip?: number - distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] - } - - /** - * User.aiFeedback - */ - export type User$aiFeedbackArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - where?: AiFeedbackWhereInput - orderBy?: AiFeedbackOrderByWithRelationInput | AiFeedbackOrderByWithRelationInput[] - cursor?: AiFeedbackWhereUniqueInput - take?: number - skip?: number - distinct?: AiFeedbackScalarFieldEnum | AiFeedbackScalarFieldEnum[] - } - - /** - * User.aiSettings - */ - export type User$aiSettingsArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - where?: UserAISettingsWhereInput - } - - /** - * User.memoryEchoInsights - */ - export type User$memoryEchoInsightsArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - where?: MemoryEchoInsightWhereInput - orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] - cursor?: MemoryEchoInsightWhereUniqueInput - take?: number - skip?: number - distinct?: MemoryEchoInsightScalarFieldEnum | MemoryEchoInsightScalarFieldEnum[] - } - - /** - * User without action - */ - export type UserDefaultArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - } - - - /** - * Model Account - */ - - export type AggregateAccount = { - _count: AccountCountAggregateOutputType | null - _avg: AccountAvgAggregateOutputType | null - _sum: AccountSumAggregateOutputType | null - _min: AccountMinAggregateOutputType | null - _max: AccountMaxAggregateOutputType | null - } - - export type AccountAvgAggregateOutputType = { - expires_at: number | null - } - - export type AccountSumAggregateOutputType = { - expires_at: number | null - } - - export type AccountMinAggregateOutputType = { - userId: string | null - type: string | null - provider: string | null - providerAccountId: string | null - refresh_token: string | null - access_token: string | null - expires_at: number | null - token_type: string | null - scope: string | null - id_token: string | null - session_state: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AccountMaxAggregateOutputType = { - userId: string | null - type: string | null - provider: string | null - providerAccountId: string | null - refresh_token: string | null - access_token: string | null - expires_at: number | null - token_type: string | null - scope: string | null - id_token: string | null - session_state: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type AccountCountAggregateOutputType = { - userId: number - type: number - provider: number - providerAccountId: number - refresh_token: number - access_token: number - expires_at: number - token_type: number - scope: number - id_token: number - session_state: number - createdAt: number - updatedAt: number - _all: number - } - - - export type AccountAvgAggregateInputType = { - expires_at?: true - } - - export type AccountSumAggregateInputType = { - expires_at?: true - } - - export type AccountMinAggregateInputType = { - userId?: true - type?: true - provider?: true - providerAccountId?: true - refresh_token?: true - access_token?: true - expires_at?: true - token_type?: true - scope?: true - id_token?: true - session_state?: true - createdAt?: true - updatedAt?: true - } - - export type AccountMaxAggregateInputType = { - userId?: true - type?: true - provider?: true - providerAccountId?: true - refresh_token?: true - access_token?: true - expires_at?: true - token_type?: true - scope?: true - id_token?: true - session_state?: true - createdAt?: true - updatedAt?: true - } - - export type AccountCountAggregateInputType = { - userId?: true - type?: true - provider?: true - providerAccountId?: true - refresh_token?: true - access_token?: true - expires_at?: true - token_type?: true - scope?: true - id_token?: true - session_state?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type AccountAggregateArgs = { - /** - * Filter which Account to aggregate. - */ - where?: AccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Accounts to fetch. - */ - orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: AccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Accounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Accounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Accounts - **/ - _count?: true | AccountCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: AccountAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: AccountSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AccountMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AccountMaxAggregateInputType - } - - export type GetAccountAggregateType = { - [P in keyof T & keyof AggregateAccount]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AccountGroupByArgs = { - where?: AccountWhereInput - orderBy?: AccountOrderByWithAggregationInput | AccountOrderByWithAggregationInput[] - by: AccountScalarFieldEnum[] | AccountScalarFieldEnum - having?: AccountScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AccountCountAggregateInputType | true - _avg?: AccountAvgAggregateInputType - _sum?: AccountSumAggregateInputType - _min?: AccountMinAggregateInputType - _max?: AccountMaxAggregateInputType - } - - export type AccountGroupByOutputType = { - userId: string - type: string - provider: string - providerAccountId: string - refresh_token: string | null - access_token: string | null - expires_at: number | null - token_type: string | null - scope: string | null - id_token: string | null - session_state: string | null - createdAt: Date - updatedAt: Date - _count: AccountCountAggregateOutputType | null - _avg: AccountAvgAggregateOutputType | null - _sum: AccountSumAggregateOutputType | null - _min: AccountMinAggregateOutputType | null - _max: AccountMaxAggregateOutputType | null - } - - type GetAccountGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof AccountGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AccountSelect = $Extensions.GetSelect<{ - userId?: boolean - type?: boolean - provider?: boolean - providerAccountId?: boolean - refresh_token?: boolean - access_token?: boolean - expires_at?: boolean - token_type?: boolean - scope?: boolean - id_token?: boolean - session_state?: boolean - createdAt?: boolean - updatedAt?: boolean - user?: boolean | UserDefaultArgs - }, ExtArgs["result"]["account"]> - - export type AccountSelectCreateManyAndReturn = $Extensions.GetSelect<{ - userId?: boolean - type?: boolean - provider?: boolean - providerAccountId?: boolean - refresh_token?: boolean - access_token?: boolean - expires_at?: boolean - token_type?: boolean - scope?: boolean - id_token?: boolean - session_state?: boolean - createdAt?: boolean - updatedAt?: boolean - user?: boolean | UserDefaultArgs - }, ExtArgs["result"]["account"]> - - export type AccountSelectScalar = { - userId?: boolean - type?: boolean - provider?: boolean - providerAccountId?: boolean - refresh_token?: boolean - access_token?: boolean - expires_at?: boolean - token_type?: boolean - scope?: boolean - id_token?: boolean - session_state?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - export type AccountInclude = { - user?: boolean | UserDefaultArgs - } - export type AccountIncludeCreateManyAndReturn = { - user?: boolean | UserDefaultArgs - } - - export type $AccountPayload = { - name: "Account" - objects: { - user: Prisma.$UserPayload - } - scalars: $Extensions.GetPayloadResult<{ - userId: string - type: string - provider: string - providerAccountId: string - refresh_token: string | null - access_token: string | null - expires_at: number | null - token_type: string | null - scope: string | null - id_token: string | null - session_state: string | null - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["account"]> - composites: {} - } - - type AccountGetPayload = $Result.GetResult - - type AccountCountArgs = - Omit & { - select?: AccountCountAggregateInputType | true - } - - export interface AccountDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Account'], meta: { name: 'Account' } } - /** - * Find zero or one Account that matches the filter. - * @param {AccountFindUniqueArgs} args - Arguments to find a Account - * @example - * // Get one Account - * const account = await prisma.account.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__AccountClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one Account that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AccountFindUniqueOrThrowArgs} args - Arguments to find a Account - * @example - * // Get one Account - * const account = await prisma.account.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__AccountClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first Account that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountFindFirstArgs} args - Arguments to find a Account - * @example - * // Get one Account - * const account = await prisma.account.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__AccountClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first Account that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountFindFirstOrThrowArgs} args - Arguments to find a Account - * @example - * // Get one Account - * const account = await prisma.account.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__AccountClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more Accounts that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Accounts - * const accounts = await prisma.account.findMany() - * - * // Get first 10 Accounts - * const accounts = await prisma.account.findMany({ take: 10 }) - * - * // Only select the `userId` - * const accountWithUserIdOnly = await prisma.account.findMany({ select: { userId: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a Account. - * @param {AccountCreateArgs} args - Arguments to create a Account. - * @example - * // Create one Account - * const Account = await prisma.account.create({ - * data: { - * // ... data to create a Account - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__AccountClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many Accounts. - * @param {AccountCreateManyArgs} args - Arguments to create many Accounts. - * @example - * // Create many Accounts - * const account = await prisma.account.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Accounts and returns the data saved in the database. - * @param {AccountCreateManyAndReturnArgs} args - Arguments to create many Accounts. - * @example - * // Create many Accounts - * const account = await prisma.account.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Accounts and only return the `userId` - * const accountWithUserIdOnly = await prisma.account.createManyAndReturn({ - * select: { userId: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a Account. - * @param {AccountDeleteArgs} args - Arguments to delete one Account. - * @example - * // Delete one Account - * const Account = await prisma.account.delete({ - * where: { - * // ... filter to delete one Account - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__AccountClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one Account. - * @param {AccountUpdateArgs} args - Arguments to update one Account. - * @example - * // Update one Account - * const account = await prisma.account.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__AccountClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more Accounts. - * @param {AccountDeleteManyArgs} args - Arguments to filter Accounts to delete. - * @example - * // Delete a few Accounts - * const { count } = await prisma.account.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Accounts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Accounts - * const account = await prisma.account.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Account. - * @param {AccountUpsertArgs} args - Arguments to update or create a Account. - * @example - * // Update or create a Account - * const account = await prisma.account.upsert({ - * create: { - * // ... data to create a Account - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Account we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__AccountClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of Accounts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountCountArgs} args - Arguments to filter Accounts to count. - * @example - * // Count the number of Accounts - * const count = await prisma.account.count({ - * where: { - * // ... the filter for the Accounts we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Account. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Account. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AccountGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends AccountGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AccountGroupByArgs['orderBy'] } - : { orderBy?: AccountGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAccountGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Account model - */ - readonly fields: AccountFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Account. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__AccountClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Account model - */ - interface AccountFieldRefs { - readonly userId: FieldRef<"Account", 'String'> - readonly type: FieldRef<"Account", 'String'> - readonly provider: FieldRef<"Account", 'String'> - readonly providerAccountId: FieldRef<"Account", 'String'> - readonly refresh_token: FieldRef<"Account", 'String'> - readonly access_token: FieldRef<"Account", 'String'> - readonly expires_at: FieldRef<"Account", 'Int'> - readonly token_type: FieldRef<"Account", 'String'> - readonly scope: FieldRef<"Account", 'String'> - readonly id_token: FieldRef<"Account", 'String'> - readonly session_state: FieldRef<"Account", 'String'> - readonly createdAt: FieldRef<"Account", 'DateTime'> - readonly updatedAt: FieldRef<"Account", 'DateTime'> - } - - - // Custom InputTypes - /** - * Account findUnique - */ - export type AccountFindUniqueArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - /** - * Filter, which Account to fetch. - */ - where: AccountWhereUniqueInput - } - - /** - * Account findUniqueOrThrow - */ - export type AccountFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - /** - * Filter, which Account to fetch. - */ - where: AccountWhereUniqueInput - } - - /** - * Account findFirst - */ - export type AccountFindFirstArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - /** - * Filter, which Account to fetch. - */ - where?: AccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Accounts to fetch. - */ - orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Accounts. - */ - cursor?: AccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Accounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Accounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Accounts. - */ - distinct?: AccountScalarFieldEnum | AccountScalarFieldEnum[] - } - - /** - * Account findFirstOrThrow - */ - export type AccountFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - /** - * Filter, which Account to fetch. - */ - where?: AccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Accounts to fetch. - */ - orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Accounts. - */ - cursor?: AccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Accounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Accounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Accounts. - */ - distinct?: AccountScalarFieldEnum | AccountScalarFieldEnum[] - } - - /** - * Account findMany - */ - export type AccountFindManyArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - /** - * Filter, which Accounts to fetch. - */ - where?: AccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Accounts to fetch. - */ - orderBy?: AccountOrderByWithRelationInput | AccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Accounts. - */ - cursor?: AccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Accounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Accounts. - */ - skip?: number - distinct?: AccountScalarFieldEnum | AccountScalarFieldEnum[] - } - - /** - * Account create - */ - export type AccountCreateArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - /** - * The data needed to create a Account. - */ - data: XOR - } - - /** - * Account createMany - */ - export type AccountCreateManyArgs = { - /** - * The data used to create many Accounts. - */ - data: AccountCreateManyInput | AccountCreateManyInput[] - } - - /** - * Account createManyAndReturn - */ - export type AccountCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelectCreateManyAndReturn | null - /** - * The data used to create many Accounts. - */ - data: AccountCreateManyInput | AccountCreateManyInput[] - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountIncludeCreateManyAndReturn | null - } - - /** - * Account update - */ - export type AccountUpdateArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - /** - * The data needed to update a Account. - */ - data: XOR - /** - * Choose, which Account to update. - */ - where: AccountWhereUniqueInput - } - - /** - * Account updateMany - */ - export type AccountUpdateManyArgs = { - /** - * The data used to update Accounts. - */ - data: XOR - /** - * Filter which Accounts to update - */ - where?: AccountWhereInput - } - - /** - * Account upsert - */ - export type AccountUpsertArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - /** - * The filter to search for the Account to update in case it exists. - */ - where: AccountWhereUniqueInput - /** - * In case the Account found by the `where` argument doesn't exist, create a new Account with this data. - */ - create: XOR - /** - * In case the Account was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Account delete - */ - export type AccountDeleteArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - /** - * Filter which Account to delete. - */ - where: AccountWhereUniqueInput - } - - /** - * Account deleteMany - */ - export type AccountDeleteManyArgs = { - /** - * Filter which Accounts to delete - */ - where?: AccountWhereInput - } - - /** - * Account without action - */ - export type AccountDefaultArgs = { - /** - * Select specific fields to fetch from the Account - */ - select?: AccountSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AccountInclude | null - } - - - /** - * Model Session - */ - - export type AggregateSession = { - _count: SessionCountAggregateOutputType | null - _min: SessionMinAggregateOutputType | null - _max: SessionMaxAggregateOutputType | null - } - - export type SessionMinAggregateOutputType = { - sessionToken: string | null - userId: string | null - expires: Date | null - createdAt: Date | null - updatedAt: Date | null - } - - export type SessionMaxAggregateOutputType = { - sessionToken: string | null - userId: string | null - expires: Date | null - createdAt: Date | null - updatedAt: Date | null - } - - export type SessionCountAggregateOutputType = { - sessionToken: number - userId: number - expires: number - createdAt: number - updatedAt: number - _all: number - } - - - export type SessionMinAggregateInputType = { - sessionToken?: true - userId?: true - expires?: true - createdAt?: true - updatedAt?: true - } - - export type SessionMaxAggregateInputType = { - sessionToken?: true - userId?: true - expires?: true - createdAt?: true - updatedAt?: true - } - - export type SessionCountAggregateInputType = { - sessionToken?: true - userId?: true - expires?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type SessionAggregateArgs = { - /** - * Filter which Session to aggregate. - */ - where?: SessionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Sessions to fetch. - */ - orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: SessionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Sessions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Sessions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Sessions - **/ - _count?: true | SessionCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: SessionMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: SessionMaxAggregateInputType - } - - export type GetSessionAggregateType = { - [P in keyof T & keyof AggregateSession]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type SessionGroupByArgs = { - where?: SessionWhereInput - orderBy?: SessionOrderByWithAggregationInput | SessionOrderByWithAggregationInput[] - by: SessionScalarFieldEnum[] | SessionScalarFieldEnum - having?: SessionScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: SessionCountAggregateInputType | true - _min?: SessionMinAggregateInputType - _max?: SessionMaxAggregateInputType - } - - export type SessionGroupByOutputType = { - sessionToken: string - userId: string - expires: Date - createdAt: Date - updatedAt: Date - _count: SessionCountAggregateOutputType | null - _min: SessionMinAggregateOutputType | null - _max: SessionMaxAggregateOutputType | null - } - - type GetSessionGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof SessionGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type SessionSelect = $Extensions.GetSelect<{ - sessionToken?: boolean - userId?: boolean - expires?: boolean - createdAt?: boolean - updatedAt?: boolean - user?: boolean | UserDefaultArgs - }, ExtArgs["result"]["session"]> - - export type SessionSelectCreateManyAndReturn = $Extensions.GetSelect<{ - sessionToken?: boolean - userId?: boolean - expires?: boolean - createdAt?: boolean - updatedAt?: boolean - user?: boolean | UserDefaultArgs - }, ExtArgs["result"]["session"]> - - export type SessionSelectScalar = { - sessionToken?: boolean - userId?: boolean - expires?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - export type SessionInclude = { - user?: boolean | UserDefaultArgs - } - export type SessionIncludeCreateManyAndReturn = { - user?: boolean | UserDefaultArgs - } - - export type $SessionPayload = { - name: "Session" - objects: { - user: Prisma.$UserPayload - } - scalars: $Extensions.GetPayloadResult<{ - sessionToken: string - userId: string - expires: Date - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["session"]> - composites: {} - } - - type SessionGetPayload = $Result.GetResult - - type SessionCountArgs = - Omit & { - select?: SessionCountAggregateInputType | true - } - - export interface SessionDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Session'], meta: { name: 'Session' } } - /** - * Find zero or one Session that matches the filter. - * @param {SessionFindUniqueArgs} args - Arguments to find a Session - * @example - * // Get one Session - * const session = await prisma.session.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one Session that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {SessionFindUniqueOrThrowArgs} args - Arguments to find a Session - * @example - * // Get one Session - * const session = await prisma.session.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first Session that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionFindFirstArgs} args - Arguments to find a Session - * @example - * // Get one Session - * const session = await prisma.session.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first Session that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionFindFirstOrThrowArgs} args - Arguments to find a Session - * @example - * // Get one Session - * const session = await prisma.session.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more Sessions that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Sessions - * const sessions = await prisma.session.findMany() - * - * // Get first 10 Sessions - * const sessions = await prisma.session.findMany({ take: 10 }) - * - * // Only select the `sessionToken` - * const sessionWithSessionTokenOnly = await prisma.session.findMany({ select: { sessionToken: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a Session. - * @param {SessionCreateArgs} args - Arguments to create a Session. - * @example - * // Create one Session - * const Session = await prisma.session.create({ - * data: { - * // ... data to create a Session - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many Sessions. - * @param {SessionCreateManyArgs} args - Arguments to create many Sessions. - * @example - * // Create many Sessions - * const session = await prisma.session.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Sessions and returns the data saved in the database. - * @param {SessionCreateManyAndReturnArgs} args - Arguments to create many Sessions. - * @example - * // Create many Sessions - * const session = await prisma.session.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Sessions and only return the `sessionToken` - * const sessionWithSessionTokenOnly = await prisma.session.createManyAndReturn({ - * select: { sessionToken: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a Session. - * @param {SessionDeleteArgs} args - Arguments to delete one Session. - * @example - * // Delete one Session - * const Session = await prisma.session.delete({ - * where: { - * // ... filter to delete one Session - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one Session. - * @param {SessionUpdateArgs} args - Arguments to update one Session. - * @example - * // Update one Session - * const session = await prisma.session.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more Sessions. - * @param {SessionDeleteManyArgs} args - Arguments to filter Sessions to delete. - * @example - * // Delete a few Sessions - * const { count } = await prisma.session.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Sessions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Sessions - * const session = await prisma.session.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Session. - * @param {SessionUpsertArgs} args - Arguments to update or create a Session. - * @example - * // Update or create a Session - * const session = await prisma.session.upsert({ - * create: { - * // ... data to create a Session - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Session we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of Sessions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionCountArgs} args - Arguments to filter Sessions to count. - * @example - * // Count the number of Sessions - * const count = await prisma.session.count({ - * where: { - * // ... the filter for the Sessions we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Session. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Session. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends SessionGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: SessionGroupByArgs['orderBy'] } - : { orderBy?: SessionGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSessionGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Session model - */ - readonly fields: SessionFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Session. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__SessionClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Session model - */ - interface SessionFieldRefs { - readonly sessionToken: FieldRef<"Session", 'String'> - readonly userId: FieldRef<"Session", 'String'> - readonly expires: FieldRef<"Session", 'DateTime'> - readonly createdAt: FieldRef<"Session", 'DateTime'> - readonly updatedAt: FieldRef<"Session", 'DateTime'> - } - - - // Custom InputTypes - /** - * Session findUnique - */ - export type SessionFindUniqueArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - /** - * Filter, which Session to fetch. - */ - where: SessionWhereUniqueInput - } - - /** - * Session findUniqueOrThrow - */ - export type SessionFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - /** - * Filter, which Session to fetch. - */ - where: SessionWhereUniqueInput - } - - /** - * Session findFirst - */ - export type SessionFindFirstArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - /** - * Filter, which Session to fetch. - */ - where?: SessionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Sessions to fetch. - */ - orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Sessions. - */ - cursor?: SessionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Sessions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Sessions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Sessions. - */ - distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] - } - - /** - * Session findFirstOrThrow - */ - export type SessionFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - /** - * Filter, which Session to fetch. - */ - where?: SessionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Sessions to fetch. - */ - orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Sessions. - */ - cursor?: SessionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Sessions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Sessions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Sessions. - */ - distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] - } - - /** - * Session findMany - */ - export type SessionFindManyArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - /** - * Filter, which Sessions to fetch. - */ - where?: SessionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Sessions to fetch. - */ - orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Sessions. - */ - cursor?: SessionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Sessions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Sessions. - */ - skip?: number - distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] - } - - /** - * Session create - */ - export type SessionCreateArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - /** - * The data needed to create a Session. - */ - data: XOR - } - - /** - * Session createMany - */ - export type SessionCreateManyArgs = { - /** - * The data used to create many Sessions. - */ - data: SessionCreateManyInput | SessionCreateManyInput[] - } - - /** - * Session createManyAndReturn - */ - export type SessionCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelectCreateManyAndReturn | null - /** - * The data used to create many Sessions. - */ - data: SessionCreateManyInput | SessionCreateManyInput[] - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionIncludeCreateManyAndReturn | null - } - - /** - * Session update - */ - export type SessionUpdateArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - /** - * The data needed to update a Session. - */ - data: XOR - /** - * Choose, which Session to update. - */ - where: SessionWhereUniqueInput - } - - /** - * Session updateMany - */ - export type SessionUpdateManyArgs = { - /** - * The data used to update Sessions. - */ - data: XOR - /** - * Filter which Sessions to update - */ - where?: SessionWhereInput - } - - /** - * Session upsert - */ - export type SessionUpsertArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - /** - * The filter to search for the Session to update in case it exists. - */ - where: SessionWhereUniqueInput - /** - * In case the Session found by the `where` argument doesn't exist, create a new Session with this data. - */ - create: XOR - /** - * In case the Session was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Session delete - */ - export type SessionDeleteArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - /** - * Filter which Session to delete. - */ - where: SessionWhereUniqueInput - } - - /** - * Session deleteMany - */ - export type SessionDeleteManyArgs = { - /** - * Filter which Sessions to delete - */ - where?: SessionWhereInput - } - - /** - * Session without action - */ - export type SessionDefaultArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: SessionInclude | null - } - - - /** - * Model VerificationToken - */ - - export type AggregateVerificationToken = { - _count: VerificationTokenCountAggregateOutputType | null - _min: VerificationTokenMinAggregateOutputType | null - _max: VerificationTokenMaxAggregateOutputType | null - } - - export type VerificationTokenMinAggregateOutputType = { - identifier: string | null - token: string | null - expires: Date | null - } - - export type VerificationTokenMaxAggregateOutputType = { - identifier: string | null - token: string | null - expires: Date | null - } - - export type VerificationTokenCountAggregateOutputType = { - identifier: number - token: number - expires: number - _all: number - } - - - export type VerificationTokenMinAggregateInputType = { - identifier?: true - token?: true - expires?: true - } - - export type VerificationTokenMaxAggregateInputType = { - identifier?: true - token?: true - expires?: true - } - - export type VerificationTokenCountAggregateInputType = { - identifier?: true - token?: true - expires?: true - _all?: true - } - - export type VerificationTokenAggregateArgs = { - /** - * Filter which VerificationToken to aggregate. - */ - where?: VerificationTokenWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of VerificationTokens to fetch. - */ - orderBy?: VerificationTokenOrderByWithRelationInput | VerificationTokenOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: VerificationTokenWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` VerificationTokens from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` VerificationTokens. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned VerificationTokens - **/ - _count?: true | VerificationTokenCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: VerificationTokenMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: VerificationTokenMaxAggregateInputType - } - - export type GetVerificationTokenAggregateType = { - [P in keyof T & keyof AggregateVerificationToken]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type VerificationTokenGroupByArgs = { - where?: VerificationTokenWhereInput - orderBy?: VerificationTokenOrderByWithAggregationInput | VerificationTokenOrderByWithAggregationInput[] - by: VerificationTokenScalarFieldEnum[] | VerificationTokenScalarFieldEnum - having?: VerificationTokenScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: VerificationTokenCountAggregateInputType | true - _min?: VerificationTokenMinAggregateInputType - _max?: VerificationTokenMaxAggregateInputType - } - - export type VerificationTokenGroupByOutputType = { - identifier: string - token: string - expires: Date - _count: VerificationTokenCountAggregateOutputType | null - _min: VerificationTokenMinAggregateOutputType | null - _max: VerificationTokenMaxAggregateOutputType | null - } - - type GetVerificationTokenGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof VerificationTokenGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type VerificationTokenSelect = $Extensions.GetSelect<{ - identifier?: boolean - token?: boolean - expires?: boolean - }, ExtArgs["result"]["verificationToken"]> - - export type VerificationTokenSelectCreateManyAndReturn = $Extensions.GetSelect<{ - identifier?: boolean - token?: boolean - expires?: boolean - }, ExtArgs["result"]["verificationToken"]> - - export type VerificationTokenSelectScalar = { - identifier?: boolean - token?: boolean - expires?: boolean - } - - - export type $VerificationTokenPayload = { - name: "VerificationToken" - objects: {} - scalars: $Extensions.GetPayloadResult<{ - identifier: string - token: string - expires: Date - }, ExtArgs["result"]["verificationToken"]> - composites: {} - } - - type VerificationTokenGetPayload = $Result.GetResult - - type VerificationTokenCountArgs = - Omit & { - select?: VerificationTokenCountAggregateInputType | true - } - - export interface VerificationTokenDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['VerificationToken'], meta: { name: 'VerificationToken' } } - /** - * Find zero or one VerificationToken that matches the filter. - * @param {VerificationTokenFindUniqueArgs} args - Arguments to find a VerificationToken - * @example - * // Get one VerificationToken - * const verificationToken = await prisma.verificationToken.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__VerificationTokenClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one VerificationToken that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {VerificationTokenFindUniqueOrThrowArgs} args - Arguments to find a VerificationToken - * @example - * // Get one VerificationToken - * const verificationToken = await prisma.verificationToken.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__VerificationTokenClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first VerificationToken that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {VerificationTokenFindFirstArgs} args - Arguments to find a VerificationToken - * @example - * // Get one VerificationToken - * const verificationToken = await prisma.verificationToken.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__VerificationTokenClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first VerificationToken that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {VerificationTokenFindFirstOrThrowArgs} args - Arguments to find a VerificationToken - * @example - * // Get one VerificationToken - * const verificationToken = await prisma.verificationToken.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__VerificationTokenClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more VerificationTokens that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {VerificationTokenFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all VerificationTokens - * const verificationTokens = await prisma.verificationToken.findMany() - * - * // Get first 10 VerificationTokens - * const verificationTokens = await prisma.verificationToken.findMany({ take: 10 }) - * - * // Only select the `identifier` - * const verificationTokenWithIdentifierOnly = await prisma.verificationToken.findMany({ select: { identifier: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a VerificationToken. - * @param {VerificationTokenCreateArgs} args - Arguments to create a VerificationToken. - * @example - * // Create one VerificationToken - * const VerificationToken = await prisma.verificationToken.create({ - * data: { - * // ... data to create a VerificationToken - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__VerificationTokenClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many VerificationTokens. - * @param {VerificationTokenCreateManyArgs} args - Arguments to create many VerificationTokens. - * @example - * // Create many VerificationTokens - * const verificationToken = await prisma.verificationToken.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many VerificationTokens and returns the data saved in the database. - * @param {VerificationTokenCreateManyAndReturnArgs} args - Arguments to create many VerificationTokens. - * @example - * // Create many VerificationTokens - * const verificationToken = await prisma.verificationToken.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many VerificationTokens and only return the `identifier` - * const verificationTokenWithIdentifierOnly = await prisma.verificationToken.createManyAndReturn({ - * select: { identifier: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a VerificationToken. - * @param {VerificationTokenDeleteArgs} args - Arguments to delete one VerificationToken. - * @example - * // Delete one VerificationToken - * const VerificationToken = await prisma.verificationToken.delete({ - * where: { - * // ... filter to delete one VerificationToken - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__VerificationTokenClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one VerificationToken. - * @param {VerificationTokenUpdateArgs} args - Arguments to update one VerificationToken. - * @example - * // Update one VerificationToken - * const verificationToken = await prisma.verificationToken.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__VerificationTokenClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more VerificationTokens. - * @param {VerificationTokenDeleteManyArgs} args - Arguments to filter VerificationTokens to delete. - * @example - * // Delete a few VerificationTokens - * const { count } = await prisma.verificationToken.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more VerificationTokens. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {VerificationTokenUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many VerificationTokens - * const verificationToken = await prisma.verificationToken.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one VerificationToken. - * @param {VerificationTokenUpsertArgs} args - Arguments to update or create a VerificationToken. - * @example - * // Update or create a VerificationToken - * const verificationToken = await prisma.verificationToken.upsert({ - * create: { - * // ... data to create a VerificationToken - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the VerificationToken we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__VerificationTokenClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of VerificationTokens. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {VerificationTokenCountArgs} args - Arguments to filter VerificationTokens to count. - * @example - * // Count the number of VerificationTokens - * const count = await prisma.verificationToken.count({ - * where: { - * // ... the filter for the VerificationTokens we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a VerificationToken. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {VerificationTokenAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by VerificationToken. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {VerificationTokenGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends VerificationTokenGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: VerificationTokenGroupByArgs['orderBy'] } - : { orderBy?: VerificationTokenGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetVerificationTokenGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the VerificationToken model - */ - readonly fields: VerificationTokenFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for VerificationToken. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__VerificationTokenClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the VerificationToken model - */ - interface VerificationTokenFieldRefs { - readonly identifier: FieldRef<"VerificationToken", 'String'> - readonly token: FieldRef<"VerificationToken", 'String'> - readonly expires: FieldRef<"VerificationToken", 'DateTime'> - } - - - // Custom InputTypes - /** - * VerificationToken findUnique - */ - export type VerificationTokenFindUniqueArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - /** - * Filter, which VerificationToken to fetch. - */ - where: VerificationTokenWhereUniqueInput - } - - /** - * VerificationToken findUniqueOrThrow - */ - export type VerificationTokenFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - /** - * Filter, which VerificationToken to fetch. - */ - where: VerificationTokenWhereUniqueInput - } - - /** - * VerificationToken findFirst - */ - export type VerificationTokenFindFirstArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - /** - * Filter, which VerificationToken to fetch. - */ - where?: VerificationTokenWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of VerificationTokens to fetch. - */ - orderBy?: VerificationTokenOrderByWithRelationInput | VerificationTokenOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for VerificationTokens. - */ - cursor?: VerificationTokenWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` VerificationTokens from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` VerificationTokens. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of VerificationTokens. - */ - distinct?: VerificationTokenScalarFieldEnum | VerificationTokenScalarFieldEnum[] - } - - /** - * VerificationToken findFirstOrThrow - */ - export type VerificationTokenFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - /** - * Filter, which VerificationToken to fetch. - */ - where?: VerificationTokenWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of VerificationTokens to fetch. - */ - orderBy?: VerificationTokenOrderByWithRelationInput | VerificationTokenOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for VerificationTokens. - */ - cursor?: VerificationTokenWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` VerificationTokens from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` VerificationTokens. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of VerificationTokens. - */ - distinct?: VerificationTokenScalarFieldEnum | VerificationTokenScalarFieldEnum[] - } - - /** - * VerificationToken findMany - */ - export type VerificationTokenFindManyArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - /** - * Filter, which VerificationTokens to fetch. - */ - where?: VerificationTokenWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of VerificationTokens to fetch. - */ - orderBy?: VerificationTokenOrderByWithRelationInput | VerificationTokenOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing VerificationTokens. - */ - cursor?: VerificationTokenWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` VerificationTokens from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` VerificationTokens. - */ - skip?: number - distinct?: VerificationTokenScalarFieldEnum | VerificationTokenScalarFieldEnum[] - } - - /** - * VerificationToken create - */ - export type VerificationTokenCreateArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - /** - * The data needed to create a VerificationToken. - */ - data: XOR - } - - /** - * VerificationToken createMany - */ - export type VerificationTokenCreateManyArgs = { - /** - * The data used to create many VerificationTokens. - */ - data: VerificationTokenCreateManyInput | VerificationTokenCreateManyInput[] - } - - /** - * VerificationToken createManyAndReturn - */ - export type VerificationTokenCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelectCreateManyAndReturn | null - /** - * The data used to create many VerificationTokens. - */ - data: VerificationTokenCreateManyInput | VerificationTokenCreateManyInput[] - } - - /** - * VerificationToken update - */ - export type VerificationTokenUpdateArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - /** - * The data needed to update a VerificationToken. - */ - data: XOR - /** - * Choose, which VerificationToken to update. - */ - where: VerificationTokenWhereUniqueInput - } - - /** - * VerificationToken updateMany - */ - export type VerificationTokenUpdateManyArgs = { - /** - * The data used to update VerificationTokens. - */ - data: XOR - /** - * Filter which VerificationTokens to update - */ - where?: VerificationTokenWhereInput - } - - /** - * VerificationToken upsert - */ - export type VerificationTokenUpsertArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - /** - * The filter to search for the VerificationToken to update in case it exists. - */ - where: VerificationTokenWhereUniqueInput - /** - * In case the VerificationToken found by the `where` argument doesn't exist, create a new VerificationToken with this data. - */ - create: XOR - /** - * In case the VerificationToken was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * VerificationToken delete - */ - export type VerificationTokenDeleteArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - /** - * Filter which VerificationToken to delete. - */ - where: VerificationTokenWhereUniqueInput - } - - /** - * VerificationToken deleteMany - */ - export type VerificationTokenDeleteManyArgs = { - /** - * Filter which VerificationTokens to delete - */ - where?: VerificationTokenWhereInput - } - - /** - * VerificationToken without action - */ - export type VerificationTokenDefaultArgs = { - /** - * Select specific fields to fetch from the VerificationToken - */ - select?: VerificationTokenSelect | null - } - - - /** - * Model Notebook - */ - - export type AggregateNotebook = { - _count: NotebookCountAggregateOutputType | null - _avg: NotebookAvgAggregateOutputType | null - _sum: NotebookSumAggregateOutputType | null - _min: NotebookMinAggregateOutputType | null - _max: NotebookMaxAggregateOutputType | null - } - - export type NotebookAvgAggregateOutputType = { - order: number | null - } - - export type NotebookSumAggregateOutputType = { - order: number | null - } - - export type NotebookMinAggregateOutputType = { - id: string | null - name: string | null - icon: string | null - color: string | null - order: number | null - userId: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type NotebookMaxAggregateOutputType = { - id: string | null - name: string | null - icon: string | null - color: string | null - order: number | null - userId: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type NotebookCountAggregateOutputType = { - id: number - name: number - icon: number - color: number - order: number - userId: number - createdAt: number - updatedAt: number - _all: number - } - - - export type NotebookAvgAggregateInputType = { - order?: true - } - - export type NotebookSumAggregateInputType = { - order?: true - } - - export type NotebookMinAggregateInputType = { - id?: true - name?: true - icon?: true - color?: true - order?: true - userId?: true - createdAt?: true - updatedAt?: true - } - - export type NotebookMaxAggregateInputType = { - id?: true - name?: true - icon?: true - color?: true - order?: true - userId?: true - createdAt?: true - updatedAt?: true - } - - export type NotebookCountAggregateInputType = { - id?: true - name?: true - icon?: true - color?: true - order?: true - userId?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type NotebookAggregateArgs = { - /** - * Filter which Notebook to aggregate. - */ - where?: NotebookWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Notebooks to fetch. - */ - orderBy?: NotebookOrderByWithRelationInput | NotebookOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: NotebookWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Notebooks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Notebooks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Notebooks - **/ - _count?: true | NotebookCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: NotebookAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: NotebookSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: NotebookMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: NotebookMaxAggregateInputType - } - - export type GetNotebookAggregateType = { - [P in keyof T & keyof AggregateNotebook]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type NotebookGroupByArgs = { - where?: NotebookWhereInput - orderBy?: NotebookOrderByWithAggregationInput | NotebookOrderByWithAggregationInput[] - by: NotebookScalarFieldEnum[] | NotebookScalarFieldEnum - having?: NotebookScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: NotebookCountAggregateInputType | true - _avg?: NotebookAvgAggregateInputType - _sum?: NotebookSumAggregateInputType - _min?: NotebookMinAggregateInputType - _max?: NotebookMaxAggregateInputType - } - - export type NotebookGroupByOutputType = { - id: string - name: string - icon: string | null - color: string | null - order: number - userId: string - createdAt: Date - updatedAt: Date - _count: NotebookCountAggregateOutputType | null - _avg: NotebookAvgAggregateOutputType | null - _sum: NotebookSumAggregateOutputType | null - _min: NotebookMinAggregateOutputType | null - _max: NotebookMaxAggregateOutputType | null - } - - type GetNotebookGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof NotebookGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type NotebookSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - icon?: boolean - color?: boolean - order?: boolean - userId?: boolean - createdAt?: boolean - updatedAt?: boolean - user?: boolean | UserDefaultArgs - notes?: boolean | Notebook$notesArgs - labels?: boolean | Notebook$labelsArgs - _count?: boolean | NotebookCountOutputTypeDefaultArgs - }, ExtArgs["result"]["notebook"]> - - export type NotebookSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - icon?: boolean - color?: boolean - order?: boolean - userId?: boolean - createdAt?: boolean - updatedAt?: boolean - user?: boolean | UserDefaultArgs - }, ExtArgs["result"]["notebook"]> - - export type NotebookSelectScalar = { - id?: boolean - name?: boolean - icon?: boolean - color?: boolean - order?: boolean - userId?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - export type NotebookInclude = { - user?: boolean | UserDefaultArgs - notes?: boolean | Notebook$notesArgs - labels?: boolean | Notebook$labelsArgs - _count?: boolean | NotebookCountOutputTypeDefaultArgs - } - export type NotebookIncludeCreateManyAndReturn = { - user?: boolean | UserDefaultArgs - } - - export type $NotebookPayload = { - name: "Notebook" - objects: { - user: Prisma.$UserPayload - notes: Prisma.$NotePayload[] - labels: Prisma.$LabelPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: string - name: string - icon: string | null - color: string | null - order: number - userId: string - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["notebook"]> - composites: {} - } - - type NotebookGetPayload = $Result.GetResult - - type NotebookCountArgs = - Omit & { - select?: NotebookCountAggregateInputType | true - } - - export interface NotebookDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Notebook'], meta: { name: 'Notebook' } } - /** - * Find zero or one Notebook that matches the filter. - * @param {NotebookFindUniqueArgs} args - Arguments to find a Notebook - * @example - * // Get one Notebook - * const notebook = await prisma.notebook.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__NotebookClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one Notebook that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {NotebookFindUniqueOrThrowArgs} args - Arguments to find a Notebook - * @example - * // Get one Notebook - * const notebook = await prisma.notebook.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__NotebookClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first Notebook that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NotebookFindFirstArgs} args - Arguments to find a Notebook - * @example - * // Get one Notebook - * const notebook = await prisma.notebook.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__NotebookClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first Notebook that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NotebookFindFirstOrThrowArgs} args - Arguments to find a Notebook - * @example - * // Get one Notebook - * const notebook = await prisma.notebook.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__NotebookClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more Notebooks that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NotebookFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Notebooks - * const notebooks = await prisma.notebook.findMany() - * - * // Get first 10 Notebooks - * const notebooks = await prisma.notebook.findMany({ take: 10 }) - * - * // Only select the `id` - * const notebookWithIdOnly = await prisma.notebook.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a Notebook. - * @param {NotebookCreateArgs} args - Arguments to create a Notebook. - * @example - * // Create one Notebook - * const Notebook = await prisma.notebook.create({ - * data: { - * // ... data to create a Notebook - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__NotebookClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many Notebooks. - * @param {NotebookCreateManyArgs} args - Arguments to create many Notebooks. - * @example - * // Create many Notebooks - * const notebook = await prisma.notebook.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Notebooks and returns the data saved in the database. - * @param {NotebookCreateManyAndReturnArgs} args - Arguments to create many Notebooks. - * @example - * // Create many Notebooks - * const notebook = await prisma.notebook.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Notebooks and only return the `id` - * const notebookWithIdOnly = await prisma.notebook.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a Notebook. - * @param {NotebookDeleteArgs} args - Arguments to delete one Notebook. - * @example - * // Delete one Notebook - * const Notebook = await prisma.notebook.delete({ - * where: { - * // ... filter to delete one Notebook - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__NotebookClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one Notebook. - * @param {NotebookUpdateArgs} args - Arguments to update one Notebook. - * @example - * // Update one Notebook - * const notebook = await prisma.notebook.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__NotebookClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more Notebooks. - * @param {NotebookDeleteManyArgs} args - Arguments to filter Notebooks to delete. - * @example - * // Delete a few Notebooks - * const { count } = await prisma.notebook.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Notebooks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NotebookUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Notebooks - * const notebook = await prisma.notebook.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Notebook. - * @param {NotebookUpsertArgs} args - Arguments to update or create a Notebook. - * @example - * // Update or create a Notebook - * const notebook = await prisma.notebook.upsert({ - * create: { - * // ... data to create a Notebook - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Notebook we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__NotebookClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of Notebooks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NotebookCountArgs} args - Arguments to filter Notebooks to count. - * @example - * // Count the number of Notebooks - * const count = await prisma.notebook.count({ - * where: { - * // ... the filter for the Notebooks we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Notebook. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NotebookAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Notebook. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NotebookGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends NotebookGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: NotebookGroupByArgs['orderBy'] } - : { orderBy?: NotebookGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetNotebookGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Notebook model - */ - readonly fields: NotebookFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Notebook. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__NotebookClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - notes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - labels = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Notebook model - */ - interface NotebookFieldRefs { - readonly id: FieldRef<"Notebook", 'String'> - readonly name: FieldRef<"Notebook", 'String'> - readonly icon: FieldRef<"Notebook", 'String'> - readonly color: FieldRef<"Notebook", 'String'> - readonly order: FieldRef<"Notebook", 'Int'> - readonly userId: FieldRef<"Notebook", 'String'> - readonly createdAt: FieldRef<"Notebook", 'DateTime'> - readonly updatedAt: FieldRef<"Notebook", 'DateTime'> - } - - - // Custom InputTypes - /** - * Notebook findUnique - */ - export type NotebookFindUniqueArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - /** - * Filter, which Notebook to fetch. - */ - where: NotebookWhereUniqueInput - } - - /** - * Notebook findUniqueOrThrow - */ - export type NotebookFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - /** - * Filter, which Notebook to fetch. - */ - where: NotebookWhereUniqueInput - } - - /** - * Notebook findFirst - */ - export type NotebookFindFirstArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - /** - * Filter, which Notebook to fetch. - */ - where?: NotebookWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Notebooks to fetch. - */ - orderBy?: NotebookOrderByWithRelationInput | NotebookOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Notebooks. - */ - cursor?: NotebookWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Notebooks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Notebooks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Notebooks. - */ - distinct?: NotebookScalarFieldEnum | NotebookScalarFieldEnum[] - } - - /** - * Notebook findFirstOrThrow - */ - export type NotebookFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - /** - * Filter, which Notebook to fetch. - */ - where?: NotebookWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Notebooks to fetch. - */ - orderBy?: NotebookOrderByWithRelationInput | NotebookOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Notebooks. - */ - cursor?: NotebookWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Notebooks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Notebooks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Notebooks. - */ - distinct?: NotebookScalarFieldEnum | NotebookScalarFieldEnum[] - } - - /** - * Notebook findMany - */ - export type NotebookFindManyArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - /** - * Filter, which Notebooks to fetch. - */ - where?: NotebookWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Notebooks to fetch. - */ - orderBy?: NotebookOrderByWithRelationInput | NotebookOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Notebooks. - */ - cursor?: NotebookWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Notebooks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Notebooks. - */ - skip?: number - distinct?: NotebookScalarFieldEnum | NotebookScalarFieldEnum[] - } - - /** - * Notebook create - */ - export type NotebookCreateArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - /** - * The data needed to create a Notebook. - */ - data: XOR - } - - /** - * Notebook createMany - */ - export type NotebookCreateManyArgs = { - /** - * The data used to create many Notebooks. - */ - data: NotebookCreateManyInput | NotebookCreateManyInput[] - } - - /** - * Notebook createManyAndReturn - */ - export type NotebookCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelectCreateManyAndReturn | null - /** - * The data used to create many Notebooks. - */ - data: NotebookCreateManyInput | NotebookCreateManyInput[] - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookIncludeCreateManyAndReturn | null - } - - /** - * Notebook update - */ - export type NotebookUpdateArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - /** - * The data needed to update a Notebook. - */ - data: XOR - /** - * Choose, which Notebook to update. - */ - where: NotebookWhereUniqueInput - } - - /** - * Notebook updateMany - */ - export type NotebookUpdateManyArgs = { - /** - * The data used to update Notebooks. - */ - data: XOR - /** - * Filter which Notebooks to update - */ - where?: NotebookWhereInput - } - - /** - * Notebook upsert - */ - export type NotebookUpsertArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - /** - * The filter to search for the Notebook to update in case it exists. - */ - where: NotebookWhereUniqueInput - /** - * In case the Notebook found by the `where` argument doesn't exist, create a new Notebook with this data. - */ - create: XOR - /** - * In case the Notebook was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Notebook delete - */ - export type NotebookDeleteArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - /** - * Filter which Notebook to delete. - */ - where: NotebookWhereUniqueInput - } - - /** - * Notebook deleteMany - */ - export type NotebookDeleteManyArgs = { - /** - * Filter which Notebooks to delete - */ - where?: NotebookWhereInput - } - - /** - * Notebook.notes - */ - export type Notebook$notesArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - where?: NoteWhereInput - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] - cursor?: NoteWhereUniqueInput - take?: number - skip?: number - distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] - } - - /** - * Notebook.labels - */ - export type Notebook$labelsArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - where?: LabelWhereInput - orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] - cursor?: LabelWhereUniqueInput - take?: number - skip?: number - distinct?: LabelScalarFieldEnum | LabelScalarFieldEnum[] - } - - /** - * Notebook without action - */ - export type NotebookDefaultArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - } - - - /** - * Model Label - */ - - export type AggregateLabel = { - _count: LabelCountAggregateOutputType | null - _min: LabelMinAggregateOutputType | null - _max: LabelMaxAggregateOutputType | null - } - - export type LabelMinAggregateOutputType = { - id: string | null - name: string | null - color: string | null - notebookId: string | null - userId: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type LabelMaxAggregateOutputType = { - id: string | null - name: string | null - color: string | null - notebookId: string | null - userId: string | null - createdAt: Date | null - updatedAt: Date | null - } - - export type LabelCountAggregateOutputType = { - id: number - name: number - color: number - notebookId: number - userId: number - createdAt: number - updatedAt: number - _all: number - } - - - export type LabelMinAggregateInputType = { - id?: true - name?: true - color?: true - notebookId?: true - userId?: true - createdAt?: true - updatedAt?: true - } - - export type LabelMaxAggregateInputType = { - id?: true - name?: true - color?: true - notebookId?: true - userId?: true - createdAt?: true - updatedAt?: true - } - - export type LabelCountAggregateInputType = { - id?: true - name?: true - color?: true - notebookId?: true - userId?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type LabelAggregateArgs = { - /** - * Filter which Label to aggregate. - */ - where?: LabelWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Labels to fetch. - */ - orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: LabelWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Labels from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Labels. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Labels - **/ - _count?: true | LabelCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: LabelMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: LabelMaxAggregateInputType - } - - export type GetLabelAggregateType = { - [P in keyof T & keyof AggregateLabel]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type LabelGroupByArgs = { - where?: LabelWhereInput - orderBy?: LabelOrderByWithAggregationInput | LabelOrderByWithAggregationInput[] - by: LabelScalarFieldEnum[] | LabelScalarFieldEnum - having?: LabelScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: LabelCountAggregateInputType | true - _min?: LabelMinAggregateInputType - _max?: LabelMaxAggregateInputType - } - - export type LabelGroupByOutputType = { - id: string - name: string - color: string - notebookId: string | null - userId: string | null - createdAt: Date - updatedAt: Date - _count: LabelCountAggregateOutputType | null - _min: LabelMinAggregateOutputType | null - _max: LabelMaxAggregateOutputType | null - } - - type GetLabelGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof LabelGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type LabelSelect = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - color?: boolean - notebookId?: boolean - userId?: boolean - createdAt?: boolean - updatedAt?: boolean - notebook?: boolean | Label$notebookArgs - notes?: boolean | Label$notesArgs - user?: boolean | Label$userArgs - _count?: boolean | LabelCountOutputTypeDefaultArgs - }, ExtArgs["result"]["label"]> - - export type LabelSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - name?: boolean - color?: boolean - notebookId?: boolean - userId?: boolean - createdAt?: boolean - updatedAt?: boolean - notebook?: boolean | Label$notebookArgs - user?: boolean | Label$userArgs - }, ExtArgs["result"]["label"]> - - export type LabelSelectScalar = { - id?: boolean - name?: boolean - color?: boolean - notebookId?: boolean - userId?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - export type LabelInclude = { - notebook?: boolean | Label$notebookArgs - notes?: boolean | Label$notesArgs - user?: boolean | Label$userArgs - _count?: boolean | LabelCountOutputTypeDefaultArgs - } - export type LabelIncludeCreateManyAndReturn = { - notebook?: boolean | Label$notebookArgs - user?: boolean | Label$userArgs - } - - export type $LabelPayload = { - name: "Label" - objects: { - notebook: Prisma.$NotebookPayload | null - notes: Prisma.$NotePayload[] - user: Prisma.$UserPayload | null - } - scalars: $Extensions.GetPayloadResult<{ - id: string - name: string - color: string - notebookId: string | null - userId: string | null - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["label"]> - composites: {} - } - - type LabelGetPayload = $Result.GetResult - - type LabelCountArgs = - Omit & { - select?: LabelCountAggregateInputType | true - } - - export interface LabelDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Label'], meta: { name: 'Label' } } - /** - * Find zero or one Label that matches the filter. - * @param {LabelFindUniqueArgs} args - Arguments to find a Label - * @example - * // Get one Label - * const label = await prisma.label.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__LabelClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one Label that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {LabelFindUniqueOrThrowArgs} args - Arguments to find a Label - * @example - * // Get one Label - * const label = await prisma.label.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__LabelClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first Label that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LabelFindFirstArgs} args - Arguments to find a Label - * @example - * // Get one Label - * const label = await prisma.label.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__LabelClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first Label that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LabelFindFirstOrThrowArgs} args - Arguments to find a Label - * @example - * // Get one Label - * const label = await prisma.label.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__LabelClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more Labels that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LabelFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Labels - * const labels = await prisma.label.findMany() - * - * // Get first 10 Labels - * const labels = await prisma.label.findMany({ take: 10 }) - * - * // Only select the `id` - * const labelWithIdOnly = await prisma.label.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a Label. - * @param {LabelCreateArgs} args - Arguments to create a Label. - * @example - * // Create one Label - * const Label = await prisma.label.create({ - * data: { - * // ... data to create a Label - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__LabelClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many Labels. - * @param {LabelCreateManyArgs} args - Arguments to create many Labels. - * @example - * // Create many Labels - * const label = await prisma.label.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Labels and returns the data saved in the database. - * @param {LabelCreateManyAndReturnArgs} args - Arguments to create many Labels. - * @example - * // Create many Labels - * const label = await prisma.label.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Labels and only return the `id` - * const labelWithIdOnly = await prisma.label.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a Label. - * @param {LabelDeleteArgs} args - Arguments to delete one Label. - * @example - * // Delete one Label - * const Label = await prisma.label.delete({ - * where: { - * // ... filter to delete one Label - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__LabelClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one Label. - * @param {LabelUpdateArgs} args - Arguments to update one Label. - * @example - * // Update one Label - * const label = await prisma.label.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__LabelClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more Labels. - * @param {LabelDeleteManyArgs} args - Arguments to filter Labels to delete. - * @example - * // Delete a few Labels - * const { count } = await prisma.label.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Labels. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LabelUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Labels - * const label = await prisma.label.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Label. - * @param {LabelUpsertArgs} args - Arguments to update or create a Label. - * @example - * // Update or create a Label - * const label = await prisma.label.upsert({ - * create: { - * // ... data to create a Label - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Label we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__LabelClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of Labels. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LabelCountArgs} args - Arguments to filter Labels to count. - * @example - * // Count the number of Labels - * const count = await prisma.label.count({ - * where: { - * // ... the filter for the Labels we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Label. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LabelAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Label. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {LabelGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends LabelGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: LabelGroupByArgs['orderBy'] } - : { orderBy?: LabelGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetLabelGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Label model - */ - readonly fields: LabelFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Label. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__LabelClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - notebook = {}>(args?: Subset>): Prisma__NotebookClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> - notes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Label model - */ - interface LabelFieldRefs { - readonly id: FieldRef<"Label", 'String'> - readonly name: FieldRef<"Label", 'String'> - readonly color: FieldRef<"Label", 'String'> - readonly notebookId: FieldRef<"Label", 'String'> - readonly userId: FieldRef<"Label", 'String'> - readonly createdAt: FieldRef<"Label", 'DateTime'> - readonly updatedAt: FieldRef<"Label", 'DateTime'> - } - - - // Custom InputTypes - /** - * Label findUnique - */ - export type LabelFindUniqueArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - /** - * Filter, which Label to fetch. - */ - where: LabelWhereUniqueInput - } - - /** - * Label findUniqueOrThrow - */ - export type LabelFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - /** - * Filter, which Label to fetch. - */ - where: LabelWhereUniqueInput - } - - /** - * Label findFirst - */ - export type LabelFindFirstArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - /** - * Filter, which Label to fetch. - */ - where?: LabelWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Labels to fetch. - */ - orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Labels. - */ - cursor?: LabelWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Labels from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Labels. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Labels. - */ - distinct?: LabelScalarFieldEnum | LabelScalarFieldEnum[] - } - - /** - * Label findFirstOrThrow - */ - export type LabelFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - /** - * Filter, which Label to fetch. - */ - where?: LabelWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Labels to fetch. - */ - orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Labels. - */ - cursor?: LabelWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Labels from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Labels. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Labels. - */ - distinct?: LabelScalarFieldEnum | LabelScalarFieldEnum[] - } - - /** - * Label findMany - */ - export type LabelFindManyArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - /** - * Filter, which Labels to fetch. - */ - where?: LabelWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Labels to fetch. - */ - orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Labels. - */ - cursor?: LabelWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Labels from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Labels. - */ - skip?: number - distinct?: LabelScalarFieldEnum | LabelScalarFieldEnum[] - } - - /** - * Label create - */ - export type LabelCreateArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - /** - * The data needed to create a Label. - */ - data: XOR - } - - /** - * Label createMany - */ - export type LabelCreateManyArgs = { - /** - * The data used to create many Labels. - */ - data: LabelCreateManyInput | LabelCreateManyInput[] - } - - /** - * Label createManyAndReturn - */ - export type LabelCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelectCreateManyAndReturn | null - /** - * The data used to create many Labels. - */ - data: LabelCreateManyInput | LabelCreateManyInput[] - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelIncludeCreateManyAndReturn | null - } - - /** - * Label update - */ - export type LabelUpdateArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - /** - * The data needed to update a Label. - */ - data: XOR - /** - * Choose, which Label to update. - */ - where: LabelWhereUniqueInput - } - - /** - * Label updateMany - */ - export type LabelUpdateManyArgs = { - /** - * The data used to update Labels. - */ - data: XOR - /** - * Filter which Labels to update - */ - where?: LabelWhereInput - } - - /** - * Label upsert - */ - export type LabelUpsertArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - /** - * The filter to search for the Label to update in case it exists. - */ - where: LabelWhereUniqueInput - /** - * In case the Label found by the `where` argument doesn't exist, create a new Label with this data. - */ - create: XOR - /** - * In case the Label was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Label delete - */ - export type LabelDeleteArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - /** - * Filter which Label to delete. - */ - where: LabelWhereUniqueInput - } - - /** - * Label deleteMany - */ - export type LabelDeleteManyArgs = { - /** - * Filter which Labels to delete - */ - where?: LabelWhereInput - } - - /** - * Label.notebook - */ - export type Label$notebookArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - where?: NotebookWhereInput - } - - /** - * Label.notes - */ - export type Label$notesArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - where?: NoteWhereInput - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] - cursor?: NoteWhereUniqueInput - take?: number - skip?: number - distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] - } - - /** - * Label.user - */ - export type Label$userArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - where?: UserWhereInput - } - - /** - * Label without action - */ - export type LabelDefaultArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - } - - - /** - * Model Note - */ - - export type AggregateNote = { - _count: NoteCountAggregateOutputType | null - _avg: NoteAvgAggregateOutputType | null - _sum: NoteSumAggregateOutputType | null - _min: NoteMinAggregateOutputType | null - _max: NoteMaxAggregateOutputType | null - } - - export type NoteAvgAggregateOutputType = { - order: number | null - aiConfidence: number | null - languageConfidence: number | null - } - - export type NoteSumAggregateOutputType = { - order: number | null - aiConfidence: number | null - languageConfidence: number | null - } - - export type NoteMinAggregateOutputType = { - id: string | null - title: string | null - content: string | null - color: string | null - isPinned: boolean | null - isArchived: boolean | null - type: string | null - checkItems: string | null - labels: string | null - images: string | null - links: string | null - reminder: Date | null - isReminderDone: boolean | null - reminderRecurrence: string | null - reminderLocation: string | null - isMarkdown: boolean | null - size: string | null - embedding: string | null - sharedWith: string | null - userId: string | null - order: number | null - notebookId: string | null - createdAt: Date | null - updatedAt: Date | null - autoGenerated: boolean | null - aiProvider: string | null - aiConfidence: number | null - language: string | null - languageConfidence: number | null - lastAiAnalysis: Date | null - } - - export type NoteMaxAggregateOutputType = { - id: string | null - title: string | null - content: string | null - color: string | null - isPinned: boolean | null - isArchived: boolean | null - type: string | null - checkItems: string | null - labels: string | null - images: string | null - links: string | null - reminder: Date | null - isReminderDone: boolean | null - reminderRecurrence: string | null - reminderLocation: string | null - isMarkdown: boolean | null - size: string | null - embedding: string | null - sharedWith: string | null - userId: string | null - order: number | null - notebookId: string | null - createdAt: Date | null - updatedAt: Date | null - autoGenerated: boolean | null - aiProvider: string | null - aiConfidence: number | null - language: string | null - languageConfidence: number | null - lastAiAnalysis: Date | null - } - - export type NoteCountAggregateOutputType = { - id: number - title: number - content: number - color: number - isPinned: number - isArchived: number - type: number - checkItems: number - labels: number - images: number - links: number - reminder: number - isReminderDone: number - reminderRecurrence: number - reminderLocation: number - isMarkdown: number - size: number - embedding: number - sharedWith: number - userId: number - order: number - notebookId: number - createdAt: number - updatedAt: number - autoGenerated: number - aiProvider: number - aiConfidence: number - language: number - languageConfidence: number - lastAiAnalysis: number - _all: number - } - - - export type NoteAvgAggregateInputType = { - order?: true - aiConfidence?: true - languageConfidence?: true - } - - export type NoteSumAggregateInputType = { - order?: true - aiConfidence?: true - languageConfidence?: true - } - - export type NoteMinAggregateInputType = { - id?: true - title?: true - content?: true - color?: true - isPinned?: true - isArchived?: true - type?: true - checkItems?: true - labels?: true - images?: true - links?: true - reminder?: true - isReminderDone?: true - reminderRecurrence?: true - reminderLocation?: true - isMarkdown?: true - size?: true - embedding?: true - sharedWith?: true - userId?: true - order?: true - notebookId?: true - createdAt?: true - updatedAt?: true - autoGenerated?: true - aiProvider?: true - aiConfidence?: true - language?: true - languageConfidence?: true - lastAiAnalysis?: true - } - - export type NoteMaxAggregateInputType = { - id?: true - title?: true - content?: true - color?: true - isPinned?: true - isArchived?: true - type?: true - checkItems?: true - labels?: true - images?: true - links?: true - reminder?: true - isReminderDone?: true - reminderRecurrence?: true - reminderLocation?: true - isMarkdown?: true - size?: true - embedding?: true - sharedWith?: true - userId?: true - order?: true - notebookId?: true - createdAt?: true - updatedAt?: true - autoGenerated?: true - aiProvider?: true - aiConfidence?: true - language?: true - languageConfidence?: true - lastAiAnalysis?: true - } - - export type NoteCountAggregateInputType = { - id?: true - title?: true - content?: true - color?: true - isPinned?: true - isArchived?: true - type?: true - checkItems?: true - labels?: true - images?: true - links?: true - reminder?: true - isReminderDone?: true - reminderRecurrence?: true - reminderLocation?: true - isMarkdown?: true - size?: true - embedding?: true - sharedWith?: true - userId?: true - order?: true - notebookId?: true - createdAt?: true - updatedAt?: true - autoGenerated?: true - aiProvider?: true - aiConfidence?: true - language?: true - languageConfidence?: true - lastAiAnalysis?: true - _all?: true - } - - export type NoteAggregateArgs = { - /** - * Filter which Note to aggregate. - */ - where?: NoteWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Notes to fetch. - */ - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: NoteWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Notes from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Notes. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Notes - **/ - _count?: true | NoteCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: NoteAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: NoteSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: NoteMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: NoteMaxAggregateInputType - } - - export type GetNoteAggregateType = { - [P in keyof T & keyof AggregateNote]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type NoteGroupByArgs = { - where?: NoteWhereInput - orderBy?: NoteOrderByWithAggregationInput | NoteOrderByWithAggregationInput[] - by: NoteScalarFieldEnum[] | NoteScalarFieldEnum - having?: NoteScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: NoteCountAggregateInputType | true - _avg?: NoteAvgAggregateInputType - _sum?: NoteSumAggregateInputType - _min?: NoteMinAggregateInputType - _max?: NoteMaxAggregateInputType - } - - export type NoteGroupByOutputType = { - id: string - title: string | null - content: string - color: string - isPinned: boolean - isArchived: boolean - type: string - checkItems: string | null - labels: string | null - images: string | null - links: string | null - reminder: Date | null - isReminderDone: boolean - reminderRecurrence: string | null - reminderLocation: string | null - isMarkdown: boolean - size: string - embedding: string | null - sharedWith: string | null - userId: string | null - order: number - notebookId: string | null - createdAt: Date - updatedAt: Date - autoGenerated: boolean | null - aiProvider: string | null - aiConfidence: number | null - language: string | null - languageConfidence: number | null - lastAiAnalysis: Date | null - _count: NoteCountAggregateOutputType | null - _avg: NoteAvgAggregateOutputType | null - _sum: NoteSumAggregateOutputType | null - _min: NoteMinAggregateOutputType | null - _max: NoteMaxAggregateOutputType | null - } - - type GetNoteGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof NoteGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type NoteSelect = $Extensions.GetSelect<{ - id?: boolean - title?: boolean - content?: boolean - color?: boolean - isPinned?: boolean - isArchived?: boolean - type?: boolean - checkItems?: boolean - labels?: boolean - images?: boolean - links?: boolean - reminder?: boolean - isReminderDone?: boolean - reminderRecurrence?: boolean - reminderLocation?: boolean - isMarkdown?: boolean - size?: boolean - embedding?: boolean - sharedWith?: boolean - userId?: boolean - order?: boolean - notebookId?: boolean - createdAt?: boolean - updatedAt?: boolean - autoGenerated?: boolean - aiProvider?: boolean - aiConfidence?: boolean - language?: boolean - languageConfidence?: boolean - lastAiAnalysis?: boolean - user?: boolean | Note$userArgs - shares?: boolean | Note$sharesArgs - notebook?: boolean | Note$notebookArgs - labelRelations?: boolean | Note$labelRelationsArgs - aiFeedback?: boolean | Note$aiFeedbackArgs - memoryEchoAsNote1?: boolean | Note$memoryEchoAsNote1Args - memoryEchoAsNote2?: boolean | Note$memoryEchoAsNote2Args - _count?: boolean | NoteCountOutputTypeDefaultArgs - }, ExtArgs["result"]["note"]> - - export type NoteSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - title?: boolean - content?: boolean - color?: boolean - isPinned?: boolean - isArchived?: boolean - type?: boolean - checkItems?: boolean - labels?: boolean - images?: boolean - links?: boolean - reminder?: boolean - isReminderDone?: boolean - reminderRecurrence?: boolean - reminderLocation?: boolean - isMarkdown?: boolean - size?: boolean - embedding?: boolean - sharedWith?: boolean - userId?: boolean - order?: boolean - notebookId?: boolean - createdAt?: boolean - updatedAt?: boolean - autoGenerated?: boolean - aiProvider?: boolean - aiConfidence?: boolean - language?: boolean - languageConfidence?: boolean - lastAiAnalysis?: boolean - user?: boolean | Note$userArgs - notebook?: boolean | Note$notebookArgs - }, ExtArgs["result"]["note"]> - - export type NoteSelectScalar = { - id?: boolean - title?: boolean - content?: boolean - color?: boolean - isPinned?: boolean - isArchived?: boolean - type?: boolean - checkItems?: boolean - labels?: boolean - images?: boolean - links?: boolean - reminder?: boolean - isReminderDone?: boolean - reminderRecurrence?: boolean - reminderLocation?: boolean - isMarkdown?: boolean - size?: boolean - embedding?: boolean - sharedWith?: boolean - userId?: boolean - order?: boolean - notebookId?: boolean - createdAt?: boolean - updatedAt?: boolean - autoGenerated?: boolean - aiProvider?: boolean - aiConfidence?: boolean - language?: boolean - languageConfidence?: boolean - lastAiAnalysis?: boolean - } - - export type NoteInclude = { - user?: boolean | Note$userArgs - shares?: boolean | Note$sharesArgs - notebook?: boolean | Note$notebookArgs - labelRelations?: boolean | Note$labelRelationsArgs - aiFeedback?: boolean | Note$aiFeedbackArgs - memoryEchoAsNote1?: boolean | Note$memoryEchoAsNote1Args - memoryEchoAsNote2?: boolean | Note$memoryEchoAsNote2Args - _count?: boolean | NoteCountOutputTypeDefaultArgs - } - export type NoteIncludeCreateManyAndReturn = { - user?: boolean | Note$userArgs - notebook?: boolean | Note$notebookArgs - } - - export type $NotePayload = { - name: "Note" - objects: { - user: Prisma.$UserPayload | null - shares: Prisma.$NoteSharePayload[] - notebook: Prisma.$NotebookPayload | null - labelRelations: Prisma.$LabelPayload[] - aiFeedback: Prisma.$AiFeedbackPayload[] - memoryEchoAsNote1: Prisma.$MemoryEchoInsightPayload[] - memoryEchoAsNote2: Prisma.$MemoryEchoInsightPayload[] - } - scalars: $Extensions.GetPayloadResult<{ - id: string - title: string | null - content: string - color: string - isPinned: boolean - isArchived: boolean - type: string - checkItems: string | null - labels: string | null - images: string | null - links: string | null - reminder: Date | null - isReminderDone: boolean - reminderRecurrence: string | null - reminderLocation: string | null - isMarkdown: boolean - size: string - embedding: string | null - sharedWith: string | null - userId: string | null - order: number - notebookId: string | null - createdAt: Date - updatedAt: Date - autoGenerated: boolean | null - aiProvider: string | null - aiConfidence: number | null - language: string | null - languageConfidence: number | null - lastAiAnalysis: Date | null - }, ExtArgs["result"]["note"]> - composites: {} - } - - type NoteGetPayload = $Result.GetResult - - type NoteCountArgs = - Omit & { - select?: NoteCountAggregateInputType | true - } - - export interface NoteDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Note'], meta: { name: 'Note' } } - /** - * Find zero or one Note that matches the filter. - * @param {NoteFindUniqueArgs} args - Arguments to find a Note - * @example - * // Get one Note - * const note = await prisma.note.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one Note that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {NoteFindUniqueOrThrowArgs} args - Arguments to find a Note - * @example - * // Get one Note - * const note = await prisma.note.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first Note that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteFindFirstArgs} args - Arguments to find a Note - * @example - * // Get one Note - * const note = await prisma.note.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first Note that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteFindFirstOrThrowArgs} args - Arguments to find a Note - * @example - * // Get one Note - * const note = await prisma.note.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more Notes that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Notes - * const notes = await prisma.note.findMany() - * - * // Get first 10 Notes - * const notes = await prisma.note.findMany({ take: 10 }) - * - * // Only select the `id` - * const noteWithIdOnly = await prisma.note.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a Note. - * @param {NoteCreateArgs} args - Arguments to create a Note. - * @example - * // Create one Note - * const Note = await prisma.note.create({ - * data: { - * // ... data to create a Note - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many Notes. - * @param {NoteCreateManyArgs} args - Arguments to create many Notes. - * @example - * // Create many Notes - * const note = await prisma.note.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Notes and returns the data saved in the database. - * @param {NoteCreateManyAndReturnArgs} args - Arguments to create many Notes. - * @example - * // Create many Notes - * const note = await prisma.note.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Notes and only return the `id` - * const noteWithIdOnly = await prisma.note.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a Note. - * @param {NoteDeleteArgs} args - Arguments to delete one Note. - * @example - * // Delete one Note - * const Note = await prisma.note.delete({ - * where: { - * // ... filter to delete one Note - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one Note. - * @param {NoteUpdateArgs} args - Arguments to update one Note. - * @example - * // Update one Note - * const note = await prisma.note.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more Notes. - * @param {NoteDeleteManyArgs} args - Arguments to filter Notes to delete. - * @example - * // Delete a few Notes - * const { count } = await prisma.note.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Notes. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Notes - * const note = await prisma.note.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Note. - * @param {NoteUpsertArgs} args - Arguments to update or create a Note. - * @example - * // Update or create a Note - * const note = await prisma.note.upsert({ - * create: { - * // ... data to create a Note - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Note we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__NoteClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of Notes. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteCountArgs} args - Arguments to filter Notes to count. - * @example - * // Count the number of Notes - * const count = await prisma.note.count({ - * where: { - * // ... the filter for the Notes we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Note. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Note. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends NoteGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: NoteGroupByArgs['orderBy'] } - : { orderBy?: NoteGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetNoteGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the Note model - */ - readonly fields: NoteFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Note. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__NoteClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> - shares = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - notebook = {}>(args?: Subset>): Prisma__NotebookClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> - labelRelations = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - aiFeedback = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - memoryEchoAsNote1 = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - memoryEchoAsNote2 = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the Note model - */ - interface NoteFieldRefs { - readonly id: FieldRef<"Note", 'String'> - readonly title: FieldRef<"Note", 'String'> - readonly content: FieldRef<"Note", 'String'> - readonly color: FieldRef<"Note", 'String'> - readonly isPinned: FieldRef<"Note", 'Boolean'> - readonly isArchived: FieldRef<"Note", 'Boolean'> - readonly type: FieldRef<"Note", 'String'> - readonly checkItems: FieldRef<"Note", 'String'> - readonly labels: FieldRef<"Note", 'String'> - readonly images: FieldRef<"Note", 'String'> - readonly links: FieldRef<"Note", 'String'> - readonly reminder: FieldRef<"Note", 'DateTime'> - readonly isReminderDone: FieldRef<"Note", 'Boolean'> - readonly reminderRecurrence: FieldRef<"Note", 'String'> - readonly reminderLocation: FieldRef<"Note", 'String'> - readonly isMarkdown: FieldRef<"Note", 'Boolean'> - readonly size: FieldRef<"Note", 'String'> - readonly embedding: FieldRef<"Note", 'String'> - readonly sharedWith: FieldRef<"Note", 'String'> - readonly userId: FieldRef<"Note", 'String'> - readonly order: FieldRef<"Note", 'Int'> - readonly notebookId: FieldRef<"Note", 'String'> - readonly createdAt: FieldRef<"Note", 'DateTime'> - readonly updatedAt: FieldRef<"Note", 'DateTime'> - readonly autoGenerated: FieldRef<"Note", 'Boolean'> - readonly aiProvider: FieldRef<"Note", 'String'> - readonly aiConfidence: FieldRef<"Note", 'Int'> - readonly language: FieldRef<"Note", 'String'> - readonly languageConfidence: FieldRef<"Note", 'Float'> - readonly lastAiAnalysis: FieldRef<"Note", 'DateTime'> - } - - - // Custom InputTypes - /** - * Note findUnique - */ - export type NoteFindUniqueArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - /** - * Filter, which Note to fetch. - */ - where: NoteWhereUniqueInput - } - - /** - * Note findUniqueOrThrow - */ - export type NoteFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - /** - * Filter, which Note to fetch. - */ - where: NoteWhereUniqueInput - } - - /** - * Note findFirst - */ - export type NoteFindFirstArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - /** - * Filter, which Note to fetch. - */ - where?: NoteWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Notes to fetch. - */ - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Notes. - */ - cursor?: NoteWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Notes from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Notes. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Notes. - */ - distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] - } - - /** - * Note findFirstOrThrow - */ - export type NoteFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - /** - * Filter, which Note to fetch. - */ - where?: NoteWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Notes to fetch. - */ - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Notes. - */ - cursor?: NoteWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Notes from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Notes. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Notes. - */ - distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] - } - - /** - * Note findMany - */ - export type NoteFindManyArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - /** - * Filter, which Notes to fetch. - */ - where?: NoteWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Notes to fetch. - */ - orderBy?: NoteOrderByWithRelationInput | NoteOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Notes. - */ - cursor?: NoteWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Notes from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Notes. - */ - skip?: number - distinct?: NoteScalarFieldEnum | NoteScalarFieldEnum[] - } - - /** - * Note create - */ - export type NoteCreateArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - /** - * The data needed to create a Note. - */ - data: XOR - } - - /** - * Note createMany - */ - export type NoteCreateManyArgs = { - /** - * The data used to create many Notes. - */ - data: NoteCreateManyInput | NoteCreateManyInput[] - } - - /** - * Note createManyAndReturn - */ - export type NoteCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelectCreateManyAndReturn | null - /** - * The data used to create many Notes. - */ - data: NoteCreateManyInput | NoteCreateManyInput[] - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteIncludeCreateManyAndReturn | null - } - - /** - * Note update - */ - export type NoteUpdateArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - /** - * The data needed to update a Note. - */ - data: XOR - /** - * Choose, which Note to update. - */ - where: NoteWhereUniqueInput - } - - /** - * Note updateMany - */ - export type NoteUpdateManyArgs = { - /** - * The data used to update Notes. - */ - data: XOR - /** - * Filter which Notes to update - */ - where?: NoteWhereInput - } - - /** - * Note upsert - */ - export type NoteUpsertArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - /** - * The filter to search for the Note to update in case it exists. - */ - where: NoteWhereUniqueInput - /** - * In case the Note found by the `where` argument doesn't exist, create a new Note with this data. - */ - create: XOR - /** - * In case the Note was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * Note delete - */ - export type NoteDeleteArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - /** - * Filter which Note to delete. - */ - where: NoteWhereUniqueInput - } - - /** - * Note deleteMany - */ - export type NoteDeleteManyArgs = { - /** - * Filter which Notes to delete - */ - where?: NoteWhereInput - } - - /** - * Note.user - */ - export type Note$userArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - where?: UserWhereInput - } - - /** - * Note.shares - */ - export type Note$sharesArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - where?: NoteShareWhereInput - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - cursor?: NoteShareWhereUniqueInput - take?: number - skip?: number - distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] - } - - /** - * Note.notebook - */ - export type Note$notebookArgs = { - /** - * Select specific fields to fetch from the Notebook - */ - select?: NotebookSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NotebookInclude | null - where?: NotebookWhereInput - } - - /** - * Note.labelRelations - */ - export type Note$labelRelationsArgs = { - /** - * Select specific fields to fetch from the Label - */ - select?: LabelSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: LabelInclude | null - where?: LabelWhereInput - orderBy?: LabelOrderByWithRelationInput | LabelOrderByWithRelationInput[] - cursor?: LabelWhereUniqueInput - take?: number - skip?: number - distinct?: LabelScalarFieldEnum | LabelScalarFieldEnum[] - } - - /** - * Note.aiFeedback - */ - export type Note$aiFeedbackArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - where?: AiFeedbackWhereInput - orderBy?: AiFeedbackOrderByWithRelationInput | AiFeedbackOrderByWithRelationInput[] - cursor?: AiFeedbackWhereUniqueInput - take?: number - skip?: number - distinct?: AiFeedbackScalarFieldEnum | AiFeedbackScalarFieldEnum[] - } - - /** - * Note.memoryEchoAsNote1 - */ - export type Note$memoryEchoAsNote1Args = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - where?: MemoryEchoInsightWhereInput - orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] - cursor?: MemoryEchoInsightWhereUniqueInput - take?: number - skip?: number - distinct?: MemoryEchoInsightScalarFieldEnum | MemoryEchoInsightScalarFieldEnum[] - } - - /** - * Note.memoryEchoAsNote2 - */ - export type Note$memoryEchoAsNote2Args = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - where?: MemoryEchoInsightWhereInput - orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] - cursor?: MemoryEchoInsightWhereUniqueInput - take?: number - skip?: number - distinct?: MemoryEchoInsightScalarFieldEnum | MemoryEchoInsightScalarFieldEnum[] - } - - /** - * Note without action - */ - export type NoteDefaultArgs = { - /** - * Select specific fields to fetch from the Note - */ - select?: NoteSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteInclude | null - } - - - /** - * Model NoteShare - */ - - export type AggregateNoteShare = { - _count: NoteShareCountAggregateOutputType | null - _min: NoteShareMinAggregateOutputType | null - _max: NoteShareMaxAggregateOutputType | null - } - - export type NoteShareMinAggregateOutputType = { - id: string | null - noteId: string | null - userId: string | null - sharedBy: string | null - status: string | null - permission: string | null - notifiedAt: Date | null - respondedAt: Date | null - createdAt: Date | null - updatedAt: Date | null - } - - export type NoteShareMaxAggregateOutputType = { - id: string | null - noteId: string | null - userId: string | null - sharedBy: string | null - status: string | null - permission: string | null - notifiedAt: Date | null - respondedAt: Date | null - createdAt: Date | null - updatedAt: Date | null - } - - export type NoteShareCountAggregateOutputType = { - id: number - noteId: number - userId: number - sharedBy: number - status: number - permission: number - notifiedAt: number - respondedAt: number - createdAt: number - updatedAt: number - _all: number - } - - - export type NoteShareMinAggregateInputType = { - id?: true - noteId?: true - userId?: true - sharedBy?: true - status?: true - permission?: true - notifiedAt?: true - respondedAt?: true - createdAt?: true - updatedAt?: true - } - - export type NoteShareMaxAggregateInputType = { - id?: true - noteId?: true - userId?: true - sharedBy?: true - status?: true - permission?: true - notifiedAt?: true - respondedAt?: true - createdAt?: true - updatedAt?: true - } - - export type NoteShareCountAggregateInputType = { - id?: true - noteId?: true - userId?: true - sharedBy?: true - status?: true - permission?: true - notifiedAt?: true - respondedAt?: true - createdAt?: true - updatedAt?: true - _all?: true - } - - export type NoteShareAggregateArgs = { - /** - * Filter which NoteShare to aggregate. - */ - where?: NoteShareWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of NoteShares to fetch. - */ - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: NoteShareWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` NoteShares from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` NoteShares. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned NoteShares - **/ - _count?: true | NoteShareCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: NoteShareMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: NoteShareMaxAggregateInputType - } - - export type GetNoteShareAggregateType = { - [P in keyof T & keyof AggregateNoteShare]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type NoteShareGroupByArgs = { - where?: NoteShareWhereInput - orderBy?: NoteShareOrderByWithAggregationInput | NoteShareOrderByWithAggregationInput[] - by: NoteShareScalarFieldEnum[] | NoteShareScalarFieldEnum - having?: NoteShareScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: NoteShareCountAggregateInputType | true - _min?: NoteShareMinAggregateInputType - _max?: NoteShareMaxAggregateInputType - } - - export type NoteShareGroupByOutputType = { - id: string - noteId: string - userId: string - sharedBy: string - status: string - permission: string - notifiedAt: Date | null - respondedAt: Date | null - createdAt: Date - updatedAt: Date - _count: NoteShareCountAggregateOutputType | null - _min: NoteShareMinAggregateOutputType | null - _max: NoteShareMaxAggregateOutputType | null - } - - type GetNoteShareGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof NoteShareGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type NoteShareSelect = $Extensions.GetSelect<{ - id?: boolean - noteId?: boolean - userId?: boolean - sharedBy?: boolean - status?: boolean - permission?: boolean - notifiedAt?: boolean - respondedAt?: boolean - createdAt?: boolean - updatedAt?: boolean - note?: boolean | NoteDefaultArgs - user?: boolean | UserDefaultArgs - sharer?: boolean | UserDefaultArgs - }, ExtArgs["result"]["noteShare"]> - - export type NoteShareSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - noteId?: boolean - userId?: boolean - sharedBy?: boolean - status?: boolean - permission?: boolean - notifiedAt?: boolean - respondedAt?: boolean - createdAt?: boolean - updatedAt?: boolean - note?: boolean | NoteDefaultArgs - user?: boolean | UserDefaultArgs - sharer?: boolean | UserDefaultArgs - }, ExtArgs["result"]["noteShare"]> - - export type NoteShareSelectScalar = { - id?: boolean - noteId?: boolean - userId?: boolean - sharedBy?: boolean - status?: boolean - permission?: boolean - notifiedAt?: boolean - respondedAt?: boolean - createdAt?: boolean - updatedAt?: boolean - } - - export type NoteShareInclude = { - note?: boolean | NoteDefaultArgs - user?: boolean | UserDefaultArgs - sharer?: boolean | UserDefaultArgs - } - export type NoteShareIncludeCreateManyAndReturn = { - note?: boolean | NoteDefaultArgs - user?: boolean | UserDefaultArgs - sharer?: boolean | UserDefaultArgs - } - - export type $NoteSharePayload = { - name: "NoteShare" - objects: { - note: Prisma.$NotePayload - user: Prisma.$UserPayload - sharer: Prisma.$UserPayload - } - scalars: $Extensions.GetPayloadResult<{ - id: string - noteId: string - userId: string - sharedBy: string - status: string - permission: string - notifiedAt: Date | null - respondedAt: Date | null - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["noteShare"]> - composites: {} - } - - type NoteShareGetPayload = $Result.GetResult - - type NoteShareCountArgs = - Omit & { - select?: NoteShareCountAggregateInputType | true - } - - export interface NoteShareDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['NoteShare'], meta: { name: 'NoteShare' } } - /** - * Find zero or one NoteShare that matches the filter. - * @param {NoteShareFindUniqueArgs} args - Arguments to find a NoteShare - * @example - * // Get one NoteShare - * const noteShare = await prisma.noteShare.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one NoteShare that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {NoteShareFindUniqueOrThrowArgs} args - Arguments to find a NoteShare - * @example - * // Get one NoteShare - * const noteShare = await prisma.noteShare.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first NoteShare that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareFindFirstArgs} args - Arguments to find a NoteShare - * @example - * // Get one NoteShare - * const noteShare = await prisma.noteShare.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first NoteShare that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareFindFirstOrThrowArgs} args - Arguments to find a NoteShare - * @example - * // Get one NoteShare - * const noteShare = await prisma.noteShare.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more NoteShares that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all NoteShares - * const noteShares = await prisma.noteShare.findMany() - * - * // Get first 10 NoteShares - * const noteShares = await prisma.noteShare.findMany({ take: 10 }) - * - * // Only select the `id` - * const noteShareWithIdOnly = await prisma.noteShare.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a NoteShare. - * @param {NoteShareCreateArgs} args - Arguments to create a NoteShare. - * @example - * // Create one NoteShare - * const NoteShare = await prisma.noteShare.create({ - * data: { - * // ... data to create a NoteShare - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many NoteShares. - * @param {NoteShareCreateManyArgs} args - Arguments to create many NoteShares. - * @example - * // Create many NoteShares - * const noteShare = await prisma.noteShare.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many NoteShares and returns the data saved in the database. - * @param {NoteShareCreateManyAndReturnArgs} args - Arguments to create many NoteShares. - * @example - * // Create many NoteShares - * const noteShare = await prisma.noteShare.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many NoteShares and only return the `id` - * const noteShareWithIdOnly = await prisma.noteShare.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a NoteShare. - * @param {NoteShareDeleteArgs} args - Arguments to delete one NoteShare. - * @example - * // Delete one NoteShare - * const NoteShare = await prisma.noteShare.delete({ - * where: { - * // ... filter to delete one NoteShare - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one NoteShare. - * @param {NoteShareUpdateArgs} args - Arguments to update one NoteShare. - * @example - * // Update one NoteShare - * const noteShare = await prisma.noteShare.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more NoteShares. - * @param {NoteShareDeleteManyArgs} args - Arguments to filter NoteShares to delete. - * @example - * // Delete a few NoteShares - * const { count } = await prisma.noteShare.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more NoteShares. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many NoteShares - * const noteShare = await prisma.noteShare.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one NoteShare. - * @param {NoteShareUpsertArgs} args - Arguments to update or create a NoteShare. - * @example - * // Update or create a NoteShare - * const noteShare = await prisma.noteShare.upsert({ - * create: { - * // ... data to create a NoteShare - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the NoteShare we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__NoteShareClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of NoteShares. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareCountArgs} args - Arguments to filter NoteShares to count. - * @example - * // Count the number of NoteShares - * const count = await prisma.noteShare.count({ - * where: { - * // ... the filter for the NoteShares we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a NoteShare. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by NoteShare. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {NoteShareGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends NoteShareGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: NoteShareGroupByArgs['orderBy'] } - : { orderBy?: NoteShareGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetNoteShareGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the NoteShare model - */ - readonly fields: NoteShareFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for NoteShare. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__NoteShareClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - note = {}>(args?: Subset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - sharer = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the NoteShare model - */ - interface NoteShareFieldRefs { - readonly id: FieldRef<"NoteShare", 'String'> - readonly noteId: FieldRef<"NoteShare", 'String'> - readonly userId: FieldRef<"NoteShare", 'String'> - readonly sharedBy: FieldRef<"NoteShare", 'String'> - readonly status: FieldRef<"NoteShare", 'String'> - readonly permission: FieldRef<"NoteShare", 'String'> - readonly notifiedAt: FieldRef<"NoteShare", 'DateTime'> - readonly respondedAt: FieldRef<"NoteShare", 'DateTime'> - readonly createdAt: FieldRef<"NoteShare", 'DateTime'> - readonly updatedAt: FieldRef<"NoteShare", 'DateTime'> - } - - - // Custom InputTypes - /** - * NoteShare findUnique - */ - export type NoteShareFindUniqueArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - /** - * Filter, which NoteShare to fetch. - */ - where: NoteShareWhereUniqueInput - } - - /** - * NoteShare findUniqueOrThrow - */ - export type NoteShareFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - /** - * Filter, which NoteShare to fetch. - */ - where: NoteShareWhereUniqueInput - } - - /** - * NoteShare findFirst - */ - export type NoteShareFindFirstArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - /** - * Filter, which NoteShare to fetch. - */ - where?: NoteShareWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of NoteShares to fetch. - */ - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for NoteShares. - */ - cursor?: NoteShareWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` NoteShares from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` NoteShares. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of NoteShares. - */ - distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] - } - - /** - * NoteShare findFirstOrThrow - */ - export type NoteShareFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - /** - * Filter, which NoteShare to fetch. - */ - where?: NoteShareWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of NoteShares to fetch. - */ - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for NoteShares. - */ - cursor?: NoteShareWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` NoteShares from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` NoteShares. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of NoteShares. - */ - distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] - } - - /** - * NoteShare findMany - */ - export type NoteShareFindManyArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - /** - * Filter, which NoteShares to fetch. - */ - where?: NoteShareWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of NoteShares to fetch. - */ - orderBy?: NoteShareOrderByWithRelationInput | NoteShareOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing NoteShares. - */ - cursor?: NoteShareWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` NoteShares from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` NoteShares. - */ - skip?: number - distinct?: NoteShareScalarFieldEnum | NoteShareScalarFieldEnum[] - } - - /** - * NoteShare create - */ - export type NoteShareCreateArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - /** - * The data needed to create a NoteShare. - */ - data: XOR - } - - /** - * NoteShare createMany - */ - export type NoteShareCreateManyArgs = { - /** - * The data used to create many NoteShares. - */ - data: NoteShareCreateManyInput | NoteShareCreateManyInput[] - } - - /** - * NoteShare createManyAndReturn - */ - export type NoteShareCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelectCreateManyAndReturn | null - /** - * The data used to create many NoteShares. - */ - data: NoteShareCreateManyInput | NoteShareCreateManyInput[] - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareIncludeCreateManyAndReturn | null - } - - /** - * NoteShare update - */ - export type NoteShareUpdateArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - /** - * The data needed to update a NoteShare. - */ - data: XOR - /** - * Choose, which NoteShare to update. - */ - where: NoteShareWhereUniqueInput - } - - /** - * NoteShare updateMany - */ - export type NoteShareUpdateManyArgs = { - /** - * The data used to update NoteShares. - */ - data: XOR - /** - * Filter which NoteShares to update - */ - where?: NoteShareWhereInput - } - - /** - * NoteShare upsert - */ - export type NoteShareUpsertArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - /** - * The filter to search for the NoteShare to update in case it exists. - */ - where: NoteShareWhereUniqueInput - /** - * In case the NoteShare found by the `where` argument doesn't exist, create a new NoteShare with this data. - */ - create: XOR - /** - * In case the NoteShare was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * NoteShare delete - */ - export type NoteShareDeleteArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - /** - * Filter which NoteShare to delete. - */ - where: NoteShareWhereUniqueInput - } - - /** - * NoteShare deleteMany - */ - export type NoteShareDeleteManyArgs = { - /** - * Filter which NoteShares to delete - */ - where?: NoteShareWhereInput - } - - /** - * NoteShare without action - */ - export type NoteShareDefaultArgs = { - /** - * Select specific fields to fetch from the NoteShare - */ - select?: NoteShareSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: NoteShareInclude | null - } - - - /** - * Model SystemConfig - */ - - export type AggregateSystemConfig = { - _count: SystemConfigCountAggregateOutputType | null - _min: SystemConfigMinAggregateOutputType | null - _max: SystemConfigMaxAggregateOutputType | null - } - - export type SystemConfigMinAggregateOutputType = { - key: string | null - value: string | null - } - - export type SystemConfigMaxAggregateOutputType = { - key: string | null - value: string | null - } - - export type SystemConfigCountAggregateOutputType = { - key: number - value: number - _all: number - } - - - export type SystemConfigMinAggregateInputType = { - key?: true - value?: true - } - - export type SystemConfigMaxAggregateInputType = { - key?: true - value?: true - } - - export type SystemConfigCountAggregateInputType = { - key?: true - value?: true - _all?: true - } - - export type SystemConfigAggregateArgs = { - /** - * Filter which SystemConfig to aggregate. - */ - where?: SystemConfigWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SystemConfigs to fetch. - */ - orderBy?: SystemConfigOrderByWithRelationInput | SystemConfigOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: SystemConfigWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SystemConfigs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SystemConfigs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned SystemConfigs - **/ - _count?: true | SystemConfigCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: SystemConfigMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: SystemConfigMaxAggregateInputType - } - - export type GetSystemConfigAggregateType = { - [P in keyof T & keyof AggregateSystemConfig]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type SystemConfigGroupByArgs = { - where?: SystemConfigWhereInput - orderBy?: SystemConfigOrderByWithAggregationInput | SystemConfigOrderByWithAggregationInput[] - by: SystemConfigScalarFieldEnum[] | SystemConfigScalarFieldEnum - having?: SystemConfigScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: SystemConfigCountAggregateInputType | true - _min?: SystemConfigMinAggregateInputType - _max?: SystemConfigMaxAggregateInputType - } - - export type SystemConfigGroupByOutputType = { - key: string - value: string - _count: SystemConfigCountAggregateOutputType | null - _min: SystemConfigMinAggregateOutputType | null - _max: SystemConfigMaxAggregateOutputType | null - } - - type GetSystemConfigGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof SystemConfigGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type SystemConfigSelect = $Extensions.GetSelect<{ - key?: boolean - value?: boolean - }, ExtArgs["result"]["systemConfig"]> - - export type SystemConfigSelectCreateManyAndReturn = $Extensions.GetSelect<{ - key?: boolean - value?: boolean - }, ExtArgs["result"]["systemConfig"]> - - export type SystemConfigSelectScalar = { - key?: boolean - value?: boolean - } - - - export type $SystemConfigPayload = { - name: "SystemConfig" - objects: {} - scalars: $Extensions.GetPayloadResult<{ - key: string - value: string - }, ExtArgs["result"]["systemConfig"]> - composites: {} - } - - type SystemConfigGetPayload = $Result.GetResult - - type SystemConfigCountArgs = - Omit & { - select?: SystemConfigCountAggregateInputType | true - } - - export interface SystemConfigDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['SystemConfig'], meta: { name: 'SystemConfig' } } - /** - * Find zero or one SystemConfig that matches the filter. - * @param {SystemConfigFindUniqueArgs} args - Arguments to find a SystemConfig - * @example - * // Get one SystemConfig - * const systemConfig = await prisma.systemConfig.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__SystemConfigClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one SystemConfig that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {SystemConfigFindUniqueOrThrowArgs} args - Arguments to find a SystemConfig - * @example - * // Get one SystemConfig - * const systemConfig = await prisma.systemConfig.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__SystemConfigClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first SystemConfig that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SystemConfigFindFirstArgs} args - Arguments to find a SystemConfig - * @example - * // Get one SystemConfig - * const systemConfig = await prisma.systemConfig.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__SystemConfigClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first SystemConfig that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SystemConfigFindFirstOrThrowArgs} args - Arguments to find a SystemConfig - * @example - * // Get one SystemConfig - * const systemConfig = await prisma.systemConfig.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__SystemConfigClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more SystemConfigs that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SystemConfigFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all SystemConfigs - * const systemConfigs = await prisma.systemConfig.findMany() - * - * // Get first 10 SystemConfigs - * const systemConfigs = await prisma.systemConfig.findMany({ take: 10 }) - * - * // Only select the `key` - * const systemConfigWithKeyOnly = await prisma.systemConfig.findMany({ select: { key: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a SystemConfig. - * @param {SystemConfigCreateArgs} args - Arguments to create a SystemConfig. - * @example - * // Create one SystemConfig - * const SystemConfig = await prisma.systemConfig.create({ - * data: { - * // ... data to create a SystemConfig - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__SystemConfigClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many SystemConfigs. - * @param {SystemConfigCreateManyArgs} args - Arguments to create many SystemConfigs. - * @example - * // Create many SystemConfigs - * const systemConfig = await prisma.systemConfig.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many SystemConfigs and returns the data saved in the database. - * @param {SystemConfigCreateManyAndReturnArgs} args - Arguments to create many SystemConfigs. - * @example - * // Create many SystemConfigs - * const systemConfig = await prisma.systemConfig.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many SystemConfigs and only return the `key` - * const systemConfigWithKeyOnly = await prisma.systemConfig.createManyAndReturn({ - * select: { key: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a SystemConfig. - * @param {SystemConfigDeleteArgs} args - Arguments to delete one SystemConfig. - * @example - * // Delete one SystemConfig - * const SystemConfig = await prisma.systemConfig.delete({ - * where: { - * // ... filter to delete one SystemConfig - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__SystemConfigClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one SystemConfig. - * @param {SystemConfigUpdateArgs} args - Arguments to update one SystemConfig. - * @example - * // Update one SystemConfig - * const systemConfig = await prisma.systemConfig.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__SystemConfigClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more SystemConfigs. - * @param {SystemConfigDeleteManyArgs} args - Arguments to filter SystemConfigs to delete. - * @example - * // Delete a few SystemConfigs - * const { count } = await prisma.systemConfig.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more SystemConfigs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SystemConfigUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many SystemConfigs - * const systemConfig = await prisma.systemConfig.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one SystemConfig. - * @param {SystemConfigUpsertArgs} args - Arguments to update or create a SystemConfig. - * @example - * // Update or create a SystemConfig - * const systemConfig = await prisma.systemConfig.upsert({ - * create: { - * // ... data to create a SystemConfig - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the SystemConfig we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__SystemConfigClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of SystemConfigs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SystemConfigCountArgs} args - Arguments to filter SystemConfigs to count. - * @example - * // Count the number of SystemConfigs - * const count = await prisma.systemConfig.count({ - * where: { - * // ... the filter for the SystemConfigs we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a SystemConfig. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SystemConfigAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by SystemConfig. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SystemConfigGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends SystemConfigGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: SystemConfigGroupByArgs['orderBy'] } - : { orderBy?: SystemConfigGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSystemConfigGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the SystemConfig model - */ - readonly fields: SystemConfigFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for SystemConfig. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__SystemConfigClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the SystemConfig model - */ - interface SystemConfigFieldRefs { - readonly key: FieldRef<"SystemConfig", 'String'> - readonly value: FieldRef<"SystemConfig", 'String'> - } - - - // Custom InputTypes - /** - * SystemConfig findUnique - */ - export type SystemConfigFindUniqueArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - /** - * Filter, which SystemConfig to fetch. - */ - where: SystemConfigWhereUniqueInput - } - - /** - * SystemConfig findUniqueOrThrow - */ - export type SystemConfigFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - /** - * Filter, which SystemConfig to fetch. - */ - where: SystemConfigWhereUniqueInput - } - - /** - * SystemConfig findFirst - */ - export type SystemConfigFindFirstArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - /** - * Filter, which SystemConfig to fetch. - */ - where?: SystemConfigWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SystemConfigs to fetch. - */ - orderBy?: SystemConfigOrderByWithRelationInput | SystemConfigOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SystemConfigs. - */ - cursor?: SystemConfigWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SystemConfigs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SystemConfigs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SystemConfigs. - */ - distinct?: SystemConfigScalarFieldEnum | SystemConfigScalarFieldEnum[] - } - - /** - * SystemConfig findFirstOrThrow - */ - export type SystemConfigFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - /** - * Filter, which SystemConfig to fetch. - */ - where?: SystemConfigWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SystemConfigs to fetch. - */ - orderBy?: SystemConfigOrderByWithRelationInput | SystemConfigOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SystemConfigs. - */ - cursor?: SystemConfigWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SystemConfigs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SystemConfigs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SystemConfigs. - */ - distinct?: SystemConfigScalarFieldEnum | SystemConfigScalarFieldEnum[] - } - - /** - * SystemConfig findMany - */ - export type SystemConfigFindManyArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - /** - * Filter, which SystemConfigs to fetch. - */ - where?: SystemConfigWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SystemConfigs to fetch. - */ - orderBy?: SystemConfigOrderByWithRelationInput | SystemConfigOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing SystemConfigs. - */ - cursor?: SystemConfigWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SystemConfigs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SystemConfigs. - */ - skip?: number - distinct?: SystemConfigScalarFieldEnum | SystemConfigScalarFieldEnum[] - } - - /** - * SystemConfig create - */ - export type SystemConfigCreateArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - /** - * The data needed to create a SystemConfig. - */ - data: XOR - } - - /** - * SystemConfig createMany - */ - export type SystemConfigCreateManyArgs = { - /** - * The data used to create many SystemConfigs. - */ - data: SystemConfigCreateManyInput | SystemConfigCreateManyInput[] - } - - /** - * SystemConfig createManyAndReturn - */ - export type SystemConfigCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelectCreateManyAndReturn | null - /** - * The data used to create many SystemConfigs. - */ - data: SystemConfigCreateManyInput | SystemConfigCreateManyInput[] - } - - /** - * SystemConfig update - */ - export type SystemConfigUpdateArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - /** - * The data needed to update a SystemConfig. - */ - data: XOR - /** - * Choose, which SystemConfig to update. - */ - where: SystemConfigWhereUniqueInput - } - - /** - * SystemConfig updateMany - */ - export type SystemConfigUpdateManyArgs = { - /** - * The data used to update SystemConfigs. - */ - data: XOR - /** - * Filter which SystemConfigs to update - */ - where?: SystemConfigWhereInput - } - - /** - * SystemConfig upsert - */ - export type SystemConfigUpsertArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - /** - * The filter to search for the SystemConfig to update in case it exists. - */ - where: SystemConfigWhereUniqueInput - /** - * In case the SystemConfig found by the `where` argument doesn't exist, create a new SystemConfig with this data. - */ - create: XOR - /** - * In case the SystemConfig was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * SystemConfig delete - */ - export type SystemConfigDeleteArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - /** - * Filter which SystemConfig to delete. - */ - where: SystemConfigWhereUniqueInput - } - - /** - * SystemConfig deleteMany - */ - export type SystemConfigDeleteManyArgs = { - /** - * Filter which SystemConfigs to delete - */ - where?: SystemConfigWhereInput - } - - /** - * SystemConfig without action - */ - export type SystemConfigDefaultArgs = { - /** - * Select specific fields to fetch from the SystemConfig - */ - select?: SystemConfigSelect | null - } - - - /** - * Model AiFeedback - */ - - export type AggregateAiFeedback = { - _count: AiFeedbackCountAggregateOutputType | null - _min: AiFeedbackMinAggregateOutputType | null - _max: AiFeedbackMaxAggregateOutputType | null - } - - export type AiFeedbackMinAggregateOutputType = { - id: string | null - noteId: string | null - userId: string | null - feedbackType: string | null - feature: string | null - originalContent: string | null - correctedContent: string | null - metadata: string | null - createdAt: Date | null - } - - export type AiFeedbackMaxAggregateOutputType = { - id: string | null - noteId: string | null - userId: string | null - feedbackType: string | null - feature: string | null - originalContent: string | null - correctedContent: string | null - metadata: string | null - createdAt: Date | null - } - - export type AiFeedbackCountAggregateOutputType = { - id: number - noteId: number - userId: number - feedbackType: number - feature: number - originalContent: number - correctedContent: number - metadata: number - createdAt: number - _all: number - } - - - export type AiFeedbackMinAggregateInputType = { - id?: true - noteId?: true - userId?: true - feedbackType?: true - feature?: true - originalContent?: true - correctedContent?: true - metadata?: true - createdAt?: true - } - - export type AiFeedbackMaxAggregateInputType = { - id?: true - noteId?: true - userId?: true - feedbackType?: true - feature?: true - originalContent?: true - correctedContent?: true - metadata?: true - createdAt?: true - } - - export type AiFeedbackCountAggregateInputType = { - id?: true - noteId?: true - userId?: true - feedbackType?: true - feature?: true - originalContent?: true - correctedContent?: true - metadata?: true - createdAt?: true - _all?: true - } - - export type AiFeedbackAggregateArgs = { - /** - * Filter which AiFeedback to aggregate. - */ - where?: AiFeedbackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AiFeedbacks to fetch. - */ - orderBy?: AiFeedbackOrderByWithRelationInput | AiFeedbackOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: AiFeedbackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AiFeedbacks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AiFeedbacks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned AiFeedbacks - **/ - _count?: true | AiFeedbackCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AiFeedbackMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AiFeedbackMaxAggregateInputType - } - - export type GetAiFeedbackAggregateType = { - [P in keyof T & keyof AggregateAiFeedback]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type AiFeedbackGroupByArgs = { - where?: AiFeedbackWhereInput - orderBy?: AiFeedbackOrderByWithAggregationInput | AiFeedbackOrderByWithAggregationInput[] - by: AiFeedbackScalarFieldEnum[] | AiFeedbackScalarFieldEnum - having?: AiFeedbackScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AiFeedbackCountAggregateInputType | true - _min?: AiFeedbackMinAggregateInputType - _max?: AiFeedbackMaxAggregateInputType - } - - export type AiFeedbackGroupByOutputType = { - id: string - noteId: string - userId: string | null - feedbackType: string - feature: string - originalContent: string - correctedContent: string | null - metadata: string | null - createdAt: Date - _count: AiFeedbackCountAggregateOutputType | null - _min: AiFeedbackMinAggregateOutputType | null - _max: AiFeedbackMaxAggregateOutputType | null - } - - type GetAiFeedbackGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof AiFeedbackGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type AiFeedbackSelect = $Extensions.GetSelect<{ - id?: boolean - noteId?: boolean - userId?: boolean - feedbackType?: boolean - feature?: boolean - originalContent?: boolean - correctedContent?: boolean - metadata?: boolean - createdAt?: boolean - note?: boolean | NoteDefaultArgs - user?: boolean | AiFeedback$userArgs - }, ExtArgs["result"]["aiFeedback"]> - - export type AiFeedbackSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - noteId?: boolean - userId?: boolean - feedbackType?: boolean - feature?: boolean - originalContent?: boolean - correctedContent?: boolean - metadata?: boolean - createdAt?: boolean - note?: boolean | NoteDefaultArgs - user?: boolean | AiFeedback$userArgs - }, ExtArgs["result"]["aiFeedback"]> - - export type AiFeedbackSelectScalar = { - id?: boolean - noteId?: boolean - userId?: boolean - feedbackType?: boolean - feature?: boolean - originalContent?: boolean - correctedContent?: boolean - metadata?: boolean - createdAt?: boolean - } - - export type AiFeedbackInclude = { - note?: boolean | NoteDefaultArgs - user?: boolean | AiFeedback$userArgs - } - export type AiFeedbackIncludeCreateManyAndReturn = { - note?: boolean | NoteDefaultArgs - user?: boolean | AiFeedback$userArgs - } - - export type $AiFeedbackPayload = { - name: "AiFeedback" - objects: { - note: Prisma.$NotePayload - user: Prisma.$UserPayload | null - } - scalars: $Extensions.GetPayloadResult<{ - id: string - noteId: string - userId: string | null - feedbackType: string - feature: string - originalContent: string - correctedContent: string | null - metadata: string | null - createdAt: Date - }, ExtArgs["result"]["aiFeedback"]> - composites: {} - } - - type AiFeedbackGetPayload = $Result.GetResult - - type AiFeedbackCountArgs = - Omit & { - select?: AiFeedbackCountAggregateInputType | true - } - - export interface AiFeedbackDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['AiFeedback'], meta: { name: 'AiFeedback' } } - /** - * Find zero or one AiFeedback that matches the filter. - * @param {AiFeedbackFindUniqueArgs} args - Arguments to find a AiFeedback - * @example - * // Get one AiFeedback - * const aiFeedback = await prisma.aiFeedback.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__AiFeedbackClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one AiFeedback that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AiFeedbackFindUniqueOrThrowArgs} args - Arguments to find a AiFeedback - * @example - * // Get one AiFeedback - * const aiFeedback = await prisma.aiFeedback.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__AiFeedbackClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first AiFeedback that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AiFeedbackFindFirstArgs} args - Arguments to find a AiFeedback - * @example - * // Get one AiFeedback - * const aiFeedback = await prisma.aiFeedback.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__AiFeedbackClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first AiFeedback that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AiFeedbackFindFirstOrThrowArgs} args - Arguments to find a AiFeedback - * @example - * // Get one AiFeedback - * const aiFeedback = await prisma.aiFeedback.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__AiFeedbackClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more AiFeedbacks that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AiFeedbackFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all AiFeedbacks - * const aiFeedbacks = await prisma.aiFeedback.findMany() - * - * // Get first 10 AiFeedbacks - * const aiFeedbacks = await prisma.aiFeedback.findMany({ take: 10 }) - * - * // Only select the `id` - * const aiFeedbackWithIdOnly = await prisma.aiFeedback.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a AiFeedback. - * @param {AiFeedbackCreateArgs} args - Arguments to create a AiFeedback. - * @example - * // Create one AiFeedback - * const AiFeedback = await prisma.aiFeedback.create({ - * data: { - * // ... data to create a AiFeedback - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__AiFeedbackClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many AiFeedbacks. - * @param {AiFeedbackCreateManyArgs} args - Arguments to create many AiFeedbacks. - * @example - * // Create many AiFeedbacks - * const aiFeedback = await prisma.aiFeedback.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many AiFeedbacks and returns the data saved in the database. - * @param {AiFeedbackCreateManyAndReturnArgs} args - Arguments to create many AiFeedbacks. - * @example - * // Create many AiFeedbacks - * const aiFeedback = await prisma.aiFeedback.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many AiFeedbacks and only return the `id` - * const aiFeedbackWithIdOnly = await prisma.aiFeedback.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a AiFeedback. - * @param {AiFeedbackDeleteArgs} args - Arguments to delete one AiFeedback. - * @example - * // Delete one AiFeedback - * const AiFeedback = await prisma.aiFeedback.delete({ - * where: { - * // ... filter to delete one AiFeedback - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__AiFeedbackClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one AiFeedback. - * @param {AiFeedbackUpdateArgs} args - Arguments to update one AiFeedback. - * @example - * // Update one AiFeedback - * const aiFeedback = await prisma.aiFeedback.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__AiFeedbackClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more AiFeedbacks. - * @param {AiFeedbackDeleteManyArgs} args - Arguments to filter AiFeedbacks to delete. - * @example - * // Delete a few AiFeedbacks - * const { count } = await prisma.aiFeedback.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more AiFeedbacks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AiFeedbackUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many AiFeedbacks - * const aiFeedback = await prisma.aiFeedback.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one AiFeedback. - * @param {AiFeedbackUpsertArgs} args - Arguments to update or create a AiFeedback. - * @example - * // Update or create a AiFeedback - * const aiFeedback = await prisma.aiFeedback.upsert({ - * create: { - * // ... data to create a AiFeedback - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the AiFeedback we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__AiFeedbackClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of AiFeedbacks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AiFeedbackCountArgs} args - Arguments to filter AiFeedbacks to count. - * @example - * // Count the number of AiFeedbacks - * const count = await prisma.aiFeedback.count({ - * where: { - * // ... the filter for the AiFeedbacks we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a AiFeedback. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AiFeedbackAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by AiFeedback. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AiFeedbackGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends AiFeedbackGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AiFeedbackGroupByArgs['orderBy'] } - : { orderBy?: AiFeedbackGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAiFeedbackGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the AiFeedback model - */ - readonly fields: AiFeedbackFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for AiFeedback. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__AiFeedbackClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - note = {}>(args?: Subset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the AiFeedback model - */ - interface AiFeedbackFieldRefs { - readonly id: FieldRef<"AiFeedback", 'String'> - readonly noteId: FieldRef<"AiFeedback", 'String'> - readonly userId: FieldRef<"AiFeedback", 'String'> - readonly feedbackType: FieldRef<"AiFeedback", 'String'> - readonly feature: FieldRef<"AiFeedback", 'String'> - readonly originalContent: FieldRef<"AiFeedback", 'String'> - readonly correctedContent: FieldRef<"AiFeedback", 'String'> - readonly metadata: FieldRef<"AiFeedback", 'String'> - readonly createdAt: FieldRef<"AiFeedback", 'DateTime'> - } - - - // Custom InputTypes - /** - * AiFeedback findUnique - */ - export type AiFeedbackFindUniqueArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - /** - * Filter, which AiFeedback to fetch. - */ - where: AiFeedbackWhereUniqueInput - } - - /** - * AiFeedback findUniqueOrThrow - */ - export type AiFeedbackFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - /** - * Filter, which AiFeedback to fetch. - */ - where: AiFeedbackWhereUniqueInput - } - - /** - * AiFeedback findFirst - */ - export type AiFeedbackFindFirstArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - /** - * Filter, which AiFeedback to fetch. - */ - where?: AiFeedbackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AiFeedbacks to fetch. - */ - orderBy?: AiFeedbackOrderByWithRelationInput | AiFeedbackOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AiFeedbacks. - */ - cursor?: AiFeedbackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AiFeedbacks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AiFeedbacks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AiFeedbacks. - */ - distinct?: AiFeedbackScalarFieldEnum | AiFeedbackScalarFieldEnum[] - } - - /** - * AiFeedback findFirstOrThrow - */ - export type AiFeedbackFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - /** - * Filter, which AiFeedback to fetch. - */ - where?: AiFeedbackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AiFeedbacks to fetch. - */ - orderBy?: AiFeedbackOrderByWithRelationInput | AiFeedbackOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AiFeedbacks. - */ - cursor?: AiFeedbackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AiFeedbacks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AiFeedbacks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AiFeedbacks. - */ - distinct?: AiFeedbackScalarFieldEnum | AiFeedbackScalarFieldEnum[] - } - - /** - * AiFeedback findMany - */ - export type AiFeedbackFindManyArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - /** - * Filter, which AiFeedbacks to fetch. - */ - where?: AiFeedbackWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AiFeedbacks to fetch. - */ - orderBy?: AiFeedbackOrderByWithRelationInput | AiFeedbackOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing AiFeedbacks. - */ - cursor?: AiFeedbackWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AiFeedbacks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AiFeedbacks. - */ - skip?: number - distinct?: AiFeedbackScalarFieldEnum | AiFeedbackScalarFieldEnum[] - } - - /** - * AiFeedback create - */ - export type AiFeedbackCreateArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - /** - * The data needed to create a AiFeedback. - */ - data: XOR - } - - /** - * AiFeedback createMany - */ - export type AiFeedbackCreateManyArgs = { - /** - * The data used to create many AiFeedbacks. - */ - data: AiFeedbackCreateManyInput | AiFeedbackCreateManyInput[] - } - - /** - * AiFeedback createManyAndReturn - */ - export type AiFeedbackCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelectCreateManyAndReturn | null - /** - * The data used to create many AiFeedbacks. - */ - data: AiFeedbackCreateManyInput | AiFeedbackCreateManyInput[] - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackIncludeCreateManyAndReturn | null - } - - /** - * AiFeedback update - */ - export type AiFeedbackUpdateArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - /** - * The data needed to update a AiFeedback. - */ - data: XOR - /** - * Choose, which AiFeedback to update. - */ - where: AiFeedbackWhereUniqueInput - } - - /** - * AiFeedback updateMany - */ - export type AiFeedbackUpdateManyArgs = { - /** - * The data used to update AiFeedbacks. - */ - data: XOR - /** - * Filter which AiFeedbacks to update - */ - where?: AiFeedbackWhereInput - } - - /** - * AiFeedback upsert - */ - export type AiFeedbackUpsertArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - /** - * The filter to search for the AiFeedback to update in case it exists. - */ - where: AiFeedbackWhereUniqueInput - /** - * In case the AiFeedback found by the `where` argument doesn't exist, create a new AiFeedback with this data. - */ - create: XOR - /** - * In case the AiFeedback was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * AiFeedback delete - */ - export type AiFeedbackDeleteArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - /** - * Filter which AiFeedback to delete. - */ - where: AiFeedbackWhereUniqueInput - } - - /** - * AiFeedback deleteMany - */ - export type AiFeedbackDeleteManyArgs = { - /** - * Filter which AiFeedbacks to delete - */ - where?: AiFeedbackWhereInput - } - - /** - * AiFeedback.user - */ - export type AiFeedback$userArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - where?: UserWhereInput - } - - /** - * AiFeedback without action - */ - export type AiFeedbackDefaultArgs = { - /** - * Select specific fields to fetch from the AiFeedback - */ - select?: AiFeedbackSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: AiFeedbackInclude | null - } - - - /** - * Model MemoryEchoInsight - */ - - export type AggregateMemoryEchoInsight = { - _count: MemoryEchoInsightCountAggregateOutputType | null - _avg: MemoryEchoInsightAvgAggregateOutputType | null - _sum: MemoryEchoInsightSumAggregateOutputType | null - _min: MemoryEchoInsightMinAggregateOutputType | null - _max: MemoryEchoInsightMaxAggregateOutputType | null - } - - export type MemoryEchoInsightAvgAggregateOutputType = { - similarityScore: number | null - } - - export type MemoryEchoInsightSumAggregateOutputType = { - similarityScore: number | null - } - - export type MemoryEchoInsightMinAggregateOutputType = { - id: string | null - userId: string | null - note1Id: string | null - note2Id: string | null - similarityScore: number | null - insight: string | null - insightDate: Date | null - viewed: boolean | null - feedback: string | null - dismissed: boolean | null - } - - export type MemoryEchoInsightMaxAggregateOutputType = { - id: string | null - userId: string | null - note1Id: string | null - note2Id: string | null - similarityScore: number | null - insight: string | null - insightDate: Date | null - viewed: boolean | null - feedback: string | null - dismissed: boolean | null - } - - export type MemoryEchoInsightCountAggregateOutputType = { - id: number - userId: number - note1Id: number - note2Id: number - similarityScore: number - insight: number - insightDate: number - viewed: number - feedback: number - dismissed: number - _all: number - } - - - export type MemoryEchoInsightAvgAggregateInputType = { - similarityScore?: true - } - - export type MemoryEchoInsightSumAggregateInputType = { - similarityScore?: true - } - - export type MemoryEchoInsightMinAggregateInputType = { - id?: true - userId?: true - note1Id?: true - note2Id?: true - similarityScore?: true - insight?: true - insightDate?: true - viewed?: true - feedback?: true - dismissed?: true - } - - export type MemoryEchoInsightMaxAggregateInputType = { - id?: true - userId?: true - note1Id?: true - note2Id?: true - similarityScore?: true - insight?: true - insightDate?: true - viewed?: true - feedback?: true - dismissed?: true - } - - export type MemoryEchoInsightCountAggregateInputType = { - id?: true - userId?: true - note1Id?: true - note2Id?: true - similarityScore?: true - insight?: true - insightDate?: true - viewed?: true - feedback?: true - dismissed?: true - _all?: true - } - - export type MemoryEchoInsightAggregateArgs = { - /** - * Filter which MemoryEchoInsight to aggregate. - */ - where?: MemoryEchoInsightWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of MemoryEchoInsights to fetch. - */ - orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: MemoryEchoInsightWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` MemoryEchoInsights from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` MemoryEchoInsights. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned MemoryEchoInsights - **/ - _count?: true | MemoryEchoInsightCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: MemoryEchoInsightAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: MemoryEchoInsightSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: MemoryEchoInsightMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: MemoryEchoInsightMaxAggregateInputType - } - - export type GetMemoryEchoInsightAggregateType = { - [P in keyof T & keyof AggregateMemoryEchoInsight]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type MemoryEchoInsightGroupByArgs = { - where?: MemoryEchoInsightWhereInput - orderBy?: MemoryEchoInsightOrderByWithAggregationInput | MemoryEchoInsightOrderByWithAggregationInput[] - by: MemoryEchoInsightScalarFieldEnum[] | MemoryEchoInsightScalarFieldEnum - having?: MemoryEchoInsightScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: MemoryEchoInsightCountAggregateInputType | true - _avg?: MemoryEchoInsightAvgAggregateInputType - _sum?: MemoryEchoInsightSumAggregateInputType - _min?: MemoryEchoInsightMinAggregateInputType - _max?: MemoryEchoInsightMaxAggregateInputType - } - - export type MemoryEchoInsightGroupByOutputType = { - id: string - userId: string | null - note1Id: string - note2Id: string - similarityScore: number - insight: string - insightDate: Date - viewed: boolean - feedback: string | null - dismissed: boolean - _count: MemoryEchoInsightCountAggregateOutputType | null - _avg: MemoryEchoInsightAvgAggregateOutputType | null - _sum: MemoryEchoInsightSumAggregateOutputType | null - _min: MemoryEchoInsightMinAggregateOutputType | null - _max: MemoryEchoInsightMaxAggregateOutputType | null - } - - type GetMemoryEchoInsightGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof MemoryEchoInsightGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type MemoryEchoInsightSelect = $Extensions.GetSelect<{ - id?: boolean - userId?: boolean - note1Id?: boolean - note2Id?: boolean - similarityScore?: boolean - insight?: boolean - insightDate?: boolean - viewed?: boolean - feedback?: boolean - dismissed?: boolean - note1?: boolean | NoteDefaultArgs - note2?: boolean | NoteDefaultArgs - user?: boolean | MemoryEchoInsight$userArgs - }, ExtArgs["result"]["memoryEchoInsight"]> - - export type MemoryEchoInsightSelectCreateManyAndReturn = $Extensions.GetSelect<{ - id?: boolean - userId?: boolean - note1Id?: boolean - note2Id?: boolean - similarityScore?: boolean - insight?: boolean - insightDate?: boolean - viewed?: boolean - feedback?: boolean - dismissed?: boolean - note1?: boolean | NoteDefaultArgs - note2?: boolean | NoteDefaultArgs - user?: boolean | MemoryEchoInsight$userArgs - }, ExtArgs["result"]["memoryEchoInsight"]> - - export type MemoryEchoInsightSelectScalar = { - id?: boolean - userId?: boolean - note1Id?: boolean - note2Id?: boolean - similarityScore?: boolean - insight?: boolean - insightDate?: boolean - viewed?: boolean - feedback?: boolean - dismissed?: boolean - } - - export type MemoryEchoInsightInclude = { - note1?: boolean | NoteDefaultArgs - note2?: boolean | NoteDefaultArgs - user?: boolean | MemoryEchoInsight$userArgs - } - export type MemoryEchoInsightIncludeCreateManyAndReturn = { - note1?: boolean | NoteDefaultArgs - note2?: boolean | NoteDefaultArgs - user?: boolean | MemoryEchoInsight$userArgs - } - - export type $MemoryEchoInsightPayload = { - name: "MemoryEchoInsight" - objects: { - note1: Prisma.$NotePayload - note2: Prisma.$NotePayload - user: Prisma.$UserPayload | null - } - scalars: $Extensions.GetPayloadResult<{ - id: string - userId: string | null - note1Id: string - note2Id: string - similarityScore: number - insight: string - insightDate: Date - viewed: boolean - feedback: string | null - dismissed: boolean - }, ExtArgs["result"]["memoryEchoInsight"]> - composites: {} - } - - type MemoryEchoInsightGetPayload = $Result.GetResult - - type MemoryEchoInsightCountArgs = - Omit & { - select?: MemoryEchoInsightCountAggregateInputType | true - } - - export interface MemoryEchoInsightDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['MemoryEchoInsight'], meta: { name: 'MemoryEchoInsight' } } - /** - * Find zero or one MemoryEchoInsight that matches the filter. - * @param {MemoryEchoInsightFindUniqueArgs} args - Arguments to find a MemoryEchoInsight - * @example - * // Get one MemoryEchoInsight - * const memoryEchoInsight = await prisma.memoryEchoInsight.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__MemoryEchoInsightClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one MemoryEchoInsight that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {MemoryEchoInsightFindUniqueOrThrowArgs} args - Arguments to find a MemoryEchoInsight - * @example - * // Get one MemoryEchoInsight - * const memoryEchoInsight = await prisma.memoryEchoInsight.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__MemoryEchoInsightClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first MemoryEchoInsight that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MemoryEchoInsightFindFirstArgs} args - Arguments to find a MemoryEchoInsight - * @example - * // Get one MemoryEchoInsight - * const memoryEchoInsight = await prisma.memoryEchoInsight.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__MemoryEchoInsightClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first MemoryEchoInsight that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MemoryEchoInsightFindFirstOrThrowArgs} args - Arguments to find a MemoryEchoInsight - * @example - * // Get one MemoryEchoInsight - * const memoryEchoInsight = await prisma.memoryEchoInsight.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__MemoryEchoInsightClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more MemoryEchoInsights that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MemoryEchoInsightFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all MemoryEchoInsights - * const memoryEchoInsights = await prisma.memoryEchoInsight.findMany() - * - * // Get first 10 MemoryEchoInsights - * const memoryEchoInsights = await prisma.memoryEchoInsight.findMany({ take: 10 }) - * - * // Only select the `id` - * const memoryEchoInsightWithIdOnly = await prisma.memoryEchoInsight.findMany({ select: { id: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a MemoryEchoInsight. - * @param {MemoryEchoInsightCreateArgs} args - Arguments to create a MemoryEchoInsight. - * @example - * // Create one MemoryEchoInsight - * const MemoryEchoInsight = await prisma.memoryEchoInsight.create({ - * data: { - * // ... data to create a MemoryEchoInsight - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__MemoryEchoInsightClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many MemoryEchoInsights. - * @param {MemoryEchoInsightCreateManyArgs} args - Arguments to create many MemoryEchoInsights. - * @example - * // Create many MemoryEchoInsights - * const memoryEchoInsight = await prisma.memoryEchoInsight.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many MemoryEchoInsights and returns the data saved in the database. - * @param {MemoryEchoInsightCreateManyAndReturnArgs} args - Arguments to create many MemoryEchoInsights. - * @example - * // Create many MemoryEchoInsights - * const memoryEchoInsight = await prisma.memoryEchoInsight.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many MemoryEchoInsights and only return the `id` - * const memoryEchoInsightWithIdOnly = await prisma.memoryEchoInsight.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a MemoryEchoInsight. - * @param {MemoryEchoInsightDeleteArgs} args - Arguments to delete one MemoryEchoInsight. - * @example - * // Delete one MemoryEchoInsight - * const MemoryEchoInsight = await prisma.memoryEchoInsight.delete({ - * where: { - * // ... filter to delete one MemoryEchoInsight - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__MemoryEchoInsightClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one MemoryEchoInsight. - * @param {MemoryEchoInsightUpdateArgs} args - Arguments to update one MemoryEchoInsight. - * @example - * // Update one MemoryEchoInsight - * const memoryEchoInsight = await prisma.memoryEchoInsight.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__MemoryEchoInsightClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more MemoryEchoInsights. - * @param {MemoryEchoInsightDeleteManyArgs} args - Arguments to filter MemoryEchoInsights to delete. - * @example - * // Delete a few MemoryEchoInsights - * const { count } = await prisma.memoryEchoInsight.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more MemoryEchoInsights. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MemoryEchoInsightUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many MemoryEchoInsights - * const memoryEchoInsight = await prisma.memoryEchoInsight.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one MemoryEchoInsight. - * @param {MemoryEchoInsightUpsertArgs} args - Arguments to update or create a MemoryEchoInsight. - * @example - * // Update or create a MemoryEchoInsight - * const memoryEchoInsight = await prisma.memoryEchoInsight.upsert({ - * create: { - * // ... data to create a MemoryEchoInsight - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the MemoryEchoInsight we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__MemoryEchoInsightClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of MemoryEchoInsights. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MemoryEchoInsightCountArgs} args - Arguments to filter MemoryEchoInsights to count. - * @example - * // Count the number of MemoryEchoInsights - * const count = await prisma.memoryEchoInsight.count({ - * where: { - * // ... the filter for the MemoryEchoInsights we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a MemoryEchoInsight. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MemoryEchoInsightAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by MemoryEchoInsight. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MemoryEchoInsightGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends MemoryEchoInsightGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: MemoryEchoInsightGroupByArgs['orderBy'] } - : { orderBy?: MemoryEchoInsightGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMemoryEchoInsightGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the MemoryEchoInsight model - */ - readonly fields: MemoryEchoInsightFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for MemoryEchoInsight. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__MemoryEchoInsightClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - note1 = {}>(args?: Subset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - note2 = {}>(args?: Subset>): Prisma__NoteClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the MemoryEchoInsight model - */ - interface MemoryEchoInsightFieldRefs { - readonly id: FieldRef<"MemoryEchoInsight", 'String'> - readonly userId: FieldRef<"MemoryEchoInsight", 'String'> - readonly note1Id: FieldRef<"MemoryEchoInsight", 'String'> - readonly note2Id: FieldRef<"MemoryEchoInsight", 'String'> - readonly similarityScore: FieldRef<"MemoryEchoInsight", 'Float'> - readonly insight: FieldRef<"MemoryEchoInsight", 'String'> - readonly insightDate: FieldRef<"MemoryEchoInsight", 'DateTime'> - readonly viewed: FieldRef<"MemoryEchoInsight", 'Boolean'> - readonly feedback: FieldRef<"MemoryEchoInsight", 'String'> - readonly dismissed: FieldRef<"MemoryEchoInsight", 'Boolean'> - } - - - // Custom InputTypes - /** - * MemoryEchoInsight findUnique - */ - export type MemoryEchoInsightFindUniqueArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - /** - * Filter, which MemoryEchoInsight to fetch. - */ - where: MemoryEchoInsightWhereUniqueInput - } - - /** - * MemoryEchoInsight findUniqueOrThrow - */ - export type MemoryEchoInsightFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - /** - * Filter, which MemoryEchoInsight to fetch. - */ - where: MemoryEchoInsightWhereUniqueInput - } - - /** - * MemoryEchoInsight findFirst - */ - export type MemoryEchoInsightFindFirstArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - /** - * Filter, which MemoryEchoInsight to fetch. - */ - where?: MemoryEchoInsightWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of MemoryEchoInsights to fetch. - */ - orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for MemoryEchoInsights. - */ - cursor?: MemoryEchoInsightWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` MemoryEchoInsights from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` MemoryEchoInsights. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of MemoryEchoInsights. - */ - distinct?: MemoryEchoInsightScalarFieldEnum | MemoryEchoInsightScalarFieldEnum[] - } - - /** - * MemoryEchoInsight findFirstOrThrow - */ - export type MemoryEchoInsightFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - /** - * Filter, which MemoryEchoInsight to fetch. - */ - where?: MemoryEchoInsightWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of MemoryEchoInsights to fetch. - */ - orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for MemoryEchoInsights. - */ - cursor?: MemoryEchoInsightWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` MemoryEchoInsights from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` MemoryEchoInsights. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of MemoryEchoInsights. - */ - distinct?: MemoryEchoInsightScalarFieldEnum | MemoryEchoInsightScalarFieldEnum[] - } - - /** - * MemoryEchoInsight findMany - */ - export type MemoryEchoInsightFindManyArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - /** - * Filter, which MemoryEchoInsights to fetch. - */ - where?: MemoryEchoInsightWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of MemoryEchoInsights to fetch. - */ - orderBy?: MemoryEchoInsightOrderByWithRelationInput | MemoryEchoInsightOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing MemoryEchoInsights. - */ - cursor?: MemoryEchoInsightWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` MemoryEchoInsights from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` MemoryEchoInsights. - */ - skip?: number - distinct?: MemoryEchoInsightScalarFieldEnum | MemoryEchoInsightScalarFieldEnum[] - } - - /** - * MemoryEchoInsight create - */ - export type MemoryEchoInsightCreateArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - /** - * The data needed to create a MemoryEchoInsight. - */ - data: XOR - } - - /** - * MemoryEchoInsight createMany - */ - export type MemoryEchoInsightCreateManyArgs = { - /** - * The data used to create many MemoryEchoInsights. - */ - data: MemoryEchoInsightCreateManyInput | MemoryEchoInsightCreateManyInput[] - } - - /** - * MemoryEchoInsight createManyAndReturn - */ - export type MemoryEchoInsightCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelectCreateManyAndReturn | null - /** - * The data used to create many MemoryEchoInsights. - */ - data: MemoryEchoInsightCreateManyInput | MemoryEchoInsightCreateManyInput[] - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightIncludeCreateManyAndReturn | null - } - - /** - * MemoryEchoInsight update - */ - export type MemoryEchoInsightUpdateArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - /** - * The data needed to update a MemoryEchoInsight. - */ - data: XOR - /** - * Choose, which MemoryEchoInsight to update. - */ - where: MemoryEchoInsightWhereUniqueInput - } - - /** - * MemoryEchoInsight updateMany - */ - export type MemoryEchoInsightUpdateManyArgs = { - /** - * The data used to update MemoryEchoInsights. - */ - data: XOR - /** - * Filter which MemoryEchoInsights to update - */ - where?: MemoryEchoInsightWhereInput - } - - /** - * MemoryEchoInsight upsert - */ - export type MemoryEchoInsightUpsertArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - /** - * The filter to search for the MemoryEchoInsight to update in case it exists. - */ - where: MemoryEchoInsightWhereUniqueInput - /** - * In case the MemoryEchoInsight found by the `where` argument doesn't exist, create a new MemoryEchoInsight with this data. - */ - create: XOR - /** - * In case the MemoryEchoInsight was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * MemoryEchoInsight delete - */ - export type MemoryEchoInsightDeleteArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - /** - * Filter which MemoryEchoInsight to delete. - */ - where: MemoryEchoInsightWhereUniqueInput - } - - /** - * MemoryEchoInsight deleteMany - */ - export type MemoryEchoInsightDeleteManyArgs = { - /** - * Filter which MemoryEchoInsights to delete - */ - where?: MemoryEchoInsightWhereInput - } - - /** - * MemoryEchoInsight.user - */ - export type MemoryEchoInsight$userArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null - where?: UserWhereInput - } - - /** - * MemoryEchoInsight without action - */ - export type MemoryEchoInsightDefaultArgs = { - /** - * Select specific fields to fetch from the MemoryEchoInsight - */ - select?: MemoryEchoInsightSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: MemoryEchoInsightInclude | null - } - - - /** - * Model UserAISettings - */ - - export type AggregateUserAISettings = { - _count: UserAISettingsCountAggregateOutputType | null - _min: UserAISettingsMinAggregateOutputType | null - _max: UserAISettingsMaxAggregateOutputType | null - } - - export type UserAISettingsMinAggregateOutputType = { - userId: string | null - titleSuggestions: boolean | null - semanticSearch: boolean | null - paragraphRefactor: boolean | null - memoryEcho: boolean | null - memoryEchoFrequency: string | null - aiProvider: string | null - preferredLanguage: string | null - fontSize: string | null - demoMode: boolean | null - } - - export type UserAISettingsMaxAggregateOutputType = { - userId: string | null - titleSuggestions: boolean | null - semanticSearch: boolean | null - paragraphRefactor: boolean | null - memoryEcho: boolean | null - memoryEchoFrequency: string | null - aiProvider: string | null - preferredLanguage: string | null - fontSize: string | null - demoMode: boolean | null - } - - export type UserAISettingsCountAggregateOutputType = { - userId: number - titleSuggestions: number - semanticSearch: number - paragraphRefactor: number - memoryEcho: number - memoryEchoFrequency: number - aiProvider: number - preferredLanguage: number - fontSize: number - demoMode: number - _all: number - } - - - export type UserAISettingsMinAggregateInputType = { - userId?: true - titleSuggestions?: true - semanticSearch?: true - paragraphRefactor?: true - memoryEcho?: true - memoryEchoFrequency?: true - aiProvider?: true - preferredLanguage?: true - fontSize?: true - demoMode?: true - } - - export type UserAISettingsMaxAggregateInputType = { - userId?: true - titleSuggestions?: true - semanticSearch?: true - paragraphRefactor?: true - memoryEcho?: true - memoryEchoFrequency?: true - aiProvider?: true - preferredLanguage?: true - fontSize?: true - demoMode?: true - } - - export type UserAISettingsCountAggregateInputType = { - userId?: true - titleSuggestions?: true - semanticSearch?: true - paragraphRefactor?: true - memoryEcho?: true - memoryEchoFrequency?: true - aiProvider?: true - preferredLanguage?: true - fontSize?: true - demoMode?: true - _all?: true - } - - export type UserAISettingsAggregateArgs = { - /** - * Filter which UserAISettings to aggregate. - */ - where?: UserAISettingsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of UserAISettings to fetch. - */ - orderBy?: UserAISettingsOrderByWithRelationInput | UserAISettingsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: UserAISettingsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` UserAISettings from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` UserAISettings. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned UserAISettings - **/ - _count?: true | UserAISettingsCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: UserAISettingsMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: UserAISettingsMaxAggregateInputType - } - - export type GetUserAISettingsAggregateType = { - [P in keyof T & keyof AggregateUserAISettings]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type UserAISettingsGroupByArgs = { - where?: UserAISettingsWhereInput - orderBy?: UserAISettingsOrderByWithAggregationInput | UserAISettingsOrderByWithAggregationInput[] - by: UserAISettingsScalarFieldEnum[] | UserAISettingsScalarFieldEnum - having?: UserAISettingsScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: UserAISettingsCountAggregateInputType | true - _min?: UserAISettingsMinAggregateInputType - _max?: UserAISettingsMaxAggregateInputType - } - - export type UserAISettingsGroupByOutputType = { - userId: string - titleSuggestions: boolean - semanticSearch: boolean - paragraphRefactor: boolean - memoryEcho: boolean - memoryEchoFrequency: string - aiProvider: string - preferredLanguage: string - fontSize: string - demoMode: boolean - _count: UserAISettingsCountAggregateOutputType | null - _min: UserAISettingsMinAggregateOutputType | null - _max: UserAISettingsMaxAggregateOutputType | null - } - - type GetUserAISettingsGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & - { - [P in ((keyof T) & (keyof UserAISettingsGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type UserAISettingsSelect = $Extensions.GetSelect<{ - userId?: boolean - titleSuggestions?: boolean - semanticSearch?: boolean - paragraphRefactor?: boolean - memoryEcho?: boolean - memoryEchoFrequency?: boolean - aiProvider?: boolean - preferredLanguage?: boolean - fontSize?: boolean - demoMode?: boolean - user?: boolean | UserDefaultArgs - }, ExtArgs["result"]["userAISettings"]> - - export type UserAISettingsSelectCreateManyAndReturn = $Extensions.GetSelect<{ - userId?: boolean - titleSuggestions?: boolean - semanticSearch?: boolean - paragraphRefactor?: boolean - memoryEcho?: boolean - memoryEchoFrequency?: boolean - aiProvider?: boolean - preferredLanguage?: boolean - fontSize?: boolean - demoMode?: boolean - user?: boolean | UserDefaultArgs - }, ExtArgs["result"]["userAISettings"]> - - export type UserAISettingsSelectScalar = { - userId?: boolean - titleSuggestions?: boolean - semanticSearch?: boolean - paragraphRefactor?: boolean - memoryEcho?: boolean - memoryEchoFrequency?: boolean - aiProvider?: boolean - preferredLanguage?: boolean - fontSize?: boolean - demoMode?: boolean - } - - export type UserAISettingsInclude = { - user?: boolean | UserDefaultArgs - } - export type UserAISettingsIncludeCreateManyAndReturn = { - user?: boolean | UserDefaultArgs - } - - export type $UserAISettingsPayload = { - name: "UserAISettings" - objects: { - user: Prisma.$UserPayload - } - scalars: $Extensions.GetPayloadResult<{ - userId: string - titleSuggestions: boolean - semanticSearch: boolean - paragraphRefactor: boolean - memoryEcho: boolean - memoryEchoFrequency: string - aiProvider: string - preferredLanguage: string - fontSize: string - demoMode: boolean - }, ExtArgs["result"]["userAISettings"]> - composites: {} - } - - type UserAISettingsGetPayload = $Result.GetResult - - type UserAISettingsCountArgs = - Omit & { - select?: UserAISettingsCountAggregateInputType | true - } - - export interface UserAISettingsDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['UserAISettings'], meta: { name: 'UserAISettings' } } - /** - * Find zero or one UserAISettings that matches the filter. - * @param {UserAISettingsFindUniqueArgs} args - Arguments to find a UserAISettings - * @example - * // Get one UserAISettings - * const userAISettings = await prisma.userAISettings.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: SelectSubset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> - - /** - * Find one UserAISettings that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {UserAISettingsFindUniqueOrThrowArgs} args - Arguments to find a UserAISettings - * @example - * // Get one UserAISettings - * const userAISettings = await prisma.userAISettings.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: SelectSubset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> - - /** - * Find the first UserAISettings that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAISettingsFindFirstArgs} args - Arguments to find a UserAISettings - * @example - * // Get one UserAISettings - * const userAISettings = await prisma.userAISettings.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: SelectSubset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> - - /** - * Find the first UserAISettings that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAISettingsFindFirstOrThrowArgs} args - Arguments to find a UserAISettings - * @example - * // Get one UserAISettings - * const userAISettings = await prisma.userAISettings.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: SelectSubset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> - - /** - * Find zero or more UserAISettings that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAISettingsFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all UserAISettings - * const userAISettings = await prisma.userAISettings.findMany() - * - * // Get first 10 UserAISettings - * const userAISettings = await prisma.userAISettings.findMany({ take: 10 }) - * - * // Only select the `userId` - * const userAISettingsWithUserIdOnly = await prisma.userAISettings.findMany({ select: { userId: true } }) - * - */ - findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> - - /** - * Create a UserAISettings. - * @param {UserAISettingsCreateArgs} args - Arguments to create a UserAISettings. - * @example - * // Create one UserAISettings - * const UserAISettings = await prisma.userAISettings.create({ - * data: { - * // ... data to create a UserAISettings - * } - * }) - * - */ - create(args: SelectSubset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "create">, never, ExtArgs> - - /** - * Create many UserAISettings. - * @param {UserAISettingsCreateManyArgs} args - Arguments to create many UserAISettings. - * @example - * // Create many UserAISettings - * const userAISettings = await prisma.userAISettings.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Create many UserAISettings and returns the data saved in the database. - * @param {UserAISettingsCreateManyAndReturnArgs} args - Arguments to create many UserAISettings. - * @example - * // Create many UserAISettings - * const userAISettings = await prisma.userAISettings.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many UserAISettings and only return the `userId` - * const userAISettingsWithUserIdOnly = await prisma.userAISettings.createManyAndReturn({ - * select: { userId: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> - - /** - * Delete a UserAISettings. - * @param {UserAISettingsDeleteArgs} args - Arguments to delete one UserAISettings. - * @example - * // Delete one UserAISettings - * const UserAISettings = await prisma.userAISettings.delete({ - * where: { - * // ... filter to delete one UserAISettings - * } - * }) - * - */ - delete(args: SelectSubset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "delete">, never, ExtArgs> - - /** - * Update one UserAISettings. - * @param {UserAISettingsUpdateArgs} args - Arguments to update one UserAISettings. - * @example - * // Update one UserAISettings - * const userAISettings = await prisma.userAISettings.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: SelectSubset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "update">, never, ExtArgs> - - /** - * Delete zero or more UserAISettings. - * @param {UserAISettingsDeleteManyArgs} args - Arguments to filter UserAISettings to delete. - * @example - * // Delete a few UserAISettings - * const { count } = await prisma.userAISettings.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more UserAISettings. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAISettingsUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many UserAISettings - * const userAISettings = await prisma.userAISettings.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one UserAISettings. - * @param {UserAISettingsUpsertArgs} args - Arguments to update or create a UserAISettings. - * @example - * // Update or create a UserAISettings - * const userAISettings = await prisma.userAISettings.upsert({ - * create: { - * // ... data to create a UserAISettings - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the UserAISettings we want to update - * } - * }) - */ - upsert(args: SelectSubset>): Prisma__UserAISettingsClient<$Result.GetResult, T, "upsert">, never, ExtArgs> - - - /** - * Count the number of UserAISettings. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAISettingsCountArgs} args - Arguments to filter UserAISettings to count. - * @example - * // Count the number of UserAISettings - * const count = await prisma.userAISettings.count({ - * where: { - * // ... the filter for the UserAISettings we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a UserAISettings. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAISettingsAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by UserAISettings. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAISettingsGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends UserAISettingsGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: UserAISettingsGroupByArgs['orderBy'] } - : { orderBy?: UserAISettingsGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserAISettingsGroupByPayload : Prisma.PrismaPromise - /** - * Fields of the UserAISettings model - */ - readonly fields: UserAISettingsFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for UserAISettings. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__UserAISettingsClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise - } - - - - - /** - * Fields of the UserAISettings model - */ - interface UserAISettingsFieldRefs { - readonly userId: FieldRef<"UserAISettings", 'String'> - readonly titleSuggestions: FieldRef<"UserAISettings", 'Boolean'> - readonly semanticSearch: FieldRef<"UserAISettings", 'Boolean'> - readonly paragraphRefactor: FieldRef<"UserAISettings", 'Boolean'> - readonly memoryEcho: FieldRef<"UserAISettings", 'Boolean'> - readonly memoryEchoFrequency: FieldRef<"UserAISettings", 'String'> - readonly aiProvider: FieldRef<"UserAISettings", 'String'> - readonly preferredLanguage: FieldRef<"UserAISettings", 'String'> - readonly fontSize: FieldRef<"UserAISettings", 'String'> - readonly demoMode: FieldRef<"UserAISettings", 'Boolean'> - } - - - // Custom InputTypes - /** - * UserAISettings findUnique - */ - export type UserAISettingsFindUniqueArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - /** - * Filter, which UserAISettings to fetch. - */ - where: UserAISettingsWhereUniqueInput - } - - /** - * UserAISettings findUniqueOrThrow - */ - export type UserAISettingsFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - /** - * Filter, which UserAISettings to fetch. - */ - where: UserAISettingsWhereUniqueInput - } - - /** - * UserAISettings findFirst - */ - export type UserAISettingsFindFirstArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - /** - * Filter, which UserAISettings to fetch. - */ - where?: UserAISettingsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of UserAISettings to fetch. - */ - orderBy?: UserAISettingsOrderByWithRelationInput | UserAISettingsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for UserAISettings. - */ - cursor?: UserAISettingsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` UserAISettings from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` UserAISettings. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of UserAISettings. - */ - distinct?: UserAISettingsScalarFieldEnum | UserAISettingsScalarFieldEnum[] - } - - /** - * UserAISettings findFirstOrThrow - */ - export type UserAISettingsFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - /** - * Filter, which UserAISettings to fetch. - */ - where?: UserAISettingsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of UserAISettings to fetch. - */ - orderBy?: UserAISettingsOrderByWithRelationInput | UserAISettingsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for UserAISettings. - */ - cursor?: UserAISettingsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` UserAISettings from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` UserAISettings. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of UserAISettings. - */ - distinct?: UserAISettingsScalarFieldEnum | UserAISettingsScalarFieldEnum[] - } - - /** - * UserAISettings findMany - */ - export type UserAISettingsFindManyArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - /** - * Filter, which UserAISettings to fetch. - */ - where?: UserAISettingsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of UserAISettings to fetch. - */ - orderBy?: UserAISettingsOrderByWithRelationInput | UserAISettingsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing UserAISettings. - */ - cursor?: UserAISettingsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` UserAISettings from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` UserAISettings. - */ - skip?: number - distinct?: UserAISettingsScalarFieldEnum | UserAISettingsScalarFieldEnum[] - } - - /** - * UserAISettings create - */ - export type UserAISettingsCreateArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - /** - * The data needed to create a UserAISettings. - */ - data: XOR - } - - /** - * UserAISettings createMany - */ - export type UserAISettingsCreateManyArgs = { - /** - * The data used to create many UserAISettings. - */ - data: UserAISettingsCreateManyInput | UserAISettingsCreateManyInput[] - } - - /** - * UserAISettings createManyAndReturn - */ - export type UserAISettingsCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelectCreateManyAndReturn | null - /** - * The data used to create many UserAISettings. - */ - data: UserAISettingsCreateManyInput | UserAISettingsCreateManyInput[] - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsIncludeCreateManyAndReturn | null - } - - /** - * UserAISettings update - */ - export type UserAISettingsUpdateArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - /** - * The data needed to update a UserAISettings. - */ - data: XOR - /** - * Choose, which UserAISettings to update. - */ - where: UserAISettingsWhereUniqueInput - } - - /** - * UserAISettings updateMany - */ - export type UserAISettingsUpdateManyArgs = { - /** - * The data used to update UserAISettings. - */ - data: XOR - /** - * Filter which UserAISettings to update - */ - where?: UserAISettingsWhereInput - } - - /** - * UserAISettings upsert - */ - export type UserAISettingsUpsertArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - /** - * The filter to search for the UserAISettings to update in case it exists. - */ - where: UserAISettingsWhereUniqueInput - /** - * In case the UserAISettings found by the `where` argument doesn't exist, create a new UserAISettings with this data. - */ - create: XOR - /** - * In case the UserAISettings was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - /** - * UserAISettings delete - */ - export type UserAISettingsDeleteArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - /** - * Filter which UserAISettings to delete. - */ - where: UserAISettingsWhereUniqueInput - } - - /** - * UserAISettings deleteMany - */ - export type UserAISettingsDeleteManyArgs = { - /** - * Filter which UserAISettings to delete - */ - where?: UserAISettingsWhereInput - } - - /** - * UserAISettings without action - */ - export type UserAISettingsDefaultArgs = { - /** - * Select specific fields to fetch from the UserAISettings - */ - select?: UserAISettingsSelect | null - /** - * Choose, which related nodes to fetch as well - */ - include?: UserAISettingsInclude | null - } - - - /** - * Enums - */ - - export const TransactionIsolationLevel: { - Serializable: 'Serializable' - }; - - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - - - export const UserScalarFieldEnum: { - id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] - - - export const AccountScalarFieldEnum: { - userId: 'userId', - type: 'type', - provider: 'provider', - providerAccountId: 'providerAccountId', - refresh_token: 'refresh_token', - access_token: 'access_token', - expires_at: 'expires_at', - token_type: 'token_type', - scope: 'scope', - id_token: 'id_token', - session_state: 'session_state', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type AccountScalarFieldEnum = (typeof AccountScalarFieldEnum)[keyof typeof AccountScalarFieldEnum] - - - export const SessionScalarFieldEnum: { - sessionToken: 'sessionToken', - userId: 'userId', - expires: 'expires', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type SessionScalarFieldEnum = (typeof SessionScalarFieldEnum)[keyof typeof SessionScalarFieldEnum] - - - export const VerificationTokenScalarFieldEnum: { - identifier: 'identifier', - token: 'token', - expires: 'expires' - }; - - export type VerificationTokenScalarFieldEnum = (typeof VerificationTokenScalarFieldEnum)[keyof typeof VerificationTokenScalarFieldEnum] - - - export const NotebookScalarFieldEnum: { - id: 'id', - name: 'name', - icon: 'icon', - color: 'color', - order: 'order', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type NotebookScalarFieldEnum = (typeof NotebookScalarFieldEnum)[keyof typeof NotebookScalarFieldEnum] - - - export const LabelScalarFieldEnum: { - id: 'id', - name: 'name', - color: 'color', - notebookId: 'notebookId', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type LabelScalarFieldEnum = (typeof LabelScalarFieldEnum)[keyof typeof LabelScalarFieldEnum] - - - export const NoteScalarFieldEnum: { - id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' - }; - - export type NoteScalarFieldEnum = (typeof NoteScalarFieldEnum)[keyof typeof NoteScalarFieldEnum] - - - export const NoteShareScalarFieldEnum: { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' - }; - - export type NoteShareScalarFieldEnum = (typeof NoteShareScalarFieldEnum)[keyof typeof NoteShareScalarFieldEnum] - - - export const SystemConfigScalarFieldEnum: { - key: 'key', - value: 'value' - }; - - export type SystemConfigScalarFieldEnum = (typeof SystemConfigScalarFieldEnum)[keyof typeof SystemConfigScalarFieldEnum] - - - export const AiFeedbackScalarFieldEnum: { - id: 'id', - noteId: 'noteId', - userId: 'userId', - feedbackType: 'feedbackType', - feature: 'feature', - originalContent: 'originalContent', - correctedContent: 'correctedContent', - metadata: 'metadata', - createdAt: 'createdAt' - }; - - export type AiFeedbackScalarFieldEnum = (typeof AiFeedbackScalarFieldEnum)[keyof typeof AiFeedbackScalarFieldEnum] - - - export const MemoryEchoInsightScalarFieldEnum: { - id: 'id', - userId: 'userId', - note1Id: 'note1Id', - note2Id: 'note2Id', - similarityScore: 'similarityScore', - insight: 'insight', - insightDate: 'insightDate', - viewed: 'viewed', - feedback: 'feedback', - dismissed: 'dismissed' - }; - - export type MemoryEchoInsightScalarFieldEnum = (typeof MemoryEchoInsightScalarFieldEnum)[keyof typeof MemoryEchoInsightScalarFieldEnum] - - - export const UserAISettingsScalarFieldEnum: { - userId: 'userId', - titleSuggestions: 'titleSuggestions', - semanticSearch: 'semanticSearch', - paragraphRefactor: 'paragraphRefactor', - memoryEcho: 'memoryEcho', - memoryEchoFrequency: 'memoryEchoFrequency', - aiProvider: 'aiProvider', - preferredLanguage: 'preferredLanguage', - fontSize: 'fontSize', - demoMode: 'demoMode' - }; - - export type UserAISettingsScalarFieldEnum = (typeof UserAISettingsScalarFieldEnum)[keyof typeof UserAISettingsScalarFieldEnum] - - - export const SortOrder: { - asc: 'asc', - desc: 'desc' - }; - - export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - - - export const NullsOrder: { - first: 'first', - last: 'last' - }; - - export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] - - - /** - * Field references - */ - - - /** - * Reference to a field of type 'String' - */ - export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> - - - - /** - * Reference to a field of type 'DateTime' - */ - export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> - - - - /** - * Reference to a field of type 'Int' - */ - export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> - - - - /** - * Reference to a field of type 'Boolean' - */ - export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> - - - - /** - * Reference to a field of type 'Float' - */ - export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> - - /** - * Deep Input Types - */ - - - export type UserWhereInput = { - AND?: UserWhereInput | UserWhereInput[] - OR?: UserWhereInput[] - NOT?: UserWhereInput | UserWhereInput[] - id?: StringFilter<"User"> | string - name?: StringNullableFilter<"User"> | string | null - email?: StringFilter<"User"> | string - emailVerified?: DateTimeNullableFilter<"User"> | Date | string | null - password?: StringNullableFilter<"User"> | string | null - role?: StringFilter<"User"> | string - image?: StringNullableFilter<"User"> | string | null - theme?: StringFilter<"User"> | string - resetToken?: StringNullableFilter<"User"> | string | null - resetTokenExpiry?: DateTimeNullableFilter<"User"> | Date | string | null - createdAt?: DateTimeFilter<"User"> | Date | string - updatedAt?: DateTimeFilter<"User"> | Date | string - accounts?: AccountListRelationFilter - sessions?: SessionListRelationFilter - notes?: NoteListRelationFilter - labels?: LabelListRelationFilter - notebooks?: NotebookListRelationFilter - receivedShares?: NoteShareListRelationFilter - sentShares?: NoteShareListRelationFilter - aiFeedback?: AiFeedbackListRelationFilter - aiSettings?: XOR | null - memoryEchoInsights?: MemoryEchoInsightListRelationFilter - } - - export type UserOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrderInput | SortOrder - email?: SortOrder - emailVerified?: SortOrderInput | SortOrder - password?: SortOrderInput | SortOrder - role?: SortOrder - image?: SortOrderInput | SortOrder - theme?: SortOrder - resetToken?: SortOrderInput | SortOrder - resetTokenExpiry?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - accounts?: AccountOrderByRelationAggregateInput - sessions?: SessionOrderByRelationAggregateInput - notes?: NoteOrderByRelationAggregateInput - labels?: LabelOrderByRelationAggregateInput - notebooks?: NotebookOrderByRelationAggregateInput - receivedShares?: NoteShareOrderByRelationAggregateInput - sentShares?: NoteShareOrderByRelationAggregateInput - aiFeedback?: AiFeedbackOrderByRelationAggregateInput - aiSettings?: UserAISettingsOrderByWithRelationInput - memoryEchoInsights?: MemoryEchoInsightOrderByRelationAggregateInput - } - - export type UserWhereUniqueInput = Prisma.AtLeast<{ - id?: string - email?: string - resetToken?: string - AND?: UserWhereInput | UserWhereInput[] - OR?: UserWhereInput[] - NOT?: UserWhereInput | UserWhereInput[] - name?: StringNullableFilter<"User"> | string | null - emailVerified?: DateTimeNullableFilter<"User"> | Date | string | null - password?: StringNullableFilter<"User"> | string | null - role?: StringFilter<"User"> | string - image?: StringNullableFilter<"User"> | string | null - theme?: StringFilter<"User"> | string - resetTokenExpiry?: DateTimeNullableFilter<"User"> | Date | string | null - createdAt?: DateTimeFilter<"User"> | Date | string - updatedAt?: DateTimeFilter<"User"> | Date | string - accounts?: AccountListRelationFilter - sessions?: SessionListRelationFilter - notes?: NoteListRelationFilter - labels?: LabelListRelationFilter - notebooks?: NotebookListRelationFilter - receivedShares?: NoteShareListRelationFilter - sentShares?: NoteShareListRelationFilter - aiFeedback?: AiFeedbackListRelationFilter - aiSettings?: XOR | null - memoryEchoInsights?: MemoryEchoInsightListRelationFilter - }, "id" | "email" | "resetToken"> - - export type UserOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrderInput | SortOrder - email?: SortOrder - emailVerified?: SortOrderInput | SortOrder - password?: SortOrderInput | SortOrder - role?: SortOrder - image?: SortOrderInput | SortOrder - theme?: SortOrder - resetToken?: SortOrderInput | SortOrder - resetTokenExpiry?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: UserCountOrderByAggregateInput - _max?: UserMaxOrderByAggregateInput - _min?: UserMinOrderByAggregateInput - } - - export type UserScalarWhereWithAggregatesInput = { - AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] - OR?: UserScalarWhereWithAggregatesInput[] - NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"User"> | string - name?: StringNullableWithAggregatesFilter<"User"> | string | null - email?: StringWithAggregatesFilter<"User"> | string - emailVerified?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null - password?: StringNullableWithAggregatesFilter<"User"> | string | null - role?: StringWithAggregatesFilter<"User"> | string - image?: StringNullableWithAggregatesFilter<"User"> | string | null - theme?: StringWithAggregatesFilter<"User"> | string - resetToken?: StringNullableWithAggregatesFilter<"User"> | string | null - resetTokenExpiry?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null - createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string - } - - export type AccountWhereInput = { - AND?: AccountWhereInput | AccountWhereInput[] - OR?: AccountWhereInput[] - NOT?: AccountWhereInput | AccountWhereInput[] - userId?: StringFilter<"Account"> | string - type?: StringFilter<"Account"> | string - provider?: StringFilter<"Account"> | string - providerAccountId?: StringFilter<"Account"> | string - refresh_token?: StringNullableFilter<"Account"> | string | null - access_token?: StringNullableFilter<"Account"> | string | null - expires_at?: IntNullableFilter<"Account"> | number | null - token_type?: StringNullableFilter<"Account"> | string | null - scope?: StringNullableFilter<"Account"> | string | null - id_token?: StringNullableFilter<"Account"> | string | null - session_state?: StringNullableFilter<"Account"> | string | null - createdAt?: DateTimeFilter<"Account"> | Date | string - updatedAt?: DateTimeFilter<"Account"> | Date | string - user?: XOR - } - - export type AccountOrderByWithRelationInput = { - userId?: SortOrder - type?: SortOrder - provider?: SortOrder - providerAccountId?: SortOrder - refresh_token?: SortOrderInput | SortOrder - access_token?: SortOrderInput | SortOrder - expires_at?: SortOrderInput | SortOrder - token_type?: SortOrderInput | SortOrder - scope?: SortOrderInput | SortOrder - id_token?: SortOrderInput | SortOrder - session_state?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - user?: UserOrderByWithRelationInput - } - - export type AccountWhereUniqueInput = Prisma.AtLeast<{ - provider_providerAccountId?: AccountProviderProviderAccountIdCompoundUniqueInput - AND?: AccountWhereInput | AccountWhereInput[] - OR?: AccountWhereInput[] - NOT?: AccountWhereInput | AccountWhereInput[] - userId?: StringFilter<"Account"> | string - type?: StringFilter<"Account"> | string - provider?: StringFilter<"Account"> | string - providerAccountId?: StringFilter<"Account"> | string - refresh_token?: StringNullableFilter<"Account"> | string | null - access_token?: StringNullableFilter<"Account"> | string | null - expires_at?: IntNullableFilter<"Account"> | number | null - token_type?: StringNullableFilter<"Account"> | string | null - scope?: StringNullableFilter<"Account"> | string | null - id_token?: StringNullableFilter<"Account"> | string | null - session_state?: StringNullableFilter<"Account"> | string | null - createdAt?: DateTimeFilter<"Account"> | Date | string - updatedAt?: DateTimeFilter<"Account"> | Date | string - user?: XOR - }, "provider_providerAccountId"> - - export type AccountOrderByWithAggregationInput = { - userId?: SortOrder - type?: SortOrder - provider?: SortOrder - providerAccountId?: SortOrder - refresh_token?: SortOrderInput | SortOrder - access_token?: SortOrderInput | SortOrder - expires_at?: SortOrderInput | SortOrder - token_type?: SortOrderInput | SortOrder - scope?: SortOrderInput | SortOrder - id_token?: SortOrderInput | SortOrder - session_state?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: AccountCountOrderByAggregateInput - _avg?: AccountAvgOrderByAggregateInput - _max?: AccountMaxOrderByAggregateInput - _min?: AccountMinOrderByAggregateInput - _sum?: AccountSumOrderByAggregateInput - } - - export type AccountScalarWhereWithAggregatesInput = { - AND?: AccountScalarWhereWithAggregatesInput | AccountScalarWhereWithAggregatesInput[] - OR?: AccountScalarWhereWithAggregatesInput[] - NOT?: AccountScalarWhereWithAggregatesInput | AccountScalarWhereWithAggregatesInput[] - userId?: StringWithAggregatesFilter<"Account"> | string - type?: StringWithAggregatesFilter<"Account"> | string - provider?: StringWithAggregatesFilter<"Account"> | string - providerAccountId?: StringWithAggregatesFilter<"Account"> | string - refresh_token?: StringNullableWithAggregatesFilter<"Account"> | string | null - access_token?: StringNullableWithAggregatesFilter<"Account"> | string | null - expires_at?: IntNullableWithAggregatesFilter<"Account"> | number | null - token_type?: StringNullableWithAggregatesFilter<"Account"> | string | null - scope?: StringNullableWithAggregatesFilter<"Account"> | string | null - id_token?: StringNullableWithAggregatesFilter<"Account"> | string | null - session_state?: StringNullableWithAggregatesFilter<"Account"> | string | null - createdAt?: DateTimeWithAggregatesFilter<"Account"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Account"> | Date | string - } - - export type SessionWhereInput = { - AND?: SessionWhereInput | SessionWhereInput[] - OR?: SessionWhereInput[] - NOT?: SessionWhereInput | SessionWhereInput[] - sessionToken?: StringFilter<"Session"> | string - userId?: StringFilter<"Session"> | string - expires?: DateTimeFilter<"Session"> | Date | string - createdAt?: DateTimeFilter<"Session"> | Date | string - updatedAt?: DateTimeFilter<"Session"> | Date | string - user?: XOR - } - - export type SessionOrderByWithRelationInput = { - sessionToken?: SortOrder - userId?: SortOrder - expires?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - user?: UserOrderByWithRelationInput - } - - export type SessionWhereUniqueInput = Prisma.AtLeast<{ - sessionToken?: string - AND?: SessionWhereInput | SessionWhereInput[] - OR?: SessionWhereInput[] - NOT?: SessionWhereInput | SessionWhereInput[] - userId?: StringFilter<"Session"> | string - expires?: DateTimeFilter<"Session"> | Date | string - createdAt?: DateTimeFilter<"Session"> | Date | string - updatedAt?: DateTimeFilter<"Session"> | Date | string - user?: XOR - }, "sessionToken"> - - export type SessionOrderByWithAggregationInput = { - sessionToken?: SortOrder - userId?: SortOrder - expires?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: SessionCountOrderByAggregateInput - _max?: SessionMaxOrderByAggregateInput - _min?: SessionMinOrderByAggregateInput - } - - export type SessionScalarWhereWithAggregatesInput = { - AND?: SessionScalarWhereWithAggregatesInput | SessionScalarWhereWithAggregatesInput[] - OR?: SessionScalarWhereWithAggregatesInput[] - NOT?: SessionScalarWhereWithAggregatesInput | SessionScalarWhereWithAggregatesInput[] - sessionToken?: StringWithAggregatesFilter<"Session"> | string - userId?: StringWithAggregatesFilter<"Session"> | string - expires?: DateTimeWithAggregatesFilter<"Session"> | Date | string - createdAt?: DateTimeWithAggregatesFilter<"Session"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Session"> | Date | string - } - - export type VerificationTokenWhereInput = { - AND?: VerificationTokenWhereInput | VerificationTokenWhereInput[] - OR?: VerificationTokenWhereInput[] - NOT?: VerificationTokenWhereInput | VerificationTokenWhereInput[] - identifier?: StringFilter<"VerificationToken"> | string - token?: StringFilter<"VerificationToken"> | string - expires?: DateTimeFilter<"VerificationToken"> | Date | string - } - - export type VerificationTokenOrderByWithRelationInput = { - identifier?: SortOrder - token?: SortOrder - expires?: SortOrder - } - - export type VerificationTokenWhereUniqueInput = Prisma.AtLeast<{ - identifier_token?: VerificationTokenIdentifierTokenCompoundUniqueInput - AND?: VerificationTokenWhereInput | VerificationTokenWhereInput[] - OR?: VerificationTokenWhereInput[] - NOT?: VerificationTokenWhereInput | VerificationTokenWhereInput[] - identifier?: StringFilter<"VerificationToken"> | string - token?: StringFilter<"VerificationToken"> | string - expires?: DateTimeFilter<"VerificationToken"> | Date | string - }, "identifier_token"> - - export type VerificationTokenOrderByWithAggregationInput = { - identifier?: SortOrder - token?: SortOrder - expires?: SortOrder - _count?: VerificationTokenCountOrderByAggregateInput - _max?: VerificationTokenMaxOrderByAggregateInput - _min?: VerificationTokenMinOrderByAggregateInput - } - - export type VerificationTokenScalarWhereWithAggregatesInput = { - AND?: VerificationTokenScalarWhereWithAggregatesInput | VerificationTokenScalarWhereWithAggregatesInput[] - OR?: VerificationTokenScalarWhereWithAggregatesInput[] - NOT?: VerificationTokenScalarWhereWithAggregatesInput | VerificationTokenScalarWhereWithAggregatesInput[] - identifier?: StringWithAggregatesFilter<"VerificationToken"> | string - token?: StringWithAggregatesFilter<"VerificationToken"> | string - expires?: DateTimeWithAggregatesFilter<"VerificationToken"> | Date | string - } - - export type NotebookWhereInput = { - AND?: NotebookWhereInput | NotebookWhereInput[] - OR?: NotebookWhereInput[] - NOT?: NotebookWhereInput | NotebookWhereInput[] - id?: StringFilter<"Notebook"> | string - name?: StringFilter<"Notebook"> | string - icon?: StringNullableFilter<"Notebook"> | string | null - color?: StringNullableFilter<"Notebook"> | string | null - order?: IntFilter<"Notebook"> | number - userId?: StringFilter<"Notebook"> | string - createdAt?: DateTimeFilter<"Notebook"> | Date | string - updatedAt?: DateTimeFilter<"Notebook"> | Date | string - user?: XOR - notes?: NoteListRelationFilter - labels?: LabelListRelationFilter - } - - export type NotebookOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - icon?: SortOrderInput | SortOrder - color?: SortOrderInput | SortOrder - order?: SortOrder - userId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - user?: UserOrderByWithRelationInput - notes?: NoteOrderByRelationAggregateInput - labels?: LabelOrderByRelationAggregateInput - } - - export type NotebookWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: NotebookWhereInput | NotebookWhereInput[] - OR?: NotebookWhereInput[] - NOT?: NotebookWhereInput | NotebookWhereInput[] - name?: StringFilter<"Notebook"> | string - icon?: StringNullableFilter<"Notebook"> | string | null - color?: StringNullableFilter<"Notebook"> | string | null - order?: IntFilter<"Notebook"> | number - userId?: StringFilter<"Notebook"> | string - createdAt?: DateTimeFilter<"Notebook"> | Date | string - updatedAt?: DateTimeFilter<"Notebook"> | Date | string - user?: XOR - notes?: NoteListRelationFilter - labels?: LabelListRelationFilter - }, "id"> - - export type NotebookOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - icon?: SortOrderInput | SortOrder - color?: SortOrderInput | SortOrder - order?: SortOrder - userId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: NotebookCountOrderByAggregateInput - _avg?: NotebookAvgOrderByAggregateInput - _max?: NotebookMaxOrderByAggregateInput - _min?: NotebookMinOrderByAggregateInput - _sum?: NotebookSumOrderByAggregateInput - } - - export type NotebookScalarWhereWithAggregatesInput = { - AND?: NotebookScalarWhereWithAggregatesInput | NotebookScalarWhereWithAggregatesInput[] - OR?: NotebookScalarWhereWithAggregatesInput[] - NOT?: NotebookScalarWhereWithAggregatesInput | NotebookScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"Notebook"> | string - name?: StringWithAggregatesFilter<"Notebook"> | string - icon?: StringNullableWithAggregatesFilter<"Notebook"> | string | null - color?: StringNullableWithAggregatesFilter<"Notebook"> | string | null - order?: IntWithAggregatesFilter<"Notebook"> | number - userId?: StringWithAggregatesFilter<"Notebook"> | string - createdAt?: DateTimeWithAggregatesFilter<"Notebook"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Notebook"> | Date | string - } - - export type LabelWhereInput = { - AND?: LabelWhereInput | LabelWhereInput[] - OR?: LabelWhereInput[] - NOT?: LabelWhereInput | LabelWhereInput[] - id?: StringFilter<"Label"> | string - name?: StringFilter<"Label"> | string - color?: StringFilter<"Label"> | string - notebookId?: StringNullableFilter<"Label"> | string | null - userId?: StringNullableFilter<"Label"> | string | null - createdAt?: DateTimeFilter<"Label"> | Date | string - updatedAt?: DateTimeFilter<"Label"> | Date | string - notebook?: XOR | null - notes?: NoteListRelationFilter - user?: XOR | null - } - - export type LabelOrderByWithRelationInput = { - id?: SortOrder - name?: SortOrder - color?: SortOrder - notebookId?: SortOrderInput | SortOrder - userId?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - notebook?: NotebookOrderByWithRelationInput - notes?: NoteOrderByRelationAggregateInput - user?: UserOrderByWithRelationInput - } - - export type LabelWhereUniqueInput = Prisma.AtLeast<{ - id?: string - notebookId_name?: LabelNotebookIdNameCompoundUniqueInput - AND?: LabelWhereInput | LabelWhereInput[] - OR?: LabelWhereInput[] - NOT?: LabelWhereInput | LabelWhereInput[] - name?: StringFilter<"Label"> | string - color?: StringFilter<"Label"> | string - notebookId?: StringNullableFilter<"Label"> | string | null - userId?: StringNullableFilter<"Label"> | string | null - createdAt?: DateTimeFilter<"Label"> | Date | string - updatedAt?: DateTimeFilter<"Label"> | Date | string - notebook?: XOR | null - notes?: NoteListRelationFilter - user?: XOR | null - }, "id" | "notebookId_name"> - - export type LabelOrderByWithAggregationInput = { - id?: SortOrder - name?: SortOrder - color?: SortOrder - notebookId?: SortOrderInput | SortOrder - userId?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: LabelCountOrderByAggregateInput - _max?: LabelMaxOrderByAggregateInput - _min?: LabelMinOrderByAggregateInput - } - - export type LabelScalarWhereWithAggregatesInput = { - AND?: LabelScalarWhereWithAggregatesInput | LabelScalarWhereWithAggregatesInput[] - OR?: LabelScalarWhereWithAggregatesInput[] - NOT?: LabelScalarWhereWithAggregatesInput | LabelScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"Label"> | string - name?: StringWithAggregatesFilter<"Label"> | string - color?: StringWithAggregatesFilter<"Label"> | string - notebookId?: StringNullableWithAggregatesFilter<"Label"> | string | null - userId?: StringNullableWithAggregatesFilter<"Label"> | string | null - createdAt?: DateTimeWithAggregatesFilter<"Label"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Label"> | Date | string - } - - export type NoteWhereInput = { - AND?: NoteWhereInput | NoteWhereInput[] - OR?: NoteWhereInput[] - NOT?: NoteWhereInput | NoteWhereInput[] - id?: StringFilter<"Note"> | string - title?: StringNullableFilter<"Note"> | string | null - content?: StringFilter<"Note"> | string - color?: StringFilter<"Note"> | string - isPinned?: BoolFilter<"Note"> | boolean - isArchived?: BoolFilter<"Note"> | boolean - type?: StringFilter<"Note"> | string - checkItems?: StringNullableFilter<"Note"> | string | null - labels?: StringNullableFilter<"Note"> | string | null - images?: StringNullableFilter<"Note"> | string | null - links?: StringNullableFilter<"Note"> | string | null - reminder?: DateTimeNullableFilter<"Note"> | Date | string | null - isReminderDone?: BoolFilter<"Note"> | boolean - reminderRecurrence?: StringNullableFilter<"Note"> | string | null - reminderLocation?: StringNullableFilter<"Note"> | string | null - isMarkdown?: BoolFilter<"Note"> | boolean - size?: StringFilter<"Note"> | string - embedding?: StringNullableFilter<"Note"> | string | null - sharedWith?: StringNullableFilter<"Note"> | string | null - userId?: StringNullableFilter<"Note"> | string | null - order?: IntFilter<"Note"> | number - notebookId?: StringNullableFilter<"Note"> | string | null - createdAt?: DateTimeFilter<"Note"> | Date | string - updatedAt?: DateTimeFilter<"Note"> | Date | string - autoGenerated?: BoolNullableFilter<"Note"> | boolean | null - aiProvider?: StringNullableFilter<"Note"> | string | null - aiConfidence?: IntNullableFilter<"Note"> | number | null - language?: StringNullableFilter<"Note"> | string | null - languageConfidence?: FloatNullableFilter<"Note"> | number | null - lastAiAnalysis?: DateTimeNullableFilter<"Note"> | Date | string | null - user?: XOR | null - shares?: NoteShareListRelationFilter - notebook?: XOR | null - labelRelations?: LabelListRelationFilter - aiFeedback?: AiFeedbackListRelationFilter - memoryEchoAsNote1?: MemoryEchoInsightListRelationFilter - memoryEchoAsNote2?: MemoryEchoInsightListRelationFilter - } - - export type NoteOrderByWithRelationInput = { - id?: SortOrder - title?: SortOrderInput | SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrderInput | SortOrder - labels?: SortOrderInput | SortOrder - images?: SortOrderInput | SortOrder - links?: SortOrderInput | SortOrder - reminder?: SortOrderInput | SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrderInput | SortOrder - reminderLocation?: SortOrderInput | SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrderInput | SortOrder - sharedWith?: SortOrderInput | SortOrder - userId?: SortOrderInput | SortOrder - order?: SortOrder - notebookId?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - autoGenerated?: SortOrderInput | SortOrder - aiProvider?: SortOrderInput | SortOrder - aiConfidence?: SortOrderInput | SortOrder - language?: SortOrderInput | SortOrder - languageConfidence?: SortOrderInput | SortOrder - lastAiAnalysis?: SortOrderInput | SortOrder - user?: UserOrderByWithRelationInput - shares?: NoteShareOrderByRelationAggregateInput - notebook?: NotebookOrderByWithRelationInput - labelRelations?: LabelOrderByRelationAggregateInput - aiFeedback?: AiFeedbackOrderByRelationAggregateInput - memoryEchoAsNote1?: MemoryEchoInsightOrderByRelationAggregateInput - memoryEchoAsNote2?: MemoryEchoInsightOrderByRelationAggregateInput - } - - export type NoteWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: NoteWhereInput | NoteWhereInput[] - OR?: NoteWhereInput[] - NOT?: NoteWhereInput | NoteWhereInput[] - title?: StringNullableFilter<"Note"> | string | null - content?: StringFilter<"Note"> | string - color?: StringFilter<"Note"> | string - isPinned?: BoolFilter<"Note"> | boolean - isArchived?: BoolFilter<"Note"> | boolean - type?: StringFilter<"Note"> | string - checkItems?: StringNullableFilter<"Note"> | string | null - labels?: StringNullableFilter<"Note"> | string | null - images?: StringNullableFilter<"Note"> | string | null - links?: StringNullableFilter<"Note"> | string | null - reminder?: DateTimeNullableFilter<"Note"> | Date | string | null - isReminderDone?: BoolFilter<"Note"> | boolean - reminderRecurrence?: StringNullableFilter<"Note"> | string | null - reminderLocation?: StringNullableFilter<"Note"> | string | null - isMarkdown?: BoolFilter<"Note"> | boolean - size?: StringFilter<"Note"> | string - embedding?: StringNullableFilter<"Note"> | string | null - sharedWith?: StringNullableFilter<"Note"> | string | null - userId?: StringNullableFilter<"Note"> | string | null - order?: IntFilter<"Note"> | number - notebookId?: StringNullableFilter<"Note"> | string | null - createdAt?: DateTimeFilter<"Note"> | Date | string - updatedAt?: DateTimeFilter<"Note"> | Date | string - autoGenerated?: BoolNullableFilter<"Note"> | boolean | null - aiProvider?: StringNullableFilter<"Note"> | string | null - aiConfidence?: IntNullableFilter<"Note"> | number | null - language?: StringNullableFilter<"Note"> | string | null - languageConfidence?: FloatNullableFilter<"Note"> | number | null - lastAiAnalysis?: DateTimeNullableFilter<"Note"> | Date | string | null - user?: XOR | null - shares?: NoteShareListRelationFilter - notebook?: XOR | null - labelRelations?: LabelListRelationFilter - aiFeedback?: AiFeedbackListRelationFilter - memoryEchoAsNote1?: MemoryEchoInsightListRelationFilter - memoryEchoAsNote2?: MemoryEchoInsightListRelationFilter - }, "id"> - - export type NoteOrderByWithAggregationInput = { - id?: SortOrder - title?: SortOrderInput | SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrderInput | SortOrder - labels?: SortOrderInput | SortOrder - images?: SortOrderInput | SortOrder - links?: SortOrderInput | SortOrder - reminder?: SortOrderInput | SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrderInput | SortOrder - reminderLocation?: SortOrderInput | SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrderInput | SortOrder - sharedWith?: SortOrderInput | SortOrder - userId?: SortOrderInput | SortOrder - order?: SortOrder - notebookId?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - autoGenerated?: SortOrderInput | SortOrder - aiProvider?: SortOrderInput | SortOrder - aiConfidence?: SortOrderInput | SortOrder - language?: SortOrderInput | SortOrder - languageConfidence?: SortOrderInput | SortOrder - lastAiAnalysis?: SortOrderInput | SortOrder - _count?: NoteCountOrderByAggregateInput - _avg?: NoteAvgOrderByAggregateInput - _max?: NoteMaxOrderByAggregateInput - _min?: NoteMinOrderByAggregateInput - _sum?: NoteSumOrderByAggregateInput - } - - export type NoteScalarWhereWithAggregatesInput = { - AND?: NoteScalarWhereWithAggregatesInput | NoteScalarWhereWithAggregatesInput[] - OR?: NoteScalarWhereWithAggregatesInput[] - NOT?: NoteScalarWhereWithAggregatesInput | NoteScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"Note"> | string - title?: StringNullableWithAggregatesFilter<"Note"> | string | null - content?: StringWithAggregatesFilter<"Note"> | string - color?: StringWithAggregatesFilter<"Note"> | string - isPinned?: BoolWithAggregatesFilter<"Note"> | boolean - isArchived?: BoolWithAggregatesFilter<"Note"> | boolean - type?: StringWithAggregatesFilter<"Note"> | string - checkItems?: StringNullableWithAggregatesFilter<"Note"> | string | null - labels?: StringNullableWithAggregatesFilter<"Note"> | string | null - images?: StringNullableWithAggregatesFilter<"Note"> | string | null - links?: StringNullableWithAggregatesFilter<"Note"> | string | null - reminder?: DateTimeNullableWithAggregatesFilter<"Note"> | Date | string | null - isReminderDone?: BoolWithAggregatesFilter<"Note"> | boolean - reminderRecurrence?: StringNullableWithAggregatesFilter<"Note"> | string | null - reminderLocation?: StringNullableWithAggregatesFilter<"Note"> | string | null - isMarkdown?: BoolWithAggregatesFilter<"Note"> | boolean - size?: StringWithAggregatesFilter<"Note"> | string - embedding?: StringNullableWithAggregatesFilter<"Note"> | string | null - sharedWith?: StringNullableWithAggregatesFilter<"Note"> | string | null - userId?: StringNullableWithAggregatesFilter<"Note"> | string | null - order?: IntWithAggregatesFilter<"Note"> | number - notebookId?: StringNullableWithAggregatesFilter<"Note"> | string | null - createdAt?: DateTimeWithAggregatesFilter<"Note"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"Note"> | Date | string - autoGenerated?: BoolNullableWithAggregatesFilter<"Note"> | boolean | null - aiProvider?: StringNullableWithAggregatesFilter<"Note"> | string | null - aiConfidence?: IntNullableWithAggregatesFilter<"Note"> | number | null - language?: StringNullableWithAggregatesFilter<"Note"> | string | null - languageConfidence?: FloatNullableWithAggregatesFilter<"Note"> | number | null - lastAiAnalysis?: DateTimeNullableWithAggregatesFilter<"Note"> | Date | string | null - } - - export type NoteShareWhereInput = { - AND?: NoteShareWhereInput | NoteShareWhereInput[] - OR?: NoteShareWhereInput[] - NOT?: NoteShareWhereInput | NoteShareWhereInput[] - id?: StringFilter<"NoteShare"> | string - noteId?: StringFilter<"NoteShare"> | string - userId?: StringFilter<"NoteShare"> | string - sharedBy?: StringFilter<"NoteShare"> | string - status?: StringFilter<"NoteShare"> | string - permission?: StringFilter<"NoteShare"> | string - notifiedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - respondedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - createdAt?: DateTimeFilter<"NoteShare"> | Date | string - updatedAt?: DateTimeFilter<"NoteShare"> | Date | string - note?: XOR - user?: XOR - sharer?: XOR - } - - export type NoteShareOrderByWithRelationInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrderInput | SortOrder - respondedAt?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - note?: NoteOrderByWithRelationInput - user?: UserOrderByWithRelationInput - sharer?: UserOrderByWithRelationInput - } - - export type NoteShareWhereUniqueInput = Prisma.AtLeast<{ - id?: string - noteId_userId?: NoteShareNoteIdUserIdCompoundUniqueInput - AND?: NoteShareWhereInput | NoteShareWhereInput[] - OR?: NoteShareWhereInput[] - NOT?: NoteShareWhereInput | NoteShareWhereInput[] - noteId?: StringFilter<"NoteShare"> | string - userId?: StringFilter<"NoteShare"> | string - sharedBy?: StringFilter<"NoteShare"> | string - status?: StringFilter<"NoteShare"> | string - permission?: StringFilter<"NoteShare"> | string - notifiedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - respondedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - createdAt?: DateTimeFilter<"NoteShare"> | Date | string - updatedAt?: DateTimeFilter<"NoteShare"> | Date | string - note?: XOR - user?: XOR - sharer?: XOR - }, "id" | "noteId_userId"> - - export type NoteShareOrderByWithAggregationInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrderInput | SortOrder - respondedAt?: SortOrderInput | SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - _count?: NoteShareCountOrderByAggregateInput - _max?: NoteShareMaxOrderByAggregateInput - _min?: NoteShareMinOrderByAggregateInput - } - - export type NoteShareScalarWhereWithAggregatesInput = { - AND?: NoteShareScalarWhereWithAggregatesInput | NoteShareScalarWhereWithAggregatesInput[] - OR?: NoteShareScalarWhereWithAggregatesInput[] - NOT?: NoteShareScalarWhereWithAggregatesInput | NoteShareScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"NoteShare"> | string - noteId?: StringWithAggregatesFilter<"NoteShare"> | string - userId?: StringWithAggregatesFilter<"NoteShare"> | string - sharedBy?: StringWithAggregatesFilter<"NoteShare"> | string - status?: StringWithAggregatesFilter<"NoteShare"> | string - permission?: StringWithAggregatesFilter<"NoteShare"> | string - notifiedAt?: DateTimeNullableWithAggregatesFilter<"NoteShare"> | Date | string | null - respondedAt?: DateTimeNullableWithAggregatesFilter<"NoteShare"> | Date | string | null - createdAt?: DateTimeWithAggregatesFilter<"NoteShare"> | Date | string - updatedAt?: DateTimeWithAggregatesFilter<"NoteShare"> | Date | string - } - - export type SystemConfigWhereInput = { - AND?: SystemConfigWhereInput | SystemConfigWhereInput[] - OR?: SystemConfigWhereInput[] - NOT?: SystemConfigWhereInput | SystemConfigWhereInput[] - key?: StringFilter<"SystemConfig"> | string - value?: StringFilter<"SystemConfig"> | string - } - - export type SystemConfigOrderByWithRelationInput = { - key?: SortOrder - value?: SortOrder - } - - export type SystemConfigWhereUniqueInput = Prisma.AtLeast<{ - key?: string - AND?: SystemConfigWhereInput | SystemConfigWhereInput[] - OR?: SystemConfigWhereInput[] - NOT?: SystemConfigWhereInput | SystemConfigWhereInput[] - value?: StringFilter<"SystemConfig"> | string - }, "key"> - - export type SystemConfigOrderByWithAggregationInput = { - key?: SortOrder - value?: SortOrder - _count?: SystemConfigCountOrderByAggregateInput - _max?: SystemConfigMaxOrderByAggregateInput - _min?: SystemConfigMinOrderByAggregateInput - } - - export type SystemConfigScalarWhereWithAggregatesInput = { - AND?: SystemConfigScalarWhereWithAggregatesInput | SystemConfigScalarWhereWithAggregatesInput[] - OR?: SystemConfigScalarWhereWithAggregatesInput[] - NOT?: SystemConfigScalarWhereWithAggregatesInput | SystemConfigScalarWhereWithAggregatesInput[] - key?: StringWithAggregatesFilter<"SystemConfig"> | string - value?: StringWithAggregatesFilter<"SystemConfig"> | string - } - - export type AiFeedbackWhereInput = { - AND?: AiFeedbackWhereInput | AiFeedbackWhereInput[] - OR?: AiFeedbackWhereInput[] - NOT?: AiFeedbackWhereInput | AiFeedbackWhereInput[] - id?: StringFilter<"AiFeedback"> | string - noteId?: StringFilter<"AiFeedback"> | string - userId?: StringNullableFilter<"AiFeedback"> | string | null - feedbackType?: StringFilter<"AiFeedback"> | string - feature?: StringFilter<"AiFeedback"> | string - originalContent?: StringFilter<"AiFeedback"> | string - correctedContent?: StringNullableFilter<"AiFeedback"> | string | null - metadata?: StringNullableFilter<"AiFeedback"> | string | null - createdAt?: DateTimeFilter<"AiFeedback"> | Date | string - note?: XOR - user?: XOR | null - } - - export type AiFeedbackOrderByWithRelationInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrderInput | SortOrder - feedbackType?: SortOrder - feature?: SortOrder - originalContent?: SortOrder - correctedContent?: SortOrderInput | SortOrder - metadata?: SortOrderInput | SortOrder - createdAt?: SortOrder - note?: NoteOrderByWithRelationInput - user?: UserOrderByWithRelationInput - } - - export type AiFeedbackWhereUniqueInput = Prisma.AtLeast<{ - id?: string - AND?: AiFeedbackWhereInput | AiFeedbackWhereInput[] - OR?: AiFeedbackWhereInput[] - NOT?: AiFeedbackWhereInput | AiFeedbackWhereInput[] - noteId?: StringFilter<"AiFeedback"> | string - userId?: StringNullableFilter<"AiFeedback"> | string | null - feedbackType?: StringFilter<"AiFeedback"> | string - feature?: StringFilter<"AiFeedback"> | string - originalContent?: StringFilter<"AiFeedback"> | string - correctedContent?: StringNullableFilter<"AiFeedback"> | string | null - metadata?: StringNullableFilter<"AiFeedback"> | string | null - createdAt?: DateTimeFilter<"AiFeedback"> | Date | string - note?: XOR - user?: XOR | null - }, "id"> - - export type AiFeedbackOrderByWithAggregationInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrderInput | SortOrder - feedbackType?: SortOrder - feature?: SortOrder - originalContent?: SortOrder - correctedContent?: SortOrderInput | SortOrder - metadata?: SortOrderInput | SortOrder - createdAt?: SortOrder - _count?: AiFeedbackCountOrderByAggregateInput - _max?: AiFeedbackMaxOrderByAggregateInput - _min?: AiFeedbackMinOrderByAggregateInput - } - - export type AiFeedbackScalarWhereWithAggregatesInput = { - AND?: AiFeedbackScalarWhereWithAggregatesInput | AiFeedbackScalarWhereWithAggregatesInput[] - OR?: AiFeedbackScalarWhereWithAggregatesInput[] - NOT?: AiFeedbackScalarWhereWithAggregatesInput | AiFeedbackScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"AiFeedback"> | string - noteId?: StringWithAggregatesFilter<"AiFeedback"> | string - userId?: StringNullableWithAggregatesFilter<"AiFeedback"> | string | null - feedbackType?: StringWithAggregatesFilter<"AiFeedback"> | string - feature?: StringWithAggregatesFilter<"AiFeedback"> | string - originalContent?: StringWithAggregatesFilter<"AiFeedback"> | string - correctedContent?: StringNullableWithAggregatesFilter<"AiFeedback"> | string | null - metadata?: StringNullableWithAggregatesFilter<"AiFeedback"> | string | null - createdAt?: DateTimeWithAggregatesFilter<"AiFeedback"> | Date | string - } - - export type MemoryEchoInsightWhereInput = { - AND?: MemoryEchoInsightWhereInput | MemoryEchoInsightWhereInput[] - OR?: MemoryEchoInsightWhereInput[] - NOT?: MemoryEchoInsightWhereInput | MemoryEchoInsightWhereInput[] - id?: StringFilter<"MemoryEchoInsight"> | string - userId?: StringNullableFilter<"MemoryEchoInsight"> | string | null - note1Id?: StringFilter<"MemoryEchoInsight"> | string - note2Id?: StringFilter<"MemoryEchoInsight"> | string - similarityScore?: FloatFilter<"MemoryEchoInsight"> | number - insight?: StringFilter<"MemoryEchoInsight"> | string - insightDate?: DateTimeFilter<"MemoryEchoInsight"> | Date | string - viewed?: BoolFilter<"MemoryEchoInsight"> | boolean - feedback?: StringNullableFilter<"MemoryEchoInsight"> | string | null - dismissed?: BoolFilter<"MemoryEchoInsight"> | boolean - note1?: XOR - note2?: XOR - user?: XOR | null - } - - export type MemoryEchoInsightOrderByWithRelationInput = { - id?: SortOrder - userId?: SortOrderInput | SortOrder - note1Id?: SortOrder - note2Id?: SortOrder - similarityScore?: SortOrder - insight?: SortOrder - insightDate?: SortOrder - viewed?: SortOrder - feedback?: SortOrderInput | SortOrder - dismissed?: SortOrder - note1?: NoteOrderByWithRelationInput - note2?: NoteOrderByWithRelationInput - user?: UserOrderByWithRelationInput - } - - export type MemoryEchoInsightWhereUniqueInput = Prisma.AtLeast<{ - id?: string - userId_insightDate?: MemoryEchoInsightUserIdInsightDateCompoundUniqueInput - AND?: MemoryEchoInsightWhereInput | MemoryEchoInsightWhereInput[] - OR?: MemoryEchoInsightWhereInput[] - NOT?: MemoryEchoInsightWhereInput | MemoryEchoInsightWhereInput[] - userId?: StringNullableFilter<"MemoryEchoInsight"> | string | null - note1Id?: StringFilter<"MemoryEchoInsight"> | string - note2Id?: StringFilter<"MemoryEchoInsight"> | string - similarityScore?: FloatFilter<"MemoryEchoInsight"> | number - insight?: StringFilter<"MemoryEchoInsight"> | string - insightDate?: DateTimeFilter<"MemoryEchoInsight"> | Date | string - viewed?: BoolFilter<"MemoryEchoInsight"> | boolean - feedback?: StringNullableFilter<"MemoryEchoInsight"> | string | null - dismissed?: BoolFilter<"MemoryEchoInsight"> | boolean - note1?: XOR - note2?: XOR - user?: XOR | null - }, "id" | "userId_insightDate"> - - export type MemoryEchoInsightOrderByWithAggregationInput = { - id?: SortOrder - userId?: SortOrderInput | SortOrder - note1Id?: SortOrder - note2Id?: SortOrder - similarityScore?: SortOrder - insight?: SortOrder - insightDate?: SortOrder - viewed?: SortOrder - feedback?: SortOrderInput | SortOrder - dismissed?: SortOrder - _count?: MemoryEchoInsightCountOrderByAggregateInput - _avg?: MemoryEchoInsightAvgOrderByAggregateInput - _max?: MemoryEchoInsightMaxOrderByAggregateInput - _min?: MemoryEchoInsightMinOrderByAggregateInput - _sum?: MemoryEchoInsightSumOrderByAggregateInput - } - - export type MemoryEchoInsightScalarWhereWithAggregatesInput = { - AND?: MemoryEchoInsightScalarWhereWithAggregatesInput | MemoryEchoInsightScalarWhereWithAggregatesInput[] - OR?: MemoryEchoInsightScalarWhereWithAggregatesInput[] - NOT?: MemoryEchoInsightScalarWhereWithAggregatesInput | MemoryEchoInsightScalarWhereWithAggregatesInput[] - id?: StringWithAggregatesFilter<"MemoryEchoInsight"> | string - userId?: StringNullableWithAggregatesFilter<"MemoryEchoInsight"> | string | null - note1Id?: StringWithAggregatesFilter<"MemoryEchoInsight"> | string - note2Id?: StringWithAggregatesFilter<"MemoryEchoInsight"> | string - similarityScore?: FloatWithAggregatesFilter<"MemoryEchoInsight"> | number - insight?: StringWithAggregatesFilter<"MemoryEchoInsight"> | string - insightDate?: DateTimeWithAggregatesFilter<"MemoryEchoInsight"> | Date | string - viewed?: BoolWithAggregatesFilter<"MemoryEchoInsight"> | boolean - feedback?: StringNullableWithAggregatesFilter<"MemoryEchoInsight"> | string | null - dismissed?: BoolWithAggregatesFilter<"MemoryEchoInsight"> | boolean - } - - export type UserAISettingsWhereInput = { - AND?: UserAISettingsWhereInput | UserAISettingsWhereInput[] - OR?: UserAISettingsWhereInput[] - NOT?: UserAISettingsWhereInput | UserAISettingsWhereInput[] - userId?: StringFilter<"UserAISettings"> | string - titleSuggestions?: BoolFilter<"UserAISettings"> | boolean - semanticSearch?: BoolFilter<"UserAISettings"> | boolean - paragraphRefactor?: BoolFilter<"UserAISettings"> | boolean - memoryEcho?: BoolFilter<"UserAISettings"> | boolean - memoryEchoFrequency?: StringFilter<"UserAISettings"> | string - aiProvider?: StringFilter<"UserAISettings"> | string - preferredLanguage?: StringFilter<"UserAISettings"> | string - fontSize?: StringFilter<"UserAISettings"> | string - demoMode?: BoolFilter<"UserAISettings"> | boolean - user?: XOR - } - - export type UserAISettingsOrderByWithRelationInput = { - userId?: SortOrder - titleSuggestions?: SortOrder - semanticSearch?: SortOrder - paragraphRefactor?: SortOrder - memoryEcho?: SortOrder - memoryEchoFrequency?: SortOrder - aiProvider?: SortOrder - preferredLanguage?: SortOrder - fontSize?: SortOrder - demoMode?: SortOrder - user?: UserOrderByWithRelationInput - } - - export type UserAISettingsWhereUniqueInput = Prisma.AtLeast<{ - userId?: string - AND?: UserAISettingsWhereInput | UserAISettingsWhereInput[] - OR?: UserAISettingsWhereInput[] - NOT?: UserAISettingsWhereInput | UserAISettingsWhereInput[] - titleSuggestions?: BoolFilter<"UserAISettings"> | boolean - semanticSearch?: BoolFilter<"UserAISettings"> | boolean - paragraphRefactor?: BoolFilter<"UserAISettings"> | boolean - memoryEcho?: BoolFilter<"UserAISettings"> | boolean - memoryEchoFrequency?: StringFilter<"UserAISettings"> | string - aiProvider?: StringFilter<"UserAISettings"> | string - preferredLanguage?: StringFilter<"UserAISettings"> | string - fontSize?: StringFilter<"UserAISettings"> | string - demoMode?: BoolFilter<"UserAISettings"> | boolean - user?: XOR - }, "userId"> - - export type UserAISettingsOrderByWithAggregationInput = { - userId?: SortOrder - titleSuggestions?: SortOrder - semanticSearch?: SortOrder - paragraphRefactor?: SortOrder - memoryEcho?: SortOrder - memoryEchoFrequency?: SortOrder - aiProvider?: SortOrder - preferredLanguage?: SortOrder - fontSize?: SortOrder - demoMode?: SortOrder - _count?: UserAISettingsCountOrderByAggregateInput - _max?: UserAISettingsMaxOrderByAggregateInput - _min?: UserAISettingsMinOrderByAggregateInput - } - - export type UserAISettingsScalarWhereWithAggregatesInput = { - AND?: UserAISettingsScalarWhereWithAggregatesInput | UserAISettingsScalarWhereWithAggregatesInput[] - OR?: UserAISettingsScalarWhereWithAggregatesInput[] - NOT?: UserAISettingsScalarWhereWithAggregatesInput | UserAISettingsScalarWhereWithAggregatesInput[] - userId?: StringWithAggregatesFilter<"UserAISettings"> | string - titleSuggestions?: BoolWithAggregatesFilter<"UserAISettings"> | boolean - semanticSearch?: BoolWithAggregatesFilter<"UserAISettings"> | boolean - paragraphRefactor?: BoolWithAggregatesFilter<"UserAISettings"> | boolean - memoryEcho?: BoolWithAggregatesFilter<"UserAISettings"> | boolean - memoryEchoFrequency?: StringWithAggregatesFilter<"UserAISettings"> | string - aiProvider?: StringWithAggregatesFilter<"UserAISettings"> | string - preferredLanguage?: StringWithAggregatesFilter<"UserAISettings"> | string - fontSize?: StringWithAggregatesFilter<"UserAISettings"> | string - demoMode?: BoolWithAggregatesFilter<"UserAISettings"> | boolean - } - - export type UserCreateInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - sessions?: SessionCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - sessions?: SessionUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type UserCreateManyInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type UserUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type UserUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AccountCreateInput = { - type: string - provider: string - providerAccountId: string - refresh_token?: string | null - access_token?: string | null - expires_at?: number | null - token_type?: string | null - scope?: string | null - id_token?: string | null - session_state?: string | null - createdAt?: Date | string - updatedAt?: Date | string - user: UserCreateNestedOneWithoutAccountsInput - } - - export type AccountUncheckedCreateInput = { - userId: string - type: string - provider: string - providerAccountId: string - refresh_token?: string | null - access_token?: string | null - expires_at?: number | null - token_type?: string | null - scope?: string | null - id_token?: string | null - session_state?: string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AccountUpdateInput = { - type?: StringFieldUpdateOperationsInput | string - provider?: StringFieldUpdateOperationsInput | string - providerAccountId?: StringFieldUpdateOperationsInput | string - refresh_token?: NullableStringFieldUpdateOperationsInput | string | null - access_token?: NullableStringFieldUpdateOperationsInput | string | null - expires_at?: NullableIntFieldUpdateOperationsInput | number | null - token_type?: NullableStringFieldUpdateOperationsInput | string | null - scope?: NullableStringFieldUpdateOperationsInput | string | null - id_token?: NullableStringFieldUpdateOperationsInput | string | null - session_state?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - user?: UserUpdateOneRequiredWithoutAccountsNestedInput - } - - export type AccountUncheckedUpdateInput = { - userId?: StringFieldUpdateOperationsInput | string - type?: StringFieldUpdateOperationsInput | string - provider?: StringFieldUpdateOperationsInput | string - providerAccountId?: StringFieldUpdateOperationsInput | string - refresh_token?: NullableStringFieldUpdateOperationsInput | string | null - access_token?: NullableStringFieldUpdateOperationsInput | string | null - expires_at?: NullableIntFieldUpdateOperationsInput | number | null - token_type?: NullableStringFieldUpdateOperationsInput | string | null - scope?: NullableStringFieldUpdateOperationsInput | string | null - id_token?: NullableStringFieldUpdateOperationsInput | string | null - session_state?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AccountCreateManyInput = { - userId: string - type: string - provider: string - providerAccountId: string - refresh_token?: string | null - access_token?: string | null - expires_at?: number | null - token_type?: string | null - scope?: string | null - id_token?: string | null - session_state?: string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AccountUpdateManyMutationInput = { - type?: StringFieldUpdateOperationsInput | string - provider?: StringFieldUpdateOperationsInput | string - providerAccountId?: StringFieldUpdateOperationsInput | string - refresh_token?: NullableStringFieldUpdateOperationsInput | string | null - access_token?: NullableStringFieldUpdateOperationsInput | string | null - expires_at?: NullableIntFieldUpdateOperationsInput | number | null - token_type?: NullableStringFieldUpdateOperationsInput | string | null - scope?: NullableStringFieldUpdateOperationsInput | string | null - id_token?: NullableStringFieldUpdateOperationsInput | string | null - session_state?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AccountUncheckedUpdateManyInput = { - userId?: StringFieldUpdateOperationsInput | string - type?: StringFieldUpdateOperationsInput | string - provider?: StringFieldUpdateOperationsInput | string - providerAccountId?: StringFieldUpdateOperationsInput | string - refresh_token?: NullableStringFieldUpdateOperationsInput | string | null - access_token?: NullableStringFieldUpdateOperationsInput | string | null - expires_at?: NullableIntFieldUpdateOperationsInput | number | null - token_type?: NullableStringFieldUpdateOperationsInput | string | null - scope?: NullableStringFieldUpdateOperationsInput | string | null - id_token?: NullableStringFieldUpdateOperationsInput | string | null - session_state?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type SessionCreateInput = { - sessionToken: string - expires: Date | string - createdAt?: Date | string - updatedAt?: Date | string - user: UserCreateNestedOneWithoutSessionsInput - } - - export type SessionUncheckedCreateInput = { - sessionToken: string - userId: string - expires: Date | string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type SessionUpdateInput = { - sessionToken?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - user?: UserUpdateOneRequiredWithoutSessionsNestedInput - } - - export type SessionUncheckedUpdateInput = { - sessionToken?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type SessionCreateManyInput = { - sessionToken: string - userId: string - expires: Date | string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type SessionUpdateManyMutationInput = { - sessionToken?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type SessionUncheckedUpdateManyInput = { - sessionToken?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type VerificationTokenCreateInput = { - identifier: string - token: string - expires: Date | string - } - - export type VerificationTokenUncheckedCreateInput = { - identifier: string - token: string - expires: Date | string - } - - export type VerificationTokenUpdateInput = { - identifier?: StringFieldUpdateOperationsInput | string - token?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type VerificationTokenUncheckedUpdateInput = { - identifier?: StringFieldUpdateOperationsInput | string - token?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type VerificationTokenCreateManyInput = { - identifier: string - token: string - expires: Date | string - } - - export type VerificationTokenUpdateManyMutationInput = { - identifier?: StringFieldUpdateOperationsInput | string - token?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type VerificationTokenUncheckedUpdateManyInput = { - identifier?: StringFieldUpdateOperationsInput | string - token?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NotebookCreateInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - createdAt?: Date | string - updatedAt?: Date | string - user: UserCreateNestedOneWithoutNotebooksInput - notes?: NoteCreateNestedManyWithoutNotebookInput - labels?: LabelCreateNestedManyWithoutNotebookInput - } - - export type NotebookUncheckedCreateInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - userId: string - createdAt?: Date | string - updatedAt?: Date | string - notes?: NoteUncheckedCreateNestedManyWithoutNotebookInput - labels?: LabelUncheckedCreateNestedManyWithoutNotebookInput - } - - export type NotebookUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - user?: UserUpdateOneRequiredWithoutNotebooksNestedInput - notes?: NoteUpdateManyWithoutNotebookNestedInput - labels?: LabelUpdateManyWithoutNotebookNestedInput - } - - export type NotebookUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - userId?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notes?: NoteUncheckedUpdateManyWithoutNotebookNestedInput - labels?: LabelUncheckedUpdateManyWithoutNotebookNestedInput - } - - export type NotebookCreateManyInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - userId: string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NotebookUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NotebookUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - userId?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type LabelCreateInput = { - id?: string - name: string - color?: string - createdAt?: Date | string - updatedAt?: Date | string - notebook?: NotebookCreateNestedOneWithoutLabelsInput - notes?: NoteCreateNestedManyWithoutLabelRelationsInput - user?: UserCreateNestedOneWithoutLabelsInput - } - - export type LabelUncheckedCreateInput = { - id?: string - name: string - color?: string - notebookId?: string | null - userId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - notes?: NoteUncheckedCreateNestedManyWithoutLabelRelationsInput - } - - export type LabelUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notebook?: NotebookUpdateOneWithoutLabelsNestedInput - notes?: NoteUpdateManyWithoutLabelRelationsNestedInput - user?: UserUpdateOneWithoutLabelsNestedInput - } - - export type LabelUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notes?: NoteUncheckedUpdateManyWithoutLabelRelationsNestedInput - } - - export type LabelCreateManyInput = { - id?: string - name: string - color?: string - notebookId?: string | null - userId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type LabelUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type LabelUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteCreateInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - user?: UserCreateNestedOneWithoutNotesInput - shares?: NoteShareCreateNestedManyWithoutNoteInput - notebook?: NotebookCreateNestedOneWithoutNotesInput - labelRelations?: LabelCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input - } - - export type NoteUncheckedCreateInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput - labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input - } - - export type NoteUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - user?: UserUpdateOneWithoutNotesNestedInput - shares?: NoteShareUpdateManyWithoutNoteNestedInput - notebook?: NotebookUpdateOneWithoutNotesNestedInput - labelRelations?: LabelUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput - labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput - } - - export type NoteCreateManyInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - } - - export type NoteUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type NoteUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type NoteShareCreateInput = { - id?: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - note: NoteCreateNestedOneWithoutSharesInput - user: UserCreateNestedOneWithoutReceivedSharesInput - sharer: UserCreateNestedOneWithoutSentSharesInput - } - - export type NoteShareUncheckedCreateInput = { - id?: string - noteId: string - userId: string - sharedBy: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - note?: NoteUpdateOneRequiredWithoutSharesNestedInput - user?: UserUpdateOneRequiredWithoutReceivedSharesNestedInput - sharer?: UserUpdateOneRequiredWithoutSentSharesNestedInput - } - - export type NoteShareUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareCreateManyInput = { - id?: string - noteId: string - userId: string - sharedBy: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type SystemConfigCreateInput = { - key: string - value: string - } - - export type SystemConfigUncheckedCreateInput = { - key: string - value: string - } - - export type SystemConfigUpdateInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type SystemConfigUncheckedUpdateInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type SystemConfigCreateManyInput = { - key: string - value: string - } - - export type SystemConfigUpdateManyMutationInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type SystemConfigUncheckedUpdateManyInput = { - key?: StringFieldUpdateOperationsInput | string - value?: StringFieldUpdateOperationsInput | string - } - - export type AiFeedbackCreateInput = { - id?: string - feedbackType: string - feature: string - originalContent: string - correctedContent?: string | null - metadata?: string | null - createdAt?: Date | string - note: NoteCreateNestedOneWithoutAiFeedbackInput - user?: UserCreateNestedOneWithoutAiFeedbackInput - } - - export type AiFeedbackUncheckedCreateInput = { - id?: string - noteId: string - userId?: string | null - feedbackType: string - feature: string - originalContent: string - correctedContent?: string | null - metadata?: string | null - createdAt?: Date | string - } - - export type AiFeedbackUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - note?: NoteUpdateOneRequiredWithoutAiFeedbackNestedInput - user?: UserUpdateOneWithoutAiFeedbackNestedInput - } - - export type AiFeedbackUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AiFeedbackCreateManyInput = { - id?: string - noteId: string - userId?: string | null - feedbackType: string - feature: string - originalContent: string - correctedContent?: string | null - metadata?: string | null - createdAt?: Date | string - } - - export type AiFeedbackUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AiFeedbackUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type MemoryEchoInsightCreateInput = { - id?: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - note1: NoteCreateNestedOneWithoutMemoryEchoAsNote1Input - note2: NoteCreateNestedOneWithoutMemoryEchoAsNote2Input - user?: UserCreateNestedOneWithoutMemoryEchoInsightsInput - } - - export type MemoryEchoInsightUncheckedCreateInput = { - id?: string - userId?: string | null - note1Id: string - note2Id: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - } - - export type MemoryEchoInsightUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - note1?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote1NestedInput - note2?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote2NestedInput - user?: UserUpdateOneWithoutMemoryEchoInsightsNestedInput - } - - export type MemoryEchoInsightUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - note1Id?: StringFieldUpdateOperationsInput | string - note2Id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - } - - export type MemoryEchoInsightCreateManyInput = { - id?: string - userId?: string | null - note1Id: string - note2Id: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - } - - export type MemoryEchoInsightUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - } - - export type MemoryEchoInsightUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - note1Id?: StringFieldUpdateOperationsInput | string - note2Id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - } - - export type UserAISettingsCreateInput = { - titleSuggestions?: boolean - semanticSearch?: boolean - paragraphRefactor?: boolean - memoryEcho?: boolean - memoryEchoFrequency?: string - aiProvider?: string - preferredLanguage?: string - fontSize?: string - demoMode?: boolean - user: UserCreateNestedOneWithoutAiSettingsInput - } - - export type UserAISettingsUncheckedCreateInput = { - userId: string - titleSuggestions?: boolean - semanticSearch?: boolean - paragraphRefactor?: boolean - memoryEcho?: boolean - memoryEchoFrequency?: string - aiProvider?: string - preferredLanguage?: string - fontSize?: string - demoMode?: boolean - } - - export type UserAISettingsUpdateInput = { - titleSuggestions?: BoolFieldUpdateOperationsInput | boolean - semanticSearch?: BoolFieldUpdateOperationsInput | boolean - paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean - memoryEcho?: BoolFieldUpdateOperationsInput | boolean - memoryEchoFrequency?: StringFieldUpdateOperationsInput | string - aiProvider?: StringFieldUpdateOperationsInput | string - preferredLanguage?: StringFieldUpdateOperationsInput | string - fontSize?: StringFieldUpdateOperationsInput | string - demoMode?: BoolFieldUpdateOperationsInput | boolean - user?: UserUpdateOneRequiredWithoutAiSettingsNestedInput - } - - export type UserAISettingsUncheckedUpdateInput = { - userId?: StringFieldUpdateOperationsInput | string - titleSuggestions?: BoolFieldUpdateOperationsInput | boolean - semanticSearch?: BoolFieldUpdateOperationsInput | boolean - paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean - memoryEcho?: BoolFieldUpdateOperationsInput | boolean - memoryEchoFrequency?: StringFieldUpdateOperationsInput | string - aiProvider?: StringFieldUpdateOperationsInput | string - preferredLanguage?: StringFieldUpdateOperationsInput | string - fontSize?: StringFieldUpdateOperationsInput | string - demoMode?: BoolFieldUpdateOperationsInput | boolean - } - - export type UserAISettingsCreateManyInput = { - userId: string - titleSuggestions?: boolean - semanticSearch?: boolean - paragraphRefactor?: boolean - memoryEcho?: boolean - memoryEchoFrequency?: string - aiProvider?: string - preferredLanguage?: string - fontSize?: string - demoMode?: boolean - } - - export type UserAISettingsUpdateManyMutationInput = { - titleSuggestions?: BoolFieldUpdateOperationsInput | boolean - semanticSearch?: BoolFieldUpdateOperationsInput | boolean - paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean - memoryEcho?: BoolFieldUpdateOperationsInput | boolean - memoryEchoFrequency?: StringFieldUpdateOperationsInput | string - aiProvider?: StringFieldUpdateOperationsInput | string - preferredLanguage?: StringFieldUpdateOperationsInput | string - fontSize?: StringFieldUpdateOperationsInput | string - demoMode?: BoolFieldUpdateOperationsInput | boolean - } - - export type UserAISettingsUncheckedUpdateManyInput = { - userId?: StringFieldUpdateOperationsInput | string - titleSuggestions?: BoolFieldUpdateOperationsInput | boolean - semanticSearch?: BoolFieldUpdateOperationsInput | boolean - paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean - memoryEcho?: BoolFieldUpdateOperationsInput | boolean - memoryEchoFrequency?: StringFieldUpdateOperationsInput | string - aiProvider?: StringFieldUpdateOperationsInput | string - preferredLanguage?: StringFieldUpdateOperationsInput | string - fontSize?: StringFieldUpdateOperationsInput | string - demoMode?: BoolFieldUpdateOperationsInput | boolean - } - - export type StringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringFilter<$PrismaModel> | string - } - - export type StringNullableFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringNullableFilter<$PrismaModel> | string | null - } - - export type DateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null - } - - export type DateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type AccountListRelationFilter = { - every?: AccountWhereInput - some?: AccountWhereInput - none?: AccountWhereInput - } - - export type SessionListRelationFilter = { - every?: SessionWhereInput - some?: SessionWhereInput - none?: SessionWhereInput - } - - export type NoteListRelationFilter = { - every?: NoteWhereInput - some?: NoteWhereInput - none?: NoteWhereInput - } - - export type LabelListRelationFilter = { - every?: LabelWhereInput - some?: LabelWhereInput - none?: LabelWhereInput - } - - export type NotebookListRelationFilter = { - every?: NotebookWhereInput - some?: NotebookWhereInput - none?: NotebookWhereInput - } - - export type NoteShareListRelationFilter = { - every?: NoteShareWhereInput - some?: NoteShareWhereInput - none?: NoteShareWhereInput - } - - export type AiFeedbackListRelationFilter = { - every?: AiFeedbackWhereInput - some?: AiFeedbackWhereInput - none?: AiFeedbackWhereInput - } - - export type UserAISettingsNullableRelationFilter = { - is?: UserAISettingsWhereInput | null - isNot?: UserAISettingsWhereInput | null - } - - export type MemoryEchoInsightListRelationFilter = { - every?: MemoryEchoInsightWhereInput - some?: MemoryEchoInsightWhereInput - none?: MemoryEchoInsightWhereInput - } - - export type SortOrderInput = { - sort: SortOrder - nulls?: NullsOrder - } - - export type AccountOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type SessionOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type NoteOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type LabelOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type NotebookOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type NoteShareOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type AiFeedbackOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type MemoryEchoInsightOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type UserCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - emailVerified?: SortOrder - password?: SortOrder - role?: SortOrder - image?: SortOrder - theme?: SortOrder - resetToken?: SortOrder - resetTokenExpiry?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type UserMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - emailVerified?: SortOrder - password?: SortOrder - role?: SortOrder - image?: SortOrder - theme?: SortOrder - resetToken?: SortOrder - resetTokenExpiry?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type UserMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - email?: SortOrder - emailVerified?: SortOrder - password?: SortOrder - role?: SortOrder - image?: SortOrder - theme?: SortOrder - resetToken?: SortOrder - resetTokenExpiry?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type StringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedStringNullableFilter<$PrismaModel> - _max?: NestedStringNullableFilter<$PrismaModel> - } - - export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedDateTimeNullableFilter<$PrismaModel> - _max?: NestedDateTimeNullableFilter<$PrismaModel> - } - - export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type IntNullableFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableFilter<$PrismaModel> | number | null - } - - export type UserRelationFilter = { - is?: UserWhereInput - isNot?: UserWhereInput - } - - export type AccountProviderProviderAccountIdCompoundUniqueInput = { - provider: string - providerAccountId: string - } - - export type AccountCountOrderByAggregateInput = { - userId?: SortOrder - type?: SortOrder - provider?: SortOrder - providerAccountId?: SortOrder - refresh_token?: SortOrder - access_token?: SortOrder - expires_at?: SortOrder - token_type?: SortOrder - scope?: SortOrder - id_token?: SortOrder - session_state?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AccountAvgOrderByAggregateInput = { - expires_at?: SortOrder - } - - export type AccountMaxOrderByAggregateInput = { - userId?: SortOrder - type?: SortOrder - provider?: SortOrder - providerAccountId?: SortOrder - refresh_token?: SortOrder - access_token?: SortOrder - expires_at?: SortOrder - token_type?: SortOrder - scope?: SortOrder - id_token?: SortOrder - session_state?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AccountMinOrderByAggregateInput = { - userId?: SortOrder - type?: SortOrder - provider?: SortOrder - providerAccountId?: SortOrder - refresh_token?: SortOrder - access_token?: SortOrder - expires_at?: SortOrder - token_type?: SortOrder - scope?: SortOrder - id_token?: SortOrder - session_state?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type AccountSumOrderByAggregateInput = { - expires_at?: SortOrder - } - - export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedIntNullableFilter<$PrismaModel> - _max?: NestedIntNullableFilter<$PrismaModel> - } - - export type SessionCountOrderByAggregateInput = { - sessionToken?: SortOrder - userId?: SortOrder - expires?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type SessionMaxOrderByAggregateInput = { - sessionToken?: SortOrder - userId?: SortOrder - expires?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type SessionMinOrderByAggregateInput = { - sessionToken?: SortOrder - userId?: SortOrder - expires?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type VerificationTokenIdentifierTokenCompoundUniqueInput = { - identifier: string - token: string - } - - export type VerificationTokenCountOrderByAggregateInput = { - identifier?: SortOrder - token?: SortOrder - expires?: SortOrder - } - - export type VerificationTokenMaxOrderByAggregateInput = { - identifier?: SortOrder - token?: SortOrder - expires?: SortOrder - } - - export type VerificationTokenMinOrderByAggregateInput = { - identifier?: SortOrder - token?: SortOrder - expires?: SortOrder - } - - export type IntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type NotebookCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - icon?: SortOrder - color?: SortOrder - order?: SortOrder - userId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type NotebookAvgOrderByAggregateInput = { - order?: SortOrder - } - - export type NotebookMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - icon?: SortOrder - color?: SortOrder - order?: SortOrder - userId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type NotebookMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - icon?: SortOrder - color?: SortOrder - order?: SortOrder - userId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type NotebookSumOrderByAggregateInput = { - order?: SortOrder - } - - export type IntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type NotebookNullableRelationFilter = { - is?: NotebookWhereInput | null - isNot?: NotebookWhereInput | null - } - - export type UserNullableRelationFilter = { - is?: UserWhereInput | null - isNot?: UserWhereInput | null - } - - export type LabelNotebookIdNameCompoundUniqueInput = { - notebookId: string - name: string - } - - export type LabelCountOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - color?: SortOrder - notebookId?: SortOrder - userId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type LabelMaxOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - color?: SortOrder - notebookId?: SortOrder - userId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type LabelMinOrderByAggregateInput = { - id?: SortOrder - name?: SortOrder - color?: SortOrder - notebookId?: SortOrder - userId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type BoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolFilter<$PrismaModel> | boolean - } - - export type BoolNullableFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null - not?: NestedBoolNullableFilter<$PrismaModel> | boolean | null - } - - export type FloatNullableFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableFilter<$PrismaModel> | number | null - } - - export type NoteCountOrderByAggregateInput = { - id?: SortOrder - title?: SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrder - labels?: SortOrder - images?: SortOrder - links?: SortOrder - reminder?: SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrder - reminderLocation?: SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrder - sharedWith?: SortOrder - userId?: SortOrder - order?: SortOrder - notebookId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - autoGenerated?: SortOrder - aiProvider?: SortOrder - aiConfidence?: SortOrder - language?: SortOrder - languageConfidence?: SortOrder - lastAiAnalysis?: SortOrder - } - - export type NoteAvgOrderByAggregateInput = { - order?: SortOrder - aiConfidence?: SortOrder - languageConfidence?: SortOrder - } - - export type NoteMaxOrderByAggregateInput = { - id?: SortOrder - title?: SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrder - labels?: SortOrder - images?: SortOrder - links?: SortOrder - reminder?: SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrder - reminderLocation?: SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrder - sharedWith?: SortOrder - userId?: SortOrder - order?: SortOrder - notebookId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - autoGenerated?: SortOrder - aiProvider?: SortOrder - aiConfidence?: SortOrder - language?: SortOrder - languageConfidence?: SortOrder - lastAiAnalysis?: SortOrder - } - - export type NoteMinOrderByAggregateInput = { - id?: SortOrder - title?: SortOrder - content?: SortOrder - color?: SortOrder - isPinned?: SortOrder - isArchived?: SortOrder - type?: SortOrder - checkItems?: SortOrder - labels?: SortOrder - images?: SortOrder - links?: SortOrder - reminder?: SortOrder - isReminderDone?: SortOrder - reminderRecurrence?: SortOrder - reminderLocation?: SortOrder - isMarkdown?: SortOrder - size?: SortOrder - embedding?: SortOrder - sharedWith?: SortOrder - userId?: SortOrder - order?: SortOrder - notebookId?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - autoGenerated?: SortOrder - aiProvider?: SortOrder - aiConfidence?: SortOrder - language?: SortOrder - languageConfidence?: SortOrder - lastAiAnalysis?: SortOrder - } - - export type NoteSumOrderByAggregateInput = { - order?: SortOrder - aiConfidence?: SortOrder - languageConfidence?: SortOrder - } - - export type BoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedBoolFilter<$PrismaModel> - _max?: NestedBoolFilter<$PrismaModel> - } - - export type BoolNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null - not?: NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedBoolNullableFilter<$PrismaModel> - _max?: NestedBoolNullableFilter<$PrismaModel> - } - - export type FloatNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedFloatNullableFilter<$PrismaModel> - _min?: NestedFloatNullableFilter<$PrismaModel> - _max?: NestedFloatNullableFilter<$PrismaModel> - } - - export type NoteRelationFilter = { - is?: NoteWhereInput - isNot?: NoteWhereInput - } - - export type NoteShareNoteIdUserIdCompoundUniqueInput = { - noteId: string - userId: string - } - - export type NoteShareCountOrderByAggregateInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrder - respondedAt?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type NoteShareMaxOrderByAggregateInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrder - respondedAt?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type NoteShareMinOrderByAggregateInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - sharedBy?: SortOrder - status?: SortOrder - permission?: SortOrder - notifiedAt?: SortOrder - respondedAt?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - } - - export type SystemConfigCountOrderByAggregateInput = { - key?: SortOrder - value?: SortOrder - } - - export type SystemConfigMaxOrderByAggregateInput = { - key?: SortOrder - value?: SortOrder - } - - export type SystemConfigMinOrderByAggregateInput = { - key?: SortOrder - value?: SortOrder - } - - export type AiFeedbackCountOrderByAggregateInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - feedbackType?: SortOrder - feature?: SortOrder - originalContent?: SortOrder - correctedContent?: SortOrder - metadata?: SortOrder - createdAt?: SortOrder - } - - export type AiFeedbackMaxOrderByAggregateInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - feedbackType?: SortOrder - feature?: SortOrder - originalContent?: SortOrder - correctedContent?: SortOrder - metadata?: SortOrder - createdAt?: SortOrder - } - - export type AiFeedbackMinOrderByAggregateInput = { - id?: SortOrder - noteId?: SortOrder - userId?: SortOrder - feedbackType?: SortOrder - feature?: SortOrder - originalContent?: SortOrder - correctedContent?: SortOrder - metadata?: SortOrder - createdAt?: SortOrder - } - - export type FloatFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatFilter<$PrismaModel> | number - } - - export type MemoryEchoInsightUserIdInsightDateCompoundUniqueInput = { - userId: string - insightDate: Date | string - } - - export type MemoryEchoInsightCountOrderByAggregateInput = { - id?: SortOrder - userId?: SortOrder - note1Id?: SortOrder - note2Id?: SortOrder - similarityScore?: SortOrder - insight?: SortOrder - insightDate?: SortOrder - viewed?: SortOrder - feedback?: SortOrder - dismissed?: SortOrder - } - - export type MemoryEchoInsightAvgOrderByAggregateInput = { - similarityScore?: SortOrder - } - - export type MemoryEchoInsightMaxOrderByAggregateInput = { - id?: SortOrder - userId?: SortOrder - note1Id?: SortOrder - note2Id?: SortOrder - similarityScore?: SortOrder - insight?: SortOrder - insightDate?: SortOrder - viewed?: SortOrder - feedback?: SortOrder - dismissed?: SortOrder - } - - export type MemoryEchoInsightMinOrderByAggregateInput = { - id?: SortOrder - userId?: SortOrder - note1Id?: SortOrder - note2Id?: SortOrder - similarityScore?: SortOrder - insight?: SortOrder - insightDate?: SortOrder - viewed?: SortOrder - feedback?: SortOrder - dismissed?: SortOrder - } - - export type MemoryEchoInsightSumOrderByAggregateInput = { - similarityScore?: SortOrder - } - - export type FloatWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedFloatFilter<$PrismaModel> - _min?: NestedFloatFilter<$PrismaModel> - _max?: NestedFloatFilter<$PrismaModel> - } - - export type UserAISettingsCountOrderByAggregateInput = { - userId?: SortOrder - titleSuggestions?: SortOrder - semanticSearch?: SortOrder - paragraphRefactor?: SortOrder - memoryEcho?: SortOrder - memoryEchoFrequency?: SortOrder - aiProvider?: SortOrder - preferredLanguage?: SortOrder - fontSize?: SortOrder - demoMode?: SortOrder - } - - export type UserAISettingsMaxOrderByAggregateInput = { - userId?: SortOrder - titleSuggestions?: SortOrder - semanticSearch?: SortOrder - paragraphRefactor?: SortOrder - memoryEcho?: SortOrder - memoryEchoFrequency?: SortOrder - aiProvider?: SortOrder - preferredLanguage?: SortOrder - fontSize?: SortOrder - demoMode?: SortOrder - } - - export type UserAISettingsMinOrderByAggregateInput = { - userId?: SortOrder - titleSuggestions?: SortOrder - semanticSearch?: SortOrder - paragraphRefactor?: SortOrder - memoryEcho?: SortOrder - memoryEchoFrequency?: SortOrder - aiProvider?: SortOrder - preferredLanguage?: SortOrder - fontSize?: SortOrder - demoMode?: SortOrder - } - - export type AccountCreateNestedManyWithoutUserInput = { - create?: XOR | AccountCreateWithoutUserInput[] | AccountUncheckedCreateWithoutUserInput[] - connectOrCreate?: AccountCreateOrConnectWithoutUserInput | AccountCreateOrConnectWithoutUserInput[] - createMany?: AccountCreateManyUserInputEnvelope - connect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - } - - export type SessionCreateNestedManyWithoutUserInput = { - create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] - connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] - createMany?: SessionCreateManyUserInputEnvelope - connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - } - - export type NoteCreateNestedManyWithoutUserInput = { - create?: XOR | NoteCreateWithoutUserInput[] | NoteUncheckedCreateWithoutUserInput[] - connectOrCreate?: NoteCreateOrConnectWithoutUserInput | NoteCreateOrConnectWithoutUserInput[] - createMany?: NoteCreateManyUserInputEnvelope - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - } - - export type LabelCreateNestedManyWithoutUserInput = { - create?: XOR | LabelCreateWithoutUserInput[] | LabelUncheckedCreateWithoutUserInput[] - connectOrCreate?: LabelCreateOrConnectWithoutUserInput | LabelCreateOrConnectWithoutUserInput[] - createMany?: LabelCreateManyUserInputEnvelope - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - } - - export type NotebookCreateNestedManyWithoutUserInput = { - create?: XOR | NotebookCreateWithoutUserInput[] | NotebookUncheckedCreateWithoutUserInput[] - connectOrCreate?: NotebookCreateOrConnectWithoutUserInput | NotebookCreateOrConnectWithoutUserInput[] - createMany?: NotebookCreateManyUserInputEnvelope - connect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - } - - export type NoteShareCreateNestedManyWithoutUserInput = { - create?: XOR | NoteShareCreateWithoutUserInput[] | NoteShareUncheckedCreateWithoutUserInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutUserInput | NoteShareCreateOrConnectWithoutUserInput[] - createMany?: NoteShareCreateManyUserInputEnvelope - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - } - - export type NoteShareCreateNestedManyWithoutSharerInput = { - create?: XOR | NoteShareCreateWithoutSharerInput[] | NoteShareUncheckedCreateWithoutSharerInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutSharerInput | NoteShareCreateOrConnectWithoutSharerInput[] - createMany?: NoteShareCreateManySharerInputEnvelope - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - } - - export type AiFeedbackCreateNestedManyWithoutUserInput = { - create?: XOR | AiFeedbackCreateWithoutUserInput[] | AiFeedbackUncheckedCreateWithoutUserInput[] - connectOrCreate?: AiFeedbackCreateOrConnectWithoutUserInput | AiFeedbackCreateOrConnectWithoutUserInput[] - createMany?: AiFeedbackCreateManyUserInputEnvelope - connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - } - - export type UserAISettingsCreateNestedOneWithoutUserInput = { - create?: XOR - connectOrCreate?: UserAISettingsCreateOrConnectWithoutUserInput - connect?: UserAISettingsWhereUniqueInput - } - - export type MemoryEchoInsightCreateNestedManyWithoutUserInput = { - create?: XOR | MemoryEchoInsightCreateWithoutUserInput[] | MemoryEchoInsightUncheckedCreateWithoutUserInput[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutUserInput | MemoryEchoInsightCreateOrConnectWithoutUserInput[] - createMany?: MemoryEchoInsightCreateManyUserInputEnvelope - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - } - - export type AccountUncheckedCreateNestedManyWithoutUserInput = { - create?: XOR | AccountCreateWithoutUserInput[] | AccountUncheckedCreateWithoutUserInput[] - connectOrCreate?: AccountCreateOrConnectWithoutUserInput | AccountCreateOrConnectWithoutUserInput[] - createMany?: AccountCreateManyUserInputEnvelope - connect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - } - - export type SessionUncheckedCreateNestedManyWithoutUserInput = { - create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] - connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] - createMany?: SessionCreateManyUserInputEnvelope - connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - } - - export type NoteUncheckedCreateNestedManyWithoutUserInput = { - create?: XOR | NoteCreateWithoutUserInput[] | NoteUncheckedCreateWithoutUserInput[] - connectOrCreate?: NoteCreateOrConnectWithoutUserInput | NoteCreateOrConnectWithoutUserInput[] - createMany?: NoteCreateManyUserInputEnvelope - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - } - - export type LabelUncheckedCreateNestedManyWithoutUserInput = { - create?: XOR | LabelCreateWithoutUserInput[] | LabelUncheckedCreateWithoutUserInput[] - connectOrCreate?: LabelCreateOrConnectWithoutUserInput | LabelCreateOrConnectWithoutUserInput[] - createMany?: LabelCreateManyUserInputEnvelope - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - } - - export type NotebookUncheckedCreateNestedManyWithoutUserInput = { - create?: XOR | NotebookCreateWithoutUserInput[] | NotebookUncheckedCreateWithoutUserInput[] - connectOrCreate?: NotebookCreateOrConnectWithoutUserInput | NotebookCreateOrConnectWithoutUserInput[] - createMany?: NotebookCreateManyUserInputEnvelope - connect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - } - - export type NoteShareUncheckedCreateNestedManyWithoutUserInput = { - create?: XOR | NoteShareCreateWithoutUserInput[] | NoteShareUncheckedCreateWithoutUserInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutUserInput | NoteShareCreateOrConnectWithoutUserInput[] - createMany?: NoteShareCreateManyUserInputEnvelope - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - } - - export type NoteShareUncheckedCreateNestedManyWithoutSharerInput = { - create?: XOR | NoteShareCreateWithoutSharerInput[] | NoteShareUncheckedCreateWithoutSharerInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutSharerInput | NoteShareCreateOrConnectWithoutSharerInput[] - createMany?: NoteShareCreateManySharerInputEnvelope - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - } - - export type AiFeedbackUncheckedCreateNestedManyWithoutUserInput = { - create?: XOR | AiFeedbackCreateWithoutUserInput[] | AiFeedbackUncheckedCreateWithoutUserInput[] - connectOrCreate?: AiFeedbackCreateOrConnectWithoutUserInput | AiFeedbackCreateOrConnectWithoutUserInput[] - createMany?: AiFeedbackCreateManyUserInputEnvelope - connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - } - - export type UserAISettingsUncheckedCreateNestedOneWithoutUserInput = { - create?: XOR - connectOrCreate?: UserAISettingsCreateOrConnectWithoutUserInput - connect?: UserAISettingsWhereUniqueInput - } - - export type MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput = { - create?: XOR | MemoryEchoInsightCreateWithoutUserInput[] | MemoryEchoInsightUncheckedCreateWithoutUserInput[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutUserInput | MemoryEchoInsightCreateOrConnectWithoutUserInput[] - createMany?: MemoryEchoInsightCreateManyUserInputEnvelope - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - } - - export type StringFieldUpdateOperationsInput = { - set?: string - } - - export type NullableStringFieldUpdateOperationsInput = { - set?: string | null - } - - export type NullableDateTimeFieldUpdateOperationsInput = { - set?: Date | string | null - } - - export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string - } - - export type AccountUpdateManyWithoutUserNestedInput = { - create?: XOR | AccountCreateWithoutUserInput[] | AccountUncheckedCreateWithoutUserInput[] - connectOrCreate?: AccountCreateOrConnectWithoutUserInput | AccountCreateOrConnectWithoutUserInput[] - upsert?: AccountUpsertWithWhereUniqueWithoutUserInput | AccountUpsertWithWhereUniqueWithoutUserInput[] - createMany?: AccountCreateManyUserInputEnvelope - set?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - disconnect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - delete?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - connect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - update?: AccountUpdateWithWhereUniqueWithoutUserInput | AccountUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: AccountUpdateManyWithWhereWithoutUserInput | AccountUpdateManyWithWhereWithoutUserInput[] - deleteMany?: AccountScalarWhereInput | AccountScalarWhereInput[] - } - - export type SessionUpdateManyWithoutUserNestedInput = { - create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] - connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] - upsert?: SessionUpsertWithWhereUniqueWithoutUserInput | SessionUpsertWithWhereUniqueWithoutUserInput[] - createMany?: SessionCreateManyUserInputEnvelope - set?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - disconnect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - delete?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - update?: SessionUpdateWithWhereUniqueWithoutUserInput | SessionUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: SessionUpdateManyWithWhereWithoutUserInput | SessionUpdateManyWithWhereWithoutUserInput[] - deleteMany?: SessionScalarWhereInput | SessionScalarWhereInput[] - } - - export type NoteUpdateManyWithoutUserNestedInput = { - create?: XOR | NoteCreateWithoutUserInput[] | NoteUncheckedCreateWithoutUserInput[] - connectOrCreate?: NoteCreateOrConnectWithoutUserInput | NoteCreateOrConnectWithoutUserInput[] - upsert?: NoteUpsertWithWhereUniqueWithoutUserInput | NoteUpsertWithWhereUniqueWithoutUserInput[] - createMany?: NoteCreateManyUserInputEnvelope - set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - update?: NoteUpdateWithWhereUniqueWithoutUserInput | NoteUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: NoteUpdateManyWithWhereWithoutUserInput | NoteUpdateManyWithWhereWithoutUserInput[] - deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] - } - - export type LabelUpdateManyWithoutUserNestedInput = { - create?: XOR | LabelCreateWithoutUserInput[] | LabelUncheckedCreateWithoutUserInput[] - connectOrCreate?: LabelCreateOrConnectWithoutUserInput | LabelCreateOrConnectWithoutUserInput[] - upsert?: LabelUpsertWithWhereUniqueWithoutUserInput | LabelUpsertWithWhereUniqueWithoutUserInput[] - createMany?: LabelCreateManyUserInputEnvelope - set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - update?: LabelUpdateWithWhereUniqueWithoutUserInput | LabelUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: LabelUpdateManyWithWhereWithoutUserInput | LabelUpdateManyWithWhereWithoutUserInput[] - deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] - } - - export type NotebookUpdateManyWithoutUserNestedInput = { - create?: XOR | NotebookCreateWithoutUserInput[] | NotebookUncheckedCreateWithoutUserInput[] - connectOrCreate?: NotebookCreateOrConnectWithoutUserInput | NotebookCreateOrConnectWithoutUserInput[] - upsert?: NotebookUpsertWithWhereUniqueWithoutUserInput | NotebookUpsertWithWhereUniqueWithoutUserInput[] - createMany?: NotebookCreateManyUserInputEnvelope - set?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - disconnect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - delete?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - connect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - update?: NotebookUpdateWithWhereUniqueWithoutUserInput | NotebookUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: NotebookUpdateManyWithWhereWithoutUserInput | NotebookUpdateManyWithWhereWithoutUserInput[] - deleteMany?: NotebookScalarWhereInput | NotebookScalarWhereInput[] - } - - export type NoteShareUpdateManyWithoutUserNestedInput = { - create?: XOR | NoteShareCreateWithoutUserInput[] | NoteShareUncheckedCreateWithoutUserInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutUserInput | NoteShareCreateOrConnectWithoutUserInput[] - upsert?: NoteShareUpsertWithWhereUniqueWithoutUserInput | NoteShareUpsertWithWhereUniqueWithoutUserInput[] - createMany?: NoteShareCreateManyUserInputEnvelope - set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - update?: NoteShareUpdateWithWhereUniqueWithoutUserInput | NoteShareUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: NoteShareUpdateManyWithWhereWithoutUserInput | NoteShareUpdateManyWithWhereWithoutUserInput[] - deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] - } - - export type NoteShareUpdateManyWithoutSharerNestedInput = { - create?: XOR | NoteShareCreateWithoutSharerInput[] | NoteShareUncheckedCreateWithoutSharerInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutSharerInput | NoteShareCreateOrConnectWithoutSharerInput[] - upsert?: NoteShareUpsertWithWhereUniqueWithoutSharerInput | NoteShareUpsertWithWhereUniqueWithoutSharerInput[] - createMany?: NoteShareCreateManySharerInputEnvelope - set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - update?: NoteShareUpdateWithWhereUniqueWithoutSharerInput | NoteShareUpdateWithWhereUniqueWithoutSharerInput[] - updateMany?: NoteShareUpdateManyWithWhereWithoutSharerInput | NoteShareUpdateManyWithWhereWithoutSharerInput[] - deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] - } - - export type AiFeedbackUpdateManyWithoutUserNestedInput = { - create?: XOR | AiFeedbackCreateWithoutUserInput[] | AiFeedbackUncheckedCreateWithoutUserInput[] - connectOrCreate?: AiFeedbackCreateOrConnectWithoutUserInput | AiFeedbackCreateOrConnectWithoutUserInput[] - upsert?: AiFeedbackUpsertWithWhereUniqueWithoutUserInput | AiFeedbackUpsertWithWhereUniqueWithoutUserInput[] - createMany?: AiFeedbackCreateManyUserInputEnvelope - set?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - disconnect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - delete?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - update?: AiFeedbackUpdateWithWhereUniqueWithoutUserInput | AiFeedbackUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: AiFeedbackUpdateManyWithWhereWithoutUserInput | AiFeedbackUpdateManyWithWhereWithoutUserInput[] - deleteMany?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] - } - - export type UserAISettingsUpdateOneWithoutUserNestedInput = { - create?: XOR - connectOrCreate?: UserAISettingsCreateOrConnectWithoutUserInput - upsert?: UserAISettingsUpsertWithoutUserInput - disconnect?: UserAISettingsWhereInput | boolean - delete?: UserAISettingsWhereInput | boolean - connect?: UserAISettingsWhereUniqueInput - update?: XOR, UserAISettingsUncheckedUpdateWithoutUserInput> - } - - export type MemoryEchoInsightUpdateManyWithoutUserNestedInput = { - create?: XOR | MemoryEchoInsightCreateWithoutUserInput[] | MemoryEchoInsightUncheckedCreateWithoutUserInput[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutUserInput | MemoryEchoInsightCreateOrConnectWithoutUserInput[] - upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput | MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput[] - createMany?: MemoryEchoInsightCreateManyUserInputEnvelope - set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput | MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutUserInput | MemoryEchoInsightUpdateManyWithWhereWithoutUserInput[] - deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] - } - - export type AccountUncheckedUpdateManyWithoutUserNestedInput = { - create?: XOR | AccountCreateWithoutUserInput[] | AccountUncheckedCreateWithoutUserInput[] - connectOrCreate?: AccountCreateOrConnectWithoutUserInput | AccountCreateOrConnectWithoutUserInput[] - upsert?: AccountUpsertWithWhereUniqueWithoutUserInput | AccountUpsertWithWhereUniqueWithoutUserInput[] - createMany?: AccountCreateManyUserInputEnvelope - set?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - disconnect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - delete?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - connect?: AccountWhereUniqueInput | AccountWhereUniqueInput[] - update?: AccountUpdateWithWhereUniqueWithoutUserInput | AccountUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: AccountUpdateManyWithWhereWithoutUserInput | AccountUpdateManyWithWhereWithoutUserInput[] - deleteMany?: AccountScalarWhereInput | AccountScalarWhereInput[] - } - - export type SessionUncheckedUpdateManyWithoutUserNestedInput = { - create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] - connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] - upsert?: SessionUpsertWithWhereUniqueWithoutUserInput | SessionUpsertWithWhereUniqueWithoutUserInput[] - createMany?: SessionCreateManyUserInputEnvelope - set?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - disconnect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - delete?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] - update?: SessionUpdateWithWhereUniqueWithoutUserInput | SessionUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: SessionUpdateManyWithWhereWithoutUserInput | SessionUpdateManyWithWhereWithoutUserInput[] - deleteMany?: SessionScalarWhereInput | SessionScalarWhereInput[] - } - - export type NoteUncheckedUpdateManyWithoutUserNestedInput = { - create?: XOR | NoteCreateWithoutUserInput[] | NoteUncheckedCreateWithoutUserInput[] - connectOrCreate?: NoteCreateOrConnectWithoutUserInput | NoteCreateOrConnectWithoutUserInput[] - upsert?: NoteUpsertWithWhereUniqueWithoutUserInput | NoteUpsertWithWhereUniqueWithoutUserInput[] - createMany?: NoteCreateManyUserInputEnvelope - set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - update?: NoteUpdateWithWhereUniqueWithoutUserInput | NoteUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: NoteUpdateManyWithWhereWithoutUserInput | NoteUpdateManyWithWhereWithoutUserInput[] - deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] - } - - export type LabelUncheckedUpdateManyWithoutUserNestedInput = { - create?: XOR | LabelCreateWithoutUserInput[] | LabelUncheckedCreateWithoutUserInput[] - connectOrCreate?: LabelCreateOrConnectWithoutUserInput | LabelCreateOrConnectWithoutUserInput[] - upsert?: LabelUpsertWithWhereUniqueWithoutUserInput | LabelUpsertWithWhereUniqueWithoutUserInput[] - createMany?: LabelCreateManyUserInputEnvelope - set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - update?: LabelUpdateWithWhereUniqueWithoutUserInput | LabelUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: LabelUpdateManyWithWhereWithoutUserInput | LabelUpdateManyWithWhereWithoutUserInput[] - deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] - } - - export type NotebookUncheckedUpdateManyWithoutUserNestedInput = { - create?: XOR | NotebookCreateWithoutUserInput[] | NotebookUncheckedCreateWithoutUserInput[] - connectOrCreate?: NotebookCreateOrConnectWithoutUserInput | NotebookCreateOrConnectWithoutUserInput[] - upsert?: NotebookUpsertWithWhereUniqueWithoutUserInput | NotebookUpsertWithWhereUniqueWithoutUserInput[] - createMany?: NotebookCreateManyUserInputEnvelope - set?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - disconnect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - delete?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - connect?: NotebookWhereUniqueInput | NotebookWhereUniqueInput[] - update?: NotebookUpdateWithWhereUniqueWithoutUserInput | NotebookUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: NotebookUpdateManyWithWhereWithoutUserInput | NotebookUpdateManyWithWhereWithoutUserInput[] - deleteMany?: NotebookScalarWhereInput | NotebookScalarWhereInput[] - } - - export type NoteShareUncheckedUpdateManyWithoutUserNestedInput = { - create?: XOR | NoteShareCreateWithoutUserInput[] | NoteShareUncheckedCreateWithoutUserInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutUserInput | NoteShareCreateOrConnectWithoutUserInput[] - upsert?: NoteShareUpsertWithWhereUniqueWithoutUserInput | NoteShareUpsertWithWhereUniqueWithoutUserInput[] - createMany?: NoteShareCreateManyUserInputEnvelope - set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - update?: NoteShareUpdateWithWhereUniqueWithoutUserInput | NoteShareUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: NoteShareUpdateManyWithWhereWithoutUserInput | NoteShareUpdateManyWithWhereWithoutUserInput[] - deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] - } - - export type NoteShareUncheckedUpdateManyWithoutSharerNestedInput = { - create?: XOR | NoteShareCreateWithoutSharerInput[] | NoteShareUncheckedCreateWithoutSharerInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutSharerInput | NoteShareCreateOrConnectWithoutSharerInput[] - upsert?: NoteShareUpsertWithWhereUniqueWithoutSharerInput | NoteShareUpsertWithWhereUniqueWithoutSharerInput[] - createMany?: NoteShareCreateManySharerInputEnvelope - set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - update?: NoteShareUpdateWithWhereUniqueWithoutSharerInput | NoteShareUpdateWithWhereUniqueWithoutSharerInput[] - updateMany?: NoteShareUpdateManyWithWhereWithoutSharerInput | NoteShareUpdateManyWithWhereWithoutSharerInput[] - deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] - } - - export type AiFeedbackUncheckedUpdateManyWithoutUserNestedInput = { - create?: XOR | AiFeedbackCreateWithoutUserInput[] | AiFeedbackUncheckedCreateWithoutUserInput[] - connectOrCreate?: AiFeedbackCreateOrConnectWithoutUserInput | AiFeedbackCreateOrConnectWithoutUserInput[] - upsert?: AiFeedbackUpsertWithWhereUniqueWithoutUserInput | AiFeedbackUpsertWithWhereUniqueWithoutUserInput[] - createMany?: AiFeedbackCreateManyUserInputEnvelope - set?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - disconnect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - delete?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - update?: AiFeedbackUpdateWithWhereUniqueWithoutUserInput | AiFeedbackUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: AiFeedbackUpdateManyWithWhereWithoutUserInput | AiFeedbackUpdateManyWithWhereWithoutUserInput[] - deleteMany?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] - } - - export type UserAISettingsUncheckedUpdateOneWithoutUserNestedInput = { - create?: XOR - connectOrCreate?: UserAISettingsCreateOrConnectWithoutUserInput - upsert?: UserAISettingsUpsertWithoutUserInput - disconnect?: UserAISettingsWhereInput | boolean - delete?: UserAISettingsWhereInput | boolean - connect?: UserAISettingsWhereUniqueInput - update?: XOR, UserAISettingsUncheckedUpdateWithoutUserInput> - } - - export type MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput = { - create?: XOR | MemoryEchoInsightCreateWithoutUserInput[] | MemoryEchoInsightUncheckedCreateWithoutUserInput[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutUserInput | MemoryEchoInsightCreateOrConnectWithoutUserInput[] - upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput | MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput[] - createMany?: MemoryEchoInsightCreateManyUserInputEnvelope - set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput | MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutUserInput | MemoryEchoInsightUpdateManyWithWhereWithoutUserInput[] - deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] - } - - export type UserCreateNestedOneWithoutAccountsInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutAccountsInput - connect?: UserWhereUniqueInput - } - - export type NullableIntFieldUpdateOperationsInput = { - set?: number | null - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type UserUpdateOneRequiredWithoutAccountsNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutAccountsInput - upsert?: UserUpsertWithoutAccountsInput - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutAccountsInput> - } - - export type UserCreateNestedOneWithoutSessionsInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutSessionsInput - connect?: UserWhereUniqueInput - } - - export type UserUpdateOneRequiredWithoutSessionsNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutSessionsInput - upsert?: UserUpsertWithoutSessionsInput - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutSessionsInput> - } - - export type UserCreateNestedOneWithoutNotebooksInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutNotebooksInput - connect?: UserWhereUniqueInput - } - - export type NoteCreateNestedManyWithoutNotebookInput = { - create?: XOR | NoteCreateWithoutNotebookInput[] | NoteUncheckedCreateWithoutNotebookInput[] - connectOrCreate?: NoteCreateOrConnectWithoutNotebookInput | NoteCreateOrConnectWithoutNotebookInput[] - createMany?: NoteCreateManyNotebookInputEnvelope - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - } - - export type LabelCreateNestedManyWithoutNotebookInput = { - create?: XOR | LabelCreateWithoutNotebookInput[] | LabelUncheckedCreateWithoutNotebookInput[] - connectOrCreate?: LabelCreateOrConnectWithoutNotebookInput | LabelCreateOrConnectWithoutNotebookInput[] - createMany?: LabelCreateManyNotebookInputEnvelope - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - } - - export type NoteUncheckedCreateNestedManyWithoutNotebookInput = { - create?: XOR | NoteCreateWithoutNotebookInput[] | NoteUncheckedCreateWithoutNotebookInput[] - connectOrCreate?: NoteCreateOrConnectWithoutNotebookInput | NoteCreateOrConnectWithoutNotebookInput[] - createMany?: NoteCreateManyNotebookInputEnvelope - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - } - - export type LabelUncheckedCreateNestedManyWithoutNotebookInput = { - create?: XOR | LabelCreateWithoutNotebookInput[] | LabelUncheckedCreateWithoutNotebookInput[] - connectOrCreate?: LabelCreateOrConnectWithoutNotebookInput | LabelCreateOrConnectWithoutNotebookInput[] - createMany?: LabelCreateManyNotebookInputEnvelope - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - } - - export type IntFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type UserUpdateOneRequiredWithoutNotebooksNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutNotebooksInput - upsert?: UserUpsertWithoutNotebooksInput - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutNotebooksInput> - } - - export type NoteUpdateManyWithoutNotebookNestedInput = { - create?: XOR | NoteCreateWithoutNotebookInput[] | NoteUncheckedCreateWithoutNotebookInput[] - connectOrCreate?: NoteCreateOrConnectWithoutNotebookInput | NoteCreateOrConnectWithoutNotebookInput[] - upsert?: NoteUpsertWithWhereUniqueWithoutNotebookInput | NoteUpsertWithWhereUniqueWithoutNotebookInput[] - createMany?: NoteCreateManyNotebookInputEnvelope - set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - update?: NoteUpdateWithWhereUniqueWithoutNotebookInput | NoteUpdateWithWhereUniqueWithoutNotebookInput[] - updateMany?: NoteUpdateManyWithWhereWithoutNotebookInput | NoteUpdateManyWithWhereWithoutNotebookInput[] - deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] - } - - export type LabelUpdateManyWithoutNotebookNestedInput = { - create?: XOR | LabelCreateWithoutNotebookInput[] | LabelUncheckedCreateWithoutNotebookInput[] - connectOrCreate?: LabelCreateOrConnectWithoutNotebookInput | LabelCreateOrConnectWithoutNotebookInput[] - upsert?: LabelUpsertWithWhereUniqueWithoutNotebookInput | LabelUpsertWithWhereUniqueWithoutNotebookInput[] - createMany?: LabelCreateManyNotebookInputEnvelope - set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - update?: LabelUpdateWithWhereUniqueWithoutNotebookInput | LabelUpdateWithWhereUniqueWithoutNotebookInput[] - updateMany?: LabelUpdateManyWithWhereWithoutNotebookInput | LabelUpdateManyWithWhereWithoutNotebookInput[] - deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] - } - - export type NoteUncheckedUpdateManyWithoutNotebookNestedInput = { - create?: XOR | NoteCreateWithoutNotebookInput[] | NoteUncheckedCreateWithoutNotebookInput[] - connectOrCreate?: NoteCreateOrConnectWithoutNotebookInput | NoteCreateOrConnectWithoutNotebookInput[] - upsert?: NoteUpsertWithWhereUniqueWithoutNotebookInput | NoteUpsertWithWhereUniqueWithoutNotebookInput[] - createMany?: NoteCreateManyNotebookInputEnvelope - set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - update?: NoteUpdateWithWhereUniqueWithoutNotebookInput | NoteUpdateWithWhereUniqueWithoutNotebookInput[] - updateMany?: NoteUpdateManyWithWhereWithoutNotebookInput | NoteUpdateManyWithWhereWithoutNotebookInput[] - deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] - } - - export type LabelUncheckedUpdateManyWithoutNotebookNestedInput = { - create?: XOR | LabelCreateWithoutNotebookInput[] | LabelUncheckedCreateWithoutNotebookInput[] - connectOrCreate?: LabelCreateOrConnectWithoutNotebookInput | LabelCreateOrConnectWithoutNotebookInput[] - upsert?: LabelUpsertWithWhereUniqueWithoutNotebookInput | LabelUpsertWithWhereUniqueWithoutNotebookInput[] - createMany?: LabelCreateManyNotebookInputEnvelope - set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - update?: LabelUpdateWithWhereUniqueWithoutNotebookInput | LabelUpdateWithWhereUniqueWithoutNotebookInput[] - updateMany?: LabelUpdateManyWithWhereWithoutNotebookInput | LabelUpdateManyWithWhereWithoutNotebookInput[] - deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] - } - - export type NotebookCreateNestedOneWithoutLabelsInput = { - create?: XOR - connectOrCreate?: NotebookCreateOrConnectWithoutLabelsInput - connect?: NotebookWhereUniqueInput - } - - export type NoteCreateNestedManyWithoutLabelRelationsInput = { - create?: XOR | NoteCreateWithoutLabelRelationsInput[] | NoteUncheckedCreateWithoutLabelRelationsInput[] - connectOrCreate?: NoteCreateOrConnectWithoutLabelRelationsInput | NoteCreateOrConnectWithoutLabelRelationsInput[] - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - } - - export type UserCreateNestedOneWithoutLabelsInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutLabelsInput - connect?: UserWhereUniqueInput - } - - export type NoteUncheckedCreateNestedManyWithoutLabelRelationsInput = { - create?: XOR | NoteCreateWithoutLabelRelationsInput[] | NoteUncheckedCreateWithoutLabelRelationsInput[] - connectOrCreate?: NoteCreateOrConnectWithoutLabelRelationsInput | NoteCreateOrConnectWithoutLabelRelationsInput[] - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - } - - export type NotebookUpdateOneWithoutLabelsNestedInput = { - create?: XOR - connectOrCreate?: NotebookCreateOrConnectWithoutLabelsInput - upsert?: NotebookUpsertWithoutLabelsInput - disconnect?: NotebookWhereInput | boolean - delete?: NotebookWhereInput | boolean - connect?: NotebookWhereUniqueInput - update?: XOR, NotebookUncheckedUpdateWithoutLabelsInput> - } - - export type NoteUpdateManyWithoutLabelRelationsNestedInput = { - create?: XOR | NoteCreateWithoutLabelRelationsInput[] | NoteUncheckedCreateWithoutLabelRelationsInput[] - connectOrCreate?: NoteCreateOrConnectWithoutLabelRelationsInput | NoteCreateOrConnectWithoutLabelRelationsInput[] - upsert?: NoteUpsertWithWhereUniqueWithoutLabelRelationsInput | NoteUpsertWithWhereUniqueWithoutLabelRelationsInput[] - set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - update?: NoteUpdateWithWhereUniqueWithoutLabelRelationsInput | NoteUpdateWithWhereUniqueWithoutLabelRelationsInput[] - updateMany?: NoteUpdateManyWithWhereWithoutLabelRelationsInput | NoteUpdateManyWithWhereWithoutLabelRelationsInput[] - deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] - } - - export type UserUpdateOneWithoutLabelsNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutLabelsInput - upsert?: UserUpsertWithoutLabelsInput - disconnect?: UserWhereInput | boolean - delete?: UserWhereInput | boolean - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutLabelsInput> - } - - export type NoteUncheckedUpdateManyWithoutLabelRelationsNestedInput = { - create?: XOR | NoteCreateWithoutLabelRelationsInput[] | NoteUncheckedCreateWithoutLabelRelationsInput[] - connectOrCreate?: NoteCreateOrConnectWithoutLabelRelationsInput | NoteCreateOrConnectWithoutLabelRelationsInput[] - upsert?: NoteUpsertWithWhereUniqueWithoutLabelRelationsInput | NoteUpsertWithWhereUniqueWithoutLabelRelationsInput[] - set?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - disconnect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - delete?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - connect?: NoteWhereUniqueInput | NoteWhereUniqueInput[] - update?: NoteUpdateWithWhereUniqueWithoutLabelRelationsInput | NoteUpdateWithWhereUniqueWithoutLabelRelationsInput[] - updateMany?: NoteUpdateManyWithWhereWithoutLabelRelationsInput | NoteUpdateManyWithWhereWithoutLabelRelationsInput[] - deleteMany?: NoteScalarWhereInput | NoteScalarWhereInput[] - } - - export type UserCreateNestedOneWithoutNotesInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutNotesInput - connect?: UserWhereUniqueInput - } - - export type NoteShareCreateNestedManyWithoutNoteInput = { - create?: XOR | NoteShareCreateWithoutNoteInput[] | NoteShareUncheckedCreateWithoutNoteInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutNoteInput | NoteShareCreateOrConnectWithoutNoteInput[] - createMany?: NoteShareCreateManyNoteInputEnvelope - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - } - - export type NotebookCreateNestedOneWithoutNotesInput = { - create?: XOR - connectOrCreate?: NotebookCreateOrConnectWithoutNotesInput - connect?: NotebookWhereUniqueInput - } - - export type LabelCreateNestedManyWithoutNotesInput = { - create?: XOR | LabelCreateWithoutNotesInput[] | LabelUncheckedCreateWithoutNotesInput[] - connectOrCreate?: LabelCreateOrConnectWithoutNotesInput | LabelCreateOrConnectWithoutNotesInput[] - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - } - - export type AiFeedbackCreateNestedManyWithoutNoteInput = { - create?: XOR | AiFeedbackCreateWithoutNoteInput[] | AiFeedbackUncheckedCreateWithoutNoteInput[] - connectOrCreate?: AiFeedbackCreateOrConnectWithoutNoteInput | AiFeedbackCreateOrConnectWithoutNoteInput[] - createMany?: AiFeedbackCreateManyNoteInputEnvelope - connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - } - - export type MemoryEchoInsightCreateNestedManyWithoutNote1Input = { - create?: XOR | MemoryEchoInsightCreateWithoutNote1Input[] | MemoryEchoInsightUncheckedCreateWithoutNote1Input[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote1Input | MemoryEchoInsightCreateOrConnectWithoutNote1Input[] - createMany?: MemoryEchoInsightCreateManyNote1InputEnvelope - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - } - - export type MemoryEchoInsightCreateNestedManyWithoutNote2Input = { - create?: XOR | MemoryEchoInsightCreateWithoutNote2Input[] | MemoryEchoInsightUncheckedCreateWithoutNote2Input[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote2Input | MemoryEchoInsightCreateOrConnectWithoutNote2Input[] - createMany?: MemoryEchoInsightCreateManyNote2InputEnvelope - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - } - - export type NoteShareUncheckedCreateNestedManyWithoutNoteInput = { - create?: XOR | NoteShareCreateWithoutNoteInput[] | NoteShareUncheckedCreateWithoutNoteInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutNoteInput | NoteShareCreateOrConnectWithoutNoteInput[] - createMany?: NoteShareCreateManyNoteInputEnvelope - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - } - - export type LabelUncheckedCreateNestedManyWithoutNotesInput = { - create?: XOR | LabelCreateWithoutNotesInput[] | LabelUncheckedCreateWithoutNotesInput[] - connectOrCreate?: LabelCreateOrConnectWithoutNotesInput | LabelCreateOrConnectWithoutNotesInput[] - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - } - - export type AiFeedbackUncheckedCreateNestedManyWithoutNoteInput = { - create?: XOR | AiFeedbackCreateWithoutNoteInput[] | AiFeedbackUncheckedCreateWithoutNoteInput[] - connectOrCreate?: AiFeedbackCreateOrConnectWithoutNoteInput | AiFeedbackCreateOrConnectWithoutNoteInput[] - createMany?: AiFeedbackCreateManyNoteInputEnvelope - connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - } - - export type MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input = { - create?: XOR | MemoryEchoInsightCreateWithoutNote1Input[] | MemoryEchoInsightUncheckedCreateWithoutNote1Input[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote1Input | MemoryEchoInsightCreateOrConnectWithoutNote1Input[] - createMany?: MemoryEchoInsightCreateManyNote1InputEnvelope - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - } - - export type MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input = { - create?: XOR | MemoryEchoInsightCreateWithoutNote2Input[] | MemoryEchoInsightUncheckedCreateWithoutNote2Input[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote2Input | MemoryEchoInsightCreateOrConnectWithoutNote2Input[] - createMany?: MemoryEchoInsightCreateManyNote2InputEnvelope - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - } - - export type BoolFieldUpdateOperationsInput = { - set?: boolean - } - - export type NullableBoolFieldUpdateOperationsInput = { - set?: boolean | null - } - - export type NullableFloatFieldUpdateOperationsInput = { - set?: number | null - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type UserUpdateOneWithoutNotesNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutNotesInput - upsert?: UserUpsertWithoutNotesInput - disconnect?: UserWhereInput | boolean - delete?: UserWhereInput | boolean - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutNotesInput> - } - - export type NoteShareUpdateManyWithoutNoteNestedInput = { - create?: XOR | NoteShareCreateWithoutNoteInput[] | NoteShareUncheckedCreateWithoutNoteInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutNoteInput | NoteShareCreateOrConnectWithoutNoteInput[] - upsert?: NoteShareUpsertWithWhereUniqueWithoutNoteInput | NoteShareUpsertWithWhereUniqueWithoutNoteInput[] - createMany?: NoteShareCreateManyNoteInputEnvelope - set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - update?: NoteShareUpdateWithWhereUniqueWithoutNoteInput | NoteShareUpdateWithWhereUniqueWithoutNoteInput[] - updateMany?: NoteShareUpdateManyWithWhereWithoutNoteInput | NoteShareUpdateManyWithWhereWithoutNoteInput[] - deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] - } - - export type NotebookUpdateOneWithoutNotesNestedInput = { - create?: XOR - connectOrCreate?: NotebookCreateOrConnectWithoutNotesInput - upsert?: NotebookUpsertWithoutNotesInput - disconnect?: NotebookWhereInput | boolean - delete?: NotebookWhereInput | boolean - connect?: NotebookWhereUniqueInput - update?: XOR, NotebookUncheckedUpdateWithoutNotesInput> - } - - export type LabelUpdateManyWithoutNotesNestedInput = { - create?: XOR | LabelCreateWithoutNotesInput[] | LabelUncheckedCreateWithoutNotesInput[] - connectOrCreate?: LabelCreateOrConnectWithoutNotesInput | LabelCreateOrConnectWithoutNotesInput[] - upsert?: LabelUpsertWithWhereUniqueWithoutNotesInput | LabelUpsertWithWhereUniqueWithoutNotesInput[] - set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - update?: LabelUpdateWithWhereUniqueWithoutNotesInput | LabelUpdateWithWhereUniqueWithoutNotesInput[] - updateMany?: LabelUpdateManyWithWhereWithoutNotesInput | LabelUpdateManyWithWhereWithoutNotesInput[] - deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] - } - - export type AiFeedbackUpdateManyWithoutNoteNestedInput = { - create?: XOR | AiFeedbackCreateWithoutNoteInput[] | AiFeedbackUncheckedCreateWithoutNoteInput[] - connectOrCreate?: AiFeedbackCreateOrConnectWithoutNoteInput | AiFeedbackCreateOrConnectWithoutNoteInput[] - upsert?: AiFeedbackUpsertWithWhereUniqueWithoutNoteInput | AiFeedbackUpsertWithWhereUniqueWithoutNoteInput[] - createMany?: AiFeedbackCreateManyNoteInputEnvelope - set?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - disconnect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - delete?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - update?: AiFeedbackUpdateWithWhereUniqueWithoutNoteInput | AiFeedbackUpdateWithWhereUniqueWithoutNoteInput[] - updateMany?: AiFeedbackUpdateManyWithWhereWithoutNoteInput | AiFeedbackUpdateManyWithWhereWithoutNoteInput[] - deleteMany?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] - } - - export type MemoryEchoInsightUpdateManyWithoutNote1NestedInput = { - create?: XOR | MemoryEchoInsightCreateWithoutNote1Input[] | MemoryEchoInsightUncheckedCreateWithoutNote1Input[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote1Input | MemoryEchoInsightCreateOrConnectWithoutNote1Input[] - upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input | MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input[] - createMany?: MemoryEchoInsightCreateManyNote1InputEnvelope - set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input | MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input[] - updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input | MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input[] - deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] - } - - export type MemoryEchoInsightUpdateManyWithoutNote2NestedInput = { - create?: XOR | MemoryEchoInsightCreateWithoutNote2Input[] | MemoryEchoInsightUncheckedCreateWithoutNote2Input[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote2Input | MemoryEchoInsightCreateOrConnectWithoutNote2Input[] - upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input | MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input[] - createMany?: MemoryEchoInsightCreateManyNote2InputEnvelope - set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input | MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input[] - updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input | MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input[] - deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] - } - - export type NoteShareUncheckedUpdateManyWithoutNoteNestedInput = { - create?: XOR | NoteShareCreateWithoutNoteInput[] | NoteShareUncheckedCreateWithoutNoteInput[] - connectOrCreate?: NoteShareCreateOrConnectWithoutNoteInput | NoteShareCreateOrConnectWithoutNoteInput[] - upsert?: NoteShareUpsertWithWhereUniqueWithoutNoteInput | NoteShareUpsertWithWhereUniqueWithoutNoteInput[] - createMany?: NoteShareCreateManyNoteInputEnvelope - set?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - disconnect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - delete?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - connect?: NoteShareWhereUniqueInput | NoteShareWhereUniqueInput[] - update?: NoteShareUpdateWithWhereUniqueWithoutNoteInput | NoteShareUpdateWithWhereUniqueWithoutNoteInput[] - updateMany?: NoteShareUpdateManyWithWhereWithoutNoteInput | NoteShareUpdateManyWithWhereWithoutNoteInput[] - deleteMany?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] - } - - export type LabelUncheckedUpdateManyWithoutNotesNestedInput = { - create?: XOR | LabelCreateWithoutNotesInput[] | LabelUncheckedCreateWithoutNotesInput[] - connectOrCreate?: LabelCreateOrConnectWithoutNotesInput | LabelCreateOrConnectWithoutNotesInput[] - upsert?: LabelUpsertWithWhereUniqueWithoutNotesInput | LabelUpsertWithWhereUniqueWithoutNotesInput[] - set?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - disconnect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - delete?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - connect?: LabelWhereUniqueInput | LabelWhereUniqueInput[] - update?: LabelUpdateWithWhereUniqueWithoutNotesInput | LabelUpdateWithWhereUniqueWithoutNotesInput[] - updateMany?: LabelUpdateManyWithWhereWithoutNotesInput | LabelUpdateManyWithWhereWithoutNotesInput[] - deleteMany?: LabelScalarWhereInput | LabelScalarWhereInput[] - } - - export type AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput = { - create?: XOR | AiFeedbackCreateWithoutNoteInput[] | AiFeedbackUncheckedCreateWithoutNoteInput[] - connectOrCreate?: AiFeedbackCreateOrConnectWithoutNoteInput | AiFeedbackCreateOrConnectWithoutNoteInput[] - upsert?: AiFeedbackUpsertWithWhereUniqueWithoutNoteInput | AiFeedbackUpsertWithWhereUniqueWithoutNoteInput[] - createMany?: AiFeedbackCreateManyNoteInputEnvelope - set?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - disconnect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - delete?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - connect?: AiFeedbackWhereUniqueInput | AiFeedbackWhereUniqueInput[] - update?: AiFeedbackUpdateWithWhereUniqueWithoutNoteInput | AiFeedbackUpdateWithWhereUniqueWithoutNoteInput[] - updateMany?: AiFeedbackUpdateManyWithWhereWithoutNoteInput | AiFeedbackUpdateManyWithWhereWithoutNoteInput[] - deleteMany?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] - } - - export type MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput = { - create?: XOR | MemoryEchoInsightCreateWithoutNote1Input[] | MemoryEchoInsightUncheckedCreateWithoutNote1Input[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote1Input | MemoryEchoInsightCreateOrConnectWithoutNote1Input[] - upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input | MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input[] - createMany?: MemoryEchoInsightCreateManyNote1InputEnvelope - set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input | MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input[] - updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input | MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input[] - deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] - } - - export type MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput = { - create?: XOR | MemoryEchoInsightCreateWithoutNote2Input[] | MemoryEchoInsightUncheckedCreateWithoutNote2Input[] - connectOrCreate?: MemoryEchoInsightCreateOrConnectWithoutNote2Input | MemoryEchoInsightCreateOrConnectWithoutNote2Input[] - upsert?: MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input | MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input[] - createMany?: MemoryEchoInsightCreateManyNote2InputEnvelope - set?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - disconnect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - delete?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - connect?: MemoryEchoInsightWhereUniqueInput | MemoryEchoInsightWhereUniqueInput[] - update?: MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input | MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input[] - updateMany?: MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input | MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input[] - deleteMany?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] - } - - export type NoteCreateNestedOneWithoutSharesInput = { - create?: XOR - connectOrCreate?: NoteCreateOrConnectWithoutSharesInput - connect?: NoteWhereUniqueInput - } - - export type UserCreateNestedOneWithoutReceivedSharesInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutReceivedSharesInput - connect?: UserWhereUniqueInput - } - - export type UserCreateNestedOneWithoutSentSharesInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutSentSharesInput - connect?: UserWhereUniqueInput - } - - export type NoteUpdateOneRequiredWithoutSharesNestedInput = { - create?: XOR - connectOrCreate?: NoteCreateOrConnectWithoutSharesInput - upsert?: NoteUpsertWithoutSharesInput - connect?: NoteWhereUniqueInput - update?: XOR, NoteUncheckedUpdateWithoutSharesInput> - } - - export type UserUpdateOneRequiredWithoutReceivedSharesNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutReceivedSharesInput - upsert?: UserUpsertWithoutReceivedSharesInput - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutReceivedSharesInput> - } - - export type UserUpdateOneRequiredWithoutSentSharesNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutSentSharesInput - upsert?: UserUpsertWithoutSentSharesInput - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutSentSharesInput> - } - - export type NoteCreateNestedOneWithoutAiFeedbackInput = { - create?: XOR - connectOrCreate?: NoteCreateOrConnectWithoutAiFeedbackInput - connect?: NoteWhereUniqueInput - } - - export type UserCreateNestedOneWithoutAiFeedbackInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutAiFeedbackInput - connect?: UserWhereUniqueInput - } - - export type NoteUpdateOneRequiredWithoutAiFeedbackNestedInput = { - create?: XOR - connectOrCreate?: NoteCreateOrConnectWithoutAiFeedbackInput - upsert?: NoteUpsertWithoutAiFeedbackInput - connect?: NoteWhereUniqueInput - update?: XOR, NoteUncheckedUpdateWithoutAiFeedbackInput> - } - - export type UserUpdateOneWithoutAiFeedbackNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutAiFeedbackInput - upsert?: UserUpsertWithoutAiFeedbackInput - disconnect?: UserWhereInput | boolean - delete?: UserWhereInput | boolean - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutAiFeedbackInput> - } - - export type NoteCreateNestedOneWithoutMemoryEchoAsNote1Input = { - create?: XOR - connectOrCreate?: NoteCreateOrConnectWithoutMemoryEchoAsNote1Input - connect?: NoteWhereUniqueInput - } - - export type NoteCreateNestedOneWithoutMemoryEchoAsNote2Input = { - create?: XOR - connectOrCreate?: NoteCreateOrConnectWithoutMemoryEchoAsNote2Input - connect?: NoteWhereUniqueInput - } - - export type UserCreateNestedOneWithoutMemoryEchoInsightsInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutMemoryEchoInsightsInput - connect?: UserWhereUniqueInput - } - - export type FloatFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number - } - - export type NoteUpdateOneRequiredWithoutMemoryEchoAsNote1NestedInput = { - create?: XOR - connectOrCreate?: NoteCreateOrConnectWithoutMemoryEchoAsNote1Input - upsert?: NoteUpsertWithoutMemoryEchoAsNote1Input - connect?: NoteWhereUniqueInput - update?: XOR, NoteUncheckedUpdateWithoutMemoryEchoAsNote1Input> - } - - export type NoteUpdateOneRequiredWithoutMemoryEchoAsNote2NestedInput = { - create?: XOR - connectOrCreate?: NoteCreateOrConnectWithoutMemoryEchoAsNote2Input - upsert?: NoteUpsertWithoutMemoryEchoAsNote2Input - connect?: NoteWhereUniqueInput - update?: XOR, NoteUncheckedUpdateWithoutMemoryEchoAsNote2Input> - } - - export type UserUpdateOneWithoutMemoryEchoInsightsNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutMemoryEchoInsightsInput - upsert?: UserUpsertWithoutMemoryEchoInsightsInput - disconnect?: UserWhereInput | boolean - delete?: UserWhereInput | boolean - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutMemoryEchoInsightsInput> - } - - export type UserCreateNestedOneWithoutAiSettingsInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutAiSettingsInput - connect?: UserWhereUniqueInput - } - - export type UserUpdateOneRequiredWithoutAiSettingsNestedInput = { - create?: XOR - connectOrCreate?: UserCreateOrConnectWithoutAiSettingsInput - upsert?: UserUpsertWithoutAiSettingsInput - connect?: UserWhereUniqueInput - update?: XOR, UserUncheckedUpdateWithoutAiSettingsInput> - } - - export type NestedStringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringFilter<$PrismaModel> | string - } - - export type NestedStringNullableFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringNullableFilter<$PrismaModel> | string | null - } - - export type NestedDateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null - } - - export type NestedDateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeFilter<$PrismaModel> | Date | string - } - - export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedStringFilter<$PrismaModel> - _max?: NestedStringFilter<$PrismaModel> - } - - export type NestedIntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntFilter<$PrismaModel> | number - } - - export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | StringFieldRefInput<$PrismaModel> - lte?: string | StringFieldRefInput<$PrismaModel> - gt?: string | StringFieldRefInput<$PrismaModel> - gte?: string | StringFieldRefInput<$PrismaModel> - contains?: string | StringFieldRefInput<$PrismaModel> - startsWith?: string | StringFieldRefInput<$PrismaModel> - endsWith?: string | StringFieldRefInput<$PrismaModel> - not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedStringNullableFilter<$PrismaModel> - _max?: NestedStringNullableFilter<$PrismaModel> - } - - export type NestedIntNullableFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableFilter<$PrismaModel> | number | null - } - - export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedDateTimeNullableFilter<$PrismaModel> - _max?: NestedDateTimeNullableFilter<$PrismaModel> - } - - export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedDateTimeFilter<$PrismaModel> - _max?: NestedDateTimeFilter<$PrismaModel> - } - - export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedIntNullableFilter<$PrismaModel> - _max?: NestedIntNullableFilter<$PrismaModel> - } - - export type NestedFloatNullableFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableFilter<$PrismaModel> | number | null - } - - export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | IntFieldRefInput<$PrismaModel> - lte?: number | IntFieldRefInput<$PrismaModel> - gt?: number | IntFieldRefInput<$PrismaModel> - gte?: number | IntFieldRefInput<$PrismaModel> - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedIntFilter<$PrismaModel> - _min?: NestedIntFilter<$PrismaModel> - _max?: NestedIntFilter<$PrismaModel> - } - - export type NestedFloatFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatFilter<$PrismaModel> | number - } - - export type NestedBoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolFilter<$PrismaModel> | boolean - } - - export type NestedBoolNullableFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null - not?: NestedBoolNullableFilter<$PrismaModel> | boolean | null - } - - export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: NestedIntFilter<$PrismaModel> - _min?: NestedBoolFilter<$PrismaModel> - _max?: NestedBoolFilter<$PrismaModel> - } - - export type NestedBoolNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel> | null - not?: NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedBoolNullableFilter<$PrismaModel> - _max?: NestedBoolNullableFilter<$PrismaModel> - } - - export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: NestedIntNullableFilter<$PrismaModel> - _avg?: NestedFloatNullableFilter<$PrismaModel> - _sum?: NestedFloatNullableFilter<$PrismaModel> - _min?: NestedFloatNullableFilter<$PrismaModel> - _max?: NestedFloatNullableFilter<$PrismaModel> - } - - export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - lt?: number | FloatFieldRefInput<$PrismaModel> - lte?: number | FloatFieldRefInput<$PrismaModel> - gt?: number | FloatFieldRefInput<$PrismaModel> - gte?: number | FloatFieldRefInput<$PrismaModel> - not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedFloatFilter<$PrismaModel> - _sum?: NestedFloatFilter<$PrismaModel> - _min?: NestedFloatFilter<$PrismaModel> - _max?: NestedFloatFilter<$PrismaModel> - } - - export type AccountCreateWithoutUserInput = { - type: string - provider: string - providerAccountId: string - refresh_token?: string | null - access_token?: string | null - expires_at?: number | null - token_type?: string | null - scope?: string | null - id_token?: string | null - session_state?: string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AccountUncheckedCreateWithoutUserInput = { - type: string - provider: string - providerAccountId: string - refresh_token?: string | null - access_token?: string | null - expires_at?: number | null - token_type?: string | null - scope?: string | null - id_token?: string | null - session_state?: string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AccountCreateOrConnectWithoutUserInput = { - where: AccountWhereUniqueInput - create: XOR - } - - export type AccountCreateManyUserInputEnvelope = { - data: AccountCreateManyUserInput | AccountCreateManyUserInput[] - } - - export type SessionCreateWithoutUserInput = { - sessionToken: string - expires: Date | string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type SessionUncheckedCreateWithoutUserInput = { - sessionToken: string - expires: Date | string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type SessionCreateOrConnectWithoutUserInput = { - where: SessionWhereUniqueInput - create: XOR - } - - export type SessionCreateManyUserInputEnvelope = { - data: SessionCreateManyUserInput | SessionCreateManyUserInput[] - } - - export type NoteCreateWithoutUserInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - shares?: NoteShareCreateNestedManyWithoutNoteInput - notebook?: NotebookCreateNestedOneWithoutNotesInput - labelRelations?: LabelCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input - } - - export type NoteUncheckedCreateWithoutUserInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput - labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input - } - - export type NoteCreateOrConnectWithoutUserInput = { - where: NoteWhereUniqueInput - create: XOR - } - - export type NoteCreateManyUserInputEnvelope = { - data: NoteCreateManyUserInput | NoteCreateManyUserInput[] - } - - export type LabelCreateWithoutUserInput = { - id?: string - name: string - color?: string - createdAt?: Date | string - updatedAt?: Date | string - notebook?: NotebookCreateNestedOneWithoutLabelsInput - notes?: NoteCreateNestedManyWithoutLabelRelationsInput - } - - export type LabelUncheckedCreateWithoutUserInput = { - id?: string - name: string - color?: string - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - notes?: NoteUncheckedCreateNestedManyWithoutLabelRelationsInput - } - - export type LabelCreateOrConnectWithoutUserInput = { - where: LabelWhereUniqueInput - create: XOR - } - - export type LabelCreateManyUserInputEnvelope = { - data: LabelCreateManyUserInput | LabelCreateManyUserInput[] - } - - export type NotebookCreateWithoutUserInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - createdAt?: Date | string - updatedAt?: Date | string - notes?: NoteCreateNestedManyWithoutNotebookInput - labels?: LabelCreateNestedManyWithoutNotebookInput - } - - export type NotebookUncheckedCreateWithoutUserInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - createdAt?: Date | string - updatedAt?: Date | string - notes?: NoteUncheckedCreateNestedManyWithoutNotebookInput - labels?: LabelUncheckedCreateNestedManyWithoutNotebookInput - } - - export type NotebookCreateOrConnectWithoutUserInput = { - where: NotebookWhereUniqueInput - create: XOR - } - - export type NotebookCreateManyUserInputEnvelope = { - data: NotebookCreateManyUserInput | NotebookCreateManyUserInput[] - } - - export type NoteShareCreateWithoutUserInput = { - id?: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - note: NoteCreateNestedOneWithoutSharesInput - sharer: UserCreateNestedOneWithoutSentSharesInput - } - - export type NoteShareUncheckedCreateWithoutUserInput = { - id?: string - noteId: string - sharedBy: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareCreateOrConnectWithoutUserInput = { - where: NoteShareWhereUniqueInput - create: XOR - } - - export type NoteShareCreateManyUserInputEnvelope = { - data: NoteShareCreateManyUserInput | NoteShareCreateManyUserInput[] - } - - export type NoteShareCreateWithoutSharerInput = { - id?: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - note: NoteCreateNestedOneWithoutSharesInput - user: UserCreateNestedOneWithoutReceivedSharesInput - } - - export type NoteShareUncheckedCreateWithoutSharerInput = { - id?: string - noteId: string - userId: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareCreateOrConnectWithoutSharerInput = { - where: NoteShareWhereUniqueInput - create: XOR - } - - export type NoteShareCreateManySharerInputEnvelope = { - data: NoteShareCreateManySharerInput | NoteShareCreateManySharerInput[] - } - - export type AiFeedbackCreateWithoutUserInput = { - id?: string - feedbackType: string - feature: string - originalContent: string - correctedContent?: string | null - metadata?: string | null - createdAt?: Date | string - note: NoteCreateNestedOneWithoutAiFeedbackInput - } - - export type AiFeedbackUncheckedCreateWithoutUserInput = { - id?: string - noteId: string - feedbackType: string - feature: string - originalContent: string - correctedContent?: string | null - metadata?: string | null - createdAt?: Date | string - } - - export type AiFeedbackCreateOrConnectWithoutUserInput = { - where: AiFeedbackWhereUniqueInput - create: XOR - } - - export type AiFeedbackCreateManyUserInputEnvelope = { - data: AiFeedbackCreateManyUserInput | AiFeedbackCreateManyUserInput[] - } - - export type UserAISettingsCreateWithoutUserInput = { - titleSuggestions?: boolean - semanticSearch?: boolean - paragraphRefactor?: boolean - memoryEcho?: boolean - memoryEchoFrequency?: string - aiProvider?: string - preferredLanguage?: string - fontSize?: string - demoMode?: boolean - } - - export type UserAISettingsUncheckedCreateWithoutUserInput = { - titleSuggestions?: boolean - semanticSearch?: boolean - paragraphRefactor?: boolean - memoryEcho?: boolean - memoryEchoFrequency?: string - aiProvider?: string - preferredLanguage?: string - fontSize?: string - demoMode?: boolean - } - - export type UserAISettingsCreateOrConnectWithoutUserInput = { - where: UserAISettingsWhereUniqueInput - create: XOR - } - - export type MemoryEchoInsightCreateWithoutUserInput = { - id?: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - note1: NoteCreateNestedOneWithoutMemoryEchoAsNote1Input - note2: NoteCreateNestedOneWithoutMemoryEchoAsNote2Input - } - - export type MemoryEchoInsightUncheckedCreateWithoutUserInput = { - id?: string - note1Id: string - note2Id: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - } - - export type MemoryEchoInsightCreateOrConnectWithoutUserInput = { - where: MemoryEchoInsightWhereUniqueInput - create: XOR - } - - export type MemoryEchoInsightCreateManyUserInputEnvelope = { - data: MemoryEchoInsightCreateManyUserInput | MemoryEchoInsightCreateManyUserInput[] - } - - export type AccountUpsertWithWhereUniqueWithoutUserInput = { - where: AccountWhereUniqueInput - update: XOR - create: XOR - } - - export type AccountUpdateWithWhereUniqueWithoutUserInput = { - where: AccountWhereUniqueInput - data: XOR - } - - export type AccountUpdateManyWithWhereWithoutUserInput = { - where: AccountScalarWhereInput - data: XOR - } - - export type AccountScalarWhereInput = { - AND?: AccountScalarWhereInput | AccountScalarWhereInput[] - OR?: AccountScalarWhereInput[] - NOT?: AccountScalarWhereInput | AccountScalarWhereInput[] - userId?: StringFilter<"Account"> | string - type?: StringFilter<"Account"> | string - provider?: StringFilter<"Account"> | string - providerAccountId?: StringFilter<"Account"> | string - refresh_token?: StringNullableFilter<"Account"> | string | null - access_token?: StringNullableFilter<"Account"> | string | null - expires_at?: IntNullableFilter<"Account"> | number | null - token_type?: StringNullableFilter<"Account"> | string | null - scope?: StringNullableFilter<"Account"> | string | null - id_token?: StringNullableFilter<"Account"> | string | null - session_state?: StringNullableFilter<"Account"> | string | null - createdAt?: DateTimeFilter<"Account"> | Date | string - updatedAt?: DateTimeFilter<"Account"> | Date | string - } - - export type SessionUpsertWithWhereUniqueWithoutUserInput = { - where: SessionWhereUniqueInput - update: XOR - create: XOR - } - - export type SessionUpdateWithWhereUniqueWithoutUserInput = { - where: SessionWhereUniqueInput - data: XOR - } - - export type SessionUpdateManyWithWhereWithoutUserInput = { - where: SessionScalarWhereInput - data: XOR - } - - export type SessionScalarWhereInput = { - AND?: SessionScalarWhereInput | SessionScalarWhereInput[] - OR?: SessionScalarWhereInput[] - NOT?: SessionScalarWhereInput | SessionScalarWhereInput[] - sessionToken?: StringFilter<"Session"> | string - userId?: StringFilter<"Session"> | string - expires?: DateTimeFilter<"Session"> | Date | string - createdAt?: DateTimeFilter<"Session"> | Date | string - updatedAt?: DateTimeFilter<"Session"> | Date | string - } - - export type NoteUpsertWithWhereUniqueWithoutUserInput = { - where: NoteWhereUniqueInput - update: XOR - create: XOR - } - - export type NoteUpdateWithWhereUniqueWithoutUserInput = { - where: NoteWhereUniqueInput - data: XOR - } - - export type NoteUpdateManyWithWhereWithoutUserInput = { - where: NoteScalarWhereInput - data: XOR - } - - export type NoteScalarWhereInput = { - AND?: NoteScalarWhereInput | NoteScalarWhereInput[] - OR?: NoteScalarWhereInput[] - NOT?: NoteScalarWhereInput | NoteScalarWhereInput[] - id?: StringFilter<"Note"> | string - title?: StringNullableFilter<"Note"> | string | null - content?: StringFilter<"Note"> | string - color?: StringFilter<"Note"> | string - isPinned?: BoolFilter<"Note"> | boolean - isArchived?: BoolFilter<"Note"> | boolean - type?: StringFilter<"Note"> | string - checkItems?: StringNullableFilter<"Note"> | string | null - labels?: StringNullableFilter<"Note"> | string | null - images?: StringNullableFilter<"Note"> | string | null - links?: StringNullableFilter<"Note"> | string | null - reminder?: DateTimeNullableFilter<"Note"> | Date | string | null - isReminderDone?: BoolFilter<"Note"> | boolean - reminderRecurrence?: StringNullableFilter<"Note"> | string | null - reminderLocation?: StringNullableFilter<"Note"> | string | null - isMarkdown?: BoolFilter<"Note"> | boolean - size?: StringFilter<"Note"> | string - embedding?: StringNullableFilter<"Note"> | string | null - sharedWith?: StringNullableFilter<"Note"> | string | null - userId?: StringNullableFilter<"Note"> | string | null - order?: IntFilter<"Note"> | number - notebookId?: StringNullableFilter<"Note"> | string | null - createdAt?: DateTimeFilter<"Note"> | Date | string - updatedAt?: DateTimeFilter<"Note"> | Date | string - autoGenerated?: BoolNullableFilter<"Note"> | boolean | null - aiProvider?: StringNullableFilter<"Note"> | string | null - aiConfidence?: IntNullableFilter<"Note"> | number | null - language?: StringNullableFilter<"Note"> | string | null - languageConfidence?: FloatNullableFilter<"Note"> | number | null - lastAiAnalysis?: DateTimeNullableFilter<"Note"> | Date | string | null - } - - export type LabelUpsertWithWhereUniqueWithoutUserInput = { - where: LabelWhereUniqueInput - update: XOR - create: XOR - } - - export type LabelUpdateWithWhereUniqueWithoutUserInput = { - where: LabelWhereUniqueInput - data: XOR - } - - export type LabelUpdateManyWithWhereWithoutUserInput = { - where: LabelScalarWhereInput - data: XOR - } - - export type LabelScalarWhereInput = { - AND?: LabelScalarWhereInput | LabelScalarWhereInput[] - OR?: LabelScalarWhereInput[] - NOT?: LabelScalarWhereInput | LabelScalarWhereInput[] - id?: StringFilter<"Label"> | string - name?: StringFilter<"Label"> | string - color?: StringFilter<"Label"> | string - notebookId?: StringNullableFilter<"Label"> | string | null - userId?: StringNullableFilter<"Label"> | string | null - createdAt?: DateTimeFilter<"Label"> | Date | string - updatedAt?: DateTimeFilter<"Label"> | Date | string - } - - export type NotebookUpsertWithWhereUniqueWithoutUserInput = { - where: NotebookWhereUniqueInput - update: XOR - create: XOR - } - - export type NotebookUpdateWithWhereUniqueWithoutUserInput = { - where: NotebookWhereUniqueInput - data: XOR - } - - export type NotebookUpdateManyWithWhereWithoutUserInput = { - where: NotebookScalarWhereInput - data: XOR - } - - export type NotebookScalarWhereInput = { - AND?: NotebookScalarWhereInput | NotebookScalarWhereInput[] - OR?: NotebookScalarWhereInput[] - NOT?: NotebookScalarWhereInput | NotebookScalarWhereInput[] - id?: StringFilter<"Notebook"> | string - name?: StringFilter<"Notebook"> | string - icon?: StringNullableFilter<"Notebook"> | string | null - color?: StringNullableFilter<"Notebook"> | string | null - order?: IntFilter<"Notebook"> | number - userId?: StringFilter<"Notebook"> | string - createdAt?: DateTimeFilter<"Notebook"> | Date | string - updatedAt?: DateTimeFilter<"Notebook"> | Date | string - } - - export type NoteShareUpsertWithWhereUniqueWithoutUserInput = { - where: NoteShareWhereUniqueInput - update: XOR - create: XOR - } - - export type NoteShareUpdateWithWhereUniqueWithoutUserInput = { - where: NoteShareWhereUniqueInput - data: XOR - } - - export type NoteShareUpdateManyWithWhereWithoutUserInput = { - where: NoteShareScalarWhereInput - data: XOR - } - - export type NoteShareScalarWhereInput = { - AND?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] - OR?: NoteShareScalarWhereInput[] - NOT?: NoteShareScalarWhereInput | NoteShareScalarWhereInput[] - id?: StringFilter<"NoteShare"> | string - noteId?: StringFilter<"NoteShare"> | string - userId?: StringFilter<"NoteShare"> | string - sharedBy?: StringFilter<"NoteShare"> | string - status?: StringFilter<"NoteShare"> | string - permission?: StringFilter<"NoteShare"> | string - notifiedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - respondedAt?: DateTimeNullableFilter<"NoteShare"> | Date | string | null - createdAt?: DateTimeFilter<"NoteShare"> | Date | string - updatedAt?: DateTimeFilter<"NoteShare"> | Date | string - } - - export type NoteShareUpsertWithWhereUniqueWithoutSharerInput = { - where: NoteShareWhereUniqueInput - update: XOR - create: XOR - } - - export type NoteShareUpdateWithWhereUniqueWithoutSharerInput = { - where: NoteShareWhereUniqueInput - data: XOR - } - - export type NoteShareUpdateManyWithWhereWithoutSharerInput = { - where: NoteShareScalarWhereInput - data: XOR - } - - export type AiFeedbackUpsertWithWhereUniqueWithoutUserInput = { - where: AiFeedbackWhereUniqueInput - update: XOR - create: XOR - } - - export type AiFeedbackUpdateWithWhereUniqueWithoutUserInput = { - where: AiFeedbackWhereUniqueInput - data: XOR - } - - export type AiFeedbackUpdateManyWithWhereWithoutUserInput = { - where: AiFeedbackScalarWhereInput - data: XOR - } - - export type AiFeedbackScalarWhereInput = { - AND?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] - OR?: AiFeedbackScalarWhereInput[] - NOT?: AiFeedbackScalarWhereInput | AiFeedbackScalarWhereInput[] - id?: StringFilter<"AiFeedback"> | string - noteId?: StringFilter<"AiFeedback"> | string - userId?: StringNullableFilter<"AiFeedback"> | string | null - feedbackType?: StringFilter<"AiFeedback"> | string - feature?: StringFilter<"AiFeedback"> | string - originalContent?: StringFilter<"AiFeedback"> | string - correctedContent?: StringNullableFilter<"AiFeedback"> | string | null - metadata?: StringNullableFilter<"AiFeedback"> | string | null - createdAt?: DateTimeFilter<"AiFeedback"> | Date | string - } - - export type UserAISettingsUpsertWithoutUserInput = { - update: XOR - create: XOR - where?: UserAISettingsWhereInput - } - - export type UserAISettingsUpdateToOneWithWhereWithoutUserInput = { - where?: UserAISettingsWhereInput - data: XOR - } - - export type UserAISettingsUpdateWithoutUserInput = { - titleSuggestions?: BoolFieldUpdateOperationsInput | boolean - semanticSearch?: BoolFieldUpdateOperationsInput | boolean - paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean - memoryEcho?: BoolFieldUpdateOperationsInput | boolean - memoryEchoFrequency?: StringFieldUpdateOperationsInput | string - aiProvider?: StringFieldUpdateOperationsInput | string - preferredLanguage?: StringFieldUpdateOperationsInput | string - fontSize?: StringFieldUpdateOperationsInput | string - demoMode?: BoolFieldUpdateOperationsInput | boolean - } - - export type UserAISettingsUncheckedUpdateWithoutUserInput = { - titleSuggestions?: BoolFieldUpdateOperationsInput | boolean - semanticSearch?: BoolFieldUpdateOperationsInput | boolean - paragraphRefactor?: BoolFieldUpdateOperationsInput | boolean - memoryEcho?: BoolFieldUpdateOperationsInput | boolean - memoryEchoFrequency?: StringFieldUpdateOperationsInput | string - aiProvider?: StringFieldUpdateOperationsInput | string - preferredLanguage?: StringFieldUpdateOperationsInput | string - fontSize?: StringFieldUpdateOperationsInput | string - demoMode?: BoolFieldUpdateOperationsInput | boolean - } - - export type MemoryEchoInsightUpsertWithWhereUniqueWithoutUserInput = { - where: MemoryEchoInsightWhereUniqueInput - update: XOR - create: XOR - } - - export type MemoryEchoInsightUpdateWithWhereUniqueWithoutUserInput = { - where: MemoryEchoInsightWhereUniqueInput - data: XOR - } - - export type MemoryEchoInsightUpdateManyWithWhereWithoutUserInput = { - where: MemoryEchoInsightScalarWhereInput - data: XOR - } - - export type MemoryEchoInsightScalarWhereInput = { - AND?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] - OR?: MemoryEchoInsightScalarWhereInput[] - NOT?: MemoryEchoInsightScalarWhereInput | MemoryEchoInsightScalarWhereInput[] - id?: StringFilter<"MemoryEchoInsight"> | string - userId?: StringNullableFilter<"MemoryEchoInsight"> | string | null - note1Id?: StringFilter<"MemoryEchoInsight"> | string - note2Id?: StringFilter<"MemoryEchoInsight"> | string - similarityScore?: FloatFilter<"MemoryEchoInsight"> | number - insight?: StringFilter<"MemoryEchoInsight"> | string - insightDate?: DateTimeFilter<"MemoryEchoInsight"> | Date | string - viewed?: BoolFilter<"MemoryEchoInsight"> | boolean - feedback?: StringNullableFilter<"MemoryEchoInsight"> | string | null - dismissed?: BoolFilter<"MemoryEchoInsight"> | boolean - } - - export type UserCreateWithoutAccountsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - sessions?: SessionCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutAccountsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutAccountsInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type UserUpsertWithoutAccountsInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutAccountsInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutAccountsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - sessions?: SessionUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutAccountsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type UserCreateWithoutSessionsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutSessionsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutSessionsInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type UserUpsertWithoutSessionsInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutSessionsInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutSessionsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutSessionsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type UserCreateWithoutNotebooksInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - sessions?: SessionCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutNotebooksInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutNotebooksInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type NoteCreateWithoutNotebookInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - user?: UserCreateNestedOneWithoutNotesInput - shares?: NoteShareCreateNestedManyWithoutNoteInput - labelRelations?: LabelCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input - } - - export type NoteUncheckedCreateWithoutNotebookInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput - labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input - } - - export type NoteCreateOrConnectWithoutNotebookInput = { - where: NoteWhereUniqueInput - create: XOR - } - - export type NoteCreateManyNotebookInputEnvelope = { - data: NoteCreateManyNotebookInput | NoteCreateManyNotebookInput[] - } - - export type LabelCreateWithoutNotebookInput = { - id?: string - name: string - color?: string - createdAt?: Date | string - updatedAt?: Date | string - notes?: NoteCreateNestedManyWithoutLabelRelationsInput - user?: UserCreateNestedOneWithoutLabelsInput - } - - export type LabelUncheckedCreateWithoutNotebookInput = { - id?: string - name: string - color?: string - userId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - notes?: NoteUncheckedCreateNestedManyWithoutLabelRelationsInput - } - - export type LabelCreateOrConnectWithoutNotebookInput = { - where: LabelWhereUniqueInput - create: XOR - } - - export type LabelCreateManyNotebookInputEnvelope = { - data: LabelCreateManyNotebookInput | LabelCreateManyNotebookInput[] - } - - export type UserUpsertWithoutNotebooksInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutNotebooksInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutNotebooksInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - sessions?: SessionUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutNotebooksInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type NoteUpsertWithWhereUniqueWithoutNotebookInput = { - where: NoteWhereUniqueInput - update: XOR - create: XOR - } - - export type NoteUpdateWithWhereUniqueWithoutNotebookInput = { - where: NoteWhereUniqueInput - data: XOR - } - - export type NoteUpdateManyWithWhereWithoutNotebookInput = { - where: NoteScalarWhereInput - data: XOR - } - - export type LabelUpsertWithWhereUniqueWithoutNotebookInput = { - where: LabelWhereUniqueInput - update: XOR - create: XOR - } - - export type LabelUpdateWithWhereUniqueWithoutNotebookInput = { - where: LabelWhereUniqueInput - data: XOR - } - - export type LabelUpdateManyWithWhereWithoutNotebookInput = { - where: LabelScalarWhereInput - data: XOR - } - - export type NotebookCreateWithoutLabelsInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - createdAt?: Date | string - updatedAt?: Date | string - user: UserCreateNestedOneWithoutNotebooksInput - notes?: NoteCreateNestedManyWithoutNotebookInput - } - - export type NotebookUncheckedCreateWithoutLabelsInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - userId: string - createdAt?: Date | string - updatedAt?: Date | string - notes?: NoteUncheckedCreateNestedManyWithoutNotebookInput - } - - export type NotebookCreateOrConnectWithoutLabelsInput = { - where: NotebookWhereUniqueInput - create: XOR - } - - export type NoteCreateWithoutLabelRelationsInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - user?: UserCreateNestedOneWithoutNotesInput - shares?: NoteShareCreateNestedManyWithoutNoteInput - notebook?: NotebookCreateNestedOneWithoutNotesInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input - } - - export type NoteUncheckedCreateWithoutLabelRelationsInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input - } - - export type NoteCreateOrConnectWithoutLabelRelationsInput = { - where: NoteWhereUniqueInput - create: XOR - } - - export type UserCreateWithoutLabelsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - sessions?: SessionCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutLabelsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutLabelsInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type NotebookUpsertWithoutLabelsInput = { - update: XOR - create: XOR - where?: NotebookWhereInput - } - - export type NotebookUpdateToOneWithWhereWithoutLabelsInput = { - where?: NotebookWhereInput - data: XOR - } - - export type NotebookUpdateWithoutLabelsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - user?: UserUpdateOneRequiredWithoutNotebooksNestedInput - notes?: NoteUpdateManyWithoutNotebookNestedInput - } - - export type NotebookUncheckedUpdateWithoutLabelsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - userId?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notes?: NoteUncheckedUpdateManyWithoutNotebookNestedInput - } - - export type NoteUpsertWithWhereUniqueWithoutLabelRelationsInput = { - where: NoteWhereUniqueInput - update: XOR - create: XOR - } - - export type NoteUpdateWithWhereUniqueWithoutLabelRelationsInput = { - where: NoteWhereUniqueInput - data: XOR - } - - export type NoteUpdateManyWithWhereWithoutLabelRelationsInput = { - where: NoteScalarWhereInput - data: XOR - } - - export type UserUpsertWithoutLabelsInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutLabelsInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutLabelsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - sessions?: SessionUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutLabelsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type UserCreateWithoutNotesInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - sessions?: SessionCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutNotesInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutNotesInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type NoteShareCreateWithoutNoteInput = { - id?: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - user: UserCreateNestedOneWithoutReceivedSharesInput - sharer: UserCreateNestedOneWithoutSentSharesInput - } - - export type NoteShareUncheckedCreateWithoutNoteInput = { - id?: string - userId: string - sharedBy: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareCreateOrConnectWithoutNoteInput = { - where: NoteShareWhereUniqueInput - create: XOR - } - - export type NoteShareCreateManyNoteInputEnvelope = { - data: NoteShareCreateManyNoteInput | NoteShareCreateManyNoteInput[] - } - - export type NotebookCreateWithoutNotesInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - createdAt?: Date | string - updatedAt?: Date | string - user: UserCreateNestedOneWithoutNotebooksInput - labels?: LabelCreateNestedManyWithoutNotebookInput - } - - export type NotebookUncheckedCreateWithoutNotesInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - userId: string - createdAt?: Date | string - updatedAt?: Date | string - labels?: LabelUncheckedCreateNestedManyWithoutNotebookInput - } - - export type NotebookCreateOrConnectWithoutNotesInput = { - where: NotebookWhereUniqueInput - create: XOR - } - - export type LabelCreateWithoutNotesInput = { - id?: string - name: string - color?: string - createdAt?: Date | string - updatedAt?: Date | string - notebook?: NotebookCreateNestedOneWithoutLabelsInput - user?: UserCreateNestedOneWithoutLabelsInput - } - - export type LabelUncheckedCreateWithoutNotesInput = { - id?: string - name: string - color?: string - notebookId?: string | null - userId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type LabelCreateOrConnectWithoutNotesInput = { - where: LabelWhereUniqueInput - create: XOR - } - - export type AiFeedbackCreateWithoutNoteInput = { - id?: string - feedbackType: string - feature: string - originalContent: string - correctedContent?: string | null - metadata?: string | null - createdAt?: Date | string - user?: UserCreateNestedOneWithoutAiFeedbackInput - } - - export type AiFeedbackUncheckedCreateWithoutNoteInput = { - id?: string - userId?: string | null - feedbackType: string - feature: string - originalContent: string - correctedContent?: string | null - metadata?: string | null - createdAt?: Date | string - } - - export type AiFeedbackCreateOrConnectWithoutNoteInput = { - where: AiFeedbackWhereUniqueInput - create: XOR - } - - export type AiFeedbackCreateManyNoteInputEnvelope = { - data: AiFeedbackCreateManyNoteInput | AiFeedbackCreateManyNoteInput[] - } - - export type MemoryEchoInsightCreateWithoutNote1Input = { - id?: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - note2: NoteCreateNestedOneWithoutMemoryEchoAsNote2Input - user?: UserCreateNestedOneWithoutMemoryEchoInsightsInput - } - - export type MemoryEchoInsightUncheckedCreateWithoutNote1Input = { - id?: string - userId?: string | null - note2Id: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - } - - export type MemoryEchoInsightCreateOrConnectWithoutNote1Input = { - where: MemoryEchoInsightWhereUniqueInput - create: XOR - } - - export type MemoryEchoInsightCreateManyNote1InputEnvelope = { - data: MemoryEchoInsightCreateManyNote1Input | MemoryEchoInsightCreateManyNote1Input[] - } - - export type MemoryEchoInsightCreateWithoutNote2Input = { - id?: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - note1: NoteCreateNestedOneWithoutMemoryEchoAsNote1Input - user?: UserCreateNestedOneWithoutMemoryEchoInsightsInput - } - - export type MemoryEchoInsightUncheckedCreateWithoutNote2Input = { - id?: string - userId?: string | null - note1Id: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - } - - export type MemoryEchoInsightCreateOrConnectWithoutNote2Input = { - where: MemoryEchoInsightWhereUniqueInput - create: XOR - } - - export type MemoryEchoInsightCreateManyNote2InputEnvelope = { - data: MemoryEchoInsightCreateManyNote2Input | MemoryEchoInsightCreateManyNote2Input[] - } - - export type UserUpsertWithoutNotesInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutNotesInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutNotesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - sessions?: SessionUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutNotesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type NoteShareUpsertWithWhereUniqueWithoutNoteInput = { - where: NoteShareWhereUniqueInput - update: XOR - create: XOR - } - - export type NoteShareUpdateWithWhereUniqueWithoutNoteInput = { - where: NoteShareWhereUniqueInput - data: XOR - } - - export type NoteShareUpdateManyWithWhereWithoutNoteInput = { - where: NoteShareScalarWhereInput - data: XOR - } - - export type NotebookUpsertWithoutNotesInput = { - update: XOR - create: XOR - where?: NotebookWhereInput - } - - export type NotebookUpdateToOneWithWhereWithoutNotesInput = { - where?: NotebookWhereInput - data: XOR - } - - export type NotebookUpdateWithoutNotesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - user?: UserUpdateOneRequiredWithoutNotebooksNestedInput - labels?: LabelUpdateManyWithoutNotebookNestedInput - } - - export type NotebookUncheckedUpdateWithoutNotesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - userId?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - labels?: LabelUncheckedUpdateManyWithoutNotebookNestedInput - } - - export type LabelUpsertWithWhereUniqueWithoutNotesInput = { - where: LabelWhereUniqueInput - update: XOR - create: XOR - } - - export type LabelUpdateWithWhereUniqueWithoutNotesInput = { - where: LabelWhereUniqueInput - data: XOR - } - - export type LabelUpdateManyWithWhereWithoutNotesInput = { - where: LabelScalarWhereInput - data: XOR - } - - export type AiFeedbackUpsertWithWhereUniqueWithoutNoteInput = { - where: AiFeedbackWhereUniqueInput - update: XOR - create: XOR - } - - export type AiFeedbackUpdateWithWhereUniqueWithoutNoteInput = { - where: AiFeedbackWhereUniqueInput - data: XOR - } - - export type AiFeedbackUpdateManyWithWhereWithoutNoteInput = { - where: AiFeedbackScalarWhereInput - data: XOR - } - - export type MemoryEchoInsightUpsertWithWhereUniqueWithoutNote1Input = { - where: MemoryEchoInsightWhereUniqueInput - update: XOR - create: XOR - } - - export type MemoryEchoInsightUpdateWithWhereUniqueWithoutNote1Input = { - where: MemoryEchoInsightWhereUniqueInput - data: XOR - } - - export type MemoryEchoInsightUpdateManyWithWhereWithoutNote1Input = { - where: MemoryEchoInsightScalarWhereInput - data: XOR - } - - export type MemoryEchoInsightUpsertWithWhereUniqueWithoutNote2Input = { - where: MemoryEchoInsightWhereUniqueInput - update: XOR - create: XOR - } - - export type MemoryEchoInsightUpdateWithWhereUniqueWithoutNote2Input = { - where: MemoryEchoInsightWhereUniqueInput - data: XOR - } - - export type MemoryEchoInsightUpdateManyWithWhereWithoutNote2Input = { - where: MemoryEchoInsightScalarWhereInput - data: XOR - } - - export type NoteCreateWithoutSharesInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - user?: UserCreateNestedOneWithoutNotesInput - notebook?: NotebookCreateNestedOneWithoutNotesInput - labelRelations?: LabelCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input - } - - export type NoteUncheckedCreateWithoutSharesInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input - } - - export type NoteCreateOrConnectWithoutSharesInput = { - where: NoteWhereUniqueInput - create: XOR - } - - export type UserCreateWithoutReceivedSharesInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - sessions?: SessionCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutReceivedSharesInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutReceivedSharesInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type UserCreateWithoutSentSharesInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - sessions?: SessionCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutSentSharesInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutSentSharesInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type NoteUpsertWithoutSharesInput = { - update: XOR - create: XOR - where?: NoteWhereInput - } - - export type NoteUpdateToOneWithWhereWithoutSharesInput = { - where?: NoteWhereInput - data: XOR - } - - export type NoteUpdateWithoutSharesInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - user?: UserUpdateOneWithoutNotesNestedInput - notebook?: NotebookUpdateOneWithoutNotesNestedInput - labelRelations?: LabelUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateWithoutSharesInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput - } - - export type UserUpsertWithoutReceivedSharesInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutReceivedSharesInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutReceivedSharesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - sessions?: SessionUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutReceivedSharesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type UserUpsertWithoutSentSharesInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutSentSharesInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutSentSharesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - sessions?: SessionUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutSentSharesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type NoteCreateWithoutAiFeedbackInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - user?: UserCreateNestedOneWithoutNotesInput - shares?: NoteShareCreateNestedManyWithoutNoteInput - notebook?: NotebookCreateNestedOneWithoutNotesInput - labelRelations?: LabelCreateNestedManyWithoutNotesInput - memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input - } - - export type NoteUncheckedCreateWithoutAiFeedbackInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput - labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input - memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input - } - - export type NoteCreateOrConnectWithoutAiFeedbackInput = { - where: NoteWhereUniqueInput - create: XOR - } - - export type UserCreateWithoutAiFeedbackInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - sessions?: SessionCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutAiFeedbackInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutAiFeedbackInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type NoteUpsertWithoutAiFeedbackInput = { - update: XOR - create: XOR - where?: NoteWhereInput - } - - export type NoteUpdateToOneWithWhereWithoutAiFeedbackInput = { - where?: NoteWhereInput - data: XOR - } - - export type NoteUpdateWithoutAiFeedbackInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - user?: UserUpdateOneWithoutNotesNestedInput - shares?: NoteShareUpdateManyWithoutNoteNestedInput - notebook?: NotebookUpdateOneWithoutNotesNestedInput - labelRelations?: LabelUpdateManyWithoutNotesNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateWithoutAiFeedbackInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput - labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput - } - - export type UserUpsertWithoutAiFeedbackInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutAiFeedbackInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutAiFeedbackInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - sessions?: SessionUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutAiFeedbackInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type NoteCreateWithoutMemoryEchoAsNote1Input = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - user?: UserCreateNestedOneWithoutNotesInput - shares?: NoteShareCreateNestedManyWithoutNoteInput - notebook?: NotebookCreateNestedOneWithoutNotesInput - labelRelations?: LabelCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput - memoryEchoAsNote2?: MemoryEchoInsightCreateNestedManyWithoutNote2Input - } - - export type NoteUncheckedCreateWithoutMemoryEchoAsNote1Input = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput - labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput - memoryEchoAsNote2?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote2Input - } - - export type NoteCreateOrConnectWithoutMemoryEchoAsNote1Input = { - where: NoteWhereUniqueInput - create: XOR - } - - export type NoteCreateWithoutMemoryEchoAsNote2Input = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - user?: UserCreateNestedOneWithoutNotesInput - shares?: NoteShareCreateNestedManyWithoutNoteInput - notebook?: NotebookCreateNestedOneWithoutNotesInput - labelRelations?: LabelCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightCreateNestedManyWithoutNote1Input - } - - export type NoteUncheckedCreateWithoutMemoryEchoAsNote2Input = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - shares?: NoteShareUncheckedCreateNestedManyWithoutNoteInput - labelRelations?: LabelUncheckedCreateNestedManyWithoutNotesInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutNoteInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedCreateNestedManyWithoutNote1Input - } - - export type NoteCreateOrConnectWithoutMemoryEchoAsNote2Input = { - where: NoteWhereUniqueInput - create: XOR - } - - export type UserCreateWithoutMemoryEchoInsightsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - sessions?: SessionCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsCreateNestedOneWithoutUserInput - } - - export type UserUncheckedCreateWithoutMemoryEchoInsightsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - aiSettings?: UserAISettingsUncheckedCreateNestedOneWithoutUserInput - } - - export type UserCreateOrConnectWithoutMemoryEchoInsightsInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type NoteUpsertWithoutMemoryEchoAsNote1Input = { - update: XOR - create: XOR - where?: NoteWhereInput - } - - export type NoteUpdateToOneWithWhereWithoutMemoryEchoAsNote1Input = { - where?: NoteWhereInput - data: XOR - } - - export type NoteUpdateWithoutMemoryEchoAsNote1Input = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - user?: UserUpdateOneWithoutNotesNestedInput - shares?: NoteShareUpdateManyWithoutNoteNestedInput - notebook?: NotebookUpdateOneWithoutNotesNestedInput - labelRelations?: LabelUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput - memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateWithoutMemoryEchoAsNote1Input = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput - labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput - memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput - } - - export type NoteUpsertWithoutMemoryEchoAsNote2Input = { - update: XOR - create: XOR - where?: NoteWhereInput - } - - export type NoteUpdateToOneWithWhereWithoutMemoryEchoAsNote2Input = { - where?: NoteWhereInput - data: XOR - } - - export type NoteUpdateWithoutMemoryEchoAsNote2Input = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - user?: UserUpdateOneWithoutNotesNestedInput - shares?: NoteShareUpdateManyWithoutNoteNestedInput - notebook?: NotebookUpdateOneWithoutNotesNestedInput - labelRelations?: LabelUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput - } - - export type NoteUncheckedUpdateWithoutMemoryEchoAsNote2Input = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput - labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput - } - - export type UserUpsertWithoutMemoryEchoInsightsInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutMemoryEchoInsightsInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutMemoryEchoInsightsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - sessions?: SessionUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUpdateOneWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutMemoryEchoInsightsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - aiSettings?: UserAISettingsUncheckedUpdateOneWithoutUserNestedInput - } - - export type UserCreateWithoutAiSettingsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountCreateNestedManyWithoutUserInput - sessions?: SessionCreateNestedManyWithoutUserInput - notes?: NoteCreateNestedManyWithoutUserInput - labels?: LabelCreateNestedManyWithoutUserInput - notebooks?: NotebookCreateNestedManyWithoutUserInput - receivedShares?: NoteShareCreateNestedManyWithoutUserInput - sentShares?: NoteShareCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackCreateNestedManyWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateWithoutAiSettingsInput = { - id?: string - name?: string | null - email: string - emailVerified?: Date | string | null - password?: string | null - role?: string - image?: string | null - theme?: string - resetToken?: string | null - resetTokenExpiry?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - accounts?: AccountUncheckedCreateNestedManyWithoutUserInput - sessions?: SessionUncheckedCreateNestedManyWithoutUserInput - notes?: NoteUncheckedCreateNestedManyWithoutUserInput - labels?: LabelUncheckedCreateNestedManyWithoutUserInput - notebooks?: NotebookUncheckedCreateNestedManyWithoutUserInput - receivedShares?: NoteShareUncheckedCreateNestedManyWithoutUserInput - sentShares?: NoteShareUncheckedCreateNestedManyWithoutSharerInput - aiFeedback?: AiFeedbackUncheckedCreateNestedManyWithoutUserInput - memoryEchoInsights?: MemoryEchoInsightUncheckedCreateNestedManyWithoutUserInput - } - - export type UserCreateOrConnectWithoutAiSettingsInput = { - where: UserWhereUniqueInput - create: XOR - } - - export type UserUpsertWithoutAiSettingsInput = { - update: XOR - create: XOR - where?: UserWhereInput - } - - export type UserUpdateToOneWithWhereWithoutAiSettingsInput = { - where?: UserWhereInput - data: XOR - } - - export type UserUpdateWithoutAiSettingsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUpdateManyWithoutUserNestedInput - sessions?: SessionUpdateManyWithoutUserNestedInput - notes?: NoteUpdateManyWithoutUserNestedInput - labels?: LabelUpdateManyWithoutUserNestedInput - notebooks?: NotebookUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateWithoutAiSettingsInput = { - id?: StringFieldUpdateOperationsInput | string - name?: NullableStringFieldUpdateOperationsInput | string | null - email?: StringFieldUpdateOperationsInput | string - emailVerified?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - password?: NullableStringFieldUpdateOperationsInput | string | null - role?: StringFieldUpdateOperationsInput | string - image?: NullableStringFieldUpdateOperationsInput | string | null - theme?: StringFieldUpdateOperationsInput | string - resetToken?: NullableStringFieldUpdateOperationsInput | string | null - resetTokenExpiry?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - accounts?: AccountUncheckedUpdateManyWithoutUserNestedInput - sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput - notes?: NoteUncheckedUpdateManyWithoutUserNestedInput - labels?: LabelUncheckedUpdateManyWithoutUserNestedInput - notebooks?: NotebookUncheckedUpdateManyWithoutUserNestedInput - receivedShares?: NoteShareUncheckedUpdateManyWithoutUserNestedInput - sentShares?: NoteShareUncheckedUpdateManyWithoutSharerNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutUserNestedInput - memoryEchoInsights?: MemoryEchoInsightUncheckedUpdateManyWithoutUserNestedInput - } - - export type AccountCreateManyUserInput = { - type: string - provider: string - providerAccountId: string - refresh_token?: string | null - access_token?: string | null - expires_at?: number | null - token_type?: string | null - scope?: string | null - id_token?: string | null - session_state?: string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type SessionCreateManyUserInput = { - sessionToken: string - expires: Date | string - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteCreateManyUserInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - order?: number - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - } - - export type LabelCreateManyUserInput = { - id?: string - name: string - color?: string - notebookId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NotebookCreateManyUserInput = { - id?: string - name: string - icon?: string | null - color?: string | null - order: number - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareCreateManyUserInput = { - id?: string - noteId: string - sharedBy: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteShareCreateManySharerInput = { - id?: string - noteId: string - userId: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AiFeedbackCreateManyUserInput = { - id?: string - noteId: string - feedbackType: string - feature: string - originalContent: string - correctedContent?: string | null - metadata?: string | null - createdAt?: Date | string - } - - export type MemoryEchoInsightCreateManyUserInput = { - id?: string - note1Id: string - note2Id: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - } - - export type AccountUpdateWithoutUserInput = { - type?: StringFieldUpdateOperationsInput | string - provider?: StringFieldUpdateOperationsInput | string - providerAccountId?: StringFieldUpdateOperationsInput | string - refresh_token?: NullableStringFieldUpdateOperationsInput | string | null - access_token?: NullableStringFieldUpdateOperationsInput | string | null - expires_at?: NullableIntFieldUpdateOperationsInput | number | null - token_type?: NullableStringFieldUpdateOperationsInput | string | null - scope?: NullableStringFieldUpdateOperationsInput | string | null - id_token?: NullableStringFieldUpdateOperationsInput | string | null - session_state?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AccountUncheckedUpdateWithoutUserInput = { - type?: StringFieldUpdateOperationsInput | string - provider?: StringFieldUpdateOperationsInput | string - providerAccountId?: StringFieldUpdateOperationsInput | string - refresh_token?: NullableStringFieldUpdateOperationsInput | string | null - access_token?: NullableStringFieldUpdateOperationsInput | string | null - expires_at?: NullableIntFieldUpdateOperationsInput | number | null - token_type?: NullableStringFieldUpdateOperationsInput | string | null - scope?: NullableStringFieldUpdateOperationsInput | string | null - id_token?: NullableStringFieldUpdateOperationsInput | string | null - session_state?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AccountUncheckedUpdateManyWithoutUserInput = { - type?: StringFieldUpdateOperationsInput | string - provider?: StringFieldUpdateOperationsInput | string - providerAccountId?: StringFieldUpdateOperationsInput | string - refresh_token?: NullableStringFieldUpdateOperationsInput | string | null - access_token?: NullableStringFieldUpdateOperationsInput | string | null - expires_at?: NullableIntFieldUpdateOperationsInput | number | null - token_type?: NullableStringFieldUpdateOperationsInput | string | null - scope?: NullableStringFieldUpdateOperationsInput | string | null - id_token?: NullableStringFieldUpdateOperationsInput | string | null - session_state?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type SessionUpdateWithoutUserInput = { - sessionToken?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type SessionUncheckedUpdateWithoutUserInput = { - sessionToken?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type SessionUncheckedUpdateManyWithoutUserInput = { - sessionToken?: StringFieldUpdateOperationsInput | string - expires?: DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - shares?: NoteShareUpdateManyWithoutNoteNestedInput - notebook?: NotebookUpdateOneWithoutNotesNestedInput - labelRelations?: LabelUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput - labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type LabelUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notebook?: NotebookUpdateOneWithoutLabelsNestedInput - notes?: NoteUpdateManyWithoutLabelRelationsNestedInput - } - - export type LabelUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notes?: NoteUncheckedUpdateManyWithoutLabelRelationsNestedInput - } - - export type LabelUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NotebookUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notes?: NoteUpdateManyWithoutNotebookNestedInput - labels?: LabelUpdateManyWithoutNotebookNestedInput - } - - export type NotebookUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notes?: NoteUncheckedUpdateManyWithoutNotebookNestedInput - labels?: LabelUncheckedUpdateManyWithoutNotebookNestedInput - } - - export type NotebookUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - icon?: NullableStringFieldUpdateOperationsInput | string | null - color?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - note?: NoteUpdateOneRequiredWithoutSharesNestedInput - sharer?: UserUpdateOneRequiredWithoutSentSharesNestedInput - } - - export type NoteShareUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareUpdateWithoutSharerInput = { - id?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - note?: NoteUpdateOneRequiredWithoutSharesNestedInput - user?: UserUpdateOneRequiredWithoutReceivedSharesNestedInput - } - - export type NoteShareUncheckedUpdateWithoutSharerInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareUncheckedUpdateManyWithoutSharerInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AiFeedbackUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - note?: NoteUpdateOneRequiredWithoutAiFeedbackNestedInput - } - - export type AiFeedbackUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AiFeedbackUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - noteId?: StringFieldUpdateOperationsInput | string - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type MemoryEchoInsightUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - note1?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote1NestedInput - note2?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote2NestedInput - } - - export type MemoryEchoInsightUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - note1Id?: StringFieldUpdateOperationsInput | string - note2Id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - } - - export type MemoryEchoInsightUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string - note1Id?: StringFieldUpdateOperationsInput | string - note2Id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - } - - export type NoteCreateManyNotebookInput = { - id?: string - title?: string | null - content: string - color?: string - isPinned?: boolean - isArchived?: boolean - type?: string - checkItems?: string | null - labels?: string | null - images?: string | null - links?: string | null - reminder?: Date | string | null - isReminderDone?: boolean - reminderRecurrence?: string | null - reminderLocation?: string | null - isMarkdown?: boolean - size?: string - embedding?: string | null - sharedWith?: string | null - userId?: string | null - order?: number - createdAt?: Date | string - updatedAt?: Date | string - autoGenerated?: boolean | null - aiProvider?: string | null - aiConfidence?: number | null - language?: string | null - languageConfidence?: number | null - lastAiAnalysis?: Date | string | null - } - - export type LabelCreateManyNotebookInput = { - id?: string - name: string - color?: string - userId?: string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type NoteUpdateWithoutNotebookInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - user?: UserUpdateOneWithoutNotesNestedInput - shares?: NoteShareUpdateManyWithoutNoteNestedInput - labelRelations?: LabelUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateWithoutNotebookInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput - labelRelations?: LabelUncheckedUpdateManyWithoutNotesNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateManyWithoutNotebookInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type LabelUpdateWithoutNotebookInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notes?: NoteUpdateManyWithoutLabelRelationsNestedInput - user?: UserUpdateOneWithoutLabelsNestedInput - } - - export type LabelUncheckedUpdateWithoutNotebookInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notes?: NoteUncheckedUpdateManyWithoutLabelRelationsNestedInput - } - - export type LabelUncheckedUpdateManyWithoutNotebookInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteUpdateWithoutLabelRelationsInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - user?: UserUpdateOneWithoutNotesNestedInput - shares?: NoteShareUpdateManyWithoutNoteNestedInput - notebook?: NotebookUpdateOneWithoutNotesNestedInput - aiFeedback?: AiFeedbackUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateWithoutLabelRelationsInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - shares?: NoteShareUncheckedUpdateManyWithoutNoteNestedInput - aiFeedback?: AiFeedbackUncheckedUpdateManyWithoutNoteNestedInput - memoryEchoAsNote1?: MemoryEchoInsightUncheckedUpdateManyWithoutNote1NestedInput - memoryEchoAsNote2?: MemoryEchoInsightUncheckedUpdateManyWithoutNote2NestedInput - } - - export type NoteUncheckedUpdateManyWithoutLabelRelationsInput = { - id?: StringFieldUpdateOperationsInput | string - title?: NullableStringFieldUpdateOperationsInput | string | null - content?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - isPinned?: BoolFieldUpdateOperationsInput | boolean - isArchived?: BoolFieldUpdateOperationsInput | boolean - type?: StringFieldUpdateOperationsInput | string - checkItems?: NullableStringFieldUpdateOperationsInput | string | null - labels?: NullableStringFieldUpdateOperationsInput | string | null - images?: NullableStringFieldUpdateOperationsInput | string | null - links?: NullableStringFieldUpdateOperationsInput | string | null - reminder?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isReminderDone?: BoolFieldUpdateOperationsInput | boolean - reminderRecurrence?: NullableStringFieldUpdateOperationsInput | string | null - reminderLocation?: NullableStringFieldUpdateOperationsInput | string | null - isMarkdown?: BoolFieldUpdateOperationsInput | boolean - size?: StringFieldUpdateOperationsInput | string - embedding?: NullableStringFieldUpdateOperationsInput | string | null - sharedWith?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - order?: IntFieldUpdateOperationsInput | number - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - autoGenerated?: NullableBoolFieldUpdateOperationsInput | boolean | null - aiProvider?: NullableStringFieldUpdateOperationsInput | string | null - aiConfidence?: NullableIntFieldUpdateOperationsInput | number | null - language?: NullableStringFieldUpdateOperationsInput | string | null - languageConfidence?: NullableFloatFieldUpdateOperationsInput | number | null - lastAiAnalysis?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type NoteShareCreateManyNoteInput = { - id?: string - userId: string - sharedBy: string - status?: string - permission?: string - notifiedAt?: Date | string | null - respondedAt?: Date | string | null - createdAt?: Date | string - updatedAt?: Date | string - } - - export type AiFeedbackCreateManyNoteInput = { - id?: string - userId?: string | null - feedbackType: string - feature: string - originalContent: string - correctedContent?: string | null - metadata?: string | null - createdAt?: Date | string - } - - export type MemoryEchoInsightCreateManyNote1Input = { - id?: string - userId?: string | null - note2Id: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - } - - export type MemoryEchoInsightCreateManyNote2Input = { - id?: string - userId?: string | null - note1Id: string - similarityScore: number - insight: string - insightDate?: Date | string - viewed?: boolean - feedback?: string | null - dismissed?: boolean - } - - export type NoteShareUpdateWithoutNoteInput = { - id?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - user?: UserUpdateOneRequiredWithoutReceivedSharesNestedInput - sharer?: UserUpdateOneRequiredWithoutSentSharesNestedInput - } - - export type NoteShareUncheckedUpdateWithoutNoteInput = { - id?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type NoteShareUncheckedUpdateManyWithoutNoteInput = { - id?: StringFieldUpdateOperationsInput | string - userId?: StringFieldUpdateOperationsInput | string - sharedBy?: StringFieldUpdateOperationsInput | string - status?: StringFieldUpdateOperationsInput | string - permission?: StringFieldUpdateOperationsInput | string - notifiedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - respondedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type LabelUpdateWithoutNotesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - notebook?: NotebookUpdateOneWithoutLabelsNestedInput - user?: UserUpdateOneWithoutLabelsNestedInput - } - - export type LabelUncheckedUpdateWithoutNotesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type LabelUncheckedUpdateManyWithoutNotesInput = { - id?: StringFieldUpdateOperationsInput | string - name?: StringFieldUpdateOperationsInput | string - color?: StringFieldUpdateOperationsInput | string - notebookId?: NullableStringFieldUpdateOperationsInput | string | null - userId?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AiFeedbackUpdateWithoutNoteInput = { - id?: StringFieldUpdateOperationsInput | string - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - user?: UserUpdateOneWithoutAiFeedbackNestedInput - } - - export type AiFeedbackUncheckedUpdateWithoutNoteInput = { - id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type AiFeedbackUncheckedUpdateManyWithoutNoteInput = { - id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - feedbackType?: StringFieldUpdateOperationsInput | string - feature?: StringFieldUpdateOperationsInput | string - originalContent?: StringFieldUpdateOperationsInput | string - correctedContent?: NullableStringFieldUpdateOperationsInput | string | null - metadata?: NullableStringFieldUpdateOperationsInput | string | null - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - } - - export type MemoryEchoInsightUpdateWithoutNote1Input = { - id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - note2?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote2NestedInput - user?: UserUpdateOneWithoutMemoryEchoInsightsNestedInput - } - - export type MemoryEchoInsightUncheckedUpdateWithoutNote1Input = { - id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - note2Id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - } - - export type MemoryEchoInsightUncheckedUpdateManyWithoutNote1Input = { - id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - note2Id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - } - - export type MemoryEchoInsightUpdateWithoutNote2Input = { - id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - note1?: NoteUpdateOneRequiredWithoutMemoryEchoAsNote1NestedInput - user?: UserUpdateOneWithoutMemoryEchoInsightsNestedInput - } - - export type MemoryEchoInsightUncheckedUpdateWithoutNote2Input = { - id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - note1Id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - } - - export type MemoryEchoInsightUncheckedUpdateManyWithoutNote2Input = { - id?: StringFieldUpdateOperationsInput | string - userId?: NullableStringFieldUpdateOperationsInput | string | null - note1Id?: StringFieldUpdateOperationsInput | string - similarityScore?: FloatFieldUpdateOperationsInput | number - insight?: StringFieldUpdateOperationsInput | string - insightDate?: DateTimeFieldUpdateOperationsInput | Date | string - viewed?: BoolFieldUpdateOperationsInput | boolean - feedback?: NullableStringFieldUpdateOperationsInput | string | null - dismissed?: BoolFieldUpdateOperationsInput | boolean - } - - - - /** - * Aliases for legacy arg types - */ - /** - * @deprecated Use UserCountOutputTypeDefaultArgs instead - */ - export type UserCountOutputTypeArgs = UserCountOutputTypeDefaultArgs - /** - * @deprecated Use NotebookCountOutputTypeDefaultArgs instead - */ - export type NotebookCountOutputTypeArgs = NotebookCountOutputTypeDefaultArgs - /** - * @deprecated Use LabelCountOutputTypeDefaultArgs instead - */ - export type LabelCountOutputTypeArgs = LabelCountOutputTypeDefaultArgs - /** - * @deprecated Use NoteCountOutputTypeDefaultArgs instead - */ - export type NoteCountOutputTypeArgs = NoteCountOutputTypeDefaultArgs - /** - * @deprecated Use UserDefaultArgs instead - */ - export type UserArgs = UserDefaultArgs - /** - * @deprecated Use AccountDefaultArgs instead - */ - export type AccountArgs = AccountDefaultArgs - /** - * @deprecated Use SessionDefaultArgs instead - */ - export type SessionArgs = SessionDefaultArgs - /** - * @deprecated Use VerificationTokenDefaultArgs instead - */ - export type VerificationTokenArgs = VerificationTokenDefaultArgs - /** - * @deprecated Use NotebookDefaultArgs instead - */ - export type NotebookArgs = NotebookDefaultArgs - /** - * @deprecated Use LabelDefaultArgs instead - */ - export type LabelArgs = LabelDefaultArgs - /** - * @deprecated Use NoteDefaultArgs instead - */ - export type NoteArgs = NoteDefaultArgs - /** - * @deprecated Use NoteShareDefaultArgs instead - */ - export type NoteShareArgs = NoteShareDefaultArgs - /** - * @deprecated Use SystemConfigDefaultArgs instead - */ - export type SystemConfigArgs = SystemConfigDefaultArgs - /** - * @deprecated Use AiFeedbackDefaultArgs instead - */ - export type AiFeedbackArgs = AiFeedbackDefaultArgs - /** - * @deprecated Use MemoryEchoInsightDefaultArgs instead - */ - export type MemoryEchoInsightArgs = MemoryEchoInsightDefaultArgs - /** - * @deprecated Use UserAISettingsDefaultArgs instead - */ - export type UserAISettingsArgs = UserAISettingsDefaultArgs - - /** - * Batch Payload for updateMany & deleteMany & createMany - */ - - export type BatchPayload = { - count: number - } - - /** - * DMMF - */ - export const dmmf: runtime.BaseDMMF -} \ No newline at end of file diff --git a/keep-notes/prisma/client-generated/index.js b/keep-notes/prisma/client-generated/index.js deleted file mode 100644 index 248d648..0000000 --- a/keep-notes/prisma/client-generated/index.js +++ /dev/null @@ -1,362 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - NotFoundError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime -} = require('./runtime/library.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 5.22.0 - * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 - */ -Prisma.prismaVersion = { - client: "5.22.0", - engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" -} - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError -Prisma.PrismaClientInitializationError = PrismaClientInitializationError -Prisma.PrismaClientValidationError = PrismaClientValidationError -Prisma.NotFoundError = NotFoundError -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag -Prisma.empty = empty -Prisma.join = join -Prisma.raw = raw -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = Extensions.getExtensionContext -Prisma.defineExtension = Extensions.defineExtension - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - - - const path = require('path') - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - Serializable: 'Serializable' -}); - -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.AccountScalarFieldEnum = { - userId: 'userId', - type: 'type', - provider: 'provider', - providerAccountId: 'providerAccountId', - refresh_token: 'refresh_token', - access_token: 'access_token', - expires_at: 'expires_at', - token_type: 'token_type', - scope: 'scope', - id_token: 'id_token', - session_state: 'session_state', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SessionScalarFieldEnum = { - sessionToken: 'sessionToken', - userId: 'userId', - expires: 'expires', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.VerificationTokenScalarFieldEnum = { - identifier: 'identifier', - token: 'token', - expires: 'expires' -}; - -exports.Prisma.NotebookScalarFieldEnum = { - id: 'id', - name: 'name', - icon: 'icon', - color: 'color', - order: 'order', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.LabelScalarFieldEnum = { - id: 'id', - name: 'name', - color: 'color', - notebookId: 'notebookId', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.NoteScalarFieldEnum = { - id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' -}; - -exports.Prisma.NoteShareScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SystemConfigScalarFieldEnum = { - key: 'key', - value: 'value' -}; - -exports.Prisma.AiFeedbackScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - feedbackType: 'feedbackType', - feature: 'feature', - originalContent: 'originalContent', - correctedContent: 'correctedContent', - metadata: 'metadata', - createdAt: 'createdAt' -}; - -exports.Prisma.MemoryEchoInsightScalarFieldEnum = { - id: 'id', - userId: 'userId', - note1Id: 'note1Id', - note2Id: 'note2Id', - similarityScore: 'similarityScore', - insight: 'insight', - insightDate: 'insightDate', - viewed: 'viewed', - feedback: 'feedback', - dismissed: 'dismissed' -}; - -exports.Prisma.UserAISettingsScalarFieldEnum = { - userId: 'userId', - titleSuggestions: 'titleSuggestions', - semanticSearch: 'semanticSearch', - paragraphRefactor: 'paragraphRefactor', - memoryEcho: 'memoryEcho', - memoryEchoFrequency: 'memoryEchoFrequency', - aiProvider: 'aiProvider', - preferredLanguage: 'preferredLanguage', - fontSize: 'fontSize', - demoMode: 'demoMode' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - User: 'User', - Account: 'Account', - Session: 'Session', - VerificationToken: 'VerificationToken', - Notebook: 'Notebook', - Label: 'Label', - Note: 'Note', - NoteShare: 'NoteShare', - SystemConfig: 'SystemConfig', - AiFeedback: 'AiFeedback', - MemoryEchoInsight: 'MemoryEchoInsight', - UserAISettings: 'UserAISettings' -}; -/** - * Create the Client - */ -const config = { - "generator": { - "name": "client", - "provider": { - "fromEnvVar": null, - "value": "prisma-client-js" - }, - "output": { - "value": "D:\\dev_new_pc\\Keep\\keep-notes\\prisma\\client-generated", - "fromEnvVar": null - }, - "config": { - "engineType": "library" - }, - "binaryTargets": [ - { - "fromEnvVar": null, - "value": "windows", - "native": true - } - ], - "previewFeatures": [], - "sourceFilePath": "D:\\dev_new_pc\\Keep\\keep-notes\\prisma\\schema.prisma", - "isCustomOutput": true - }, - "relativeEnvPaths": { - "rootEnvPath": null, - "schemaEnvPath": "../../.env" - }, - "relativePath": "..", - "clientVersion": "5.22.0", - "engineVersion": "605197351a3c8bdd595af2d2a9bc3025bca48ea2", - "datasourceNames": [ - "db" - ], - "activeProvider": "sqlite", - "postinstall": false, - "inlineDatasources": { - "db": { - "url": { - "fromEnvVar": "DATABASE_URL", - "value": null - } - } - }, - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"./client-generated\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String? // Hashed password\n role String @default(\"USER\") // \"USER\" or \"ADMIN\"\n image String?\n theme String @default(\"light\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n accounts Account[]\n sessions Session[]\n notes Note[]\n labels Label[]\n notebooks Notebook[] // NEW: Relation to notebooks\n receivedShares NoteShare[] @relation(\"ReceivedShares\")\n sentShares NoteShare[] @relation(\"SentShares\")\n\n // Phase 1 AI Relations\n aiFeedback AiFeedback[]\n aiSettings UserAISettings?\n memoryEchoInsights MemoryEchoInsight[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\n// NEW: Notebook model for organizing notes\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String? // Emoji or icon name\n color String? // Hex color for personalization\n order Int // Manual order for drag & drop\n userId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n notes Note[] // Notes can belong to a notebook\n labels Label[] // Labels are contextual to this notebook\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([userId, order])\n @@index([userId])\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String? // TEMPORARY: Optional for migration, will be required later\n notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: Cascade)\n notes Note[] // NEW: Many-to-many relation with notes\n userId String? // DEPRECATED: Kept for migration, will be removed after migration\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([notebookId, name]) // NEW: Labels are unique within a notebook (ignored if notebookId is null)\n @@index([notebookId])\n @@index([userId]) // DEPRECATED: Keep for now, remove after migration\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n type String @default(\"text\") // \"text\" or \"checklist\"\n checkItems String? // For checklist items stored as JSON string\n labels String? // Array of label names stored as JSON string (DEPRECATED)\n images String? // Array of image URLs stored as JSON string\n links String? // Array of link metadata stored as JSON string\n reminder DateTime? // Reminder date and time\n isReminderDone Boolean @default(false)\n reminderRecurrence String? // \"none\", \"daily\", \"weekly\", \"monthly\", \"custom\"\n reminderLocation String? // Location for location-based reminders\n isMarkdown Boolean @default(false) // Whether content uses Markdown\n size String @default(\"small\") // \"small\", \"medium\", \"large\"\n embedding String? // Vector embeddings stored as JSON string for semantic search\n sharedWith String? // Array of user IDs (collaborators) stored as JSON string\n userId String? // Owner of the note\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n shares NoteShare[] // All share records for this note\n order Int @default(0)\n\n // NEW: Notebook relation (optional - null = \"Notes générales\" / Inbox)\n notebookId String? // NULL = note is in general notes\n notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: SetNull)\n\n // NEW: Many-to-many relation with labels\n labelRelations Label[] // Uses implicit _NoteToLabel junction table\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // Phase 1 AI Extensions\n autoGenerated Boolean? // True if title/content was AI-generated\n aiProvider String? // 'openai' | 'ollama'\n aiConfidence Int? // 0-100 (collected Phase 1, UI Phase 3)\n language String? // ISO 639-1: 'fr', 'en', 'es', 'de', 'fa'\n languageConfidence Float? // 0.0-1.0\n lastAiAnalysis DateTime? // Timestamp of last AI analysis\n\n // Relations for Phase 1 AI\n aiFeedback AiFeedback[]\n memoryEchoAsNote1 MemoryEchoInsight[] @relation(\"EchoNote1\")\n memoryEchoAsNote2 MemoryEchoInsight[] @relation(\"EchoNote2\")\n\n @@index([isPinned])\n @@index([isArchived])\n @@index([order])\n @@index([reminder])\n @@index([userId])\n @@index([userId, notebookId]) // NEW: For filtering notes by notebook\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n userId String\n user User @relation(\"ReceivedShares\", fields: [userId], references: [id], onDelete: Cascade)\n sharedBy String // User ID who shared the note\n sharer User @relation(\"SentShares\", fields: [sharedBy], references: [id], onDelete: Cascade)\n status String @default(\"pending\") // \"pending\", \"accepted\", \"declined\", \"removed\"\n permission String @default(\"view\") // \"view\", \"comment\", \"edit\"\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([noteId, userId])\n @@index([userId])\n @@index([status])\n @@index([sharedBy])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\n// Phase 1 MVP AI Models\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String // 'thumbs_up' | 'thumbs_down' | 'correction'\n feature String // 'title_suggestion' | 'memory_echo' | 'semantic_search' | 'paragraph_refactor'\n originalContent String // JSON string of AI-generated content\n correctedContent String? // User's modified version\n metadata String? // JSON string for additional data (provider, model, timestamp)\n createdAt DateTime @default(now())\n\n note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([noteId])\n @@index([userId])\n @@index([feature])\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String // AI-generated explanation of the connection\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String? // 'thumbs_up' | 'thumbs_down'\n dismissed Boolean @default(false) // User dismissed this connection\n\n note1 Note @relation(\"EchoNote1\", fields: [note1Id], references: [id], onDelete: Cascade)\n note2 Note @relation(\"EchoNote2\", fields: [note2Id], references: [id], onDelete: Cascade)\n user User? @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@unique([userId, insightDate])\n @@index([userId, insightDate])\n @@index([userId, dismissed]) // For filtering dismissed connections\n}\n\nmodel UserAISettings {\n userId String @id\n\n // Feature Flags (granular ON/OFF)\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n\n // Configuration\n memoryEchoFrequency String @default(\"daily\") // 'daily' | 'weekly' | 'custom'\n aiProvider String @default(\"auto\") // 'auto' | 'openai' | 'ollama'\n preferredLanguage String @default(\"auto\") // 'auto' | 'en' | 'fr' | 'es' | 'de' | 'fa' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'nl' | 'pl'\n fontSize String @default(\"medium\") // 'small' | 'medium' | 'large' | 'extra-large'\n demoMode Boolean @default(false) // Demo mode for testing Memory Echo\n\n // Relation\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n // Indexes for analytics\n @@index([memoryEcho])\n @@index([aiProvider])\n @@index([memoryEchoFrequency])\n @@index([preferredLanguage])\n}\n", - "inlineSchemaHash": "6c4a81b9b57c01ec47e65b3e37434d4a6d7c226bfa74f4f083425d1dcedac8ec", - "copyEngine": true -} - -const fs = require('fs') - -config.dirname = __dirname -if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { - const alternativePaths = [ - "prisma/client-generated", - "client-generated", - ] - - const alternativePath = alternativePaths.find((altPath) => { - return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) - }) ?? alternativePaths[0] - - config.dirname = path.join(process.cwd(), alternativePath) - config.isBundled = true -} - -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"emailVerified\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"USER\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"theme\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"light\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resetTokenExpiry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accounts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Account\",\"relationName\":\"AccountToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sessions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Session\",\"relationName\":\"SessionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebooks\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"NotebookToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"receivedShares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"ReceivedShares\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentShares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"SentShares\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiFeedback\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AiFeedback\",\"relationName\":\"AiFeedbackToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiSettings\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserAISettings\",\"relationName\":\"UserToUserAISettings\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoInsights\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"MemoryEchoInsightToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Account\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"providerAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"access_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"id_token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"session_state\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AccountToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"provider\",\"providerAccountId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Session\":{\"dbName\":null,\"fields\":[{\"name\":\"sessionToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SessionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"VerificationToken\":{\"dbName\":null,\"fields\":[{\"name\":\"identifier\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"token\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expires\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"identifier\",\"token\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notebook\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"NotebookToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNotebook\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToNotebook\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Label\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"gray\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebook\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"LabelToNotebook\",\"relationFromFields\":[\"notebookId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"LabelToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"LabelToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[[\"notebookId\",\"name\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"notebookId\",\"name\"]}],\"isGenerated\":false},\"Note\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"default\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isPinned\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"text\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"checkItems\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labels\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"links\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isReminderDone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderRecurrence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"reminderLocation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isMarkdown\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"size\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"small\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"embedding\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedWith\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"NoteToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shares\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NoteShare\",\"relationName\":\"NoteToNoteShare\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebookId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notebook\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notebook\",\"relationName\":\"NoteToNotebook\",\"relationFromFields\":[\"notebookId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labelRelations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Label\",\"relationName\":\"LabelToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"autoGenerated\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"language\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"languageConfidence\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastAiAnalysis\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiFeedback\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AiFeedback\",\"relationName\":\"AiFeedbackToNote\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoAsNote1\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"EchoNote1\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoAsNote2\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MemoryEchoInsight\",\"relationName\":\"EchoNote2\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NoteShare\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"NoteToNoteShare\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"ReceivedShares\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharedBy\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sharer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SentShares\",\"relationFromFields\":[\"sharedBy\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"pending\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permission\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"view\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifiedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"respondedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[[\"noteId\",\"userId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"noteId\",\"userId\"]}],\"isGenerated\":false},\"SystemConfig\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AiFeedback\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noteId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedbackType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feature\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"correctedContent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metadata\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"AiFeedbackToNote\",\"relationFromFields\":[\"noteId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AiFeedbackToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MemoryEchoInsight\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2Id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"similarityScore\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Float\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"insightDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"viewed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"feedback\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dismissed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note1\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"EchoNote1\",\"relationFromFields\":[\"note1Id\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note2\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Note\",\"relationName\":\"EchoNote2\",\"relationFromFields\":[\"note2Id\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"MemoryEchoInsightToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"insightDate\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"insightDate\"]}],\"isGenerated\":false},\"UserAISettings\":{\"dbName\":null,\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"titleSuggestions\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"semanticSearch\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"paragraphRefactor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEcho\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memoryEchoFrequency\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"daily\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preferredLanguage\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"auto\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fontSize\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"medium\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"demoMode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"UserToUserAISettings\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") -defineDmmfProperty(exports.Prisma, config.runtimeDataModel) -config.engineWasm = undefined - - -const { warnEnvConflicts } = require('./runtime/library.js') - -warnEnvConflicts({ - rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), - schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) -}) - -const PrismaClient = getPrismaClient(config) -exports.PrismaClient = PrismaClient -Object.assign(exports, Prisma) - -// file annotations for bundling tools to include these files -path.join(__dirname, "query_engine-windows.dll.node"); -path.join(process.cwd(), "prisma/client-generated/query_engine-windows.dll.node") -// file annotations for bundling tools to include these files -path.join(__dirname, "schema.prisma"); -path.join(process.cwd(), "prisma/client-generated/schema.prisma") diff --git a/keep-notes/prisma/client-generated/package.json b/keep-notes/prisma/client-generated/package.json deleted file mode 100644 index b598171..0000000 --- a/keep-notes/prisma/client-generated/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "prisma-client-093f8032ffdb503017a919cb283b2e9dc4eed6db9cd03676bdc7dbcbf826224c", - "main": "index.js", - "types": "index.d.ts", - "browser": "index-browser.js", - "exports": { - "./package.json": "./package.json", - ".": { - "require": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "import": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "default": "./index.js" - }, - "./edge": { - "types": "./edge.d.ts", - "require": "./edge.js", - "import": "./edge.js", - "default": "./edge.js" - }, - "./react-native": { - "types": "./react-native.d.ts", - "require": "./react-native.js", - "import": "./react-native.js", - "default": "./react-native.js" - }, - "./extension": { - "types": "./extension.d.ts", - "require": "./extension.js", - "import": "./extension.js", - "default": "./extension.js" - }, - "./index-browser": { - "types": "./index.d.ts", - "require": "./index-browser.js", - "import": "./index-browser.js", - "default": "./index-browser.js" - }, - "./index": { - "types": "./index.d.ts", - "require": "./index.js", - "import": "./index.js", - "default": "./index.js" - }, - "./wasm": { - "types": "./wasm.d.ts", - "require": "./wasm.js", - "import": "./wasm.js", - "default": "./wasm.js" - }, - "./runtime/library": { - "types": "./runtime/library.d.ts", - "require": "./runtime/library.js", - "import": "./runtime/library.js", - "default": "./runtime/library.js" - }, - "./runtime/binary": { - "types": "./runtime/binary.d.ts", - "require": "./runtime/binary.js", - "import": "./runtime/binary.js", - "default": "./runtime/binary.js" - }, - "./generator-build": { - "require": "./generator-build/index.js", - "import": "./generator-build/index.js", - "default": "./generator-build/index.js" - }, - "./sql": { - "require": { - "types": "./sql.d.ts", - "node": "./sql.js", - "default": "./sql.js" - }, - "import": { - "types": "./sql.d.ts", - "node": "./sql.mjs", - "default": "./sql.mjs" - }, - "default": "./sql.js" - }, - "./*": "./*" - }, - "version": "5.22.0", - "sideEffects": false -} \ No newline at end of file diff --git a/keep-notes/prisma/client-generated/query_engine-windows.dll.node b/keep-notes/prisma/client-generated/query_engine-windows.dll.node deleted file mode 100644 index d46657b..0000000 Binary files a/keep-notes/prisma/client-generated/query_engine-windows.dll.node and /dev/null differ diff --git a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp10980 b/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp10980 deleted file mode 100644 index d46657b..0000000 Binary files a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp10980 and /dev/null differ diff --git a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp36112 b/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp36112 deleted file mode 100644 index d46657b..0000000 Binary files a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp36112 and /dev/null differ diff --git a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp39328 b/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp39328 deleted file mode 100644 index d46657b..0000000 Binary files a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp39328 and /dev/null differ diff --git a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp39896 b/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp39896 deleted file mode 100644 index d46657b..0000000 Binary files a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp39896 and /dev/null differ diff --git a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp6984 b/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp6984 deleted file mode 100644 index d46657b..0000000 Binary files a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp6984 and /dev/null differ diff --git a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp73536 b/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp73536 deleted file mode 100644 index d46657b..0000000 Binary files a/keep-notes/prisma/client-generated/query_engine-windows.dll.node.tmp73536 and /dev/null differ diff --git a/keep-notes/prisma/client-generated/runtime/edge-esm.js b/keep-notes/prisma/client-generated/runtime/edge-esm.js deleted file mode 100644 index dda5f88..0000000 --- a/keep-notes/prisma/client-generated/runtime/edge-esm.js +++ /dev/null @@ -1,31 +0,0 @@ -var sa=Object.create;var Kr=Object.defineProperty;var aa=Object.getOwnPropertyDescriptor;var la=Object.getOwnPropertyNames;var ua=Object.getPrototypeOf,ca=Object.prototype.hasOwnProperty;var zr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ae=(e,t)=>()=>(e&&(t=e(e=0)),t);var Le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yr=(e,t)=>{for(var r in t)Kr(e,r,{get:t[r],enumerable:!0})},pa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of la(t))!ca.call(e,i)&&i!==r&&Kr(e,i,{get:()=>t[i],enumerable:!(n=aa(t,i))||n.enumerable});return e};var qe=(e,t,r)=>(r=e!=null?sa(ua(e)):{},pa(t||!e||!e.__esModule?Kr(r,"default",{value:e,enumerable:!0}):r,e));var y,c=Ae(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,p=Ae(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=Ae(()=>{"use strict";E=()=>{};E.prototype=E});var m=Ae(()=>{"use strict"});var Ei=Le(Ye=>{"use strict";f();c();p();d();m();var oi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),da=oi(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=A.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(A){var R=a(A),M=R[0],F=R[1];return(M+F)*3/4-F}function u(A,R,M){return(R+M)*3/4-M}function g(A){var R,M=a(A),F=M[0],q=M[1],D=new n(u(A,F,q)),I=0,oe=q>0?F-4:F,J;for(J=0;J>16&255,D[I++]=R>>8&255,D[I++]=R&255;return q===2&&(R=r[A.charCodeAt(J)]<<2|r[A.charCodeAt(J+1)]>>4,D[I++]=R&255),q===1&&(R=r[A.charCodeAt(J)]<<10|r[A.charCodeAt(J+1)]<<4|r[A.charCodeAt(J+2)]>>2,D[I++]=R>>8&255,D[I++]=R&255),D}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,M){for(var F,q=[],D=R;Doe?oe:I+D));return F===1?(R=A[M-1],q.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(A[M-2]<<8)+A[M-1],q.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),q.join("")}}),ma=oi(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+v>=1?r+=S/u:r+=S*Math.pow(2,1-v),r*u>=2&&(a++,u/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*u-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=R,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=M*128}}),Zr=da(),Ke=ma(),ti=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ye.Buffer=T;Ye.SlowBuffer=Ea;Ye.INSPECT_MAX_BYTES=50;var ur=2147483647;Ye.kMaxLength=ur;T.TYPED_ARRAY_SUPPORT=fa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function fa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function be(e){if(e>ur)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return tn(e)}return si(e,t,r)}T.poolSize=8192;function si(e,t,r){if(typeof e=="string")return ha(e,t);if(ArrayBuffer.isView(e))return ya(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return li(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=wa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return si(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ai(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ga(e,t,r){return ai(e),e<=0?be(e):t!==void 0?typeof r=="string"?be(e).fill(t,r):be(e).fill(t):be(e)}T.alloc=function(e,t,r){return ga(e,t,r)};function tn(e){return ai(e),be(e<0?0:rn(e)|0)}T.allocUnsafe=function(e){return tn(e)};T.allocUnsafeSlow=function(e){return tn(e)};function ha(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ui(e,t)|0,n=be(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Xr(e){let t=e.length<0?0:rn(e.length)|0,r=be(t);for(let n=0;n=ur)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ur.toString(16)+" bytes");return e|0}function Ea(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(de(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ui(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return en(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return wi(e).length;default:if(i)return n?-1:en(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ui;function ba(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Oa(this,t,r);case"utf8":case"utf-8":return pi(this,t,r);case"ascii":return Sa(this,t,r);case"latin1":case"binary":return Ia(this,t,r);case"base64":return Aa(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ka(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};ti&&(T.prototype[ti]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,on(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:ri(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ri(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ri(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return xa(this,e,t,r);case"utf8":case"utf-8":return Pa(this,e,t,r);case"ascii":case"latin1":case"binary":return va(this,e,t,r);case"base64":return Ta(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ca(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Aa(e,t,r){return t===0&&r===e.length?Zr.fromByteArray(e):Zr.fromByteArray(e.slice(t,r))}function pi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ra(n)}var ni=4096;function Ra(e){let t=e.length;if(t<=ni)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Re(function(e){e=e>>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||H(e,4,this.length),Ke.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),Ke.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),Ke.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),Ke.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function di(e,t,r,n,i){yi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function mi(e,t,r,n,i){yi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Re(function(e,t=0){return di(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Re(function(e,t=0){return mi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Re(function(e,t=0){return di(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Re(function(e,t=0){return mi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function gi(e,t,r,n,i){return t=+t,r=r>>>0,i||fi(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ke.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return gi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return gi(this,e,t,!1,r)};function hi(e,t,r,n,i){return t=+t,r=r>>>0,i||fi(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ke.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return hi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return hi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ii(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ii(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ii(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Da(e,t,r){ze(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Pt(t,e.length-(r+1))}function yi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new We.ERR_OUT_OF_RANGE("value",a,e)}Da(n,i,o)}function ze(e,t){if(typeof e!="number")throw new We.ERR_INVALID_ARG_TYPE(t,"number",e)}function Pt(e,t,r){throw Math.floor(e)!==e?(ze(e,r),new We.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new We.ERR_BUFFER_OUT_OF_BOUNDS:new We.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ma=/[^+/0-9A-Za-z-_]/g;function Na(e){if(e=e.split("=")[0],e=e.trim().replace(Ma,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function en(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Fa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function wi(e){return Zr.toByteArray(Na(e))}function cr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function on(e){return e!==e}var La=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?qa:e}function qa(){throw new Error("BigInt not supported")}});var w,f=Ae(()=>{"use strict";w=qe(Ei())});function Ba(){return!1}var Ua,$a,Ci,Ai=Ae(()=>{"use strict";f();c();p();d();m();Ua={},$a={existsSync:Ba,promises:Ua},Ci=$a});function Ha(...e){return e.join("/")}function Wa(...e){return e.join("/")}var $i,Ka,za,Tt,Vi=Ae(()=>{"use strict";f();c();p();d();m();$i="/",Ka={sep:$i},za={resolve:Ha,posix:Ka,join:Wa,sep:$i},Tt=za});var fr,Ji=Ae(()=>{"use strict";f();c();p();d();m();fr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Qi=Le((gm,Gi)=>{"use strict";f();c();p();d();m();Gi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Ki=Le((Rm,Wi)=>{"use strict";f();c();p();d();m();Wi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Yi=Le((Mm,zi)=>{"use strict";f();c();p();d();m();var rl=Ki();zi.exports=e=>typeof e=="string"?e.replace(rl(),""):e});var wn=Le((Sh,go)=>{"use strict";f();c();p();d();m();go.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{Wu.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var $o=Le(()=>{"use strict";f();c();p();d();m()});f();c();p();d();m();var Pi={};Yr(Pi,{defineExtension:()=>bi,getExtensionContext:()=>xi});f();c();p();d();m();f();c();p();d();m();function bi(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();d();m();function xi(e){return e}var Ti={};Yr(Ti,{validator:()=>vi});f();c();p();d();m();f();c();p();d();m();function vi(...e){return t=>t}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var sn,Ri,Si,Ii,Oi=!0;typeof y<"u"&&({FORCE_COLOR:sn,NODE_DISABLE_COLORS:Ri,NO_COLOR:Si,TERM:Ii}=y.env||{},Oi=y.stdout&&y.stdout.isTTY);var Va={enabled:!Ri&&Si==null&&Ii!=="dumb"&&(sn!=null&&sn!=="0"||Oi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Va.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Zp=V(0,0),pr=V(1,22),dr=V(2,22),Xp=V(3,23),ki=V(4,24),ed=V(7,27),td=V(8,28),rd=V(9,29),nd=V(30,39),Ze=V(31,39),Di=V(32,39),Mi=V(33,39),Ni=V(34,39),id=V(35,39),Fi=V(36,39),od=V(37,39),_i=V(90,39),sd=V(90,39),ad=V(40,49),ld=V(41,49),ud=V(42,49),cd=V(43,49),pd=V(44,49),dd=V(45,49),md=V(46,49),fd=V(47,49);f();c();p();d();m();var ja=100,Li=["green","yellow","blue","magenta","cyan","red"],mr=[],qi=Date.now(),Ja=0,an=typeof y<"u"?y.env:{};globalThis.DEBUG??=an.DEBUG??"";globalThis.DEBUG_COLORS??=an.DEBUG_COLORS?an.DEBUG_COLORS==="true":!0;var vt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ga(e){let t={color:Li[Ja++%Li.length],enabled:vt.enabled(e),namespace:e,log:vt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&mr.push([o,...n]),mr.length>ja&&mr.shift(),vt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Qa(g)),u=`+${Date.now()-qi}ms`;qi=Date.now(),a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Bi=new Proxy(Ga,{get:(e,t)=>vt[t],set:(e,t,r)=>vt[t]=r});function Qa(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Ui(){mr.length=0}var ee=Bi;f();c();p();d();m();f();c();p();d();m();var ji="library";function Ct(e){let t=Ya();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":ji)}function Ya(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}f();c();p();d();m();f();c();p();d();m();var Ue;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Ue||={});var Rt={};Yr(Rt,{error:()=>el,info:()=>Xa,log:()=>Za,query:()=>tl,should:()=>Hi,tags:()=>At,warn:()=>ln});f();c();p();d();m();var At={error:Ze("prisma:error"),warn:Mi("prisma:warn"),info:Fi("prisma:info"),query:Ni("prisma:query")},Hi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Za(...e){console.log(...e)}function ln(e,...t){Hi.warn()&&console.warn(`${At.warn} ${e}`,...t)}function Xa(e,...t){console.info(`${At.info} ${e}`,...t)}function el(e,...t){console.error(`${At.error} ${e}`,...t)}function tl(e,...t){console.log(`${At.query} ${e}`,...t)}f();c();p();d();m();function xe(e,t){throw new Error(t)}f();c();p();d();m();function un(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();d();m();var cn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});f();c();p();d();m();function Xe(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();d();m();function pn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Zi.has(e)||(Zi.add(e),ln(t,...r))};f();c();p();d();m();var K=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(K,"PrismaClientKnownRequestError");var Se=class extends K{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(Se,"NotFoundError");f();c();p();d();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(G,"PrismaClientInitializationError");f();c();p();d();m();var Ie=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Ie,"PrismaClientRustPanicError");f();c();p();d();m();var se=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(se,"PrismaClientUnknownRequestError");f();c();p();d();m();var z=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(z,"PrismaClientValidationError");f();c();p();d();m();f();c();p();d();m();var et=9e15,Me=1e9,dn="0123456789abcdef",yr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",wr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",mn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},no,Pe,_=!0,br="[DecimalError] ",De=br+"Invalid argument: ",io=br+"Precision limit exceeded",oo=br+"crypto unavailable",so="[object Decimal]",X=Math.floor,Q=Math.pow,nl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,il=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ol=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ao=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,k=7,sl=9007199254740991,al=yr.length-1,fn=wr.length-1,C={toStringTag:so};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};C.ceil=function(){return O(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=ll(n,mo(n,r)),n.precision=e,n.rounding=t,O(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*Q(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=Q(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=U(u.plus(g).times(a),u.plus(l),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,O(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/k))*k,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return U(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return O(U(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return O(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Pr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Pr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,U(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=U(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=fn)return s=ce(g,h+4,v).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=fn)return s=ce(g,h+4,v).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/k+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/k),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+S,s=ke(u,a),n=t?Er(g,a+10):ke(e,a),l=U(s,n,a,1),St(l.d,i=h,v))do if(a+=10,s=ke(u,a),n=t?Er(g,a+10):ke(e,a),l=U(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(St(l.d,i+=10,v));return _=!0,O(l,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(u=S.d,v=e.d,a=A.precision,l=A.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new A(S);else return new A(l===3?-0:0);return _?O(e,a,l):e}if(r=X(e.e/k),g=X(S.e/k),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=v.length):(t=v,r=g,s=u.length),n=Math.max(Math.ceil(a/k),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=v.length,h=n0;--n)u[s++]=0;for(n=v.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/pe|0,u[i]%=pe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=xr(u,n),_?O(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=lo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=cl(n,mo(n,r)),n.precision=e,n.rounding=t,O(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(U(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,O(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=U(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=X(g.e/k)+X(e.e/k),l=v.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*v[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=xr(o,r),_?O(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return yn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,Me),t===void 0?t=n.rounding:ne(t,0,8),O(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=me(n,!0):(ne(e,0,Me),t===void 0?t=i.rounding:ne(t,0,8),n=O(new i(n),e+1,t),r=me(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=me(i):(ne(e,0,Me),t===void 0?t=o.rounding:ne(t,0,8),n=O(new o(i),e+i.e+1,t),r=me(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(u=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=lo(A)-S.e-1,s=o%k,t.d[0]=Q(10,s<0?k+s:s),e==null)e=o>0?t:u;else{if(a=new R(e),!a.isInt()||a.lt(u))throw Error(De+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new R(Y(A)),g=R.precision,R.precision=o=A.length*k*2;h=U(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=U(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=S.s,v=U(u,n,o,1).minus(S).abs().cmp(U(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],R.precision=g,_=!0,v};C.toHexadecimal=C.toHex=function(e,t){return yn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=U(r,e,0,t,1).times(e),_=!0,O(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return yn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(Q(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=X(e.e/k),t>=e.d.length-1&&(r=u<0?-u:u)<=sl)return i=uo(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=gn(e.times(ke(a,n+r)),n),i.d&&(i=O(i,n+5,1),St(i.d,n,o)&&(t=n+10,i=O(gn(e.times(ke(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,O(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=me(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,Me),t===void 0?t=i.rounding:ne(t,0,8),n=O(new i(n),e,t),r=me(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,Me),t===void 0?t=n.rounding:ne(t,0,8)),O(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=me(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return O(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=me(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function St(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=k,i=0):(i=Math.ceil((t+1)/k),t%=k),o=Q(10,k-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==Q(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==Q(10,t-3)-1,s}function hr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function ll(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Pr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var U=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,v,S,A,R,M,F,q,D,I,oe,J,Qr,sr,xt,Hr,ue,ar,lr=n.constructor,Wr=n.s==i.s?1:-1,Z=n.d,$=i.d;if(!Z||!Z[0]||!$||!$[0])return new lr(!n.s||!i.s||(Z?$&&Z[0]==$[0]:!$)?NaN:Z&&Z[0]==0||!$?Wr*0:Wr/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=k,g=X(n.e/S)-X(i.e/S)),ue=$.length,xt=Z.length,F=new lr(Wr),q=F.d=[],h=0;$[h]==(Z[h]||0);h++);if($[h]>(Z[h]||0)&&g--,o==null?(J=o=lr.precision,s=lr.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)q.push(1),A=!0;else{if(J=J/S+2|0,h=0,ue==1){for(v=0,$=$[0],J++;(h1&&($=e($,v,l),Z=e(Z,v,l),ue=$.length,xt=Z.length),sr=ue,D=Z.slice(0,ue),I=D.length;I=l/2&&++Hr;do v=0,u=t($,D,ue,I),u<0?(oe=D[0],ue!=I&&(oe=oe*l+(D[1]||0)),v=oe/Hr|0,v>1?(v>=l&&(v=l-1),R=e($,v,l),M=R.length,I=D.length,u=t(R,D,M,I),u==1&&(v--,r(R,ue=10;v/=10)h++;F.e=h+g*S-1,O(F,a?o+F.e+1:o,s,A)}return F}}();function O(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=k,s=t,g=h[v=0],l=g/Q(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/k),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=k,s=o-k+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=k,s=o-k+i,l=s<0?0:g/Q(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%Q(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/Q(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=Q(10,(k-t%k)%k),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=Q(10,k-o),h[v]=s>0?(g/Q(10,i-s)%Q(10,s)|0)*a:0),u)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Oe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Oe(-i-1)+o,r&&(n=r-s)>0&&(o+=Oe(n))):i>=s?(o+=Oe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Oe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Oe(n))),o}function xr(e,t){var r=e[0];for(t*=k;r>=10;r/=10)t++;return t}function Er(e,t,r){if(t>al)throw _=!0,r&&(e.precision=r),Error(io);return O(new e(yr),t,1,!0)}function ce(e,t,r){if(t>fn)throw Error(io);return O(new e(wr),t,r,!0)}function lo(e){var t=e.length-1,r=t*k+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Oe(e){for(var t="";e--;)t+="0";return t}function uo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/k+4);for(_=!1;;){if(r%2&&(o=o.times(t),to(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),to(t.d,s)}return _=!0,o}function eo(e){return e.d[e.d.length-1]&1}function co(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=A):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(Q(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus(U(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(u<3&&St(s.d,l-n,S,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return O(s,v.precision=A,S,_=!0);else return v.precision=A,s}s=a}}function ke(e,t){var r,n,i,o,s,a,l,u,g,h,v,S=1,A=10,R=e,M=R.d,F=R.constructor,q=F.rounding,D=F.precision;if(R.s<0||!M||!M[0]||!R.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:R.s!=1?NaN:M?0:R);if(t==null?(_=!1,g=D):g=t,F.precision=g+=A,r=Y(M),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=Y(R.d),n=r.charAt(0),S++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return u=Er(F,g+2,D).times(o+""),R=ke(new F(n+"."+r.slice(1)),g-A).plus(u),F.precision=D,t==null?O(R,D,q,_=!0):R;for(h=R,l=s=R=U(R.minus(1),R.plus(1),g,1),v=O(R.times(R),g,1),i=3;;){if(s=O(s.times(v),g,1),u=l.plus(U(s,new F(i),g,1)),Y(u.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Er(F,g+2,D).times(o+""))),l=U(l,new F(S),g,1),t==null)if(St(l.d,g-A,q,a))F.precision=g+=A,u=s=R=U(h.minus(1),h.plus(1),g,1),v=O(R.times(R),g,1),i=a=1;else return O(l,F.precision=D,q,_=!0);else return F.precision=D,l;l=u,i+=2}}function po(e){return String(e.s*e.s/0)}function hn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%k,r<0&&(n+=k),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ao.test(t))return hn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(il.test(t))r=16,t=t.toLowerCase();else if(nl.test(t))r=2;else if(ol.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=uo(n,new n(r),o,o*2)),u=hr(t,r,pe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=xr(u,g),e.d=u,_=!1,s&&(e=U(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):$e.pow(2,l))),_=!0,e)}function cl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Pr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/k);for(_=!1,l=r.times(r),a=new e(n);;){if(s=U(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=U(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return _=!0,s.d.length=h+1,s}function Pr(e,t){for(var r=e;--t;)r*=e;return r}function mo(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=eo(r)?n?2:3:n?4:1,t;Pe=eo(r)?n?1:4:n?3:2}return t.minus(i).abs()}function yn(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor,A=r!==void 0;if(A?(ne(r,1,Me),n===void 0?n=S.rounding:ne(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=po(e);else{for(g=me(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new S(1),v.e=g.length-s,v.d=hr(me(v),10,i),v.e=v.d.length),h=hr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=U(e,v,r,n,0,i),h=e.d,o=e.e,u=no),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=hr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function pl(e){return new this(e).abs()}function dl(e){return new this(e).acos()}function ml(e){return new this(e).acosh()}function fl(e,t){return new this(e).plus(t)}function gl(e){return new this(e).asin()}function hl(e){return new this(e).asinh()}function yl(e){return new this(e).atan()}function wl(e){return new this(e).atanh()}function El(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(U(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(U(e,t,o,1)),r}function bl(e){return new this(e).cbrt()}function xl(e){return O(e=new this(e),e.e+1,2)}function Pl(e,t,r){return new this(e).clamp(t,r)}function vl(e){if(!e||typeof e!="object")throw Error(br+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=mn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(oo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function Tl(e){return new this(e).cos()}function Cl(e){return new this(e).cosh()}function fo(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,ro(o)){u.s=o.s,_?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(oo);else for(;o=10;i/=10)n++;ne.highlight()},eu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function tu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function ru({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(nu(t))),i){a.push("");let u=[i.toString()];o&&(u.push(o),u.push(s.dim(")"))),a.push(u.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function nu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function ot(e){let t=e.showColors?Xl:eu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=tu(e),ru(r,t)}f();c();p();d();m();var xo=qe(wn());f();c();p();d();m();function wo(e,t,r){let n=Eo(e),i=iu(n),o=su(i);o?Tr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Eo(e){return e.errors.flatMap(t=>t.kind==="Union"?Eo(t):[t])}function iu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:ou(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ou(e,t){return[...new Set(e.concat(t))]}function su(e){return pn(e,(t,r)=>{let n=ho(t),i=ho(r);return n!==i?n-i:yo(t)-yo(r)})}function ho(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function yo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();d();m();var ae=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();c();p();d();m();f();c();p();d();m();var st=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};f();c();p();d();m();f();c();p();d();m();var Cr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();d();m();var Ar=e=>e,Rr={bold:Ar,red:Ar,green:Ar,dim:Ar,enabled:!1},bo={bold:pr,red:Ze,green:Di,dim:dr,enabled:!0},at={write(e){e.writeLine(",")}};f();c();p();d();m();var fe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();c();p();d();m();var Ne=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var lt=class extends Ne{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Cr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new fe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(at,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ut=class e extends Ne{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof lt&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new fe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(at,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();c();p();d();m();var W=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new fe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();c();p();d();m();var Ot=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(at,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Tr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":lu(e,t);break;case"IncludeOnScalar":uu(e,t);break;case"EmptySelection":cu(e,t,r);break;case"UnknownSelectionField":fu(e,t);break;case"InvalidSelectionValue":gu(e,t);break;case"UnknownArgument":hu(e,t);break;case"UnknownInputField":yu(e,t);break;case"RequiredArgumentMissing":wu(e,t);break;case"InvalidArgumentType":Eu(e,t);break;case"InvalidArgumentValue":bu(e,t);break;case"ValueTooLarge":xu(e,t);break;case"SomeFieldsMissing":Pu(e,t);break;case"TooManyFieldsGiven":vu(e,t);break;case"Union":wo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function lu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function uu(e,t){let[r,n]=kt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ae(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Dt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function cu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){pu(e,t,i);return}if(n.hasField("select")){du(e,t);return}}if(r?.[rt(e.outputType.name)]){mu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function pu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ae(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function du(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),To(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Dt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function mu(e,t){let r=new Ot;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ae("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=kt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ut;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function fu(e,t){let r=Co(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":To(n,e.outputType);break;case"include":Tu(n,e.outputType);break;case"omit":Cu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Dt(n)),i.join(" ")})}function gu(e,t){let r=Co(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function hu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Au(n,e.arguments)),t.addErrorMessage(i=>Po(i,r,e.arguments.map(o=>o.name)))}function yu(e,t){let[r,n]=kt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ao(o,e.inputType)}t.addErrorMessage(o=>Po(o,n,e.inputType.fields.map(s=>s.name)))}function Po(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Su(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Dt(e)),n.join(" ")}function wu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=kt(e.argumentPath),s=new Ot,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ae(o,s).makeRequired())}else{let l=e.inputTypes.map(vo).join(" | ");a.addSuggestion(new ae(o,l).makeRequired())}}function vo(e){return e.kind==="list"?`${vo(e.elementType)}[]`:e.name}function Eu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Sr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function bu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Sr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function xu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Pu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ao(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Sr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Dt(i)),o.join(" ")})}function vu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function To(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ae(r.name,"true"))}function Tu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ae(r.name,"true"))}function Cu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ae(r.name,"true"))}function Au(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ae(r.name,r.typeNames.join(" | ")))}function Co(e,t){let[r,n]=kt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ao(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ae(r.name,r.typeNames.join(" | ")))}function kt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Dt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Ru=3;function Su(e,t){let r=1/0,n;for(let i of t){let o=(0,xo.default)(e,i);o>Ru||o`}};function ct(e){return e instanceof Mt}f();c();p();d();m();var Ir=Symbol(),En=new WeakMap,Te=class{constructor(t){t===Ir?En.set(this,`Prisma.${this._getName()}`):En.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return En.get(this)}},Nt=class extends Te{_getNamespace(){return"NullTypes"}},Ft=class extends Nt{};xn(Ft,"DbNull");var _t=class extends Nt{};xn(_t,"JsonNull");var Lt=class extends Nt{};xn(Lt,"AnyNull");var bn={classes:{DbNull:Ft,JsonNull:_t,AnyNull:Lt},instances:{DbNull:new Ft(Ir),JsonNull:new _t(Ir),AnyNull:new Lt(Ir)}};function xn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();d();m();var So=": ",Or=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+So.length}write(t){let r=new fe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(So).write(this.value)}};var Pn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function pt(e){return new Pn(Io(e))}function Io(e){let t=new ut;for(let[r,n]of Object.entries(e)){let i=new Or(r,Oo(n));t.addField(i)}return t}function Oo(e){if(typeof e=="string")return new W(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new W(String(e));if(typeof e=="bigint")return new W(`${e}n`);if(e===null)return new W("null");if(e===void 0)return new W("undefined");if(it(e))return new W(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new W(`Buffer.alloc(${e.byteLength})`):new W(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=vr(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof Te?new W(`Prisma.${e._getName()}`):ct(e)?new W(`prisma.${Ro(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Iu(e):typeof e=="object"?Io(e):new W(Object.prototype.toString.call(e))}function Iu(e){let t=new lt;for(let r of e)t.addItem(Oo(r));return t}function kr(e,t){let r=t==="pretty"?bo:Rr,n=e.renderAllMessages(r),i=new st(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Dr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=pt(e);for(let h of t)Tr(h,a,s);let{message:l,args:u}=kr(a,r),g=ot({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new z(g,{clientVersion:o})}f();c();p();d();m();f();c();p();d();m();var ge=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();c();p();d();m();function qt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();c();p();d();m();function he(e){return e.replace(/^./,t=>t.toLowerCase())}f();c();p();d();m();function Do(e,t,r){let n=he(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ou({...e,...ko(t.name,e,t.result.$allModels),...ko(t.name,e,t.result[n])})}function Ou(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Xe(e,n=>({...n,needs:r(n.name,new Set)}))}function ko(e,t,r){return r?Xe(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ku(t,o,i)})):{}}function ku(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Mo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function No(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Mr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ge;this.modelExtensionsCache=new ge;this.queryCallbacksCache=new ge;this.clientExtensions=qt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=qt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Do(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=he(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},dt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Mr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Mr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();c();p();d();m();f();c();p();d();m();var Fo=Symbol(),Bt=class{constructor(t){if(t!==Fo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?vn:t}},vn=new Bt(Fo);function ye(e){return e instanceof Bt}var Du={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},_o="explicitly `undefined` values are not allowed";function Cn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=dt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Tn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Du[t],query:Ut(r,h)}}function Ut({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:qo(r,n),selection:Mu(e,t,i,n)}}function Mu(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Lu(e,n)):Nu(n,t,r)}function Nu(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Fu(n,t,e),e.isPreviewFeatureOn("omitApi")&&_u(n,r,e),n}function Fu(e,t,r){for(let[n,i]of Object.entries(t)){if(ye(i))continue;let o=r.nestSelection(n);if(An(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ut(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ut(i,o)}}function _u(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=No(i,n);for(let[s,a]of Object.entries(o)){if(ye(a))continue;An(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Lu(e,t){let r={},n=t.getComputedFields(),i=Mo(e,n);for(let[o,s]of Object.entries(i)){if(ye(s))continue;let a=t.nestSelection(o);An(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||ye(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ut({},a):r[o]=!0;continue}r[o]=Ut(s,a)}}return r}function Lo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(nt(e)){if(vr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ct(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return qu(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:w.Buffer.from(e).toString("base64")};if(Bu(e))return e.values;if(it(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Te){if(e!==bn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Uu(e))return e.toJSON();if(typeof e=="object")return qo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function qo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ye(i)||(i!==void 0?r[n]=Lo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:_o}))}return r}function qu(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[rt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:xe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();c();p();d();m();var $t=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};f();c();p();d();m();function $u(e){return{models:Rn(e.models),enums:Rn(e.enums),types:Rn(e.types)}}function Rn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function Vu(e,t){let r=qt(()=>ju(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ju(e){return{datamodel:{models:Sn(e.models),enums:Sn(e.enums),types:Sn(e.types)}}}function Sn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();d();m();var In=new WeakMap,Nr="$$PrismaTypedSql",On=class{constructor(t,r){In.set(this,{sql:t,values:r}),Object.defineProperty(this,Nr,{value:Nr})}get sql(){return In.get(this).sql}get values(){return In.get(this).values}};function Ju(e){return(...t)=>new On(e,t)}function Bo(e){return e!=null&&e[Nr]===Nr}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();function Vt(e){return{ok:!1,error:e,map(){return Vt(e)},flatMap(){return Vt(e)}}}var kn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Dn=e=>{let t=new kn,r=we(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>Gu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Hu(t,e.getConnectionInfo.bind(e))),n},Gu=(e,t)=>{let r=we(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>Qu(e,o))}},Qu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),commit:we(e,t.commit.bind(t)),rollback:we(e,t.rollback.bind(t))});function we(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Vt({kind:"GenericJs",id:i})}}}function Hu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Vt({kind:"GenericJs",id:i})}}}var oa=qe(Uo());var iD=qe($o());Ji();Ai();Vi();f();c();p();d();m();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();c();p();d();m();f();c();p();d();m();var Fr={enumerable:!0,configurable:!0,writable:!0};function _r(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Fr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Jo=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=Yu(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Go(Reflect.ownKeys(o),r),a=Go(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Fr,...l?.getPropertyDescriptor(s)}:Fr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Jo]=function(){let o={...this};return delete o[Jo],o},i}function Yu(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Go(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();d();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();d();m();function Lr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();d();m();function Qo(e){if(e===void 0)return"";let t=pt(e);return new st(0,{colors:Rr}).write(t).toString()}f();c();p();d();m();var Zu="P2037";function Jt({error:e,user_facing_error:t},r,n){return t.error_code?new K(Xu(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new se(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Xu(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Zu&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Mn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Mn}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Ho={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ft(e={}){let t=tc(e);return Object.entries(t).reduce((n,[i,o])=>(Ho[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function tc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Wo(e,t){let r=qr(e);return t({action:"aggregate",unpacker:r,argsMapper:ft})(e)}f();c();p();d();m();function rc(e={}){let{select:t,...r}=e;return typeof t=="object"?ft({...r,_count:t}):ft({...r,_count:{_all:!0}})}function nc(e={}){return typeof e.select=="object"?t=>qr(e)(t)._count:t=>qr(e)(t)._count._all}function Ko(e,t){return t({action:"count",unpacker:nc(e),argsMapper:rc})(e)}f();c();p();d();m();function ic(e={}){let t=ft(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function oc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function zo(e,t){return t({action:"groupBy",unpacker:oc(e),argsMapper:ic})(e)}function Yo(e,t,r){if(t==="aggregate")return n=>Wo(n,r);if(t==="count")return n=>Ko(n,r);if(t==="groupBy")return n=>zo(n,r)}f();c();p();d();m();function Zo(e,t){let r=t.fields.filter(i=>!i.relationName),n=cn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Mt(e,o,s.type,s.isList,s.kind==="enum")},..._r(Object.keys(n))})}f();c();p();d();m();f();c();p();d();m();var Xo=e=>Array.isArray(e)?e:e.split("."),Nn=(e,t)=>Xo(t).reduce((r,n)=>r&&r[n],e),es=(e,t,r)=>Xo(t).reduceRight((n,i,o,s)=>Object.assign({},Nn(e,s.slice(0,o)),{[i]:n}),r);function sc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function ac(e,t,r){return t===void 0?e??{}:es(t,r,e||!0)}function Fn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Fe(e._errorFormat),g=sc(n,i),h=ac(l,o,g),v=r({dataPath:g,callsite:u})(h),S=lc(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let F=[a[R].type,r,R],q=[g,h];return Fn(e,...F,...q)},..._r([...S,...Object.getOwnPropertyNames(v)])})}}function lc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}f();c();p();d();m();function ts(e,t,r,n){return e===Ue.ModelAction.findFirstOrThrow||e===Ue.ModelAction.findUniqueOrThrow?uc(t,r,n):n}function uc(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=ot({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new z(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof K&&o.code==="P2025"?new Se(`No ${e} found`,t):o})}}var cc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],pc=["aggregate","count","groupBy"];function _n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[dc(e,t),fc(e,t),jt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return Ee({},n)}function dc(e,t){let r=he(t),n=Object.keys(Ue.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=ts(o,t,e._clientVersion,s);let a=l=>u=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let v={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...v,...l})})};return cc.includes(o)?Fn(e,t,a):mc(i)?Yo(e,i,a):a({})}}}function mc(e){return pc.includes(e)}function fc(e,t){return Ve(te("fields",()=>{let r=e._runtimeDataModel.models[t];return Zo(t,r)}))}f();c();p();d();m();function rs(e){return e.replace(/^./,t=>t.toUpperCase())}var Ln=Symbol();function Gt(e){let t=[gc(e),te(Ln,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(jt(r)),Ee(e,t)}function gc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(he),n=[...new Set(t.concat(r))];return Ve({getKeys(){return n},getPropertyValue(i){let o=rs(i);if(e._runtimeDataModel.models[o]!==void 0)return _n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return _n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ns(e){return e[Ln]?e[Ln]:e}function is(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Gt(t)}f();c();p();d();m();f();c();p();d();m();function os({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(mt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(mt(u))}hc(e,l.needs)&&s.push(yc(l,Ee(e,s)))}return s.length>0||a.length>0?Ee(e,[...s,...a]):e}function hc(e,t){return t.every(r=>un(e,r))}function yc(e,t){return Ve(te(e.name,()=>e.compute(t)))}f();c();p();d();m();function Br({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Br({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function as({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Br({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=he(l);return os({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();d();m();f();c();p();d();m();function ls(e){if(e instanceof le)return wc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ls(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=fs(o,l),a.args=s,cs(e,a,r,n+1)}})})}function ps(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return cs(e,t,s)}function ds(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ms(r,n,0,e):e(r)}}function ms(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=fs(i,l),ms(a,t,r+1,n)}})}var us=e=>e;function fs(e=us,t=us){return r=>e(t(r))}f();c();p();d();m();var gs=ee("prisma:client"),hs={Vercel:"vercel","Netlify CI":"netlify"};function ys({postinstall:e,ciName:t,clientVersion:r}){if(gs("checkPlatformCaching:postinstall",e),gs("checkPlatformCaching:ciName",t),e===!0&&t&&t in hs){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${hs[t]}-build`;throw console.error(n),new G(n,r)}}f();c();p();d();m();function ws(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Ec="Cloudflare-Workers",bc="node";function Es(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Ec?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===bc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var xc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function qn(){let e=Es();return{id:e,prettyName:xc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();function gt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw qn().id==="workerd"?new G(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();d();m();f();c();p();d();m();var Ur=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Ur{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();c();p();d();m();f();c();p();d();m();function L(e,t){return{...e,isRetryable:t}}var ht=class extends ie{constructor(r){super("This request must be retried",L(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(ht,"ForcedRetryError");f();c();p();d();m();var je=class extends ie{constructor(r,n){super(r,L(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(je,"InvalidDatasourceError");f();c();p();d();m();var Je=class extends ie{constructor(r,n){super(r,L(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};N(Je,"NotImplementedYetError");f();c();p();d();m();f();c();p();d();m();var j=class extends ie{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends j{constructor(r){super("Schema needs to be uploaded",L(r,!0));this.name="SchemaMissingError";this.code="P5005"}};N(Ge,"SchemaMissingError");f();c();p();d();m();f();c();p();d();m();var Bn="This request could not be understood by the server",Ht=class extends j{constructor(r,n,i){super(n||Bn,L(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(Ht,"BadRequestError");f();c();p();d();m();var Wt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",L(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};N(Wt,"HealthcheckTimeoutError");f();c();p();d();m();var Kt=class extends j{constructor(r,n,i){super(n,L(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N(Kt,"EngineStartupError");f();c();p();d();m();var zt=class extends j{constructor(r){super("Engine version is not supported",L(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(zt,"EngineVersionNotSupportedError");f();c();p();d();m();var Un="Request timed out",Yt=class extends j{constructor(r,n=Un){super(n,L(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(Yt,"GatewayTimeoutError");f();c();p();d();m();var Pc="Interactive transaction error",Zt=class extends j{constructor(r,n=Pc){super(n,L(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(Zt,"InteractiveTransactionError");f();c();p();d();m();var vc="Request parameters are invalid",Xt=class extends j{constructor(r,n=vc){super(n,L(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(Xt,"InvalidRequestError");f();c();p();d();m();var $n="Requested resource does not exist",er=class extends j{constructor(r,n=$n){super(n,L(r,!1));this.name="NotFoundError";this.code="P5003"}};N(er,"NotFoundError");f();c();p();d();m();var Vn="Unknown server error",yt=class extends j{constructor(r,n,i){super(n||Vn,L(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(yt,"ServerError");f();c();p();d();m();var jn="Unauthorized, check your connection string",tr=class extends j{constructor(r,n=jn){super(n,L(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(tr,"UnauthorizedError");f();c();p();d();m();var Jn="Usage exceeded, retry again later",rr=class extends j{constructor(r,n=Jn){super(n,L(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(rr,"UsageExceededError");async function Tc(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function nr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Tc(e);if(n.type==="QueryEngineError")throw new K(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new yt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new zt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Kt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Wt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Zt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Xt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new tr(r,wt(jn,n));if(e.status===404)return new er(r,wt($n,n));if(e.status===429)throw new rr(r,wt(Jn,n));if(e.status===504)throw new Yt(r,wt(Un,n));if(e.status>=500)throw new yt(r,wt(Vn,n));if(e.status>=400)throw new Ht(r,wt(Bn,n))}function wt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();c();p();d();m();function bs(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();c();p();d();m();var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function xs(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,u,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,u=g&63,r+=Ce[s]+Ce[a]+Ce[l]+Ce[u];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ce[s]+Ce[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ce[s]+Ce[a]+Ce[l]+"="),r}f();c();p();d();m();function Ps(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new G("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();c();p();d();m();function Cc(e){return e[0]*1e3+e[1]/1e6}function vs(e){return new Date(Cc(e))}f();c();p();d();m();var Ts={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();c();p();d();m();f();c();p();d();m();var ir=class extends ie{constructor(r,n){super(`Cannot fetch data from service: -${r}`,L(n,!0));this.name="RequestError";this.code="P5010"}};N(ir,"RequestError");async function Qe(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Gn)(e,t)}catch(i){let o=i.message??"Unknown error";throw new ir(o,{clientVersion:n})}}function Rc(e){return{...e.headers,"Content-Type":"application/json"}}function Sc(e){return{method:e.method,headers:Rc(e)}}function Ic(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new Qn(t.headers)}}async function Gn(e,t={}){let r=Oc("https"),n=Sc(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{let l=r.request(e,n,u=>{let{statusCode:g,headers:{location:h}}=u;g>=301&&g<=399&&h&&(h.startsWith("http")===!1?s(Gn(`${o}${h}`,t)):s(Gn(h,t))),u.on("data",v=>i.push(v)),u.on("end",()=>s(Ic(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var Oc=typeof zr<"u"?zr:()=>{},Qn=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){return this.headers.get(t)??null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var kc=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Cs=ee("prisma:client:dataproxyEngine");async function Dc(e,t){let r=Ts["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&kc.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,u]=s.split("."),g=Mc(`<=${a}.${l}.${u}`),h=await Qe(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let v=await h.text();Cs("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(A){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),A}return S.version}throw new Je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function As(e,t){let r=await Dc(e,t);return Cs("version",r),r}function Mc(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Rs=3,Hn=ee("prisma:client:dataproxyEngine"),Wn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},or=class{constructor(t){this.name="DataProxyEngine";Ps(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=xs(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new Wn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await As(t,this.config),Hn("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let n=typeof r.attributes.query=="string"?r.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[i]=n.split("/* traceparent");n=i}this.logEmitter.emit("query",{query:n,timestamp:vs(r.timestamp),duration:Number(r.attributes.duration_ms),params:r.attributes.params,target:r.attributes.target})}}}),t?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Qe(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Hn("schema response status",r.status);let n=await nr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Lr(t,n),{batchResult:a,elapsed:l}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(u=>"errors"in u&&u.errors.length>0?Jt(u.errors[0],this.clientVersion,this.config.activeProvider):{data:u,elapsed:l})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Hn("graphql response status",a.status),await this.handleError(await nr(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?Jt(l.errors[0],this.config.clientVersion,this.config.activeProvider):new se(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Qe(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await nr(l,this.clientVersion));let u=await l.json(),g=u.extensions;g&&this.propagateResponseExtensions(g);let h=u.id,v=u["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await nr(a,this.clientVersion));let u=(await a.json()).extensions;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=gt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new je(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new je(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new je(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new Je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=Rs)throw i instanceof ht?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Rs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await bs(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new ht({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ss({copyEngine:e=!0},t){let r;try{r=gt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&gr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Ct(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s){let u;throw u=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new z(u.join(` -`),{clientVersion:t.clientVersion})}if(o)return new or(t);throw new z("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}f();c();p();d();m();function $r({generator:e}){return e?.previewFeatures??[]}f();c();p();d();m();var Is=e=>({command:e});f();c();p();d();m();f();c();p();d();m();var Os=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();d();m();function Et(e){try{return ks(e,"fast")}catch{return ks(e,"slow")}}function ks(e,t){return JSON.stringify(e.map(r=>Ms(r,t)))}function Ms(e,t){return Array.isArray(e)?e.map(r=>Ms(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:nt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ve.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Nc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ns(e):e}function Nc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ns(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ds);let t={};for(let r of Object.keys(e))t[r]=Ds(e[r]);return t}function Ds(e){return typeof e=="bigint"?e.toString():Ns(e)}f();c();p();d();m();var Fc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Fs=Fc;var _c=/^(\s*alter\s)/i,_s=ee("prisma:client");function Kn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&_c.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var zn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Bo(r))n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Et(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Os(r),i={values:Et(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?_s(`prisma.${e}(${n}, ${i.values})`):_s(`prisma.${e}(${n})`),{query:n,parameters:i}},Ls={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},qs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();d();m();function Yn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Bs(r(o)):Bs(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Bs(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();d();m();var Us={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Zn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Us}};function $s(e){return e.includes("tracing")?new Zn:Us}f();c();p();d();m();function Vs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();d();m();function js(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();c();p();d();m();var Vr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};f();c();p();d();m();var Qs=qe(Yi());f();c();p();d();m();function jr(e){return typeof e.batchRequestIdx=="number"}f();c();p();d();m();function Js(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Xn(e.query.arguments)),t.push(Xn(e.query.selection)),t.join("")}function Xn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Xn(n)})`:r}).join(" ")})`}f();c();p();d();m();var Lc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function ei(e){return Lc[e]}f();c();p();d();m();var Jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iHe("bigint",r));case"bytes-array":return t.map(r=>He("bytes",r));case"decimal-array":return t.map(r=>He("decimal",r));case"datetime-array":return t.map(r=>He("datetime",r));case"date-array":return t.map(r=>He("date",r));case"time-array":return t.map(r=>He("time",r));default:return t}}function Gs(e){let t=[],r=qc(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>ei(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Uc(o),containsWrite:u,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Hs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ei(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Js(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Bc(t),$c(t,i)||t instanceof Se)throw t;if(t instanceof K&&Vc(t)){let u=Ws(t.meta);Dr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=ot({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new K(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Ie(l,this.client._clientVersion);if(t instanceof se)throw new se(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(l,this.client._clientVersion);if(t instanceof Ie)throw new Ie(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Qs.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Nn(o,s),l=i==="queryRaw"?Gs(a):It(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Uc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Hs(e)};xe(e,"Unknown transaction kind")}}function Hs(e){return{id:e.id,payload:e.payload}}function $c(e,t){return jr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Vc(e){return e.code==="P2009"||e.code==="P2012"}function Ws(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Ws)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();d();m();var Ks="5.22.0";var zs=Ks;f();c();p();d();m();var ta=qe(wn());f();c();p();d();m();var B=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(B,"PrismaClientConstructorValidationError");var Ys=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Zs=["pretty","colorless","minimal"],Xs=["info","query","warn","error"],Jc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=bt(r,t)||` Available datasources: ${t.join(", ")}`;throw new B(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new B(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new B('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!$r(t).includes("driverAdapters"))throw new B('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ct()==="binary")throw new B('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Zs.includes(e)){let t=bt(e,Zs);throw new B(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Xs.includes(r)){let n=bt(r,Xs);throw new B(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=bt(i,o);throw new B(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new B(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new B(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new B(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new B('"omit" option is expected to be an object.');if(e===null)throw new B('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Qc(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new B(Hc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new B(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=bt(r,t);throw new B(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ra(e,t){for(let[r,n]of Object.entries(e)){if(!Ys.includes(r)){let i=bt(r,Ys);throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Jc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new B('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function bt(e,t){if(t.length===0||typeof e!="string")return"";let r=Gc(e,t);return r?` Did you mean "${r}"?`:""}function Gc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ta.default)(e,i)}));r.sort((i,o)=>i.distancert(n)===t);if(r)return e[r]}function Hc(e,t){let r=pt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=kr(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}f();c();p();d();m();function na(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!jr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var _e=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Wc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Kc=Symbol.for("prisma.client.transaction.id"),zc={id:0,nextId(){return++this.id}};function Yc(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Vr;this._createPrismaPromise=Yn();this.$extends=is;e=n?.__internal?.configOverride?.(e)??e,ys(e),n&&ra(n,e);let i=new fr().on("error",()=>{});this._extensions=dt.empty(),this._previewFeatures=$r(e),this._clientVersion=e.clientVersion??zs,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=$s(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Tt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Tt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Dn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new G(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new G("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&ee.enable("prisma:client");let h=Tt.resolve(e.dirname,e.relativePath);Ci.existsSync(h)||(h=e.dirname),_e("dirname",e.dirname),_e("relativePath",e.relativePath),_e("cwd",h);let v=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:Tt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&js(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ws(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:gt,getBatchRequestPayload:Lr,prismaGraphQLToJSError:Jt,PrismaClientUnknownRequestError:se,PrismaClientInitializationError:G,PrismaClientKnownRequestError:K,debug:ee("prisma:client:accelerateEngine"),engineVersion:oa.version,clientVersion:e.clientVersion}},_e("clientVersion",e.clientVersion),this._engine=Ss(e,this._engineConfig),this._requestHandler=new Gr(this,i),l.log)for(let S of l.log){let A=typeof S=="string"?S:S.emit==="stdout"?S.level:null;A&&this.$on(A,R=>{Rt.log(`${Rt.tags[A]??""}`,R.message||R.query)})}this._metrics=new $t(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Gt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ui()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:zn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ia(n,i);return Kn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new z("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Kn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new z(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Is,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:zn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ia(n,i));throw new z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=zc.nextId(),s=Vs(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return na(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Gt(Ee(ns(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Yn(n)),te(Kc,()=>n.id),mt(Fs)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Wc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,M=>g(u,F=>(M?.end(),l(F))));let{runInTransaction:h,args:v,...S}=u,A={...n,...S};v&&(A.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete A.transaction;let R=await ps(this,A);return A.model?as({result:R,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=u?u(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>Cn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(_e("Prisma Client call:"),_e(`prisma.${i}(${Qo(n)})`),_e("Generated request:"),_e(JSON.stringify(R,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ia(e,t){return Zc(e)?[new le(e,t),Ls]:[e,qs]}function Zc(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();d();m();var Xc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function ep(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Xc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();d();m();var export_warnEnvConflicts=void 0;export{Bi as Debug,ve as Decimal,Pi as Extensions,$t as MetricsClient,Se as NotFoundError,G as PrismaClientInitializationError,K as PrismaClientKnownRequestError,Ie as PrismaClientRustPanicError,se as PrismaClientUnknownRequestError,z as PrismaClientValidationError,Ti as Public,le as Sql,Vu as defineDmmfProperty,It as deserializeJsonResponse,$u as dmmfToRuntimeDataModel,zu as empty,Yc as getPrismaClient,qn as getRuntime,Ku as join,ep as makeStrictEnum,Ju as makeTypedQueryFactory,bn as objectEnumValues,Vo as raw,Cn as serializeJsonQuery,vn as skip,jo as sqltag,export_warnEnvConflicts as warnEnvConflicts,gr as warnOnce}; -//# sourceMappingURL=edge-esm.js.map diff --git a/keep-notes/prisma/client-generated/runtime/edge.js b/keep-notes/prisma/client-generated/runtime/edge.js deleted file mode 100644 index f8010b0..0000000 --- a/keep-notes/prisma/client-generated/runtime/edge.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict";var fa=Object.create;var cr=Object.defineProperty;var ga=Object.getOwnPropertyDescriptor;var ha=Object.getOwnPropertyNames;var ya=Object.getPrototypeOf,wa=Object.prototype.hasOwnProperty;var Se=(e,t)=>()=>(e&&(t=e(e=0)),t);var Le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pr=(e,t)=>{for(var r in t)cr(e,r,{get:t[r],enumerable:!0})},oi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ha(t))!wa.call(e,i)&&i!==r&&cr(e,i,{get:()=>t[i],enumerable:!(n=ga(t,i))||n.enumerable});return e};var qe=(e,t,r)=>(r=e!=null?fa(ya(e)):{},oi(t||!e||!e.__esModule?cr(r,"default",{value:e,enumerable:!0}):r,e)),Ea=e=>oi(cr({},"__esModule",{value:!0}),e);var y,c=Se(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,p=Se(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=Se(()=>{"use strict";E=()=>{};E.prototype=E});var m=Se(()=>{"use strict"});var Ti=Le(Ye=>{"use strict";f();c();p();d();m();var ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ba=ci(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=A.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(A){var R=a(A),M=R[0],F=R[1];return(M+F)*3/4-F}function u(A,R,M){return(R+M)*3/4-M}function g(A){var R,M=a(A),F=M[0],q=M[1],D=new n(u(A,F,q)),I=0,ae=q>0?F-4:F,J;for(J=0;J>16&255,D[I++]=R>>8&255,D[I++]=R&255;return q===2&&(R=r[A.charCodeAt(J)]<<2|r[A.charCodeAt(J+1)]>>4,D[I++]=R&255),q===1&&(R=r[A.charCodeAt(J)]<<10|r[A.charCodeAt(J+1)]<<4|r[A.charCodeAt(J+2)]>>2,D[I++]=R>>8&255,D[I++]=R&255),D}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,M){for(var F,q=[],D=R;Dae?ae:I+D));return F===1?(R=A[M-1],q.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(A[M-2]<<8)+A[M-1],q.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),q.join("")}}),xa=ci(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+v>=1?r+=S/u:r+=S*Math.pow(2,1-v),r*u>=2&&(a++,u/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*u-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=R,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=M*128}}),tn=ba(),Ke=xa(),si=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ye.Buffer=T;Ye.SlowBuffer=Ra;Ye.INSPECT_MAX_BYTES=50;var dr=2147483647;Ye.kMaxLength=dr;T.TYPED_ARRAY_SUPPORT=Pa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Pa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function xe(e){if(e>dr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return on(e)}return pi(e,t,r)}T.poolSize=8192;function pi(e,t,r){if(typeof e=="string")return Ta(e,t);if(ArrayBuffer.isView(e))return Ca(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return mi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=Aa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return pi(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function di(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function va(e,t,r){return di(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}T.alloc=function(e,t,r){return va(e,t,r)};function on(e){return di(e),xe(e<0?0:sn(e)|0)}T.allocUnsafe=function(e){return on(e)};T.allocUnsafeSlow=function(e){return on(e)};function Ta(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function rn(e){let t=e.length<0?0:sn(e.length)|0,r=xe(t);for(let n=0;n=dr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+dr.toString(16)+" bytes");return e|0}function Ra(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(de(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return nn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return vi(e).length;default:if(i)return n?-1:nn(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=fi;function Sa(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return qa(this,t,r);case"utf8":case"utf-8":return hi(this,t,r);case"ascii":return _a(this,t,r);case"latin1":case"binary":return La(this,t,r);case"base64":return Na(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ba(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};si&&(T.prototype[si]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ln(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:ai(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ai(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ai(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ia(this,e,t,r);case"utf8":case"utf-8":return Oa(this,e,t,r);case"ascii":case"latin1":case"binary":return ka(this,e,t,r);case"base64":return Da(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ma(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Na(e,t,r){return t===0&&r===e.length?tn.fromByteArray(e):tn.fromByteArray(e.slice(t,r))}function hi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Fa(n)}var li=4096;function Fa(e){let t=e.length;if(t<=li)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ie(function(e){e=e>>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ie(function(e){e=e>>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||H(e,4,this.length),Ke.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),Ke.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),Ke.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),Ke.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function yi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function wi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Ie(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ie(function(e,t=0){return wi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Ie(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ie(function(e,t=0){return wi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ei(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ke.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return bi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return bi(this,e,t,!1,r)};function xi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ke.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return xi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return xi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ui(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ui(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ui(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ua(e,t,r){ze(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function Pi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new We.ERR_OUT_OF_RANGE("value",a,e)}Ua(n,i,o)}function ze(e,t){if(typeof e!="number")throw new We.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(ze(e,r),new We.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new We.ERR_BUFFER_OUT_OF_BOUNDS:new We.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var $a=/[^+/0-9A-Za-z-_]/g;function Va(e){if(e=e.split("=")[0],e=e.trim().replace($a,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function nn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function ja(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function vi(e){return tn.toByteArray(Va(e))}function mr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ln(e){return e!==e}var Ga=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Ie(e){return typeof BigInt>"u"?Qa:e}function Qa(){throw new Error("BigInt not supported")}});var w,f=Se(()=>{"use strict";w=qe(Ti())});function Ha(){return!1}var Wa,Ka,Si,Ii=Se(()=>{"use strict";f();c();p();d();m();Wa={},Ka={existsSync:Ha,promises:Wa},Si=Ka});function tl(...e){return e.join("/")}function rl(...e){return e.join("/")}var ji,nl,il,At,Ji=Se(()=>{"use strict";f();c();p();d();m();ji="/",nl={sep:ji},il={resolve:tl,posix:nl,join:rl,sep:ji},At=il});var yr,Qi=Se(()=>{"use strict";f();c();p();d();m();yr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Wi=Le((hm,Hi)=>{"use strict";f();c();p();d();m();Hi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Yi=Le((Sm,zi)=>{"use strict";f();c();p();d();m();zi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Xi=Le((Nm,Zi)=>{"use strict";f();c();p();d();m();var cl=Yi();Zi.exports=e=>typeof e=="string"?e.replace(cl(),""):e});var Tn=Le((Ih,yo)=>{"use strict";f();c();p();d();m();yo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{Xu.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Qo=Le(()=>{"use strict";f();c();p();d();m()});var rp={};pr(rp,{Debug:()=>mn,Decimal:()=>fe,Extensions:()=>un,MetricsClient:()=>ft,NotFoundError:()=>ve,PrismaClientInitializationError:()=>G,PrismaClientKnownRequestError:()=>W,PrismaClientRustPanicError:()=>Te,PrismaClientUnknownRequestError:()=>ne,PrismaClientValidationError:()=>K,Public:()=>cn,Sql:()=>oe,defineDmmfProperty:()=>Vo,deserializeJsonResponse:()=>rt,dmmfToRuntimeDataModel:()=>$o,empty:()=>Wo,getPrismaClient:()=>pa,getRuntime:()=>Gr,join:()=>Ho,makeStrictEnum:()=>da,makeTypedQueryFactory:()=>jo,objectEnumValues:()=>Dr,raw:()=>_n,serializeJsonQuery:()=>qr,skip:()=>Lr,sqltag:()=>Ln,warnEnvConflicts:()=>void 0,warnOnce:()=>Ot});module.exports=Ea(rp);f();c();p();d();m();var un={};pr(un,{defineExtension:()=>Ci,getExtensionContext:()=>Ai});f();c();p();d();m();f();c();p();d();m();function Ci(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();d();m();function Ai(e){return e}var cn={};pr(cn,{validator:()=>Ri});f();c();p();d();m();f();c();p();d();m();function Ri(...e){return t=>t}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var pn,Oi,ki,Di,Mi=!0;typeof y<"u"&&({FORCE_COLOR:pn,NODE_DISABLE_COLORS:Oi,NO_COLOR:ki,TERM:Di}=y.env||{},Mi=y.stdout&&y.stdout.isTTY);var za={enabled:!Oi&&ki==null&&Di!=="dumb"&&(pn!=null&&pn!=="0"||Mi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!za.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xp=V(0,0),fr=V(1,22),gr=V(2,22),ed=V(3,23),Ni=V(4,24),td=V(7,27),rd=V(8,28),nd=V(9,29),id=V(30,39),Ze=V(31,39),Fi=V(32,39),_i=V(33,39),Li=V(34,39),od=V(35,39),qi=V(36,39),sd=V(37,39),Bi=V(90,39),ad=V(90,39),ld=V(40,49),ud=V(41,49),cd=V(42,49),pd=V(43,49),dd=V(44,49),md=V(45,49),fd=V(46,49),gd=V(47,49);f();c();p();d();m();var Ya=100,Ui=["green","yellow","blue","magenta","cyan","red"],hr=[],$i=Date.now(),Za=0,dn=typeof y<"u"?y.env:{};globalThis.DEBUG??=dn.DEBUG??"";globalThis.DEBUG_COLORS??=dn.DEBUG_COLORS?dn.DEBUG_COLORS==="true":!0;var Ct={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Xa(e){let t={color:Ui[Za++%Ui.length],enabled:Ct.enabled(e),namespace:e,log:Ct.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&hr.push([o,...n]),hr.length>Ya&&hr.shift(),Ct.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:el(g)),u=`+${Date.now()-$i}ms`;$i=Date.now(),a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var mn=new Proxy(Xa,{get:(e,t)=>Ct[t],set:(e,t,r)=>Ct[t]=r});function el(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Vi(){hr.length=0}var ee=mn;f();c();p();d();m();f();c();p();d();m();var Gi="library";function Rt(e){let t=ol();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Gi)}function ol(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}f();c();p();d();m();f();c();p();d();m();var Ue;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Ue||={});var It={};pr(It,{error:()=>ll,info:()=>al,log:()=>sl,query:()=>ul,should:()=>Ki,tags:()=>St,warn:()=>fn});f();c();p();d();m();var St={error:Ze("prisma:error"),warn:_i("prisma:warn"),info:qi("prisma:info"),query:Li("prisma:query")},Ki={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function sl(...e){console.log(...e)}function fn(e,...t){Ki.warn()&&console.warn(`${St.warn} ${e}`,...t)}function al(e,...t){console.info(`${St.info} ${e}`,...t)}function ll(e,...t){console.error(`${St.error} ${e}`,...t)}function ul(e,...t){console.log(`${St.query} ${e}`,...t)}f();c();p();d();m();function Pe(e,t){throw new Error(t)}f();c();p();d();m();function gn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();d();m();var hn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});f();c();p();d();m();function Xe(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();d();m();function yn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{eo.has(e)||(eo.add(e),fn(t,...r))};f();c();p();d();m();var W=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(W,"PrismaClientKnownRequestError");var ve=class extends W{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(ve,"NotFoundError");f();c();p();d();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(G,"PrismaClientInitializationError");f();c();p();d();m();var Te=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Te,"PrismaClientRustPanicError");f();c();p();d();m();var ne=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(ne,"PrismaClientUnknownRequestError");f();c();p();d();m();var K=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(K,"PrismaClientValidationError");f();c();p();d();m();f();c();p();d();m();var et=9e15,Me=1e9,wn="0123456789abcdef",Er="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",br="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",En={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},oo,Ce,_=!0,Pr="[DecimalError] ",De=Pr+"Invalid argument: ",so=Pr+"Precision limit exceeded",ao=Pr+"crypto unavailable",lo="[object Decimal]",X=Math.floor,Q=Math.pow,pl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,dl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ml=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,k=7,fl=9007199254740991,gl=Er.length-1,bn=br.length-1,C={toStringTag:lo};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};C.ceil=function(){return O(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=hl(n,go(n,r)),n.precision=e,n.rounding=t,O(Ce==2||Ce==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*Q(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=Q(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=U(u.plus(g).times(a),u.plus(l),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,O(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/k))*k,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return U(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return O(U(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return O(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Tr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Tr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,U(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=U(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=bn)return s=ce(g,h+4,v).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=bn)return s=ce(g,h+4,v).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/k+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/k),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+S,s=ke(u,a),n=t?xr(g,a+10):ke(e,a),l=U(s,n,a,1),kt(l.d,i=h,v))do if(a+=10,s=ke(u,a),n=t?xr(g,a+10):ke(e,a),l=U(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(kt(l.d,i+=10,v));return _=!0,O(l,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(u=S.d,v=e.d,a=A.precision,l=A.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new A(S);else return new A(l===3?-0:0);return _?O(e,a,l):e}if(r=X(e.e/k),g=X(S.e/k),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=v.length):(t=v,r=g,s=u.length),n=Math.max(Math.ceil(a/k),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=v.length,h=n0;--n)u[s++]=0;for(n=v.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/pe|0,u[i]%=pe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=vr(u,n),_?O(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=co(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=wl(n,go(n,r)),n.precision=e,n.rounding=t,O(Ce>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(U(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,O(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=U(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Ce==2||Ce==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=X(g.e/k)+X(e.e/k),l=v.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*v[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=vr(o,r),_?O(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return vn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ie(e,0,Me),t===void 0?t=n.rounding:ie(t,0,8),O(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=me(n,!0):(ie(e,0,Me),t===void 0?t=i.rounding:ie(t,0,8),n=O(new i(n),e+1,t),r=me(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=me(i):(ie(e,0,Me),t===void 0?t=o.rounding:ie(t,0,8),n=O(new o(i),e+i.e+1,t),r=me(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(u=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=co(A)-S.e-1,s=o%k,t.d[0]=Q(10,s<0?k+s:s),e==null)e=o>0?t:u;else{if(a=new R(e),!a.isInt()||a.lt(u))throw Error(De+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new R(Y(A)),g=R.precision,R.precision=o=A.length*k*2;h=U(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=U(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=S.s,v=U(u,n,o,1).minus(S).abs().cmp(U(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],R.precision=g,_=!0,v};C.toHexadecimal=C.toHex=function(e,t){return vn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ie(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=U(r,e,0,t,1).times(e),_=!0,O(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return vn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(Q(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=X(e.e/k),t>=e.d.length-1&&(r=u<0?-u:u)<=fl)return i=po(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=xn(e.times(ke(a,n+r)),n),i.d&&(i=O(i,n+5,1),kt(i.d,n,o)&&(t=n+10,i=O(xn(e.times(ke(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,O(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=me(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,Me),t===void 0?t=i.rounding:ie(t,0,8),n=O(new i(n),e,t),r=me(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ie(e,1,Me),t===void 0?t=n.rounding:ie(t,0,8)),O(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=me(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return O(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=me(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function kt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=k,i=0):(i=Math.ceil((t+1)/k),t%=k),o=Q(10,k-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==Q(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==Q(10,t-3)-1,s}function wr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function hl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Tr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var U=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,v,S,A,R,M,F,q,D,I,ae,J,Zr,ar,vt,Xr,ue,lr,ur=n.constructor,en=n.s==i.s?1:-1,Z=n.d,$=i.d;if(!Z||!Z[0]||!$||!$[0])return new ur(!n.s||!i.s||(Z?$&&Z[0]==$[0]:!$)?NaN:Z&&Z[0]==0||!$?en*0:en/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=k,g=X(n.e/S)-X(i.e/S)),ue=$.length,vt=Z.length,F=new ur(en),q=F.d=[],h=0;$[h]==(Z[h]||0);h++);if($[h]>(Z[h]||0)&&g--,o==null?(J=o=ur.precision,s=ur.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)q.push(1),A=!0;else{if(J=J/S+2|0,h=0,ue==1){for(v=0,$=$[0],J++;(h1&&($=e($,v,l),Z=e(Z,v,l),ue=$.length,vt=Z.length),ar=ue,D=Z.slice(0,ue),I=D.length;I=l/2&&++Xr;do v=0,u=t($,D,ue,I),u<0?(ae=D[0],ue!=I&&(ae=ae*l+(D[1]||0)),v=ae/Xr|0,v>1?(v>=l&&(v=l-1),R=e($,v,l),M=R.length,I=D.length,u=t(R,D,M,I),u==1&&(v--,r(R,ue=10;v/=10)h++;F.e=h+g*S-1,O(F,a?o+F.e+1:o,s,A)}return F}}();function O(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=k,s=t,g=h[v=0],l=g/Q(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/k),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=k,s=o-k+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=k,s=o-k+i,l=s<0?0:g/Q(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%Q(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/Q(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=Q(10,(k-t%k)%k),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=Q(10,k-o),h[v]=s>0?(g/Q(10,i-s)%Q(10,s)|0)*a:0),u)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Oe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Oe(-i-1)+o,r&&(n=r-s)>0&&(o+=Oe(n))):i>=s?(o+=Oe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Oe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Oe(n))),o}function vr(e,t){var r=e[0];for(t*=k;r>=10;r/=10)t++;return t}function xr(e,t,r){if(t>gl)throw _=!0,r&&(e.precision=r),Error(so);return O(new e(Er),t,1,!0)}function ce(e,t,r){if(t>bn)throw Error(so);return O(new e(br),t,r,!0)}function co(e){var t=e.length-1,r=t*k+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Oe(e){for(var t="";e--;)t+="0";return t}function po(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/k+4);for(_=!1;;){if(r%2&&(o=o.times(t),no(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),no(t.d,s)}return _=!0,o}function ro(e){return e.d[e.d.length-1]&1}function mo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=A):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(Q(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus(U(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(u<3&&kt(s.d,l-n,S,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return O(s,v.precision=A,S,_=!0);else return v.precision=A,s}s=a}}function ke(e,t){var r,n,i,o,s,a,l,u,g,h,v,S=1,A=10,R=e,M=R.d,F=R.constructor,q=F.rounding,D=F.precision;if(R.s<0||!M||!M[0]||!R.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:R.s!=1?NaN:M?0:R);if(t==null?(_=!1,g=D):g=t,F.precision=g+=A,r=Y(M),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=Y(R.d),n=r.charAt(0),S++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return u=xr(F,g+2,D).times(o+""),R=ke(new F(n+"."+r.slice(1)),g-A).plus(u),F.precision=D,t==null?O(R,D,q,_=!0):R;for(h=R,l=s=R=U(R.minus(1),R.plus(1),g,1),v=O(R.times(R),g,1),i=3;;){if(s=O(s.times(v),g,1),u=l.plus(U(s,new F(i),g,1)),Y(u.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(xr(F,g+2,D).times(o+""))),l=U(l,new F(S),g,1),t==null)if(kt(l.d,g-A,q,a))F.precision=g+=A,u=s=R=U(h.minus(1),h.plus(1),g,1),v=O(R.times(R),g,1),i=a=1;else return O(l,F.precision=D,q,_=!0);else return F.precision=D,l;l=u,i+=2}}function fo(e){return String(e.s*e.s/0)}function Pn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%k,r<0&&(n+=k),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),uo.test(t))return Pn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(dl.test(t))r=16,t=t.toLowerCase();else if(pl.test(t))r=2;else if(ml.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=po(n,new n(r),o,o*2)),u=wr(t,r,pe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=vr(u,g),e.d=u,_=!1,s&&(e=U(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):$e.pow(2,l))),_=!0,e)}function wl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Tr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/k);for(_=!1,l=r.times(r),a=new e(n);;){if(s=U(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=U(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return _=!0,s.d.length=h+1,s}function Tr(e,t){for(var r=e;--t;)r*=e;return r}function go(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ce=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ce=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ce=ro(r)?n?2:3:n?4:1,t;Ce=ro(r)?n?1:4:n?3:2}return t.minus(i).abs()}function vn(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor,A=r!==void 0;if(A?(ie(r,1,Me),n===void 0?n=S.rounding:ie(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=fo(e);else{for(g=me(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new S(1),v.e=g.length-s,v.d=wr(me(v),10,i),v.e=v.d.length),h=wr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=U(e,v,r,n,0,i),h=e.d,o=e.e,u=oo),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=wr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function El(e){return new this(e).abs()}function bl(e){return new this(e).acos()}function xl(e){return new this(e).acosh()}function Pl(e,t){return new this(e).plus(t)}function vl(e){return new this(e).asin()}function Tl(e){return new this(e).asinh()}function Cl(e){return new this(e).atan()}function Al(e){return new this(e).atanh()}function Rl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(U(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(U(e,t,o,1)),r}function Sl(e){return new this(e).cbrt()}function Il(e){return O(e=new this(e),e.e+1,2)}function Ol(e,t,r){return new this(e).clamp(t,r)}function kl(e){if(!e||typeof e!="object")throw Error(Pr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=En[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ao);else this[r]=!1;else throw Error(De+r+": "+n);return this}function Dl(e){return new this(e).cos()}function Ml(e){return new this(e).cosh()}function ho(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,io(o)){u.s=o.s,_?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(ao);else for(;o=10;i/=10)n++;ne.highlight()},lu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function uu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function cu({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(pu(t))),i){a.push("");let u=[i.toString()];o&&(u.push(o),u.push(s.dim(")"))),a.push(u.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function pu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function st(e){let t=e.showColors?au:lu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=uu(e),cu(r,t)}f();c();p();d();m();var vo=qe(Tn());f();c();p();d();m();function bo(e,t,r){let n=xo(e),i=du(n),o=fu(i);o?Ar(o,t,r):t.addErrorMessage(()=>"Unknown error")}function xo(e){return e.errors.flatMap(t=>t.kind==="Union"?xo(t):[t])}function du(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:mu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function mu(e,t){return[...new Set(e.concat(t))]}function fu(e){return yn(e,(t,r)=>{let n=wo(t),i=wo(r);return n!==i?n-i:Eo(t)-Eo(r)})}function wo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Eo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();d();m();var le=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();c();p();d();m();f();c();p();d();m();var at=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};f();c();p();d();m();f();c();p();d();m();var Rr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();d();m();var Sr=e=>e,Ir={bold:Sr,red:Sr,green:Sr,dim:Sr,enabled:!1},Po={bold:fr,red:Ze,green:Fi,dim:gr,enabled:!0},lt={write(e){e.writeLine(",")}};f();c();p();d();m();var ge=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();c();p();d();m();var Ne=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var ut=class extends Ne{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Rr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new ge("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(lt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ct=class e extends Ne{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof ut&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new ge("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(lt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();c();p();d();m();var z=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ge(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();c();p();d();m();var Dt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(lt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ar(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":hu(e,t);break;case"IncludeOnScalar":yu(e,t);break;case"EmptySelection":wu(e,t,r);break;case"UnknownSelectionField":Pu(e,t);break;case"InvalidSelectionValue":vu(e,t);break;case"UnknownArgument":Tu(e,t);break;case"UnknownInputField":Cu(e,t);break;case"RequiredArgumentMissing":Au(e,t);break;case"InvalidArgumentType":Ru(e,t);break;case"InvalidArgumentValue":Su(e,t);break;case"ValueTooLarge":Iu(e,t);break;case"SomeFieldsMissing":Ou(e,t);break;case"TooManyFieldsGiven":ku(e,t);break;case"Union":bo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function hu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function yu(e,t){let[r,n]=Mt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Nt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function wu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Eu(e,t,i);return}if(n.hasField("select")){bu(e,t);return}}if(r?.[nt(e.outputType.name)]){xu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Eu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function bu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ao(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Nt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function xu(e,t){let r=new Dt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new le("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Mt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ct;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Pu(e,t){let r=Ro(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Ao(n,e.outputType);break;case"include":Du(n,e.outputType);break;case"omit":Mu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Nt(n)),i.join(" ")})}function vu(e,t){let r=Ro(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Tu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Nu(n,e.arguments)),t.addErrorMessage(i=>To(i,r,e.arguments.map(o=>o.name)))}function Cu(e,t){let[r,n]=Mt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&So(o,e.inputType)}t.addErrorMessage(o=>To(o,n,e.inputType.fields.map(s=>s.name)))}function To(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=_u(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Nt(e)),n.join(" ")}function Au(e,t){let r;t.addErrorMessage(l=>r?.value instanceof z&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Mt(e.argumentPath),s=new Dt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(Co).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}}function Co(e){return e.kind==="list"?`${Co(e.elementType)}[]`:e.name}function Ru(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Or("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Su(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Or("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Iu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof z&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Ou(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&So(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Or("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Nt(i)),o.join(" ")})}function ku(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Or("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ao(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function Du(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function Mu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function Nu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Ro(e,t){let[r,n]=Mt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function So(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Mt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Nt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Or(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Fu=3;function _u(e,t){let r=1/0,n;for(let i of t){let o=(0,vo.default)(e,i);o>Fu||o`}};function pt(e){return e instanceof Ft}f();c();p();d();m();var kr=Symbol(),Cn=new WeakMap,Ae=class{constructor(t){t===kr?Cn.set(this,`Prisma.${this._getName()}`):Cn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Cn.get(this)}},_t=class extends Ae{_getNamespace(){return"NullTypes"}},Lt=class extends _t{};An(Lt,"DbNull");var qt=class extends _t{};An(qt,"JsonNull");var Bt=class extends _t{};An(Bt,"AnyNull");var Dr={classes:{DbNull:Lt,JsonNull:qt,AnyNull:Bt},instances:{DbNull:new Lt(kr),JsonNull:new qt(kr),AnyNull:new Bt(kr)}};function An(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();d();m();var Oo=": ",Mr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Oo.length}write(t){let r=new ge(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Oo).write(this.value)}};var Rn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function dt(e){return new Rn(ko(e))}function ko(e){let t=new ct;for(let[r,n]of Object.entries(e)){let i=new Mr(r,Do(n));t.addField(i)}return t}function Do(e){if(typeof e=="string")return new z(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new z(String(e));if(typeof e=="bigint")return new z(`${e}n`);if(e===null)return new z("null");if(e===void 0)return new z("undefined");if(ot(e))return new z(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new z(`Buffer.alloc(${e.byteLength})`):new z(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Cr(e)?e.toISOString():"Invalid Date";return new z(`new Date("${t}")`)}return e instanceof Ae?new z(`Prisma.${e._getName()}`):pt(e)?new z(`prisma.${Io(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Lu(e):typeof e=="object"?ko(e):new z(Object.prototype.toString.call(e))}function Lu(e){let t=new ut;for(let r of e)t.addItem(Do(r));return t}function Nr(e,t){let r=t==="pretty"?Po:Ir,n=e.renderAllMessages(r),i=new at(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=dt(e);for(let h of t)Ar(h,a,s);let{message:l,args:u}=Nr(a,r),g=st({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new K(g,{clientVersion:o})}f();c();p();d();m();f();c();p();d();m();var he=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();c();p();d();m();function Ut(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();c();p();d();m();function ye(e){return e.replace(/^./,t=>t.toLowerCase())}f();c();p();d();m();function No(e,t,r){let n=ye(r);return!t.result||!(t.result.$allModels||t.result[n])?e:qu({...e,...Mo(t.name,e,t.result.$allModels),...Mo(t.name,e,t.result[n])})}function qu(e){let t=new he,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Xe(e,n=>({...n,needs:r(n.name,new Set)}))}function Mo(e,t,r){return r?Xe(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Bu(t,o,i)})):{}}function Bu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Fo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function _o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var _r=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new he;this.modelExtensionsCache=new he;this.queryCallbacksCache=new he;this.clientExtensions=Ut(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Ut(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>No(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ye(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},mt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new _r(t))}isEmpty(){return this.head===void 0}append(t){return new e(new _r(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();c();p();d();m();f();c();p();d();m();var Lo=Symbol(),$t=class{constructor(t){if(t!==Lo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Lr:t}},Lr=new $t(Lo);function we(e){return e instanceof $t}var Uu={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},qo="explicitly `undefined` values are not allowed";function qr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=mt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Sn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Uu[t],query:Vt(r,h)}}function Vt({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:Uo(r,n),selection:$u(e,t,i,n)}}function $u(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Gu(e,n)):Vu(n,t,r)}function Vu(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&ju(n,t,e),e.isPreviewFeatureOn("omitApi")&&Ju(n,r,e),n}function ju(e,t,r){for(let[n,i]of Object.entries(t)){if(we(i))continue;let o=r.nestSelection(n);if(In(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Vt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Vt(i,o)}}function Ju(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=_o(i,n);for(let[s,a]of Object.entries(o)){if(we(a))continue;In(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Gu(e,t){let r={},n=t.getComputedFields(),i=Fo(e,n);for(let[o,s]of Object.entries(i)){if(we(s))continue;let a=t.nestSelection(o);In(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||we(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Vt({},a):r[o]=!0;continue}r[o]=Vt(s,a)}}return r}function Bo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(it(e)){if(Cr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(pt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Qu(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:w.Buffer.from(e).toString("base64")};if(Hu(e))return e.values;if(ot(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ae){if(e!==Dr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Wu(e))return e.toJSON();if(typeof e=="object")return Uo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Uo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);we(i)||(i!==void 0?r[n]=Bo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:qo}))}return r}function Qu(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[nt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Pe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();c();p();d();m();var ft=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};f();c();p();d();m();function $o(e){return{models:On(e.models),enums:On(e.enums),types:On(e.types)}}function On(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function Vo(e,t){let r=Ut(()=>Ku(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Ku(e){return{datamodel:{models:kn(e.models),enums:kn(e.enums),types:kn(e.types)}}}function kn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();d();m();var Dn=new WeakMap,Br="$$PrismaTypedSql",Mn=class{constructor(t,r){Dn.set(this,{sql:t,values:r}),Object.defineProperty(this,Br,{value:Br})}get sql(){return Dn.get(this).sql}get values(){return Dn.get(this).values}};function jo(e){return(...t)=>new Mn(e,t)}function Jo(e){return e!=null&&e[Br]===Br}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();function jt(e){return{ok:!1,error:e,map(){return jt(e)},flatMap(){return jt(e)}}}var Nn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Fn=e=>{let t=new Nn,r=Ee(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ee(t,e.queryRaw.bind(e)),executeRaw:Ee(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>zu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Zu(t,e.getConnectionInfo.bind(e))),n},zu=(e,t)=>{let r=Ee(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ee(e,t.queryRaw.bind(t)),executeRaw:Ee(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>Yu(e,o))}},Yu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ee(e,t.queryRaw.bind(t)),executeRaw:Ee(e,t.executeRaw.bind(t)),commit:Ee(e,t.commit.bind(t)),rollback:Ee(e,t.rollback.bind(t))});function Ee(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return jt({kind:"GenericJs",id:i})}}}function Zu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return jt({kind:"GenericJs",id:i})}}}var ca=qe(Go());var iD=qe(Qo());Qi();Ii();Ji();f();c();p();d();m();var oe=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();c();p();d();m();f();c();p();d();m();var Ur={enumerable:!0,configurable:!0,writable:!0};function $r(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Ur,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ko=Symbol.for("nodejs.util.inspect.custom");function be(e,t){let r=ec(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=zo(Reflect.ownKeys(o),r),a=zo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Ur,...l?.getPropertyDescriptor(s)}:Ur:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Ko]=function(){let o={...this};return delete o[Ko],o},i}function ec(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function zo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();d();m();function gt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();d();m();function Vr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();d();m();function Yo(e){if(e===void 0)return"";let t=dt(e);return new at(0,{colors:Ir}).write(t).toString()}f();c();p();d();m();var tc="P2037";function Gt({error:e,user_facing_error:t},r,n){return t.error_code?new W(rc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ne(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function rc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===tc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var qn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new qn}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Zo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ht(e={}){let t=ic(e);return Object.entries(t).reduce((n,[i,o])=>(Zo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ic(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function jr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Xo(e,t){let r=jr(e);return t({action:"aggregate",unpacker:r,argsMapper:ht})(e)}f();c();p();d();m();function oc(e={}){let{select:t,...r}=e;return typeof t=="object"?ht({...r,_count:t}):ht({...r,_count:{_all:!0}})}function sc(e={}){return typeof e.select=="object"?t=>jr(e)(t)._count:t=>jr(e)(t)._count._all}function es(e,t){return t({action:"count",unpacker:sc(e),argsMapper:oc})(e)}f();c();p();d();m();function ac(e={}){let t=ht(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function lc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ts(e,t){return t({action:"groupBy",unpacker:lc(e),argsMapper:ac})(e)}function rs(e,t,r){if(t==="aggregate")return n=>Xo(n,r);if(t==="count")return n=>es(n,r);if(t==="groupBy")return n=>ts(n,r)}f();c();p();d();m();function ns(e,t){let r=t.fields.filter(i=>!i.relationName),n=hn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ft(e,o,s.type,s.isList,s.kind==="enum")},...$r(Object.keys(n))})}f();c();p();d();m();f();c();p();d();m();var is=e=>Array.isArray(e)?e:e.split("."),Bn=(e,t)=>is(t).reduce((r,n)=>r&&r[n],e),os=(e,t,r)=>is(t).reduceRight((n,i,o,s)=>Object.assign({},Bn(e,s.slice(0,o)),{[i]:n}),r);function uc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function cc(e,t,r){return t===void 0?e??{}:os(t,r,e||!0)}function Un(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Fe(e._errorFormat),g=uc(n,i),h=cc(l,o,g),v=r({dataPath:g,callsite:u})(h),S=pc(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let F=[a[R].type,r,R],q=[g,h];return Un(e,...F,...q)},...$r([...S,...Object.getOwnPropertyNames(v)])})}}function pc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}f();c();p();d();m();function ss(e,t,r,n){return e===Ue.ModelAction.findFirstOrThrow||e===Ue.ModelAction.findUniqueOrThrow?dc(t,r,n):n}function dc(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=st({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new K(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof W&&o.code==="P2025"?new ve(`No ${e} found`,t):o})}}var mc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],fc=["aggregate","count","groupBy"];function $n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[gc(e,t),yc(e,t),Jt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return be({},n)}function gc(e,t){let r=ye(t),n=Object.keys(Ue.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=ss(o,t,e._clientVersion,s);let a=l=>u=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let v={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...v,...l})})};return mc.includes(o)?Un(e,t,a):hc(i)?rs(e,i,a):a({})}}}function hc(e){return fc.includes(e)}function yc(e,t){return Ve(te("fields",()=>{let r=e._runtimeDataModel.models[t];return ns(t,r)}))}f();c();p();d();m();function as(e){return e.replace(/^./,t=>t.toUpperCase())}var Vn=Symbol();function Qt(e){let t=[wc(e),te(Vn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Jt(r)),be(e,t)}function wc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ye),n=[...new Set(t.concat(r))];return Ve({getKeys(){return n},getPropertyValue(i){let o=as(i);if(e._runtimeDataModel.models[o]!==void 0)return $n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return $n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ls(e){return e[Vn]?e[Vn]:e}function us(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Qt(t)}f();c();p();d();m();f();c();p();d();m();function cs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(gt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(gt(u))}Ec(e,l.needs)&&s.push(bc(l,be(e,s)))}return s.length>0||a.length>0?be(e,[...s,...a]):e}function Ec(e,t){return t.every(r=>gn(e,r))}function bc(e,t){return Ve(te(e.name,()=>e.compute(t)))}f();c();p();d();m();function Jr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Jr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function ds({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Jr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=ye(l);return cs({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();d();m();f();c();p();d();m();function ms(e){if(e instanceof oe)return xc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ms(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Es(o,l),a.args=s,gs(e,a,r,n+1)}})})}function hs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return gs(e,t,s)}function ys(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ws(r,n,0,e):e(r)}}function ws(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Es(i,l),ws(a,t,r+1,n)}})}var fs=e=>e;function Es(e=fs,t=fs){return r=>e(t(r))}f();c();p();d();m();var bs=ee("prisma:client"),xs={Vercel:"vercel","Netlify CI":"netlify"};function Ps({postinstall:e,ciName:t,clientVersion:r}){if(bs("checkPlatformCaching:postinstall",e),bs("checkPlatformCaching:ciName",t),e===!0&&t&&t in xs){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${xs[t]}-build`;throw console.error(n),new G(n,r)}}f();c();p();d();m();function vs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Pc="Cloudflare-Workers",vc="node";function Ts(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Pc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===vc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Tc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Gr(){let e=Ts();return{id:e,prettyName:Tc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();function yt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Gr().id==="workerd"?new G(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();d();m();f();c();p();d();m();var Qr=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends Qr{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();c();p();d();m();f();c();p();d();m();function L(e,t){return{...e,isRetryable:t}}var wt=class extends se{constructor(r){super("This request must be retried",L(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(wt,"ForcedRetryError");f();c();p();d();m();var je=class extends se{constructor(r,n){super(r,L(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(je,"InvalidDatasourceError");f();c();p();d();m();var Je=class extends se{constructor(r,n){super(r,L(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};N(Je,"NotImplementedYetError");f();c();p();d();m();f();c();p();d();m();var j=class extends se{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends j{constructor(r){super("Schema needs to be uploaded",L(r,!0));this.name="SchemaMissingError";this.code="P5005"}};N(Ge,"SchemaMissingError");f();c();p();d();m();f();c();p();d();m();var jn="This request could not be understood by the server",Wt=class extends j{constructor(r,n,i){super(n||jn,L(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(Wt,"BadRequestError");f();c();p();d();m();var Kt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",L(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};N(Kt,"HealthcheckTimeoutError");f();c();p();d();m();var zt=class extends j{constructor(r,n,i){super(n,L(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N(zt,"EngineStartupError");f();c();p();d();m();var Yt=class extends j{constructor(r){super("Engine version is not supported",L(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(Yt,"EngineVersionNotSupportedError");f();c();p();d();m();var Jn="Request timed out",Zt=class extends j{constructor(r,n=Jn){super(n,L(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(Zt,"GatewayTimeoutError");f();c();p();d();m();var Cc="Interactive transaction error",Xt=class extends j{constructor(r,n=Cc){super(n,L(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(Xt,"InteractiveTransactionError");f();c();p();d();m();var Ac="Request parameters are invalid",er=class extends j{constructor(r,n=Ac){super(n,L(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(er,"InvalidRequestError");f();c();p();d();m();var Gn="Requested resource does not exist",tr=class extends j{constructor(r,n=Gn){super(n,L(r,!1));this.name="NotFoundError";this.code="P5003"}};N(tr,"NotFoundError");f();c();p();d();m();var Qn="Unknown server error",Et=class extends j{constructor(r,n,i){super(n||Qn,L(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(Et,"ServerError");f();c();p();d();m();var Hn="Unauthorized, check your connection string",rr=class extends j{constructor(r,n=Hn){super(n,L(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(rr,"UnauthorizedError");f();c();p();d();m();var Wn="Usage exceeded, retry again later",nr=class extends j{constructor(r,n=Wn){super(n,L(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(nr,"UsageExceededError");async function Rc(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function ir(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Rc(e);if(n.type==="QueryEngineError")throw new W(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Et(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Yt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new zt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Kt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Xt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new er(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new rr(r,bt(Hn,n));if(e.status===404)return new tr(r,bt(Gn,n));if(e.status===429)throw new nr(r,bt(Wn,n));if(e.status===504)throw new Zt(r,bt(Jn,n));if(e.status>=500)throw new Et(r,bt(Qn,n));if(e.status>=400)throw new Wt(r,bt(jn,n))}function bt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();c();p();d();m();function Cs(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();c();p();d();m();var Re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function As(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,u,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,u=g&63,r+=Re[s]+Re[a]+Re[l]+Re[u];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Re[s]+Re[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Re[s]+Re[a]+Re[l]+"="),r}f();c();p();d();m();function Rs(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new G("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();c();p();d();m();function Sc(e){return e[0]*1e3+e[1]/1e6}function Ss(e){return new Date(Sc(e))}f();c();p();d();m();var Is={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();c();p();d();m();f();c();p();d();m();var or=class extends se{constructor(r,n){super(`Cannot fetch data from service: -${r}`,L(n,!0));this.name="RequestError";this.code="P5010"}};N(or,"RequestError");async function Qe(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Kn)(e,t)}catch(i){let o=i.message??"Unknown error";throw new or(o,{clientVersion:n})}}function Oc(e){return{...e.headers,"Content-Type":"application/json"}}function kc(e){return{method:e.method,headers:Oc(e)}}function Dc(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new zn(t.headers)}}async function Kn(e,t={}){let r=Mc("https"),n=kc(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{let l=r.request(e,n,u=>{let{statusCode:g,headers:{location:h}}=u;g>=301&&g<=399&&h&&(h.startsWith("http")===!1?s(Kn(`${o}${h}`,t)):s(Kn(h,t))),u.on("data",v=>i.push(v)),u.on("end",()=>s(Dc(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var Mc=typeof require<"u"?require:()=>{},zn=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){return this.headers.get(t)??null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var Nc=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Os=ee("prisma:client:dataproxyEngine");async function Fc(e,t){let r=Is["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&Nc.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,u]=s.split("."),g=_c(`<=${a}.${l}.${u}`),h=await Qe(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let v=await h.text();Os("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(A){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),A}return S.version}throw new Je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ks(e,t){let r=await Fc(e,t);return Os("version",r),r}function _c(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ds=3,Yn=ee("prisma:client:dataproxyEngine"),Zn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},sr=class{constructor(t){this.name="DataProxyEngine";Rs(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=As(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new Zn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ks(t,this.config),Yn("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let n=typeof r.attributes.query=="string"?r.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[i]=n.split("/* traceparent");n=i}this.logEmitter.emit("query",{query:n,timestamp:Ss(r.timestamp),duration:Number(r.attributes.duration_ms),params:r.attributes.params,target:r.attributes.target})}}}),t?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Qe(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Yn("schema response status",r.status);let n=await ir(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Vr(t,n),{batchResult:a,elapsed:l}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(u=>"errors"in u&&u.errors.length>0?Gt(u.errors[0],this.clientVersion,this.config.activeProvider):{data:u,elapsed:l})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Yn("graphql response status",a.status),await this.handleError(await ir(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?Gt(l.errors[0],this.config.clientVersion,this.config.activeProvider):new ne(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Qe(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await ir(l,this.clientVersion));let u=await l.json(),g=u.extensions;g&&this.propagateResponseExtensions(g);let h=u.id,v=u["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await ir(a,this.clientVersion));let u=(await a.json()).extensions;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=yt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new je(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new je(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new je(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new Je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(r>=Ds)throw i instanceof wt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ds} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Cs(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new wt({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ms({copyEngine:e=!0},t){let r;try{r=yt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&Ot("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Rt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s){let u;throw u=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new K(u.join(` -`),{clientVersion:t.clientVersion})}if(o)return new sr(t);throw new K("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}f();c();p();d();m();function Hr({generator:e}){return e?.previewFeatures??[]}f();c();p();d();m();var Ns=e=>({command:e});f();c();p();d();m();f();c();p();d();m();var Fs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();d();m();function xt(e){try{return _s(e,"fast")}catch{return _s(e,"slow")}}function _s(e,t){return JSON.stringify(e.map(r=>qs(r,t)))}function qs(e,t){return Array.isArray(e)?e.map(r=>qs(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:it(e)?{prisma__type:"date",prisma__value:e.toJSON()}:fe.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Lc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Bs(e):e}function Lc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Bs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ls);let t={};for(let r of Object.keys(e))t[r]=Ls(e[r]);return t}function Ls(e){return typeof e=="bigint"?e.toString():Bs(e)}f();c();p();d();m();var qc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Us=qc;var Bc=/^(\s*alter\s)/i,$s=ee("prisma:client");function Xn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Bc.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var ei=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Jo(r))n=r.sql,i={values:xt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:xt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:xt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:xt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Fs(r),i={values:xt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?$s(`prisma.${e}(${n}, ${i.values})`):$s(`prisma.${e}(${n})`),{query:n,parameters:i}},Vs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new oe(t,r)}},js={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();d();m();function ti(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Js(r(o)):Js(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Js(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();d();m();var Gs={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ri=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Gs}};function Qs(e){return e.includes("tracing")?new ri:Gs}f();c();p();d();m();function Hs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();d();m();function Ws(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();c();p();d();m();var Wr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};f();c();p();d();m();var Ys=qe(Xi());f();c();p();d();m();function Kr(e){return typeof e.batchRequestIdx=="number"}f();c();p();d();m();function Ks(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ni(e.query.arguments)),t.push(ni(e.query.selection)),t.join("")}function ni(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ni(n)})`:r}).join(" ")})`}f();c();p();d();m();var Uc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function ii(e){return Uc[e]}f();c();p();d();m();var zr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iHe("bigint",r));case"bytes-array":return t.map(r=>He("bytes",r));case"decimal-array":return t.map(r=>He("decimal",r));case"datetime-array":return t.map(r=>He("datetime",r));case"date-array":return t.map(r=>He("date",r));case"time-array":return t.map(r=>He("time",r));default:return t}}function zs(e){let t=[],r=$c(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>ii(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:jc(o),containsWrite:u,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Zs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ii(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Ks(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Vc(t),Jc(t,i)||t instanceof ve)throw t;if(t instanceof W&&Gc(t)){let u=Xs(t.meta);Fr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=st({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new W(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Te(l,this.client._clientVersion);if(t instanceof ne)throw new ne(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(l,this.client._clientVersion);if(t instanceof Te)throw new Te(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Ys.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Bn(o,s),l=i==="queryRaw"?zs(a):rt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function jc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Zs(e)};Pe(e,"Unknown transaction kind")}}function Zs(e){return{id:e.id,payload:e.payload}}function Jc(e,t){return Kr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Gc(e){return e.code==="P2009"||e.code==="P2012"}function Xs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Xs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();d();m();var ea="5.22.0";var ta=ea;f();c();p();d();m();var sa=qe(Tn());f();c();p();d();m();var B=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(B,"PrismaClientConstructorValidationError");var ra=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],na=["pretty","colorless","minimal"],ia=["info","query","warn","error"],Hc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Pt(r,t)||` Available datasources: ${t.join(", ")}`;throw new B(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new B(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new B('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Hr(t).includes("driverAdapters"))throw new B('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Rt()==="binary")throw new B('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!na.includes(e)){let t=Pt(e,na);throw new B(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ia.includes(r)){let n=Pt(r,ia);throw new B(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Pt(i,o);throw new B(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new B(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new B(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new B(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new B('"omit" option is expected to be an object.');if(e===null)throw new B('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Kc(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new B(zc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new B(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Pt(r,t);throw new B(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function aa(e,t){for(let[r,n]of Object.entries(e)){if(!ra.includes(r)){let i=Pt(r,ra);throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Hc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new B('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Pt(e,t){if(t.length===0||typeof e!="string")return"";let r=Wc(e,t);return r?` Did you mean "${r}"?`:""}function Wc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,sa.default)(e,i)}));r.sort((i,o)=>i.distancent(n)===t);if(r)return e[r]}function zc(e,t){let r=dt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Nr(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}f();c();p();d();m();function la(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Kr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var _e=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Yc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Zc=Symbol.for("prisma.client.transaction.id"),Xc={id:0,nextId(){return++this.id}};function pa(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Wr;this._createPrismaPromise=ti();this.$extends=us;e=n?.__internal?.configOverride?.(e)??e,Ps(e),n&&aa(n,e);let i=new yr().on("error",()=>{});this._extensions=mt.empty(),this._previewFeatures=Hr(e),this._clientVersion=e.clientVersion??ta,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Qs(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Fn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new G(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new G("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&ee.enable("prisma:client");let h=At.resolve(e.dirname,e.relativePath);Si.existsSync(h)||(h=e.dirname),_e("dirname",e.dirname),_e("relativePath",e.relativePath),_e("cwd",h);let v=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:At.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Ws(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:vs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:yt,getBatchRequestPayload:Vr,prismaGraphQLToJSError:Gt,PrismaClientUnknownRequestError:ne,PrismaClientInitializationError:G,PrismaClientKnownRequestError:W,debug:ee("prisma:client:accelerateEngine"),engineVersion:ca.version,clientVersion:e.clientVersion}},_e("clientVersion",e.clientVersion),this._engine=Ms(e,this._engineConfig),this._requestHandler=new Yr(this,i),l.log)for(let S of l.log){let A=typeof S=="string"?S:S.emit==="stdout"?S.level:null;A&&this.$on(A,R=>{It.log(`${It.tags[A]??""}`,R.message||R.query)})}this._metrics=new ft(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Vi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ua(n,i);return Xn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new K("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Xn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new K(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ns,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ua(n,i));throw new K("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new K("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Xc.nextId(),s=Hs(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return la(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Qt(be(ls(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>ti(n)),te(Zc,()=>n.id),gt(Us)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Yc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,M=>g(u,F=>(M?.end(),l(F))));let{runInTransaction:h,args:v,...S}=u,A={...n,...S};v&&(A.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete A.transaction;let R=await hs(this,A);return A.model?ds({result:R,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=u?u(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>qr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(_e("Prisma Client call:"),_e(`prisma.${i}(${Yo(n)})`),_e("Generated request:"),_e(JSON.stringify(R,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new K("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ua(e,t){return ep(e)?[new oe(e,t),Vs]:[e,js]}function ep(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();d();m();var tp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function da(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!tp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();d();m();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=edge.js.map diff --git a/keep-notes/prisma/client-generated/runtime/index-browser.d.ts b/keep-notes/prisma/client-generated/runtime/index-browser.d.ts deleted file mode 100644 index fefa233..0000000 --- a/keep-notes/prisma/client-generated/runtime/index-browser.d.ts +++ /dev/null @@ -1,365 +0,0 @@ -declare class AnyNull extends NullTypesEnumValue { -} - -declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -declare class DbNull extends NullTypesEnumValue { -} - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -declare type Exact = (A extends unknown ? (W extends A ? { - [K in keyof A]: Exact; -} : W) : never) | (A extends Narrowable ? A : never); - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: Runtime; - prettyName: string; - isEdge: boolean; -}; - -declare class JsonNull extends NullTypesEnumValue { -} - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -declare type Narrowable = string | number | bigint | boolean | []; - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * Base class for unique values of object-valued enums. - */ -declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; - -declare namespace Public { - export { - validator - } -} -export { Public } - -declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -export { } diff --git a/keep-notes/prisma/client-generated/runtime/index-browser.js b/keep-notes/prisma/client-generated/runtime/index-browser.js deleted file mode 100644 index 8f0457d..0000000 --- a/keep-notes/prisma/client-generated/runtime/index-browser.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict";var de=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Je=Object.prototype.hasOwnProperty;var Me=(e,n)=>{for(var i in n)de(e,i,{get:n[i],enumerable:!0})},Xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ge(n))!Je.call(e,r)&&r!==i&&de(e,r,{get:()=>n[r],enumerable:!(t=We(n,r))||t.enumerable});return e};var Ke=e=>Xe(de({},"__esModule",{value:!0}),e);var Xn={};Me(Xn,{Decimal:()=>je,Public:()=>he,getRuntime:()=>be,makeStrictEnum:()=>Pe,objectEnumValues:()=>Oe});module.exports=Ke(Xn);var he={};Me(he,{validator:()=>Ce});function Ce(...e){return n=>n}var ne=Symbol(),pe=new WeakMap,ge=class{constructor(n){n===ne?pe.set(this,"Prisma.".concat(this._getName())):pe.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return pe.get(this)}},G=class extends ge{_getNamespace(){return"NullTypes"}},J=class extends G{};me(J,"DbNull");var X=class extends G{};me(X,"JsonNull");var K=class extends G{};me(K,"AnyNull");var Oe={classes:{DbNull:J,JsonNull:X,AnyNull:K},instances:{DbNull:new J(ne),JsonNull:new X(ne),AnyNull:new K(ne)}};function me(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var xe=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Pe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!xe.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var Qe="Cloudflare-Workers",Ye="node";function Re(){var e,n,i;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Qe?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((i=(n=globalThis.process)==null?void 0:n.release)==null?void 0:i.name)===Ye?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var ze={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function be(){let e=Re();return{id:e,prettyName:ze[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var H=9e15,$=1e9,we="0123456789abcdef",te="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",re="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ne={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-H,maxE:H,crypto:!1},Te,Z,w=!0,oe="[DecimalError] ",V=oe+"Invalid argument: ",Le=oe+"Precision limit exceeded",De=oe+"crypto unavailable",Fe="[object Decimal]",b=Math.floor,C=Math.pow,ye=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,en=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nn=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,tn=9007199254740991,rn=te.length-1,ve=re.length-1,h={toStringTag:Fe};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error(V+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,l=s.s,f=e.s;if(!o||!u)return!l||!f?NaN:l!==f?l:o===u?0:!o^l<0?1:-1;if(!o[0]||!u[0])return o[0]?l:u[0]?-f:0;if(l!==f)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^l<0?1:-1;return t===r?0:t>r^l<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=sn(t,$e(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,l,f,c=this,a=c.constructor;if(!c.isFinite()||c.isZero())return new a(c);for(w=!1,s=c.s*C(c.s*c,1/3),!s||Math.abs(s)==1/0?(i=O(c.d),e=c.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=C(i,1/3),e=b((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=c.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,l=u.times(u).times(u),f=l.plus(c),t=S(f.plus(c).times(u),f.plus(l),o+2,1),O(u.d).slice(0,o)===(i=O(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(c))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(c));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-b(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return S(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(S(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/fe(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=j(o,1,s.times(n),new o(1),!0);for(var l,f=e,c=new o(8);f--;)l=s.times(s),s=u.minus(l.times(c.minus(l.times(c))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=j(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/fe(5,e)),r=j(s,2,r,r,!0);for(var o,u=new s(5),l=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(l.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,S(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e,n=this,i=n.constructor,t=n.abs().cmp(1),r=i.precision,s=i.rounding;return t!==-1?t===0?n.isNeg()?L(i,r,s):new i(0):new i(NaN):n.isZero()?L(i,r+4,s).times(.5):(i.precision=r+6,i.rounding=1,n=n.asin(),e=L(i,r+4,s).times(.5),i.precision=r,i.rounding=s,e.minus(n))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=S(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=L(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&a+4<=ve)return o=L(c,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new c(NaN);if(a+4<=ve)return o=L(c,a+4,d).times(.5),o.s=f.s,o}for(c.precision=u=a+10,c.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,l=f.times(f),o=new c(f),r=f;e!==-1;)if(r=r.times(l),s=o.minus(r.div(t+=2)),r=r.times(l),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding,g=5;if(e==null)e=new c(10),n=!0;else{if(e=new c(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new c(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),x(l.d,r=a,d))do if(u+=10,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),!s){+O(l.d).slice(r+1,r+15)+1==1e14&&(l=p(l,a+1,0));break}while(x(l.d,r+=10,d));return w=!0,p(l,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,l=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(l===3?-0:0);return w?p(e,u,l):e}if(i=b(e.e/m),c=b(g.e/m),f=f.slice(),s=c-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=c,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=c.length,o-r<0&&(r=o,i=c,c=f,f=i),n=0;r;)n=(f[--r]=f[r]+c[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ue(f,t),w?p(e,u,l):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(V+e);return i.d?(n=Ze(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=un(t,$e(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,l=o.e,f=o.s,c=o.constructor;if(f!==1||!u||!u[0])return new c(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=O(u),(n.length+l)%2==0&&(n+="0"),f=Math.sqrt(n),l=b((l+1)/2)-(l<0||l%2),f==1/0?n="5e"+l:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),t=new c(n)):t=new c(f.toString()),i=(l=c.precision)+3;;)if(s=t,t=s.plus(S(o,s,i+2,1)).times(.5),O(s.d).slice(0,i)===(n=O(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,l+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,l+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,l,c.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=S(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,l,f,c=this,a=c.constructor,d=c.d,g=(e=new a(e)).d;if(e.s*=c.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=b(c.e/m)+b(e.e/m),l=d.length,f=g.length,l=0;){for(n=0,r=l+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ue(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return ke(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(_(e,0,$),n===void 0?n=t.rounding:_(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,!0):(_(e,0,$),n===void 0?n=r.rounding:_(n,0,8),t=p(new r(t),e+1,n),i=F(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=F(r):(_(e,0,$),n===void 0?n=s.rounding:_(n,0,8),t=p(new s(r),e+r.e+1,n),i=F(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=l=new N(0),n=new N(t),s=n.e=Ze(v)-g.e-1,o=s%m,n.d[0]=C(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error(V+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(O(v)),c=N.precision,N.precision=s=v.length*m*2;a=S(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=l.plus(a.times(r)),l=r,r=n,n=u.minus(a.times(r)),u=r;return r=S(e.minus(i),t,0,1,1),l=l.plus(r.times(f)),i=i.plus(r.times(t)),l.s=f.s=g.s,d=S(f,t,s,1).minus(g).abs().cmp(S(l,i,s,1).minus(g).abs())<1?[f,t]:[l,i],N.precision=c,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return ke(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:_(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=S(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return ke(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,l=u.constructor,f=+(e=new l(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new l(C(+u,f));if(u=new l(u),u.eq(1))return u;if(t=l.precision,s=l.rounding,e.eq(1))return p(u,t,s);if(n=b(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=tn)return r=Ue(l,u,i,t),e.s<0?new l(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nl.maxE+1||n0?o/0:0):(w=!1,l.rounding=u.s=1,i=Math.min(12,(n+"").length),r=Ee(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),x(r.d,t,s)&&(n=t+10,r=p(Ee(e.times(B(u,n+i)),n),n+5,1),+O(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,l.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(_(e,1,$),n===void 0?n=r.rounding:_(n,0,8),t=p(new r(t),e,n),i=F(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(_(e,1,$),n===void 0?n=t.rounding:_(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function O(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error(V+e)}function x(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=C(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==C(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==C(10,n-3)-1,o}function ie(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function sn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/fe(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=j(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var S=function(){function e(t,r,s){var o,u=0,l=t.length;for(t=t.slice();l--;)o=t[l]*r+u,t[l]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,l;if(s!=o)l=s>o?1:-1;else for(u=l=0;ur[u]?1:-1;break}return l}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,l){var f,c,a,d,g,v,N,A,M,q,E,P,Y,I,le,z,W,ce,T,y,ee=t.constructor,ae=t.s==r.s?1:-1,R=t.d,k=r.d;if(!R||!R[0]||!k||!k[0])return new ee(!t.s||!r.s||(R?k&&R[0]==k[0]:!k)?NaN:R&&R[0]==0||!k?ae*0:ae/0);for(l?(g=1,c=t.e-r.e):(l=D,g=m,c=b(t.e/g)-b(r.e/g)),T=k.length,W=R.length,M=new ee(ae),q=M.d=[],a=0;k[a]==(R[a]||0);a++);if(k[a]>(R[a]||0)&&c--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)q.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,k=k[0],I++;(a1&&(k=e(k,d,l),R=e(R,d,l),T=k.length,W=R.length),z=T,E=R.slice(0,T),P=E.length;P=l/2&&++ce;do d=0,f=n(k,E,T,P),f<0?(Y=E[0],T!=P&&(Y=Y*l+(E[1]||0)),d=Y/ce|0,d>1?(d>=l&&(d=l-1),N=e(k,d,l),A=N.length,P=E.length,f=n(N,E,A,P),f==1&&(d--,i(N,T=10;d/=10)a++;M.e=a+c*g-1,p(M,u?s+M.e+1:s,o,v)}return M}}();function p(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,c=a[d=0],l=c/C(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);c=l=0,r=1,s%=m,o=s-m+1}else break e;else{for(c=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,l=o<0?0:c/C(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?c:c%C(10,r-o-1)),f=i<4?(l||t)&&(i==0||i==(e.s<0?3:2)):l>5||l==5&&(i==4||t||i==6&&(s>0?o>0?c/C(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=C(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=C(10,m-s),a[d]=o>0?(c/C(10,r-o)%C(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ue(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function se(e,n,i){if(n>rn)throw w=!0,i&&(e.precision=i),Error(Le);return p(new e(te),n,1,!0)}function L(e,n,i){if(n>ve)throw Error(Le);return p(new e(re),n,i,!0)}function Ze(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function Ue(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),_e(s.d,o)&&(r=!0)),i=b(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),_e(n.d,o)}return w=!0,s}function Ae(e){return e.d[e.d.length-1]&1}function Be(e,n,i){for(var t,r=new e(n[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(w=!1,l=v):l=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(C(2,a))/Math.LN10*2+5|0,l+=t,i=s=o=new d(1),d.precision=l;;){if(s=p(s.times(e),l,1),i=i.times(++c),u=o.plus(S(s,i,l,1)),O(u.d).slice(0,l)===O(o.d).slice(0,l)){for(r=a;r--;)o=p(o.times(o),l,1);if(n==null)if(f<3&&x(o.d,l-t,g,f))d.precision=l+=10,i=s=u=new d(1),c=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,l,f,c,a,d,g=1,v=10,N=e,A=N.d,M=N.constructor,q=M.rounding,E=M.precision;if(N.s<0||!A||!A[0]||!N.e&&A[0]==1&&A.length==1)return new M(A&&!A[0]?-1/0:N.s!=1?NaN:A?0:N);if(n==null?(w=!1,c=E):c=n,M.precision=c+=v,i=O(A),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=O(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new M("0."+i),s++):N=new M(t+"."+i.slice(1))}else return f=se(M,c+2,E).times(s+""),N=B(new M(t+"."+i.slice(1)),c-v).plus(f),M.precision=E,n==null?p(N,E,q,w=!0):N;for(a=N,l=o=N=S(N.minus(1),N.plus(1),c,1),d=p(N.times(N),c,1),r=3;;){if(o=p(o.times(d),c,1),f=l.plus(S(o,new M(r),c,1)),O(f.d).slice(0,c)===O(l.d).slice(0,c))if(l=l.times(2),s!==0&&(l=l.plus(se(M,c+2,E).times(s+""))),l=S(l,new M(g),c,1),n==null)if(x(l.d,c-v,q,u))M.precision=c+=v,f=o=N=S(a.minus(1),a.plus(1),c,1),d=p(N.times(N),c,1),r=u=1;else return p(l,M.precision=E,q,w=!0);else return M.precision=E,l;l=f,r+=2}}function Ve(e){return String(e.s*e.s/0)}function Se(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Ie.test(n))return Se(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(en.test(n))i=16,n=n.toLowerCase();else if(ye.test(n))i=2;else if(nn.test(n))i=8;else throw Error(V+n);for(s=n.search(/p/i),s>0?(l=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=Ue(t,new t(i),s,s*2)),f=ie(n,i,D),c=f.length-1,s=c;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ue(f,c),e.d=f,w=!1,o&&(e=S(e,r,u*4)),l&&(e=e.times(Math.abs(l)<54?C(2,l):Q.pow(2,l))),w=!0,e)}function un(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:j(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/fe(5,i)),n=j(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function j(e,n,i,t,r){var s,o,u,l,f=1,c=e.precision,a=Math.ceil(c/m);for(w=!1,l=i.times(i),u=new e(t);;){if(o=S(u.times(l),new e(n++*n++),c,1),u=r?t.plus(o):t.minus(o),t=S(o.times(l),new e(n++*n++),c,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function fe(e,n){for(var i=e;--n;)i*=e;return i}function $e(e,n){var i,t=n.s<0,r=L(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=Ae(i)?t?2:3:t?4:1,n;Z=Ae(i)?t?1:4:t?3:2}return n.minus(r).abs()}function ke(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor,v=i!==void 0;if(v?(_(i,1,$),t===void 0?t=g.rounding:_(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())c=Ve(e);else{for(c=F(e),o=c.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(c=c.replace(".",""),d=new g(1),d.e=c.length-o,d.d=ie(F(d),10,r),d.e=d.d.length),a=ie(c,10,r),s=l=a.length;a[--l]==0;)a.pop();if(!a[0])c=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=S(e,d,i,t,0,r),a=e.d,s=e.e,f=Te),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(l=a.length;!a[l-1];--l);for(o=0,c="";o1)if(n==16||n==8){for(o=n==16?4:3,--l;l%o;l++)c+="0";for(a=ie(c,r,n),l=a.length;!a[l-1];--l);for(o=1,c="1.";ol)for(s-=l;s--;)c+="0";else sn)return e.length=n,!0}function fn(e){return new this(e).abs()}function ln(e){return new this(e).acos()}function cn(e){return new this(e).acosh()}function an(e,n){return new this(e).plus(n)}function dn(e){return new this(e).asin()}function hn(e){return new this(e).asinh()}function pn(e){return new this(e).atan()}function gn(e){return new this(e).atanh()}function mn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=L(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?L(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=L(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(S(e,n,s,1)),n=L(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(S(e,n,s,1)),i}function wn(e){return new this(e).cbrt()}function Nn(e){return p(e=new this(e),e.e+1,2)}function vn(e,n,i){return new this(e).clamp(n,i)}function En(e){if(!e||typeof e!="object")throw Error(oe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,$,"rounding",0,8,"toExpNeg",-H,0,"toExpPos",0,H,"maxE",0,H,"minE",-H,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error(V+i+": "+t);if(i="crypto",r&&(this[i]=Ne[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(De);else this[i]=!1;else throw Error(V+i+": "+t);return this}function Sn(e){return new this(e).cos()}function kn(e){return new this(e).cosh()}function He(e){var n,i,t;function r(s){var o,u,l,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,qe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(De);else for(;s=10;r/=10)t++;t - * MIT Licence - *) -*/ -//# sourceMappingURL=index-browser.js.map diff --git a/keep-notes/prisma/client-generated/runtime/library.d.ts b/keep-notes/prisma/client-generated/runtime/library.d.ts deleted file mode 100644 index d92cd02..0000000 --- a/keep-notes/prisma/client-generated/runtime/library.d.ts +++ /dev/null @@ -1,3403 +0,0 @@ -/** - * @param this - */ -declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; - -declare type AccelerateEngineConfig = { - inlineSchema: EngineConfig['inlineSchema']; - inlineSchemaHash: EngineConfig['inlineSchemaHash']; - env: EngineConfig['env']; - generator?: { - previewFeatures: string[]; - }; - inlineDatasources: EngineConfig['inlineDatasources']; - overrideDatasources: EngineConfig['overrideDatasources']; - clientVersion: EngineConfig['clientVersion']; - engineVersion: EngineConfig['engineVersion']; - logEmitter: EngineConfig['logEmitter']; - logQueries?: EngineConfig['logQueries']; - logLevel?: EngineConfig['logLevel']; - tracingHelper: EngineConfig['tracingHelper']; - accelerateUtils?: EngineConfig['accelerateUtils']; -}; - -export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; - -declare type ActiveConnectorType = Exclude; - -export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; - -export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { - [P in K]: { - $allModels: infer AllModels; - }; -} ? { - [P in K]: Record; -} : {}; - -declare class AnyNull extends NullTypesEnumValue { -} - -export declare type ApplyOmit = Compute<{ - [K in keyof T as OmitValue extends true ? never : K]: T[K]; -}>; - -export declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} ? T[symbol]['types']['operations'][F]['args'] : any; - -export declare type Args_3 = Args; - -/** - * Original `quaint::ValueType` enum tag from Prisma's `quaint`. - * Query arguments marked with this type are sanitized before being sent to the database. - * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined. - */ -declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time'; - -/** - * Attributes is a map from string to attribute values. - * - * Note: only the own enumerable keys are counted as valid attribute keys. - */ -declare interface Attributes { - [attributeKey: string]: AttributeValue | undefined; -} - -/** - * Attribute values may be any non-nullish primitive value except an object. - * - * null or undefined attribute values are invalid and will result in undefined behavior. - */ -declare type AttributeValue = string | number | boolean | Array | Array | Array; - -export declare type BaseDMMF = { - readonly datamodel: Omit; -}; - -declare type BatchArgs = { - queries: BatchQuery[]; - transaction?: { - isolationLevel?: IsolationLevel; - }; -}; - -declare type BatchInternalParams = { - requests: RequestParams[]; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type BatchQuery = { - model: string | undefined; - operation: string; - args: JsArgs | RawQueryArgs; -}; - -declare type BatchQueryEngineResult = QueryEngineResult | Error; - -declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; - -declare type BatchQueryOptionsCbArgs = { - args: BatchArgs; - query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; - __internalParams: BatchInternalParams; -}; - -declare type BatchTransactionOptions = { - isolationLevel?: Transaction_2.IsolationLevel; -}; - -declare interface BinaryTargetsEnvValue { - fromEnvVar: string | null; - value: string; - native?: boolean; -} - -export declare type Call = (F & { - params: P; -})['returns']; - -declare interface CallSite { - getLocation(): LocationInFile | null; -} - -export declare type Cast = A extends W ? A : W; - -declare type Client = ReturnType extends new () => infer T ? T : never; - -export declare type ClientArg = { - [MethodName in string]: unknown; -}; - -export declare type ClientArgs = { - client: ClientArg; -}; - -export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; - -export declare type ClientOptionDef = undefined | { - [K in string]: any; -}; - -export declare type ClientOtherOps = { - $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $queryRawTyped(query: TypedSql): PrismaPromise; - $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $runCommandRaw(command: InputJsonObject): PrismaPromise; -}; - -declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; - -declare const ColumnTypeEnum: { - readonly Int32: 0; - readonly Int64: 1; - readonly Float: 2; - readonly Double: 3; - readonly Numeric: 4; - readonly Boolean: 5; - readonly Character: 6; - readonly Text: 7; - readonly Date: 8; - readonly Time: 9; - readonly DateTime: 10; - readonly Json: 11; - readonly Enum: 12; - readonly Bytes: 13; - readonly Set: 14; - readonly Uuid: 15; - readonly Int32Array: 64; - readonly Int64Array: 65; - readonly FloatArray: 66; - readonly DoubleArray: 67; - readonly NumericArray: 68; - readonly BooleanArray: 69; - readonly CharacterArray: 70; - readonly TextArray: 71; - readonly DateArray: 72; - readonly TimeArray: 73; - readonly DateTimeArray: 74; - readonly JsonArray: 75; - readonly EnumArray: 76; - readonly BytesArray: 77; - readonly UuidArray: 78; - readonly UnknownNumber: 128; -}; - -export declare type Compute = T extends Function ? T : { - [K in keyof T]: T[K]; -} & unknown; - -export declare type ComputeDeep = T extends Function ? T : { - [K in keyof T]: ComputeDeep; -} & unknown; - -declare type ComputedField = { - name: string; - needs: string[]; - compute: ResultArgsFieldCompute; -}; - -declare type ComputedFieldsMap = { - [fieldName: string]: ComputedField; -}; - -declare type ConnectionInfo = { - schemaName?: string; - maxBindValues?: number; -}; - -declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'sqlserver' | 'cockroachdb'; - -declare interface Context { - /** - * Get a value from the context. - * - * @param key key which identifies a context value - */ - getValue(key: symbol): unknown; - /** - * Create a new context which inherits from this context and has - * the given key set to the given value. - * - * @param key context key for which to set the value - * @param value value to set for the given key - */ - setValue(key: symbol, value: unknown): Context; - /** - * Return a new context which inherits from this context but does - * not contain a value for the given key. - * - * @param key context key for which to clear a value - */ - deleteValue(key: symbol): Context; -} - -declare type Context_2 = T extends { - [K: symbol]: { - ctx: infer C; - }; -} ? C & T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -} : T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; -}; - -export declare type Count = { - [K in keyof O]: Count; -} & {}; - -declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch; - -declare class DataLoader { - private options; - batches: { - [key: string]: Job[]; - }; - private tickActive; - constructor(options: DataLoaderOptions); - request(request: T): Promise; - private dispatchBatches; - get [Symbol.toStringTag](): string; -} - -declare type DataLoaderOptions = { - singleLoader: (request: T) => Promise; - batchLoader: (request: T[]) => Promise; - batchBy: (request: T) => string | undefined; - batchOrder: (requestA: T, requestB: T) => number; -}; - -declare type Datasource = { - url?: string; -}; - -declare type Datasources = { - [name in string]: Datasource; -}; - -declare class DbNull extends NullTypesEnumValue { -} - -export declare const Debug: typeof debugCreate & { - enable(namespace: any): void; - disable(): any; - enabled(namespace: string): boolean; - log: (...args: string[]) => void; - formatters: {}; -}; - -/** - * Create a new debug instance with the given namespace. - * - * @example - * ```ts - * import Debug from '@prisma/debug' - * const debug = Debug('prisma:client') - * debug('Hello World') - * ``` - */ -declare function debugCreate(namespace: string): ((...args: any[]) => void) & { - color: string; - enabled: boolean; - namespace: string; - log: (...args: string[]) => void; - extend: () => void; -}; - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine() : Decimal; - sin() : Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent() : Decimal; - tan() : Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value) : Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -/** - * Interface for any Decimal.js-like library - * Allows us to accept Decimal.js from different - * versions and some compatible alternatives - */ -export declare interface DecimalJsLike { - d: number[]; - e: number; - s: number; - toFixed(): string; -} - -export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; - -export declare type DefaultSelection = Args extends { - omit: infer LocalOmit; -} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; - -export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; - -declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; - -declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; - -export declare function deserializeJsonResponse(result: unknown): unknown; - -export declare type DevTypeMapDef = { - meta: { - modelProps: string; - }; - model: { - [Model in PropertyKey]: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; - }; - other: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; -}; - -export declare type DevTypeMapFnDef = { - args: any; - result: any; - payload: OperationPayload; -}; - -export declare namespace DMMF { - export type Document = ReadonlyDeep_2<{ - datamodel: Datamodel; - schema: Schema; - mappings: Mappings; - }>; - export type Mappings = ReadonlyDeep_2<{ - modelOperations: ModelMapping[]; - otherOperations: { - read: string[]; - write: string[]; - }; - }>; - export type OtherOperationMappings = ReadonlyDeep_2<{ - read: string[]; - write: string[]; - }>; - export type DatamodelEnum = ReadonlyDeep_2<{ - name: string; - values: EnumValue[]; - dbName?: string | null; - documentation?: string; - }>; - export type SchemaEnum = ReadonlyDeep_2<{ - name: string; - values: string[]; - }>; - export type EnumValue = ReadonlyDeep_2<{ - name: string; - dbName: string | null; - }>; - export type Datamodel = ReadonlyDeep_2<{ - models: Model[]; - enums: DatamodelEnum[]; - types: Model[]; - indexes: Index[]; - }>; - export type uniqueIndex = ReadonlyDeep_2<{ - name: string; - fields: string[]; - }>; - export type PrimaryKey = ReadonlyDeep_2<{ - name: string | null; - fields: string[]; - }>; - export type Model = ReadonlyDeep_2<{ - name: string; - dbName: string | null; - fields: Field[]; - uniqueFields: string[][]; - uniqueIndexes: uniqueIndex[]; - documentation?: string; - primaryKey: PrimaryKey | null; - isGenerated?: boolean; - }>; - export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; - export type FieldNamespace = 'model' | 'prisma'; - export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; - export type Field = ReadonlyDeep_2<{ - kind: FieldKind; - name: string; - isRequired: boolean; - isList: boolean; - isUnique: boolean; - isId: boolean; - isReadOnly: boolean; - isGenerated?: boolean; - isUpdatedAt?: boolean; - /** - * Describes the data type in the same the way it is defined in the Prisma schema: - * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName - */ - type: string; - dbName?: string | null; - hasDefaultValue: boolean; - default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; - relationFromFields?: string[]; - relationToFields?: string[]; - relationOnDelete?: string; - relationName?: string; - documentation?: string; - }>; - export type FieldDefault = ReadonlyDeep_2<{ - name: string; - args: any[]; - }>; - export type FieldDefaultScalar = string | boolean | number; - export type Index = ReadonlyDeep_2<{ - model: string; - type: IndexType; - isDefinedOnField: boolean; - name?: string; - dbName?: string; - algorithm?: string; - clustered?: boolean; - fields: IndexField[]; - }>; - export type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; - export type IndexField = ReadonlyDeep_2<{ - name: string; - sortOrder?: SortOrder; - length?: number; - operatorClass?: string; - }>; - export type SortOrder = 'asc' | 'desc'; - export type Schema = ReadonlyDeep_2<{ - rootQueryType?: string; - rootMutationType?: string; - inputObjectTypes: { - model?: InputType[]; - prisma: InputType[]; - }; - outputObjectTypes: { - model: OutputType[]; - prisma: OutputType[]; - }; - enumTypes: { - model?: SchemaEnum[]; - prisma: SchemaEnum[]; - }; - fieldRefTypes: { - prisma?: FieldRefType[]; - }; - }>; - export type Query = ReadonlyDeep_2<{ - name: string; - args: SchemaArg[]; - output: QueryOutput; - }>; - export type QueryOutput = ReadonlyDeep_2<{ - name: string; - isRequired: boolean; - isList: boolean; - }>; - export type TypeRef = { - isList: boolean; - type: string; - location: AllowedLocations; - namespace?: FieldNamespace; - }; - export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; - export type SchemaArg = ReadonlyDeep_2<{ - name: string; - comment?: string; - isNullable: boolean; - isRequired: boolean; - inputTypes: InputTypeRef[]; - deprecation?: Deprecation; - }>; - export type OutputType = ReadonlyDeep_2<{ - name: string; - fields: SchemaField[]; - }>; - export type SchemaField = ReadonlyDeep_2<{ - name: string; - isNullable?: boolean; - outputType: OutputTypeRef; - args: SchemaArg[]; - deprecation?: Deprecation; - documentation?: string; - }>; - export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; - export type Deprecation = ReadonlyDeep_2<{ - sinceVersion: string; - reason: string; - plannedRemovalVersion?: string; - }>; - export type InputType = ReadonlyDeep_2<{ - name: string; - constraints: { - maxNumFields: number | null; - minNumFields: number | null; - fields?: string[]; - }; - meta?: { - source?: string; - }; - fields: SchemaArg[]; - }>; - export type FieldRefType = ReadonlyDeep_2<{ - name: string; - allowTypes: FieldRefAllowType[]; - fields: SchemaArg[]; - }>; - export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; - export type ModelMapping = ReadonlyDeep_2<{ - model: string; - plural: string; - findUnique?: string | null; - findUniqueOrThrow?: string | null; - findFirst?: string | null; - findFirstOrThrow?: string | null; - findMany?: string | null; - create?: string | null; - createMany?: string | null; - createManyAndReturn?: string | null; - update?: string | null; - updateMany?: string | null; - upsert?: string | null; - delete?: string | null; - deleteMany?: string | null; - aggregate?: string | null; - groupBy?: string | null; - count?: string | null; - findRaw?: string | null; - aggregateRaw?: string | null; - }>; - export enum ModelAction { - findUnique = "findUnique", - findUniqueOrThrow = "findUniqueOrThrow", - findFirst = "findFirst", - findFirstOrThrow = "findFirstOrThrow", - findMany = "findMany", - create = "create", - createMany = "createMany", - createManyAndReturn = "createManyAndReturn", - update = "update", - updateMany = "updateMany", - upsert = "upsert", - delete = "delete", - deleteMany = "deleteMany", - groupBy = "groupBy", - count = "count",// TODO: count does not actually exist, why? - aggregate = "aggregate", - findRaw = "findRaw", - aggregateRaw = "aggregateRaw" - } -} - -export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel; - -export declare interface DriverAdapter extends Queryable { - /** - * Starts new transaction. - */ - transactionContext(): Promise>; - /** - * Optional method that returns extra connection info - */ - getConnectionInfo?(): Result_4; -} - -/** Client */ -export declare type DynamicClientExtensionArgs, ClientOptions> = { - [P in keyof C_]: unknown; -} & { - [K: symbol]: { - ctx: Optional, ITXClientDenyList> & { - $parent: Optional, ITXClientDenyList>; - }; - }; -}; - -export declare type DynamicClientExtensionThis, ClientOptions> = { - [P in keyof ExtArgs['client']]: Return; -} & { - [P in Exclude]: DynamicModelExtensionThis, ExtArgs, ClientOptions>; -} & { - [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; -} & { - [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; -} & { - [K: symbol]: { - types: TypeMap['other']; - }; -}; - -export declare type DynamicClientExtensionThisBuiltin, ClientOptions> = { - $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call, ClientOptions>; - $transaction

[]>(arg: [...P], options?: { - isolationLevel?: TypeMap['meta']['txIsolationLevel']; - }): Promise>; - $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { - maxWait?: number; - timeout?: number; - isolationLevel?: TypeMap['meta']['txIsolationLevel']; - }): Promise; - $disconnect(): Promise; - $connect(): Promise; -}; - -/** Model */ -export declare type DynamicModelExtensionArgs, ClientOptions> = { - [K in keyof M_]: K extends '$allModels' ? { - [P in keyof M_[K]]?: unknown; - } & { - [K: symbol]: {}; - } : K extends TypeMap['meta']['modelProps'] ? { - [P in keyof M_[K]]?: unknown; - } & { - [K: symbol]: { - ctx: DynamicModelExtensionThis, ExtArgs, ClientOptions> & { - $parent: DynamicClientExtensionThis; - } & { - $name: ModelKey; - } & { - /** - * @deprecated Use `$name` instead. - */ - name: ModelKey; - }; - }; - } : never; -}; - -export declare type DynamicModelExtensionFluentApi = { - [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi, ClientOptions>; -}; - -export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; - -export declare type DynamicModelExtensionFnResultBase = GetResult; - -export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; - -export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult, ClientOptions> : (args: Exact) => DynamicModelExtensionFnResult, ClientOptions>; - -export declare type DynamicModelExtensionThis, ClientOptions> = { - [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; -} & { - [P in Exclude]>]: DynamicModelExtensionOperationFn; -} & { - [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; -} & { - [K: symbol]: { - types: TypeMap['model'][M]; - }; -}; - -/** Query */ -export declare type DynamicQueryExtensionArgs = { - [K in keyof Q_]: K extends '$allOperations' ? (args: { - model?: string; - operation: string; - args: any; - query: (args: any) => PrismaPromise; - }) => Promise : K extends '$allModels' ? { - [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; - } : K extends TypeMap['meta']['modelProps'] ? { - [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; - } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; -}; - -export declare type DynamicQueryExtensionCb = >(args: A) => Promise; - -export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { - args: DynamicQueryExtensionCbArgsArgs; - model: _0 extends 0 ? undefined : _1; - operation: _2; - query: >(args: A) => PrismaPromise; -} : never : never) & { - query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; -}; - -export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; - -/** Result */ -export declare type DynamicResultExtensionArgs = { - [K in keyof R_]: { - [P in keyof R_[K]]?: { - needs?: DynamicResultExtensionNeeds, R_[K][P]>; - compute(data: DynamicResultExtensionData, R_[K][P]>): any; - }; - }; -}; - -export declare type DynamicResultExtensionData = GetFindResult; - -export declare type DynamicResultExtensionNeeds = { - [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; -} & { - [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; -}; - -/** - * Placeholder value for "no text". - */ -export declare const empty: Sql; - -export declare type EmptyToUnknown = T; - -declare interface Engine { - /** The name of the engine. This is meant to be consumed externally */ - readonly name: string; - onBeforeExit(callback: () => Promise): void; - start(): Promise; - stop(): Promise; - version(forceRun?: boolean): Promise | string; - request(query: JsonQuery, options: RequestOptions_2): Promise>; - requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; - transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; - transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; - transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; - metrics(options: MetricsOptionsJson): Promise; - metrics(options: MetricsOptionsPrometheus): Promise; - applyPendingMigrations(): Promise; -} - -declare interface EngineConfig { - cwd: string; - dirname: string; - datamodelPath: string; - enableDebugLogs?: boolean; - allowTriggerPanic?: boolean; - prismaPath?: string; - generator?: GeneratorConfig; - overrideDatasources: Datasources; - showColors?: boolean; - logQueries?: boolean; - logLevel?: 'info' | 'warn'; - env: Record; - flags?: string[]; - clientVersion: string; - engineVersion: string; - previewFeatures?: string[]; - engineEndpoint?: string; - activeProvider?: string; - logEmitter: LogEmitter; - transactionOptions: Transaction_2.Options; - /** - * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. - * If set, this is only used in the library engine, and all queries would be performed through it, - * rather than Prisma's Rust drivers. - * @remarks only used by LibraryEngine.ts - */ - adapter?: ErrorCapturingDriverAdapter; - /** - * The contents of the schema encoded into a string - * @remarks only used by DataProxyEngine.ts - */ - inlineSchema: string; - /** - * The contents of the datasource url saved in a string - * @remarks only used by DataProxyEngine.ts - */ - inlineDatasources: GetPrismaClientConfig['inlineDatasources']; - /** - * The string hash that was produced for a given schema - * @remarks only used by DataProxyEngine.ts - */ - inlineSchemaHash: string; - /** - * The helper for interaction with OTEL tracing - * @remarks enabling is determined by the client and @prisma/instrumentation package - */ - tracingHelper: TracingHelper; - /** - * Information about whether we have not found a schema.prisma file in the - * default location, and that we fell back to finding the schema.prisma file - * in the current working directory. This usually means it has been bundled. - */ - isBundled?: boolean; - /** - * Web Assembly module loading configuration - */ - engineWasm?: WasmLoadingConfig; - /** - * Allows Accelerate to use runtime utilities from the client. These are - * necessary for the AccelerateEngine to function correctly. - */ - accelerateUtils?: { - resolveDatasourceUrl: typeof resolveDatasourceUrl; - getBatchRequestPayload: typeof getBatchRequestPayload; - prismaGraphQLToJSError: typeof prismaGraphQLToJSError; - PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; - PrismaClientInitializationError: typeof PrismaClientInitializationError; - PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; - debug: (...args: any[]) => void; - engineVersion: string; - clientVersion: string; - }; -} - -declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; - -declare type EngineEventType = QueryEventType | LogEventType; - -declare type EngineProtocol = 'graphql' | 'json'; - -declare type EngineSpan = { - span: boolean; - name: string; - trace_id: string; - span_id: string; - parent_span_id: string; - start_time: [number, number]; - end_time: [number, number]; - attributes?: Record; - links?: { - trace_id: string; - span_id: string; - }[]; - kind: EngineSpanKind; -}; - -declare type EngineSpanEvent = { - span: boolean; - spans: EngineSpan[]; -}; - -declare type EngineSpanKind = 'client' | 'internal'; - -declare type EnvPaths = { - rootEnvPath: string | null; - schemaEnvPath: string | undefined; -}; - -declare interface EnvValue { - fromEnvVar: null | string; - value: null | string; -} - -export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; - -declare type Error_2 = { - kind: 'GenericJs'; - id: number; -} | { - kind: 'UnsupportedNativeDataType'; - type: string; -} | { - kind: 'Postgres'; - code: string; - severity: string; - message: string; - detail: string | undefined; - column: string | undefined; - hint: string | undefined; -} | { - kind: 'Mysql'; - code: number; - message: string; - state: string; -} | { - kind: 'Sqlite'; - /** - * Sqlite extended error code: https://www.sqlite.org/rescode.html - */ - extendedCode: number; - message: string; -}; - -declare interface ErrorCapturingDriverAdapter extends DriverAdapter { - readonly errorRegistry: ErrorRegistry; -} - -declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; - -declare type ErrorRecord = { - error: unknown; -}; - -declare interface ErrorRegistry { - consumeError(id: number): ErrorRecord | undefined; -} - -declare interface ErrorWithBatchIndex { - batchRequestIdx?: number; -} - -declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; - -export declare type Exact = (A extends unknown ? (W extends A ? { - [K in keyof A]: Exact; -} : W) : never) | (A extends Narrowable ? A : never); - -/** - * Defines Exception. - * - * string or an object with one of (message or name or code) and optional stack - */ -declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; - -declare interface ExceptionWithCode { - code: string | number; - name?: string; - message?: string; - stack?: string; -} - -declare interface ExceptionWithMessage { - code?: string | number; - message: string; - name?: string; - stack?: string; -} - -declare interface ExceptionWithName { - code?: string | number; - message?: string; - name: string; - stack?: string; -} - -declare type ExtendedEventType = LogLevel | 'beforeExit'; - -declare type ExtendedSpanOptions = SpanOptions & { - /** The name of the span */ - name: string; - internal?: boolean; - middleware?: boolean; - /** Whether it propagates context (?=true) */ - active?: boolean; - /** The context to append the span to */ - context?: Context; -}; - -/** $extends, defineExtension */ -export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call, ClientOptions = {}> { - extArgs: ExtArgs; - , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { - $extends: { - extArgs: Args; - }; - }) | { - name?: string; - query?: DynamicQueryExtensionArgs; - result?: DynamicResultExtensionArgs & R; - model?: DynamicModelExtensionArgs & M; - client?: DynamicClientExtensionArgs & C; - }): { - extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs, ClientOptions>; - define: (client: any) => { - $extends: { - extArgs: Args; - }; - }; - }[Variant]; -} - -export declare type ExtensionArgs = Optional; - -declare namespace Extensions { - export { - defineExtension, - getExtensionContext - } -} -export { Extensions } - -declare namespace Extensions_2 { - export { - InternalArgs, - DefaultArgs, - GetPayloadResultExtensionKeys, - GetPayloadResultExtensionObject, - GetPayloadResult, - GetSelect, - GetOmit, - DynamicQueryExtensionArgs, - DynamicQueryExtensionCb, - DynamicQueryExtensionCbArgs, - DynamicQueryExtensionCbArgsArgs, - DynamicResultExtensionArgs, - DynamicResultExtensionNeeds, - DynamicResultExtensionData, - DynamicModelExtensionArgs, - DynamicModelExtensionThis, - DynamicModelExtensionOperationFn, - DynamicModelExtensionFnResult, - DynamicModelExtensionFnResultBase, - DynamicModelExtensionFluentApi, - DynamicModelExtensionFnResultNull, - DynamicClientExtensionArgs, - DynamicClientExtensionThis, - ClientBuiltInProp, - DynamicClientExtensionThisBuiltin, - ExtendsHook, - MergeExtArgs, - AllModelsToStringIndex, - TypeMapDef, - DevTypeMapDef, - DevTypeMapFnDef, - ClientOptionDef, - ClientOtherOps, - TypeMapCbDef, - ModelKey, - RequiredExtensionArgs as UserArgs - } -} - -export declare type ExtractGlobalOmit = Options extends { - omit: { - [K in ModelName]: infer GlobalOmit; - }; -} ? GlobalOmit : {}; - -declare type Fetch = typeof nodeFetch; - -/** - * A reference to a specific field of a specific model - */ -export declare interface FieldRef { - readonly modelName: Model; - readonly name: string; - readonly typeName: FieldType; - readonly isList: boolean; -} - -export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; - -export declare interface Fn { - params: Params; - returns: Returns; -} - -declare interface GeneratorConfig { - name: string; - output: EnvValue | null; - isCustomOutput?: boolean; - provider: EnvValue; - config: { - /** `output` is a reserved name and will only be available directly at `generator.output` */ - output?: never; - /** `provider` is a reserved name and will only be available directly at `generator.provider` */ - provider?: never; - /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ - binaryTargets?: never; - /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ - previewFeatures?: never; - } & { - [key: string]: string | string[] | undefined; - }; - binaryTargets: BinaryTargetsEnvValue[]; - previewFeatures: string[]; - envPaths?: EnvPaths; - sourceFilePath: string; -} - -export declare type GetAggregateResult

= { - [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { - [J in keyof A[K] & string]: P['scalars'][J] | null; - }; -}; - -declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; - -export declare type GetBatchResult = { - count: number; -}; - -export declare type GetCountResult = A extends { - select: infer S; -} ? (S extends true ? number : Count) : number; - -declare function getExtensionContext(that: T): Context_2; - -export declare type GetFindResult

= Equals extends 1 ? DefaultSelection : A extends { - select: infer S extends object; -} & Record | { - include: infer I extends object; -} & Record ? { - [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { - scalars: { - [k in K]: infer O; - }; - } ? O : K extends '_count' ? Count : never; -} & (A extends { - include: any; -} & Record ? DefaultSelection : unknown) : DefaultSelection; - -export declare type GetGroupByResult

= A extends { - by: string[]; -} ? Array & { - [K in A['by'][number]]: P['scalars'][K]; -}> : A extends { - by: string; -} ? Array & { - [K in A['by']]: P['scalars'][K]; -}> : {}[]; - -export declare type GetOmit = { - [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; -}; - -export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit> & GetPayloadResultExtensionObject; - -export declare type GetPayloadResultExtensionKeys = KR; - -export declare type GetPayloadResultExtensionObject = { - [K in GetPayloadResultExtensionKeys]: R[K] extends () => { - compute: (...args: any) => infer C; - } ? C : never; -}; - -export declare function getPrismaClient(config: GetPrismaClientConfig): { - new (optionsArg?: PrismaClientOptions): { - _originalClient: any; - _runtimeDataModel: RuntimeDataModel; - _requestHandler: RequestHandler; - _connectionPromise?: Promise | undefined; - _disconnectionPromise?: Promise | undefined; - _engineConfig: EngineConfig; - _accelerateEngineConfig: AccelerateEngineConfig; - _clientVersion: string; - _errorFormat: ErrorFormat; - _tracingHelper: TracingHelper; - _metrics: MetricsClient; - _middlewares: MiddlewareHandler; - _previewFeatures: string[]; - _activeProvider: string; - _globalOmit?: GlobalOmitOptions | undefined; - _extensions: MergedExtensionsList; - _engine: Engine; - /** - * A fully constructed/applied Client that references the parent - * PrismaClient. This is used for Client extensions only. - */ - _appliedParent: any; - _createPrismaPromise: PrismaPromiseFactory; - /** - * Hook a middleware into the client - * @param middleware to hook - */ - $use(middleware: QueryMiddleware): void; - $on(eventType: E, callback: EventCallback): void; - $connect(): Promise; - /** - * Disconnect from the database - */ - $disconnect(): Promise; - /** - * Executes a raw query and always returns a number - */ - $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; - /** - * Executes a raw query provided through a safe tag function - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; - /** - * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; - /** - * Executes a raw command only for MongoDB - * - * @param command - * @returns - */ - $runCommandRaw(command: Record): PrismaPromise_2; - /** - * Executes a raw query and returns selected data - */ - $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; - /** - * Executes a raw query provided through a safe tag function - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; - /** - * Counterpart to $queryRaw, that returns strongly typed results - * @param typedSql - */ - $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; - /** - * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; - /** - * Execute a batch of requests in a transaction - * @param requests - * @param options - */ - _transactionWithArray({ promises, options, }: { - promises: Array>; - options?: BatchTransactionOptions; - }): Promise; - /** - * Perform a long-running transaction - * @param callback - * @param options - * @returns - */ - _transactionWithCallback({ callback, options, }: { - callback: (client: Client) => Promise; - options?: Options; - }): Promise; - _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; - /** - * Execute queries within a transaction - * @param input a callback or a query list - * @param options to set timeouts (callback) - * @returns - */ - $transaction(input: any, options?: any): Promise; - /** - * Runs the middlewares over params before executing a request - * @param internalParams - * @returns - */ - _request(internalParams: InternalRequestParams): Promise; - _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; - readonly $metrics: MetricsClient; - /** - * Shortcut for checking a preview flag - * @param feature preview flag - * @returns - */ - _hasPreviewFlag(feature: string): boolean; - $applyPendingMigrations(): Promise; - $extends: typeof $extends; - readonly [Symbol.toStringTag]: string; - }; -}; - -/** - * Config that is stored into the generated client. When the generated client is - * loaded, this same config is passed to {@link getPrismaClient} which creates a - * closure with that config around a non-instantiated [[PrismaClient]]. - */ -declare type GetPrismaClientConfig = { - runtimeDataModel: RuntimeDataModel; - generator?: GeneratorConfig; - relativeEnvPaths: { - rootEnvPath?: string | null; - schemaEnvPath?: string | null; - }; - relativePath: string; - dirname: string; - filename?: string; - clientVersion: string; - engineVersion: string; - datasourceNames: string[]; - activeProvider: ActiveConnectorType; - /** - * The contents of the schema encoded into a string - * @remarks only used for the purpose of data proxy - */ - inlineSchema: string; - /** - * A special env object just for the data proxy edge runtime. - * Allows bundlers to inject their own env variables (Vercel). - * Allows platforms to declare global variables as env (Workers). - * @remarks only used for the purpose of data proxy - */ - injectableEdgeEnv?: () => LoadedEnv; - /** - * The contents of the datasource url saved in a string. - * This can either be an env var name or connection string. - * It is needed by the client to connect to the Data Proxy. - * @remarks only used for the purpose of data proxy - */ - inlineDatasources: { - [name in string]: { - url: EnvValue; - }; - }; - /** - * The string hash that was produced for a given schema - * @remarks only used for the purpose of data proxy - */ - inlineSchemaHash: string; - /** - * A marker to indicate that the client was not generated via `prisma - * generate` but was generated via `generate --postinstall` script instead. - * @remarks used to error for Vercel/Netlify for schema caching issues - */ - postinstall?: boolean; - /** - * Information about the CI where the Prisma Client has been generated. The - * name of the CI environment is stored at generation time because CI - * information is not always available at runtime. Moreover, the edge client - * has no notion of environment variables, so this works around that. - * @remarks used to error for Vercel/Netlify for schema caching issues - */ - ciName?: string; - /** - * Information about whether we have not found a schema.prisma file in the - * default location, and that we fell back to finding the schema.prisma file - * in the current working directory. This usually means it has been bundled. - */ - isBundled?: boolean; - /** - * A boolean that is `false` when the client was generated with --no-engine. At - * runtime, this means the client will be bound to be using the Data Proxy. - */ - copyEngine?: boolean; - /** - * Optional wasm loading configuration - */ - engineWasm?: WasmLoadingConfig; -}; - -export declare type GetResult = { - findUnique: GetFindResult | null; - findUniqueOrThrow: GetFindResult; - findFirst: GetFindResult | null; - findFirstOrThrow: GetFindResult; - findMany: GetFindResult[]; - create: GetFindResult; - createMany: GetBatchResult; - createManyAndReturn: GetFindResult[]; - update: GetFindResult; - updateMany: GetBatchResult; - upsert: GetFindResult; - delete: GetFindResult; - deleteMany: GetBatchResult; - aggregate: GetAggregateResult; - count: GetCountResult; - groupBy: GetGroupByResult; - $queryRaw: unknown; - $queryRawTyped: unknown; - $executeRaw: number; - $queryRawUnsafe: unknown; - $executeRawUnsafe: number; - $runCommandRaw: JsonObject; - findRaw: JsonObject; - aggregateRaw: JsonObject; -}[OperationName]; - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: Runtime; - prettyName: string; - isEdge: boolean; -}; - -export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { - [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; -}; - -declare type GlobalOmitOptions = { - [modelName: string]: { - [fieldName: string]: boolean; - }; -}; - -declare type HandleErrorParams = { - args: JsArgs; - error: any; - clientMethod: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - modelName?: string; - globalOmit?: GlobalOmitOptions; -}; - -/** - * Defines High-Resolution Time. - * - * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - */ -declare type HrTime = [number, number]; - -/** - * Matches a JSON array. - * Unlike \`JsonArray\`, readonly arrays are assignable to this type. - */ -export declare interface InputJsonArray extends ReadonlyArray { -} - -/** - * Matches a JSON object. - * Unlike \`JsonObject\`, this type allows undefined and read-only properties. - */ -export declare type InputJsonObject = { - readonly [Key in string]?: InputJsonValue | null; -}; - -/** - * Matches any valid value that can be used as an input for operations like - * create and update as the value of a JSON field. Unlike \`JsonValue\`, this - * type allows read-only arrays and read-only object properties and disallows - * \`null\` at the top level. - * - * \`null\` cannot be used as the value of a JSON field because its meaning - * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or - * \`Prisma.DbNull\` to clear the JSON value and set the field to the database - * NULL value instead. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values - */ -export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { - toJSON(): unknown; -}; - -declare type InteractiveTransactionInfo = { - /** - * Transaction ID returned by the query engine. - */ - id: string; - /** - * Arbitrary payload the meaning of which depends on the `Engine` implementation. - * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. - * In `LibraryEngine` and `BinaryEngine` it is currently not used. - */ - payload: Payload; -}; - -declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; - -export declare type InternalArgs = { - result: { - [K in keyof R]: { - [P in keyof R[K]]: () => R[K][P]; - }; - }; - model: { - [K in keyof M]: { - [P in keyof M[K]]: () => M[K][P]; - }; - }; - query: { - [K in keyof Q]: { - [P in keyof Q[K]]: () => Q[K][P]; - }; - }; - client: { - [K in keyof C]: () => C[K]; - }; -}; - -declare type InternalRequestParams = { - /** - * The original client method being called. - * Even though the rootField / operation can be changed, - * this method stays as it is, as it's what the user's - * code looks like - */ - clientMethod: string; - /** - * Name of js model that triggered the request. Might be used - * for warnings or error messages - */ - jsModelName?: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - unpacker?: Unpacker; - otelParentCtx?: Context; - /** Used to "desugar" a user input into an "expanded" one */ - argsMapper?: (args?: UserArgs_2) => UserArgs_2; - /** Used to convert args for middleware and back */ - middlewareArgsMapper?: MiddlewareArgsMapper; - /** Used for Accelerate client extension via Data Proxy */ - customDataProxyFetch?: (fetch: Fetch) => Fetch; -} & Omit; - -declare enum IsolationLevel { - ReadUncommitted = "ReadUncommitted", - ReadCommitted = "ReadCommitted", - RepeatableRead = "RepeatableRead", - Snapshot = "Snapshot", - Serializable = "Serializable" -} - -declare function isSkip(value: unknown): value is Skip; - -export declare function isTypedSql(value: unknown): value is UnknownTypedSql; - -export declare type ITXClientDenyList = (typeof denylist)[number]; - -export declare const itxClientDenyList: readonly (string | symbol)[]; - -declare interface Job { - resolve: (data: any) => void; - reject: (data: any) => void; - request: any; -} - -/** - * Create a SQL query for a list of values. - */ -export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; - -export declare type JsArgs = { - select?: Selection_2; - include?: Selection_2; - omit?: Omission; - [argName: string]: JsInputValue; -}; - -export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | Skip | { - [key: string]: JsInputValue; -}; - -declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { - [key: string]: JsonArgumentValue; -}; - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON array. - */ -export declare interface JsonArray extends Array { -} - -export declare type JsonBatchQuery = { - batch: JsonQuery[]; - transaction?: { - isolationLevel?: Transaction_2.IsolationLevel; - }; -}; - -export declare interface JsonConvertible { - toJSON(): unknown; -} - -declare type JsonFieldSelection = { - arguments?: Record | RawTaggedValue; - selection: JsonSelectionSet; -}; - -declare class JsonNull extends NullTypesEnumValue { -} - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON object. - * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. - */ -export declare type JsonObject = { - [Key in string]?: JsonValue; -}; - -export declare type JsonQuery = { - modelName?: string; - action: JsonQueryAction; - query: JsonFieldSelection; -}; - -declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; - -declare type JsonSelectionSet = { - $scalars?: boolean; - $composites?: boolean; -} & { - [fieldName: string]: boolean | JsonFieldSelection; -}; - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches any valid JSON value. - */ -export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; - -export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { - [key: string]: JsOutputValue; -}; - -export declare type JsPromise = Promise & {}; - -declare type KnownErrorParams = { - code: string; - clientVersion: string; - meta?: Record; - batchRequestIdx?: number; -}; - -/** - * A pointer from the current {@link Span} to another span in the same trace or - * in a different trace. - * Few examples of Link usage. - * 1. Batch Processing: A batch of elements may contain elements associated - * with one or more traces/spans. Since there can only be one parent - * SpanContext, Link is used to keep reference to SpanContext of all - * elements in the batch. - * 2. Public Endpoint: A SpanContext in incoming client request on a public - * endpoint is untrusted from service provider perspective. In such case it - * is advisable to start a new trace with appropriate sampling decision. - * However, it is desirable to associate incoming SpanContext to new trace - * initiated on service provider side so two traces (from Client and from - * Service Provider) can be correlated. - */ -declare interface Link { - /** The {@link SpanContext} of a linked span. */ - context: SpanContext; - /** A set of {@link SpanAttributes} on the link. */ - attributes?: SpanAttributes; - /** Count of attributes of the link that were dropped due to collection limits */ - droppedAttributesCount?: number; -} - -declare type LoadedEnv = { - message?: string; - parsed: { - [x: string]: string; - }; -} | undefined; - -declare type LocationInFile = { - fileName: string; - lineNumber: number | null; - columnNumber: number | null; -}; - -declare type LogDefinition = { - level: LogLevel; - emit: 'stdout' | 'event'; -}; - -/** - * Typings for the events we emit. - * - * @remarks - * If this is updated, our edge runtime shim needs to be updated as well. - */ -declare type LogEmitter = { - on(event: E, listener: (event: EngineEvent) => void): LogEmitter; - emit(event: QueryEventType, payload: QueryEvent): boolean; - emit(event: LogEventType, payload: LogEvent): boolean; -}; - -declare type LogEvent = { - timestamp: Date; - message: string; - target: string; -}; - -declare type LogEventType = 'info' | 'warn' | 'error'; - -declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; - -/** - * Class that holds the list of all extensions, applied to particular instance, - * as well as resolved versions of the components that need to apply on - * different levels. Main idea of this class: avoid re-resolving as much of the - * stuff as possible when new extensions are added while also delaying the - * resolve until the point it is actually needed. For example, computed fields - * of the model won't be resolved unless the model is actually queried. Neither - * adding extensions with `client` component only cause other components to - * recompute. - */ -declare class MergedExtensionsList { - private head?; - private constructor(); - static empty(): MergedExtensionsList; - static single(extension: ExtensionArgs): MergedExtensionsList; - isEmpty(): boolean; - append(extension: ExtensionArgs): MergedExtensionsList; - getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; - getAllClientExtensions(): ClientArg | undefined; - getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; - getAllQueryCallbacks(jsModelName: string, operation: string): any; - getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; -} - -export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; - -export declare type Metric = { - key: string; - value: T; - labels: Record; - description: string; -}; - -export declare type MetricHistogram = { - buckets: MetricHistogramBucket[]; - sum: number; - count: number; -}; - -export declare type MetricHistogramBucket = [maxValue: number, count: number]; - -export declare type Metrics = { - counters: Metric[]; - gauges: Metric[]; - histograms: Metric[]; -}; - -export declare class MetricsClient { - private _engine; - constructor(engine: Engine); - /** - * Returns all metrics gathered up to this point in prometheus format. - * Result of this call can be exposed directly to prometheus scraping endpoint - * - * @param options - * @returns - */ - prometheus(options?: MetricsOptions): Promise; - /** - * Returns all metrics gathered up to this point in prometheus format. - * - * @param options - * @returns - */ - json(options?: MetricsOptions): Promise; -} - -declare type MetricsOptions = { - /** - * Labels to add to every metrics in key-value format - */ - globalLabels?: Record; -}; - -declare type MetricsOptionsCommon = { - globalLabels?: Record; -}; - -declare type MetricsOptionsJson = { - format: 'json'; -} & MetricsOptionsCommon; - -declare type MetricsOptionsPrometheus = { - format: 'prometheus'; -} & MetricsOptionsCommon; - -declare type MiddlewareArgsMapper = { - requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; - middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; -}; - -declare class MiddlewareHandler { - private _middlewares; - use(middleware: M): void; - get(id: number): M | undefined; - has(id: number): boolean; - length(): number; -} - -export declare type ModelArg = { - [MethodName in string]: unknown; -}; - -export declare type ModelArgs = { - model: { - [ModelName in string]: ModelArg; - }; -}; - -export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; - -export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; - -export declare type ModelQueryOptionsCbArgs = { - model: string; - operation: string; - args: JsArgs; - query: (args: JsArgs) => Promise; -}; - -export declare type NameArgs = { - name?: string; -}; - -export declare type Narrow = { - [K in keyof A]: A[K] extends Function ? A[K] : Narrow; -} | (A extends Narrowable ? A : never); - -export declare type Narrowable = string | number | bigint | boolean | []; - -export declare type NeverToUnknown = [T] extends [never] ? unknown : T; - -/** - * Imitates `fetch` via `https` to only suit our needs, it does nothing more. - * This is because we cannot bundle `node-fetch` as it uses many other Node.js - * utilities, while also bloating our bundles. This approach is much leaner. - * @param url - * @param options - * @returns - */ -declare function nodeFetch(url: string, options?: RequestOptions): Promise; - -declare class NodeHeaders { - readonly headers: Map; - constructor(init?: Record); - append(name: string, value: string): void; - delete(name: string): void; - get(name: string): string | null; - has(name: string): boolean; - set(name: string, value: string): void; - forEach(callbackfn: (value: string, key: string, parent: this) => void, thisArg?: any): void; -} - -/** - * @deprecated Please don´t rely on type checks to this error anymore. - * This will become a regular `PrismaClientKnownRequestError` with code `P2025` - * in the future major version of the client. - * Instead of `error instanceof Prisma.NotFoundError` use `error.code === "P2025"`. - */ -export declare class NotFoundError extends PrismaClientKnownRequestError { - constructor(message: string, clientVersion: string); -} - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * List of Prisma enums that must use unique objects instead of strings as their values. - */ -export declare const objectEnumNames: string[]; - -/** - * Base class for unique values of object-valued enums. - */ -export declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"]; - -export declare type Omission = Record; - -declare type Omit_2 = { - [P in keyof T as P extends K ? never : P]: T[P]; -}; -export { Omit_2 as Omit } - -export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; - -export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; - -export declare type OperationPayload = { - name: string; - scalars: { - [ScalarName in string]: unknown; - }; - objects: { - [ObjectName in string]: unknown; - }; - composites: { - [CompositeName in string]: unknown; - }; -}; - -export declare type Optional = { - [P in K & keyof O]?: O[P]; -} & { - [P in Exclude]: O[P]; -}; - -export declare type OptionalFlat = { - [K in keyof T]?: T[K]; -}; - -export declare type OptionalKeys = { - [K in keyof O]-?: {} extends Pick_2 ? K : never; -}[keyof O]; - -declare type Options = { - maxWait?: number; - timeout?: number; - isolationLevel?: IsolationLevel; -}; - -declare type Options_2 = { - clientVersion: string; -}; - -export declare type Or = { - 0: { - 0: 0; - 1: 1; - }; - 1: { - 0: 1; - 1: 1; - }; -}[A][B]; - -export declare type PatchFlat = O1 & Omit_2; - -export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; - -export declare type Payload = T extends { - [K: symbol]: { - types: { - payload: any; - }; - }; -} ? T[symbol]['types']['payload'] : any; - -export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { - [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; -}; - -declare type Pick_2 = { - [P in keyof T as P extends K ? P : never]: T[P]; -}; -export { Pick_2 as Pick } - -export declare class PrismaClientInitializationError extends Error { - clientVersion: string; - errorCode?: string; - retryable?: boolean; - constructor(message: string, clientVersion: string, errorCode?: string); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { - code: string; - meta?: Record; - clientVersion: string; - batchRequestIdx?: number; - constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); - get [Symbol.toStringTag](): string; -} - -export declare type PrismaClientOptions = { - /** - * Overwrites the primary datasource url from your schema.prisma file - */ - datasourceUrl?: string; - /** - * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. - */ - adapter?: DriverAdapter | null; - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources; - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat; - /** - * The default values for Transaction options - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: Transaction_2.Options; - /** - * @example - * \`\`\` - * // Defaults to stdout - * log: ['query', 'info', 'warn'] - * - * // Emit as events - * log: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * ] - * \`\`\` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: Array; - omit?: GlobalOmitOptions; - /** - * @internal - * You probably don't want to use this. \`__internal\` is used by internal tooling. - */ - __internal?: { - debug?: boolean; - engine?: { - cwd?: string; - binaryPath?: string; - endpoint?: string; - allowTriggerPanic?: boolean; - }; - /** This can be used for testing purposes */ - configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; - }; -}; - -export declare class PrismaClientRustPanicError extends Error { - clientVersion: string; - constructor(message: string, clientVersion: string); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { - clientVersion: string; - batchRequestIdx?: number; - constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientValidationError extends Error { - name: string; - clientVersion: string; - constructor(message: string, { clientVersion }: Options_2); - get [Symbol.toStringTag](): string; -} - -declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; - -export declare interface PrismaPromise extends Promise { - [Symbol.toStringTag]: 'PrismaPromise'; -} - -/** - * Prisma's `Promise` that is backwards-compatible. All additions on top of the - * original `Promise` are optional so that it can be backwards-compatible. - * @see [[createPrismaPromise]] - */ -declare interface PrismaPromise_2 extends Promise { - /** - * Extension of the original `.then` function - * @param onfulfilled same as regular promises - * @param onrejected same as regular promises - * @param transaction transaction options - */ - then(onfulfilled?: (value: A) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; - /** - * Extension of the original `.catch` function - * @param onrejected same as regular promises - * @param transaction transaction options - */ - catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; - /** - * Extension of the original `.finally` function - * @param onfinally same as regular promises - * @param transaction transaction options - */ - finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; - /** - * Called when executing a batch of regular tx - * @param transaction transaction options for batch tx - */ - requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; -} - -declare type PrismaPromiseBatchTransaction = { - kind: 'batch'; - id: number; - isolationLevel?: IsolationLevel; - index: number; - lock: PromiseLike; -}; - -declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2; - -/** - * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which - * is essentially a proxy for `Promise`. All the transaction-compatible client - * methods return one, this allows for pre-preparing queries without executing - * them until `.then` is called. It's the foundation of Prisma's query batching. - * @param callback that will be wrapped within our promise implementation - * @see [[PrismaPromise]] - * @returns - */ -declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2; - -declare type PrismaPromiseInteractiveTransaction = { - kind: 'itx'; - id: string; - payload: PayloadType; -}; - -declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; - -export declare const PrivateResultType: unique symbol; - -declare namespace Public { - export { - validator - } -} -export { Public } - -declare namespace Public_2 { - export { - Args, - Result, - Payload, - PrismaPromise, - Operation, - Exact - } -} - -declare type Query = { - sql: string; - args: Array; - argTypes: Array; -}; - -declare interface Queryable { - readonly provider: 'mysql' | 'postgres' | 'sqlite'; - readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); - /** - * Execute a query given as SQL, interpolating the given parameters, - * and returning the type-aware result set of the query. - * - * This is the preferred way of executing `SELECT` queries. - */ - queryRaw(params: Query): Promise>; - /** - * Execute a query given as SQL, interpolating the given parameters, - * and returning the number of affected rows. - * - * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries, - * as well as transactional queries. - */ - executeRaw(params: Query): Promise>; -} - -declare type QueryEngineBatchGraphQLRequest = { - batch: QueryEngineRequest[]; - transaction?: boolean; - isolationLevel?: Transaction_2.IsolationLevel; -}; - -declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; - -declare type QueryEngineConfig = { - datamodel: string; - configDir: string; - logQueries: boolean; - ignoreEnvVarErrors: boolean; - datasourceOverrides: Record; - env: Record; - logLevel: QueryEngineLogLevel; - telemetry?: QueryEngineTelemetry; - engineProtocol: EngineProtocol; -}; - -declare interface QueryEngineConstructor { - new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingDriverAdapter): QueryEngineInstance; -} - -declare type QueryEngineInstance = { - connect(headers: string): Promise; - disconnect(headers: string): Promise; - /** - * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` - * @param headersStr JSON.stringified `QueryEngineRequestHeaders` - */ - query(requestStr: string, headersStr: string, transactionId?: string): Promise; - sdlSchema(): Promise; - dmmf(traceparent: string): Promise; - startTransaction(options: string, traceHeaders: string): Promise; - commitTransaction(id: string, traceHeaders: string): Promise; - rollbackTransaction(id: string, traceHeaders: string): Promise; - metrics(options: string): Promise; - applyPendingMigrations(): Promise; -}; - -declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; - -declare type QueryEngineRequest = { - query: string; - variables: Object; -}; - -declare type QueryEngineResult = { - data: T; - elapsed: number; -}; - -declare type QueryEngineTelemetry = { - enabled: Boolean; - endpoint: string; -}; - -declare type QueryEvent = { - timestamp: Date; - query: string; - params: string; - duration: number; - target: string; -}; - -declare type QueryEventType = 'query'; - -declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise) => Promise; - -declare type QueryMiddlewareParams = { - /** The model this is executed on */ - model?: string; - /** The action that is being handled */ - action: Action; - /** TODO what is this */ - dataPath: string[]; - /** TODO what is this */ - runInTransaction: boolean; - args?: UserArgs_2; -}; - -export declare type QueryOptions = { - query: { - [ModelName in string]: { - [ModelAction in string]: ModelQueryOptionsCb; - } | QueryOptionsCb; - }; -}; - -export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; - -export declare type QueryOptionsCbArgs = { - model?: string; - operation: string; - args: JsArgs | RawQueryArgs; - query: (args: JsArgs | RawQueryArgs) => Promise; -}; - -/** - * Create raw SQL statement. - */ -export declare function raw(value: string): Sql; - -export declare type RawParameters = { - __prismaRawParameters__: true; - values: string; -}; - -export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; - -declare type RawTaggedValue = { - $type: 'Raw'; - value: unknown; -}; - -/** - * Supported value or SQL instance. - */ -export declare type RawValue = Value | Sql; - -export declare type ReadonlyDeep = { - readonly [K in keyof T]: ReadonlyDeep; -}; - -declare type ReadonlyDeep_2 = { - +readonly [K in keyof O]: ReadonlyDeep_2; -}; - -declare type Record_2 = { - [P in T]: U; -}; -export { Record_2 as Record } - -export declare type RenameAndNestPayloadKeys

= { - [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; -}; - -declare type RequestBatchOptions = { - transaction?: TransactionOptions_2; - traceparent?: string; - numTry?: number; - containsWrite: boolean; - customDataProxyFetch?: (fetch: Fetch) => Fetch; -}; - -declare interface RequestError { - error: string; - user_facing_error: { - is_panic: boolean; - message: string; - meta?: Record; - error_code?: string; - batch_request_idx?: number; - }; -} - -declare class RequestHandler { - client: Client; - dataloader: DataLoader; - private logEmitter?; - constructor(client: Client, logEmitter?: LogEmitter); - request(params: RequestParams): Promise; - mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult): any; - /** - * Handles the error and logs it, logging the error is done synchronously waiting for the event - * handlers to finish. - */ - handleAndLogRequestError(params: HandleErrorParams): never; - handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never; - sanitizeMessage(message: any): any; - unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; - get [Symbol.toStringTag](): string; -} - -declare type RequestOptions = { - method?: string; - headers?: Record; - body?: string; -}; - -declare type RequestOptions_2 = { - traceparent?: string; - numTry?: number; - interactiveTransaction?: InteractiveTransactionOptions; - isWrite: boolean; - customDataProxyFetch?: (fetch: Fetch) => Fetch; -}; - -declare type RequestParams = { - modelName?: string; - action: Action; - protocolQuery: JsonQuery; - dataPath: string[]; - clientMethod: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - extensions: MergedExtensionsList; - args?: any; - headers?: Record; - unpacker?: Unpacker; - otelParentCtx?: Context; - otelChildCtx?: Context; - globalOmit?: GlobalOmitOptions; - customDataProxyFetch?: (fetch: Fetch) => Fetch; -}; - -declare type RequestResponse = { - ok: boolean; - url: string; - statusText?: string; - status: number; - headers: NodeHeaders; - text: () => Promise; - json: () => Promise; -}; - -declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; -export { RequiredExtensionArgs } -export { RequiredExtensionArgs as UserArgs } - -export declare type RequiredKeys = { - [K in keyof O]-?: {} extends Pick_2 ? never : K; -}[keyof O]; - -declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { - inlineDatasources: GetPrismaClientConfig['inlineDatasources']; - overrideDatasources: Datasources; - env: Record; - clientVersion: string; -}): string; - -export declare type Result = T extends { - [K: symbol]: { - types: { - payload: any; - }; - }; -} ? GetResult : GetResult<{ - composites: {}; - objects: {}; - scalars: {}; - name: ''; -}, {}, F>; - -export declare type Result_2 = Result; - -declare namespace Result_3 { - export { - Operation, - FluentOperation, - Count, - GetFindResult, - SelectablePayloadFields, - SelectField, - DefaultSelection, - UnwrapPayload, - ApplyOmit, - OmitValue, - GetCountResult, - Aggregate, - GetAggregateResult, - GetBatchResult, - GetGroupByResult, - GetResult, - ExtractGlobalOmit - } -} - -declare type Result_4 = { - map(fn: (value: T) => U): Result_4; - flatMap(fn: (value: T) => Result_4): Result_4; -} & ({ - readonly ok: true; - readonly value: T; -} | { - readonly ok: false; - readonly error: Error_2; -}); - -export declare type ResultArg = { - [FieldName in string]: ResultFieldDefinition; -}; - -export declare type ResultArgs = { - result: { - [ModelName in string]: ResultArg; - }; -}; - -export declare type ResultArgsFieldCompute = (model: any) => unknown; - -export declare type ResultFieldDefinition = { - needs?: { - [FieldName in string]: boolean; - }; - compute: ResultArgsFieldCompute; -}; - -declare interface ResultSet { - /** - * List of column types appearing in a database query, in the same order as `columnNames`. - * They are used within the Query Engine to convert values from JS to Quaint values. - */ - columnTypes: Array; - /** - * List of column names appearing in a database query, in the same order as `columnTypes`. - */ - columnNames: Array; - /** - * List of rows retrieved from a database query. - * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. - */ - rows: Array>; - /** - * The last ID of an `INSERT` statement, if any. - * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. - */ - lastInsertId?: string; -} - -export declare type Return = T extends (...args: any[]) => infer R ? R : T; - -declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; - -export declare type RuntimeDataModel = { - readonly models: Record; - readonly enums: Record; - readonly types: Record; -}; - -declare type RuntimeEnum = Omit; - -declare type RuntimeModel = Omit; - -export declare type Select = T extends U ? T : never; - -export declare type SelectablePayloadFields = { - objects: { - [k in K]: O; - }; -} | { - composites: { - [k in K]: O; - }; -}; - -export declare type SelectField

, K extends PropertyKey> = P extends { - objects: Record; -} ? P['objects'][K] : P extends { - composites: Record; -} ? P['composites'][K] : never; - -declare type Selection_2 = Record; -export { Selection_2 as Selection } - -export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery; - -declare type SerializeParams = { - runtimeDataModel: RuntimeDataModel; - modelName?: string; - action: Action; - args?: JsArgs; - extensions?: MergedExtensionsList; - callsite?: CallSite; - clientMethod: string; - clientVersion: string; - errorFormat: ErrorFormat; - previewFeatures: string[]; - globalOmit?: GlobalOmitOptions; -}; - -declare class Skip { - constructor(param?: symbol); - ifUndefined(value: T | undefined): T | Skip; -} - -export declare const skip: Skip; - -/** - * An interface that represents a span. A span represents a single operation - * within a trace. Examples of span might include remote procedure calls or a - * in-process function calls to sub-components. A Trace has a single, top-level - * "root" Span that in turn may have zero or more child Spans, which in turn - * may have children. - * - * Spans are created by the {@link Tracer.startSpan} method. - */ -declare interface Span { - /** - * Returns the {@link SpanContext} object associated with this Span. - * - * Get an immutable, serializable identifier for this span that can be used - * to create new child spans. Returned SpanContext is usable even after the - * span ends. - * - * @returns the SpanContext object associated with this Span. - */ - spanContext(): SpanContext; - /** - * Sets an attribute to the span. - * - * Sets a single Attribute with the key and value passed as arguments. - * - * @param key the key for this attribute. - * @param value the value for this attribute. Setting a value null or - * undefined is invalid and will result in undefined behavior. - */ - setAttribute(key: string, value: SpanAttributeValue): this; - /** - * Sets attributes to the span. - * - * @param attributes the attributes that will be added. - * null or undefined attribute values - * are invalid and will result in undefined behavior. - */ - setAttributes(attributes: SpanAttributes): this; - /** - * Adds an event to the Span. - * - * @param name the name of the event. - * @param [attributesOrStartTime] the attributes that will be added; these are - * associated with this event. Can be also a start time - * if type is {@type TimeInput} and 3rd param is undefined - * @param [startTime] start time of the event. - */ - addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; - /** - * Adds a single link to the span. - * - * Links added after the creation will not affect the sampling decision. - * It is preferred span links be added at span creation. - * - * @param link the link to add. - */ - addLink(link: Link): this; - /** - * Adds multiple links to the span. - * - * Links added after the creation will not affect the sampling decision. - * It is preferred span links be added at span creation. - * - * @param links the links to add. - */ - addLinks(links: Link[]): this; - /** - * Sets a status to the span. If used, this will override the default Span - * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value - * of previous calls to SetStatus on the Span. - * - * @param status the SpanStatus to set. - */ - setStatus(status: SpanStatus): this; - /** - * Updates the Span name. - * - * This will override the name provided via {@link Tracer.startSpan}. - * - * Upon this update, any sampling behavior based on Span name will depend on - * the implementation. - * - * @param name the Span name. - */ - updateName(name: string): this; - /** - * Marks the end of Span execution. - * - * Call to End of a Span MUST not have any effects on child spans. Those may - * still be running and can be ended later. - * - * Do not return `this`. The Span generally should not be used after it - * is ended so chaining is not desired in this context. - * - * @param [endTime] the time to set as Span's end time. If not provided, - * use the current time as the span's end time. - */ - end(endTime?: TimeInput): void; - /** - * Returns the flag whether this span will be recorded. - * - * @returns true if this Span is active and recording information like events - * with the `AddEvent` operation and attributes using `setAttributes`. - */ - isRecording(): boolean; - /** - * Sets exception as a span event - * @param exception the exception the only accepted values are string or Error - * @param [time] the time to set as Span's event time. If not provided, - * use the current time. - */ - recordException(exception: Exception, time?: TimeInput): void; -} - -/** - * @deprecated please use {@link Attributes} - */ -declare type SpanAttributes = Attributes; - -/** - * @deprecated please use {@link AttributeValue} - */ -declare type SpanAttributeValue = AttributeValue; - -declare type SpanCallback = (span?: Span, context?: Context) => R; - -/** - * A SpanContext represents the portion of a {@link Span} which must be - * serialized and propagated along side of a {@link Baggage}. - */ -declare interface SpanContext { - /** - * The ID of the trace that this span belongs to. It is worldwide unique - * with practically sufficient probability by being made as 16 randomly - * generated bytes, encoded as a 32 lowercase hex characters corresponding to - * 128 bits. - */ - traceId: string; - /** - * The ID of the Span. It is globally unique with practically sufficient - * probability by being made as 8 randomly generated bytes, encoded as a 16 - * lowercase hex characters corresponding to 64 bits. - */ - spanId: string; - /** - * Only true if the SpanContext was propagated from a remote parent. - */ - isRemote?: boolean; - /** - * Trace flags to propagate. - * - * It is represented as 1 byte (bitmap). Bit to represent whether trace is - * sampled or not. When set, the least significant bit documents that the - * caller may have recorded trace data. A caller who does not record trace - * data out-of-band leaves this flag unset. - * - * see {@link TraceFlags} for valid flag values. - */ - traceFlags: number; - /** - * Tracing-system-specific info to propagate. - * - * The tracestate field value is a `list` as defined below. The `list` is a - * series of `list-members` separated by commas `,`, and a list-member is a - * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs - * surrounding `list-members` are ignored. There can be a maximum of 32 - * `list-members` in a `list`. - * More Info: https://www.w3.org/TR/trace-context/#tracestate-field - * - * Examples: - * Single tracing system (generic format): - * tracestate: rojo=00f067aa0ba902b7 - * Multiple tracing systems (with different formatting): - * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE - */ - traceState?: TraceState; -} - -declare enum SpanKind { - /** Default value. Indicates that the span is used internally. */ - INTERNAL = 0, - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote request. - */ - SERVER = 1, - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - */ - CLIENT = 2, - /** - * Indicates that the span describes producer sending a message to a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - PRODUCER = 3, - /** - * Indicates that the span describes consumer receiving a message from a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - CONSUMER = 4 -} - -/** - * Options needed for span creation - */ -declare interface SpanOptions { - /** - * The SpanKind of a span - * @default {@link SpanKind.INTERNAL} - */ - kind?: SpanKind; - /** A span's attributes */ - attributes?: SpanAttributes; - /** {@link Link}s span to other spans */ - links?: Link[]; - /** A manually specified start time for the created `Span` object. */ - startTime?: TimeInput; - /** The new span should be a root span. (Ignore parent from context). */ - root?: boolean; -} - -declare interface SpanStatus { - /** The status code of this message. */ - code: SpanStatusCode; - /** A developer-facing error message. */ - message?: string; -} - -/** - * An enumeration of status codes. - */ -declare enum SpanStatusCode { - /** - * The default status. - */ - UNSET = 0, - /** - * The operation has been validated by an Application developer or - * Operator to have completed successfully. - */ - OK = 1, - /** - * The operation contains an error. - */ - ERROR = 2 -} - -/** - * A SQL instance can be nested within each other to build SQL strings. - */ -export declare class Sql { - readonly values: Value[]; - readonly strings: string[]; - constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); - get sql(): string; - get statement(): string; - get text(): string; - inspect(): { - sql: string; - statement: string; - text: string; - values: unknown[]; - }; -} - -/** - * Create a SQL object from a template string. - */ -export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; - -/** - * Defines TimeInput. - * - * hrtime, epoch milliseconds, performance.now() or Date - */ -declare type TimeInput = HrTime | number | Date; - -export declare type ToTuple = T extends any[] ? T : [T]; - -declare interface TraceState { - /** - * Create a new TraceState which inherits from this TraceState and has the - * given key set. - * The new entry will always be added in the front of the list of states. - * - * @param key key of the TraceState entry. - * @param value value of the TraceState entry. - */ - set(key: string, value: string): TraceState; - /** - * Return a new TraceState which inherits from this TraceState but does not - * contain the given key. - * - * @param key the key for the TraceState entry to be removed. - */ - unset(key: string): TraceState; - /** - * Returns the value to which the specified key is mapped, or `undefined` if - * this map contains no mapping for the key. - * - * @param key with which the specified value is to be associated. - * @returns the value to which the specified key is mapped, or `undefined` if - * this map contains no mapping for the key. - */ - get(key: string): string | undefined; - /** - * Serializes the TraceState to a `list` as defined below. The `list` is a - * series of `list-members` separated by commas `,`, and a list-member is a - * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs - * surrounding `list-members` are ignored. There can be a maximum of 32 - * `list-members` in a `list`. - * - * @returns the serialized string. - */ - serialize(): string; -} - -declare interface TracingHelper { - isEnabled(): boolean; - getTraceParent(context?: Context): string; - createEngineSpan(engineSpanEvent: EngineSpanEvent): void; - getActiveContext(): Context | undefined; - runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; -} - -declare interface Transaction extends Queryable { - /** - * Transaction options. - */ - readonly options: TransactionOptions; - /** - * Commit the transaction. - */ - commit(): Promise>; - /** - * Rolls back the transaction. - */ - rollback(): Promise>; -} - -declare namespace Transaction_2 { - export { - IsolationLevel, - Options, - InteractiveTransactionInfo, - TransactionHeaders - } -} - -declare interface TransactionContext extends Queryable { - /** - * Starts new transaction. - */ - startTransaction(): Promise>; -} - -declare type TransactionHeaders = { - traceparent?: string; -}; - -declare type TransactionOptions = { - usePhantomQuery: boolean; -}; - -declare type TransactionOptions_2 = { - kind: 'itx'; - options: InteractiveTransactionOptions; -} | { - kind: 'batch'; - options: BatchTransactionOptions; -}; - -export declare class TypedSql { - [PrivateResultType]: Result; - constructor(sql: string, values: Values); - get sql(): string; - get values(): Values; -} - -export declare type TypeMapCbDef = Fn<{ - extArgs: InternalArgs; - clientOptions: ClientOptionDef; -}, TypeMapDef>; - -/** Shared */ -export declare type TypeMapDef = Record; - -declare namespace Types { - export { - Result_3 as Result, - Extensions_2 as Extensions, - Utils, - Public_2 as Public, - isSkip, - Skip, - skip, - UnknownTypedSql, - OperationPayload as Payload - } -} -export { Types } - -declare type UnknownErrorParams = { - clientVersion: string; - batchRequestIdx?: number; -}; - -export declare type UnknownTypedSql = TypedSql; - -declare type Unpacker = (data: any) => any; - -export declare type UnwrapPayload

= {} extends P ? unknown : { - [K in keyof P]: P[K] extends { - scalars: infer S; - composites: infer C; - }[] ? Array> : P[K] extends { - scalars: infer S; - composites: infer C; - } | null ? S & UnwrapPayload | Select : never; -}; - -export declare type UnwrapPromise

= P extends Promise ? R : P; - -export declare type UnwrapTuple = { - [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; -}; - -/** - * Input that flows from the user into the Client. - */ -declare type UserArgs_2 = any; - -declare namespace Utils { - export { - EmptyToUnknown, - NeverToUnknown, - PatchFlat, - Omit_2 as Omit, - Pick_2 as Pick, - ComputeDeep, - Compute, - OptionalFlat, - ReadonlyDeep, - Narrowable, - Narrow, - Exact, - Cast, - Record_2 as Record, - UnwrapPromise, - UnwrapTuple, - Path, - Fn, - Call, - RequiredKeys, - OptionalKeys, - Optional, - Return, - ToTuple, - RenameAndNestPayloadKeys, - PayloadToResult, - Select, - Equals, - Or, - JsPromise - } -} - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; - -declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -/** - * Values supported by SQL engine. - */ -export declare type Value = unknown; - -export declare function warnEnvConflicts(envPaths: any): void; - -export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; - -declare type WasmLoadingConfig = { - /** - * WASM-bindgen runtime for corresponding module - */ - getRuntime: () => { - __wbg_set_wasm(exports: unknown): any; - QueryEngine: QueryEngineConstructor; - }; - /** - * Loads the raw wasm module for the wasm query engine. This configuration is - * generated specifically for each type of client, eg. Node.js client and Edge - * clients will have different implementations. - * @remarks this is a callback on purpose, we only load the wasm if needed. - * @remarks only used by LibraryEngine.ts - */ - getQueryEngineWasmModule: () => Promise; -}; - -export { } diff --git a/keep-notes/prisma/client-generated/runtime/library.js b/keep-notes/prisma/client-generated/runtime/library.js deleted file mode 100644 index f60b9c2..0000000 --- a/keep-notes/prisma/client-generated/runtime/library.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict";var eu=Object.create;var Nr=Object.defineProperty;var tu=Object.getOwnPropertyDescriptor;var ru=Object.getOwnPropertyNames;var nu=Object.getPrototypeOf,iu=Object.prototype.hasOwnProperty;var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ut=(e,t)=>{for(var r in t)Nr(e,r,{get:t[r],enumerable:!0})},ho=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ru(t))!iu.call(e,i)&&i!==r&&Nr(e,i,{get:()=>t[i],enumerable:!(n=tu(t,i))||n.enumerable});return e};var k=(e,t,r)=>(r=e!=null?eu(nu(e)):{},ho(t||!e||!e.__esModule?Nr(r,"default",{value:e,enumerable:!0}):r,e)),ou=e=>ho(Nr({},"__esModule",{value:!0}),e);var jo=Z((pf,Zn)=>{"use strict";var v=Zn.exports;Zn.exports.default=v;var D="\x1B[",Ht="\x1B]",ft="\x07",Jr=";",qo=process.env.TERM_PROGRAM==="Apple_Terminal";v.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?D+(e+1)+"G":D+(t+1)+";"+(e+1)+"H"};v.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=D+-e+"D":e>0&&(r+=D+e+"C"),t<0?r+=D+-t+"A":t>0&&(r+=D+t+"B"),r};v.cursorUp=(e=1)=>D+e+"A";v.cursorDown=(e=1)=>D+e+"B";v.cursorForward=(e=1)=>D+e+"C";v.cursorBackward=(e=1)=>D+e+"D";v.cursorLeft=D+"G";v.cursorSavePosition=qo?"\x1B7":D+"s";v.cursorRestorePosition=qo?"\x1B8":D+"u";v.cursorGetPosition=D+"6n";v.cursorNextLine=D+"E";v.cursorPrevLine=D+"F";v.cursorHide=D+"?25l";v.cursorShow=D+"?25h";v.eraseLines=e=>{let t="";for(let r=0;r[Ht,"8",Jr,Jr,t,ft,e,Ht,"8",Jr,Jr,ft].join("");v.image=(e,t={})=>{let r=`${Ht}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+ft};v.iTerm={setCwd:(e=process.cwd())=>`${Ht}50;CurrentDir=${e}${ft}`,annotation:(e,t={})=>{let r=`${Ht}1337;`,n=typeof t.x<"u",i=typeof t.y<"u";if((n||i)&&!(n&&i&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+ft}}});var Xn=Z((df,Vo)=>{"use strict";Vo.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Gu=require("os"),Bo=require("tty"),de=Xn(),{env:Q}=process,Qe;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Qe=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Qe=1);"FORCE_COLOR"in Q&&(Q.FORCE_COLOR==="true"?Qe=1:Q.FORCE_COLOR==="false"?Qe=0:Qe=Q.FORCE_COLOR.length===0?1:Math.min(parseInt(Q.FORCE_COLOR,10),3));function ei(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ti(e,t){if(Qe===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!t&&Qe===void 0)return 0;let r=Qe||0;if(Q.TERM==="dumb")return r;if(process.platform==="win32"){let n=Gu.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Q)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Q)||Q.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Q)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Q.TEAMCITY_VERSION)?1:0;if(Q.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Q){let n=parseInt((Q.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Q.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Q.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Q.TERM)||"COLORTERM"in Q?1:r}function Qu(e){let t=ti(e,e&&e.isTTY);return ei(t)}Uo.exports={supportsColor:Qu,stdout:ei(ti(!0,Bo.isatty(1))),stderr:ei(ti(!0,Bo.isatty(2)))}});var Wo=Z((ff,Jo)=>{"use strict";var Ju=Go(),gt=Xn();function Qo(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let t=(e||"").split(".").map(r=>parseInt(r,10));return{major:t[0],minor:t[1],patch:t[2]}}function ri(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(gt("no-hyperlink")||gt("no-hyperlinks")||gt("hyperlink=false")||gt("hyperlink=never"))return!1;if(gt("hyperlink=true")||gt("hyperlink=always")||"NETLIFY"in t)return!0;if(!Ju.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=Qo(t.TERM_PROGRAM_VERSION);switch(t.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||r.major===1&&r.minor>=72}}if("VTE_VERSION"in t){if(t.VTE_VERSION==="0.50.0")return!1;let r=Qo(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}Jo.exports={supportsHyperlink:ri,stdout:ri(process.stdout),stderr:ri(process.stderr)}});var Ko=Z((gf,Kt)=>{"use strict";var Wu=jo(),ni=Wo(),Ho=(e,t,{target:r="stdout",...n}={})=>ni[r]?Wu.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;Kt.exports=(e,t,r={})=>Ho(e,t,r);Kt.exports.stderr=(e,t,r={})=>Ho(e,t,{target:"stderr",...r});Kt.exports.isSupported=ni.stdout;Kt.exports.stderr.isSupported=ni.stderr});var oi=Z((Rf,Hu)=>{Hu.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var si=Z(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.enginesVersion=void 0;Wr.enginesVersion=oi().prisma.enginesVersion});var Xo=Z((Gf,Yu)=>{Yu.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var ts=Z((Qf,Kr)=>{"use strict";var Zu=require("fs"),es=require("path"),Xu=require("os"),ec=Xo(),tc=ec.version,rc=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function nc(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` -`);let n;for(;(n=rc.exec(r))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` -`),o=o.replace(/\\r/g,"\r")),t[i]=o}return t}function ci(e){console.log(`[dotenv@${tc}][DEBUG] ${e}`)}function ic(e){return e[0]==="~"?es.join(Xu.homedir(),e.slice(1)):e}function oc(e){let t=es.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug),i=!!(e&&e.override);e&&(e.path!=null&&(t=ic(e.path)),e.encoding!=null&&(r=e.encoding));try{let o=Hr.parse(Zu.readFileSync(t,{encoding:r}));return Object.keys(o).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?(i===!0&&(process.env[s]=o[s]),n&&ci(i===!0?`"${s}" is already defined in \`process.env\` and WAS overwritten`:`"${s}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[s]=o[s]}),{parsed:o}}catch(o){return n&&ci(`Failed to load ${t} ${o.message}`),{error:o}}}var Hr={config:oc,parse:nc};Kr.exports.config=Hr.config;Kr.exports.parse=Hr.parse;Kr.exports=Hr});var as=Z((Zf,ss)=>{"use strict";ss.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var us=Z((Xf,ls)=>{"use strict";var uc=as();ls.exports=e=>{let t=uc(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var fi=Z((og,cs)=>{"use strict";cs.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var fs=Z((lg,ms)=>{"use strict";ms.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var bi=Z((ug,gs)=>{"use strict";var yc=fs();gs.exports=e=>typeof e=="string"?e.replace(yc(),""):e});var hs=Z((dg,Zr)=>{"use strict";Zr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};Zr.exports.default=Zr.exports});var Ai=Z((Th,$s)=>{"use strict";$s.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;sGn,Decimal:()=>xe,Extensions:()=>jn,MetricsClient:()=>Dt,NotFoundError:()=>Le,PrismaClientInitializationError:()=>R,PrismaClientKnownRequestError:()=>V,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>J,Public:()=>Vn,Sql:()=>oe,defineDmmfProperty:()=>ua,deserializeJsonResponse:()=>wt,dmmfToRuntimeDataModel:()=>la,empty:()=>ma,getPrismaClient:()=>Yl,getRuntime:()=>In,join:()=>da,makeStrictEnum:()=>Zl,makeTypedQueryFactory:()=>ca,objectEnumValues:()=>yn,raw:()=>ji,serializeJsonQuery:()=>vn,skip:()=>Pn,sqltag:()=>Vi,warnEnvConflicts:()=>Xl,warnOnce:()=>tr});module.exports=ou(Nm);var jn={};Ut(jn,{defineExtension:()=>yo,getExtensionContext:()=>bo});function yo(e){return typeof e=="function"?e:t=>t.$extends(e)}function bo(e){return e}var Vn={};Ut(Vn,{validator:()=>Eo});function Eo(...e){return t=>t}var Mr={};Ut(Mr,{$:()=>To,bgBlack:()=>gu,bgBlue:()=>Eu,bgCyan:()=>xu,bgGreen:()=>yu,bgMagenta:()=>wu,bgRed:()=>hu,bgWhite:()=>Pu,bgYellow:()=>bu,black:()=>pu,blue:()=>rt,bold:()=>H,cyan:()=>De,dim:()=>Oe,gray:()=>Gt,green:()=>qe,grey:()=>fu,hidden:()=>uu,inverse:()=>lu,italic:()=>au,magenta:()=>du,red:()=>ce,reset:()=>su,strikethrough:()=>cu,underline:()=>X,white:()=>mu,yellow:()=>ke});var Bn,wo,xo,Po,vo=!0;typeof process<"u"&&({FORCE_COLOR:Bn,NODE_DISABLE_COLORS:wo,NO_COLOR:xo,TERM:Po}=process.env||{},vo=process.stdout&&process.stdout.isTTY);var To={enabled:!wo&&xo==null&&Po!=="dumb"&&(Bn!=null&&Bn!=="0"||vo)};function M(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!To.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var su=M(0,0),H=M(1,22),Oe=M(2,22),au=M(3,23),X=M(4,24),lu=M(7,27),uu=M(8,28),cu=M(9,29),pu=M(30,39),ce=M(31,39),qe=M(32,39),ke=M(33,39),rt=M(34,39),du=M(35,39),De=M(36,39),mu=M(37,39),Gt=M(90,39),fu=M(90,39),gu=M(40,49),hu=M(41,49),yu=M(42,49),bu=M(43,49),Eu=M(44,49),wu=M(45,49),xu=M(46,49),Pu=M(47,49);var vu=100,Ro=["green","yellow","blue","magenta","cyan","red"],Qt=[],Co=Date.now(),Tu=0,Un=typeof process<"u"?process.env:{};globalThis.DEBUG??=Un.DEBUG??"";globalThis.DEBUG_COLORS??=Un.DEBUG_COLORS?Un.DEBUG_COLORS==="true":!0;var Jt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ru(e){let t={color:Ro[Tu++%Ro.length],enabled:Jt.enabled(e),namespace:e,log:Jt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Qt.push([o,...n]),Qt.length>vu&&Qt.shift(),Jt.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Cu(c)),u=`+${Date.now()-Co}ms`;Co=Date.now(),globalThis.DEBUG_COLORS?a(Mr[s](H(o)),...l,Mr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Gn=new Proxy(Ru,{get:(e,t)=>Jt[t],set:(e,t,r)=>Jt[t]=r});function Cu(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function So(e=7500){let t=Qt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length!!(e&&typeof e=="object"),jr=e=>e&&!!e[_e],Ee=(e,t,r)=>{if(jr(e)){let n=e[_e](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(Wn(e)){if(!Wn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];jr(a)&&a[Su]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.lengthEe(u,s[c],r))&&i.every((u,c)=>Ee(u,a[c],r))&&(o.length===0||Ee(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>Ee(s,t[a],r))}return Object.keys(e).every(n=>{let i=e[n];return(n in t||jr(o=i)&&o[_e]().matcherType==="optional")&&Ee(i,t[n],r);var o})}return Object.is(t,e)},Ge=e=>{var t,r,n;return Wn(e)?jr(e)?(t=(r=(n=e[_e]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Wt(e,Ge):Wt(Object.values(e),Ge):[]},Wt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function pe(e){return Object.assign(e,{optional:()=>Au(e),and:t=>j(e,t),or:t=>Iu(e,t),select:t=>t===void 0?Oo(e):Oo(t,e)})}function Au(e){return pe({[_e]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return t===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:Ee(e,t,n),selections:r}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function j(...e){return pe({[_e]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return{matched:e.every(i=>Ee(i,t,n)),selections:r}},getSelectionKeys:()=>Wt(e,Ge),matcherType:"and"})})}function Iu(...e){return pe({[_e]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return Wt(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,t,n)),selections:r}},getSelectionKeys:()=>Wt(e,Ge),matcherType:"or"})})}function I(e){return{[_e]:()=>({match:t=>({matched:!!e(t)})})}}function Oo(...e){let t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return pe({[_e]:()=>({match:n=>{let i={[t??Vr]:n};return{matched:r===void 0||Ee(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??Vr].concat(r===void 0?[]:Ge(r))})})}function ye(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Ve(e){return typeof e=="bigint"}var Km=pe(I(function(e){return!0}));var Be=e=>Object.assign(pe(e),{startsWith:t=>{return Be(j(e,(r=t,I(n=>je(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Be(j(e,(r=t,I(n=>je(n)&&n.endsWith(r)))));var r},minLength:t=>Be(j(e,(r=>I(n=>je(n)&&n.length>=r))(t))),length:t=>Be(j(e,(r=>I(n=>je(n)&&n.length===r))(t))),maxLength:t=>Be(j(e,(r=>I(n=>je(n)&&n.length<=r))(t))),includes:t=>{return Be(j(e,(r=t,I(n=>je(n)&&n.includes(r)))));var r},regex:t=>{return Be(j(e,(r=t,I(n=>je(n)&&!!n.match(r)))));var r}}),zm=Be(I(je)),be=e=>Object.assign(pe(e),{between:(t,r)=>be(j(e,((n,i)=>I(o=>ye(o)&&n<=o&&i>=o))(t,r))),lt:t=>be(j(e,(r=>I(n=>ye(n)&&nbe(j(e,(r=>I(n=>ye(n)&&n>r))(t))),lte:t=>be(j(e,(r=>I(n=>ye(n)&&n<=r))(t))),gte:t=>be(j(e,(r=>I(n=>ye(n)&&n>=r))(t))),int:()=>be(j(e,I(t=>ye(t)&&Number.isInteger(t)))),finite:()=>be(j(e,I(t=>ye(t)&&Number.isFinite(t)))),positive:()=>be(j(e,I(t=>ye(t)&&t>0))),negative:()=>be(j(e,I(t=>ye(t)&&t<0)))}),Ym=be(I(ye)),Ue=e=>Object.assign(pe(e),{between:(t,r)=>Ue(j(e,((n,i)=>I(o=>Ve(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ue(j(e,(r=>I(n=>Ve(n)&&nUe(j(e,(r=>I(n=>Ve(n)&&n>r))(t))),lte:t=>Ue(j(e,(r=>I(n=>Ve(n)&&n<=r))(t))),gte:t=>Ue(j(e,(r=>I(n=>Ve(n)&&n>=r))(t))),positive:()=>Ue(j(e,I(t=>Ve(t)&&t>0))),negative:()=>Ue(j(e,I(t=>Ve(t)&&t<0)))}),Zm=Ue(I(Ve)),Xm=pe(I(function(e){return typeof e=="boolean"})),ef=pe(I(function(e){return typeof e=="symbol"})),tf=pe(I(function(e){return e==null})),rf=pe(I(function(e){return e!=null}));var Hn={matched:!1,value:void 0};function mt(e){return new Kn(e,Hn)}var Kn=class e{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;let r=t[t.length-1],n=[t[0]],i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>Ee(u,this.input,a))||i&&!i(this.input)?Hn:{matched:!0,value:r(o?Vr in s?s[Vr]:s:this.input,this.input)};return new e(this.input,l)}when(t,r){if(this.state.matched)return this;let n=!!t(this.input);return new e(this.input,n?{matched:!0,value:r(this.input,this.input)}:Hn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}};var Fo=require("util");var Ou={warn:ke("prisma:warn")},ku={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Br(e,...t){ku.warn()&&console.warn(`${Ou.warn} ${e}`,...t)}var Du=(0,Fo.promisify)(_o.default.exec),te=L("prisma:get-platform"),_u=["1.0.x","1.1.x","3.0.x"];async function Lo(){let e=Gr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Qr("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:t}}}if(e!=="linux")return{platform:e,arch:t};let r=await Lu(),n=await Uu(),i=Mu({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await $u(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function Fu(e){let t=/^ID="?([^"\n]*)"?$/im,r=/^ID_LIKE="?([^"\n]*)"?$/im,n=t.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=r.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=mt({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return te(`Found distro info: -${JSON.stringify(a,null,2)}`),a}async function Lu(){let e="/etc/os-release";try{let t=await zn.default.readFile(e,{encoding:"utf-8"});return Fu(t)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Nu(e){let t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){let r=`${t[1]}.x`;return No(r)}}function ko(e){let t=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(t){let r=`${t[1]}${t[2]??".0"}.x`;return No(r)}}function No(e){let t=(()=>{if($o(e))return e;let r=e.split(".");return r[1]="0",r.join(".")})();if(_u.includes(t))return t}function Mu(e){return mt(e).with({familyDistro:"musl"},()=>(te('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:t})=>(te('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${t}-linux-gnu`,`/lib/${t}-linux-gnu`])).with({familyDistro:"rhel"},()=>(te('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:t,arch:r,archFromUname:n})=>(te(`Don't know any platform-specific paths for "${t}" on ${r} (${n})`),[]))}async function $u(e){let t='grep -v "libssl.so.0"',r=await Do(e);if(r){te(`Found libssl.so file using platform-specific paths: ${r}`);let o=ko(r);if(te(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}te('Falling back to "ldconfig" and other generic paths');let n=await Qr(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${t}`);if(n||(n=await Do(["/lib64","/usr/lib64","/lib"])),n){te(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=ko(n);if(te(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Qr("openssl version -v");if(i){te(`Found openssl binary with version: ${i}`);let o=Nu(i);if(te(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return te("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Do(e){for(let t of e){let r=await qu(t);if(r)return r}}async function qu(e){try{return(await zn.default.readdir(e)).find(r=>r.startsWith("libssl.so.")&&!r.startsWith("libssl.so.0"))}catch(t){if(t.code==="ENOENT")return;throw t}}async function nt(){let{binaryTarget:e}=await Mo();return e}function ju(e){return e.binaryTarget!==void 0}async function Yn(){let{memoized:e,...t}=await Mo();return t}var Ur={};async function Mo(){if(ju(Ur))return Promise.resolve({...Ur,memoized:!0});let e=await Lo(),t=Vu(e);return Ur={...e,binaryTarget:t},{...Ur,memoized:!1}}function Vu(e){let{platform:t,arch:r,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;t==="linux"&&!["x64","arm64"].includes(r)&&Br(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${r}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(t==="linux"&&i===void 0){let c=mt({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Br(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". -${c}`)}let u="debian";if(t==="linux"&&o===void 0&&te(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),t==="darwin"&&r==="arm64")return"darwin-arm64";if(t==="darwin")return"darwin";if(t==="win32")return"windows";if(t==="freebsd")return o;if(t==="openbsd")return"openbsd";if(t==="netbsd")return"netbsd";if(t==="linux"&&o==="nixos")return"linux-nixos";if(t==="linux"&&r==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(t==="linux"&&r==="arm")return`linux-arm-openssl-${i||l}`;if(t==="linux"&&o==="musl"){let c="linux-musl";return!i||$o(i)?c:`${c}-openssl-${i}`}return t==="linux"&&o&&i?`${o}-openssl-${i}`:(t!=="linux"&&Br(`Prisma detected unknown OS "${t}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function Bu(e){try{return await e()}catch{return}}function Qr(e){return Bu(async()=>{let t=await Du(e);return te(`Command "${e}" successfully returned "${t.stdout}"`),t.stdout})}async function Uu(){return typeof Gr.default.machine=="function"?Gr.default.machine():(await Qr("uname -m"))?.trim()}function $o(e){return e.startsWith("1.")}var zo=k(Ko());function ii(e){return(0,zo.default)(e,e,{fallback:X})}var Ku=k(si());var $=k(require("path")),zu=k(si()),Lf=L("prisma:engines");function Yo(){return $.default.join(__dirname,"../")}var Nf="libquery-engine";$.default.join(__dirname,"../query-engine-darwin");$.default.join(__dirname,"../query-engine-darwin-arm64");$.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");$.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");$.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");$.default.join(__dirname,"../query-engine-linux-static-x64");$.default.join(__dirname,"../query-engine-linux-static-arm64");$.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");$.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");$.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");$.default.join(__dirname,"../libquery_engine-darwin.dylib.node");$.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");$.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");$.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");$.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");$.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");$.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");$.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");$.default.join(__dirname,"../libquery_engine-linux-musl.so.node");$.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");$.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");$.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");$.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");$.default.join(__dirname,"../query_engine-windows.dll.node");var ai=k(require("fs")),Zo=L("chmodPlusX");function li(e){if(process.platform==="win32")return;let t=ai.default.statSync(e),r=t.mode|64|8|1;if(t.mode===r){Zo(`Execution permissions of ${e} are fine`);return}let n=r.toString(8).slice(-3);Zo(`Have to call chmodPlusX on ${e}`),ai.default.chmodSync(e,n)}function ui(e){let t=e.e,r=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=t.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${ii("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Oe(e.id)}\`).`,s=mt({message:t.message,code:t.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${r("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${r("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${r("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} -${s} - -Details: ${t.message}`}var di=k(ts()),zr=k(require("fs"));var ht=k(require("path"));function rs(e){let t=e.ignoreProcessEnv?{}:process.env,r=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(t,p)?t[p]:e.parsed[p]||"",u=r(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(t,n)?t[n]:e.parsed[n];e.parsed[n]=r(i)}for(let n in e.parsed)t[n]=e.parsed[n];return e}var pi=L("prisma:tryLoadEnv");function zt({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=ns(e);r.conflictCheck!=="none"&&sc(n,t,r.conflictCheck);let i=null;return is(n?.path,t)||(i=ns(t)),!n&&!i&&pi("No Environment variables loaded"),i?.dotenvResult.error?console.error(ce(H("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` -`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function sc(e,t,r){let n=e?.dotenvResult.parsed,i=!is(e?.path,t);if(n&&t&&i&&zr.default.existsSync(t)){let o=di.default.parse(zr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=ht.default.relative(process.cwd(),e.path),l=ht.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${X(a)} and ${X(l)} -Conflicting env vars: -${s.map(c=>` ${H(c)}`).join(` -`)} - -We suggest to move the contents of ${X(l)} to ${X(a)} to consolidate your env vars. -`;throw new Error(u)}else if(r==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>H(c)).join(", ")} in ${X(a)} and ${X(l)} -Env vars from ${X(l)} overwrite the ones from ${X(a)} - `;console.warn(`${ke("warn(prisma)")} ${u}`)}}}}function ns(e){if(ac(e)){pi(`Environment variables loaded from ${e}`);let t=di.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:rs(t),message:Oe(`Environment variables loaded from ${ht.default.relative(process.cwd(),e)}`),path:e}}else pi(`Environment variables not found at ${e}`);return null}function is(e,t){return e&&t&&ht.default.resolve(e)===ht.default.resolve(t)}function ac(e){return!!(e&&zr.default.existsSync(e))}var os="library";function Yt(e){let t=lc();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":os)}function lc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var Je;(t=>{let e;(E=>(E.findUnique="findUnique",E.findUniqueOrThrow="findUniqueOrThrow",E.findFirst="findFirst",E.findFirstOrThrow="findFirstOrThrow",E.findMany="findMany",E.create="create",E.createMany="createMany",E.createManyAndReturn="createManyAndReturn",E.update="update",E.updateMany="updateMany",E.upsert="upsert",E.delete="delete",E.deleteMany="deleteMany",E.groupBy="groupBy",E.count="count",E.aggregate="aggregate",E.findRaw="findRaw",E.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Je||={});var Zt=k(require("path"));function mi(e){return Zt.default.sep===Zt.default.posix.sep?e:e.split(Zt.default.sep).join(Zt.default.posix.sep)}var ps=k(fi());function hi(e){return String(new gi(e))}var gi=class{constructor(t){this.config=t}toString(){let{config:t}=this,r=t.provider.fromEnvVar?`env("${t.provider.fromEnvVar}")`:t.provider.value,n=JSON.parse(JSON.stringify({provider:r,binaryTargets:cc(t.binaryTargets)}));return`generator ${t.name} { -${(0,ps.default)(pc(n),2)} -}`}};function cc(e){let t;if(e.length>0){let r=e.find(n=>n.fromEnvVar!==null);r?t=`env("${r.fromEnvVar}")`:t=e.map(n=>n.native?"native":n.value)}else t=void 0;return t}function pc(e){let t=Object.keys(e).reduce((r,n)=>Math.max(r,n.length),0);return Object.entries(e).map(([r,n])=>`${r.padEnd(t)} = ${dc(n)}`).join(` -`)}function dc(e){return JSON.parse(JSON.stringify(e,(t,r)=>Array.isArray(r)?`[${r.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(r)))}var er={};Ut(er,{error:()=>gc,info:()=>fc,log:()=>mc,query:()=>hc,should:()=>ds,tags:()=>Xt,warn:()=>yi});var Xt={error:ce("prisma:error"),warn:ke("prisma:warn"),info:De("prisma:info"),query:rt("prisma:query")},ds={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function mc(...e){console.log(...e)}function yi(e,...t){ds.warn()&&console.warn(`${Xt.warn} ${e}`,...t)}function fc(e,...t){console.info(`${Xt.info} ${e}`,...t)}function gc(e,...t){console.error(`${Xt.error} ${e}`,...t)}function hc(e,...t){console.log(`${Xt.query} ${e}`,...t)}function Yr(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function Fe(e,t){throw new Error(t)}function Ei(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var wi=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function yt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function xi(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ys.has(e)||(ys.add(e),yi(t,...r))};var V=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};w(V,"PrismaClientKnownRequestError");var Le=class extends V{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};w(Le,"NotFoundError");var R=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};w(R,"PrismaClientInitializationError");var le=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};w(le,"PrismaClientRustPanicError");var B=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};w(B,"PrismaClientUnknownRequestError");var J=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(J,"PrismaClientValidationError");var bt=9e15,ze=1e9,Pi="0123456789abcdef",tn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",rn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",vi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-bt,maxE:bt,crypto:!1},xs,Ne,x=!0,on="[DecimalError] ",Ke=on+"Invalid argument: ",Ps=on+"Precision limit exceeded",vs=on+"crypto unavailable",Ts="[object Decimal]",ee=Math.floor,G=Math.pow,bc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ec=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,wc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Rs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ge=1e7,b=7,xc=9007199254740991,Pc=tn.length-1,Ti=rn.length-1,m={toStringTag:Ts};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};m.comparedTo=m.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+b,n.rounding=1,r=vc(n,Os(n,r)),n.precision=e,n.rounding=t,y(Ne==2||Ne==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(x=!1,o=c.s*G(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=K(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=G(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new p(r),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=N(u.plus(c).times(a),u.plus(l),s+2,1),K(a.d).slice(0,s)===(r=K(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return x=!0,y(n,e,p.rounding,t)};m.decimalPlaces=m.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/b))*b,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};m.dividedBy=m.div=function(e){return N(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var t=this,r=t.constructor;return y(N(t,new r(e),0,1,1),r.precision,r.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var t=this.cmp(e);return t==1||t===0};m.hyperbolicCosine=m.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/an(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=Et(s,1,o.times(t),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=r,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Et(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/an(5,e)),i=Et(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,y(i,t,r,!0)};m.hyperbolicTangent=m.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,N(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};m.inverseCosine=m.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?fe(r,i,o):new r(0):new r(NaN):t.isZero()?fe(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=fe(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};m.inverseHyperbolicCosine=m.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,x=!1,r=r.times(r).minus(1).sqrt().plus(r),x=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};m.inverseHyperbolicSine=m.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,x=!1,r=r.times(r).plus(1).sqrt().plus(r),x=!0,n.precision=e,n.rounding=t,r.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,t,!0):(o.precision=r=n-i.e,i=N(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=fe(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Ti)return s=fe(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Ti)return s=fe(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,r=Math.min(28,a/b+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(x=!1,t=Math.ceil(a/b),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(x=!1,a=p+f,s=He(u,a),n=t?nn(c,a+10):He(e,a),l=N(s,n,a,1),rr(l.d,i=p,d))do if(a+=10,s=He(u,a),n=t?nn(c,a+10):He(e,a),l=N(s,n,a,1),!o){+K(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(rr(l.d,i+=10,d));return x=!0,y(l,p,d)};m.minus=m.sub=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return!f.s||!e.s?e=new g(NaN):f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=g.precision,l=g.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new g(f);else return new g(l===3?-0:0);return x?y(e,a,l):e}if(r=ee(e.e/b),c=ee(f.e/b),u=u.slice(),o=c-r,o){for(p=o<0,p?(t=u,o=-o,s=d.length):(t=d,r=c,s=u.length),n=Math.max(Math.ceil(a/b),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,r=c,c=u,u=r),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/ge|0,u[i]%=ge;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=sn(u,n),x?y(e,a,l):e};m.precision=m.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ke+e);return r.d?(t=Cs(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};m.round=function(){var e=this,t=e.constructor;return y(new t(e),e.e+1,t.rounding)};m.sine=m.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+b,n.rounding=1,r=Rc(n,Os(n,r)),n.precision=e,n.rounding=t,y(Ne>2?r.neg():r,e,t,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(x=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=K(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new c(t)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(o=n,n=o.plus(N(s,o,r+2,1)).times(.5),K(o.d).slice(0,r)===(t=K(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return x=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=N(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,y(Ne==2||Ne==4?r.neg():r,e,t,!0)):new n(NaN)};m.times=m.mul=function(e){var t,r,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(r=ee(c.e/b)+ee(e.e/b),l=d.length,u=f.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+t,o[i--]=a%ge|0,t=a/ge|0;o[i]=(o[i]+t)%ge|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=sn(o,r),x?y(e,p.precision,p.rounding):e};m.toBinary=function(e,t){return Si(this,2,e,t)};m.toDecimalPlaces=m.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ie(e,0,ze),t===void 0?t=n.rounding:ie(t,0,8),y(r,e+r.e+1,t))};m.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=we(n,!0):(ie(e,0,ze),t===void 0?t=i.rounding:ie(t,0,8),n=y(new i(n),e+1,t),r=we(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=we(i):(ie(e,0,ze),t===void 0?t=o.rounding:ie(t,0,8),n=y(new o(i),e+i.e+1,t),r=we(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};m.toFraction=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.d,h=f.constructor;if(!g)return new h(f);if(u=r=new h(1),n=l=new h(0),t=new h(n),o=t.e=Cs(g)-f.e-1,s=o%b,t.d[0]=G(10,s<0?b+s:s),e==null)e=o>0?t:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(Ke+a);e=a.gt(t)?o>0?t:u:a}for(x=!1,a=new h(K(g)),c=h.precision,h.precision=o=g.length*b*2;p=N(a,t,0,1,1),i=r.plus(p.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=t,t=a.minus(p.times(i)),a=i;return i=N(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=f.s,d=N(u,n,o,1).minus(f).abs().cmp(N(l,r,o,1).minus(f).abs())<1?[u,n]:[l,r],h.precision=c,x=!0,d};m.toHexadecimal=m.toHex=function(e,t){return Si(this,16,e,t)};m.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ie(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(x=!1,r=N(r,e,0,t,1).times(e),x=!0,y(r)):(e.s=r.s,r=e),r};m.toNumber=function(){return+this};m.toOctal=function(e,t){return Si(this,8,e,t)};m.toPower=m.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(G(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(t=ee(e.e/b),t>=e.d.length-1&&(r=u<0?-u:u)<=xc)return i=Ss(l,a,r,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(x=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Ri(e.times(He(a,n+r)),n),i.d&&(i=y(i,n+5,1),rr(i.d,n,o)&&(t=n+10,i=y(Ri(e.times(He(a,t+r)),t),t+5,1),+K(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,x=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=we(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,ze),t===void 0?t=i.rounding:ie(t,0,8),n=y(new i(n),e,t),r=we(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toSignificantDigits=m.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ie(e,1,ze),t===void 0?t=n.rounding:ie(t,0,8)),y(new n(r),e,t)};m.toString=function(){var e=this,t=e.constructor,r=we(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,t=e.constructor,r=we(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function K(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Ke+e)}function rr(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=b,i=0):(i=Math.ceil((t+1)/b),t%=b),o=G(10,b-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==G(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==G(10,t-3)-1,s}function en(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function vc(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/an(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=Et(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var N=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,g,h,O,T,S,C,E,me,ae,Bt,U,ne,Ie,z,dt,Lr=n.constructor,qn=n.s==i.s?1:-1,Y=n.d,_=i.d;if(!Y||!Y[0]||!_||!_[0])return new Lr(!n.s||!i.s||(Y?_&&Y[0]==_[0]:!_)?NaN:Y&&Y[0]==0||!_?qn*0:qn/0);for(l?(f=1,c=n.e-i.e):(l=ge,f=b,c=ee(n.e/f)-ee(i.e/f)),z=_.length,ne=Y.length,T=new Lr(qn),S=T.d=[],p=0;_[p]==(Y[p]||0);p++);if(_[p]>(Y[p]||0)&&c--,o==null?(ae=o=Lr.precision,s=Lr.rounding):a?ae=o+(n.e-i.e)+1:ae=o,ae<0)S.push(1),g=!0;else{if(ae=ae/f+2|0,p=0,z==1){for(d=0,_=_[0],ae++;(p1&&(_=e(_,d,l),Y=e(Y,d,l),z=_.length,ne=Y.length),U=z,C=Y.slice(0,z),E=C.length;E=l/2&&++Ie;do d=0,u=t(_,C,z,E),u<0?(me=C[0],z!=E&&(me=me*l+(C[1]||0)),d=me/Ie|0,d>1?(d>=l&&(d=l-1),h=e(_,d,l),O=h.length,E=C.length,u=t(h,C,O,E),u==1&&(d--,r(h,z=10;d/=10)p++;T.e=p+c*f-1,y(T,a?o+T.e+1:o,s,g)}return T}}();function y(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(t!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=b,s=t,c=p[d=0],l=c/G(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/b),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=b,s=o-b+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=b,s=o-b+i,l=s<0?0:c/G(10,i-s-1)%10|0}if(n=n||t<0||p[d+1]!==void 0||(s<0?c:c%G(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?c/G(10,i-s):0:p[d-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,u?(t-=e.e+1,p[0]=G(10,(b-t%b)%b),e.e=-t||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=G(10,b-o),p[d]=s>0?(c/G(10,i-s)%G(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==ge&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=ge)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return x&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+We(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+We(-i-1)+o,r&&(n=r-s)>0&&(o+=We(n))):i>=s?(o+=We(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+We(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=We(n))),o}function sn(e,t){var r=e[0];for(t*=b;r>=10;r/=10)t++;return t}function nn(e,t,r){if(t>Pc)throw x=!0,r&&(e.precision=r),Error(Ps);return y(new e(tn),t,1,!0)}function fe(e,t,r){if(t>Ti)throw Error(Ps);return y(new e(rn),t,r,!0)}function Cs(e){var t=e.length-1,r=t*b+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function We(e){for(var t="";e--;)t+="0";return t}function Ss(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/b+4);for(x=!1;;){if(r%2&&(o=o.times(t),Es(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Es(t.d,s)}return x=!0,o}function bs(e){return e.d[e.d.length-1]&1}function As(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(x=!1,l=g):l=t,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(G(2,p))/Math.LN10*2+5|0,l+=n,r=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),r=r.times(++c),a=s.plus(N(o,r,l,1)),K(a.d).slice(0,l)===K(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(t==null)if(u<3&&rr(s.d,l-n,f,u))d.precision=l+=10,r=o=a=new d(1),c=0,u++;else return y(s,d.precision=g,f,x=!0);else return d.precision=g,s}s=a}}function He(e,t){var r,n,i,o,s,a,l,u,c,p,d,f=1,g=10,h=e,O=h.d,T=h.constructor,S=T.rounding,C=T.precision;if(h.s<0||!O||!O[0]||!h.e&&O[0]==1&&O.length==1)return new T(O&&!O[0]?-1/0:h.s!=1?NaN:O?0:h);if(t==null?(x=!1,c=C):c=t,T.precision=c+=g,r=K(O),n=r.charAt(0),Math.abs(o=h.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=K(h.d),n=r.charAt(0),f++;o=h.e,n>1?(h=new T("0."+r),o++):h=new T(n+"."+r.slice(1))}else return u=nn(T,c+2,C).times(o+""),h=He(new T(n+"."+r.slice(1)),c-g).plus(u),T.precision=C,t==null?y(h,C,S,x=!0):h;for(p=h,l=s=h=N(h.minus(1),h.plus(1),c,1),d=y(h.times(h),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(N(s,new T(i),c,1)),K(u.d).slice(0,c)===K(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(nn(T,c+2,C).times(o+""))),l=N(l,new T(f),c,1),t==null)if(rr(l.d,c-g,S,a))T.precision=c+=g,u=s=h=N(p.minus(1),p.plus(1),c,1),d=y(h.times(h),c,1),i=a=1;else return y(l,T.precision=C,S,x=!0);else return T.precision=C,l;l=u,i+=2}}function Is(e){return String(e.s*e.s/0)}function Ci(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%b,r<0&&(n+=b),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Rs.test(t))return Ci(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ec.test(t))r=16,t=t.toLowerCase();else if(bc.test(t))r=2;else if(wc.test(t))r=8;else throw Error(Ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=Ss(n,new n(r),o,o*2)),u=en(t,r,ge),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=sn(u,c),e.d=u,x=!1,s&&(e=N(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?G(2,l):it.pow(2,l))),x=!0,e)}function Rc(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Et(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/an(5,r)),t=Et(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function Et(e,t,r,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/b);for(x=!1,l=r.times(r),a=new e(n);;){if(s=N(a.times(l),new e(t++*t++),c,1),a=i?n.plus(s):n.minus(s),n=N(s.times(l),new e(t++*t++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return x=!0,s.d.length=p+1,s}function an(e,t){for(var r=e;--t;)r*=e;return r}function Os(e,t){var r,n=t.s<0,i=fe(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ne=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ne=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ne=bs(r)?n?2:3:n?4:1,t;Ne=bs(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Si(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,g=r!==void 0;if(g?(ie(r,1,ze),n===void 0?n=f.rounding:ie(n,0,8)):(r=f.precision,n=f.rounding),!e.isFinite())c=Is(e);else{for(c=we(e),s=c.indexOf("."),g?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=en(we(d),10,i),d.e=d.d.length),p=en(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=g?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=N(e,d,r,n,0,i),p=e.d,o=e.e,u=xs),s=p[r],a=i/2,u=u||p[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[r-1]&1||n===(e.s<0?8:7)),p.length=r,u)for(;++p[--r]>i-1;)p[r]=0,r||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)c+="0";for(p=en(c,i,t),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else ot)return e.length=t,!0}function Cc(e){return new this(e).abs()}function Sc(e){return new this(e).acos()}function Ac(e){return new this(e).acosh()}function Ic(e,t){return new this(e).plus(t)}function Oc(e){return new this(e).asin()}function kc(e){return new this(e).asinh()}function Dc(e){return new this(e).atan()}function _c(e){return new this(e).atanh()}function Fc(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=fe(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?fe(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=fe(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(N(e,t,o,1)),t=fe(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(N(e,t,o,1)),r}function Lc(e){return new this(e).cbrt()}function Nc(e){return y(e=new this(e),e.e+1,2)}function Mc(e,t,r){return new this(e).clamp(t,r)}function $c(e){if(!e||typeof e!="object")throw Error(on+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,ze,"rounding",0,8,"toExpNeg",-bt,0,"toExpPos",0,bt,"maxE",0,bt,"minE",-bt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Ke+r+": "+n);if(r="crypto",i&&(this[r]=vi[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(vs);else this[r]=!1;else throw Error(Ke+r+": "+n);return this}function qc(e){return new this(e).cos()}function jc(e){return new this(e).cosh()}function ks(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,ws(o)){u.s=o.s,x?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;x?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(vs);else for(;o=10;i/=10)n++;nH(rt(e)),punctuation:rt,directive:De,function:De,variable:e=>H(rt(e)),string:e=>H(qe(e)),boolean:ke,number:De,comment:Gt};var mp=e=>e,un={},fp=0,P={manual:un.Prism&&un.Prism.manual,disableWorkerMessageHandler:un.Prism&&un.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof he){let t=e;return new he(t.type,P.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(P.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ie instanceof he)continue;if(me&&U!=t.length-1){S.lastIndex=ne;var p=S.exec(e);if(!p)break;var c=p.index+(E?p[1].length:0),d=p.index+p[0].length,a=U,l=ne;for(let _=t.length;a<_&&(l=l&&(++U,ne=l);if(t[U]instanceof he)continue;u=a-U,Ie=e.slice(ne,l),p.index-=ne}else{S.lastIndex=0;var p=S.exec(Ie),u=1}if(!p){if(o)break;continue}E&&(ae=p[1]?p[1].length:0);var c=p.index+ae,p=p[0].slice(ae),d=c+p.length,f=Ie.slice(0,c),g=Ie.slice(d);let z=[U,u];f&&(++U,ne+=f.length,z.push(f));let dt=new he(h,C?P.tokenize(p,C):p,Bt,p,me);if(z.push(dt),g&&z.push(g),Array.prototype.splice.apply(t,z),u!=1&&P.matchGrammar(e,t,r,U,ne,!0,h),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return P.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=P.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=P.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:he};P.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};P.languages.javascript=P.languages.extend("clike",{"class-name":[P.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});P.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;P.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:P.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:P.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:P.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:P.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});P.languages.markup&&P.languages.markup.tag.addInlined("script","javascript");P.languages.js=P.languages.javascript;P.languages.typescript=P.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});P.languages.ts=P.languages.typescript;function he(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}he.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return he.stringify(r,t)}).join(""):gp(e.type)(e.content)};function gp(e){return Ds[e]||mp}function _s(e){return hp(e,P.languages.javascript)}function hp(e,t){return P.tokenize(e,t).map(n=>he.stringify(n)).join("")}var Fs=k(us());function Ls(e){return(0,Fs.default)(e)}var cn=class e{static read(t){let r;try{r=Ns.default.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,Ls(n).split(` -`))}highlight(){let t=_s(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var yp={red:ce,gray:Gt,dim:Oe,bold:H,underline:X,highlightSource:e=>e.highlight()},bp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ep({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function wp({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Ep({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=cn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Pp(c),d=xp(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,g=>g.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((g,h)=>o.gray(String(h).padStart(f))+" "+g).mapLines(g=>o.dim(g)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let g=p+f+1;g+=2,s.callArguments=(0,Ms.default)(i,g).slice(g)}}return s}function xp(e){let t=Object.keys(Je.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Pp(e){let t=0;for(let r=0;r"Unknown error")}function Bs(e){return e.errors.flatMap(t=>t.kind==="Union"?Bs(t):[t])}function Rp(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Cp(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Cp(e,t){return[...new Set(e.concat(t))]}function Sp(e){return xi(e,(t,r)=>{let n=qs(t),i=qs(r);return n!==i?n-i:js(t)-js(r)})}function qs(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function js(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var ue=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};var Rt=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};var dn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var mn=e=>e,fn={bold:mn,red:mn,green:mn,dim:mn,enabled:!1},Us={bold:H,red:ce,green:qe,dim:Oe,enabled:!0},Ct={write(e){e.writeLine(",")}};var Pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};var Ye=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var St=class extends Ye{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new dn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new Pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Ct,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var At=class e extends Ye{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof St&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new Pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Ct,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var W=class extends Ye{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var nr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Ct,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function pn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Ip(e,t);break;case"IncludeOnScalar":Op(e,t);break;case"EmptySelection":kp(e,t,r);break;case"UnknownSelectionField":Lp(e,t);break;case"InvalidSelectionValue":Np(e,t);break;case"UnknownArgument":Mp(e,t);break;case"UnknownInputField":$p(e,t);break;case"RequiredArgumentMissing":qp(e,t);break;case"InvalidArgumentType":jp(e,t);break;case"InvalidArgumentValue":Vp(e,t);break;case"ValueTooLarge":Bp(e,t);break;case"SomeFieldsMissing":Up(e,t);break;case"TooManyFieldsGiven":Gp(e,t);break;case"Union":Vs(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Ip(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Op(e,t){let[r,n]=ir(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${or(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function kp(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Dp(e,t,i);return}if(n.hasField("select")){_p(e,t);return}}if(r?.[xt(e.outputType.name)]){Fp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Dp(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ue(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function _p(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ws(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${or(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Fp(e,t){let r=new nr;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ue("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ir(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new At;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Lp(e,t){let r=Hs(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Ws(n,e.outputType);break;case"include":Qp(n,e.outputType);break;case"omit":Jp(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(or(n)),i.join(" ")})}function Np(e,t){let r=Hs(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Mp(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Wp(n,e.arguments)),t.addErrorMessage(i=>Qs(i,r,e.arguments.map(o=>o.name)))}function $p(e,t){let[r,n]=ir(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ks(o,e.inputType)}t.addErrorMessage(o=>Qs(o,n,e.inputType.fields.map(s=>s.name)))}function Qs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Kp(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(or(e)),n.join(" ")}function qp(e,t){let r;t.addErrorMessage(l=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ir(e.argumentPath),s=new nr,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(Js).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}}function Js(e){return e.kind==="list"?`${Js(e.elementType)}[]`:e.name}function jp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=gn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Vp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=gn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Bp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Up(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ks(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${gn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(or(i)),o.join(" ")})}function Gp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${gn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ws(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function Qp(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function Jp(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function Wp(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function Hs(e,t){let[r,n]=ir(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ks(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function ir(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function or({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function gn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Hp=3;function Kp(e,t){let r=1/0,n;for(let i of t){let o=(0,Gs.default)(e,i);o>Hp||o`}};function It(e){return e instanceof sr}var hn=Symbol(),Ii=new WeakMap,Me=class{constructor(t){t===hn?Ii.set(this,`Prisma.${this._getName()}`):Ii.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ii.get(this)}},ar=class extends Me{_getNamespace(){return"NullTypes"}},lr=class extends ar{};Oi(lr,"DbNull");var ur=class extends ar{};Oi(ur,"JsonNull");var cr=class extends ar{};Oi(cr,"AnyNull");var yn={classes:{DbNull:lr,JsonNull:ur,AnyNull:cr},instances:{DbNull:new lr(hn),JsonNull:new ur(hn),AnyNull:new cr(hn)}};function Oi(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var Ys=": ",bn=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ys.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Ys).write(this.value)}};var ki=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function Ot(e){return new ki(Zs(e))}function Zs(e){let t=new At;for(let[r,n]of Object.entries(e)){let i=new bn(r,Xs(n));t.addField(i)}return t}function Xs(e){if(typeof e=="string")return new W(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new W(String(e));if(typeof e=="bigint")return new W(`${e}n`);if(e===null)return new W("null");if(e===void 0)return new W("undefined");if(vt(e))return new W(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new W(`Buffer.alloc(${e.byteLength})`):new W(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=ln(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof Me?new W(`Prisma.${e._getName()}`):It(e)?new W(`prisma.${zs(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?zp(e):typeof e=="object"?Zs(e):new W(Object.prototype.toString.call(e))}function zp(e){let t=new St;for(let r of e)t.addItem(Xs(r));return t}function En(e,t){let r=t==="pretty"?Us:fn,n=e.renderAllMessages(r),i=new Rt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function wn({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ot(e);for(let p of t)pn(p,a,s);let{message:l,args:u}=En(a,r),c=Tt({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new J(c,{clientVersion:o})}var ve=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};function pr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Te(e){return e.replace(/^./,t=>t.toLowerCase())}function ta(e,t,r){let n=Te(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Yp({...e,...ea(t.name,e,t.result.$allModels),...ea(t.name,e,t.result[n])})}function Yp(e){let t=new ve,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return yt(e,n=>({...n,needs:r(n.name,new Set)}))}function ea(e,t,r){return r?yt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Zp(t,o,i)})):{}}function Zp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ra(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function na(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var xn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ve;this.modelExtensionsCache=new ve;this.queryCallbacksCache=new ve;this.clientExtensions=pr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=pr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ta(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Te(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},kt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new xn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new xn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var ia=Symbol(),dr=class{constructor(t){if(t!==ia)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Pn:t}},Pn=new dr(ia);function Re(e){return e instanceof dr}var Xp={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},oa="explicitly `undefined` values are not allowed";function vn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=kt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new Di({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:Xp[t],query:mr(r,p)}}function mr({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:aa(r,n),selection:ed(e,t,i,n)}}function ed(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),id(e,n)):td(n,t,r)}function td(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&rd(n,t,e),e.isPreviewFeatureOn("omitApi")&&nd(n,r,e),n}function rd(e,t,r){for(let[n,i]of Object.entries(t)){if(Re(i))continue;let o=r.nestSelection(n);if(_i(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=mr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=mr(i,o)}}function nd(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=na(i,n);for(let[s,a]of Object.entries(o)){if(Re(a))continue;_i(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function id(e,t){let r={},n=t.getComputedFields(),i=ra(e,n);for(let[o,s]of Object.entries(i)){if(Re(s))continue;let a=t.nestSelection(o);_i(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Re(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=mr({},a):r[o]=!0;continue}r[o]=mr(s,a)}}return r}function sa(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Pt(e)){if(ln(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(It(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return od(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:Buffer.from(e).toString("base64")};if(sd(e))return e.values;if(vt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==yn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(ad(e))return e.toJSON();if(typeof e=="object")return aa(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function aa(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Re(i)||(i!==void 0?r[n]=sa(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:oa}))}return r}function od(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[xt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Fe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};var Dt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};function la(e){return{models:Fi(e.models),enums:Fi(e.enums),types:Fi(e.types)}}function Fi(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function ua(e,t){let r=pr(()=>ld(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ld(e){return{datamodel:{models:Li(e.models),enums:Li(e.enums),types:Li(e.types)}}}function Li(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}var Ni=new WeakMap,Tn="$$PrismaTypedSql",Mi=class{constructor(t,r){Ni.set(this,{sql:t,values:r}),Object.defineProperty(this,Tn,{value:Tn})}get sql(){return Ni.get(this).sql}get values(){return Ni.get(this).values}};function ca(e){return(...t)=>new Mi(e,t)}function pa(e){return e!=null&&e[Tn]===Tn}function fr(e){return{ok:!1,error:e,map(){return fr(e)},flatMap(){return fr(e)}}}var $i=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},qi=e=>{let t=new $i,r=Ce(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ce(t,e.queryRaw.bind(e)),executeRaw:Ce(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>ud(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=pd(t,e.getConnectionInfo.bind(e))),n},ud=(e,t)=>{let r=Ce(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>cd(e,o))}},cd=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),commit:Ce(e,t.commit.bind(t)),rollback:Ce(e,t.rollback.bind(t))});function Ce(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return fr({kind:"GenericJs",id:i})}}}function pd(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return fr({kind:"GenericJs",id:i})}}}var Wl=k(oi());var Hl=require("async_hooks"),Kl=require("events"),zl=k(require("fs")),Fr=k(require("path"));var oe=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}var Rn={enumerable:!0,configurable:!0,writable:!0};function Cn(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Rn,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var fa=Symbol.for("nodejs.util.inspect.custom");function Se(e,t){let r=dd(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=ga(Reflect.ownKeys(o),r),a=ga(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Rn,...l?.getPropertyDescriptor(s)}:Rn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[fa]=function(){let o={...this};return delete o[fa],o},i}function dd(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function ga(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}function _t(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Ft(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}function ha(e){if(e===void 0)return"";let t=Ot(e);return new Rt(0,{colors:fn}).write(t).toString()}var md="P2037";function st({error:e,user_facing_error:t},r,n){return t.error_code?new V(fd(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new B(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function fd(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===md&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}var hr="";function ya(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=yd(n)||Ed(n)||Pd(n)||Cd(n)||Td(n);return i&&r.push(i),r},[])}var gd=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hd=/\((\S*)(?::(\d+))(?::(\d+))\)/;function yd(e){var t=gd.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=hd.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||hr,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var bd=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Ed(e){var t=bd.exec(e);return t?{file:t[2],methodName:t[1]||hr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var wd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,xd=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Pd(e){var t=wd.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=xd.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||hr,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var vd=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Td(e){var t=vd.exec(e);return t?{file:t[3],methodName:t[1]||hr,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var Rd=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Cd(e){var t=Rd.exec(e);return t?{file:t[2],methodName:t[1]||hr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Bi=class{getLocation(){return null}},Ui=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ya(t).find(i=>{if(!i.file)return!1;let o=mi(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ze(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Bi:new Ui}var ba={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Lt(e={}){let t=Ad(e);return Object.entries(t).reduce((n,[i,o])=>(ba[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ad(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Sn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Ea(e,t){let r=Sn(e);return t({action:"aggregate",unpacker:r,argsMapper:Lt})(e)}function Id(e={}){let{select:t,...r}=e;return typeof t=="object"?Lt({...r,_count:t}):Lt({...r,_count:{_all:!0}})}function Od(e={}){return typeof e.select=="object"?t=>Sn(e)(t)._count:t=>Sn(e)(t)._count._all}function wa(e,t){return t({action:"count",unpacker:Od(e),argsMapper:Id})(e)}function kd(e={}){let t=Lt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Dd(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function xa(e,t){return t({action:"groupBy",unpacker:Dd(e),argsMapper:kd})(e)}function Pa(e,t,r){if(t==="aggregate")return n=>Ea(n,r);if(t==="count")return n=>wa(n,r);if(t==="groupBy")return n=>xa(n,r)}function va(e,t){let r=t.fields.filter(i=>!i.relationName),n=wi(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new sr(e,o,s.type,s.isList,s.kind==="enum")},...Cn(Object.keys(n))})}var Ta=e=>Array.isArray(e)?e:e.split("."),Gi=(e,t)=>Ta(t).reduce((r,n)=>r&&r[n],e),Ra=(e,t,r)=>Ta(t).reduceRight((n,i,o,s)=>Object.assign({},Gi(e,s.slice(0,o)),{[i]:n}),r);function _d(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Fd(e,t,r){return t===void 0?e??{}:Ra(t,r,e||!0)}function Qi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=_d(n,i),p=Fd(l,o,c),d=r({dataPath:c,callsite:u})(p),f=Ld(e,t);return new Proxy(d,{get(g,h){if(!f.includes(h))return g[h];let T=[a[h].type,r,h],S=[c,p];return Qi(e,...T,...S)},...Cn([...f,...Object.getOwnPropertyNames(d)])})}}function Ld(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}function Ca(e,t,r,n){return e===Je.ModelAction.findFirstOrThrow||e===Je.ModelAction.findUniqueOrThrow?Nd(t,r,n):n}function Nd(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=Tt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new J(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof V&&o.code==="P2025"?new Le(`No ${e} found`,t):o})}}var Md=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],$d=["aggregate","count","groupBy"];function Ji(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[qd(e,t),Vd(e,t),gr(r),re("name",()=>t),re("$name",()=>t),re("$parent",()=>e._appliedParent)];return Se({},n)}function qd(e,t){let r=Te(t),n=Object.keys(Je.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Ca(o,t,e._clientVersion,s);let a=l=>u=>{let c=Ze(e._errorFormat);return e._createPrismaPromise(p=>{let d={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:p,callsite:c};return s({...d,...l})})};return Md.includes(o)?Qi(e,t,a):jd(i)?Pa(e,i,a):a({})}}}function jd(e){return $d.includes(e)}function Vd(e,t){return ot(re("fields",()=>{let r=e._runtimeDataModel.models[t];return va(t,r)}))}function Sa(e){return e.replace(/^./,t=>t.toUpperCase())}var Wi=Symbol();function yr(e){let t=[Bd(e),re(Wi,()=>e),re("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(gr(r)),Se(e,t)}function Bd(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Te),n=[...new Set(t.concat(r))];return ot({getKeys(){return n},getPropertyValue(i){let o=Sa(i);if(e._runtimeDataModel.models[o]!==void 0)return Ji(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Ji(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Aa(e){return e[Wi]?e[Wi]:e}function Ia(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return yr(t)}function Oa({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(_t(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(c=>!r[c]);u.length>0&&a.push(_t(u))}Ud(e,l.needs)&&s.push(Gd(l,Se(e,s)))}return s.length>0||a.length>0?Se(e,[...s,...a]):e}function Ud(e,t){return t.every(r=>Ei(e,r))}function Gd(e,t){return ot(re(e.name,()=>e.compute(t)))}function An({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=An({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Da({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:An({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Te(l);return Oa({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}function _a(e){if(e instanceof oe)return Qd(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:_a(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=qa(o,l),a.args=s,La(e,a,r,n+1)}})})}function Na(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return La(e,t,s)}function Ma(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?$a(r,n,0,e):e(r)}}function $a(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=qa(i,l),$a(a,t,r+1,n)}})}var Fa=e=>e;function qa(e=Fa,t=Fa){return r=>e(t(r))}var ja=L("prisma:client"),Va={Vercel:"vercel","Netlify CI":"netlify"};function Ba({postinstall:e,ciName:t,clientVersion:r}){if(ja("checkPlatformCaching:postinstall",e),ja("checkPlatformCaching:ciName",t),e===!0&&t&&t in Va){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Va[t]}-build`;throw console.error(n),new R(n,r)}}function Ua(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}var Jd="Cloudflare-Workers",Wd="node";function Ga(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Jd?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Wd?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Hd={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function In(){let e=Ga();return{id:e,prettyName:Hd[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var Ka=k(require("fs")),Er=k(require("path"));function On(e){let{runtimeBinaryTarget:t}=e;return`Add "${t}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: - -${Kd(e)}`}function Kd(e){let{generator:t,generatorBinaryTargets:r,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...r,i];return hi({...t,binaryTargets:o})}function Xe(e){let{runtimeBinaryTarget:t}=e;return`Prisma Client could not locate the Query Engine for runtime "${t}".`}function et(e){let{searchedLocations:t}=e;return`The following locations have been searched: -${[...new Set(t)].map(i=>` ${i}`).join(` -`)}`}function Qa(e){let{runtimeBinaryTarget:t}=e;return`${Xe(e)} - -This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${t}". -${On(e)} - -${et(e)}`}function kn(e){return`We would appreciate if you could take the time to share some information with us. -Please help us by answering a few questions: https://pris.ly/${e}`}function Dn(e){let{errorStack:t}=e;return t?.match(/\/\.next|\/next@|\/next\//)?` - -We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function Ja(e){let{queryEngineName:t}=e;return`${Xe(e)}${Dn(e)} - -This is likely caused by a bundler that has not copied "${t}" next to the resulting bundle. -Ensure that "${t}" has been copied next to the bundle or in "${e.expectedLocation}". - -${kn("engine-not-found-bundler-investigation")} - -${et(e)}`}function Wa(e){let{runtimeBinaryTarget:t,generatorBinaryTargets:r}=e,n=r.find(i=>i.native);return`${Xe(e)} - -This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${t}". -${On(e)} - -${et(e)}`}function Ha(e){let{queryEngineName:t}=e;return`${Xe(e)}${Dn(e)} - -This is likely caused by tooling that has not copied "${t}" to the deployment folder. -Ensure that you ran \`prisma generate\` and that "${t}" has been copied to "${e.expectedLocation}". - -${kn("engine-not-found-tooling-investigation")} - -${et(e)}`}var zd=L("prisma:client:engines:resolveEnginePath"),Yd=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function za(e,t){let r={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??t.prismaPath;if(r!==void 0)return r;let{enginePath:n,searchedLocations:i}=await Zd(e,t);if(zd("enginePath",n),n!==void 0&&e==="binary"&&li(n),n!==void 0)return t.prismaPath=n;let o=await nt(),s=t.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(Yd())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:t.generator,runtimeBinaryTarget:o,queryEngineName:Ya(e,o),expectedLocation:Er.default.relative(process.cwd(),t.dirname),errorStack:new Error().stack},p;throw a&&l?p=Wa(c):l?p=Qa(c):u?p=Ja(c):p=Ha(c),new R(p,t.clientVersion)}async function Zd(engineType,config){let binaryTarget=await nt(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,Er.default.resolve(dirname,".."),config.generator?.output?.value??dirname,Er.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(Yo());for(let e of searchLocations){let t=Ya(engineType,binaryTarget),r=Er.default.join(e,t);if(searchedLocations.push(e),Ka.default.existsSync(r))return{enginePath:r,searchedLocations}}return{enginePath:void 0,searchedLocations}}function Ya(e,t){return e==="library"?qr(t,"fs"):`query-engine-${t}${t==="windows"?".exe":""}`}var Hi=k(bi());function Za(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}function Xa(e){return e.split(` -`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}var el=k(hs());function tl({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,el.default)({user:t,repo:r,template:n,title:e,body:i})}function rl({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=So(6e3-(s?.length??0)),l=Xa((0,Hi.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",c=(0,Hi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${process.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?Za(s):""} -\`\`\` -`),p=tl({title:r,body:c});return`${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${X(p)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}function Nt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new R(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new R("error: Missing URL environment variable, value, or override.",n);return i}var _n=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends _n{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};function A(e,t){return{...e,isRetryable:t}}var Mt=class extends se{constructor(r){super("This request must be retried",A(r,!0));this.name="ForcedRetryError";this.code="P5001"}};w(Mt,"ForcedRetryError");var at=class extends se{constructor(r,n){super(r,A(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};w(at,"InvalidDatasourceError");var lt=class extends se{constructor(r,n){super(r,A(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};w(lt,"NotImplementedYetError");var q=class extends se{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var ut=class extends q{constructor(r){super("Schema needs to be uploaded",A(r,!0));this.name="SchemaMissingError";this.code="P5005"}};w(ut,"SchemaMissingError");var Ki="This request could not be understood by the server",wr=class extends q{constructor(r,n,i){super(n||Ki,A(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};w(wr,"BadRequestError");var xr=class extends q{constructor(r,n){super("Engine not started: healthcheck timeout",A(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};w(xr,"HealthcheckTimeoutError");var Pr=class extends q{constructor(r,n,i){super(n,A(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};w(Pr,"EngineStartupError");var vr=class extends q{constructor(r){super("Engine version is not supported",A(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};w(vr,"EngineVersionNotSupportedError");var zi="Request timed out",Tr=class extends q{constructor(r,n=zi){super(n,A(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};w(Tr,"GatewayTimeoutError");var Xd="Interactive transaction error",Rr=class extends q{constructor(r,n=Xd){super(n,A(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};w(Rr,"InteractiveTransactionError");var em="Request parameters are invalid",Cr=class extends q{constructor(r,n=em){super(n,A(r,!1));this.name="InvalidRequestError";this.code="P5011"}};w(Cr,"InvalidRequestError");var Yi="Requested resource does not exist",Sr=class extends q{constructor(r,n=Yi){super(n,A(r,!1));this.name="NotFoundError";this.code="P5003"}};w(Sr,"NotFoundError");var Zi="Unknown server error",$t=class extends q{constructor(r,n,i){super(n||Zi,A(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};w($t,"ServerError");var Xi="Unauthorized, check your connection string",Ar=class extends q{constructor(r,n=Xi){super(n,A(r,!1));this.name="UnauthorizedError";this.code="P5007"}};w(Ar,"UnauthorizedError");var eo="Usage exceeded, retry again later",Ir=class extends q{constructor(r,n=eo){super(n,A(r,!0));this.name="UsageExceededError";this.code="P5008"}};w(Ir,"UsageExceededError");async function tm(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Or(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await tm(e);if(n.type==="QueryEngineError")throw new V(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new $t(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new ut(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new vr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Pr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new R(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new xr(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Rr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Cr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Ar(r,qt(Xi,n));if(e.status===404)return new Sr(r,qt(Yi,n));if(e.status===429)throw new Ir(r,qt(eo,n));if(e.status===504)throw new Tr(r,qt(zi,n));if(e.status>=500)throw new $t(r,qt(Zi,n));if(e.status>=400)throw new wr(r,qt(Ki,n))}function qt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}function nl(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function il(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,r+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=t[o],s=(c&252)>>2,a=(c&3)<<4,r+=$e[s]+$e[a]+"=="):i==2&&(c=t[o]<<8|t[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,r+=$e[s]+$e[a]+$e[l]+"="),r}function ol(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new R("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function rm(e){return e[0]*1e3+e[1]/1e6}function sl(e){return new Date(rm(e))}var al={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var kr=class extends se{constructor(r,n){super(`Cannot fetch data from service: -${r}`,A(n,!0));this.name="RequestError";this.code="P5010"}};w(kr,"RequestError");async function ct(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(to)(e,t)}catch(i){let o=i.message??"Unknown error";throw new kr(o,{clientVersion:n})}}function im(e){return{...e.headers,"Content-Type":"application/json"}}function om(e){return{method:e.method,headers:im(e)}}function sm(e,t){return{text:()=>Promise.resolve(Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new ro(t.headers)}}async function to(e,t={}){let r=am("https"),n=om(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{let l=r.request(e,n,u=>{let{statusCode:c,headers:{location:p}}=u;c>=301&&c<=399&&p&&(p.startsWith("http")===!1?s(to(`${o}${p}`,t)):s(to(p,t))),u.on("data",d=>i.push(d)),u.on("end",()=>s(sm(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var am=typeof require<"u"?require:()=>{},ro=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){return this.headers.get(t)??null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var lm=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ll=L("prisma:client:dataproxyEngine");async function um(e,t){let r=al["@prisma/engines-version"],n=t.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&lm.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,u]=s.split("."),c=cm(`<=${a}.${l}.${u}`),p=await ct(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();ll("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(g){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),g}return f.version}throw new lt("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ul(e,t){let r=await um(e,t);return ll("version",r),r}function cm(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var cl=3,no=L("prisma:client:dataproxyEngine"),io=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},Dr=class{constructor(t){this.name="DataProxyEngine";ol(t),this.config=t,this.env={...t.env,...typeof process<"u"?process.env:{}},this.inlineSchema=il(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new io({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ul(t,this.config),no("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let n=typeof r.attributes.query=="string"?r.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[i]=n.split("/* traceparent");n=i}this.logEmitter.emit("query",{query:n,timestamp:sl(r.timestamp),duration:Number(r.attributes.duration_ms),params:r.attributes.params,target:r.attributes.target})}}}),t?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ct(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||no("schema response status",r.status);let n=await Or(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Ft(t,n),{batchResult:a,elapsed:l}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(u=>"errors"in u&&u.errors.length>0?st(u.errors[0],this.clientVersion,this.config.activeProvider):{data:u,elapsed:l})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||no("graphql response status",a.status),await this.handleError(await Or(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?st(l.errors[0],this.config.clientVersion,this.config.activeProvider):new B(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await ct(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Or(l,this.clientVersion));let u=await l.json(),c=u.extensions;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Or(a,this.clientVersion));let u=(await a.json()).extensions;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=Nt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new at(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new at(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new at(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new lt("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(r>=cl)throw i instanceof Mt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${cl} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await nl(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof ut)throw await this.uploadSchema(),new Mt({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function pl(e){if(e?.kind==="itx")return e.options.id}var so=k(require("os")),dl=k(require("path"));var oo=Symbol("PrismaLibraryEngineCache");function pm(){let e=globalThis;return e[oo]===void 0&&(e[oo]={}),e[oo]}function dm(e){let t=pm();if(t[e]!==void 0)return t[e];let r=dl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=so.default.constants.dlopen.RTLD_LAZY|so.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var ml={async loadLibrary(e){let t=await Yn(),r=await za("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>dm(r))}catch(n){let i=ui({e:n,platformInfo:t,id:r});throw new R(i,e.clientVersion)}}};var ao,fl={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new R(`The \`adapter\` option for \`PrismaClient\` is required in this context (${In().prettyName})`,t);if(n===void 0)throw new R("WASM engine was unexpectedly `undefined`",t);ao===void 0&&(ao=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new R("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(l.exports),o.QueryEngine})());let i=await ao;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var mm="P2036",Ae=L("prisma:client:libraryEngine");function fm(e){return e.item_type==="query"&&"query"in e}function gm(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var gl=[...Jn,"native"],_r=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??ml,t.engineWasm!==void 0&&(this.libraryLoader=r??fl),this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(hm(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new V(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Ae("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Qn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let t=await nt();if(!gl.includes(t))throw new R(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(H(t))}. Possible binaryTargets: ${qe(gl.join(", "))} or a path to the query engine library. -You may have to run ${qe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return t}}parseEngineResponse(t){if(!t)throw new B("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new B("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new WeakRef(this),{adapter:r}=this.config;r&&Ae("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r)}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new R(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",fm(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):gm(r)?this.loggerRustPanic=new le(lo(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ae(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ae("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ae("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new R(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ae("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ae("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ae("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Ae(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof R)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new le(lo(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new B(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Ae("requestBatch");let i=Ft(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),pl(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u,elapsed:0});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new le(lo(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:st(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===mm&&this.config.adapter){let r=t.meta?.id;Yr(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Yr(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function hm(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function lo(e,t){return rl({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function hl({copyEngine:e=!0},t){let r;try{r=Nt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&tr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Yt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s&&!1){let u;throw e?r?.startsWith("prisma://")?u=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:u=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:u=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new J(u.join(` -`),{clientVersion:t.clientVersion})}if(o)return new Dr(t);if(a)return new _r(t);throw new J("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}function Fn({generator:e}){return e?.previewFeatures??[]}var yl=e=>({command:e});var bl=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);function jt(e){try{return El(e,"fast")}catch{return El(e,"slow")}}function El(e,t){return JSON.stringify(e.map(r=>xl(r,t)))}function xl(e,t){return Array.isArray(e)?e.map(r=>xl(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:Pt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:xe.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:ym(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Pl(e):e}function ym(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Pl(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(wl);let t={};for(let r of Object.keys(e))t[r]=wl(e[r]);return t}function wl(e){return typeof e=="bigint"?e.toString():Pl(e)}var bm=["$connect","$disconnect","$on","$transaction","$use","$extends"],vl=bm;var Em=/^(\s*alter\s)/i,Tl=L("prisma:client");function uo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Em.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var co=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(pa(r))n=r.sql,i={values:jt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:jt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:jt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:jt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=bl(r),i={values:jt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Tl(`prisma.${e}(${n}, ${i.values})`):Tl(`prisma.${e}(${n})`),{query:n,parameters:i}},Rl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new oe(t,r)}},Cl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function po(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Sl(r(o)):Sl(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Sl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Al={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},mo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Al}};function Il(e){return e.includes("tracing")?new mo:Al}function Ol(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}function kl(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}var Ln=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};var Fl=k(bi());function Nn(e){return typeof e.batchRequestIdx=="number"}function Dl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(fo(e.query.arguments)),t.push(fo(e.query.selection)),t.join("")}function fo(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${fo(n)})`:r}).join(" ")})`}var wm={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function go(e){return wm[e]}var Mn=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;ipt("bigint",r));case"bytes-array":return t.map(r=>pt("bytes",r));case"decimal-array":return t.map(r=>pt("decimal",r));case"datetime-array":return t.map(r=>pt("datetime",r));case"date-array":return t.map(r=>pt("date",r));case"time-array":return t.map(r=>pt("time",r));default:return t}}function _l(e){let t=[],r=xm(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>go(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:vm(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Ll(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:go(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Dl(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return process.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Pm(t),Tm(t,i)||t instanceof Le)throw t;if(t instanceof V&&Rm(t)){let u=Nl(t.meta);wn({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Tt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new V(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new le(l,this.client._clientVersion);if(t instanceof B)throw new B(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof R)throw new R(l,this.client._clientVersion);if(t instanceof le)throw new le(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Fl.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Gi(o,s),l=i==="queryRaw"?_l(a):wt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function vm(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ll(e)};Fe(e,"Unknown transaction kind")}}function Ll(e){return{id:e.id,payload:e.payload}}function Tm(e,t){return Nn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Rm(e){return e.code==="P2009"||e.code==="P2012"}function Nl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Nl)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var Ml="5.22.0";var $l=Ml;var Ul=k(Ai());var F=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};w(F,"PrismaClientConstructorValidationError");var ql=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],jl=["pretty","colorless","minimal"],Vl=["info","query","warn","error"],Sm={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new F(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Vt(r,t)||` Available datasources: ${t.join(", ")}`;throw new F(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new F(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new F(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new F(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new F('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Fn(t).includes("driverAdapters"))throw new F('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Yt()==="binary")throw new F('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new F(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new F(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!jl.includes(e)){let t=Vt(e,jl);throw new F(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new F(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Vl.includes(r)){let n=Vt(r,Vl);throw new F(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Vt(i,o);throw new F(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new F(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new F(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new F(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new F('"omit" option is expected to be an object.');if(e===null)throw new F('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Im(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new F(Om(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new F(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Vt(r,t);throw new F(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Gl(e,t){for(let[r,n]of Object.entries(e)){if(!ql.includes(r)){let i=Vt(r,ql);throw new F(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Sm[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new F('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Vt(e,t){if(t.length===0||typeof e!="string")return"";let r=Am(e,t);return r?` Did you mean "${r}"?`:""}function Am(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ul.default)(e,i)}));r.sort((i,o)=>i.distancext(n)===t);if(r)return e[r]}function Om(e,t){let r=Ot(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=En(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}function Ql(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!Nn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var tt=L("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var km={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Dm=Symbol.for("prisma.client.transaction.id"),_m={id:0,nextId(){return++this.id}};function Yl(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Ln;this._createPrismaPromise=po();this.$extends=Ia;e=n?.__internal?.configOverride?.(e)??e,Ba(e),n&&Gl(n,e);let i=new Kl.EventEmitter().on("error",()=>{});this._extensions=kt.empty(),this._previewFeatures=Fn(e),this._clientVersion=e.clientVersion??$l,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Il(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Fr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Fr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=qi(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new R(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new R("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=!s&&zt(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&L.enable("prisma:client");let p=Fr.default.resolve(e.dirname,e.relativePath);zl.default.existsSync(p)||(p=e.dirname),tt("dirname",e.dirname),tt("relativePath",e.relativePath),tt("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,datamodelPath:Fr.default.join(e.dirname,e.filename??"schema.prisma"),prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&kl(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Ua(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Nt,getBatchRequestPayload:Ft,prismaGraphQLToJSError:st,PrismaClientUnknownRequestError:B,PrismaClientInitializationError:R,PrismaClientKnownRequestError:V,debug:L("prisma:client:accelerateEngine"),engineVersion:Wl.version,clientVersion:e.clientVersion}},tt("clientVersion",e.clientVersion),this._engine=hl(e,this._engineConfig),this._requestHandler=new $n(this,i),l.log)for(let f of l.log){let g=typeof f=="string"?f:f.emit==="stdout"?f.level:null;g&&this.$on(g,h=>{er.log(`${er.tags[g]??""}`,h.message||h.query)})}this._metrics=new Dt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=yr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ao()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:co({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Jl(n,i);return uo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new J("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(uo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new J(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:yl,callsite:Ze(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:co({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Jl(n,i));throw new J("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new J("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=_m.nextId(),s=Ol(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return Ql(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return yr(Se(Aa(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>po(n)),re(Dm,()=>n.id),_t(vl)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??km,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let c=this._middlewares.get(++a);if(c)return this._tracingHelper.runInChildSpan(s.middleware,O=>c(u,T=>(O?.end(),l(T))));let{runInTransaction:p,args:d,...f}=u,g={...n,...f};d&&(g.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete g.transaction;let h=await Na(this,g);return g.model?Da({result:h,modelName:g.model,args:g.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):h};return this._tracingHelper.runInChildSpan(s.operation,()=>new Hl.AsyncResource("prisma-client-request").runInAsyncScope(()=>l(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let g={name:"serialize"},h=this._tracingHelper.runInChildSpan(g,()=>vn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return L.enabled("prisma:client")&&(tt("Prisma Client call:"),tt(`prisma.${i}(${ha(n)})`),tt("Generated request:"),tt(JSON.stringify(h,null,2)+` -`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:h,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:f})}catch(g){throw g.clientVersion=this._clientVersion,g}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new J("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Jl(e,t){return Fm(e)?[new oe(e,t),Rl]:[e,Cl]}function Fm(e){return Array.isArray(e)&&Array.isArray(e.raw)}var Lm=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Zl(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Lm.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}function Xl(e){zt(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -/*! Bundled license information: - -decimal.js/decimal.mjs: - (*! - * decimal.js v10.4.3 - * An arbitrary-precision Decimal type for JavaScript. - * https://github.com/MikeMcl/decimal.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licence - *) -*/ -//# sourceMappingURL=library.js.map diff --git a/keep-notes/prisma/client-generated/runtime/react-native.js b/keep-notes/prisma/client-generated/runtime/react-native.js deleted file mode 100644 index e542e40..0000000 --- a/keep-notes/prisma/client-generated/runtime/react-native.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict";var aa=Object.create;var tr=Object.defineProperty;var la=Object.getOwnPropertyDescriptor;var ua=Object.getOwnPropertyNames;var ca=Object.getPrototypeOf,pa=Object.prototype.hasOwnProperty;var Le=(e,t)=>()=>(e&&(t=e(e=0)),t);var ge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pt=(e,t)=>{for(var r in t)tr(e,r,{get:t[r],enumerable:!0})},Hn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ua(t))!pa.call(e,i)&&i!==r&&tr(e,i,{get:()=>t[i],enumerable:!(n=la(t,i))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?aa(ca(e)):{},Hn(t||!e||!e.__esModule?tr(r,"default",{value:e,enumerable:!0}):r,e)),da=e=>Hn(tr({},"__esModule",{value:!0}),e);var y,c=Le(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=Le(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=Le(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=Le(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});var mi=ge(tt=>{"use strict";m();c();p();d();f();var ei=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fa=ei(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var F=C.indexOf("=");F===-1&&(F=A);var _=F===A?0:4-F%4;return[F,_]}function l(C){var A=a(C),F=A[0],_=A[1];return(F+_)*3/4-_}function u(C,A,F){return(A+F)*3/4-F}function g(C){var A,F=a(C),_=F[0],N=F[1],M=new n(u(C,_,N)),O=0,Y=N>0?_-4:_,q;for(q=0;q>16&255,M[O++]=A>>8&255,M[O++]=A&255;return N===2&&(A=r[C.charCodeAt(q)]<<2|r[C.charCodeAt(q+1)]>>4,M[O++]=A&255),N===1&&(A=r[C.charCodeAt(q)]<<10|r[C.charCodeAt(q+1)]<<4|r[C.charCodeAt(q+2)]>>2,M[O++]=A>>8&255,M[O++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function P(C,A,F){for(var _,N=[],M=A;MY?Y:O+M));return _===1?(A=C[F-1],N.push(t[A>>2]+t[A<<4&63]+"==")):_===2&&(A=(C[F-2]<<8)+C[F-1],N.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),N.join("")}}),ma=ei(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,P=n?o-1:0,S=n?-1:1,C=t[r+P];for(P+=S,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+P],P+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+P],P+=S,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,F=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+P>=1?r+=S/u:r+=S*Math.pow(2,1-P),r*u>=2&&(a++,u/=2),a+P>=h?(l=0,a=h):a+P>=1?(l=(r*u-1)*Math.pow(2,o),a=a+P):(l=r*Math.pow(2,P-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=A,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=F*128}}),Gr=fa(),Xe=ma(),zn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;tt.Buffer=T;tt.SlowBuffer=Ea;tt.INSPECT_MAX_BYTES=50;var rr=2147483647;tt.kMaxLength=rr;T.TYPED_ARRAY_SUPPORT=ga();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ga(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function Oe(e){if(e>rr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Hr(e)}return ti(e,t,r)}T.poolSize=8192;function ti(e,t,r){if(typeof e=="string")return ya(e,t);if(ArrayBuffer.isView(e))return wa(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return ni(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ba(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ti(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ri(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ha(e,t,r){return ri(e),e<=0?Oe(e):t!==void 0?typeof r=="string"?Oe(e).fill(t,r):Oe(e).fill(t):Oe(e)}T.alloc=function(e,t,r){return ha(e,t,r)};function Hr(e){return ri(e),Oe(e<0?0:zr(e)|0)}T.allocUnsafe=function(e){return Hr(e)};T.allocUnsafeSlow=function(e){return Hr(e)};function ya(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ii(e,t)|0,n=Oe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Wr(e){let t=e.length<0?0:zr(e.length)|0,r=Oe(t);for(let n=0;n=rr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+rr.toString(16)+" bytes");return e|0}function Ea(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ii(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Kr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return fi(e).length;default:if(i)return n?-1:Kr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ii;function xa(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Fa(this,t,r);case"utf8":case"utf-8":return si(this,t,r);case"ascii":return Oa(this,t,r);case"latin1":case"binary":return ka(this,t,r);case"base64":return Ra(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ma(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Je(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};zn&&(T.prototype[zn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Zr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Yn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Yn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Yn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return va(this,e,t,r);case"utf8":case"utf-8":return Pa(this,e,t,r);case"ascii":case"latin1":case"binary":return Ta(this,e,t,r);case"base64":return Ca(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Aa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ra(e,t,r){return t===0&&r===e.length?Gr.fromByteArray(e):Gr.fromByteArray(e.slice(t,r))}function si(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Sa(n)}var Zn=4096;function Sa(e){let t=e.length;if(t<=Zn)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||G(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||G(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||G(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||G(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||G(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||G(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||G(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ne(function(e){e=e>>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||G(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||G(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||G(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||G(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||G(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||G(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||G(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ne(function(e){e=e>>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||G(e,4,this.length),Xe.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||G(e,4,this.length),Xe.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||G(e,8,this.length),Xe.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||G(e,8,this.length),Xe.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function ai(e,t,r,n,i){di(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function li(e,t,r,n,i){di(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Ne(function(e,t=0){return ai(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ne(function(e,t=0){return li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Ne(function(e,t=0){return ai(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ne(function(e,t=0){return li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ui(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ci(e,t,r,n,i){return t=+t,r=r>>>0,i||ui(e,t,r,4,34028234663852886e22,-34028234663852886e22),Xe.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return ci(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return ci(this,e,t,!1,r)};function pi(e,t,r,n,i){return t=+t,r=r>>>0,i||ui(e,t,r,8,17976931348623157e292,-17976931348623157e292),Xe.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return pi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return pi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=Xn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Xn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Xn(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ia(e,t,r){et(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function di(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ze.ERR_OUT_OF_RANGE("value",a,e)}Ia(n,i,o)}function et(e,t){if(typeof e!="number")throw new Ze.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(et(e,r),new Ze.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ze.ERR_BUFFER_OUT_OF_BOUNDS:new Ze.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var _a=/[^+/0-9A-Za-z-_]/g;function La(e){if(e=e.split("=")[0],e=e.trim().replace(_a,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Kr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Na(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function fi(e){return Gr.toByteArray(La(e))}function nr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Zr(e){return e!==e}var $a=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Ne(e){return typeof BigInt>"u"?Ba:e}function Ba(){throw new Error("BigInt not supported")}});var w,m=Le(()=>{"use strict";w=he(mi())});function ja(){return!1}var qa,Ua,ir,tn=Le(()=>{"use strict";m();c();p();d();f();qa={},Ua={existsSync:ja,promises:qa},ir=Ua});function cl(...e){return e.join("/")}function pl(...e){return e.join("/")}var Ri,dl,fl,we,an=Le(()=>{"use strict";m();c();p();d();f();Ri="/",dl={sep:Ri},fl={resolve:cl,posix:dl,join:pl,sep:Ri},we=fl});var ki=ge((nf,Oi)=>{"use strict";m();c();p();d();f();Oi.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Mi=ge((cf,Fi)=>{"use strict";m();c();p();d();f();var gl=ki();Fi.exports=e=>{let t=gl(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var sr,Ii=Le(()=>{"use strict";m();c();p();d();f();sr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Li=ge((Vf,_i)=>{"use strict";m();c();p();d();f();_i.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var $i=ge((tm,Di)=>{"use strict";m();c();p();d();f();Di.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var cn=ge((am,Bi)=>{"use strict";m();c();p();d();f();var El=$i();Bi.exports=e=>typeof e=="string"?e.replace(El(),""):e});var ji=ge((Cm,lr)=>{"use strict";m();c();p();d();f();lr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};lr.exports.default=lr.exports});var En=ge((Xy,lo)=>{"use strict";m();c();p();d();f();lo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{gc.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var $o=ge(()=>{"use strict";m();c();p();d();f()});var vp={};Pt(vp,{Debug:()=>on,Decimal:()=>Ee,Extensions:()=>Xr,MetricsClient:()=>yt,NotFoundError:()=>Me,PrismaClientInitializationError:()=>V,PrismaClientKnownRequestError:()=>W,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>K,PrismaClientValidationError:()=>H,Public:()=>en,Sql:()=>ae,defineDmmfProperty:()=>_o,deserializeJsonResponse:()=>ot,dmmfToRuntimeDataModel:()=>Io,empty:()=>jo,getPrismaClient:()=>ia,getRuntime:()=>ws,join:()=>Bo,makeStrictEnum:()=>oa,makeTypedQueryFactory:()=>Lo,objectEnumValues:()=>Cr,raw:()=>Mn,serializeJsonQuery:()=>Fr,skip:()=>kr,sqltag:()=>In,warnEnvConflicts:()=>void 0,warnOnce:()=>Lt});module.exports=da(vp);m();c();p();d();f();var Xr={};Pt(Xr,{defineExtension:()=>gi,getExtensionContext:()=>hi});m();c();p();d();f();m();c();p();d();f();function gi(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function hi(e){return e}var en={};Pt(en,{validator:()=>yi});m();c();p();d();f();m();c();p();d();f();function yi(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var or={};Pt(or,{$:()=>vi,bgBlack:()=>Za,bgBlue:()=>rl,bgCyan:()=>il,bgGreen:()=>el,bgMagenta:()=>nl,bgRed:()=>Xa,bgWhite:()=>ol,bgYellow:()=>tl,black:()=>Ka,blue:()=>We,bold:()=>pe,cyan:()=>ke,dim:()=>Ct,gray:()=>Ot,green:()=>Rt,grey:()=>Ya,hidden:()=>Ga,inverse:()=>Ja,italic:()=>Qa,magenta:()=>Ha,red:()=>Ge,reset:()=>Va,strikethrough:()=>Wa,underline:()=>At,white:()=>za,yellow:()=>St});m();c();p();d();f();var rn,wi,bi,Ei,xi=!0;typeof y<"u"&&({FORCE_COLOR:rn,NODE_DISABLE_COLORS:wi,NO_COLOR:bi,TERM:Ei}=y.env||{},xi=y.stdout&&y.stdout.isTTY);var vi={enabled:!wi&&bi==null&&Ei!=="dumb"&&(rn!=null&&rn!=="0"||xi)};function U(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!vi.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Va=U(0,0),pe=U(1,22),Ct=U(2,22),Qa=U(3,23),At=U(4,24),Ja=U(7,27),Ga=U(8,28),Wa=U(9,29),Ka=U(30,39),Ge=U(31,39),Rt=U(32,39),St=U(33,39),We=U(34,39),Ha=U(35,39),ke=U(36,39),za=U(37,39),Ot=U(90,39),Ya=U(90,39),Za=U(40,49),Xa=U(41,49),el=U(42,49),tl=U(43,49),rl=U(44,49),nl=U(45,49),il=U(46,49),ol=U(47,49);m();c();p();d();f();var sl=100,Pi=["green","yellow","blue","magenta","cyan","red"],kt=[],Ti=Date.now(),al=0,nn=typeof y<"u"?y.env:{};globalThis.DEBUG??=nn.DEBUG??"";globalThis.DEBUG_COLORS??=nn.DEBUG_COLORS?nn.DEBUG_COLORS==="true":!0;var Ft={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function ll(e){let t={color:Pi[al++%Pi.length],enabled:Ft.enabled(e),namespace:e,log:Ft.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&kt.push([o,...n]),kt.length>sl&&kt.shift(),Ft.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:ul(g)),u=`+${Date.now()-Ti}ms`;Ti=Date.now(),globalThis.DEBUG_COLORS?a(or[s](pe(o)),...l,or[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var on=new Proxy(ll,{get:(e,t)=>Ft[t],set:(e,t,r)=>Ft[t]=r});function ul(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Ci(e=7500){let t=kt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` -`);return t.length{let e;(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(De||={});m();c();p();d();f();an();function ln(e){return we.sep===we.posix.sep?e:e.split(we.sep).join(we.posix.sep)}var _t={};Pt(_t,{error:()=>wl,info:()=>yl,log:()=>hl,query:()=>bl,should:()=>Ni,tags:()=>It,warn:()=>un});m();c();p();d();f();var It={error:Ge("prisma:error"),warn:St("prisma:warn"),info:ke("prisma:info"),query:We("prisma:query")},Ni={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function hl(...e){console.log(...e)}function un(e,...t){Ni.warn()&&console.warn(`${It.warn} ${e}`,...t)}function yl(e,...t){console.info(`${It.info} ${e}`,...t)}function wl(e,...t){console.error(`${It.error} ${e}`,...t)}function bl(e,...t){console.log(`${It.query} ${e}`,...t)}m();c();p();d();f();function ar(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}m();c();p();d();f();function Fe(e,t){throw new Error(t)}m();c();p();d();f();function pn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();var dn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});m();c();p();d();f();function rt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}m();c();p();d();f();function fn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{qi.has(e)||(qi.add(e),un(t,...r))};m();c();p();d();f();var W=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};re(W,"PrismaClientKnownRequestError");var Me=class extends W{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};re(Me,"NotFoundError");m();c();p();d();f();var V=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(V,"PrismaClientInitializationError");m();c();p();d();f();var ue=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(ue,"PrismaClientRustPanicError");m();c();p();d();f();var K=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(K,"PrismaClientUnknownRequestError");m();c();p();d();f();var H=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(H,"PrismaClientValidationError");m();c();p();d();f();m();c();p();d();f();var nt=9e15,qe=1e9,mn="0123456789abcdef",cr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",pr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",gn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-nt,maxE:nt,crypto:!1},Gi,Ie,L=!0,fr="[DecimalError] ",je=fr+"Invalid argument: ",Wi=fr+"Precision limit exceeded",Ki=fr+"crypto unavailable",Hi="[object Decimal]",te=Math.floor,J=Math.pow,xl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,vl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Pl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,zi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,I=7,Tl=9007199254740991,Cl=cr.length-1,hn=pr.length-1,R={toStringTag:Hi};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};R.ceil=function(){return k(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(je+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+I,n.rounding=1,r=Al(n,to(n,r)),n.precision=e,n.rounding=t,k(Ie==2||Ie==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(L=!1,o=g.s*J(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=J(r,1/3),e=te((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=j(u.plus(g).times(a),u.plus(l),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(k(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(k(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return L=!0,k(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-te(this.e/I))*I,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return j(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return k(j(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return k(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/gr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=it(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=it(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/gr(5,e)),i=it(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,j(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?de(r,i,o):new r(0):new r(NaN):t.isZero()?de(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=de(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,L=!1,r=r.times(r).minus(1).sqrt().plus(r),L=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,L=!1,r=r.times(r).plus(1).sqrt().plus(r),L=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=j(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=de(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,P=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=hn)return s=de(g,h+4,P).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=hn)return s=de(g,h+4,P).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/I+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(L=!1,t=Math.ceil(a/I),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,P=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(L=!1,a=h+S,s=Be(u,a),n=t?dr(g,a+10):Be(e,a),l=j(s,n,a,1),Nt(l.d,i=h,P))do if(a+=10,s=Be(u,a),n=t?dr(g,a+10):Be(e,a),l=j(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Nt(l.d,i+=10,P));return L=!0,k(l,h,P)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,P,S=this,C=S.constructor;if(e=new C(e),!S.d||!e.d)return!S.s||!e.s?e=new C(NaN):S.d?e.s=-e.s:e=new C(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(u=S.d,P=e.d,a=C.precision,l=C.rounding,!u[0]||!P[0]){if(P[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return L?k(e,a,l):e}if(r=te(e.e/I),g=te(S.e/I),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=P.length):(t=P,r=g,s=u.length),n=Math.max(Math.ceil(a/I),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=P.length,h=n0;--n)u[s++]=0;for(n=P.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/fe|0,u[i]%=fe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=mr(u,n),L?k(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(je+e);return r.d?(t=Yi(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+I,n.rounding=1,r=Sl(n,to(n,r)),n.precision=e,n.rounding=t,k(Ie>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(L=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=te((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(j(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,l+1,1),e=!n.times(n).eq(s));break}return L=!0,k(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=j(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(Ie==2||Ie==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,P=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!P||!P[0]||!S||!S[0])return new h(!e.s||P&&!P[0]&&!S||S&&!S[0]&&!P?NaN:!P||!S?e.s/0:e.s*0);for(r=te(g.e/I)+te(e.e/I),l=P.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*P[i-n-1]+t,o[i--]=a%fe|0,t=a/fe|0;o[i]=(o[i]+t)%fe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=mr(o,r),L?k(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return bn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(se(e,0,qe),t===void 0?t=n.rounding:se(t,0,8),k(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,!0):(se(e,0,qe),t===void 0?t=i.rounding:se(t,0,8),n=k(new i(n),e+1,t),r=be(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=be(i):(se(e,0,qe),t===void 0?t=o.rounding:se(t,0,8),n=k(new o(i),e+i.e+1,t),r=be(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,P,S=this,C=S.d,A=S.constructor;if(!C)return new A(S);if(u=r=new A(1),n=l=new A(0),t=new A(n),o=t.e=Yi(C)-S.e-1,s=o%I,t.d[0]=J(10,s<0?I+s:s),e==null)e=o>0?t:u;else{if(a=new A(e),!a.isInt()||a.lt(u))throw Error(je+a);e=a.gt(t)?o>0?t:u:a}for(L=!1,a=new A(Z(C)),g=A.precision,A.precision=o=C.length*I*2;h=j(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=j(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=S.s,P=j(u,n,o,1).minus(S).abs().cmp(j(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],A.precision=g,L=!0,P};R.toHexadecimal=R.toHex=function(e,t){return bn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:se(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(L=!1,r=j(r,e,0,t,1).times(e),L=!0,k(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return bn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(J(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return k(a,n,o);if(t=te(e.e/I),t>=e.d.length-1&&(r=u<0?-u:u)<=Tl)return i=Zi(l,a,r,n),e.s<0?new l(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(L=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=yn(e.times(Be(a,n+r)),n),i.d&&(i=k(i,n+5,1),Nt(i.d,n,o)&&(t=n+10,i=k(yn(e.times(Be(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,L=!0,l.rounding=o,k(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(se(e,1,qe),t===void 0?t=i.rounding:se(t,0,8),n=k(new i(n),e,t),r=be(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(se(e,1,qe),t===void 0?t=n.rounding:se(t,0,8)),k(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return k(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(je+e)}function Nt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=I,i=0):(i=Math.ceil((t+1)/I),t%=I),o=J(10,I-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==J(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==J(10,t-3)-1,s}function ur(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Al(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/gr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=it(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var j=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,P,S,C,A,F,_,N,M,O,Y,q,vt,Q,ie,Se,X,Ye,er=n.constructor,Jr=n.s==i.s?1:-1,ee=n.d,$=i.d;if(!ee||!ee[0]||!$||!$[0])return new er(!n.s||!i.s||(ee?$&&ee[0]==$[0]:!$)?NaN:ee&&ee[0]==0||!$?Jr*0:Jr/0);for(l?(S=1,g=n.e-i.e):(l=fe,S=I,g=te(n.e/S)-te(i.e/S)),X=$.length,ie=ee.length,_=new er(Jr),N=_.d=[],h=0;$[h]==(ee[h]||0);h++);if($[h]>(ee[h]||0)&&g--,o==null?(q=o=er.precision,s=er.rounding):a?q=o+(n.e-i.e)+1:q=o,q<0)N.push(1),C=!0;else{if(q=q/S+2|0,h=0,X==1){for(P=0,$=$[0],q++;(h1&&($=e($,P,l),ee=e(ee,P,l),X=$.length,ie=ee.length),Q=X,M=ee.slice(0,X),O=M.length;O=l/2&&++Se;do P=0,u=t($,M,X,O),u<0?(Y=M[0],X!=O&&(Y=Y*l+(M[1]||0)),P=Y/Se|0,P>1?(P>=l&&(P=l-1),A=e($,P,l),F=A.length,O=M.length,u=t(A,M,F,O),u==1&&(P--,r(A,X=10;P/=10)h++;_.e=h+g*S-1,k(_,a?o+_.e+1:o,s,C)}return _}}();function k(e,t,r,n){var i,o,s,a,l,u,g,h,P,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=I,s=t,g=h[P=0],l=g/J(10,i-s-1)%10|0;else if(P=Math.ceil((o+1)/I),a=h.length,P>=a)if(n){for(;a++<=P;)h.push(0);g=l=0,i=1,o%=I,s=o-I+1}else break e;else{for(g=a=h[P],i=1;a>=10;a/=10)i++;o%=I,s=o-I+i,l=s<0?0:g/J(10,i-s-1)%10|0}if(n=n||t<0||h[P+1]!==void 0||(s<0?g:g%J(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/J(10,i-s):0:h[P-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=J(10,(I-t%I)%I),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=P,a=1,P--):(h.length=P+1,a=J(10,I-o),h[P]=s>0?(g/J(10,i-s)%J(10,s)|0)*a:0),u)for(;;)if(P==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==fe&&(h[0]=1));break}else{if(h[P]+=a,h[P]!=fe)break;h[P--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return L&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+$e(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+$e(-i-1)+o,r&&(n=r-s)>0&&(o+=$e(n))):i>=s?(o+=$e(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+$e(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=$e(n))),o}function mr(e,t){var r=e[0];for(t*=I;r>=10;r/=10)t++;return t}function dr(e,t,r){if(t>Cl)throw L=!0,r&&(e.precision=r),Error(Wi);return k(new e(cr),t,1,!0)}function de(e,t,r){if(t>hn)throw Error(Wi);return k(new e(pr),t,r,!0)}function Yi(e){var t=e.length-1,r=t*I+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function $e(e){for(var t="";e--;)t+="0";return t}function Zi(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/I+4);for(L=!1;;){if(r%2&&(o=o.times(t),Qi(o.d,s)&&(i=!0)),r=te(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Qi(t.d,s)}return L=!0,o}function Vi(e){return e.d[e.d.length-1]&1}function Xi(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new P(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(L=!1,l=C):l=t,a=new P(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(J(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new P(1),P.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(j(o,r,l,1)),Z(a.d).slice(0,l)===Z(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(u<3&&Nt(s.d,l-n,S,u))P.precision=l+=10,r=o=a=new P(1),g=0,u++;else return k(s,P.precision=C,S,L=!0);else return P.precision=C,s}s=a}}function Be(e,t){var r,n,i,o,s,a,l,u,g,h,P,S=1,C=10,A=e,F=A.d,_=A.constructor,N=_.rounding,M=_.precision;if(A.s<0||!F||!F[0]||!A.e&&F[0]==1&&F.length==1)return new _(F&&!F[0]?-1/0:A.s!=1?NaN:F?0:A);if(t==null?(L=!1,g=M):g=t,_.precision=g+=C,r=Z(F),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=Z(A.d),n=r.charAt(0),S++;o=A.e,n>1?(A=new _("0."+r),o++):A=new _(n+"."+r.slice(1))}else return u=dr(_,g+2,M).times(o+""),A=Be(new _(n+"."+r.slice(1)),g-C).plus(u),_.precision=M,t==null?k(A,M,N,L=!0):A;for(h=A,l=s=A=j(A.minus(1),A.plus(1),g,1),P=k(A.times(A),g,1),i=3;;){if(s=k(s.times(P),g,1),u=l.plus(j(s,new _(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(dr(_,g+2,M).times(o+""))),l=j(l,new _(S),g,1),t==null)if(Nt(l.d,g-C,N,a))_.precision=g+=C,u=s=A=j(h.minus(1),h.plus(1),g,1),P=k(A.times(A),g,1),i=a=1;else return k(l,_.precision=M,N,L=!0);else return _.precision=M,l;l=u,i+=2}}function eo(e){return String(e.s*e.s/0)}function wn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%I,r<0&&(n+=I),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),zi.test(t))return wn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(vl.test(t))r=16,t=t.toLowerCase();else if(xl.test(t))r=2;else if(Pl.test(t))r=8;else throw Error(je+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=Zi(n,new n(r),o,o*2)),u=ur(t,r,fe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=mr(u,g),e.d=u,L=!1,s&&(e=j(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?J(2,l):Ke.pow(2,l))),L=!0,e)}function Sl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:it(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/gr(5,r)),t=it(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function it(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/I);for(L=!1,l=r.times(r),a=new e(n);;){if(s=j(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=j(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return L=!0,s.d.length=h+1,s}function gr(e,t){for(var r=e;--t;)r*=e;return r}function to(e,t){var r,n=t.s<0,i=de(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ie=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ie=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ie=Vi(r)?n?2:3:n?4:1,t;Ie=Vi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function bn(e,t,r,n){var i,o,s,a,l,u,g,h,P,S=e.constructor,C=r!==void 0;if(C?(se(r,1,qe),n===void 0?n=S.rounding:se(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=eo(e);else{for(g=be(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),P=new S(1),P.e=g.length-s,P.d=ur(be(P),10,i),P.e=P.d.length),h=ur(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=j(e,P,r,n,0,i),h=e.d,o=e.e,u=Gi),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=ur(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Ol(e){return new this(e).abs()}function kl(e){return new this(e).acos()}function Fl(e){return new this(e).acosh()}function Ml(e,t){return new this(e).plus(t)}function Il(e){return new this(e).asin()}function _l(e){return new this(e).asinh()}function Ll(e){return new this(e).atan()}function Nl(e){return new this(e).atanh()}function Dl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=de(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?de(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=de(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(j(e,t,o,1)),t=de(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(j(e,t,o,1)),r}function $l(e){return new this(e).cbrt()}function Bl(e){return k(e=new this(e),e.e+1,2)}function jl(e,t,r){return new this(e).clamp(t,r)}function ql(e){if(!e||typeof e!="object")throw Error(fr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,qe,"rounding",0,8,"toExpNeg",-nt,0,"toExpPos",0,nt,"maxE",0,nt,"minE",-nt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(je+r+": "+n);if(r="crypto",i&&(this[r]=gn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(Ki);else this[r]=!1;else throw Error(je+r+": "+n);return this}function Ul(e){return new this(e).cos()}function Vl(e){return new this(e).cosh()}function ro(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,Ji(o)){u.s=o.s,L?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;L?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Ki);else for(;o=10;i/=10)n++;npe(We(e)),punctuation:We,directive:ke,function:ke,variable:e=>pe(We(e)),string:e=>pe(Rt(e)),boolean:St,number:ke,comment:Ot};var hu=e=>e,yr={},yu=0,D={manual:yr.Prism&&yr.Prism.manual,disableWorkerMessageHandler:yr.Prism&&yr.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof me){let t=e;return new me(t.type,D.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(D.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Se instanceof me)continue;if(Y&&Q!=t.length-1){N.lastIndex=ie;var h=N.exec(e);if(!h)break;var g=h.index+(O?h[1].length:0),P=h.index+h[0].length,a=Q,l=ie;for(let $=t.length;a<$&&(l=l&&(++Q,ie=l);if(t[Q]instanceof me)continue;u=a-Q,Se=e.slice(ie,l),h.index-=ie}else{N.lastIndex=0;var h=N.exec(Se),u=1}if(!h){if(o)break;continue}O&&(q=h[1]?h[1].length:0);var g=h.index+q,h=h[0].slice(q),P=g+h.length,S=Se.slice(0,g),C=Se.slice(P);let X=[Q,u];S&&(++Q,ie+=S.length,X.push(S));let Ye=new me(A,M?D.tokenize(h,M):h,vt,h,Y);if(X.push(Ye),C&&X.push(C),Array.prototype.splice.apply(t,X),u!=1&&D.matchGrammar(e,t,r,Q,ie,!0,A),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return D.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=D.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=D.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:me};D.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};D.languages.javascript=D.languages.extend("clike",{"class-name":[D.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});D.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;D.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:D.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:D.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:D.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:D.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});D.languages.markup&&D.languages.markup.tag.addInlined("script","javascript");D.languages.js=D.languages.javascript;D.languages.typescript=D.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});D.languages.ts=D.languages.typescript;function me(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}me.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return me.stringify(r,t)}).join(""):wu(e.type)(e.content)};function wu(e){return no[e]||hu}function io(e){return bu(e,D.languages.javascript)}function bu(e,t){return D.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();var oo=he(Mi());function so(e){return(0,oo.default)(e)}var wr=class e{static read(t){let r;try{r=ir.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` -`);return new e(t,so(n).split(` -`))}highlight(){let t=io(this.toString());return new e(this.firstLineNumber,t.split(` -`))}toString(){return this.lines.join(` -`)}};var Eu={red:Ge,gray:Ot,dim:Ct,bold:pe,underline:At,highlightSource:e=>e.highlight()},xu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function vu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Pu({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=vu({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=wr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=Cu(g),P=Tu(g);if(!P)return s;s.functionName=`${P.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,P.openingBraceIndex))),u=o.highlightSource(u);let S=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((C,A)=>o.gray(String(A).padStart(S))+" "+C).mapLines(C=>o.dim(C)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let C=h+S+1;C+=2,s.callArguments=(0,ao.default)(i,C).slice(C)}}return s}function Tu(e){let t=Object.keys(De.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Cu(e){let t=0;for(let r=0;r"Unknown error")}function fo(e){return e.errors.flatMap(t=>t.kind==="Union"?fo(t):[t])}function Su(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Ou(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ou(e,t){return[...new Set(e.concat(t))]}function ku(e){return fn(e,(t,r)=>{let n=uo(t),i=uo(r);return n!==i?n-i:co(t)-co(r)})}function uo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function co(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}m();c();p();d();f();var ce=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();d();f();m();c();p();d();f();var ct=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};m();c();p();d();f();m();c();p();d();f();var Er=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var xr=e=>e,vr={bold:xr,red:xr,green:xr,dim:xr,enabled:!1},mo={bold:pe,red:Ge,green:Rt,dim:Ct,enabled:!0},pt={write(e){e.writeLine(",")}};m();c();p();d();f();var xe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};m();c();p();d();f();var Ue=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var dt=class extends Ue{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Er(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new xe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(pt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ft=class e extends Ue{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof dt&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new xe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(pt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();d();f();var z=class extends Ue{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new xe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};m();c();p();d();f();var Dt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(pt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function br(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Mu(e,t);break;case"IncludeOnScalar":Iu(e,t);break;case"EmptySelection":_u(e,t,r);break;case"UnknownSelectionField":$u(e,t);break;case"InvalidSelectionValue":Bu(e,t);break;case"UnknownArgument":ju(e,t);break;case"UnknownInputField":qu(e,t);break;case"RequiredArgumentMissing":Uu(e,t);break;case"InvalidArgumentType":Vu(e,t);break;case"InvalidArgumentValue":Qu(e,t);break;case"ValueTooLarge":Ju(e,t);break;case"SomeFieldsMissing":Gu(e,t);break;case"TooManyFieldsGiven":Wu(e,t);break;case"Union":po(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Mu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Iu(e,t){let[r,n]=$t(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ce(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Bt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function _u(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Lu(e,t,i);return}if(n.hasField("select")){Nu(e,t);return}}if(r?.[st(e.outputType.name)]){Du(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Lu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ce(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Nu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),wo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Bt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Du(e,t){let r=new Dt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ce("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=$t(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ft;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function $u(e,t){let r=bo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":wo(n,e.outputType);break;case"include":Ku(n,e.outputType);break;case"omit":Hu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Bt(n)),i.join(" ")})}function Bu(e,t){let r=bo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function ju(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),zu(n,e.arguments)),t.addErrorMessage(i=>ho(i,r,e.arguments.map(o=>o.name)))}function qu(e,t){let[r,n]=$t(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Eo(o,e.inputType)}t.addErrorMessage(o=>ho(o,n,e.inputType.fields.map(s=>s.name)))}function ho(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Zu(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Bt(e)),n.join(" ")}function Uu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof z&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=$t(e.argumentPath),s=new Dt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ce(o,s).makeRequired())}else{let l=e.inputTypes.map(yo).join(" | ");a.addSuggestion(new ce(o,l).makeRequired())}}function yo(e){return e.kind==="list"?`${yo(e.elementType)}[]`:e.name}function Vu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Pr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Qu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Pr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ju(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof z&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Gu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Eo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Pr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Bt(i)),o.join(" ")})}function Wu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Pr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function wo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,"true"))}function Ku(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ce(r.name,"true"))}function Hu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ce(r.name,"true"))}function zu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function bo(e,t){let[r,n]=$t(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Eo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function $t(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Bt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Pr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Yu=3;function Zu(e,t){let r=1/0,n;for(let i of t){let o=(0,go.default)(e,i);o>Yu||o`}};function mt(e){return e instanceof jt}m();c();p();d();f();var Tr=Symbol(),xn=new WeakMap,_e=class{constructor(t){t===Tr?xn.set(this,`Prisma.${this._getName()}`):xn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return xn.get(this)}},qt=class extends _e{_getNamespace(){return"NullTypes"}},Ut=class extends qt{};vn(Ut,"DbNull");var Vt=class extends qt{};vn(Vt,"JsonNull");var Qt=class extends qt{};vn(Qt,"AnyNull");var Cr={classes:{DbNull:Ut,JsonNull:Vt,AnyNull:Qt},instances:{DbNull:new Ut(Tr),JsonNull:new Vt(Tr),AnyNull:new Qt(Tr)}};function vn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();var vo=": ",Ar=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+vo.length}write(t){let r=new xe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(vo).write(this.value)}};var Pn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function gt(e){return new Pn(Po(e))}function Po(e){let t=new ft;for(let[r,n]of Object.entries(e)){let i=new Ar(r,To(n));t.addField(i)}return t}function To(e){if(typeof e=="string")return new z(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new z(String(e));if(typeof e=="bigint")return new z(`${e}n`);if(e===null)return new z("null");if(e===void 0)return new z("undefined");if(lt(e))return new z(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new z(`Buffer.alloc(${e.byteLength})`):new z(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=hr(e)?e.toISOString():"Invalid Date";return new z(`new Date("${t}")`)}return e instanceof _e?new z(`Prisma.${e._getName()}`):mt(e)?new z(`prisma.${xo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Xu(e):typeof e=="object"?Po(e):new z(Object.prototype.toString.call(e))}function Xu(e){let t=new dt;for(let r of e)t.addItem(To(r));return t}function Rr(e,t){let r=t==="pretty"?mo:vr,n=e.renderAllMessages(r),i=new ct(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Sr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=gt(e);for(let h of t)br(h,a,s);let{message:l,args:u}=Rr(a,r),g=ut({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new H(g,{clientVersion:o})}m();c();p();d();f();m();c();p();d();f();var ve=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};m();c();p();d();f();function Jt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}m();c();p();d();f();function Pe(e){return e.replace(/^./,t=>t.toLowerCase())}m();c();p();d();f();function Ao(e,t,r){let n=Pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:ec({...e,...Co(t.name,e,t.result.$allModels),...Co(t.name,e,t.result[n])})}function ec(e){let t=new ve,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return rt(e,n=>({...n,needs:r(n.name,new Set)}))}function Co(e,t,r){return r?rt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:tc(t,o,i)})):{}}function tc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Ro(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function So(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Or=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ve;this.modelExtensionsCache=new ve;this.queryCallbacksCache=new ve;this.clientExtensions=Jt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Jt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Ao(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ht=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Or(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Or(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();d();f();m();c();p();d();f();var Oo=Symbol(),Gt=class{constructor(t){if(t!==Oo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?kr:t}},kr=new Gt(Oo);function Te(e){return e instanceof Gt}var rc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},ko="explicitly `undefined` values are not allowed";function Fr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ht.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Tn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:rc[t],query:Wt(r,h)}}function Wt({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:Mo(r,n),selection:nc(e,t,i,n)}}function nc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),ac(e,n)):ic(n,t,r)}function ic(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&oc(n,t,e),e.isPreviewFeatureOn("omitApi")&&sc(n,r,e),n}function oc(e,t,r){for(let[n,i]of Object.entries(t)){if(Te(i))continue;let o=r.nestSelection(n);if(Cn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Wt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Wt(i,o)}}function sc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=So(i,n);for(let[s,a]of Object.entries(o)){if(Te(a))continue;Cn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function ac(e,t){let r={},n=t.getComputedFields(),i=Ro(e,n);for(let[o,s]of Object.entries(i)){if(Te(s))continue;let a=t.nestSelection(o);Cn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Te(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Wt({},a):r[o]=!0;continue}r[o]=Wt(s,a)}}return r}function Fo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(at(e)){if(hr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(mt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return lc(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:w.Buffer.from(e).toString("base64")};if(uc(e))return e.values;if(lt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof _e){if(e!==Cr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(cc(e))return e.toJSON();if(typeof e=="object")return Mo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Mo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Te(i)||(i!==void 0?r[n]=Fo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:ko}))}return r}function lc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[st(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Fe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();var yt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};m();c();p();d();f();function Io(e){return{models:An(e.models),enums:An(e.enums),types:An(e.types)}}function An(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function _o(e,t){let r=Jt(()=>pc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function pc(e){return{datamodel:{models:Rn(e.models),enums:Rn(e.enums),types:Rn(e.types)}}}function Rn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var Sn=new WeakMap,Mr="$$PrismaTypedSql",On=class{constructor(t,r){Sn.set(this,{sql:t,values:r}),Object.defineProperty(this,Mr,{value:Mr})}get sql(){return Sn.get(this).sql}get values(){return Sn.get(this).values}};function Lo(e){return(...t)=>new On(e,t)}function No(e){return e!=null&&e[Mr]===Mr}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Kt(e){return{ok:!1,error:e,map(){return Kt(e)},flatMap(){return Kt(e)}}}var kn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Fn=e=>{let t=new kn,r=Ce(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ce(t,e.queryRaw.bind(e)),executeRaw:Ce(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>dc(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=mc(t,e.getConnectionInfo.bind(e))),n},dc=(e,t)=>{let r=Ce(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>fc(e,o))}},fc=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),commit:Ce(e,t.commit.bind(t)),rollback:Ce(e,t.rollback.bind(t))});function Ce(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Kt({kind:"GenericJs",id:i})}}}function mc(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Kt({kind:"GenericJs",id:i})}}}var na=he(Do());var YO=he($o());Ii();tn();an();m();c();p();d();f();var ae=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();d();f();m();c();p();d();f();var Ir={enumerable:!0,configurable:!0,writable:!0};function _r(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Ir,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var qo=Symbol.for("nodejs.util.inspect.custom");function Ae(e,t){let r=hc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Uo(Reflect.ownKeys(o),r),a=Uo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Ir,...l?.getPropertyDescriptor(s)}:Ir:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[qo]=function(){let o={...this};return delete o[qo],o},i}function hc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Uo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function wt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function Lr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();function Vo(e){if(e===void 0)return"";let t=gt(e);return new ct(0,{colors:vr}).write(t).toString()}m();c();p();d();f();var yc="P2037";function Nr({error:e,user_facing_error:t},r,n){return t.error_code?new W(wc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new K(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function wc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===yc&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var zt="";function Qo(e){var t=e.split(` -`);return t.reduce(function(r,n){var i=xc(n)||Pc(n)||Ac(n)||kc(n)||Sc(n);return i&&r.push(i),r},[])}var bc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ec=/\((\S*)(?::(\d+))(?::(\d+))\)/;function xc(e){var t=bc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Ec.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||zt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var vc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Pc(e){var t=vc.exec(e);return t?{file:t[2],methodName:t[1]||zt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Tc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Cc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Ac(e){var t=Tc.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Cc.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||zt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var Rc=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Sc(e){var t=Rc.exec(e);return t?{file:t[3],methodName:t[1]||zt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var Oc=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function kc(e){var t=Oc.exec(e);return t?{file:t[2],methodName:t[1]||zt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var _n=class{getLocation(){return null}},Ln=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=Qo(t).find(i=>{if(!i.file)return!1;let o=ln(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ve(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new _n:new Ln}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Jo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function bt(e={}){let t=Mc(e);return Object.entries(t).reduce((n,[i,o])=>(Jo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Mc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Dr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Go(e,t){let r=Dr(e);return t({action:"aggregate",unpacker:r,argsMapper:bt})(e)}m();c();p();d();f();function Ic(e={}){let{select:t,...r}=e;return typeof t=="object"?bt({...r,_count:t}):bt({...r,_count:{_all:!0}})}function _c(e={}){return typeof e.select=="object"?t=>Dr(e)(t)._count:t=>Dr(e)(t)._count._all}function Wo(e,t){return t({action:"count",unpacker:_c(e),argsMapper:Ic})(e)}m();c();p();d();f();function Lc(e={}){let t=bt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Nc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Ko(e,t){return t({action:"groupBy",unpacker:Nc(e),argsMapper:Lc})(e)}function Ho(e,t,r){if(t==="aggregate")return n=>Go(n,r);if(t==="count")return n=>Wo(n,r);if(t==="groupBy")return n=>Ko(n,r)}m();c();p();d();f();function zo(e,t){let r=t.fields.filter(i=>!i.relationName),n=dn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new jt(e,o,s.type,s.isList,s.kind==="enum")},..._r(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var Yo=e=>Array.isArray(e)?e:e.split("."),Nn=(e,t)=>Yo(t).reduce((r,n)=>r&&r[n],e),Zo=(e,t,r)=>Yo(t).reduceRight((n,i,o,s)=>Object.assign({},Nn(e,s.slice(0,o)),{[i]:n}),r);function Dc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function $c(e,t,r){return t===void 0?e??{}:Zo(t,r,e||!0)}function Dn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ve(e._errorFormat),g=Dc(n,i),h=$c(l,o,g),P=r({dataPath:g,callsite:u})(h),S=Bc(e,t);return new Proxy(P,{get(C,A){if(!S.includes(A))return C[A];let _=[a[A].type,r,A],N=[g,h];return Dn(e,..._,...N)},..._r([...S,...Object.getOwnPropertyNames(P)])})}}function Bc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}m();c();p();d();f();function Xo(e,t,r,n){return e===De.ModelAction.findFirstOrThrow||e===De.ModelAction.findUniqueOrThrow?jc(t,r,n):n}function jc(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=ut({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new H(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof W&&o.code==="P2025"?new Me(`No ${e} found`,t):o})}}var qc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Uc=["aggregate","count","groupBy"];function $n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Vc(e,t),Jc(e,t),Ht(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return Ae({},n)}function Vc(e,t){let r=Pe(t),n=Object.keys(De.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Xo(o,t,e._clientVersion,s);let a=l=>u=>{let g=Ve(e._errorFormat);return e._createPrismaPromise(h=>{let P={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...P,...l})})};return qc.includes(o)?Dn(e,t,a):Qc(i)?Ho(e,i,a):a({})}}}function Qc(e){return Uc.includes(e)}function Jc(e,t){return He(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return zo(t,r)}))}m();c();p();d();f();function es(e){return e.replace(/^./,t=>t.toUpperCase())}var Bn=Symbol();function Yt(e){let t=[Gc(e),ne(Bn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Ht(r)),Ae(e,t)}function Gc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Pe),n=[...new Set(t.concat(r))];return He({getKeys(){return n},getPropertyValue(i){let o=es(i);if(e._runtimeDataModel.models[o]!==void 0)return $n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return $n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ts(e){return e[Bn]?e[Bn]:e}function rs(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Yt(t)}m();c();p();d();f();m();c();p();d();f();function ns({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(wt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(wt(u))}Wc(e,l.needs)&&s.push(Kc(l,Ae(e,s)))}return s.length>0||a.length>0?Ae(e,[...s,...a]):e}function Wc(e,t){return t.every(r=>pn(e,r))}function Kc(e,t){return He(ne(e.name,()=>e.compute(t)))}m();c();p();d();f();function $r({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=$r({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function os({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:$r({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Pe(l);return ns({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}m();c();p();d();f();m();c();p();d();f();function ss(e){if(e instanceof ae)return Hc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ss(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ds(o,l),a.args=s,ls(e,a,r,n+1)}})})}function us(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ls(e,t,s)}function cs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ps(r,n,0,e):e(r)}}function ps(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ds(i,l),ps(a,t,r+1,n)}})}var as=e=>e;function ds(e=as,t=as){return r=>e(t(r))}m();c();p();d();f();var fs=le("prisma:client"),ms={Vercel:"vercel","Netlify CI":"netlify"};function gs({postinstall:e,ciName:t,clientVersion:r}){if(fs("checkPlatformCaching:postinstall",e),fs("checkPlatformCaching:ciName",t),e===!0&&t&&t in ms){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${ms[t]}-build`;throw console.error(n),new V(n,r)}}m();c();p();d();f();function hs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var zc="Cloudflare-Workers",Yc="node";function ys(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===zc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Yc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Zc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function ws(){let e=ys();return{id:e,prettyName:Zc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();d();f();m();c();p();d();f();var jn=he(cn());m();c();p();d();f();function bs(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function Es(e){return e.split(` -`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` -`)}m();c();p();d();f();var xs=he(ji());function vs({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,xs.default)({user:t,repo:r,template:n,title:e,body:i})}function Ps({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=Ci(6e3-(s?.length??0)),l=Es((0,jn.default)(a)),u=n?`# Description -\`\`\` -${n} -\`\`\``:"",g=(0,jn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${y.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s?bs(s):""} -\`\`\` -`),h=vs({title:r,body:g});return`${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${At(h)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`}m();c();p();d();f();function Br({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new V(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new V("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();d();f();m();c();p();d();f();function Ts(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var qn=class{constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r})}async connect(t){return __PrismaProxy.connect(this.engineObject,t)}async disconnect(t){return __PrismaProxy.disconnect(this.engineObject,t)}query(t,r,n){return __PrismaProxy.execute(this.engineObject,t,r,n)}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r){return __PrismaProxy.startTransaction(this.engineObject,t,r)}async commitTransaction(t,r){return __PrismaProxy.commitTransaction(this.engineObject,t,r)}async rollbackTransaction(t,r){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}},Cs={async loadLibrary(e){if(!__PrismaProxy)throw new V("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:qn}}};var Xc="P2036",Re=le("prisma:client:libraryEngine");function ep(e){return e.item_type==="query"&&"query"in e}function tp(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var bR=[...sn,"native"],Xt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=Cs,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(rp(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new W(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new K("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new K("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this),{adapter:r}=this.config;r&&Re("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r)}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new V(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",ep(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):tp(r)?this.loggerRustPanic=new ue(Un(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Re("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Re("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new V(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Re("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new K(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof V)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ue(Un(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new K(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Re("requestBatch");let i=Lr(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Ts(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new K(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u,elapsed:0});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new ue(Un(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:Nr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===Xc&&this.config.adapter){let r=t.meta?.id;ar(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return ar(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function rp(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Un(e,t){return Ps({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function As({copyEngine:e=!0},t){let r;try{r=Br({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&Lt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Mt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s&&!1){let u;throw e?r?.startsWith("prisma://")?u=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:u=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:u=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new H(u.join(` -`),{clientVersion:t.clientVersion})}return new Xt(t)}m();c();p();d();f();function jr({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();var Rs=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var Ss=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function Et(e){try{return Os(e,"fast")}catch{return Os(e,"slow")}}function Os(e,t){return JSON.stringify(e.map(r=>Fs(r,t)))}function Fs(e,t){return Array.isArray(e)?e.map(r=>Fs(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:at(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Ee.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:np(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ms(e):e}function np(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ms(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(ks);let t={};for(let r of Object.keys(e))t[r]=ks(e[r]);return t}function ks(e){return typeof e=="bigint"?e.toString():Ms(e)}m();c();p();d();f();var ip=["$connect","$disconnect","$on","$transaction","$use","$extends"],Is=ip;var op=/^(\s*alter\s)/i,_s=le("prisma:client");function Vn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&op.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(No(r))n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Et(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ss(r),i={values:Et(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?_s(`prisma.${e}(${n}, ${i.values})`):_s(`prisma.${e}(${n})`),{query:n,parameters:i}},Ls={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ae(t,r)}},Ns={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function Jn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Ds(r(o)):Ds(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Ds(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var $s={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Gn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??$s}};function Bs(e){return e.includes("tracing")?new Gn:$s}m();c();p();d();f();function js(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();d();f();function qs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}m();c();p();d();f();var qr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};m();c();p();d();f();var Qs=he(cn());m();c();p();d();f();function Ur(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function Us(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wn(e.query.arguments)),t.push(Wn(e.query.selection)),t.join("")}function Wn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wn(n)})`:r}).join(" ")})`}m();c();p();d();f();var sp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Kn(e){return sp[e]}m();c();p();d();f();var Vr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;ize("bigint",r));case"bytes-array":return t.map(r=>ze("bytes",r));case"decimal-array":return t.map(r=>ze("decimal",r));case"datetime-array":return t.map(r=>ze("datetime",r));case"date-array":return t.map(r=>ze("date",r));case"time-array":return t.map(r=>ze("time",r));default:return t}}function Vs(e){let t=[],r=ap(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>Kn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:up(o),containsWrite:u,customDataProxyFetch:i})).map((h,P)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[P],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Js(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Kn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Us(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(lp(t),cp(t,i)||t instanceof Me)throw t;if(t instanceof W&&pp(t)){let u=Gs(t.meta);Sr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=ut({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new W(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ue(l,this.client._clientVersion);if(t instanceof K)throw new K(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof V)throw new V(l,this.client._clientVersion);if(t instanceof ue)throw new ue(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Qs.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Nn(o,s),l=i==="queryRaw"?Vs(a):ot(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function up(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Js(e)};Fe(e,"Unknown transaction kind")}}function Js(e){return{id:e.id,payload:e.payload}}function cp(e,t){return Ur(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function pp(e){return e.code==="P2009"||e.code==="P2012"}function Gs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Gs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var Ws="5.22.0";var Ks=Ws;m();c();p();d();f();var Xs=he(En());m();c();p();d();f();var B=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};re(B,"PrismaClientConstructorValidationError");var Hs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],zs=["pretty","colorless","minimal"],Ys=["info","query","warn","error"],fp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=xt(r,t)||` Available datasources: ${t.join(", ")}`;throw new B(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new B(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new B('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!jr(t).includes("driverAdapters"))throw new B('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Mt()==="binary")throw new B('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!zs.includes(e)){let t=xt(e,zs);throw new B(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ys.includes(r)){let n=xt(r,Ys);throw new B(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=xt(i,o);throw new B(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new B(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new B(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new B(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new B('"omit" option is expected to be an object.');if(e===null)throw new B('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=gp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new B(hp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new B(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=xt(r,t);throw new B(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ea(e,t){for(let[r,n]of Object.entries(e)){if(!Hs.includes(r)){let i=xt(r,Hs);throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}fp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new B('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function xt(e,t){if(t.length===0||typeof e!="string")return"";let r=mp(e,t);return r?` Did you mean "${r}"?`:""}function mp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Xs.default)(e,i)}));r.sort((i,o)=>i.distancest(n)===t);if(r)return e[r]}function hp(e,t){let r=gt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Rr(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}m();c();p();d();f();function ta(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Ur(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Qe=le("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var yp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},wp=Symbol.for("prisma.client.transaction.id"),bp={id:0,nextId(){return++this.id}};function ia(e){class t{constructor(n){this._originalClient=this;this._middlewares=new qr;this._createPrismaPromise=Jn();this.$extends=rs;e=n?.__internal?.configOverride?.(e)??e,gs(e),n&&ea(n,e);let i=new sr().on("error",()=>{});this._extensions=ht.empty(),this._previewFeatures=jr(e),this._clientVersion=e.clientVersion??Ks,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Bs(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Fn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new V(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new V("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&le.enable("prisma:client");let h=we.resolve(e.dirname,e.relativePath);ir.existsSync(h)||(h=e.dirname),Qe("dirname",e.dirname),Qe("relativePath",e.relativePath),Qe("cwd",h);let P=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:P.allowTriggerPanic,datamodelPath:we.join(e.dirname,e.filename??"schema.prisma"),prismaPath:P.binaryPath??void 0,engineEndpoint:P.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&qs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:hs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Br,getBatchRequestPayload:Lr,prismaGraphQLToJSError:Nr,PrismaClientUnknownRequestError:K,PrismaClientInitializationError:V,PrismaClientKnownRequestError:W,debug:le("prisma:client:accelerateEngine"),engineVersion:na.version,clientVersion:e.clientVersion}},Qe("clientVersion",e.clientVersion),this._engine=As(e,this._engineConfig),this._requestHandler=new Qr(this,i),l.log)for(let S of l.log){let C=typeof S=="string"?S:S.emit==="stdout"?S.level:null;C&&this.$on(C,A=>{_t.log(`${_t.tags[C]??""}`,A.message||A.query)})}this._metrics=new yt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Yt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ai()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ra(n,i);return Vn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new H("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Vn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new H(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Rs,callsite:Ve(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ra(n,i));throw new H("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new H("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=bp.nextId(),s=js(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ta(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Yt(Ae(ts(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Jn(n)),ne(wp,()=>n.id),wt(Is)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??yp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,F=>g(u,_=>(F?.end(),l(_))));let{runInTransaction:h,args:P,...S}=u,C={...n,...S};P&&(C.args=i.middlewareArgsToRequestArgs(P)),n.transaction!==void 0&&h===!1&&delete C.transaction;let A=await us(this,C);return C.model?os({result:A,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):A};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:P,customDataProxyFetch:S}){try{n=u?u(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>Fr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return le.enabled("prisma:client")&&(Qe("Prisma Client call:"),Qe(`prisma.${i}(${Vo(n)})`),Qe("Generated request:"),Qe(JSON.stringify(A,null,2)+` -`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:P,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new H("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ra(e,t){return Ep(e)?[new ae(e,t),Ls]:[e,Ns]}function Ep(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var xp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function oa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!xp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();d();f();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=react-native.js.map diff --git a/keep-notes/prisma/client-generated/runtime/wasm.js b/keep-notes/prisma/client-generated/runtime/wasm.js deleted file mode 100644 index c3ed3bd..0000000 --- a/keep-notes/prisma/client-generated/runtime/wasm.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict";var Uo=Object.create;var kt=Object.defineProperty;var qo=Object.getOwnPropertyDescriptor;var Bo=Object.getOwnPropertyNames;var $o=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(e&&(t=e(e=0)),t);var De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mt=(e,t)=>{for(var r in t)kt(e,r,{get:t[r],enumerable:!0})},rn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Bo(t))!Vo.call(e,i)&&i!==r&&kt(e,i,{get:()=>t[i],enumerable:!(n=qo(t,i))||n.enumerable});return e};var Fe=(e,t,r)=>(r=e!=null?Uo($o(e)):{},rn(t||!e||!e.__esModule?kt(r,"default",{value:e,enumerable:!0}):r,e)),jo=e=>rn(kt({},"__esModule",{value:!0}),e);function gr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new y(Wo.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new y([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new y(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,u)=>function(g=0){return B(g,"offset"),Y(g,"offset"),V(g,"offset",this.length-1),new DataView(this.buffer)[r[a]](g,u)},o=(a,u)=>function(g,T=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=Go[C];return B(T,"offset"),Y(T,"offset"),V(T,"offset",this.length-1),Jo(g,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](T,g,u),T+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(u=>{u.includes("Uint")&&(e[u.replace("Uint","UInt")]=e[u]),u.includes("Float64")&&(e[u.replace("Float64","Double")]=e[u]),u.includes("Float32")&&(e[u.replace("Float32","Float")]=e[u])})};n.forEach((a,u)=>{a.startsWith("read")&&(e[a]=i(u,!1),e[a+"LE"]=i(u,!0),e[a+"BE"]=i(u,!1)),a.startsWith("write")&&(e[a]=o(u,!1),e[a+"LE"]=o(u,!0),e[a+"BE"]=o(u,!1)),s([a,a+"LE",a+"BE"])})}function on(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function It(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function V(e,t,r=zo+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function B(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Y(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function Jo(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function nn(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Yo(e,t="utf8"){return y.from(e,t)}var y,Go,Wo,Ko,Ho,zo,b,hr,c=se(()=>{"use strict";y=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return nn(i,"encoding"),e.allocUnsafe(r).fill(n,i)}static allocUnsafe(r){return e.from(r)}static allocUnsafeSlow(r){return e.from(r)}static isBuffer(r){return r&&!!r._isBuffer}static byteLength(r,n="utf8"){if(typeof r=="string")return gr(r,n).byteLength;if(r&&r.byteLength)return r.byteLength;let i=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw i.code="ERR_INVALID_ARG_TYPE",i}static isEncoding(r){return Ho.includes(r)}static compare(r,n){It(r,"buff1"),It(n,"buff2");for(let i=0;in[i])return 1}return r.length===n.length?0:r.length>n.length?1:-1}static from(r,n="utf8"){if(r&&typeof r=="object"&&r.type==="Buffer")return new e(r.data);if(typeof r=="number")return new e(new Uint8Array(r));if(typeof r=="string")return gr(r,n);if(ArrayBuffer.isView(r)){let{byteOffset:i,byteLength:o,buffer:s}=r;return"map"in r&&typeof r.map=="function"?new e(r.map(a=>a%256),i,o):new e(s,i,o)}if(r&&typeof r=="object"&&("length"in r||"byteLength"in r||"buffer"in r))return new e(r);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(r,n){if(r.length===0)return e.alloc(0);let i=[].concat(...r.map(s=>[...s])),o=e.alloc(n!==void 0?n:i.length);return o.set(n!==void 0?i.slice(0,n):i),o}slice(r=0,n=this.length){return this.subarray(r,n)}subarray(r=0,n=this.length){return Object.setPrototypeOf(super.subarray(r,n),e.prototype)}reverse(){return super.reverse(),this}readIntBE(r,n){B(r,"offset"),Y(r,"offset"),V(r,"offset",this.length-1),B(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s=0;s--)o.setUint8(s,r&255),r=r/256;return n+i}writeUintBE(r,n,i){return this.writeUIntBE(r,n,i)}writeUIntLE(r,n,i){B(n,"offset"),Y(n,"offset"),V(n,"offset",this.length-1),B(i,"byteLength"),Y(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=0;sn===r[i])}copy(r,n=0,i=0,o=this.length){V(n,"targetStart"),V(i,"sourceStart",this.length),V(o,"sourceEnd"),n>>>=0,i>>>=0,o>>>=0;let s=0;for(;i=this.length?this.length-u:r.length),u);return this}includes(r,n=null,i="utf-8"){return this.indexOf(r,n,i)!==-1}lastIndexOf(r,n=null,i="utf-8"){return this.indexOf(r,n,i,!0)}indexOf(r,n=null,i="utf-8",o=!1){let s=o?this.findLastIndex.bind(this):this.findIndex.bind(this);i=typeof n=="string"?n:i;let a=e.from(typeof r=="number"?[r]:r,i),u=typeof n=="string"?0:n;return u=typeof n=="number"?u:null,u=Number.isNaN(u)?null:u,u??=o?this.length:0,u=u<0?this.length+u:u,a.length===0&&o===!1?u>=this.length?this.length:u:a.length===0&&o===!0?(u>=this.length?this.length:u)||this.length:s((g,T)=>(o?T<=u:T>=u)&&this[T]===a[0]&&a.every((O,A)=>this[T+A]===O))}toString(r="utf8",n=0,i=this.length){if(n=n<0?0:n,r=r.toString().toLowerCase(),i<=0)return"";if(r==="utf8"||r==="utf-8")return Ko.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+hr(a),""));return r==="base64url"?o.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):o}if(r==="binary"||r==="ascii"||r==="latin1"||r==="latin-1")return this.slice(n,i).reduce((o,s)=>o+hr(s&(r==="ascii"?127:255)),"");if(r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le"){let o=new DataView(this.buffer.slice(n,i));return Array.from({length:o.byteLength/2},(s,a)=>a*2+1o+s.toString(16).padStart(2,"0"),"");on(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Go={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},Wo=new TextEncoder,Ko=new TextDecoder,Ho=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],zo=4294967295;Qo(y.prototype);b=new Proxy(Yo,{construct(e,[t,r]){return y.from(t,r)},get(e,t){return y[t]}}),hr=String.fromCodePoint});var h,m=se(()=>{"use strict";h={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=se(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=se(()=>{"use strict";E=()=>{};E.prototype=E});var w,f=se(()=>{"use strict";w=class{constructor(t){this.value=t}deref(){return this.value}}});function un(e,t){var r,n,i,o,s,a,u,g,T=e.constructor,C=T.precision;if(!e.s||!t.s)return t.s||(t=new T(e)),U?D(t,C):t;if(u=e.d,g=t.d,s=e.e,i=t.e,u=u.slice(),o=s-i,o){for(o<0?(n=u,o=-o,a=g.length):(n=g,i=s,a=u.length),s=Math.ceil(C/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=u.length,o=g.length,a-o<0&&(o=a,n=g,g=u,u=n),r=0;o;)r=(u[--o]=u[o]+g[o]+r)/Q|0,u[o]%=Q;for(r&&(u.unshift(r),++i),a=u.length;u[--a]==0;)u.pop();return t.d=u,t.e=i,U?D(t,C):t}function le(e,t,r){if(e!==~~e||er)throw Error(Oe+e)}function ae(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(br+$(e));if(!e.s)return new T(Z);for(t==null?(U=!1,a=C):a=t,s=new T(.03125);e.abs().gte(.1);)e=e.times(s),g+=5;for(n=Math.log(Se(2,g))/Math.LN10*2+5|0,a+=n,r=i=o=new T(Z),T.precision=a;;){if(i=D(i.times(e),a),r=r.times(++u),s=o.plus(ye(i,r,a)),ae(s.d).slice(0,a)===ae(o.d).slice(0,a)){for(;g--;)o=D(o.times(o),a);return T.precision=C,t==null?(U=!0,D(o,C)):o}o=s}}function $(e){for(var t=e.e*N,r=e.d[0];r>=10;r/=10)t++;return t}function yr(e,t,r){if(t>e.LN10.sd())throw U=!0,r&&(e.precision=r),Error(re+"LN10 precision limit exceeded");return D(new e(e.LN10),t)}function Pe(e){for(var t="";e--;)t+="0";return t}function it(e,t){var r,n,i,o,s,a,u,g,T,C=1,O=10,A=e,M=A.d,S=A.constructor,I=S.precision;if(A.s<1)throw Error(re+(A.s?"NaN":"-Infinity"));if(A.eq(Z))return new S(0);if(t==null?(U=!1,g=I):g=t,A.eq(10))return t==null&&(U=!0),yr(S,g);if(g+=O,S.precision=g,r=ae(M),n=r.charAt(0),o=$(A),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=ae(A.d),n=r.charAt(0),C++;o=$(A),n>1?(A=new S("0."+r),o++):A=new S(n+"."+r.slice(1))}else return u=yr(S,g+2,I).times(o+""),A=it(new S(n+"."+r.slice(1)),g-O).plus(u),S.precision=I,t==null?(U=!0,D(A,I)):A;for(a=s=A=ye(A.minus(Z),A.plus(Z),g),T=D(A.times(A),g),i=3;;){if(s=D(s.times(T),g),u=a.plus(ye(s,new S(i),g)),ae(u.d).slice(0,g)===ae(a.d).slice(0,g))return a=a.times(2),o!==0&&(a=a.plus(yr(S,g+2,I).times(o+""))),a=ye(a,new S(C),g),S.precision=I,t==null?(U=!0,D(a,I)):a;a=u,i+=2}}function sn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ue(r/N),e.d=[],n=(r+1)%N,r<0&&(n+=N),nLt||e.e<-Lt))throw Error(br+r)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,r){var n,i,o,s,a,u,g,T,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=N,i=t,g=C[T=0];else{if(T=Math.ceil((n+1)/N),o=C.length,T>=o)return e;for(g=o=C[T],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Se(10,s-i-1),a=g/o%10|0,u=t<0||C[T+1]!==void 0||g%o,u=r<4?(a||u)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||u||r==6&&(n>0?i>0?g/Se(10,s-i):0:C[T-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return u?(o=$(e),C.length=1,t=t-o-1,C[0]=Se(10,(N-t%N)%N),e.e=Ue(-t/N)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=T,o=1,T--):(C.length=T+1,o=Se(10,N-n),C[T]=i>0?(g/Se(10,s-i)%Se(10,i)|0)*o:0),u)for(;;)if(T==0){(C[0]+=o)==Q&&(C[0]=1,++e.e);break}else{if(C[T]+=o,C[T]!=Q)break;C[T--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(U&&(e.e>Lt||e.e<-Lt))throw Error(br+$(e));return e}function mn(e,t){var r,n,i,o,s,a,u,g,T,C,O=e.constructor,A=O.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new O(e),U?D(t,A):t;if(u=e.d,C=t.d,n=t.e,g=e.e,u=u.slice(),s=g-n,s){for(T=s<0,T?(r=u,s=-s,a=C.length):(r=C,n=g,a=u.length),i=Math.max(Math.ceil(A/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=u.length,a=C.length,T=i0;--i)u[a++]=0;for(i=C.length;i>s;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Pe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Pe(-i-1)+o,r&&(n=r-s)>0&&(o+=Pe(n))):i>=s?(o+=Pe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Pe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Pe(n))),e.s<0?"-"+o:o}function an(e,t){if(e.length>t)return e.length=t,!0}function pn(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Oe+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return sn(s,o.toString())}else if(typeof o!="string")throw Error(Oe+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Zo.test(o))sn(s,o);else throw Error(Oe+o)}if(i.prototype=R,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=pn,i.config=i.set=es,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Oe+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Oe+r+": "+n);return this}var Ne,Xo,wr,U,re,Oe,br,Ue,Se,Zo,Z,Q,N,ln,Lt,R,ye,wr,_t,dn=se(()=>{"use strict";c();m();p();d();f();l();Ne=1e9,Xo={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,re="[DecimalError] ",Oe=re+"Invalid argument: ",br=re+"Exponent out of range: ",Ue=Math.floor,Se=Math.pow,Zo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Q=1e7,N=7,ln=9007199254740991,Lt=Ue(ln/N),R={};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};R.decimalPlaces=R.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*N;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};R.dividedBy=R.div=function(e){return ye(this,new this.constructor(e))};R.dividedToIntegerBy=R.idiv=function(e){var t=this,r=t.constructor;return D(ye(t,new r(e),0,1),r.precision)};R.equals=R.eq=function(e){return!this.cmp(e)};R.exponent=function(){return $(this)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){return this.cmp(e)>=0};R.isInteger=R.isint=function(){return this.e>this.d.length-2};R.isNegative=R.isneg=function(){return this.s<0};R.isPositive=R.ispos=function(){return this.s>0};R.isZero=function(){return this.s===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Z))throw Error(re+"NaN");if(r.s<1)throw Error(re+(r.s?"NaN":"-Infinity"));return r.eq(Z)?new n(0):(U=!1,t=ye(it(r,o),it(e,o),o),U=!0,D(t,i))};R.minus=R.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mn(t,e):un(t,(e.s=-e.s,e))};R.modulo=R.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(re+"NaN");return r.s?(U=!1,t=ye(r,e,0,1).times(e),U=!0,r.minus(t)):D(new n(r),i)};R.naturalExponential=R.exp=function(){return cn(this)};R.naturalLogarithm=R.ln=function(){return it(this)};R.negated=R.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};R.plus=R.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?un(t,e):mn(t,(e.s=-e.s,e))};R.precision=R.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Oe+e);if(t=$(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s,a=this,u=a.constructor;if(a.s<1){if(!a.s)return new u(0);throw Error(re+"NaN")}for(e=$(a),U=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=ae(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ue((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new u(t)):n=new u(i.toString()),r=u.precision,i=s=r+3;;)if(o=n,n=o.plus(ye(a,o,s+2)).times(.5),ae(o.d).slice(0,s)===(t=ae(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(D(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return U=!0,D(n,r)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,u,g,T=this,C=T.constructor,O=T.d,A=(e=new C(e)).d;if(!T.s||!e.s)return new C(0);for(e.s*=T.s,r=T.e+e.e,u=O.length,g=A.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+A[n]*O[i-n-1]+t,o[i--]=a%Q|0,t=a/Q|0;o[i]=(o[i]+t)%Q|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,U?D(e,C.precision):e};R.toDecimalPlaces=R.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(le(e,0,Ne),t===void 0?t=n.rounding:le(t,0,8),D(r,e+$(r)+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ke(n,!0):(le(e,0,Ne),t===void 0?t=i.rounding:le(t,0,8),n=D(new i(n),e+1,t),r=ke(n,!0,e+1)),r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?ke(i):(le(e,0,Ne),t===void 0?t=o.rounding:le(t,0,8),n=D(new o(i),e+$(i)+1,t),r=ke(n.abs(),!1,e+$(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};R.toInteger=R.toint=function(){var e=this,t=e.constructor;return D(new t(e),$(e)+1,t.rounding)};R.toNumber=function(){return+this};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,g=12,T=+(e=new u(e));if(!e.s)return new u(Z);if(a=new u(a),!a.s){if(e.s<1)throw Error(re+"Infinity");return a}if(a.eq(Z))return a;if(n=u.precision,e.eq(Z))return D(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=T<0?-T:T)<=ln){for(i=new u(Z),t=Math.ceil(n/N+4),U=!1;r%2&&(i=i.times(a),an(i.d,t)),r=Ue(r/2),r!==0;)a=a.times(a),an(a.d,t);return U=!0,e.s<0?new u(Z).div(i):D(i,n)}}else if(o<0)throw Error(re+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,U=!1,i=e.times(it(a,n+g)),U=!0,i=cn(i),i.s=o,i};R.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=$(i),n=ke(i,r<=o.toExpNeg||r>=o.toExpPos)):(le(e,1,Ne),t===void 0?t=o.rounding:le(t,0,8),i=D(new o(i),e,t),r=$(i),n=ke(i,e<=r||r<=o.toExpNeg,e)),n};R.toSignificantDigits=R.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(le(e,1,Ne),t===void 0?t=n.rounding:le(t,0,8)),D(new n(r),e,t)};R.toString=R.valueOf=R.val=R.toJSON=R[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=$(e),r=e.constructor;return ke(e,t<=r.toExpNeg||t>=r.toExpPos)};ye=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%Q|0,s=o/Q|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,u,g,T,C,O,A,M,S,I,ne,z,_e,k,Ae,fr,ie,St,Ot=n.constructor,No=n.s==i.s?1:-1,oe=n.d,q=i.d;if(!n.s)return new Ot(n);if(!i.s)throw Error(re+"Division by zero");for(u=n.e-i.e,ie=q.length,Ae=oe.length,A=new Ot(No),M=A.d=[],g=0;q[g]==(oe[g]||0);)++g;if(q[g]>(oe[g]||0)&&--u,o==null?z=o=Ot.precision:s?z=o+($(n)-$(i))+1:z=o,z<0)return new Ot(0);if(z=z/N+2|0,g=0,ie==1)for(T=0,q=q[0],z++;(g1&&(q=e(q,T),oe=e(oe,T),ie=q.length,Ae=oe.length),k=ie,S=oe.slice(0,ie),I=S.length;I=Q/2&&++fr;do T=0,a=t(q,S,ie,I),a<0?(ne=S[0],ie!=I&&(ne=ne*Q+(S[1]||0)),T=ne/fr|0,T>1?(T>=Q&&(T=Q-1),C=e(q,T),O=C.length,I=S.length,a=t(C,S,O,I),a==1&&(T--,r(C,ie{"use strict";dn();v=class extends _t{static isDecimal(t){return t instanceof _t}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new _t(`0.${n.slice(0,t)}`)}}},ue=v});function ts(){return!1}var rs,ns,yn,bn=se(()=>{"use strict";c();m();p();d();f();l();rs={},ns={existsSync:ts,promises:rs},yn=ns});function us(...e){return e.join("/")}function cs(...e){return e.join("/")}var In,ms,ps,st,Ln=se(()=>{"use strict";c();m();p();d();f();l();In="/",ms={sep:In},ps={resolve:us,posix:ms,join:cs,sep:In},st=ps});var Ut,Dn=se(()=>{"use strict";c();m();p();d();f();l();Ut=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Nn=De((Wc,Fn)=>{"use strict";c();m();p();d();f();l();Fn.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Bn=De((am,qn)=>{"use strict";c();m();p();d();f();l();qn.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Vn=De((fm,$n)=>{"use strict";c();m();p();d();f();l();var bs=Bn();$n.exports=e=>typeof e=="string"?e.replace(bs(),""):e});var kr=De((Mf,Jn)=>{"use strict";c();m();p();d();f();l();Jn.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{fa.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Ei=De(()=>{"use strict";c();m();p();d();f();l()});var ul={};Mt(ul,{Debug:()=>Tr,Decimal:()=>ue,Extensions:()=>Er,MetricsClient:()=>Ze,NotFoundError:()=>we,PrismaClientInitializationError:()=>L,PrismaClientKnownRequestError:()=>J,PrismaClientRustPanicError:()=>Ee,PrismaClientUnknownRequestError:()=>G,PrismaClientValidationError:()=>j,Public:()=>xr,Sql:()=>X,defineDmmfProperty:()=>hi,deserializeJsonResponse:()=>$e,dmmfToRuntimeDataModel:()=>gi,empty:()=>Pi,getPrismaClient:()=>_o,getRuntime:()=>Ce,join:()=>xi,makeStrictEnum:()=>Do,makeTypedQueryFactory:()=>yi,objectEnumValues:()=>Wt,raw:()=>Vr,serializeJsonQuery:()=>Zt,skip:()=>Xt,sqltag:()=>jr,warnEnvConflicts:()=>void 0,warnOnce:()=>ct});module.exports=jo(ul);c();m();p();d();f();l();var Er={};Mt(Er,{defineExtension:()=>fn,getExtensionContext:()=>gn});c();m();p();d();f();l();c();m();p();d();f();l();function fn(e){return typeof e=="function"?e:t=>t.$extends(e)}c();m();p();d();f();l();function gn(e){return e}var xr={};Mt(xr,{validator:()=>hn});c();m();p();d();f();l();c();m();p();d();f();l();function hn(...e){return t=>t}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Pr,wn,En,xn,Pn=!0;typeof h<"u"&&({FORCE_COLOR:Pr,NODE_DISABLE_COLORS:wn,NO_COLOR:En,TERM:xn}=h.env||{},Pn=h.stdout&&h.stdout.isTTY);var is={enabled:!wn&&En==null&&xn!=="dumb"&&(Pr!=null&&Pr!=="0"||Pn)};function F(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!is.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var fu=F(0,0),Dt=F(1,22),Ft=F(2,22),gu=F(3,23),vn=F(4,24),hu=F(7,27),yu=F(8,28),bu=F(9,29),wu=F(30,39),qe=F(31,39),Tn=F(32,39),Cn=F(33,39),Rn=F(34,39),Eu=F(35,39),An=F(36,39),xu=F(37,39),Sn=F(90,39),Pu=F(90,39),vu=F(40,49),Tu=F(41,49),Cu=F(42,49),Ru=F(43,49),Au=F(44,49),Su=F(45,49),Ou=F(46,49),ku=F(47,49);c();m();p();d();f();l();var os=100,On=["green","yellow","blue","magenta","cyan","red"],Nt=[],kn=Date.now(),ss=0,vr=typeof h<"u"?h.env:{};globalThis.DEBUG??=vr.DEBUG??"";globalThis.DEBUG_COLORS??=vr.DEBUG_COLORS?vr.DEBUG_COLORS==="true":!0;var ot={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function as(e){let t={color:On[ss++%On.length],enabled:ot.enabled(e),namespace:e,log:ot.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Nt.push([o,...n]),Nt.length>os&&Nt.shift(),ot.enabled(o)||i){let u=n.map(T=>typeof T=="string"?T:ls(T)),g=`+${Date.now()-kn}ms`;kn=Date.now(),a(o,...u,g)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Tr=new Proxy(as,{get:(e,t)=>ot[t],set:(e,t,r)=>ot[t]=r});function ls(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Mn(){Nt.length=0}var ee=Tr;c();m();p();d();f();l();c();m();p();d();f();l();var Cr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];c();m();p();d();f();l();var _n="library";function at(e){let t=ds();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":_n)}function ds(){let e=h.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}c();m();p();d();f();l();c();m();p();d();f();l();var Me;(t=>{let e;(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Me||={});var ut={};Mt(ut,{error:()=>hs,info:()=>gs,log:()=>fs,query:()=>ys,should:()=>Un,tags:()=>lt,warn:()=>Rr});c();m();p();d();f();l();var lt={error:qe("prisma:error"),warn:Cn("prisma:warn"),info:An("prisma:info"),query:Rn("prisma:query")},Un={warn:()=>!h.env.PRISMA_DISABLE_WARNINGS};function fs(...e){console.log(...e)}function Rr(e,...t){Un.warn()&&console.warn(`${lt.warn} ${e}`,...t)}function gs(e,...t){console.info(`${lt.info} ${e}`,...t)}function hs(e,...t){console.error(`${lt.error} ${e}`,...t)}function ys(e,...t){console.log(`${lt.query} ${e}`,...t)}c();m();p();d();f();l();function qt(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}c();m();p();d();f();l();function be(e,t){throw new Error(t)}c();m();p();d();f();l();function Ar(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();m();p();d();f();l();var Sr=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});c();m();p();d();f();l();function Be(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();m();p();d();f();l();function Or(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{jn.has(e)||(jn.add(e),Rr(t,...r))};c();m();p();d();f();l();var J=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};K(J,"PrismaClientKnownRequestError");var we=class extends J{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};K(we,"NotFoundError");c();m();p();d();f();l();var L=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};K(L,"PrismaClientInitializationError");c();m();p();d();f();l();var Ee=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};K(Ee,"PrismaClientRustPanicError");c();m();p();d();f();l();var G=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};K(G,"PrismaClientUnknownRequestError");c();m();p();d();f();l();var j=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};K(j,"PrismaClientValidationError");c();m();p();d();f();l();l();function $e(e){return e===null?e:Array.isArray(e)?e.map($e):typeof e=="object"?ws(e)?Es(e):Be(e,$e):e}function ws(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Es({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return b.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ue(t);case"Json":return JSON.parse(t);default:be(t,"Unknown tagged value")}}c();m();p();d();f();l();c();m();p();d();f();l();function Ve(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();m();p();d();f();l();function je(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Bt(e){return e.toString()!=="Invalid Date"}c();m();p();d();f();l();l();function Qe(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}c();m();p();d();f();l();c();m();p();d();f();l();var xs=Fe(Nn());var Ps={red:qe,gray:Sn,dim:Ft,bold:Dt,underline:vn,highlightSource:e=>e.highlight()},vs={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ts({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Cs({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(Rs(t))),i){a.push("");let g=[i.toString()];o&&(g.push(o),g.push(s.dim(")"))),a.push(g.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` -`)}function Rs(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Je(e){let t=e.showColors?Ps:vs,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Ts(e),Cs(r,t)}c();m();p();d();f();l();var Yn=Fe(kr());c();m();p();d();f();l();function Kn(e,t,r){let n=Hn(e),i=As(n),o=Os(i);o?$t(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Hn(e){return e.errors.flatMap(t=>t.kind==="Union"?Hn(t):[t])}function As(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Ss(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ss(e,t){return[...new Set(e.concat(t))]}function Os(e){return Or(e,(t,r)=>{let n=Gn(t),i=Gn(r);return n!==i?n-i:Wn(t)-Wn(r)})}function Gn(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Wn(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();m();p();d();f();l();var te=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};c();m();p();d();f();l();c();m();p();d();f();l();var Ge=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` -`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};c();m();p();d();f();l();c();m();p();d();f();l();var Vt=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();m();p();d();f();l();var jt=e=>e,Qt={bold:jt,red:jt,green:jt,dim:jt,enabled:!1},zn={bold:Dt,red:qe,green:Tn,dim:Ft,enabled:!0},We={write(e){e.writeLine(",")}};c();m();p();d();f();l();var ce=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};c();m();p();d();f();l();var ve=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Ke=class extends ve{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Vt(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new ce("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(We,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var He=class e extends ve{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof Ke&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new ce("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(We,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();m();p();d();f();l();var W=class extends ve{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ce(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};c();m();p();d();f();l();var mt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(We,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function $t(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Ms(e,t);break;case"IncludeOnScalar":Is(e,t);break;case"EmptySelection":Ls(e,t,r);break;case"UnknownSelectionField":Ns(e,t);break;case"InvalidSelectionValue":Us(e,t);break;case"UnknownArgument":qs(e,t);break;case"UnknownInputField":Bs(e,t);break;case"RequiredArgumentMissing":$s(e,t);break;case"InvalidArgumentType":Vs(e,t);break;case"InvalidArgumentValue":js(e,t);break;case"ValueTooLarge":Qs(e,t);break;case"SomeFieldsMissing":Js(e,t);break;case"TooManyFieldsGiven":Gs(e,t);break;case"Union":Kn(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Ms(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Is(e,t){let[r,n]=pt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new te(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${dt(s)}`:a+=".",a+=` -Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ls(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){_s(e,t,i);return}if(n.hasField("select")){Ds(e,t);return}}if(r?.[Ve(e.outputType.name)]){Fs(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function _s(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new te(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ds(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ei(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${dt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Fs(e,t){let r=new mt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new te("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=pt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let u=a?.value.asObject()??new He;u.addSuggestion(n),a.value=u}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ns(e,t){let r=ti(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":ei(n,e.outputType);break;case"include":Ws(n,e.outputType);break;case"omit":Ks(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(dt(n)),i.join(" ")})}function Us(e,t){let r=ti(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function qs(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Hs(n,e.arguments)),t.addErrorMessage(i=>Xn(i,r,e.arguments.map(o=>o.name)))}function Bs(e,t){let[r,n]=pt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ri(o,e.inputType)}t.addErrorMessage(o=>Xn(o,n,e.inputType.fields.map(s=>s.name)))}function Xn(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Ys(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(dt(e)),n.join(" ")}function $s(e,t){let r;t.addErrorMessage(u=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${u.green(o)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=pt(e.argumentPath),s=new mt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let u of e.inputTypes[0].fields)s.addField(u.name,u.typeNames.join(" | "));a.addSuggestion(new te(o,s).makeRequired())}else{let u=e.inputTypes.map(Zn).join(" | ");a.addSuggestion(new te(o,u).makeRequired())}}function Zn(e){return e.kind==="list"?`${Zn(e.elementType)}[]`:e.name}function Vs(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Jt("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function js(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Jt("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Qs(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Js(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ri(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Jt("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(dt(i)),o.join(" ")})}function Gs(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Jt("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ei(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,"true"))}function Ws(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new te(r.name,"true"))}function Ks(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new te(r.name,"true"))}function Hs(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function ti(e,t){let[r,n]=pt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),u=o?.getField(n);return o&&u?{parentKind:"select",parent:o,field:u,fieldName:n}:(u=s?.getField(n),s&&u?{parentKind:"include",field:u,parent:s,fieldName:n}:(u=a?.getField(n),a&&u?{parentKind:"omit",field:u,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ri(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function pt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function dt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Jt(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var zs=3;function Ys(e,t){let r=1/0,n;for(let i of t){let o=(0,Yn.default)(e,i);o>zs||o`}};function ze(e){return e instanceof ft}c();m();p();d();f();l();var Gt=Symbol(),Mr=new WeakMap,xe=class{constructor(t){t===Gt?Mr.set(this,`Prisma.${this._getName()}`):Mr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Mr.get(this)}},gt=class extends xe{_getNamespace(){return"NullTypes"}},ht=class extends gt{};Ir(ht,"DbNull");var yt=class extends gt{};Ir(yt,"JsonNull");var bt=class extends gt{};Ir(bt,"AnyNull");var Wt={classes:{DbNull:ht,JsonNull:yt,AnyNull:bt},instances:{DbNull:new ht(Gt),JsonNull:new yt(Gt),AnyNull:new bt(Gt)}};function Ir(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();m();p();d();f();l();var ii=": ",Kt=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+ii.length}write(t){let r=new ce(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(ii).write(this.value)}};var Lr=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` -`)}};function Ye(e){return new Lr(oi(e))}function oi(e){let t=new He;for(let[r,n]of Object.entries(e)){let i=new Kt(r,si(n));t.addField(i)}return t}function si(e){if(typeof e=="string")return new W(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new W(String(e));if(typeof e=="bigint")return new W(`${e}n`);if(e===null)return new W("null");if(e===void 0)return new W("undefined");if(Qe(e))return new W(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return b.isBuffer(e)?new W(`Buffer.alloc(${e.byteLength})`):new W(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Bt(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof xe?new W(`Prisma.${e._getName()}`):ze(e)?new W(`prisma.${ni(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Xs(e):typeof e=="object"?oi(e):new W(Object.prototype.toString.call(e))}function Xs(e){let t=new Ke;for(let r of e)t.addItem(si(r));return t}function Ht(e,t){let r=t==="pretty"?zn:Qt,n=e.renderAllMessages(r),i=new Ge(0,{colors:r}).write(e).toString();return{message:n,args:i}}function zt({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ye(e);for(let C of t)$t(C,a,s);let{message:u,args:g}=Ht(a,r),T=Je({message:u,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:g});throw new j(T,{clientVersion:o})}c();m();p();d();f();l();c();m();p();d();f();l();var me=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};c();m();p();d();f();l();function wt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}c();m();p();d();f();l();function pe(e){return e.replace(/^./,t=>t.toLowerCase())}c();m();p();d();f();l();function li(e,t,r){let n=pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Zs({...e,...ai(t.name,e,t.result.$allModels),...ai(t.name,e,t.result[n])})}function Zs(e){let t=new me,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Be(e,n=>({...n,needs:r(n.name,new Set)}))}function ai(e,t,r){return r?Be(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ea(t,o,i)})):{}}function ea(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ui(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function ci(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Yt=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new me;this.modelExtensionsCache=new me;this.queryCallbacksCache=new me;this.clientExtensions=wt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=wt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>li(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Xe=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Yt(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Yt(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};c();m();p();d();f();l();c();m();p();d();f();l();var mi=Symbol(),Et=class{constructor(t){if(t!==mi)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Xt:t}},Xt=new Et(mi);function de(e){return e instanceof Et}var ta={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},pi="explicitly `undefined` values are not allowed";function Zt({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Xe.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:u,previewFeatures:g,globalOmit:T}){let C=new _r({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:u,previewFeatures:g,globalOmit:T});return{modelName:e,action:ta[t],query:xt(r,C)}}function xt({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:fi(r,n),selection:ra(e,t,i,n)}}function ra(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),sa(e,n)):na(n,t,r)}function na(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&ia(n,t,e),e.isPreviewFeatureOn("omitApi")&&oa(n,r,e),n}function ia(e,t,r){for(let[n,i]of Object.entries(t)){if(de(i))continue;let o=r.nestSelection(n);if(Dr(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=xt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=xt(i,o)}}function oa(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=ci(i,n);for(let[s,a]of Object.entries(o)){if(de(a))continue;Dr(a,r.nestSelection(s));let u=r.findField(s);n?.[s]&&!u||(e[s]=!a)}}function sa(e,t){let r={},n=t.getComputedFields(),i=ui(e,n);for(let[o,s]of Object.entries(i)){if(de(s))continue;let a=t.nestSelection(o);Dr(s,a);let u=t.findField(o);if(!(n?.[o]&&!u)){if(s===!1||s===void 0||de(s)){r[o]=!1;continue}if(s===!0){u?.kind==="object"?r[o]=xt({},a):r[o]=!0;continue}r[o]=xt(s,a)}}return r}function di(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(je(e)){if(Bt(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ze(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return aa(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:b.from(e).toString("base64")};if(la(e))return e.values;if(Qe(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof xe){if(e!==Wt.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(ua(e))return e.toJSON();if(typeof e=="object")return fi(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function fi(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);de(i)||(i!==void 0?r[n]=di(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:pi}))}return r}function aa(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ve(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:be(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();m();p();d();f();l();var Ze=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};c();m();p();d();f();l();function gi(e){return{models:Fr(e.models),enums:Fr(e.enums),types:Fr(e.types)}}function Fr(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function hi(e,t){let r=wt(()=>ca(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ca(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Nr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();m();p();d();f();l();var Ur=new WeakMap,er="$$PrismaTypedSql",qr=class{constructor(t,r){Ur.set(this,{sql:t,values:r}),Object.defineProperty(this,er,{value:er})}get sql(){return Ur.get(this).sql}get values(){return Ur.get(this).values}};function yi(e){return(...t)=>new qr(e,t)}function bi(e){return e!=null&&e[er]===er}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();function Pt(e){return{ok:!1,error:e,map(){return Pt(e)},flatMap(){return Pt(e)}}}var Br=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},$r=e=>{let t=new Br,r=fe(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:fe(t,e.queryRaw.bind(e)),executeRaw:fe(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>ma(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=da(t,e.getConnectionInfo.bind(e))),n},ma=(e,t)=>{let r=fe(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:fe(e,t.queryRaw.bind(t)),executeRaw:fe(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>pa(e,o))}},pa=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:fe(e,t.queryRaw.bind(t)),executeRaw:fe(e,t.executeRaw.bind(t)),commit:fe(e,t.commit.bind(t)),rollback:fe(e,t.rollback.bind(t))});function fe(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Pt({kind:"GenericJs",id:i})}}}function da(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Pt({kind:"GenericJs",id:i})}}}var Lo=Fe(wi());var ek=Fe(Ei());Dn();bn();Ln();c();m();p();d();f();l();var X=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}c();m();p();d();f();l();c();m();p();d();f();l();var tr={enumerable:!0,configurable:!0,writable:!0};function rr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>tr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var vi=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=ga(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ti(Reflect.ownKeys(o),r),a=Ti(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...tr,...u?.getPropertyDescriptor(s)}:tr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[vi]=function(){let o={...this};return delete o[vi],o},i}function ga(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Ti(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();m();p();d();f();l();function et(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();m();p();d();f();l();function nr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();m();p();d();f();l();function Ci(e){if(e===void 0)return"";let t=Ye(e);return new Ge(0,{colors:Qt}).write(t).toString()}c();m();p();d();f();l();var ha="P2037";function ir({error:e,user_facing_error:t},r,n){return t.error_code?new J(ya(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new G(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ya(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===ha&&(r+=` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Qr=class{getLocation(){return null}};function Te(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Qr}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Ri={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function tt(e={}){let t=wa(e);return Object.entries(t).reduce((n,[i,o])=>(Ri[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function wa(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function or(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Ai(e,t){let r=or(e);return t({action:"aggregate",unpacker:r,argsMapper:tt})(e)}c();m();p();d();f();l();function Ea(e={}){let{select:t,...r}=e;return typeof t=="object"?tt({...r,_count:t}):tt({...r,_count:{_all:!0}})}function xa(e={}){return typeof e.select=="object"?t=>or(e)(t)._count:t=>or(e)(t)._count._all}function Si(e,t){return t({action:"count",unpacker:xa(e),argsMapper:Ea})(e)}c();m();p();d();f();l();function Pa(e={}){let t=tt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function va(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Oi(e,t){return t({action:"groupBy",unpacker:va(e),argsMapper:Pa})(e)}function ki(e,t,r){if(t==="aggregate")return n=>Ai(n,r);if(t==="count")return n=>Si(n,r);if(t==="groupBy")return n=>Oi(n,r)}c();m();p();d();f();l();function Mi(e,t){let r=t.fields.filter(i=>!i.relationName),n=Sr(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new ft(e,o,s.type,s.isList,s.kind==="enum")},...rr(Object.keys(n))})}c();m();p();d();f();l();c();m();p();d();f();l();var Ii=e=>Array.isArray(e)?e:e.split("."),Jr=(e,t)=>Ii(t).reduce((r,n)=>r&&r[n],e),Li=(e,t,r)=>Ii(t).reduceRight((n,i,o,s)=>Object.assign({},Jr(e,s.slice(0,o)),{[i]:n}),r);function Ta(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Ca(e,t,r){return t===void 0?e??{}:Li(t,r,e||!0)}function Gr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,g)=>({...u,[g.name]:g}),{});return u=>{let g=Te(e._errorFormat),T=Ta(n,i),C=Ca(u,o,T),O=r({dataPath:T,callsite:g})(C),A=Ra(e,t);return new Proxy(O,{get(M,S){if(!A.includes(S))return M[S];let ne=[a[S].type,r,S],z=[T,C];return Gr(e,...ne,...z)},...rr([...A,...Object.getOwnPropertyNames(O)])})}}function Ra(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}c();m();p();d();f();l();function _i(e,t,r,n){return e===Me.ModelAction.findFirstOrThrow||e===Me.ModelAction.findUniqueOrThrow?Aa(t,r,n):n}function Aa(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=Je({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new j(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof J&&o.code==="P2025"?new we(`No ${e} found`,t):o})}}var Sa=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Oa=["aggregate","count","groupBy"];function Wr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[ka(e,t),Ia(e,t),vt(r),H("name",()=>t),H("$name",()=>t),H("$parent",()=>e._appliedParent)];return ge({},n)}function ka(e,t){let r=pe(t),n=Object.keys(Me.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=_i(o,t,e._clientVersion,s);let a=u=>g=>{let T=Te(e._errorFormat);return e._createPrismaPromise(C=>{let O={args:g,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:T};return s({...O,...u})})};return Sa.includes(o)?Gr(e,t,a):Ma(i)?ki(e,i,a):a({})}}}function Ma(e){return Oa.includes(e)}function Ia(e,t){return Ie(H("fields",()=>{let r=e._runtimeDataModel.models[t];return Mi(t,r)}))}c();m();p();d();f();l();function Di(e){return e.replace(/^./,t=>t.toUpperCase())}var Kr=Symbol();function Tt(e){let t=[La(e),H(Kr,()=>e),H("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(vt(r)),ge(e,t)}function La(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(pe),n=[...new Set(t.concat(r))];return Ie({getKeys(){return n},getPropertyValue(i){let o=Di(i);if(e._runtimeDataModel.models[o]!==void 0)return Wr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Wr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Fi(e){return e[Kr]?e[Kr]:e}function Ni(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Tt(t)}c();m();p();d();f();l();c();m();p();d();f();l();function Ui({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let u of Object.values(o)){if(n){if(n[u.name])continue;let g=u.needs.filter(T=>n[T]);g.length>0&&a.push(et(g))}else if(r){if(!r[u.name])continue;let g=u.needs.filter(T=>!r[T]);g.length>0&&a.push(et(g))}_a(e,u.needs)&&s.push(Da(u,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function _a(e,t){return t.every(r=>Ar(e,r))}function Da(e,t){return Ie(H(e.name,()=>e.compute(t)))}c();m();p();d();f();l();function sr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sT.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let g=typeof s=="object"?s:{};t[o]=sr({visitor:i,result:t[o],args:g,modelName:u.type,runtimeDataModel:n})}}function Bi({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:sr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,u,g)=>{let T=pe(u);return Ui({result:a,modelName:T,select:g.select,omit:g.select?void 0:{...o?.[T],...g.omit},extensions:n})}})}c();m();p();d();f();l();c();m();p();d();f();l();l();function $i(e){if(e instanceof X)return Fa(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:$i(t.args??{}),__internalParams:t,query:(s,a=t)=>{let u=a.customDataProxyFetch;return a.customDataProxyFetch=Wi(o,u),a.args=s,ji(e,a,r,n+1)}})})}function Qi(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ji(e,t,s)}function Ji(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Gi(r,n,0,e):e(r)}}function Gi(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=Wi(i,u),Gi(a,t,r+1,n)}})}var Vi=e=>e;function Wi(e=Vi,t=Vi){return r=>e(t(r))}c();m();p();d();f();l();var Ki=ee("prisma:client"),Hi={Vercel:"vercel","Netlify CI":"netlify"};function zi({postinstall:e,ciName:t,clientVersion:r}){if(Ki("checkPlatformCaching:postinstall",e),Ki("checkPlatformCaching:ciName",t),e===!0&&t&&t in Hi){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Hi[t]}-build`;throw console.error(n),new L(n,r)}}c();m();p();d();f();l();function Yi(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Na="Cloudflare-Workers",Ua="node";function Xi(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Na?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Ua?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var qa={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ce(){let e=Xi();return{id:e,prettyName:qa[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();m();p();d();f();l();c();m();p();d();f();l();function ar({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ce().id==="workerd"?new L(`error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new L(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new L("error: Missing URL environment variable, value, or override.",n);return i}c();m();p();d();f();l();c();m();p();d();f();l();function Zi(e){if(e?.kind==="itx")return e.options.id}c();m();p();d();f();l();var Hr,eo={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new L(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ce().prettyName})`,t);if(n===void 0)throw new L("WASM engine was unexpectedly `undefined`",t);Hr===void 0&&(Hr=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new L("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},u=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(u.exports),o.QueryEngine})());let i=await Hr;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ba="P2036",he=ee("prisma:client:libraryEngine");function $a(e){return e.item_type==="query"&&"query"in e}function Va(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var VR=[...Cr,"native"],Rt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??eo,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(ja(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new J(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(he("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new G("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new G("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new w(this),{adapter:r}=this.config;r&&he("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:h.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r)}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new L(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",$a(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Va(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return he(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{he("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,he("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new L(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return he("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),he("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,he("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){he(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new G(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof L)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new G(`${a.message} -${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){he("requestBatch");let i=nr(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Zi(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new G(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:u}=s;if(Array.isArray(a))return a.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0]):{data:g,elapsed:0});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(s))}buildQueryError(t){t.user_facing_error.is_panic;let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:ir(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===Ba&&this.config.adapter){let r=t.meta?.id;qt(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return qt(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function ja(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}c();m();p();d();f();l();var At="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",lr=class{constructor(t){this.config=t;this.name="AccelerateEngine";this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl;this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload;this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError;this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError;this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError;this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError;this.debug=this.config.accelerateUtils?.debug;this.engineVersion=this.config.accelerateUtils?.engineVersion;this.clientVersion=this.config.accelerateUtils?.clientVersion}onBeforeExit(t){}async start(){}async stop(){}version(t){return"unknown"}transaction(t,r,n){throw new L(At,this.config.clientVersion)}metrics(t){throw new L(At,this.config.clientVersion)}request(t,r){throw new L(At,this.config.clientVersion)}requestBatch(t,r){throw new L(At,this.config.clientVersion)}applyPendingMigrations(){throw new L(At,this.config.clientVersion)}};function to({copyEngine:e=!0},t){let r;try{r=ar({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...h.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&ct("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=at(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",u=i==="binary";if(o&&s||s&&!1){let g;throw e?r?.startsWith("prisma://")?g=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:g=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:g=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new j(g.join(` -`),{clientVersion:t.clientVersion})}if(s)return new Rt(t);if(o)return new lr(t);{let g=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ce().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new j(g.join(` -`),{clientVersion:t.clientVersion})}throw new j("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}c();m();p();d();f();l();function ur({generator:e}){return e?.previewFeatures??[]}c();m();p();d();f();l();var ro=e=>({command:e});c();m();p();d();f();l();c();m();p();d();f();l();var no=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();m();p();d();f();l();l();function rt(e){try{return io(e,"fast")}catch{return io(e,"slow")}}function io(e,t){return JSON.stringify(e.map(r=>so(r,t)))}function so(e,t){return Array.isArray(e)?e.map(r=>so(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:je(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ue.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:b.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Qa(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:b.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?ao(e):e}function Qa(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ao(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(oo);let t={};for(let r of Object.keys(e))t[r]=oo(e[r]);return t}function oo(e){return typeof e=="bigint"?e.toString():ao(e)}c();m();p();d();f();l();var Ja=["$connect","$disconnect","$on","$transaction","$use","$extends"],lo=Ja;var Ga=/^(\s*alter\s)/i,uo=ee("prisma:client");function zr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Ga.exec(t))throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`)}var Yr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(bi(r))n=r.sql,i={values:rt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:rt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:rt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:rt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=no(r),i={values:rt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?uo(`prisma.${e}(${n}, ${i.values})`):uo(`prisma.${e}(${n})`),{query:n,parameters:i}},co={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},mo={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();m();p();d();f();l();function Xr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=po(r(o)):po(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function po(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();m();p();d();f();l();var fo={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Zr=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??fo}};function go(e){return e.includes("tracing")?new Zr:fo}c();m();p();d();f();l();function ho(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();m();p();d();f();l();function yo(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}c();m();p();d();f();l();var cr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};c();m();p();d();f();l();var Eo=Fe(Vn());c();m();p();d();f();l();function mr(e){return typeof e.batchRequestIdx=="number"}c();m();p();d();f();l();function bo(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(en(e.query.arguments)),t.push(en(e.query.selection)),t.join("")}function en(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${en(n)})`:r}).join(" ")})`}c();m();p();d();f();l();var Wa={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function tn(e){return Wa[e]}c();m();p();d();f();l();var pr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,h.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iLe("bigint",r));case"bytes-array":return t.map(r=>Le("bytes",r));case"decimal-array":return t.map(r=>Le("decimal",r));case"datetime-array":return t.map(r=>Le("datetime",r));case"date-array":return t.map(r=>Le("date",r));case"time-array":return t.map(r=>Le("time",r));default:return t}}function wo(e){let t=[],r=Ka(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),g=n.some(C=>tn(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:za(o),containsWrite:g,customDataProxyFetch:i})).map((C,O)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[O],C)}catch(A){return A}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?xo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:tn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:bo(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return h.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Ha(t),Ya(t,i)||t instanceof we)throw t;if(t instanceof J&&Xa(t)){let g=Po(t.meta);zt({args:o,errors:[g],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let u=t.message;if(n&&(u=Je({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:u})),u=this.sanitizeMessage(u),t.code){let g=s?{modelName:s,...t.meta}:t.meta;throw new J(u,{code:t.code,clientVersion:this.client._clientVersion,meta:g,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Ee(u,this.client._clientVersion);if(t instanceof G)throw new G(u,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof L)throw new L(u,this.client._clientVersion);if(t instanceof Ee)throw new Ee(u,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Eo.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(g=>g!=="select"&&g!=="include"),a=Jr(o,s),u=i==="queryRaw"?wo(a):$e(a);return n?n(u):u}get[Symbol.toStringTag](){return"RequestHandler"}};function za(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:xo(e)};be(e,"Unknown transaction kind")}}function xo(e){return{id:e.id,payload:e.payload}}function Ya(e,t){return mr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Xa(e){return e.code==="P2009"||e.code==="P2012"}function Po(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Po)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();m();p();d();f();l();var vo="5.22.0";var To=vo;c();m();p();d();f();l();var Oo=Fe(kr());c();m();p();d();f();l();var _=class extends Error{constructor(t){super(t+` -Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};K(_,"PrismaClientConstructorValidationError");var Co=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Ro=["pretty","colorless","minimal"],Ao=["info","query","warn","error"],el={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=nt(r,t)||` Available datasources: ${t.join(", ")}`;throw new _(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new _(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new _('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!ur(t).includes("driverAdapters"))throw new _('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(at()==="binary")throw new _('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Ro.includes(e)){let t=nt(e,Ro);throw new _(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ao.includes(r)){let n=nt(r,Ao);throw new _(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=nt(i,o);throw new _(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new _(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new _(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new _(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new _('"omit" option is expected to be an object.');if(e===null)throw new _('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=rl(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let u=o.fields.find(g=>g.name===s);if(!u){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(u.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new _(nl(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new _(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=nt(r,t);throw new _(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ko(e,t){for(let[r,n]of Object.entries(e)){if(!Co.includes(r)){let i=nt(r,Co);throw new _(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}el[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new _('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function nt(e,t){if(t.length===0||typeof e!="string")return"";let r=tl(e,t);return r?` Did you mean "${r}"?`:""}function tl(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Oo.default)(e,i)}));r.sort((i,o)=>i.distanceVe(n)===t);if(r)return e[r]}function nl(e,t){let r=Ye(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Ht(r,"colorless");return`Error validating "omit" option: - -${i} - -${n}`}c();m();p();d();f();l();function Mo(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},u=g=>{o||(o=!0,r(g))};for(let g=0;g{n[g]=T,a()},T=>{if(!mr(T)){u(T);return}T.batchRequestIdx===g?u(T):(i||(i=T),a())})})}var Re=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var il={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},ol=Symbol.for("prisma.client.transaction.id"),sl={id:0,nextId(){return++this.id}};function _o(e){class t{constructor(n){this._originalClient=this;this._middlewares=new cr;this._createPrismaPromise=Xr();this.$extends=Ni;e=n?.__internal?.configOverride?.(e)??e,zi(e),n&&ko(n,e);let i=new Ut().on("error",()=>{});this._extensions=Xe.empty(),this._previewFeatures=ur(e),this._clientVersion=e.clientVersion??To,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=go(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&st.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&st.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=$r(n.adapter);let u=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==u)throw new L(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${u}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new L("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let u=n??{},g=u.__internal??{},T=g.debug===!0;T&&ee.enable("prisma:client");let C=st.resolve(e.dirname,e.relativePath);yn.existsSync(C)||(C=e.dirname),Re("dirname",e.dirname),Re("relativePath",e.relativePath),Re("cwd",C);let O=g.engine||{};if(u.errorFormat?this._errorFormat=u.errorFormat:h.env.NODE_ENV==="production"?this._errorFormat="minimal":h.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:C,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:O.allowTriggerPanic,datamodelPath:st.join(e.dirname,e.filename??"schema.prisma"),prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:u.log&&yo(u.log),logQueries:u.log&&!!(typeof u.log=="string"?u.log==="query":u.log.find(A=>typeof A=="string"?A==="query":A.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Yi(u,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:u.transactionOptions?.maxWait??2e3,timeout:u.transactionOptions?.timeout??5e3,isolationLevel:u.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ar,getBatchRequestPayload:nr,prismaGraphQLToJSError:ir,PrismaClientUnknownRequestError:G,PrismaClientInitializationError:L,PrismaClientKnownRequestError:J,debug:ee("prisma:client:accelerateEngine"),engineVersion:Lo.version,clientVersion:e.clientVersion}},Re("clientVersion",e.clientVersion),this._engine=to(e,this._engineConfig),this._requestHandler=new dr(this,i),u.log)for(let A of u.log){let M=typeof A=="string"?A:A.emit==="stdout"?A.level:null;M&&this.$on(M,S=>{ut.log(`${ut.tags[M]??""}`,S.message||S.query)})}this._metrics=new Ze(this._engine)}catch(u){throw u.clientVersion=this._clientVersion,u}return this._appliedParent=Tt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Mn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Yr({clientMethod:i,activeProvider:a}),callsite:Te(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Io(n,i);return zr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new j("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(zr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new j(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:ro,callsite:Te(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Yr({clientMethod:i,activeProvider:a}),callsite:Te(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Io(n,i));throw new j("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new j("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=sl.nextId(),s=ho(n.length),a=n.map((u,g)=>{if(u?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let T=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:g,isolationLevel:T,lock:s};return u.requestTransaction?.(C)??u});return Mo(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let g={kind:"itx",...a};u=await n(this._createItxClient(g)),await this._engine.transaction("commit",o,a)}catch(g){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),g}return u}_createItxClient(n){return Tt(ge(Fi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>Xr(n)),H(ol,()=>n.id),et(lo)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??il,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,u=async g=>{let T=this._middlewares.get(++a);if(T)return this._tracingHelper.runInChildSpan(s.middleware,I=>T(g,ne=>(I?.end(),u(ne))));let{runInTransaction:C,args:O,...A}=g,M={...n,...A};O&&(M.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&C===!1&&delete M.transaction;let S=await Qi(this,M);return M.model?Bi({result:S,modelName:M.model,args:M.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:g,transaction:T,unpacker:C,otelParentCtx:O,customDataProxyFetch:A}){try{n=g?g(n):n;let M={name:"serialize"},S=this._tracingHelper.runInChildSpan(M,()=>Zt({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(Re("Prisma Client call:"),Re(`prisma.${i}(${Ci(n)})`),Re("Generated request:"),Re(JSON.stringify(S,null,2)+` -`)),T?.kind==="batch"&&await T.lock,this._requestHandler.request({protocolQuery:S,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:T,unpacker:C,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:A})}catch(M){throw M.clientVersion=this._clientVersion,M}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new j("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Io(e,t){return al(e)?[new X(e,t),co]:[e,mo]}function al(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();m();p();d();f();l();var ll=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Do(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!ll.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();m();p();d();f();l();l();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); -//# sourceMappingURL=wasm.js.map diff --git a/keep-notes/prisma/client-generated/schema.prisma b/keep-notes/prisma/client-generated/schema.prisma deleted file mode 100644 index 1801839..0000000 --- a/keep-notes/prisma/client-generated/schema.prisma +++ /dev/null @@ -1,264 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -generator client { - provider = "prisma-client-js" - output = "./client-generated" -} - -datasource db { - provider = "sqlite" - url = env("DATABASE_URL") -} - -model User { - id String @id @default(cuid()) - name String? - email String @unique - emailVerified DateTime? - password String? // Hashed password - role String @default("USER") // "USER" or "ADMIN" - image String? - theme String @default("light") - resetToken String? @unique - resetTokenExpiry DateTime? - accounts Account[] - sessions Session[] - notes Note[] - labels Label[] - notebooks Notebook[] // NEW: Relation to notebooks - receivedShares NoteShare[] @relation("ReceivedShares") - sentShares NoteShare[] @relation("SentShares") - - // Phase 1 AI Relations - aiFeedback AiFeedback[] - aiSettings UserAISettings? - memoryEchoInsights MemoryEchoInsight[] - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} - -model Account { - userId String - type String - provider String - providerAccountId String - refresh_token String? - access_token String? - expires_at Int? - token_type String? - scope String? - id_token String? - session_state String? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - user User @relation(fields: [userId], references: [id], onDelete: Cascade) - - @@id([provider, providerAccountId]) -} - -model Session { - sessionToken String @unique - userId String - expires DateTime - user User @relation(fields: [userId], references: [id], onDelete: Cascade) - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt -} - -model VerificationToken { - identifier String - token String - expires DateTime - - @@id([identifier, token]) -} - -// NEW: Notebook model for organizing notes -model Notebook { - id String @id @default(cuid()) - name String - icon String? // Emoji or icon name - color String? // Hex color for personalization - order Int // Manual order for drag & drop - userId String - user User @relation(fields: [userId], references: [id], onDelete: Cascade) - notes Note[] // Notes can belong to a notebook - labels Label[] // Labels are contextual to this notebook - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - @@index([userId, order]) - @@index([userId]) -} - -model Label { - id String @id @default(cuid()) - name String - color String @default("gray") - notebookId String? // TEMPORARY: Optional for migration, will be required later - notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: Cascade) - notes Note[] // NEW: Many-to-many relation with notes - userId String? // DEPRECATED: Kept for migration, will be removed after migration - user User? @relation(fields: [userId], references: [id], onDelete: Cascade) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - @@unique([notebookId, name]) // NEW: Labels are unique within a notebook (ignored if notebookId is null) - @@index([notebookId]) - @@index([userId]) // DEPRECATED: Keep for now, remove after migration -} - -model Note { - id String @id @default(cuid()) - title String? - content String - color String @default("default") - isPinned Boolean @default(false) - isArchived Boolean @default(false) - type String @default("text") // "text" or "checklist" - checkItems String? // For checklist items stored as JSON string - labels String? // Array of label names stored as JSON string (DEPRECATED) - images String? // Array of image URLs stored as JSON string - links String? // Array of link metadata stored as JSON string - reminder DateTime? // Reminder date and time - isReminderDone Boolean @default(false) - reminderRecurrence String? // "none", "daily", "weekly", "monthly", "custom" - reminderLocation String? // Location for location-based reminders - isMarkdown Boolean @default(false) // Whether content uses Markdown - size String @default("small") // "small", "medium", "large" - embedding String? // Vector embeddings stored as JSON string for semantic search - sharedWith String? // Array of user IDs (collaborators) stored as JSON string - userId String? // Owner of the note - user User? @relation(fields: [userId], references: [id], onDelete: Cascade) - shares NoteShare[] // All share records for this note - order Int @default(0) - - // NEW: Notebook relation (optional - null = "Notes générales" / Inbox) - notebookId String? // NULL = note is in general notes - notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: SetNull) - - // NEW: Many-to-many relation with labels - labelRelations Label[] // Uses implicit _NoteToLabel junction table - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // Phase 1 AI Extensions - autoGenerated Boolean? // True if title/content was AI-generated - aiProvider String? // 'openai' | 'ollama' - aiConfidence Int? // 0-100 (collected Phase 1, UI Phase 3) - language String? // ISO 639-1: 'fr', 'en', 'es', 'de', 'fa' - languageConfidence Float? // 0.0-1.0 - lastAiAnalysis DateTime? // Timestamp of last AI analysis - - // Relations for Phase 1 AI - aiFeedback AiFeedback[] - memoryEchoAsNote1 MemoryEchoInsight[] @relation("EchoNote1") - memoryEchoAsNote2 MemoryEchoInsight[] @relation("EchoNote2") - - @@index([isPinned]) - @@index([isArchived]) - @@index([order]) - @@index([reminder]) - @@index([userId]) - @@index([userId, notebookId]) // NEW: For filtering notes by notebook -} - -model NoteShare { - id String @id @default(cuid()) - noteId String - note Note @relation(fields: [noteId], references: [id], onDelete: Cascade) - userId String - user User @relation("ReceivedShares", fields: [userId], references: [id], onDelete: Cascade) - sharedBy String // User ID who shared the note - sharer User @relation("SentShares", fields: [sharedBy], references: [id], onDelete: Cascade) - status String @default("pending") // "pending", "accepted", "declined", "removed" - permission String @default("view") // "view", "comment", "edit" - notifiedAt DateTime? - respondedAt DateTime? - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - @@unique([noteId, userId]) - @@index([userId]) - @@index([status]) - @@index([sharedBy]) -} - -model SystemConfig { - key String @id - value String -} - -// Phase 1 MVP AI Models - -model AiFeedback { - id String @id @default(cuid()) - noteId String - userId String? - feedbackType String // 'thumbs_up' | 'thumbs_down' | 'correction' - feature String // 'title_suggestion' | 'memory_echo' | 'semantic_search' | 'paragraph_refactor' - originalContent String // JSON string of AI-generated content - correctedContent String? // User's modified version - metadata String? // JSON string for additional data (provider, model, timestamp) - createdAt DateTime @default(now()) - - note Note @relation(fields: [noteId], references: [id], onDelete: Cascade) - user User? @relation(fields: [userId], references: [id], onDelete: Cascade) - - @@index([noteId]) - @@index([userId]) - @@index([feature]) -} - -model MemoryEchoInsight { - id String @id @default(cuid()) - userId String? - note1Id String - note2Id String - similarityScore Float - insight String // AI-generated explanation of the connection - insightDate DateTime @default(now()) - viewed Boolean @default(false) - feedback String? // 'thumbs_up' | 'thumbs_down' - dismissed Boolean @default(false) // User dismissed this connection - - note1 Note @relation("EchoNote1", fields: [note1Id], references: [id], onDelete: Cascade) - note2 Note @relation("EchoNote2", fields: [note2Id], references: [id], onDelete: Cascade) - user User? @relation(fields: [userId], references: [id], onDelete: Cascade) - - @@unique([userId, insightDate]) - @@index([userId, insightDate]) - @@index([userId, dismissed]) // For filtering dismissed connections -} - -model UserAISettings { - userId String @id - - // Feature Flags (granular ON/OFF) - titleSuggestions Boolean @default(true) - semanticSearch Boolean @default(true) - paragraphRefactor Boolean @default(true) - memoryEcho Boolean @default(true) - - // Configuration - memoryEchoFrequency String @default("daily") // 'daily' | 'weekly' | 'custom' - aiProvider String @default("auto") // 'auto' | 'openai' | 'ollama' - preferredLanguage String @default("auto") // 'auto' | 'en' | 'fr' | 'es' | 'de' | 'fa' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'nl' | 'pl' - fontSize String @default("medium") // 'small' | 'medium' | 'large' | 'extra-large' - demoMode Boolean @default(false) // Demo mode for testing Memory Echo - - // Relation - user User @relation(fields: [userId], references: [id], onDelete: Cascade) - - // Indexes for analytics - @@index([memoryEcho]) - @@index([aiProvider]) - @@index([memoryEchoFrequency]) - @@index([preferredLanguage]) -} diff --git a/keep-notes/prisma/client-generated/wasm.d.ts b/keep-notes/prisma/client-generated/wasm.d.ts deleted file mode 100644 index bc20c6c..0000000 --- a/keep-notes/prisma/client-generated/wasm.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./index" \ No newline at end of file diff --git a/keep-notes/prisma/client-generated/wasm.js b/keep-notes/prisma/client-generated/wasm.js deleted file mode 100644 index 9370b33..0000000 --- a/keep-notes/prisma/client-generated/wasm.js +++ /dev/null @@ -1,332 +0,0 @@ - -Object.defineProperty(exports, "__esModule", { value: true }); - -const { - Decimal, - objectEnumValues, - makeStrictEnum, - Public, - getRuntime, - skip -} = require('./runtime/index-browser.js') - - -const Prisma = {} - -exports.Prisma = Prisma -exports.$Enums = {} - -/** - * Prisma Client JS version: 5.22.0 - * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 - */ -Prisma.prismaVersion = { - client: "5.22.0", - engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" -} - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.NotFoundError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.Decimal = Decimal - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.validator = Public.validator - -/** -* Extensions -*/ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, -)} - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull -Prisma.JsonNull = objectEnumValues.instances.JsonNull -Prisma.AnyNull = objectEnumValues.instances.AnyNull - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull -} - - - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - Serializable: 'Serializable' -}); - -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - name: 'name', - email: 'email', - emailVerified: 'emailVerified', - password: 'password', - role: 'role', - image: 'image', - theme: 'theme', - resetToken: 'resetToken', - resetTokenExpiry: 'resetTokenExpiry', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.AccountScalarFieldEnum = { - userId: 'userId', - type: 'type', - provider: 'provider', - providerAccountId: 'providerAccountId', - refresh_token: 'refresh_token', - access_token: 'access_token', - expires_at: 'expires_at', - token_type: 'token_type', - scope: 'scope', - id_token: 'id_token', - session_state: 'session_state', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SessionScalarFieldEnum = { - sessionToken: 'sessionToken', - userId: 'userId', - expires: 'expires', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.VerificationTokenScalarFieldEnum = { - identifier: 'identifier', - token: 'token', - expires: 'expires' -}; - -exports.Prisma.NotebookScalarFieldEnum = { - id: 'id', - name: 'name', - icon: 'icon', - color: 'color', - order: 'order', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.LabelScalarFieldEnum = { - id: 'id', - name: 'name', - color: 'color', - notebookId: 'notebookId', - userId: 'userId', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.NoteScalarFieldEnum = { - id: 'id', - title: 'title', - content: 'content', - color: 'color', - isPinned: 'isPinned', - isArchived: 'isArchived', - type: 'type', - checkItems: 'checkItems', - labels: 'labels', - images: 'images', - links: 'links', - reminder: 'reminder', - isReminderDone: 'isReminderDone', - reminderRecurrence: 'reminderRecurrence', - reminderLocation: 'reminderLocation', - isMarkdown: 'isMarkdown', - size: 'size', - embedding: 'embedding', - sharedWith: 'sharedWith', - userId: 'userId', - order: 'order', - notebookId: 'notebookId', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - autoGenerated: 'autoGenerated', - aiProvider: 'aiProvider', - aiConfidence: 'aiConfidence', - language: 'language', - languageConfidence: 'languageConfidence', - lastAiAnalysis: 'lastAiAnalysis' -}; - -exports.Prisma.NoteShareScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - sharedBy: 'sharedBy', - status: 'status', - permission: 'permission', - notifiedAt: 'notifiedAt', - respondedAt: 'respondedAt', - createdAt: 'createdAt', - updatedAt: 'updatedAt' -}; - -exports.Prisma.SystemConfigScalarFieldEnum = { - key: 'key', - value: 'value' -}; - -exports.Prisma.AiFeedbackScalarFieldEnum = { - id: 'id', - noteId: 'noteId', - userId: 'userId', - feedbackType: 'feedbackType', - feature: 'feature', - originalContent: 'originalContent', - correctedContent: 'correctedContent', - metadata: 'metadata', - createdAt: 'createdAt' -}; - -exports.Prisma.MemoryEchoInsightScalarFieldEnum = { - id: 'id', - userId: 'userId', - note1Id: 'note1Id', - note2Id: 'note2Id', - similarityScore: 'similarityScore', - insight: 'insight', - insightDate: 'insightDate', - viewed: 'viewed', - feedback: 'feedback', - dismissed: 'dismissed' -}; - -exports.Prisma.UserAISettingsScalarFieldEnum = { - userId: 'userId', - titleSuggestions: 'titleSuggestions', - semanticSearch: 'semanticSearch', - paragraphRefactor: 'paragraphRefactor', - memoryEcho: 'memoryEcho', - memoryEchoFrequency: 'memoryEchoFrequency', - aiProvider: 'aiProvider', - preferredLanguage: 'preferredLanguage', - fontSize: 'fontSize', - demoMode: 'demoMode' -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc' -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - - -exports.Prisma.ModelName = { - User: 'User', - Account: 'Account', - Session: 'Session', - VerificationToken: 'VerificationToken', - Notebook: 'Notebook', - Label: 'Label', - Note: 'Note', - NoteShare: 'NoteShare', - SystemConfig: 'SystemConfig', - AiFeedback: 'AiFeedback', - MemoryEchoInsight: 'MemoryEchoInsight', - UserAISettings: 'UserAISettings' -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message - const runtime = getRuntime() - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` - - throw new Error(message) - } - }) - } -} - -exports.PrismaClient = PrismaClient - -Object.assign(exports, Prisma)