diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index dc51e57..d5668da 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -1,10 +1,12 @@ FROM docker.arvancloud.ir/node:20-alpine # Pre-built on the developer machine: -# pnpm --filter @gold-bank/shared-types build && pnpm --filter api build:release +# pnpm build:release WORKDIR /app ENV NODE_ENV=production +# Vendored Prisma lives in ./vendor (not node_modules — that path is gitignored) +ENV NODE_PATH=/app/vendor COPY release/ ./ diff --git a/apps/api/release/vendor/.prisma/client/default.d.ts b/apps/api/release/vendor/.prisma/client/default.d.ts new file mode 100644 index 0000000..bc20c6c --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/default.d.ts @@ -0,0 +1 @@ +export * from "./index" \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/default.js b/apps/api/release/vendor/.prisma/client/default.js new file mode 100644 index 0000000..fa52f0c --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/default.js @@ -0,0 +1 @@ +module.exports = { ...require('.') } \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/deno/edge.d.ts b/apps/api/release/vendor/.prisma/client/deno/edge.d.ts new file mode 100644 index 0000000..bca0a97 --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/deno/edge.d.ts @@ -0,0 +1,9 @@ +class PrismaClient { + constructor() { + throw new Error( + '@prisma/client/deno/edge did not initialize yet. Please run "prisma generate" and try to import it again.', + ) + } +} + +export { PrismaClient } diff --git a/apps/api/release/vendor/.prisma/client/edge.d.ts b/apps/api/release/vendor/.prisma/client/edge.d.ts new file mode 100644 index 0000000..274b8fa --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/edge.d.ts @@ -0,0 +1 @@ +export * from "./default" \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/edge.js b/apps/api/release/vendor/.prisma/client/edge.js new file mode 100644 index 0000000..b424095 --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/edge.js @@ -0,0 +1,478 @@ + +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('@prisma/client/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({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.CityScalarFieldEnum = { + id: 'id', + name: 'name', + province: 'province' +}; + +exports.Prisma.AdminUserScalarFieldEnum = { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + passwordHash: 'passwordHash', + role: 'role', + branchId: 'branchId', + wagePercent: 'wagePercent', + isActive: 'isActive', + createdAt: 'createdAt' +}; + +exports.Prisma.CustomerScalarFieldEnum = { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + nationalCode: 'nationalCode', + passwordHash: 'passwordHash', + cityId: 'cityId', + referredByAgentId: 'referredByAgentId', + goldCreditLimitGrams: 'goldCreditLimitGrams', + goldDebtGrams: 'goldDebtGrams', + fiatDebtRial: 'fiatDebtRial', + verificationStep: 'verificationStep', + nationalIdImageUrl: 'nationalIdImageUrl', + businessLicenseUrl: 'businessLicenseUrl', + shopImageUrl: 'shopImageUrl', + isActive: 'isActive', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.CustomerAddressScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + addressLine: 'addressLine', + isDefault: 'isDefault' +}; + +exports.Prisma.BranchScalarFieldEnum = { + id: 'id', + name: 'name', + cityId: 'cityId' +}; + +exports.Prisma.WorkshopScalarFieldEnum = { + id: 'id', + name: 'name', + isActive: 'isActive' +}; + +exports.Prisma.CategoryScalarFieldEnum = { + id: 'id', + title: 'title', + parentId: 'parentId' +}; + +exports.Prisma.BrandScalarFieldEnum = { + id: 'id', + title: 'title' +}; + +exports.Prisma.CollectionScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + isActive: 'isActive' +}; + +exports.Prisma.CollectionProductScalarFieldEnum = { + collectionId: 'collectionId', + productId: 'productId' +}; + +exports.Prisma.ProductScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + categoryId: 'categoryId', + brandId: 'brandId', + isActive: 'isActive', + createdAt: 'createdAt' +}; + +exports.Prisma.ProductImageScalarFieldEnum = { + id: 'id', + productId: 'productId', + url: 'url', + sortOrder: 'sortOrder' +}; + +exports.Prisma.ProductVariantScalarFieldEnum = { + id: 'id', + productId: 'productId', + title: 'title', + sku: 'sku', + rashWeightGrams: 'rashWeightGrams', + defaultWagePercent: 'defaultWagePercent', + isActive: 'isActive' +}; + +exports.Prisma.OrderScalarFieldEnum = { + id: 'id', + orderNumber: 'orderNumber', + customerId: 'customerId', + branchId: 'branchId', + status: 'status', + totalGoldWeightGrams: 'totalGoldWeightGrams', + wageWeightGrams: 'wageWeightGrams', + flatRialCharge: 'flatRialCharge', + isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', + deliveredAt: 'deliveredAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.OrderItemScalarFieldEnum = { + id: 'id', + orderId: 'orderId', + productVariantId: 'productVariantId', + quantity: 'quantity', + rashWeightGramsSnapshot: 'rashWeightGramsSnapshot', + wagePercentSnapshot: 'wagePercentSnapshot', + discountPercentSnapshot: 'discountPercentSnapshot', + computedWeightGrams: 'computedWeightGrams', + flatRialCharge: 'flatRialCharge' +}; + +exports.Prisma.OrderStatusEventScalarFieldEnum = { + id: 'id', + orderId: 'orderId', + fromStatus: 'fromStatus', + toStatus: 'toStatus', + note: 'note', + actorAdminUserId: 'actorAdminUserId', + createdAt: 'createdAt' +}; + +exports.Prisma.PreOrderScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + workshopId: 'workshopId', + status: 'status', + designImageUrl: 'designImageUrl', + colorName: 'colorName', + sizeSpec: 'sizeSpec', + stoneColor: 'stoneColor', + minaColor: 'minaColor', + estimatedWeightGrams: 'estimatedWeightGrams', + estimatedPriceRial: 'estimatedPriceRial', + description: 'description', + convertedOrderId: 'convertedOrderId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.PreOrderStatusEventScalarFieldEnum = { + id: 'id', + preOrderId: 'preOrderId', + changes: 'changes', + actorAdminUserId: 'actorAdminUserId', + ipAddress: 'ipAddress', + createdAt: 'createdAt' +}; + +exports.Prisma.LedgerEntryScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + currency: 'currency', + direction: 'direction', + sourceType: 'sourceType', + amount: 'amount', + karatPerMille: 'karatPerMille', + pricePerGramRialAtEntry: 'pricePerGramRialAtEntry', + orderId: 'orderId', + confirmed: 'confirmed', + confirmedAt: 'confirmedAt', + postedByAdminUserId: 'postedByAdminUserId', + note: 'note', + createdAt: 'createdAt' +}; + +exports.Prisma.GoldPriceQuoteScalarFieldEnum = { + id: 'id', + karatPerMille: 'karatPerMille', + pricePerGramRial: 'pricePerGramRial', + source: 'source', + quotedAt: 'quotedAt' +}; + +exports.Prisma.WalletBonusScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + orderId: 'orderId', + goldGrams: 'goldGrams', + grantedAt: 'grantedAt', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + isActive: 'isActive' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.JsonNullValueInput = { + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; +exports.AdminRole = exports.$Enums.AdminRole = { + SUPER_ADMIN: 'SUPER_ADMIN', + SYSTEM_APPROVER: 'SYSTEM_APPROVER', + SALES_EXPERT: 'SALES_EXPERT', + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + ACCOUNTANT: 'ACCOUNTANT' +}; + +exports.VerificationStep = exports.$Enums.VerificationStep = { + UNVERIFIED: 'UNVERIFIED', + STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', + STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', + VERIFIED: 'VERIFIED' +}; + +exports.OrderStatus = exports.$Enums.OrderStatus = { + SUSPENDED: 'SUSPENDED', + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + SOURCING: 'SOURCING', + PREPARING: 'PREPARING', + DELIVERED_TO_AGENT: 'DELIVERED_TO_AGENT', + DELIVERED_TO_CUSTOMER: 'DELIVERED_TO_CUSTOMER', + CANCELLED: 'CANCELLED' +}; + +exports.PreOrderStatus = exports.$Enums.PreOrderStatus = { + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + WORKSHOP_APPROVED: 'WORKSHOP_APPROVED', + READY_TO_SHIP: 'READY_TO_SHIP', + DELIVERED: 'DELIVERED', + CANCELLED: 'CANCELLED' +}; + +exports.LedgerCurrency = exports.$Enums.LedgerCurrency = { + GOLD_GRAM: 'GOLD_GRAM', + RIAL: 'RIAL' +}; + +exports.LedgerDirection = exports.$Enums.LedgerDirection = { + DEBIT: 'DEBIT', + CREDIT: 'CREDIT' +}; + +exports.LedgerSourceType = exports.$Enums.LedgerSourceType = { + ORDER_STOCK: 'ORDER_STOCK', + ORDER_PRE_ORDER: 'ORDER_PRE_ORDER', + REPAYMENT_MELTED_GOLD: 'REPAYMENT_MELTED_GOLD', + REPAYMENT_TRANSFER: 'REPAYMENT_TRANSFER', + REPAYMENT_CHEQUE: 'REPAYMENT_CHEQUE', + REPAYMENT_CASH: 'REPAYMENT_CASH', + WALLET_BONUS: 'WALLET_BONUS', + ADJUSTMENT: 'ADJUSTMENT' +}; + +exports.Prisma.ModelName = { + City: 'City', + AdminUser: 'AdminUser', + Customer: 'Customer', + CustomerAddress: 'CustomerAddress', + Branch: 'Branch', + Workshop: 'Workshop', + Category: 'Category', + Brand: 'Brand', + Collection: 'Collection', + CollectionProduct: 'CollectionProduct', + Product: 'Product', + ProductImage: 'ProductImage', + ProductVariant: 'ProductVariant', + Order: 'Order', + OrderItem: 'OrderItem', + OrderStatusEvent: 'OrderStatusEvent', + PreOrder: 'PreOrder', + PreOrderStatusEvent: 'PreOrderStatusEvent', + LedgerEntry: 'LedgerEntry', + GoldPriceQuote: 'GoldPriceQuote', + WalletBonus: 'WalletBonus' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "C:\\App\\gold-bank\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", + "fromEnvVar": null + }, + "config": { + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "windows", + "native": true + }, + { + "fromEnvVar": null, + "value": "linux-musl-openssl-3.0.x" + } + ], + "previewFeatures": [], + "sourceFilePath": "C:\\App\\gold-bank\\apps\\api\\prisma\\schema.prisma" + }, + "relativeEnvPaths": { + "rootEnvPath": null + }, + "relativePath": "../../../../../../apps/api/prisma", + "clientVersion": "5.22.0", + "engineVersion": "605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "// Gold Banking System — core schema\n// Canonical accounting model: legacy \"System A\" gram ledger (see migration notes).\n// The external \"Tahesab\" service is retired — LedgerEntry is the sole source of truth.\n// All money/weight fields use Decimal, never Float, to avoid rounding drift in debt math.\n\ngenerator client {\n provider = \"prisma-client-js\"\n // native = local Windows/macOS build; linux-musl = Arvan/Alpine Docker runtime\n binaryTargets = [\"native\", \"linux-musl-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Enums\n// ─────────────────────────────────────────────────────────────────────────\n\nenum AdminRole {\n SUPER_ADMIN\n SYSTEM_APPROVER // legacy: تایید مدیر سیستم\n SALES_EXPERT // legacy Customer.type=1, also acts as a referral \"reagent\"\n WORKSHOP_SUPERVISOR\n ACCOUNTANT\n}\n\nenum VerificationStep {\n UNVERIFIED\n STEP_ONE_SUBMITTED\n STEP_TWO_SUBMITTED\n VERIFIED\n}\n\nenum OrderStatus {\n SUSPENDED // credit limit (goldCreditLimitGrams) exceeded at placement\n PLACED\n ADMIN_APPROVED\n SOURCING\n PREPARING\n DELIVERED_TO_AGENT\n DELIVERED_TO_CUSTOMER // debt recognition point — mirrors legacy sts>4\n CANCELLED\n}\n\nenum PreOrderStatus {\n PLACED\n ADMIN_APPROVED\n WORKSHOP_APPROVED\n READY_TO_SHIP\n DELIVERED\n CANCELLED\n}\n\nenum LedgerCurrency {\n GOLD_GRAM\n RIAL\n}\n\nenum LedgerDirection {\n DEBIT // increases what the customer owes\n CREDIT // decreases what the customer owes\n}\n\nenum LedgerSourceType {\n ORDER_STOCK\n ORDER_PRE_ORDER\n REPAYMENT_MELTED_GOLD // karat-normalized: amount * karatPerMille / 750\n REPAYMENT_TRANSFER\n REPAYMENT_CHEQUE\n REPAYMENT_CASH // price-per-gram-normalized via pricePerGramRialAtEntry\n WALLET_BONUS\n ADJUSTMENT\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Identity\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel City {\n id String @id @default(cuid())\n name String\n province String?\n customers Customer[]\n addresses CustomerAddress[]\n branches Branch[]\n preOrders PreOrder[]\n}\n\nmodel AdminUser {\n id String @id @default(cuid())\n fullName String\n mobile String @unique\n passwordHash String\n role AdminRole\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n wagePercent Decimal? @db.Decimal(6, 3) // legacy Customer.percent, commission on referred orders\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n referredCustomers Customer[] @relation(\"ReferralAgent\")\n postedLedgerEntries LedgerEntry[]\n orderStatusEvents OrderStatusEvent[]\n preOrderStatusEvents PreOrderStatusEvent[]\n\n @@index([role])\n}\n\nmodel Customer {\n id String @id @default(cuid())\n fullName String\n mobile String @unique\n nationalCode String @unique\n passwordHash String\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n\n referredByAgentId String?\n referredByAgent AdminUser? @relation(\"ReferralAgent\", fields: [referredByAgentId], references: [id])\n\n // Credit limit + cached ledger balances (source of truth is LedgerEntry; these\n // are denormalized for fast reads and reconciled by a scheduled job).\n goldCreditLimitGrams Decimal @default(0) @db.Decimal(14, 4) // legacy gram_level\n goldDebtGrams Decimal @default(0) @db.Decimal(14, 4) // legacy remain\n fiatDebtRial Decimal @default(0) @db.Decimal(20, 2) // legacy rial_remain\n\n verificationStep VerificationStep @default(UNVERIFIED)\n nationalIdImageUrl String?\n businessLicenseUrl String?\n shopImageUrl String?\n\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n addresses CustomerAddress[]\n orders Order[]\n preOrders PreOrder[]\n ledgerEntries LedgerEntry[]\n walletBonuses WalletBonus[]\n\n @@index([referredByAgentId])\n}\n\nmodel CustomerAddress {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n addressLine String\n isDefault Boolean @default(false)\n}\n\nmodel Branch {\n id String @id @default(cuid())\n name String\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n adminUsers AdminUser[]\n orders Order[]\n}\n\nmodel Workshop {\n id String @id @default(cuid())\n name String\n isActive Boolean @default(true)\n preOrders PreOrder[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Catalog — item reference catalog\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Category {\n id String @id @default(cuid())\n title String\n parentId String?\n parent Category? @relation(\"CategoryTree\", fields: [parentId], references: [id])\n children Category[] @relation(\"CategoryTree\")\n products Product[]\n}\n\nmodel Brand {\n id String @id @default(cuid())\n title String\n products Product[]\n}\n\n/// Curated product groupings — replaces legacy \"Ciny/CinyProduct\" (a tagging\n/// feature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\nmodel Collection {\n id String @id @default(cuid())\n title String\n description String?\n isActive Boolean @default(true)\n products CollectionProduct[]\n}\n\nmodel CollectionProduct {\n collectionId String\n collection Collection @relation(fields: [collectionId], references: [id])\n productId String\n product Product @relation(fields: [productId], references: [id])\n\n @@id([collectionId, productId])\n}\n\nmodel Product {\n id String @id @default(cuid())\n title String\n description String?\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n variants ProductVariant[]\n images ProductImage[]\n collections CollectionProduct[]\n}\n\nmodel ProductImage {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n url String\n sortOrder Int @default(0)\n}\n\nmodel ProductVariant {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n title String\n sku String? @unique\n /// Base/raw weight before making charge (\"rash weight\").\n rashWeightGrams Decimal @db.Decimal(14, 4)\n /// Default making-charge percentage applied on top of rash weight.\n defaultWagePercent Decimal @db.Decimal(6, 3)\n isActive Boolean @default(true)\n\n orderItems OrderItem[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Orders — stock orders (debt-bearing)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Order {\n id String @id @default(cuid())\n orderNumber String @unique\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n status OrderStatus @default(PLACED)\n\n /// Total gold weight incl. wage across all items (\"allGram\" / order.w).\n totalGoldWeightGrams Decimal @db.Decimal(14, 4)\n /// Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\n wageWeightGrams Decimal @db.Decimal(14, 4)\n /// Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n\n isSuspendedOverCreditLimit Boolean @default(false)\n deliveredAt DateTime? // setting this is what triggers debt recognition\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n items OrderItem[]\n statusEvents OrderStatusEvent[]\n ledgerEntries LedgerEntry[]\n convertedFromPreOrder PreOrder?\n\n @@index([customerId])\n @@index([status])\n}\n\nmodel OrderItem {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n productVariantId String\n productVariant ProductVariant @relation(fields: [productVariantId], references: [id])\n quantity Int\n\n // Snapshots at order time — never re-read from ProductVariant after placement.\n rashWeightGramsSnapshot Decimal @db.Decimal(14, 4)\n wagePercentSnapshot Decimal @db.Decimal(6, 3)\n discountPercentSnapshot Decimal @default(0) @db.Decimal(6, 3)\n /// computed: rash*(1 + (wagePercent-discount)/100)\n computedWeightGrams Decimal @db.Decimal(14, 4)\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n}\n\nmodel OrderStatusEvent {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n fromStatus OrderStatus?\n toStatus OrderStatus\n note String?\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n createdAt DateTime @default(now())\n\n @@index([orderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Pre-orders — custom manufacturing requests (not debt-bearing until converted)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel PreOrder {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n workshopId String?\n workshop Workshop? @relation(fields: [workshopId], references: [id])\n status PreOrderStatus @default(PLACED)\n\n designImageUrl String?\n colorName String?\n sizeSpec String?\n stoneColor String?\n minaColor String?\n estimatedWeightGrams Decimal? @db.Decimal(14, 4)\n estimatedPriceRial Decimal? @db.Decimal(20, 2)\n description String?\n\n /// Once priced, an admin converts this into a real (debt-bearing) Order.\n convertedOrderId String? @unique\n convertedOrder Order? @relation(fields: [convertedOrderId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n statusEvents PreOrderStatusEvent[]\n\n @@index([customerId])\n}\n\nmodel PreOrderStatusEvent {\n id String @id @default(cuid())\n preOrderId String\n preOrder PreOrder @relation(fields: [preOrderId], references: [id])\n /// Field-level diff, e.g. {\"status\": {\"old\": \"PLACED\", \"new\": \"ADMIN_APPROVED\"}}\n changes Json\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n ipAddress String?\n createdAt DateTime @default(now())\n\n @@index([preOrderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Accounting — the dual-currency ledger (core of the system)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel LedgerEntry {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n\n currency LedgerCurrency\n direction LedgerDirection\n sourceType LedgerSourceType\n /// Always positive; direction determines the sign applied to the customer balance.\n amount Decimal @db.Decimal(20, 4)\n\n /// Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\n karatPerMille Int?\n /// Gold price/gram at conversion time, for REPAYMENT_CASH.\n pricePerGramRialAtEntry Decimal? @db.Decimal(20, 2)\n\n orderId String?\n order Order? @relation(fields: [orderId], references: [id])\n\n /// Pending entries don't count toward the cached customer balance until confirmed.\n confirmed Boolean @default(false)\n confirmedAt DateTime?\n postedByAdminUserId String?\n postedByAdminUser AdminUser? @relation(fields: [postedByAdminUserId], references: [id])\n\n note String?\n createdAt DateTime @default(now())\n\n @@index([customerId, currency])\n @@index([orderId])\n}\n\n/// Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\nmodel GoldPriceQuote {\n id String @id @default(cuid())\n karatPerMille Int\n pricePerGramRial Decimal @db.Decimal(20, 2)\n source String\n quotedAt DateTime @default(now())\n\n @@index([karatPerMille, quotedAt])\n}\n\n/// Time-limited gold cashback bonus — replaces the legacy Rooyesh\\Wallet gold credit.\nmodel WalletBonus {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n orderId String?\n goldGrams Decimal @db.Decimal(14, 4)\n grantedAt DateTime @default(now())\n expiresAt DateTime\n consumedAt DateTime?\n isActive Boolean @default(true)\n\n @@index([customerId, isActive])\n}\n", + "inlineSchemaHash": "a66f1e6dda15d2844c43af681c7a944b20fa3bef306bf60c9ab2ee23322951df", + "copyEngine": true +} +config.dirname = '/' + +config.runtimeDataModel = JSON.parse("{\"models\":{\"City\":{\"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\":\"province\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AdminUser\":{\"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\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminRole\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"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\":\"referredCustomers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedLedgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Customer\":{\"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\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredByAgentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredByAgent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[\"referredByAgentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldCreditLimitGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldDebtGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiatDebtRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"verificationStep\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"VerificationStep\",\"default\":\"UNVERIFIED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalIdImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"businessLicenseUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shopImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"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\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"walletBonuses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"WalletBonus\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CustomerAddress\":{\"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\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addressLine\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Branch\":{\"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\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Workshop\":{\"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\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"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\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[\"parentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"children\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Brand\":{\"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\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Collection\":{\"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\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Curated product groupings — replaces legacy \\\"Ciny/CinyProduct\\\" (a tagging\\\\nfeature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\"},\"CollectionProduct\":{\"dbName\":null,\"fields\":[{\"name\":\"collectionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collection\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Collection\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[\"collectionId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"collectionId\",\"productId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Product\":{\"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\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"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\":\"variants\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductImage\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collections\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductImage\":{\"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\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sortOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductVariant\":{\"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\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sku\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Base/raw weight before making charge (\\\"rash weight\\\").\"},{\"name\":\"defaultWagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Default making-charge percentage applied on top of rash weight.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Order\":{\"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\":\"orderNumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalGoldWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Total gold weight incl. wage across all items (\\\"allGram\\\" / order.w).\"},{\"name\":\"wageWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\"},{\"name\":\"isSuspendedOverCreditLimit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deliveredAt\",\"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},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedFromPreOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderItem\":{\"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\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariantId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariant\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[\"productVariantId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quantity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGramsSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"computedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"computed: rash*(1 + (wagePercent-discount)/100)\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderStatusEvent\":{\"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\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fromStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"toStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"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}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrder\":{\"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\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshopId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshop\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[\"workshopId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PreOrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"colorName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeSpec\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stoneColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"minaColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedPriceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Once priced, an admin converts this into a real (debt-bearing) Order.\"},{\"name\":\"convertedOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[\"convertedOrderId\"],\"relationToFields\":[\"id\"],\"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\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrderStatusEvent\":{\"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\":\"preOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[\"preOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"changes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Field-level diff, e.g. {\\\"status\\\": {\\\"old\\\": \\\"PLACED\\\", \\\"new\\\": \\\"ADMIN_APPROVED\\\"}}\"},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"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}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"LedgerEntry\":{\"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\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currency\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerCurrency\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"direction\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerDirection\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sourceType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerSourceType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Always positive; direction determines the sign applied to the customer balance.\"},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\"},{\"name\":\"pricePerGramRialAtEntry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Gold price/gram at conversion time, for REPAYMENT_CASH.\"},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pending entries don't count toward the cached customer balance until confirmed.\"},{\"name\":\"confirmedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[\"postedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"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}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"GoldPriceQuote\":{\"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\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pricePerGramRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"source\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quotedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\"},\"WalletBonus\":{\"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\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"grantedAt\",\"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\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Time-limited gold cashback bonus — replaces the legacy Rooyesh\\\\Wallet gold credit.\"}},\"enums\":{\"AdminRole\":{\"values\":[{\"name\":\"SUPER_ADMIN\",\"dbName\":null},{\"name\":\"SYSTEM_APPROVER\",\"dbName\":null},{\"name\":\"SALES_EXPERT\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null},{\"name\":\"ACCOUNTANT\",\"dbName\":null}],\"dbName\":null},\"VerificationStep\":{\"values\":[{\"name\":\"UNVERIFIED\",\"dbName\":null},{\"name\":\"STEP_ONE_SUBMITTED\",\"dbName\":null},{\"name\":\"STEP_TWO_SUBMITTED\",\"dbName\":null},{\"name\":\"VERIFIED\",\"dbName\":null}],\"dbName\":null},\"OrderStatus\":{\"values\":[{\"name\":\"SUSPENDED\",\"dbName\":null},{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"SOURCING\",\"dbName\":null},{\"name\":\"PREPARING\",\"dbName\":null},{\"name\":\"DELIVERED_TO_AGENT\",\"dbName\":null},{\"name\":\"DELIVERED_TO_CUSTOMER\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"PreOrderStatus\":{\"values\":[{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"WORKSHOP_APPROVED\",\"dbName\":null},{\"name\":\"READY_TO_SHIP\",\"dbName\":null},{\"name\":\"DELIVERED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"LedgerCurrency\":{\"values\":[{\"name\":\"GOLD_GRAM\",\"dbName\":null},{\"name\":\"RIAL\",\"dbName\":null}],\"dbName\":null},\"LedgerDirection\":{\"values\":[{\"name\":\"DEBIT\",\"dbName\":null},{\"name\":\"CREDIT\",\"dbName\":null}],\"dbName\":null},\"LedgerSourceType\":{\"values\":[{\"name\":\"ORDER_STOCK\",\"dbName\":null},{\"name\":\"ORDER_PRE_ORDER\",\"dbName\":null},{\"name\":\"REPAYMENT_MELTED_GOLD\",\"dbName\":null},{\"name\":\"REPAYMENT_TRANSFER\",\"dbName\":null},{\"name\":\"REPAYMENT_CHEQUE\",\"dbName\":null},{\"name\":\"REPAYMENT_CASH\",\"dbName\":null},{\"name\":\"WALLET_BONUS\",\"dbName\":null},{\"name\":\"ADJUSTMENT\",\"dbName\":null}],\"dbName\":null}},\"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/apps/api/release/vendor/.prisma/client/index-browser.js b/apps/api/release/vendor/.prisma/client/index-browser.js new file mode 100644 index 0000000..2152108 --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/index-browser.js @@ -0,0 +1,467 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, + skip +} = require('@prisma/client/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({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.CityScalarFieldEnum = { + id: 'id', + name: 'name', + province: 'province' +}; + +exports.Prisma.AdminUserScalarFieldEnum = { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + passwordHash: 'passwordHash', + role: 'role', + branchId: 'branchId', + wagePercent: 'wagePercent', + isActive: 'isActive', + createdAt: 'createdAt' +}; + +exports.Prisma.CustomerScalarFieldEnum = { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + nationalCode: 'nationalCode', + passwordHash: 'passwordHash', + cityId: 'cityId', + referredByAgentId: 'referredByAgentId', + goldCreditLimitGrams: 'goldCreditLimitGrams', + goldDebtGrams: 'goldDebtGrams', + fiatDebtRial: 'fiatDebtRial', + verificationStep: 'verificationStep', + nationalIdImageUrl: 'nationalIdImageUrl', + businessLicenseUrl: 'businessLicenseUrl', + shopImageUrl: 'shopImageUrl', + isActive: 'isActive', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.CustomerAddressScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + addressLine: 'addressLine', + isDefault: 'isDefault' +}; + +exports.Prisma.BranchScalarFieldEnum = { + id: 'id', + name: 'name', + cityId: 'cityId' +}; + +exports.Prisma.WorkshopScalarFieldEnum = { + id: 'id', + name: 'name', + isActive: 'isActive' +}; + +exports.Prisma.CategoryScalarFieldEnum = { + id: 'id', + title: 'title', + parentId: 'parentId' +}; + +exports.Prisma.BrandScalarFieldEnum = { + id: 'id', + title: 'title' +}; + +exports.Prisma.CollectionScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + isActive: 'isActive' +}; + +exports.Prisma.CollectionProductScalarFieldEnum = { + collectionId: 'collectionId', + productId: 'productId' +}; + +exports.Prisma.ProductScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + categoryId: 'categoryId', + brandId: 'brandId', + isActive: 'isActive', + createdAt: 'createdAt' +}; + +exports.Prisma.ProductImageScalarFieldEnum = { + id: 'id', + productId: 'productId', + url: 'url', + sortOrder: 'sortOrder' +}; + +exports.Prisma.ProductVariantScalarFieldEnum = { + id: 'id', + productId: 'productId', + title: 'title', + sku: 'sku', + rashWeightGrams: 'rashWeightGrams', + defaultWagePercent: 'defaultWagePercent', + isActive: 'isActive' +}; + +exports.Prisma.OrderScalarFieldEnum = { + id: 'id', + orderNumber: 'orderNumber', + customerId: 'customerId', + branchId: 'branchId', + status: 'status', + totalGoldWeightGrams: 'totalGoldWeightGrams', + wageWeightGrams: 'wageWeightGrams', + flatRialCharge: 'flatRialCharge', + isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', + deliveredAt: 'deliveredAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.OrderItemScalarFieldEnum = { + id: 'id', + orderId: 'orderId', + productVariantId: 'productVariantId', + quantity: 'quantity', + rashWeightGramsSnapshot: 'rashWeightGramsSnapshot', + wagePercentSnapshot: 'wagePercentSnapshot', + discountPercentSnapshot: 'discountPercentSnapshot', + computedWeightGrams: 'computedWeightGrams', + flatRialCharge: 'flatRialCharge' +}; + +exports.Prisma.OrderStatusEventScalarFieldEnum = { + id: 'id', + orderId: 'orderId', + fromStatus: 'fromStatus', + toStatus: 'toStatus', + note: 'note', + actorAdminUserId: 'actorAdminUserId', + createdAt: 'createdAt' +}; + +exports.Prisma.PreOrderScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + workshopId: 'workshopId', + status: 'status', + designImageUrl: 'designImageUrl', + colorName: 'colorName', + sizeSpec: 'sizeSpec', + stoneColor: 'stoneColor', + minaColor: 'minaColor', + estimatedWeightGrams: 'estimatedWeightGrams', + estimatedPriceRial: 'estimatedPriceRial', + description: 'description', + convertedOrderId: 'convertedOrderId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.PreOrderStatusEventScalarFieldEnum = { + id: 'id', + preOrderId: 'preOrderId', + changes: 'changes', + actorAdminUserId: 'actorAdminUserId', + ipAddress: 'ipAddress', + createdAt: 'createdAt' +}; + +exports.Prisma.LedgerEntryScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + currency: 'currency', + direction: 'direction', + sourceType: 'sourceType', + amount: 'amount', + karatPerMille: 'karatPerMille', + pricePerGramRialAtEntry: 'pricePerGramRialAtEntry', + orderId: 'orderId', + confirmed: 'confirmed', + confirmedAt: 'confirmedAt', + postedByAdminUserId: 'postedByAdminUserId', + note: 'note', + createdAt: 'createdAt' +}; + +exports.Prisma.GoldPriceQuoteScalarFieldEnum = { + id: 'id', + karatPerMille: 'karatPerMille', + pricePerGramRial: 'pricePerGramRial', + source: 'source', + quotedAt: 'quotedAt' +}; + +exports.Prisma.WalletBonusScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + orderId: 'orderId', + goldGrams: 'goldGrams', + grantedAt: 'grantedAt', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + isActive: 'isActive' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.JsonNullValueInput = { + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; +exports.AdminRole = exports.$Enums.AdminRole = { + SUPER_ADMIN: 'SUPER_ADMIN', + SYSTEM_APPROVER: 'SYSTEM_APPROVER', + SALES_EXPERT: 'SALES_EXPERT', + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + ACCOUNTANT: 'ACCOUNTANT' +}; + +exports.VerificationStep = exports.$Enums.VerificationStep = { + UNVERIFIED: 'UNVERIFIED', + STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', + STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', + VERIFIED: 'VERIFIED' +}; + +exports.OrderStatus = exports.$Enums.OrderStatus = { + SUSPENDED: 'SUSPENDED', + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + SOURCING: 'SOURCING', + PREPARING: 'PREPARING', + DELIVERED_TO_AGENT: 'DELIVERED_TO_AGENT', + DELIVERED_TO_CUSTOMER: 'DELIVERED_TO_CUSTOMER', + CANCELLED: 'CANCELLED' +}; + +exports.PreOrderStatus = exports.$Enums.PreOrderStatus = { + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + WORKSHOP_APPROVED: 'WORKSHOP_APPROVED', + READY_TO_SHIP: 'READY_TO_SHIP', + DELIVERED: 'DELIVERED', + CANCELLED: 'CANCELLED' +}; + +exports.LedgerCurrency = exports.$Enums.LedgerCurrency = { + GOLD_GRAM: 'GOLD_GRAM', + RIAL: 'RIAL' +}; + +exports.LedgerDirection = exports.$Enums.LedgerDirection = { + DEBIT: 'DEBIT', + CREDIT: 'CREDIT' +}; + +exports.LedgerSourceType = exports.$Enums.LedgerSourceType = { + ORDER_STOCK: 'ORDER_STOCK', + ORDER_PRE_ORDER: 'ORDER_PRE_ORDER', + REPAYMENT_MELTED_GOLD: 'REPAYMENT_MELTED_GOLD', + REPAYMENT_TRANSFER: 'REPAYMENT_TRANSFER', + REPAYMENT_CHEQUE: 'REPAYMENT_CHEQUE', + REPAYMENT_CASH: 'REPAYMENT_CASH', + WALLET_BONUS: 'WALLET_BONUS', + ADJUSTMENT: 'ADJUSTMENT' +}; + +exports.Prisma.ModelName = { + City: 'City', + AdminUser: 'AdminUser', + Customer: 'Customer', + CustomerAddress: 'CustomerAddress', + Branch: 'Branch', + Workshop: 'Workshop', + Category: 'Category', + Brand: 'Brand', + Collection: 'Collection', + CollectionProduct: 'CollectionProduct', + Product: 'Product', + ProductImage: 'ProductImage', + ProductVariant: 'ProductVariant', + Order: 'Order', + OrderItem: 'OrderItem', + OrderStatusEvent: 'OrderStatusEvent', + PreOrder: 'PreOrder', + PreOrderStatusEvent: 'PreOrderStatusEvent', + LedgerEntry: 'LedgerEntry', + GoldPriceQuote: 'GoldPriceQuote', + WalletBonus: 'WalletBonus' +}; + +/** + * 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/apps/api/release/vendor/.prisma/client/index.d.ts b/apps/api/release/vendor/.prisma/client/index.d.ts new file mode 100644 index 0000000..30e3f1c --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/index.d.ts @@ -0,0 +1,36993 @@ + +/** + * Client +**/ + +import * as runtime from '@prisma/client/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 City + * + */ +export type City = $Result.DefaultSelection +/** + * Model AdminUser + * + */ +export type AdminUser = $Result.DefaultSelection +/** + * Model Customer + * + */ +export type Customer = $Result.DefaultSelection +/** + * Model CustomerAddress + * + */ +export type CustomerAddress = $Result.DefaultSelection +/** + * Model Branch + * + */ +export type Branch = $Result.DefaultSelection +/** + * Model Workshop + * + */ +export type Workshop = $Result.DefaultSelection +/** + * Model Category + * + */ +export type Category = $Result.DefaultSelection +/** + * Model Brand + * + */ +export type Brand = $Result.DefaultSelection +/** + * Model Collection + * Curated product groupings — replaces legacy "Ciny/CinyProduct" (a tagging + * feature, NOT a gold-price snapshot mechanism, despite the misleading legacy name). + */ +export type Collection = $Result.DefaultSelection +/** + * Model CollectionProduct + * + */ +export type CollectionProduct = $Result.DefaultSelection +/** + * Model Product + * + */ +export type Product = $Result.DefaultSelection +/** + * Model ProductImage + * + */ +export type ProductImage = $Result.DefaultSelection +/** + * Model ProductVariant + * + */ +export type ProductVariant = $Result.DefaultSelection +/** + * Model Order + * + */ +export type Order = $Result.DefaultSelection +/** + * Model OrderItem + * + */ +export type OrderItem = $Result.DefaultSelection +/** + * Model OrderStatusEvent + * + */ +export type OrderStatusEvent = $Result.DefaultSelection +/** + * Model PreOrder + * + */ +export type PreOrder = $Result.DefaultSelection +/** + * Model PreOrderStatusEvent + * + */ +export type PreOrderStatusEvent = $Result.DefaultSelection +/** + * Model LedgerEntry + * + */ +export type LedgerEntry = $Result.DefaultSelection +/** + * Model GoldPriceQuote + * Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed. + */ +export type GoldPriceQuote = $Result.DefaultSelection +/** + * Model WalletBonus + * Time-limited gold cashback bonus — replaces the legacy Rooyesh\Wallet gold credit. + */ +export type WalletBonus = $Result.DefaultSelection + +/** + * Enums + */ +export namespace $Enums { + export const AdminRole: { + SUPER_ADMIN: 'SUPER_ADMIN', + SYSTEM_APPROVER: 'SYSTEM_APPROVER', + SALES_EXPERT: 'SALES_EXPERT', + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + ACCOUNTANT: 'ACCOUNTANT' +}; + +export type AdminRole = (typeof AdminRole)[keyof typeof AdminRole] + + +export const VerificationStep: { + UNVERIFIED: 'UNVERIFIED', + STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', + STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', + VERIFIED: 'VERIFIED' +}; + +export type VerificationStep = (typeof VerificationStep)[keyof typeof VerificationStep] + + +export const OrderStatus: { + SUSPENDED: 'SUSPENDED', + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + SOURCING: 'SOURCING', + PREPARING: 'PREPARING', + DELIVERED_TO_AGENT: 'DELIVERED_TO_AGENT', + DELIVERED_TO_CUSTOMER: 'DELIVERED_TO_CUSTOMER', + CANCELLED: 'CANCELLED' +}; + +export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus] + + +export const PreOrderStatus: { + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + WORKSHOP_APPROVED: 'WORKSHOP_APPROVED', + READY_TO_SHIP: 'READY_TO_SHIP', + DELIVERED: 'DELIVERED', + CANCELLED: 'CANCELLED' +}; + +export type PreOrderStatus = (typeof PreOrderStatus)[keyof typeof PreOrderStatus] + + +export const LedgerCurrency: { + GOLD_GRAM: 'GOLD_GRAM', + RIAL: 'RIAL' +}; + +export type LedgerCurrency = (typeof LedgerCurrency)[keyof typeof LedgerCurrency] + + +export const LedgerDirection: { + DEBIT: 'DEBIT', + CREDIT: 'CREDIT' +}; + +export type LedgerDirection = (typeof LedgerDirection)[keyof typeof LedgerDirection] + + +export const LedgerSourceType: { + ORDER_STOCK: 'ORDER_STOCK', + ORDER_PRE_ORDER: 'ORDER_PRE_ORDER', + REPAYMENT_MELTED_GOLD: 'REPAYMENT_MELTED_GOLD', + REPAYMENT_TRANSFER: 'REPAYMENT_TRANSFER', + REPAYMENT_CHEQUE: 'REPAYMENT_CHEQUE', + REPAYMENT_CASH: 'REPAYMENT_CASH', + WALLET_BONUS: 'WALLET_BONUS', + ADJUSTMENT: 'ADJUSTMENT' +}; + +export type LedgerSourceType = (typeof LedgerSourceType)[keyof typeof LedgerSourceType] + +} + +export type AdminRole = $Enums.AdminRole + +export const AdminRole: typeof $Enums.AdminRole + +export type VerificationStep = $Enums.VerificationStep + +export const VerificationStep: typeof $Enums.VerificationStep + +export type OrderStatus = $Enums.OrderStatus + +export const OrderStatus: typeof $Enums.OrderStatus + +export type PreOrderStatus = $Enums.PreOrderStatus + +export const PreOrderStatus: typeof $Enums.PreOrderStatus + +export type LedgerCurrency = $Enums.LedgerCurrency + +export const LedgerCurrency: typeof $Enums.LedgerCurrency + +export type LedgerDirection = $Enums.LedgerDirection + +export const LedgerDirection: typeof $Enums.LedgerDirection + +export type LedgerSourceType = $Enums.LedgerSourceType + +export const LedgerSourceType: typeof $Enums.LedgerSourceType + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Cities + * const cities = await prisma.city.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 Cities + * const cities = await prisma.city.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.city`: Exposes CRUD operations for the **City** model. + * Example usage: + * ```ts + * // Fetch zero or more Cities + * const cities = await prisma.city.findMany() + * ``` + */ + get city(): Prisma.CityDelegate; + + /** + * `prisma.adminUser`: Exposes CRUD operations for the **AdminUser** model. + * Example usage: + * ```ts + * // Fetch zero or more AdminUsers + * const adminUsers = await prisma.adminUser.findMany() + * ``` + */ + get adminUser(): Prisma.AdminUserDelegate; + + /** + * `prisma.customer`: Exposes CRUD operations for the **Customer** model. + * Example usage: + * ```ts + * // Fetch zero or more Customers + * const customers = await prisma.customer.findMany() + * ``` + */ + get customer(): Prisma.CustomerDelegate; + + /** + * `prisma.customerAddress`: Exposes CRUD operations for the **CustomerAddress** model. + * Example usage: + * ```ts + * // Fetch zero or more CustomerAddresses + * const customerAddresses = await prisma.customerAddress.findMany() + * ``` + */ + get customerAddress(): Prisma.CustomerAddressDelegate; + + /** + * `prisma.branch`: Exposes CRUD operations for the **Branch** model. + * Example usage: + * ```ts + * // Fetch zero or more Branches + * const branches = await prisma.branch.findMany() + * ``` + */ + get branch(): Prisma.BranchDelegate; + + /** + * `prisma.workshop`: Exposes CRUD operations for the **Workshop** model. + * Example usage: + * ```ts + * // Fetch zero or more Workshops + * const workshops = await prisma.workshop.findMany() + * ``` + */ + get workshop(): Prisma.WorkshopDelegate; + + /** + * `prisma.category`: Exposes CRUD operations for the **Category** model. + * Example usage: + * ```ts + * // Fetch zero or more Categories + * const categories = await prisma.category.findMany() + * ``` + */ + get category(): Prisma.CategoryDelegate; + + /** + * `prisma.brand`: Exposes CRUD operations for the **Brand** model. + * Example usage: + * ```ts + * // Fetch zero or more Brands + * const brands = await prisma.brand.findMany() + * ``` + */ + get brand(): Prisma.BrandDelegate; + + /** + * `prisma.collection`: Exposes CRUD operations for the **Collection** model. + * Example usage: + * ```ts + * // Fetch zero or more Collections + * const collections = await prisma.collection.findMany() + * ``` + */ + get collection(): Prisma.CollectionDelegate; + + /** + * `prisma.collectionProduct`: Exposes CRUD operations for the **CollectionProduct** model. + * Example usage: + * ```ts + * // Fetch zero or more CollectionProducts + * const collectionProducts = await prisma.collectionProduct.findMany() + * ``` + */ + get collectionProduct(): Prisma.CollectionProductDelegate; + + /** + * `prisma.product`: Exposes CRUD operations for the **Product** model. + * Example usage: + * ```ts + * // Fetch zero or more Products + * const products = await prisma.product.findMany() + * ``` + */ + get product(): Prisma.ProductDelegate; + + /** + * `prisma.productImage`: Exposes CRUD operations for the **ProductImage** model. + * Example usage: + * ```ts + * // Fetch zero or more ProductImages + * const productImages = await prisma.productImage.findMany() + * ``` + */ + get productImage(): Prisma.ProductImageDelegate; + + /** + * `prisma.productVariant`: Exposes CRUD operations for the **ProductVariant** model. + * Example usage: + * ```ts + * // Fetch zero or more ProductVariants + * const productVariants = await prisma.productVariant.findMany() + * ``` + */ + get productVariant(): Prisma.ProductVariantDelegate; + + /** + * `prisma.order`: Exposes CRUD operations for the **Order** model. + * Example usage: + * ```ts + * // Fetch zero or more Orders + * const orders = await prisma.order.findMany() + * ``` + */ + get order(): Prisma.OrderDelegate; + + /** + * `prisma.orderItem`: Exposes CRUD operations for the **OrderItem** model. + * Example usage: + * ```ts + * // Fetch zero or more OrderItems + * const orderItems = await prisma.orderItem.findMany() + * ``` + */ + get orderItem(): Prisma.OrderItemDelegate; + + /** + * `prisma.orderStatusEvent`: Exposes CRUD operations for the **OrderStatusEvent** model. + * Example usage: + * ```ts + * // Fetch zero or more OrderStatusEvents + * const orderStatusEvents = await prisma.orderStatusEvent.findMany() + * ``` + */ + get orderStatusEvent(): Prisma.OrderStatusEventDelegate; + + /** + * `prisma.preOrder`: Exposes CRUD operations for the **PreOrder** model. + * Example usage: + * ```ts + * // Fetch zero or more PreOrders + * const preOrders = await prisma.preOrder.findMany() + * ``` + */ + get preOrder(): Prisma.PreOrderDelegate; + + /** + * `prisma.preOrderStatusEvent`: Exposes CRUD operations for the **PreOrderStatusEvent** model. + * Example usage: + * ```ts + * // Fetch zero or more PreOrderStatusEvents + * const preOrderStatusEvents = await prisma.preOrderStatusEvent.findMany() + * ``` + */ + get preOrderStatusEvent(): Prisma.PreOrderStatusEventDelegate; + + /** + * `prisma.ledgerEntry`: Exposes CRUD operations for the **LedgerEntry** model. + * Example usage: + * ```ts + * // Fetch zero or more LedgerEntries + * const ledgerEntries = await prisma.ledgerEntry.findMany() + * ``` + */ + get ledgerEntry(): Prisma.LedgerEntryDelegate; + + /** + * `prisma.goldPriceQuote`: Exposes CRUD operations for the **GoldPriceQuote** model. + * Example usage: + * ```ts + * // Fetch zero or more GoldPriceQuotes + * const goldPriceQuotes = await prisma.goldPriceQuote.findMany() + * ``` + */ + get goldPriceQuote(): Prisma.GoldPriceQuoteDelegate; + + /** + * `prisma.walletBonus`: Exposes CRUD operations for the **WalletBonus** model. + * Example usage: + * ```ts + * // Fetch zero or more WalletBonuses + * const walletBonuses = await prisma.walletBonus.findMany() + * ``` + */ + get walletBonus(): Prisma.WalletBonusDelegate; +} + +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: { + City: 'City', + AdminUser: 'AdminUser', + Customer: 'Customer', + CustomerAddress: 'CustomerAddress', + Branch: 'Branch', + Workshop: 'Workshop', + Category: 'Category', + Brand: 'Brand', + Collection: 'Collection', + CollectionProduct: 'CollectionProduct', + Product: 'Product', + ProductImage: 'ProductImage', + ProductVariant: 'ProductVariant', + Order: 'Order', + OrderItem: 'OrderItem', + OrderStatusEvent: 'OrderStatusEvent', + PreOrder: 'PreOrder', + PreOrderStatusEvent: 'PreOrderStatusEvent', + LedgerEntry: 'LedgerEntry', + GoldPriceQuote: 'GoldPriceQuote', + WalletBonus: 'WalletBonus' + }; + + 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: "city" | "adminUser" | "customer" | "customerAddress" | "branch" | "workshop" | "category" | "brand" | "collection" | "collectionProduct" | "product" | "productImage" | "productVariant" | "order" | "orderItem" | "orderStatusEvent" | "preOrder" | "preOrderStatusEvent" | "ledgerEntry" | "goldPriceQuote" | "walletBonus" + txIsolationLevel: Prisma.TransactionIsolationLevel + } + model: { + City: { + payload: Prisma.$CityPayload + fields: Prisma.CityFieldRefs + operations: { + findUnique: { + args: Prisma.CityFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CityFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CityFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CityFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CityFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CityCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CityCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CityCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CityDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CityUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CityDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CityUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CityUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CityAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CityGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CityCountArgs + result: $Utils.Optional | number + } + } + } + AdminUser: { + payload: Prisma.$AdminUserPayload + fields: Prisma.AdminUserFieldRefs + operations: { + findUnique: { + args: Prisma.AdminUserFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AdminUserFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AdminUserFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AdminUserFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AdminUserFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AdminUserCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AdminUserCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AdminUserCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AdminUserDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AdminUserUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AdminUserDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AdminUserUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.AdminUserUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AdminUserAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AdminUserGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AdminUserCountArgs + result: $Utils.Optional | number + } + } + } + Customer: { + payload: Prisma.$CustomerPayload + fields: Prisma.CustomerFieldRefs + operations: { + findUnique: { + args: Prisma.CustomerFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CustomerFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CustomerFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CustomerFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CustomerFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CustomerCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CustomerCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CustomerCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CustomerDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CustomerUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CustomerDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CustomerUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CustomerUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CustomerAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CustomerGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CustomerCountArgs + result: $Utils.Optional | number + } + } + } + CustomerAddress: { + payload: Prisma.$CustomerAddressPayload + fields: Prisma.CustomerAddressFieldRefs + operations: { + findUnique: { + args: Prisma.CustomerAddressFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CustomerAddressFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CustomerAddressFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CustomerAddressFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CustomerAddressFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CustomerAddressCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CustomerAddressCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CustomerAddressCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CustomerAddressDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CustomerAddressUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CustomerAddressDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CustomerAddressUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CustomerAddressUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CustomerAddressAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CustomerAddressGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CustomerAddressCountArgs + result: $Utils.Optional | number + } + } + } + Branch: { + payload: Prisma.$BranchPayload + fields: Prisma.BranchFieldRefs + operations: { + findUnique: { + args: Prisma.BranchFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.BranchFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.BranchFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.BranchFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.BranchFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.BranchCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.BranchCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.BranchCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.BranchDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.BranchUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.BranchDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.BranchUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.BranchUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.BranchAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.BranchGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.BranchCountArgs + result: $Utils.Optional | number + } + } + } + Workshop: { + payload: Prisma.$WorkshopPayload + fields: Prisma.WorkshopFieldRefs + operations: { + findUnique: { + args: Prisma.WorkshopFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.WorkshopFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.WorkshopFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.WorkshopFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.WorkshopFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.WorkshopCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.WorkshopCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.WorkshopCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.WorkshopDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.WorkshopUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.WorkshopDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.WorkshopUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.WorkshopUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.WorkshopAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.WorkshopGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.WorkshopCountArgs + result: $Utils.Optional | number + } + } + } + Category: { + payload: Prisma.$CategoryPayload + fields: Prisma.CategoryFieldRefs + operations: { + findUnique: { + args: Prisma.CategoryFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CategoryFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CategoryFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CategoryFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CategoryFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CategoryCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CategoryCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CategoryCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CategoryDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CategoryUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CategoryDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CategoryUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CategoryUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CategoryAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CategoryGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CategoryCountArgs + result: $Utils.Optional | number + } + } + } + Brand: { + payload: Prisma.$BrandPayload + fields: Prisma.BrandFieldRefs + operations: { + findUnique: { + args: Prisma.BrandFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.BrandFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.BrandFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.BrandFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.BrandFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.BrandCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.BrandCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.BrandCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.BrandDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.BrandUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.BrandDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.BrandUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.BrandUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.BrandAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.BrandGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.BrandCountArgs + result: $Utils.Optional | number + } + } + } + Collection: { + payload: Prisma.$CollectionPayload + fields: Prisma.CollectionFieldRefs + operations: { + findUnique: { + args: Prisma.CollectionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CollectionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CollectionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CollectionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CollectionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CollectionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CollectionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CollectionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CollectionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CollectionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CollectionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CollectionUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CollectionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CollectionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CollectionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CollectionCountArgs + result: $Utils.Optional | number + } + } + } + CollectionProduct: { + payload: Prisma.$CollectionProductPayload + fields: Prisma.CollectionProductFieldRefs + operations: { + findUnique: { + args: Prisma.CollectionProductFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CollectionProductFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CollectionProductFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CollectionProductFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CollectionProductFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CollectionProductCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CollectionProductCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CollectionProductCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CollectionProductDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CollectionProductUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CollectionProductDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CollectionProductUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CollectionProductUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CollectionProductAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CollectionProductGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CollectionProductCountArgs + result: $Utils.Optional | number + } + } + } + Product: { + payload: Prisma.$ProductPayload + fields: Prisma.ProductFieldRefs + operations: { + findUnique: { + args: Prisma.ProductFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ProductFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ProductFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ProductFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ProductFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ProductCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ProductCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ProductCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ProductDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ProductUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ProductDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ProductUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.ProductUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ProductAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ProductGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ProductCountArgs + result: $Utils.Optional | number + } + } + } + ProductImage: { + payload: Prisma.$ProductImagePayload + fields: Prisma.ProductImageFieldRefs + operations: { + findUnique: { + args: Prisma.ProductImageFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ProductImageFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ProductImageFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ProductImageFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ProductImageFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ProductImageCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ProductImageCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ProductImageCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ProductImageDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ProductImageUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ProductImageDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ProductImageUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.ProductImageUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ProductImageAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ProductImageGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ProductImageCountArgs + result: $Utils.Optional | number + } + } + } + ProductVariant: { + payload: Prisma.$ProductVariantPayload + fields: Prisma.ProductVariantFieldRefs + operations: { + findUnique: { + args: Prisma.ProductVariantFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ProductVariantFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ProductVariantFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ProductVariantFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ProductVariantFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ProductVariantCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ProductVariantCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ProductVariantCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ProductVariantDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ProductVariantUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ProductVariantDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ProductVariantUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.ProductVariantUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ProductVariantAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ProductVariantGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ProductVariantCountArgs + result: $Utils.Optional | number + } + } + } + Order: { + payload: Prisma.$OrderPayload + fields: Prisma.OrderFieldRefs + operations: { + findUnique: { + args: Prisma.OrderFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.OrderFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.OrderFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.OrderFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.OrderFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.OrderCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.OrderCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.OrderCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.OrderDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.OrderUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.OrderDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.OrderUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.OrderUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.OrderAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.OrderGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.OrderCountArgs + result: $Utils.Optional | number + } + } + } + OrderItem: { + payload: Prisma.$OrderItemPayload + fields: Prisma.OrderItemFieldRefs + operations: { + findUnique: { + args: Prisma.OrderItemFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.OrderItemFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.OrderItemFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.OrderItemFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.OrderItemFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.OrderItemCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.OrderItemCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.OrderItemCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.OrderItemDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.OrderItemUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.OrderItemDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.OrderItemUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.OrderItemUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.OrderItemAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.OrderItemGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.OrderItemCountArgs + result: $Utils.Optional | number + } + } + } + OrderStatusEvent: { + payload: Prisma.$OrderStatusEventPayload + fields: Prisma.OrderStatusEventFieldRefs + operations: { + findUnique: { + args: Prisma.OrderStatusEventFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.OrderStatusEventFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.OrderStatusEventFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.OrderStatusEventFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.OrderStatusEventFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.OrderStatusEventCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.OrderStatusEventCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.OrderStatusEventCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.OrderStatusEventDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.OrderStatusEventUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.OrderStatusEventDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.OrderStatusEventUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.OrderStatusEventUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.OrderStatusEventAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.OrderStatusEventGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.OrderStatusEventCountArgs + result: $Utils.Optional | number + } + } + } + PreOrder: { + payload: Prisma.$PreOrderPayload + fields: Prisma.PreOrderFieldRefs + operations: { + findUnique: { + args: Prisma.PreOrderFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PreOrderFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PreOrderFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PreOrderFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PreOrderFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PreOrderCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PreOrderCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PreOrderCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PreOrderDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PreOrderUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PreOrderDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PreOrderUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.PreOrderUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PreOrderAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PreOrderGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PreOrderCountArgs + result: $Utils.Optional | number + } + } + } + PreOrderStatusEvent: { + payload: Prisma.$PreOrderStatusEventPayload + fields: Prisma.PreOrderStatusEventFieldRefs + operations: { + findUnique: { + args: Prisma.PreOrderStatusEventFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PreOrderStatusEventFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PreOrderStatusEventFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PreOrderStatusEventFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PreOrderStatusEventFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PreOrderStatusEventCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PreOrderStatusEventCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PreOrderStatusEventCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PreOrderStatusEventDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PreOrderStatusEventUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PreOrderStatusEventDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PreOrderStatusEventUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.PreOrderStatusEventUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PreOrderStatusEventAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PreOrderStatusEventGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PreOrderStatusEventCountArgs + result: $Utils.Optional | number + } + } + } + LedgerEntry: { + payload: Prisma.$LedgerEntryPayload + fields: Prisma.LedgerEntryFieldRefs + operations: { + findUnique: { + args: Prisma.LedgerEntryFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.LedgerEntryFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.LedgerEntryFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.LedgerEntryFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.LedgerEntryFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.LedgerEntryCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.LedgerEntryCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.LedgerEntryCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.LedgerEntryDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.LedgerEntryUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.LedgerEntryDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.LedgerEntryUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.LedgerEntryUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.LedgerEntryAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.LedgerEntryGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.LedgerEntryCountArgs + result: $Utils.Optional | number + } + } + } + GoldPriceQuote: { + payload: Prisma.$GoldPriceQuotePayload + fields: Prisma.GoldPriceQuoteFieldRefs + operations: { + findUnique: { + args: Prisma.GoldPriceQuoteFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.GoldPriceQuoteFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.GoldPriceQuoteFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.GoldPriceQuoteFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.GoldPriceQuoteFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.GoldPriceQuoteCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.GoldPriceQuoteCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.GoldPriceQuoteCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.GoldPriceQuoteDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.GoldPriceQuoteUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.GoldPriceQuoteDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.GoldPriceQuoteUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.GoldPriceQuoteUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.GoldPriceQuoteAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.GoldPriceQuoteGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.GoldPriceQuoteCountArgs + result: $Utils.Optional | number + } + } + } + WalletBonus: { + payload: Prisma.$WalletBonusPayload + fields: Prisma.WalletBonusFieldRefs + operations: { + findUnique: { + args: Prisma.WalletBonusFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.WalletBonusFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.WalletBonusFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.WalletBonusFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.WalletBonusFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.WalletBonusCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.WalletBonusCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.WalletBonusCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.WalletBonusDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.WalletBonusUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.WalletBonusDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.WalletBonusUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.WalletBonusUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.WalletBonusAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.WalletBonusGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.WalletBonusCountArgs + 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 CityCountOutputType + */ + + export type CityCountOutputType = { + customers: number + addresses: number + branches: number + preOrders: number + } + + export type CityCountOutputTypeSelect = { + customers?: boolean | CityCountOutputTypeCountCustomersArgs + addresses?: boolean | CityCountOutputTypeCountAddressesArgs + branches?: boolean | CityCountOutputTypeCountBranchesArgs + preOrders?: boolean | CityCountOutputTypeCountPreOrdersArgs + } + + // Custom InputTypes + /** + * CityCountOutputType without action + */ + export type CityCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the CityCountOutputType + */ + select?: CityCountOutputTypeSelect | null + } + + /** + * CityCountOutputType without action + */ + export type CityCountOutputTypeCountCustomersArgs = { + where?: CustomerWhereInput + } + + /** + * CityCountOutputType without action + */ + export type CityCountOutputTypeCountAddressesArgs = { + where?: CustomerAddressWhereInput + } + + /** + * CityCountOutputType without action + */ + export type CityCountOutputTypeCountBranchesArgs = { + where?: BranchWhereInput + } + + /** + * CityCountOutputType without action + */ + export type CityCountOutputTypeCountPreOrdersArgs = { + where?: PreOrderWhereInput + } + + + /** + * Count Type AdminUserCountOutputType + */ + + export type AdminUserCountOutputType = { + referredCustomers: number + postedLedgerEntries: number + orderStatusEvents: number + preOrderStatusEvents: number + } + + export type AdminUserCountOutputTypeSelect = { + referredCustomers?: boolean | AdminUserCountOutputTypeCountReferredCustomersArgs + postedLedgerEntries?: boolean | AdminUserCountOutputTypeCountPostedLedgerEntriesArgs + orderStatusEvents?: boolean | AdminUserCountOutputTypeCountOrderStatusEventsArgs + preOrderStatusEvents?: boolean | AdminUserCountOutputTypeCountPreOrderStatusEventsArgs + } + + // Custom InputTypes + /** + * AdminUserCountOutputType without action + */ + export type AdminUserCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the AdminUserCountOutputType + */ + select?: AdminUserCountOutputTypeSelect | null + } + + /** + * AdminUserCountOutputType without action + */ + export type AdminUserCountOutputTypeCountReferredCustomersArgs = { + where?: CustomerWhereInput + } + + /** + * AdminUserCountOutputType without action + */ + export type AdminUserCountOutputTypeCountPostedLedgerEntriesArgs = { + where?: LedgerEntryWhereInput + } + + /** + * AdminUserCountOutputType without action + */ + export type AdminUserCountOutputTypeCountOrderStatusEventsArgs = { + where?: OrderStatusEventWhereInput + } + + /** + * AdminUserCountOutputType without action + */ + export type AdminUserCountOutputTypeCountPreOrderStatusEventsArgs = { + where?: PreOrderStatusEventWhereInput + } + + + /** + * Count Type CustomerCountOutputType + */ + + export type CustomerCountOutputType = { + addresses: number + orders: number + preOrders: number + ledgerEntries: number + walletBonuses: number + } + + export type CustomerCountOutputTypeSelect = { + addresses?: boolean | CustomerCountOutputTypeCountAddressesArgs + orders?: boolean | CustomerCountOutputTypeCountOrdersArgs + preOrders?: boolean | CustomerCountOutputTypeCountPreOrdersArgs + ledgerEntries?: boolean | CustomerCountOutputTypeCountLedgerEntriesArgs + walletBonuses?: boolean | CustomerCountOutputTypeCountWalletBonusesArgs + } + + // Custom InputTypes + /** + * CustomerCountOutputType without action + */ + export type CustomerCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the CustomerCountOutputType + */ + select?: CustomerCountOutputTypeSelect | null + } + + /** + * CustomerCountOutputType without action + */ + export type CustomerCountOutputTypeCountAddressesArgs = { + where?: CustomerAddressWhereInput + } + + /** + * CustomerCountOutputType without action + */ + export type CustomerCountOutputTypeCountOrdersArgs = { + where?: OrderWhereInput + } + + /** + * CustomerCountOutputType without action + */ + export type CustomerCountOutputTypeCountPreOrdersArgs = { + where?: PreOrderWhereInput + } + + /** + * CustomerCountOutputType without action + */ + export type CustomerCountOutputTypeCountLedgerEntriesArgs = { + where?: LedgerEntryWhereInput + } + + /** + * CustomerCountOutputType without action + */ + export type CustomerCountOutputTypeCountWalletBonusesArgs = { + where?: WalletBonusWhereInput + } + + + /** + * Count Type BranchCountOutputType + */ + + export type BranchCountOutputType = { + adminUsers: number + orders: number + } + + export type BranchCountOutputTypeSelect = { + adminUsers?: boolean | BranchCountOutputTypeCountAdminUsersArgs + orders?: boolean | BranchCountOutputTypeCountOrdersArgs + } + + // Custom InputTypes + /** + * BranchCountOutputType without action + */ + export type BranchCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the BranchCountOutputType + */ + select?: BranchCountOutputTypeSelect | null + } + + /** + * BranchCountOutputType without action + */ + export type BranchCountOutputTypeCountAdminUsersArgs = { + where?: AdminUserWhereInput + } + + /** + * BranchCountOutputType without action + */ + export type BranchCountOutputTypeCountOrdersArgs = { + where?: OrderWhereInput + } + + + /** + * Count Type WorkshopCountOutputType + */ + + export type WorkshopCountOutputType = { + preOrders: number + } + + export type WorkshopCountOutputTypeSelect = { + preOrders?: boolean | WorkshopCountOutputTypeCountPreOrdersArgs + } + + // Custom InputTypes + /** + * WorkshopCountOutputType without action + */ + export type WorkshopCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the WorkshopCountOutputType + */ + select?: WorkshopCountOutputTypeSelect | null + } + + /** + * WorkshopCountOutputType without action + */ + export type WorkshopCountOutputTypeCountPreOrdersArgs = { + where?: PreOrderWhereInput + } + + + /** + * Count Type CategoryCountOutputType + */ + + export type CategoryCountOutputType = { + children: number + products: number + } + + export type CategoryCountOutputTypeSelect = { + children?: boolean | CategoryCountOutputTypeCountChildrenArgs + products?: boolean | CategoryCountOutputTypeCountProductsArgs + } + + // Custom InputTypes + /** + * CategoryCountOutputType without action + */ + export type CategoryCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the CategoryCountOutputType + */ + select?: CategoryCountOutputTypeSelect | null + } + + /** + * CategoryCountOutputType without action + */ + export type CategoryCountOutputTypeCountChildrenArgs = { + where?: CategoryWhereInput + } + + /** + * CategoryCountOutputType without action + */ + export type CategoryCountOutputTypeCountProductsArgs = { + where?: ProductWhereInput + } + + + /** + * Count Type BrandCountOutputType + */ + + export type BrandCountOutputType = { + products: number + } + + export type BrandCountOutputTypeSelect = { + products?: boolean | BrandCountOutputTypeCountProductsArgs + } + + // Custom InputTypes + /** + * BrandCountOutputType without action + */ + export type BrandCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the BrandCountOutputType + */ + select?: BrandCountOutputTypeSelect | null + } + + /** + * BrandCountOutputType without action + */ + export type BrandCountOutputTypeCountProductsArgs = { + where?: ProductWhereInput + } + + + /** + * Count Type CollectionCountOutputType + */ + + export type CollectionCountOutputType = { + products: number + } + + export type CollectionCountOutputTypeSelect = { + products?: boolean | CollectionCountOutputTypeCountProductsArgs + } + + // Custom InputTypes + /** + * CollectionCountOutputType without action + */ + export type CollectionCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the CollectionCountOutputType + */ + select?: CollectionCountOutputTypeSelect | null + } + + /** + * CollectionCountOutputType without action + */ + export type CollectionCountOutputTypeCountProductsArgs = { + where?: CollectionProductWhereInput + } + + + /** + * Count Type ProductCountOutputType + */ + + export type ProductCountOutputType = { + variants: number + images: number + collections: number + } + + export type ProductCountOutputTypeSelect = { + variants?: boolean | ProductCountOutputTypeCountVariantsArgs + images?: boolean | ProductCountOutputTypeCountImagesArgs + collections?: boolean | ProductCountOutputTypeCountCollectionsArgs + } + + // Custom InputTypes + /** + * ProductCountOutputType without action + */ + export type ProductCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ProductCountOutputType + */ + select?: ProductCountOutputTypeSelect | null + } + + /** + * ProductCountOutputType without action + */ + export type ProductCountOutputTypeCountVariantsArgs = { + where?: ProductVariantWhereInput + } + + /** + * ProductCountOutputType without action + */ + export type ProductCountOutputTypeCountImagesArgs = { + where?: ProductImageWhereInput + } + + /** + * ProductCountOutputType without action + */ + export type ProductCountOutputTypeCountCollectionsArgs = { + where?: CollectionProductWhereInput + } + + + /** + * Count Type ProductVariantCountOutputType + */ + + export type ProductVariantCountOutputType = { + orderItems: number + } + + export type ProductVariantCountOutputTypeSelect = { + orderItems?: boolean | ProductVariantCountOutputTypeCountOrderItemsArgs + } + + // Custom InputTypes + /** + * ProductVariantCountOutputType without action + */ + export type ProductVariantCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ProductVariantCountOutputType + */ + select?: ProductVariantCountOutputTypeSelect | null + } + + /** + * ProductVariantCountOutputType without action + */ + export type ProductVariantCountOutputTypeCountOrderItemsArgs = { + where?: OrderItemWhereInput + } + + + /** + * Count Type OrderCountOutputType + */ + + export type OrderCountOutputType = { + items: number + statusEvents: number + ledgerEntries: number + } + + export type OrderCountOutputTypeSelect = { + items?: boolean | OrderCountOutputTypeCountItemsArgs + statusEvents?: boolean | OrderCountOutputTypeCountStatusEventsArgs + ledgerEntries?: boolean | OrderCountOutputTypeCountLedgerEntriesArgs + } + + // Custom InputTypes + /** + * OrderCountOutputType without action + */ + export type OrderCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the OrderCountOutputType + */ + select?: OrderCountOutputTypeSelect | null + } + + /** + * OrderCountOutputType without action + */ + export type OrderCountOutputTypeCountItemsArgs = { + where?: OrderItemWhereInput + } + + /** + * OrderCountOutputType without action + */ + export type OrderCountOutputTypeCountStatusEventsArgs = { + where?: OrderStatusEventWhereInput + } + + /** + * OrderCountOutputType without action + */ + export type OrderCountOutputTypeCountLedgerEntriesArgs = { + where?: LedgerEntryWhereInput + } + + + /** + * Count Type PreOrderCountOutputType + */ + + export type PreOrderCountOutputType = { + statusEvents: number + } + + export type PreOrderCountOutputTypeSelect = { + statusEvents?: boolean | PreOrderCountOutputTypeCountStatusEventsArgs + } + + // Custom InputTypes + /** + * PreOrderCountOutputType without action + */ + export type PreOrderCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the PreOrderCountOutputType + */ + select?: PreOrderCountOutputTypeSelect | null + } + + /** + * PreOrderCountOutputType without action + */ + export type PreOrderCountOutputTypeCountStatusEventsArgs = { + where?: PreOrderStatusEventWhereInput + } + + + /** + * Models + */ + + /** + * Model City + */ + + export type AggregateCity = { + _count: CityCountAggregateOutputType | null + _min: CityMinAggregateOutputType | null + _max: CityMaxAggregateOutputType | null + } + + export type CityMinAggregateOutputType = { + id: string | null + name: string | null + province: string | null + } + + export type CityMaxAggregateOutputType = { + id: string | null + name: string | null + province: string | null + } + + export type CityCountAggregateOutputType = { + id: number + name: number + province: number + _all: number + } + + + export type CityMinAggregateInputType = { + id?: true + name?: true + province?: true + } + + export type CityMaxAggregateInputType = { + id?: true + name?: true + province?: true + } + + export type CityCountAggregateInputType = { + id?: true + name?: true + province?: true + _all?: true + } + + export type CityAggregateArgs = { + /** + * Filter which City to aggregate. + */ + where?: CityWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Cities to fetch. + */ + orderBy?: CityOrderByWithRelationInput | CityOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CityWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Cities 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` Cities. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Cities + **/ + _count?: true | CityCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CityMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CityMaxAggregateInputType + } + + export type GetCityAggregateType = { + [P in keyof T & keyof AggregateCity]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CityGroupByArgs = { + where?: CityWhereInput + orderBy?: CityOrderByWithAggregationInput | CityOrderByWithAggregationInput[] + by: CityScalarFieldEnum[] | CityScalarFieldEnum + having?: CityScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CityCountAggregateInputType | true + _min?: CityMinAggregateInputType + _max?: CityMaxAggregateInputType + } + + export type CityGroupByOutputType = { + id: string + name: string + province: string | null + _count: CityCountAggregateOutputType | null + _min: CityMinAggregateOutputType | null + _max: CityMaxAggregateOutputType | null + } + + type GetCityGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CityGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CitySelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + province?: boolean + customers?: boolean | City$customersArgs + addresses?: boolean | City$addressesArgs + branches?: boolean | City$branchesArgs + preOrders?: boolean | City$preOrdersArgs + _count?: boolean | CityCountOutputTypeDefaultArgs + }, ExtArgs["result"]["city"]> + + export type CitySelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + province?: boolean + }, ExtArgs["result"]["city"]> + + export type CitySelectScalar = { + id?: boolean + name?: boolean + province?: boolean + } + + export type CityInclude = { + customers?: boolean | City$customersArgs + addresses?: boolean | City$addressesArgs + branches?: boolean | City$branchesArgs + preOrders?: boolean | City$preOrdersArgs + _count?: boolean | CityCountOutputTypeDefaultArgs + } + export type CityIncludeCreateManyAndReturn = {} + + export type $CityPayload = { + name: "City" + objects: { + customers: Prisma.$CustomerPayload[] + addresses: Prisma.$CustomerAddressPayload[] + branches: Prisma.$BranchPayload[] + preOrders: Prisma.$PreOrderPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + province: string | null + }, ExtArgs["result"]["city"]> + composites: {} + } + + type CityGetPayload = $Result.GetResult + + type CityCountArgs = + Omit & { + select?: CityCountAggregateInputType | true + } + + export interface CityDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['City'], meta: { name: 'City' } } + /** + * Find zero or one City that matches the filter. + * @param {CityFindUniqueArgs} args - Arguments to find a City + * @example + * // Get one City + * const city = await prisma.city.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CityClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one City that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CityFindUniqueOrThrowArgs} args - Arguments to find a City + * @example + * // Get one City + * const city = await prisma.city.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CityClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first City 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 {CityFindFirstArgs} args - Arguments to find a City + * @example + * // Get one City + * const city = await prisma.city.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CityClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first City 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 {CityFindFirstOrThrowArgs} args - Arguments to find a City + * @example + * // Get one City + * const city = await prisma.city.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CityClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Cities 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 {CityFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Cities + * const cities = await prisma.city.findMany() + * + * // Get first 10 Cities + * const cities = await prisma.city.findMany({ take: 10 }) + * + * // Only select the `id` + * const cityWithIdOnly = await prisma.city.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a City. + * @param {CityCreateArgs} args - Arguments to create a City. + * @example + * // Create one City + * const City = await prisma.city.create({ + * data: { + * // ... data to create a City + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CityClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Cities. + * @param {CityCreateManyArgs} args - Arguments to create many Cities. + * @example + * // Create many Cities + * const city = await prisma.city.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Cities and returns the data saved in the database. + * @param {CityCreateManyAndReturnArgs} args - Arguments to create many Cities. + * @example + * // Create many Cities + * const city = await prisma.city.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Cities and only return the `id` + * const cityWithIdOnly = await prisma.city.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 City. + * @param {CityDeleteArgs} args - Arguments to delete one City. + * @example + * // Delete one City + * const City = await prisma.city.delete({ + * where: { + * // ... filter to delete one City + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CityClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one City. + * @param {CityUpdateArgs} args - Arguments to update one City. + * @example + * // Update one City + * const city = await prisma.city.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CityClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Cities. + * @param {CityDeleteManyArgs} args - Arguments to filter Cities to delete. + * @example + * // Delete a few Cities + * const { count } = await prisma.city.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Cities. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CityUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Cities + * const city = await prisma.city.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one City. + * @param {CityUpsertArgs} args - Arguments to update or create a City. + * @example + * // Update or create a City + * const city = await prisma.city.upsert({ + * create: { + * // ... data to create a City + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the City we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CityClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Cities. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CityCountArgs} args - Arguments to filter Cities to count. + * @example + * // Count the number of Cities + * const count = await prisma.city.count({ + * where: { + * // ... the filter for the Cities 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 City. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CityAggregateArgs} 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 City. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CityGroupByArgs} 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 CityGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CityGroupByArgs['orderBy'] } + : { orderBy?: CityGroupByArgs['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 ? GetCityGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the City model + */ + readonly fields: CityFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for City. + * 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__CityClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + addresses = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + branches = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + preOrders = {}>(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 City model + */ + interface CityFieldRefs { + readonly id: FieldRef<"City", 'String'> + readonly name: FieldRef<"City", 'String'> + readonly province: FieldRef<"City", 'String'> + } + + + // Custom InputTypes + /** + * City findUnique + */ + export type CityFindUniqueArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + /** + * Filter, which City to fetch. + */ + where: CityWhereUniqueInput + } + + /** + * City findUniqueOrThrow + */ + export type CityFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + /** + * Filter, which City to fetch. + */ + where: CityWhereUniqueInput + } + + /** + * City findFirst + */ + export type CityFindFirstArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + /** + * Filter, which City to fetch. + */ + where?: CityWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Cities to fetch. + */ + orderBy?: CityOrderByWithRelationInput | CityOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Cities. + */ + cursor?: CityWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Cities 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` Cities. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Cities. + */ + distinct?: CityScalarFieldEnum | CityScalarFieldEnum[] + } + + /** + * City findFirstOrThrow + */ + export type CityFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + /** + * Filter, which City to fetch. + */ + where?: CityWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Cities to fetch. + */ + orderBy?: CityOrderByWithRelationInput | CityOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Cities. + */ + cursor?: CityWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Cities 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` Cities. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Cities. + */ + distinct?: CityScalarFieldEnum | CityScalarFieldEnum[] + } + + /** + * City findMany + */ + export type CityFindManyArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + /** + * Filter, which Cities to fetch. + */ + where?: CityWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Cities to fetch. + */ + orderBy?: CityOrderByWithRelationInput | CityOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Cities. + */ + cursor?: CityWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Cities 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` Cities. + */ + skip?: number + distinct?: CityScalarFieldEnum | CityScalarFieldEnum[] + } + + /** + * City create + */ + export type CityCreateArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + /** + * The data needed to create a City. + */ + data: XOR + } + + /** + * City createMany + */ + export type CityCreateManyArgs = { + /** + * The data used to create many Cities. + */ + data: CityCreateManyInput | CityCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * City createManyAndReturn + */ + export type CityCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelectCreateManyAndReturn | null + /** + * The data used to create many Cities. + */ + data: CityCreateManyInput | CityCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * City update + */ + export type CityUpdateArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + /** + * The data needed to update a City. + */ + data: XOR + /** + * Choose, which City to update. + */ + where: CityWhereUniqueInput + } + + /** + * City updateMany + */ + export type CityUpdateManyArgs = { + /** + * The data used to update Cities. + */ + data: XOR + /** + * Filter which Cities to update + */ + where?: CityWhereInput + } + + /** + * City upsert + */ + export type CityUpsertArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + /** + * The filter to search for the City to update in case it exists. + */ + where: CityWhereUniqueInput + /** + * In case the City found by the `where` argument doesn't exist, create a new City with this data. + */ + create: XOR + /** + * In case the City was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * City delete + */ + export type CityDeleteArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + /** + * Filter which City to delete. + */ + where: CityWhereUniqueInput + } + + /** + * City deleteMany + */ + export type CityDeleteManyArgs = { + /** + * Filter which Cities to delete + */ + where?: CityWhereInput + } + + /** + * City.customers + */ + export type City$customersArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + where?: CustomerWhereInput + orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] + cursor?: CustomerWhereUniqueInput + take?: number + skip?: number + distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] + } + + /** + * City.addresses + */ + export type City$addressesArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + where?: CustomerAddressWhereInput + orderBy?: CustomerAddressOrderByWithRelationInput | CustomerAddressOrderByWithRelationInput[] + cursor?: CustomerAddressWhereUniqueInput + take?: number + skip?: number + distinct?: CustomerAddressScalarFieldEnum | CustomerAddressScalarFieldEnum[] + } + + /** + * City.branches + */ + export type City$branchesArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + where?: BranchWhereInput + orderBy?: BranchOrderByWithRelationInput | BranchOrderByWithRelationInput[] + cursor?: BranchWhereUniqueInput + take?: number + skip?: number + distinct?: BranchScalarFieldEnum | BranchScalarFieldEnum[] + } + + /** + * City.preOrders + */ + export type City$preOrdersArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + where?: PreOrderWhereInput + orderBy?: PreOrderOrderByWithRelationInput | PreOrderOrderByWithRelationInput[] + cursor?: PreOrderWhereUniqueInput + take?: number + skip?: number + distinct?: PreOrderScalarFieldEnum | PreOrderScalarFieldEnum[] + } + + /** + * City without action + */ + export type CityDefaultArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + } + + + /** + * Model AdminUser + */ + + export type AggregateAdminUser = { + _count: AdminUserCountAggregateOutputType | null + _avg: AdminUserAvgAggregateOutputType | null + _sum: AdminUserSumAggregateOutputType | null + _min: AdminUserMinAggregateOutputType | null + _max: AdminUserMaxAggregateOutputType | null + } + + export type AdminUserAvgAggregateOutputType = { + wagePercent: Decimal | null + } + + export type AdminUserSumAggregateOutputType = { + wagePercent: Decimal | null + } + + export type AdminUserMinAggregateOutputType = { + id: string | null + fullName: string | null + mobile: string | null + passwordHash: string | null + role: $Enums.AdminRole | null + branchId: string | null + wagePercent: Decimal | null + isActive: boolean | null + createdAt: Date | null + } + + export type AdminUserMaxAggregateOutputType = { + id: string | null + fullName: string | null + mobile: string | null + passwordHash: string | null + role: $Enums.AdminRole | null + branchId: string | null + wagePercent: Decimal | null + isActive: boolean | null + createdAt: Date | null + } + + export type AdminUserCountAggregateOutputType = { + id: number + fullName: number + mobile: number + passwordHash: number + role: number + branchId: number + wagePercent: number + isActive: number + createdAt: number + _all: number + } + + + export type AdminUserAvgAggregateInputType = { + wagePercent?: true + } + + export type AdminUserSumAggregateInputType = { + wagePercent?: true + } + + export type AdminUserMinAggregateInputType = { + id?: true + fullName?: true + mobile?: true + passwordHash?: true + role?: true + branchId?: true + wagePercent?: true + isActive?: true + createdAt?: true + } + + export type AdminUserMaxAggregateInputType = { + id?: true + fullName?: true + mobile?: true + passwordHash?: true + role?: true + branchId?: true + wagePercent?: true + isActive?: true + createdAt?: true + } + + export type AdminUserCountAggregateInputType = { + id?: true + fullName?: true + mobile?: true + passwordHash?: true + role?: true + branchId?: true + wagePercent?: true + isActive?: true + createdAt?: true + _all?: true + } + + export type AdminUserAggregateArgs = { + /** + * Filter which AdminUser to aggregate. + */ + where?: AdminUserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminUsers to fetch. + */ + orderBy?: AdminUserOrderByWithRelationInput | AdminUserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AdminUserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminUsers 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` AdminUsers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AdminUsers + **/ + _count?: true | AdminUserCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: AdminUserAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: AdminUserSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AdminUserMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AdminUserMaxAggregateInputType + } + + export type GetAdminUserAggregateType = { + [P in keyof T & keyof AggregateAdminUser]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AdminUserGroupByArgs = { + where?: AdminUserWhereInput + orderBy?: AdminUserOrderByWithAggregationInput | AdminUserOrderByWithAggregationInput[] + by: AdminUserScalarFieldEnum[] | AdminUserScalarFieldEnum + having?: AdminUserScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AdminUserCountAggregateInputType | true + _avg?: AdminUserAvgAggregateInputType + _sum?: AdminUserSumAggregateInputType + _min?: AdminUserMinAggregateInputType + _max?: AdminUserMaxAggregateInputType + } + + export type AdminUserGroupByOutputType = { + id: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + branchId: string | null + wagePercent: Decimal | null + isActive: boolean + createdAt: Date + _count: AdminUserCountAggregateOutputType | null + _avg: AdminUserAvgAggregateOutputType | null + _sum: AdminUserSumAggregateOutputType | null + _min: AdminUserMinAggregateOutputType | null + _max: AdminUserMaxAggregateOutputType | null + } + + type GetAdminUserGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AdminUserGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AdminUserSelect = $Extensions.GetSelect<{ + id?: boolean + fullName?: boolean + mobile?: boolean + passwordHash?: boolean + role?: boolean + branchId?: boolean + wagePercent?: boolean + isActive?: boolean + createdAt?: boolean + branch?: boolean | AdminUser$branchArgs + referredCustomers?: boolean | AdminUser$referredCustomersArgs + postedLedgerEntries?: boolean | AdminUser$postedLedgerEntriesArgs + orderStatusEvents?: boolean | AdminUser$orderStatusEventsArgs + preOrderStatusEvents?: boolean | AdminUser$preOrderStatusEventsArgs + _count?: boolean | AdminUserCountOutputTypeDefaultArgs + }, ExtArgs["result"]["adminUser"]> + + export type AdminUserSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + fullName?: boolean + mobile?: boolean + passwordHash?: boolean + role?: boolean + branchId?: boolean + wagePercent?: boolean + isActive?: boolean + createdAt?: boolean + branch?: boolean | AdminUser$branchArgs + }, ExtArgs["result"]["adminUser"]> + + export type AdminUserSelectScalar = { + id?: boolean + fullName?: boolean + mobile?: boolean + passwordHash?: boolean + role?: boolean + branchId?: boolean + wagePercent?: boolean + isActive?: boolean + createdAt?: boolean + } + + export type AdminUserInclude = { + branch?: boolean | AdminUser$branchArgs + referredCustomers?: boolean | AdminUser$referredCustomersArgs + postedLedgerEntries?: boolean | AdminUser$postedLedgerEntriesArgs + orderStatusEvents?: boolean | AdminUser$orderStatusEventsArgs + preOrderStatusEvents?: boolean | AdminUser$preOrderStatusEventsArgs + _count?: boolean | AdminUserCountOutputTypeDefaultArgs + } + export type AdminUserIncludeCreateManyAndReturn = { + branch?: boolean | AdminUser$branchArgs + } + + export type $AdminUserPayload = { + name: "AdminUser" + objects: { + branch: Prisma.$BranchPayload | null + referredCustomers: Prisma.$CustomerPayload[] + postedLedgerEntries: Prisma.$LedgerEntryPayload[] + orderStatusEvents: Prisma.$OrderStatusEventPayload[] + preOrderStatusEvents: Prisma.$PreOrderStatusEventPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + branchId: string | null + wagePercent: Prisma.Decimal | null + isActive: boolean + createdAt: Date + }, ExtArgs["result"]["adminUser"]> + composites: {} + } + + type AdminUserGetPayload = $Result.GetResult + + type AdminUserCountArgs = + Omit & { + select?: AdminUserCountAggregateInputType | true + } + + export interface AdminUserDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AdminUser'], meta: { name: 'AdminUser' } } + /** + * Find zero or one AdminUser that matches the filter. + * @param {AdminUserFindUniqueArgs} args - Arguments to find a AdminUser + * @example + * // Get one AdminUser + * const adminUser = await prisma.adminUser.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AdminUserClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one AdminUser that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AdminUserFindUniqueOrThrowArgs} args - Arguments to find a AdminUser + * @example + * // Get one AdminUser + * const adminUser = await prisma.adminUser.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AdminUserClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first AdminUser 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 {AdminUserFindFirstArgs} args - Arguments to find a AdminUser + * @example + * // Get one AdminUser + * const adminUser = await prisma.adminUser.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AdminUserClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first AdminUser 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 {AdminUserFindFirstOrThrowArgs} args - Arguments to find a AdminUser + * @example + * // Get one AdminUser + * const adminUser = await prisma.adminUser.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AdminUserClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more AdminUsers 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 {AdminUserFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AdminUsers + * const adminUsers = await prisma.adminUser.findMany() + * + * // Get first 10 AdminUsers + * const adminUsers = await prisma.adminUser.findMany({ take: 10 }) + * + * // Only select the `id` + * const adminUserWithIdOnly = await prisma.adminUser.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a AdminUser. + * @param {AdminUserCreateArgs} args - Arguments to create a AdminUser. + * @example + * // Create one AdminUser + * const AdminUser = await prisma.adminUser.create({ + * data: { + * // ... data to create a AdminUser + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AdminUserClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many AdminUsers. + * @param {AdminUserCreateManyArgs} args - Arguments to create many AdminUsers. + * @example + * // Create many AdminUsers + * const adminUser = await prisma.adminUser.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AdminUsers and returns the data saved in the database. + * @param {AdminUserCreateManyAndReturnArgs} args - Arguments to create many AdminUsers. + * @example + * // Create many AdminUsers + * const adminUser = await prisma.adminUser.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AdminUsers and only return the `id` + * const adminUserWithIdOnly = await prisma.adminUser.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 AdminUser. + * @param {AdminUserDeleteArgs} args - Arguments to delete one AdminUser. + * @example + * // Delete one AdminUser + * const AdminUser = await prisma.adminUser.delete({ + * where: { + * // ... filter to delete one AdminUser + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AdminUserClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one AdminUser. + * @param {AdminUserUpdateArgs} args - Arguments to update one AdminUser. + * @example + * // Update one AdminUser + * const adminUser = await prisma.adminUser.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AdminUserClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more AdminUsers. + * @param {AdminUserDeleteManyArgs} args - Arguments to filter AdminUsers to delete. + * @example + * // Delete a few AdminUsers + * const { count } = await prisma.adminUser.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AdminUsers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminUserUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AdminUsers + * const adminUser = await prisma.adminUser.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one AdminUser. + * @param {AdminUserUpsertArgs} args - Arguments to update or create a AdminUser. + * @example + * // Update or create a AdminUser + * const adminUser = await prisma.adminUser.upsert({ + * create: { + * // ... data to create a AdminUser + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AdminUser we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AdminUserClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of AdminUsers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminUserCountArgs} args - Arguments to filter AdminUsers to count. + * @example + * // Count the number of AdminUsers + * const count = await prisma.adminUser.count({ + * where: { + * // ... the filter for the AdminUsers 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 AdminUser. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminUserAggregateArgs} 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 AdminUser. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminUserGroupByArgs} 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 AdminUserGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AdminUserGroupByArgs['orderBy'] } + : { orderBy?: AdminUserGroupByArgs['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 ? GetAdminUserGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the AdminUser model + */ + readonly fields: AdminUserFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for AdminUser. + * 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__AdminUserClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + branch = {}>(args?: Subset>): Prisma__BranchClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + referredCustomers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + postedLedgerEntries = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + orderStatusEvents = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + preOrderStatusEvents = {}>(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 AdminUser model + */ + interface AdminUserFieldRefs { + readonly id: FieldRef<"AdminUser", 'String'> + readonly fullName: FieldRef<"AdminUser", 'String'> + readonly mobile: FieldRef<"AdminUser", 'String'> + readonly passwordHash: FieldRef<"AdminUser", 'String'> + readonly role: FieldRef<"AdminUser", 'AdminRole'> + readonly branchId: FieldRef<"AdminUser", 'String'> + readonly wagePercent: FieldRef<"AdminUser", 'Decimal'> + readonly isActive: FieldRef<"AdminUser", 'Boolean'> + readonly createdAt: FieldRef<"AdminUser", 'DateTime'> + } + + + // Custom InputTypes + /** + * AdminUser findUnique + */ + export type AdminUserFindUniqueArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + /** + * Filter, which AdminUser to fetch. + */ + where: AdminUserWhereUniqueInput + } + + /** + * AdminUser findUniqueOrThrow + */ + export type AdminUserFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + /** + * Filter, which AdminUser to fetch. + */ + where: AdminUserWhereUniqueInput + } + + /** + * AdminUser findFirst + */ + export type AdminUserFindFirstArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + /** + * Filter, which AdminUser to fetch. + */ + where?: AdminUserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminUsers to fetch. + */ + orderBy?: AdminUserOrderByWithRelationInput | AdminUserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AdminUsers. + */ + cursor?: AdminUserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminUsers 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` AdminUsers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AdminUsers. + */ + distinct?: AdminUserScalarFieldEnum | AdminUserScalarFieldEnum[] + } + + /** + * AdminUser findFirstOrThrow + */ + export type AdminUserFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + /** + * Filter, which AdminUser to fetch. + */ + where?: AdminUserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminUsers to fetch. + */ + orderBy?: AdminUserOrderByWithRelationInput | AdminUserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AdminUsers. + */ + cursor?: AdminUserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminUsers 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` AdminUsers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AdminUsers. + */ + distinct?: AdminUserScalarFieldEnum | AdminUserScalarFieldEnum[] + } + + /** + * AdminUser findMany + */ + export type AdminUserFindManyArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + /** + * Filter, which AdminUsers to fetch. + */ + where?: AdminUserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminUsers to fetch. + */ + orderBy?: AdminUserOrderByWithRelationInput | AdminUserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AdminUsers. + */ + cursor?: AdminUserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminUsers 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` AdminUsers. + */ + skip?: number + distinct?: AdminUserScalarFieldEnum | AdminUserScalarFieldEnum[] + } + + /** + * AdminUser create + */ + export type AdminUserCreateArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + /** + * The data needed to create a AdminUser. + */ + data: XOR + } + + /** + * AdminUser createMany + */ + export type AdminUserCreateManyArgs = { + /** + * The data used to create many AdminUsers. + */ + data: AdminUserCreateManyInput | AdminUserCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AdminUser createManyAndReturn + */ + export type AdminUserCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelectCreateManyAndReturn | null + /** + * The data used to create many AdminUsers. + */ + data: AdminUserCreateManyInput | AdminUserCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserIncludeCreateManyAndReturn | null + } + + /** + * AdminUser update + */ + export type AdminUserUpdateArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + /** + * The data needed to update a AdminUser. + */ + data: XOR + /** + * Choose, which AdminUser to update. + */ + where: AdminUserWhereUniqueInput + } + + /** + * AdminUser updateMany + */ + export type AdminUserUpdateManyArgs = { + /** + * The data used to update AdminUsers. + */ + data: XOR + /** + * Filter which AdminUsers to update + */ + where?: AdminUserWhereInput + } + + /** + * AdminUser upsert + */ + export type AdminUserUpsertArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + /** + * The filter to search for the AdminUser to update in case it exists. + */ + where: AdminUserWhereUniqueInput + /** + * In case the AdminUser found by the `where` argument doesn't exist, create a new AdminUser with this data. + */ + create: XOR + /** + * In case the AdminUser was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * AdminUser delete + */ + export type AdminUserDeleteArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + /** + * Filter which AdminUser to delete. + */ + where: AdminUserWhereUniqueInput + } + + /** + * AdminUser deleteMany + */ + export type AdminUserDeleteManyArgs = { + /** + * Filter which AdminUsers to delete + */ + where?: AdminUserWhereInput + } + + /** + * AdminUser.branch + */ + export type AdminUser$branchArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + where?: BranchWhereInput + } + + /** + * AdminUser.referredCustomers + */ + export type AdminUser$referredCustomersArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + where?: CustomerWhereInput + orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] + cursor?: CustomerWhereUniqueInput + take?: number + skip?: number + distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] + } + + /** + * AdminUser.postedLedgerEntries + */ + export type AdminUser$postedLedgerEntriesArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + where?: LedgerEntryWhereInput + orderBy?: LedgerEntryOrderByWithRelationInput | LedgerEntryOrderByWithRelationInput[] + cursor?: LedgerEntryWhereUniqueInput + take?: number + skip?: number + distinct?: LedgerEntryScalarFieldEnum | LedgerEntryScalarFieldEnum[] + } + + /** + * AdminUser.orderStatusEvents + */ + export type AdminUser$orderStatusEventsArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + where?: OrderStatusEventWhereInput + orderBy?: OrderStatusEventOrderByWithRelationInput | OrderStatusEventOrderByWithRelationInput[] + cursor?: OrderStatusEventWhereUniqueInput + take?: number + skip?: number + distinct?: OrderStatusEventScalarFieldEnum | OrderStatusEventScalarFieldEnum[] + } + + /** + * AdminUser.preOrderStatusEvents + */ + export type AdminUser$preOrderStatusEventsArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + where?: PreOrderStatusEventWhereInput + orderBy?: PreOrderStatusEventOrderByWithRelationInput | PreOrderStatusEventOrderByWithRelationInput[] + cursor?: PreOrderStatusEventWhereUniqueInput + take?: number + skip?: number + distinct?: PreOrderStatusEventScalarFieldEnum | PreOrderStatusEventScalarFieldEnum[] + } + + /** + * AdminUser without action + */ + export type AdminUserDefaultArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + } + + + /** + * Model Customer + */ + + export type AggregateCustomer = { + _count: CustomerCountAggregateOutputType | null + _avg: CustomerAvgAggregateOutputType | null + _sum: CustomerSumAggregateOutputType | null + _min: CustomerMinAggregateOutputType | null + _max: CustomerMaxAggregateOutputType | null + } + + export type CustomerAvgAggregateOutputType = { + goldCreditLimitGrams: Decimal | null + goldDebtGrams: Decimal | null + fiatDebtRial: Decimal | null + } + + export type CustomerSumAggregateOutputType = { + goldCreditLimitGrams: Decimal | null + goldDebtGrams: Decimal | null + fiatDebtRial: Decimal | null + } + + export type CustomerMinAggregateOutputType = { + id: string | null + fullName: string | null + mobile: string | null + nationalCode: string | null + passwordHash: string | null + cityId: string | null + referredByAgentId: string | null + goldCreditLimitGrams: Decimal | null + goldDebtGrams: Decimal | null + fiatDebtRial: Decimal | null + verificationStep: $Enums.VerificationStep | null + nationalIdImageUrl: string | null + businessLicenseUrl: string | null + shopImageUrl: string | null + isActive: boolean | null + createdAt: Date | null + updatedAt: Date | null + } + + export type CustomerMaxAggregateOutputType = { + id: string | null + fullName: string | null + mobile: string | null + nationalCode: string | null + passwordHash: string | null + cityId: string | null + referredByAgentId: string | null + goldCreditLimitGrams: Decimal | null + goldDebtGrams: Decimal | null + fiatDebtRial: Decimal | null + verificationStep: $Enums.VerificationStep | null + nationalIdImageUrl: string | null + businessLicenseUrl: string | null + shopImageUrl: string | null + isActive: boolean | null + createdAt: Date | null + updatedAt: Date | null + } + + export type CustomerCountAggregateOutputType = { + id: number + fullName: number + mobile: number + nationalCode: number + passwordHash: number + cityId: number + referredByAgentId: number + goldCreditLimitGrams: number + goldDebtGrams: number + fiatDebtRial: number + verificationStep: number + nationalIdImageUrl: number + businessLicenseUrl: number + shopImageUrl: number + isActive: number + createdAt: number + updatedAt: number + _all: number + } + + + export type CustomerAvgAggregateInputType = { + goldCreditLimitGrams?: true + goldDebtGrams?: true + fiatDebtRial?: true + } + + export type CustomerSumAggregateInputType = { + goldCreditLimitGrams?: true + goldDebtGrams?: true + fiatDebtRial?: true + } + + export type CustomerMinAggregateInputType = { + id?: true + fullName?: true + mobile?: true + nationalCode?: true + passwordHash?: true + cityId?: true + referredByAgentId?: true + goldCreditLimitGrams?: true + goldDebtGrams?: true + fiatDebtRial?: true + verificationStep?: true + nationalIdImageUrl?: true + businessLicenseUrl?: true + shopImageUrl?: true + isActive?: true + createdAt?: true + updatedAt?: true + } + + export type CustomerMaxAggregateInputType = { + id?: true + fullName?: true + mobile?: true + nationalCode?: true + passwordHash?: true + cityId?: true + referredByAgentId?: true + goldCreditLimitGrams?: true + goldDebtGrams?: true + fiatDebtRial?: true + verificationStep?: true + nationalIdImageUrl?: true + businessLicenseUrl?: true + shopImageUrl?: true + isActive?: true + createdAt?: true + updatedAt?: true + } + + export type CustomerCountAggregateInputType = { + id?: true + fullName?: true + mobile?: true + nationalCode?: true + passwordHash?: true + cityId?: true + referredByAgentId?: true + goldCreditLimitGrams?: true + goldDebtGrams?: true + fiatDebtRial?: true + verificationStep?: true + nationalIdImageUrl?: true + businessLicenseUrl?: true + shopImageUrl?: true + isActive?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type CustomerAggregateArgs = { + /** + * Filter which Customer to aggregate. + */ + where?: CustomerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Customers to fetch. + */ + orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CustomerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Customers 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` Customers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Customers + **/ + _count?: true | CustomerCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: CustomerAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: CustomerSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CustomerMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CustomerMaxAggregateInputType + } + + export type GetCustomerAggregateType = { + [P in keyof T & keyof AggregateCustomer]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CustomerGroupByArgs = { + where?: CustomerWhereInput + orderBy?: CustomerOrderByWithAggregationInput | CustomerOrderByWithAggregationInput[] + by: CustomerScalarFieldEnum[] | CustomerScalarFieldEnum + having?: CustomerScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CustomerCountAggregateInputType | true + _avg?: CustomerAvgAggregateInputType + _sum?: CustomerSumAggregateInputType + _min?: CustomerMinAggregateInputType + _max?: CustomerMaxAggregateInputType + } + + export type CustomerGroupByOutputType = { + id: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId: string | null + referredByAgentId: string | null + goldCreditLimitGrams: Decimal + goldDebtGrams: Decimal + fiatDebtRial: Decimal + verificationStep: $Enums.VerificationStep + nationalIdImageUrl: string | null + businessLicenseUrl: string | null + shopImageUrl: string | null + isActive: boolean + createdAt: Date + updatedAt: Date + _count: CustomerCountAggregateOutputType | null + _avg: CustomerAvgAggregateOutputType | null + _sum: CustomerSumAggregateOutputType | null + _min: CustomerMinAggregateOutputType | null + _max: CustomerMaxAggregateOutputType | null + } + + type GetCustomerGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CustomerGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CustomerSelect = $Extensions.GetSelect<{ + id?: boolean + fullName?: boolean + mobile?: boolean + nationalCode?: boolean + passwordHash?: boolean + cityId?: boolean + referredByAgentId?: boolean + goldCreditLimitGrams?: boolean + goldDebtGrams?: boolean + fiatDebtRial?: boolean + verificationStep?: boolean + nationalIdImageUrl?: boolean + businessLicenseUrl?: boolean + shopImageUrl?: boolean + isActive?: boolean + createdAt?: boolean + updatedAt?: boolean + city?: boolean | Customer$cityArgs + referredByAgent?: boolean | Customer$referredByAgentArgs + addresses?: boolean | Customer$addressesArgs + orders?: boolean | Customer$ordersArgs + preOrders?: boolean | Customer$preOrdersArgs + ledgerEntries?: boolean | Customer$ledgerEntriesArgs + walletBonuses?: boolean | Customer$walletBonusesArgs + _count?: boolean | CustomerCountOutputTypeDefaultArgs + }, ExtArgs["result"]["customer"]> + + export type CustomerSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + fullName?: boolean + mobile?: boolean + nationalCode?: boolean + passwordHash?: boolean + cityId?: boolean + referredByAgentId?: boolean + goldCreditLimitGrams?: boolean + goldDebtGrams?: boolean + fiatDebtRial?: boolean + verificationStep?: boolean + nationalIdImageUrl?: boolean + businessLicenseUrl?: boolean + shopImageUrl?: boolean + isActive?: boolean + createdAt?: boolean + updatedAt?: boolean + city?: boolean | Customer$cityArgs + referredByAgent?: boolean | Customer$referredByAgentArgs + }, ExtArgs["result"]["customer"]> + + export type CustomerSelectScalar = { + id?: boolean + fullName?: boolean + mobile?: boolean + nationalCode?: boolean + passwordHash?: boolean + cityId?: boolean + referredByAgentId?: boolean + goldCreditLimitGrams?: boolean + goldDebtGrams?: boolean + fiatDebtRial?: boolean + verificationStep?: boolean + nationalIdImageUrl?: boolean + businessLicenseUrl?: boolean + shopImageUrl?: boolean + isActive?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type CustomerInclude = { + city?: boolean | Customer$cityArgs + referredByAgent?: boolean | Customer$referredByAgentArgs + addresses?: boolean | Customer$addressesArgs + orders?: boolean | Customer$ordersArgs + preOrders?: boolean | Customer$preOrdersArgs + ledgerEntries?: boolean | Customer$ledgerEntriesArgs + walletBonuses?: boolean | Customer$walletBonusesArgs + _count?: boolean | CustomerCountOutputTypeDefaultArgs + } + export type CustomerIncludeCreateManyAndReturn = { + city?: boolean | Customer$cityArgs + referredByAgent?: boolean | Customer$referredByAgentArgs + } + + export type $CustomerPayload = { + name: "Customer" + objects: { + city: Prisma.$CityPayload | null + referredByAgent: Prisma.$AdminUserPayload | null + addresses: Prisma.$CustomerAddressPayload[] + orders: Prisma.$OrderPayload[] + preOrders: Prisma.$PreOrderPayload[] + ledgerEntries: Prisma.$LedgerEntryPayload[] + walletBonuses: Prisma.$WalletBonusPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId: string | null + referredByAgentId: string | null + goldCreditLimitGrams: Prisma.Decimal + goldDebtGrams: Prisma.Decimal + fiatDebtRial: Prisma.Decimal + verificationStep: $Enums.VerificationStep + nationalIdImageUrl: string | null + businessLicenseUrl: string | null + shopImageUrl: string | null + isActive: boolean + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["customer"]> + composites: {} + } + + type CustomerGetPayload = $Result.GetResult + + type CustomerCountArgs = + Omit & { + select?: CustomerCountAggregateInputType | true + } + + export interface CustomerDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Customer'], meta: { name: 'Customer' } } + /** + * Find zero or one Customer that matches the filter. + * @param {CustomerFindUniqueArgs} args - Arguments to find a Customer + * @example + * // Get one Customer + * const customer = await prisma.customer.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CustomerClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Customer that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CustomerFindUniqueOrThrowArgs} args - Arguments to find a Customer + * @example + * // Get one Customer + * const customer = await prisma.customer.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Customer 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 {CustomerFindFirstArgs} args - Arguments to find a Customer + * @example + * // Get one Customer + * const customer = await prisma.customer.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CustomerClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Customer 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 {CustomerFindFirstOrThrowArgs} args - Arguments to find a Customer + * @example + * // Get one Customer + * const customer = await prisma.customer.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CustomerClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Customers 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 {CustomerFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Customers + * const customers = await prisma.customer.findMany() + * + * // Get first 10 Customers + * const customers = await prisma.customer.findMany({ take: 10 }) + * + * // Only select the `id` + * const customerWithIdOnly = await prisma.customer.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Customer. + * @param {CustomerCreateArgs} args - Arguments to create a Customer. + * @example + * // Create one Customer + * const Customer = await prisma.customer.create({ + * data: { + * // ... data to create a Customer + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CustomerClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Customers. + * @param {CustomerCreateManyArgs} args - Arguments to create many Customers. + * @example + * // Create many Customers + * const customer = await prisma.customer.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Customers and returns the data saved in the database. + * @param {CustomerCreateManyAndReturnArgs} args - Arguments to create many Customers. + * @example + * // Create many Customers + * const customer = await prisma.customer.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Customers and only return the `id` + * const customerWithIdOnly = await prisma.customer.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 Customer. + * @param {CustomerDeleteArgs} args - Arguments to delete one Customer. + * @example + * // Delete one Customer + * const Customer = await prisma.customer.delete({ + * where: { + * // ... filter to delete one Customer + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CustomerClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Customer. + * @param {CustomerUpdateArgs} args - Arguments to update one Customer. + * @example + * // Update one Customer + * const customer = await prisma.customer.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CustomerClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Customers. + * @param {CustomerDeleteManyArgs} args - Arguments to filter Customers to delete. + * @example + * // Delete a few Customers + * const { count } = await prisma.customer.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Customers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Customers + * const customer = await prisma.customer.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Customer. + * @param {CustomerUpsertArgs} args - Arguments to update or create a Customer. + * @example + * // Update or create a Customer + * const customer = await prisma.customer.upsert({ + * create: { + * // ... data to create a Customer + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Customer we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CustomerClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Customers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerCountArgs} args - Arguments to filter Customers to count. + * @example + * // Count the number of Customers + * const count = await prisma.customer.count({ + * where: { + * // ... the filter for the Customers 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 Customer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerAggregateArgs} 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 Customer. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerGroupByArgs} 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 CustomerGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CustomerGroupByArgs['orderBy'] } + : { orderBy?: CustomerGroupByArgs['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 ? GetCustomerGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Customer model + */ + readonly fields: CustomerFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Customer. + * 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__CustomerClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + city = {}>(args?: Subset>): Prisma__CityClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + referredByAgent = {}>(args?: Subset>): Prisma__AdminUserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + addresses = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + orders = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + preOrders = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + ledgerEntries = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + walletBonuses = {}>(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 Customer model + */ + interface CustomerFieldRefs { + readonly id: FieldRef<"Customer", 'String'> + readonly fullName: FieldRef<"Customer", 'String'> + readonly mobile: FieldRef<"Customer", 'String'> + readonly nationalCode: FieldRef<"Customer", 'String'> + readonly passwordHash: FieldRef<"Customer", 'String'> + readonly cityId: FieldRef<"Customer", 'String'> + readonly referredByAgentId: FieldRef<"Customer", 'String'> + readonly goldCreditLimitGrams: FieldRef<"Customer", 'Decimal'> + readonly goldDebtGrams: FieldRef<"Customer", 'Decimal'> + readonly fiatDebtRial: FieldRef<"Customer", 'Decimal'> + readonly verificationStep: FieldRef<"Customer", 'VerificationStep'> + readonly nationalIdImageUrl: FieldRef<"Customer", 'String'> + readonly businessLicenseUrl: FieldRef<"Customer", 'String'> + readonly shopImageUrl: FieldRef<"Customer", 'String'> + readonly isActive: FieldRef<"Customer", 'Boolean'> + readonly createdAt: FieldRef<"Customer", 'DateTime'> + readonly updatedAt: FieldRef<"Customer", 'DateTime'> + } + + + // Custom InputTypes + /** + * Customer findUnique + */ + export type CustomerFindUniqueArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + /** + * Filter, which Customer to fetch. + */ + where: CustomerWhereUniqueInput + } + + /** + * Customer findUniqueOrThrow + */ + export type CustomerFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + /** + * Filter, which Customer to fetch. + */ + where: CustomerWhereUniqueInput + } + + /** + * Customer findFirst + */ + export type CustomerFindFirstArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + /** + * Filter, which Customer to fetch. + */ + where?: CustomerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Customers to fetch. + */ + orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Customers. + */ + cursor?: CustomerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Customers 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` Customers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Customers. + */ + distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] + } + + /** + * Customer findFirstOrThrow + */ + export type CustomerFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + /** + * Filter, which Customer to fetch. + */ + where?: CustomerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Customers to fetch. + */ + orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Customers. + */ + cursor?: CustomerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Customers 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` Customers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Customers. + */ + distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] + } + + /** + * Customer findMany + */ + export type CustomerFindManyArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + /** + * Filter, which Customers to fetch. + */ + where?: CustomerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Customers to fetch. + */ + orderBy?: CustomerOrderByWithRelationInput | CustomerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Customers. + */ + cursor?: CustomerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Customers 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` Customers. + */ + skip?: number + distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] + } + + /** + * Customer create + */ + export type CustomerCreateArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + /** + * The data needed to create a Customer. + */ + data: XOR + } + + /** + * Customer createMany + */ + export type CustomerCreateManyArgs = { + /** + * The data used to create many Customers. + */ + data: CustomerCreateManyInput | CustomerCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Customer createManyAndReturn + */ + export type CustomerCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelectCreateManyAndReturn | null + /** + * The data used to create many Customers. + */ + data: CustomerCreateManyInput | CustomerCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerIncludeCreateManyAndReturn | null + } + + /** + * Customer update + */ + export type CustomerUpdateArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + /** + * The data needed to update a Customer. + */ + data: XOR + /** + * Choose, which Customer to update. + */ + where: CustomerWhereUniqueInput + } + + /** + * Customer updateMany + */ + export type CustomerUpdateManyArgs = { + /** + * The data used to update Customers. + */ + data: XOR + /** + * Filter which Customers to update + */ + where?: CustomerWhereInput + } + + /** + * Customer upsert + */ + export type CustomerUpsertArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + /** + * The filter to search for the Customer to update in case it exists. + */ + where: CustomerWhereUniqueInput + /** + * In case the Customer found by the `where` argument doesn't exist, create a new Customer with this data. + */ + create: XOR + /** + * In case the Customer was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Customer delete + */ + export type CustomerDeleteArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + /** + * Filter which Customer to delete. + */ + where: CustomerWhereUniqueInput + } + + /** + * Customer deleteMany + */ + export type CustomerDeleteManyArgs = { + /** + * Filter which Customers to delete + */ + where?: CustomerWhereInput + } + + /** + * Customer.city + */ + export type Customer$cityArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + where?: CityWhereInput + } + + /** + * Customer.referredByAgent + */ + export type Customer$referredByAgentArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + where?: AdminUserWhereInput + } + + /** + * Customer.addresses + */ + export type Customer$addressesArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + where?: CustomerAddressWhereInput + orderBy?: CustomerAddressOrderByWithRelationInput | CustomerAddressOrderByWithRelationInput[] + cursor?: CustomerAddressWhereUniqueInput + take?: number + skip?: number + distinct?: CustomerAddressScalarFieldEnum | CustomerAddressScalarFieldEnum[] + } + + /** + * Customer.orders + */ + export type Customer$ordersArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + where?: OrderWhereInput + orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] + cursor?: OrderWhereUniqueInput + take?: number + skip?: number + distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] + } + + /** + * Customer.preOrders + */ + export type Customer$preOrdersArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + where?: PreOrderWhereInput + orderBy?: PreOrderOrderByWithRelationInput | PreOrderOrderByWithRelationInput[] + cursor?: PreOrderWhereUniqueInput + take?: number + skip?: number + distinct?: PreOrderScalarFieldEnum | PreOrderScalarFieldEnum[] + } + + /** + * Customer.ledgerEntries + */ + export type Customer$ledgerEntriesArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + where?: LedgerEntryWhereInput + orderBy?: LedgerEntryOrderByWithRelationInput | LedgerEntryOrderByWithRelationInput[] + cursor?: LedgerEntryWhereUniqueInput + take?: number + skip?: number + distinct?: LedgerEntryScalarFieldEnum | LedgerEntryScalarFieldEnum[] + } + + /** + * Customer.walletBonuses + */ + export type Customer$walletBonusesArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + where?: WalletBonusWhereInput + orderBy?: WalletBonusOrderByWithRelationInput | WalletBonusOrderByWithRelationInput[] + cursor?: WalletBonusWhereUniqueInput + take?: number + skip?: number + distinct?: WalletBonusScalarFieldEnum | WalletBonusScalarFieldEnum[] + } + + /** + * Customer without action + */ + export type CustomerDefaultArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + } + + + /** + * Model CustomerAddress + */ + + export type AggregateCustomerAddress = { + _count: CustomerAddressCountAggregateOutputType | null + _min: CustomerAddressMinAggregateOutputType | null + _max: CustomerAddressMaxAggregateOutputType | null + } + + export type CustomerAddressMinAggregateOutputType = { + id: string | null + customerId: string | null + cityId: string | null + addressLine: string | null + isDefault: boolean | null + } + + export type CustomerAddressMaxAggregateOutputType = { + id: string | null + customerId: string | null + cityId: string | null + addressLine: string | null + isDefault: boolean | null + } + + export type CustomerAddressCountAggregateOutputType = { + id: number + customerId: number + cityId: number + addressLine: number + isDefault: number + _all: number + } + + + export type CustomerAddressMinAggregateInputType = { + id?: true + customerId?: true + cityId?: true + addressLine?: true + isDefault?: true + } + + export type CustomerAddressMaxAggregateInputType = { + id?: true + customerId?: true + cityId?: true + addressLine?: true + isDefault?: true + } + + export type CustomerAddressCountAggregateInputType = { + id?: true + customerId?: true + cityId?: true + addressLine?: true + isDefault?: true + _all?: true + } + + export type CustomerAddressAggregateArgs = { + /** + * Filter which CustomerAddress to aggregate. + */ + where?: CustomerAddressWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerAddresses to fetch. + */ + orderBy?: CustomerAddressOrderByWithRelationInput | CustomerAddressOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CustomerAddressWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerAddresses 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` CustomerAddresses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned CustomerAddresses + **/ + _count?: true | CustomerAddressCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CustomerAddressMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CustomerAddressMaxAggregateInputType + } + + export type GetCustomerAddressAggregateType = { + [P in keyof T & keyof AggregateCustomerAddress]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CustomerAddressGroupByArgs = { + where?: CustomerAddressWhereInput + orderBy?: CustomerAddressOrderByWithAggregationInput | CustomerAddressOrderByWithAggregationInput[] + by: CustomerAddressScalarFieldEnum[] | CustomerAddressScalarFieldEnum + having?: CustomerAddressScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CustomerAddressCountAggregateInputType | true + _min?: CustomerAddressMinAggregateInputType + _max?: CustomerAddressMaxAggregateInputType + } + + export type CustomerAddressGroupByOutputType = { + id: string + customerId: string + cityId: string | null + addressLine: string + isDefault: boolean + _count: CustomerAddressCountAggregateOutputType | null + _min: CustomerAddressMinAggregateOutputType | null + _max: CustomerAddressMaxAggregateOutputType | null + } + + type GetCustomerAddressGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CustomerAddressGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CustomerAddressSelect = $Extensions.GetSelect<{ + id?: boolean + customerId?: boolean + cityId?: boolean + addressLine?: boolean + isDefault?: boolean + customer?: boolean | CustomerDefaultArgs + city?: boolean | CustomerAddress$cityArgs + }, ExtArgs["result"]["customerAddress"]> + + export type CustomerAddressSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + customerId?: boolean + cityId?: boolean + addressLine?: boolean + isDefault?: boolean + customer?: boolean | CustomerDefaultArgs + city?: boolean | CustomerAddress$cityArgs + }, ExtArgs["result"]["customerAddress"]> + + export type CustomerAddressSelectScalar = { + id?: boolean + customerId?: boolean + cityId?: boolean + addressLine?: boolean + isDefault?: boolean + } + + export type CustomerAddressInclude = { + customer?: boolean | CustomerDefaultArgs + city?: boolean | CustomerAddress$cityArgs + } + export type CustomerAddressIncludeCreateManyAndReturn = { + customer?: boolean | CustomerDefaultArgs + city?: boolean | CustomerAddress$cityArgs + } + + export type $CustomerAddressPayload = { + name: "CustomerAddress" + objects: { + customer: Prisma.$CustomerPayload + city: Prisma.$CityPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + customerId: string + cityId: string | null + addressLine: string + isDefault: boolean + }, ExtArgs["result"]["customerAddress"]> + composites: {} + } + + type CustomerAddressGetPayload = $Result.GetResult + + type CustomerAddressCountArgs = + Omit & { + select?: CustomerAddressCountAggregateInputType | true + } + + export interface CustomerAddressDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['CustomerAddress'], meta: { name: 'CustomerAddress' } } + /** + * Find zero or one CustomerAddress that matches the filter. + * @param {CustomerAddressFindUniqueArgs} args - Arguments to find a CustomerAddress + * @example + * // Get one CustomerAddress + * const customerAddress = await prisma.customerAddress.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CustomerAddressClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one CustomerAddress that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CustomerAddressFindUniqueOrThrowArgs} args - Arguments to find a CustomerAddress + * @example + * // Get one CustomerAddress + * const customerAddress = await prisma.customerAddress.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CustomerAddressClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first CustomerAddress 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 {CustomerAddressFindFirstArgs} args - Arguments to find a CustomerAddress + * @example + * // Get one CustomerAddress + * const customerAddress = await prisma.customerAddress.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CustomerAddressClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first CustomerAddress 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 {CustomerAddressFindFirstOrThrowArgs} args - Arguments to find a CustomerAddress + * @example + * // Get one CustomerAddress + * const customerAddress = await prisma.customerAddress.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CustomerAddressClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more CustomerAddresses 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 {CustomerAddressFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all CustomerAddresses + * const customerAddresses = await prisma.customerAddress.findMany() + * + * // Get first 10 CustomerAddresses + * const customerAddresses = await prisma.customerAddress.findMany({ take: 10 }) + * + * // Only select the `id` + * const customerAddressWithIdOnly = await prisma.customerAddress.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a CustomerAddress. + * @param {CustomerAddressCreateArgs} args - Arguments to create a CustomerAddress. + * @example + * // Create one CustomerAddress + * const CustomerAddress = await prisma.customerAddress.create({ + * data: { + * // ... data to create a CustomerAddress + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CustomerAddressClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many CustomerAddresses. + * @param {CustomerAddressCreateManyArgs} args - Arguments to create many CustomerAddresses. + * @example + * // Create many CustomerAddresses + * const customerAddress = await prisma.customerAddress.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many CustomerAddresses and returns the data saved in the database. + * @param {CustomerAddressCreateManyAndReturnArgs} args - Arguments to create many CustomerAddresses. + * @example + * // Create many CustomerAddresses + * const customerAddress = await prisma.customerAddress.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many CustomerAddresses and only return the `id` + * const customerAddressWithIdOnly = await prisma.customerAddress.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 CustomerAddress. + * @param {CustomerAddressDeleteArgs} args - Arguments to delete one CustomerAddress. + * @example + * // Delete one CustomerAddress + * const CustomerAddress = await prisma.customerAddress.delete({ + * where: { + * // ... filter to delete one CustomerAddress + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CustomerAddressClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one CustomerAddress. + * @param {CustomerAddressUpdateArgs} args - Arguments to update one CustomerAddress. + * @example + * // Update one CustomerAddress + * const customerAddress = await prisma.customerAddress.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CustomerAddressClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more CustomerAddresses. + * @param {CustomerAddressDeleteManyArgs} args - Arguments to filter CustomerAddresses to delete. + * @example + * // Delete a few CustomerAddresses + * const { count } = await prisma.customerAddress.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more CustomerAddresses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerAddressUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many CustomerAddresses + * const customerAddress = await prisma.customerAddress.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one CustomerAddress. + * @param {CustomerAddressUpsertArgs} args - Arguments to update or create a CustomerAddress. + * @example + * // Update or create a CustomerAddress + * const customerAddress = await prisma.customerAddress.upsert({ + * create: { + * // ... data to create a CustomerAddress + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the CustomerAddress we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CustomerAddressClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of CustomerAddresses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerAddressCountArgs} args - Arguments to filter CustomerAddresses to count. + * @example + * // Count the number of CustomerAddresses + * const count = await prisma.customerAddress.count({ + * where: { + * // ... the filter for the CustomerAddresses 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 CustomerAddress. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerAddressAggregateArgs} 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 CustomerAddress. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerAddressGroupByArgs} 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 CustomerAddressGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CustomerAddressGroupByArgs['orderBy'] } + : { orderBy?: CustomerAddressGroupByArgs['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 ? GetCustomerAddressGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the CustomerAddress model + */ + readonly fields: CustomerAddressFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for CustomerAddress. + * 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__CustomerAddressClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + city = {}>(args?: Subset>): Prisma__CityClient<$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 CustomerAddress model + */ + interface CustomerAddressFieldRefs { + readonly id: FieldRef<"CustomerAddress", 'String'> + readonly customerId: FieldRef<"CustomerAddress", 'String'> + readonly cityId: FieldRef<"CustomerAddress", 'String'> + readonly addressLine: FieldRef<"CustomerAddress", 'String'> + readonly isDefault: FieldRef<"CustomerAddress", 'Boolean'> + } + + + // Custom InputTypes + /** + * CustomerAddress findUnique + */ + export type CustomerAddressFindUniqueArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + /** + * Filter, which CustomerAddress to fetch. + */ + where: CustomerAddressWhereUniqueInput + } + + /** + * CustomerAddress findUniqueOrThrow + */ + export type CustomerAddressFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + /** + * Filter, which CustomerAddress to fetch. + */ + where: CustomerAddressWhereUniqueInput + } + + /** + * CustomerAddress findFirst + */ + export type CustomerAddressFindFirstArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + /** + * Filter, which CustomerAddress to fetch. + */ + where?: CustomerAddressWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerAddresses to fetch. + */ + orderBy?: CustomerAddressOrderByWithRelationInput | CustomerAddressOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for CustomerAddresses. + */ + cursor?: CustomerAddressWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerAddresses 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` CustomerAddresses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of CustomerAddresses. + */ + distinct?: CustomerAddressScalarFieldEnum | CustomerAddressScalarFieldEnum[] + } + + /** + * CustomerAddress findFirstOrThrow + */ + export type CustomerAddressFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + /** + * Filter, which CustomerAddress to fetch. + */ + where?: CustomerAddressWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerAddresses to fetch. + */ + orderBy?: CustomerAddressOrderByWithRelationInput | CustomerAddressOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for CustomerAddresses. + */ + cursor?: CustomerAddressWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerAddresses 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` CustomerAddresses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of CustomerAddresses. + */ + distinct?: CustomerAddressScalarFieldEnum | CustomerAddressScalarFieldEnum[] + } + + /** + * CustomerAddress findMany + */ + export type CustomerAddressFindManyArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + /** + * Filter, which CustomerAddresses to fetch. + */ + where?: CustomerAddressWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerAddresses to fetch. + */ + orderBy?: CustomerAddressOrderByWithRelationInput | CustomerAddressOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing CustomerAddresses. + */ + cursor?: CustomerAddressWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerAddresses 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` CustomerAddresses. + */ + skip?: number + distinct?: CustomerAddressScalarFieldEnum | CustomerAddressScalarFieldEnum[] + } + + /** + * CustomerAddress create + */ + export type CustomerAddressCreateArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + /** + * The data needed to create a CustomerAddress. + */ + data: XOR + } + + /** + * CustomerAddress createMany + */ + export type CustomerAddressCreateManyArgs = { + /** + * The data used to create many CustomerAddresses. + */ + data: CustomerAddressCreateManyInput | CustomerAddressCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * CustomerAddress createManyAndReturn + */ + export type CustomerAddressCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelectCreateManyAndReturn | null + /** + * The data used to create many CustomerAddresses. + */ + data: CustomerAddressCreateManyInput | CustomerAddressCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressIncludeCreateManyAndReturn | null + } + + /** + * CustomerAddress update + */ + export type CustomerAddressUpdateArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + /** + * The data needed to update a CustomerAddress. + */ + data: XOR + /** + * Choose, which CustomerAddress to update. + */ + where: CustomerAddressWhereUniqueInput + } + + /** + * CustomerAddress updateMany + */ + export type CustomerAddressUpdateManyArgs = { + /** + * The data used to update CustomerAddresses. + */ + data: XOR + /** + * Filter which CustomerAddresses to update + */ + where?: CustomerAddressWhereInput + } + + /** + * CustomerAddress upsert + */ + export type CustomerAddressUpsertArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + /** + * The filter to search for the CustomerAddress to update in case it exists. + */ + where: CustomerAddressWhereUniqueInput + /** + * In case the CustomerAddress found by the `where` argument doesn't exist, create a new CustomerAddress with this data. + */ + create: XOR + /** + * In case the CustomerAddress was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * CustomerAddress delete + */ + export type CustomerAddressDeleteArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + /** + * Filter which CustomerAddress to delete. + */ + where: CustomerAddressWhereUniqueInput + } + + /** + * CustomerAddress deleteMany + */ + export type CustomerAddressDeleteManyArgs = { + /** + * Filter which CustomerAddresses to delete + */ + where?: CustomerAddressWhereInput + } + + /** + * CustomerAddress.city + */ + export type CustomerAddress$cityArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + where?: CityWhereInput + } + + /** + * CustomerAddress without action + */ + export type CustomerAddressDefaultArgs = { + /** + * Select specific fields to fetch from the CustomerAddress + */ + select?: CustomerAddressSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerAddressInclude | null + } + + + /** + * Model Branch + */ + + export type AggregateBranch = { + _count: BranchCountAggregateOutputType | null + _min: BranchMinAggregateOutputType | null + _max: BranchMaxAggregateOutputType | null + } + + export type BranchMinAggregateOutputType = { + id: string | null + name: string | null + cityId: string | null + } + + export type BranchMaxAggregateOutputType = { + id: string | null + name: string | null + cityId: string | null + } + + export type BranchCountAggregateOutputType = { + id: number + name: number + cityId: number + _all: number + } + + + export type BranchMinAggregateInputType = { + id?: true + name?: true + cityId?: true + } + + export type BranchMaxAggregateInputType = { + id?: true + name?: true + cityId?: true + } + + export type BranchCountAggregateInputType = { + id?: true + name?: true + cityId?: true + _all?: true + } + + export type BranchAggregateArgs = { + /** + * Filter which Branch to aggregate. + */ + where?: BranchWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Branches to fetch. + */ + orderBy?: BranchOrderByWithRelationInput | BranchOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: BranchWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Branches 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` Branches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Branches + **/ + _count?: true | BranchCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: BranchMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: BranchMaxAggregateInputType + } + + export type GetBranchAggregateType = { + [P in keyof T & keyof AggregateBranch]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type BranchGroupByArgs = { + where?: BranchWhereInput + orderBy?: BranchOrderByWithAggregationInput | BranchOrderByWithAggregationInput[] + by: BranchScalarFieldEnum[] | BranchScalarFieldEnum + having?: BranchScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: BranchCountAggregateInputType | true + _min?: BranchMinAggregateInputType + _max?: BranchMaxAggregateInputType + } + + export type BranchGroupByOutputType = { + id: string + name: string + cityId: string | null + _count: BranchCountAggregateOutputType | null + _min: BranchMinAggregateOutputType | null + _max: BranchMaxAggregateOutputType | null + } + + type GetBranchGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof BranchGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type BranchSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + cityId?: boolean + city?: boolean | Branch$cityArgs + adminUsers?: boolean | Branch$adminUsersArgs + orders?: boolean | Branch$ordersArgs + _count?: boolean | BranchCountOutputTypeDefaultArgs + }, ExtArgs["result"]["branch"]> + + export type BranchSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + cityId?: boolean + city?: boolean | Branch$cityArgs + }, ExtArgs["result"]["branch"]> + + export type BranchSelectScalar = { + id?: boolean + name?: boolean + cityId?: boolean + } + + export type BranchInclude = { + city?: boolean | Branch$cityArgs + adminUsers?: boolean | Branch$adminUsersArgs + orders?: boolean | Branch$ordersArgs + _count?: boolean | BranchCountOutputTypeDefaultArgs + } + export type BranchIncludeCreateManyAndReturn = { + city?: boolean | Branch$cityArgs + } + + export type $BranchPayload = { + name: "Branch" + objects: { + city: Prisma.$CityPayload | null + adminUsers: Prisma.$AdminUserPayload[] + orders: Prisma.$OrderPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + cityId: string | null + }, ExtArgs["result"]["branch"]> + composites: {} + } + + type BranchGetPayload = $Result.GetResult + + type BranchCountArgs = + Omit & { + select?: BranchCountAggregateInputType | true + } + + export interface BranchDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Branch'], meta: { name: 'Branch' } } + /** + * Find zero or one Branch that matches the filter. + * @param {BranchFindUniqueArgs} args - Arguments to find a Branch + * @example + * // Get one Branch + * const branch = await prisma.branch.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__BranchClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Branch that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {BranchFindUniqueOrThrowArgs} args - Arguments to find a Branch + * @example + * // Get one Branch + * const branch = await prisma.branch.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__BranchClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Branch 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 {BranchFindFirstArgs} args - Arguments to find a Branch + * @example + * // Get one Branch + * const branch = await prisma.branch.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__BranchClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Branch 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 {BranchFindFirstOrThrowArgs} args - Arguments to find a Branch + * @example + * // Get one Branch + * const branch = await prisma.branch.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__BranchClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Branches 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 {BranchFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Branches + * const branches = await prisma.branch.findMany() + * + * // Get first 10 Branches + * const branches = await prisma.branch.findMany({ take: 10 }) + * + * // Only select the `id` + * const branchWithIdOnly = await prisma.branch.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Branch. + * @param {BranchCreateArgs} args - Arguments to create a Branch. + * @example + * // Create one Branch + * const Branch = await prisma.branch.create({ + * data: { + * // ... data to create a Branch + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__BranchClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Branches. + * @param {BranchCreateManyArgs} args - Arguments to create many Branches. + * @example + * // Create many Branches + * const branch = await prisma.branch.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Branches and returns the data saved in the database. + * @param {BranchCreateManyAndReturnArgs} args - Arguments to create many Branches. + * @example + * // Create many Branches + * const branch = await prisma.branch.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Branches and only return the `id` + * const branchWithIdOnly = await prisma.branch.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 Branch. + * @param {BranchDeleteArgs} args - Arguments to delete one Branch. + * @example + * // Delete one Branch + * const Branch = await prisma.branch.delete({ + * where: { + * // ... filter to delete one Branch + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__BranchClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Branch. + * @param {BranchUpdateArgs} args - Arguments to update one Branch. + * @example + * // Update one Branch + * const branch = await prisma.branch.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__BranchClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Branches. + * @param {BranchDeleteManyArgs} args - Arguments to filter Branches to delete. + * @example + * // Delete a few Branches + * const { count } = await prisma.branch.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Branches. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BranchUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Branches + * const branch = await prisma.branch.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Branch. + * @param {BranchUpsertArgs} args - Arguments to update or create a Branch. + * @example + * // Update or create a Branch + * const branch = await prisma.branch.upsert({ + * create: { + * // ... data to create a Branch + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Branch we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__BranchClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Branches. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BranchCountArgs} args - Arguments to filter Branches to count. + * @example + * // Count the number of Branches + * const count = await prisma.branch.count({ + * where: { + * // ... the filter for the Branches 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 Branch. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BranchAggregateArgs} 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 Branch. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BranchGroupByArgs} 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 BranchGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: BranchGroupByArgs['orderBy'] } + : { orderBy?: BranchGroupByArgs['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 ? GetBranchGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Branch model + */ + readonly fields: BranchFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Branch. + * 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__BranchClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + city = {}>(args?: Subset>): Prisma__CityClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + adminUsers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + orders = {}>(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 Branch model + */ + interface BranchFieldRefs { + readonly id: FieldRef<"Branch", 'String'> + readonly name: FieldRef<"Branch", 'String'> + readonly cityId: FieldRef<"Branch", 'String'> + } + + + // Custom InputTypes + /** + * Branch findUnique + */ + export type BranchFindUniqueArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + /** + * Filter, which Branch to fetch. + */ + where: BranchWhereUniqueInput + } + + /** + * Branch findUniqueOrThrow + */ + export type BranchFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + /** + * Filter, which Branch to fetch. + */ + where: BranchWhereUniqueInput + } + + /** + * Branch findFirst + */ + export type BranchFindFirstArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + /** + * Filter, which Branch to fetch. + */ + where?: BranchWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Branches to fetch. + */ + orderBy?: BranchOrderByWithRelationInput | BranchOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Branches. + */ + cursor?: BranchWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Branches 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` Branches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Branches. + */ + distinct?: BranchScalarFieldEnum | BranchScalarFieldEnum[] + } + + /** + * Branch findFirstOrThrow + */ + export type BranchFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + /** + * Filter, which Branch to fetch. + */ + where?: BranchWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Branches to fetch. + */ + orderBy?: BranchOrderByWithRelationInput | BranchOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Branches. + */ + cursor?: BranchWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Branches 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` Branches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Branches. + */ + distinct?: BranchScalarFieldEnum | BranchScalarFieldEnum[] + } + + /** + * Branch findMany + */ + export type BranchFindManyArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + /** + * Filter, which Branches to fetch. + */ + where?: BranchWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Branches to fetch. + */ + orderBy?: BranchOrderByWithRelationInput | BranchOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Branches. + */ + cursor?: BranchWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Branches 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` Branches. + */ + skip?: number + distinct?: BranchScalarFieldEnum | BranchScalarFieldEnum[] + } + + /** + * Branch create + */ + export type BranchCreateArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + /** + * The data needed to create a Branch. + */ + data: XOR + } + + /** + * Branch createMany + */ + export type BranchCreateManyArgs = { + /** + * The data used to create many Branches. + */ + data: BranchCreateManyInput | BranchCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Branch createManyAndReturn + */ + export type BranchCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelectCreateManyAndReturn | null + /** + * The data used to create many Branches. + */ + data: BranchCreateManyInput | BranchCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchIncludeCreateManyAndReturn | null + } + + /** + * Branch update + */ + export type BranchUpdateArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + /** + * The data needed to update a Branch. + */ + data: XOR + /** + * Choose, which Branch to update. + */ + where: BranchWhereUniqueInput + } + + /** + * Branch updateMany + */ + export type BranchUpdateManyArgs = { + /** + * The data used to update Branches. + */ + data: XOR + /** + * Filter which Branches to update + */ + where?: BranchWhereInput + } + + /** + * Branch upsert + */ + export type BranchUpsertArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + /** + * The filter to search for the Branch to update in case it exists. + */ + where: BranchWhereUniqueInput + /** + * In case the Branch found by the `where` argument doesn't exist, create a new Branch with this data. + */ + create: XOR + /** + * In case the Branch was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Branch delete + */ + export type BranchDeleteArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + /** + * Filter which Branch to delete. + */ + where: BranchWhereUniqueInput + } + + /** + * Branch deleteMany + */ + export type BranchDeleteManyArgs = { + /** + * Filter which Branches to delete + */ + where?: BranchWhereInput + } + + /** + * Branch.city + */ + export type Branch$cityArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + where?: CityWhereInput + } + + /** + * Branch.adminUsers + */ + export type Branch$adminUsersArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + where?: AdminUserWhereInput + orderBy?: AdminUserOrderByWithRelationInput | AdminUserOrderByWithRelationInput[] + cursor?: AdminUserWhereUniqueInput + take?: number + skip?: number + distinct?: AdminUserScalarFieldEnum | AdminUserScalarFieldEnum[] + } + + /** + * Branch.orders + */ + export type Branch$ordersArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + where?: OrderWhereInput + orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] + cursor?: OrderWhereUniqueInput + take?: number + skip?: number + distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] + } + + /** + * Branch without action + */ + export type BranchDefaultArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + } + + + /** + * Model Workshop + */ + + export type AggregateWorkshop = { + _count: WorkshopCountAggregateOutputType | null + _min: WorkshopMinAggregateOutputType | null + _max: WorkshopMaxAggregateOutputType | null + } + + export type WorkshopMinAggregateOutputType = { + id: string | null + name: string | null + isActive: boolean | null + } + + export type WorkshopMaxAggregateOutputType = { + id: string | null + name: string | null + isActive: boolean | null + } + + export type WorkshopCountAggregateOutputType = { + id: number + name: number + isActive: number + _all: number + } + + + export type WorkshopMinAggregateInputType = { + id?: true + name?: true + isActive?: true + } + + export type WorkshopMaxAggregateInputType = { + id?: true + name?: true + isActive?: true + } + + export type WorkshopCountAggregateInputType = { + id?: true + name?: true + isActive?: true + _all?: true + } + + export type WorkshopAggregateArgs = { + /** + * Filter which Workshop to aggregate. + */ + where?: WorkshopWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Workshops to fetch. + */ + orderBy?: WorkshopOrderByWithRelationInput | WorkshopOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: WorkshopWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Workshops 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` Workshops. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Workshops + **/ + _count?: true | WorkshopCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: WorkshopMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: WorkshopMaxAggregateInputType + } + + export type GetWorkshopAggregateType = { + [P in keyof T & keyof AggregateWorkshop]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type WorkshopGroupByArgs = { + where?: WorkshopWhereInput + orderBy?: WorkshopOrderByWithAggregationInput | WorkshopOrderByWithAggregationInput[] + by: WorkshopScalarFieldEnum[] | WorkshopScalarFieldEnum + having?: WorkshopScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: WorkshopCountAggregateInputType | true + _min?: WorkshopMinAggregateInputType + _max?: WorkshopMaxAggregateInputType + } + + export type WorkshopGroupByOutputType = { + id: string + name: string + isActive: boolean + _count: WorkshopCountAggregateOutputType | null + _min: WorkshopMinAggregateOutputType | null + _max: WorkshopMaxAggregateOutputType | null + } + + type GetWorkshopGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof WorkshopGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type WorkshopSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + isActive?: boolean + preOrders?: boolean | Workshop$preOrdersArgs + _count?: boolean | WorkshopCountOutputTypeDefaultArgs + }, ExtArgs["result"]["workshop"]> + + export type WorkshopSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + isActive?: boolean + }, ExtArgs["result"]["workshop"]> + + export type WorkshopSelectScalar = { + id?: boolean + name?: boolean + isActive?: boolean + } + + export type WorkshopInclude = { + preOrders?: boolean | Workshop$preOrdersArgs + _count?: boolean | WorkshopCountOutputTypeDefaultArgs + } + export type WorkshopIncludeCreateManyAndReturn = {} + + export type $WorkshopPayload = { + name: "Workshop" + objects: { + preOrders: Prisma.$PreOrderPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + isActive: boolean + }, ExtArgs["result"]["workshop"]> + composites: {} + } + + type WorkshopGetPayload = $Result.GetResult + + type WorkshopCountArgs = + Omit & { + select?: WorkshopCountAggregateInputType | true + } + + export interface WorkshopDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Workshop'], meta: { name: 'Workshop' } } + /** + * Find zero or one Workshop that matches the filter. + * @param {WorkshopFindUniqueArgs} args - Arguments to find a Workshop + * @example + * // Get one Workshop + * const workshop = await prisma.workshop.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__WorkshopClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Workshop that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {WorkshopFindUniqueOrThrowArgs} args - Arguments to find a Workshop + * @example + * // Get one Workshop + * const workshop = await prisma.workshop.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__WorkshopClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Workshop 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 {WorkshopFindFirstArgs} args - Arguments to find a Workshop + * @example + * // Get one Workshop + * const workshop = await prisma.workshop.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__WorkshopClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Workshop 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 {WorkshopFindFirstOrThrowArgs} args - Arguments to find a Workshop + * @example + * // Get one Workshop + * const workshop = await prisma.workshop.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__WorkshopClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Workshops 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 {WorkshopFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Workshops + * const workshops = await prisma.workshop.findMany() + * + * // Get first 10 Workshops + * const workshops = await prisma.workshop.findMany({ take: 10 }) + * + * // Only select the `id` + * const workshopWithIdOnly = await prisma.workshop.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Workshop. + * @param {WorkshopCreateArgs} args - Arguments to create a Workshop. + * @example + * // Create one Workshop + * const Workshop = await prisma.workshop.create({ + * data: { + * // ... data to create a Workshop + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__WorkshopClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Workshops. + * @param {WorkshopCreateManyArgs} args - Arguments to create many Workshops. + * @example + * // Create many Workshops + * const workshop = await prisma.workshop.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Workshops and returns the data saved in the database. + * @param {WorkshopCreateManyAndReturnArgs} args - Arguments to create many Workshops. + * @example + * // Create many Workshops + * const workshop = await prisma.workshop.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Workshops and only return the `id` + * const workshopWithIdOnly = await prisma.workshop.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 Workshop. + * @param {WorkshopDeleteArgs} args - Arguments to delete one Workshop. + * @example + * // Delete one Workshop + * const Workshop = await prisma.workshop.delete({ + * where: { + * // ... filter to delete one Workshop + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__WorkshopClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Workshop. + * @param {WorkshopUpdateArgs} args - Arguments to update one Workshop. + * @example + * // Update one Workshop + * const workshop = await prisma.workshop.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__WorkshopClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Workshops. + * @param {WorkshopDeleteManyArgs} args - Arguments to filter Workshops to delete. + * @example + * // Delete a few Workshops + * const { count } = await prisma.workshop.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Workshops. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WorkshopUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Workshops + * const workshop = await prisma.workshop.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Workshop. + * @param {WorkshopUpsertArgs} args - Arguments to update or create a Workshop. + * @example + * // Update or create a Workshop + * const workshop = await prisma.workshop.upsert({ + * create: { + * // ... data to create a Workshop + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Workshop we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__WorkshopClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Workshops. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WorkshopCountArgs} args - Arguments to filter Workshops to count. + * @example + * // Count the number of Workshops + * const count = await prisma.workshop.count({ + * where: { + * // ... the filter for the Workshops 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 Workshop. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WorkshopAggregateArgs} 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 Workshop. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WorkshopGroupByArgs} 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 WorkshopGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: WorkshopGroupByArgs['orderBy'] } + : { orderBy?: WorkshopGroupByArgs['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 ? GetWorkshopGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Workshop model + */ + readonly fields: WorkshopFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Workshop. + * 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__WorkshopClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + preOrders = {}>(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 Workshop model + */ + interface WorkshopFieldRefs { + readonly id: FieldRef<"Workshop", 'String'> + readonly name: FieldRef<"Workshop", 'String'> + readonly isActive: FieldRef<"Workshop", 'Boolean'> + } + + + // Custom InputTypes + /** + * Workshop findUnique + */ + export type WorkshopFindUniqueArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + /** + * Filter, which Workshop to fetch. + */ + where: WorkshopWhereUniqueInput + } + + /** + * Workshop findUniqueOrThrow + */ + export type WorkshopFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + /** + * Filter, which Workshop to fetch. + */ + where: WorkshopWhereUniqueInput + } + + /** + * Workshop findFirst + */ + export type WorkshopFindFirstArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + /** + * Filter, which Workshop to fetch. + */ + where?: WorkshopWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Workshops to fetch. + */ + orderBy?: WorkshopOrderByWithRelationInput | WorkshopOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Workshops. + */ + cursor?: WorkshopWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Workshops 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` Workshops. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Workshops. + */ + distinct?: WorkshopScalarFieldEnum | WorkshopScalarFieldEnum[] + } + + /** + * Workshop findFirstOrThrow + */ + export type WorkshopFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + /** + * Filter, which Workshop to fetch. + */ + where?: WorkshopWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Workshops to fetch. + */ + orderBy?: WorkshopOrderByWithRelationInput | WorkshopOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Workshops. + */ + cursor?: WorkshopWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Workshops 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` Workshops. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Workshops. + */ + distinct?: WorkshopScalarFieldEnum | WorkshopScalarFieldEnum[] + } + + /** + * Workshop findMany + */ + export type WorkshopFindManyArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + /** + * Filter, which Workshops to fetch. + */ + where?: WorkshopWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Workshops to fetch. + */ + orderBy?: WorkshopOrderByWithRelationInput | WorkshopOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Workshops. + */ + cursor?: WorkshopWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Workshops 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` Workshops. + */ + skip?: number + distinct?: WorkshopScalarFieldEnum | WorkshopScalarFieldEnum[] + } + + /** + * Workshop create + */ + export type WorkshopCreateArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + /** + * The data needed to create a Workshop. + */ + data: XOR + } + + /** + * Workshop createMany + */ + export type WorkshopCreateManyArgs = { + /** + * The data used to create many Workshops. + */ + data: WorkshopCreateManyInput | WorkshopCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Workshop createManyAndReturn + */ + export type WorkshopCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelectCreateManyAndReturn | null + /** + * The data used to create many Workshops. + */ + data: WorkshopCreateManyInput | WorkshopCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Workshop update + */ + export type WorkshopUpdateArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + /** + * The data needed to update a Workshop. + */ + data: XOR + /** + * Choose, which Workshop to update. + */ + where: WorkshopWhereUniqueInput + } + + /** + * Workshop updateMany + */ + export type WorkshopUpdateManyArgs = { + /** + * The data used to update Workshops. + */ + data: XOR + /** + * Filter which Workshops to update + */ + where?: WorkshopWhereInput + } + + /** + * Workshop upsert + */ + export type WorkshopUpsertArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + /** + * The filter to search for the Workshop to update in case it exists. + */ + where: WorkshopWhereUniqueInput + /** + * In case the Workshop found by the `where` argument doesn't exist, create a new Workshop with this data. + */ + create: XOR + /** + * In case the Workshop was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Workshop delete + */ + export type WorkshopDeleteArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + /** + * Filter which Workshop to delete. + */ + where: WorkshopWhereUniqueInput + } + + /** + * Workshop deleteMany + */ + export type WorkshopDeleteManyArgs = { + /** + * Filter which Workshops to delete + */ + where?: WorkshopWhereInput + } + + /** + * Workshop.preOrders + */ + export type Workshop$preOrdersArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + where?: PreOrderWhereInput + orderBy?: PreOrderOrderByWithRelationInput | PreOrderOrderByWithRelationInput[] + cursor?: PreOrderWhereUniqueInput + take?: number + skip?: number + distinct?: PreOrderScalarFieldEnum | PreOrderScalarFieldEnum[] + } + + /** + * Workshop without action + */ + export type WorkshopDefaultArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + } + + + /** + * Model Category + */ + + export type AggregateCategory = { + _count: CategoryCountAggregateOutputType | null + _min: CategoryMinAggregateOutputType | null + _max: CategoryMaxAggregateOutputType | null + } + + export type CategoryMinAggregateOutputType = { + id: string | null + title: string | null + parentId: string | null + } + + export type CategoryMaxAggregateOutputType = { + id: string | null + title: string | null + parentId: string | null + } + + export type CategoryCountAggregateOutputType = { + id: number + title: number + parentId: number + _all: number + } + + + export type CategoryMinAggregateInputType = { + id?: true + title?: true + parentId?: true + } + + export type CategoryMaxAggregateInputType = { + id?: true + title?: true + parentId?: true + } + + export type CategoryCountAggregateInputType = { + id?: true + title?: true + parentId?: true + _all?: true + } + + export type CategoryAggregateArgs = { + /** + * Filter which Category to aggregate. + */ + where?: CategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Categories to fetch. + */ + orderBy?: CategoryOrderByWithRelationInput | CategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Categories 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` Categories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Categories + **/ + _count?: true | CategoryCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CategoryMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CategoryMaxAggregateInputType + } + + export type GetCategoryAggregateType = { + [P in keyof T & keyof AggregateCategory]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CategoryGroupByArgs = { + where?: CategoryWhereInput + orderBy?: CategoryOrderByWithAggregationInput | CategoryOrderByWithAggregationInput[] + by: CategoryScalarFieldEnum[] | CategoryScalarFieldEnum + having?: CategoryScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CategoryCountAggregateInputType | true + _min?: CategoryMinAggregateInputType + _max?: CategoryMaxAggregateInputType + } + + export type CategoryGroupByOutputType = { + id: string + title: string + parentId: string | null + _count: CategoryCountAggregateOutputType | null + _min: CategoryMinAggregateOutputType | null + _max: CategoryMaxAggregateOutputType | null + } + + type GetCategoryGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CategoryGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CategorySelect = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + parentId?: boolean + parent?: boolean | Category$parentArgs + children?: boolean | Category$childrenArgs + products?: boolean | Category$productsArgs + _count?: boolean | CategoryCountOutputTypeDefaultArgs + }, ExtArgs["result"]["category"]> + + export type CategorySelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + parentId?: boolean + parent?: boolean | Category$parentArgs + }, ExtArgs["result"]["category"]> + + export type CategorySelectScalar = { + id?: boolean + title?: boolean + parentId?: boolean + } + + export type CategoryInclude = { + parent?: boolean | Category$parentArgs + children?: boolean | Category$childrenArgs + products?: boolean | Category$productsArgs + _count?: boolean | CategoryCountOutputTypeDefaultArgs + } + export type CategoryIncludeCreateManyAndReturn = { + parent?: boolean | Category$parentArgs + } + + export type $CategoryPayload = { + name: "Category" + objects: { + parent: Prisma.$CategoryPayload | null + children: Prisma.$CategoryPayload[] + products: Prisma.$ProductPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + title: string + parentId: string | null + }, ExtArgs["result"]["category"]> + composites: {} + } + + type CategoryGetPayload = $Result.GetResult + + type CategoryCountArgs = + Omit & { + select?: CategoryCountAggregateInputType | true + } + + export interface CategoryDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Category'], meta: { name: 'Category' } } + /** + * Find zero or one Category that matches the filter. + * @param {CategoryFindUniqueArgs} args - Arguments to find a Category + * @example + * // Get one Category + * const category = await prisma.category.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Category that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CategoryFindUniqueOrThrowArgs} args - Arguments to find a Category + * @example + * // Get one Category + * const category = await prisma.category.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Category 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 {CategoryFindFirstArgs} args - Arguments to find a Category + * @example + * // Get one Category + * const category = await prisma.category.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Category 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 {CategoryFindFirstOrThrowArgs} args - Arguments to find a Category + * @example + * // Get one Category + * const category = await prisma.category.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Categories 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 {CategoryFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Categories + * const categories = await prisma.category.findMany() + * + * // Get first 10 Categories + * const categories = await prisma.category.findMany({ take: 10 }) + * + * // Only select the `id` + * const categoryWithIdOnly = await prisma.category.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Category. + * @param {CategoryCreateArgs} args - Arguments to create a Category. + * @example + * // Create one Category + * const Category = await prisma.category.create({ + * data: { + * // ... data to create a Category + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Categories. + * @param {CategoryCreateManyArgs} args - Arguments to create many Categories. + * @example + * // Create many Categories + * const category = await prisma.category.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Categories and returns the data saved in the database. + * @param {CategoryCreateManyAndReturnArgs} args - Arguments to create many Categories. + * @example + * // Create many Categories + * const category = await prisma.category.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Categories and only return the `id` + * const categoryWithIdOnly = await prisma.category.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 Category. + * @param {CategoryDeleteArgs} args - Arguments to delete one Category. + * @example + * // Delete one Category + * const Category = await prisma.category.delete({ + * where: { + * // ... filter to delete one Category + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Category. + * @param {CategoryUpdateArgs} args - Arguments to update one Category. + * @example + * // Update one Category + * const category = await prisma.category.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Categories. + * @param {CategoryDeleteManyArgs} args - Arguments to filter Categories to delete. + * @example + * // Delete a few Categories + * const { count } = await prisma.category.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Categories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CategoryUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Categories + * const category = await prisma.category.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Category. + * @param {CategoryUpsertArgs} args - Arguments to update or create a Category. + * @example + * // Update or create a Category + * const category = await prisma.category.upsert({ + * create: { + * // ... data to create a Category + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Category we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CategoryClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Categories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CategoryCountArgs} args - Arguments to filter Categories to count. + * @example + * // Count the number of Categories + * const count = await prisma.category.count({ + * where: { + * // ... the filter for the Categories 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 Category. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CategoryAggregateArgs} 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 Category. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CategoryGroupByArgs} 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 CategoryGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CategoryGroupByArgs['orderBy'] } + : { orderBy?: CategoryGroupByArgs['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 ? GetCategoryGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Category model + */ + readonly fields: CategoryFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Category. + * 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__CategoryClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + parent = {}>(args?: Subset>): Prisma__CategoryClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + children = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + products = {}>(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 Category model + */ + interface CategoryFieldRefs { + readonly id: FieldRef<"Category", 'String'> + readonly title: FieldRef<"Category", 'String'> + readonly parentId: FieldRef<"Category", 'String'> + } + + + // Custom InputTypes + /** + * Category findUnique + */ + export type CategoryFindUniqueArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + /** + * Filter, which Category to fetch. + */ + where: CategoryWhereUniqueInput + } + + /** + * Category findUniqueOrThrow + */ + export type CategoryFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + /** + * Filter, which Category to fetch. + */ + where: CategoryWhereUniqueInput + } + + /** + * Category findFirst + */ + export type CategoryFindFirstArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + /** + * Filter, which Category to fetch. + */ + where?: CategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Categories to fetch. + */ + orderBy?: CategoryOrderByWithRelationInput | CategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Categories. + */ + cursor?: CategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Categories 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` Categories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Categories. + */ + distinct?: CategoryScalarFieldEnum | CategoryScalarFieldEnum[] + } + + /** + * Category findFirstOrThrow + */ + export type CategoryFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + /** + * Filter, which Category to fetch. + */ + where?: CategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Categories to fetch. + */ + orderBy?: CategoryOrderByWithRelationInput | CategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Categories. + */ + cursor?: CategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Categories 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` Categories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Categories. + */ + distinct?: CategoryScalarFieldEnum | CategoryScalarFieldEnum[] + } + + /** + * Category findMany + */ + export type CategoryFindManyArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + /** + * Filter, which Categories to fetch. + */ + where?: CategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Categories to fetch. + */ + orderBy?: CategoryOrderByWithRelationInput | CategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Categories. + */ + cursor?: CategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Categories 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` Categories. + */ + skip?: number + distinct?: CategoryScalarFieldEnum | CategoryScalarFieldEnum[] + } + + /** + * Category create + */ + export type CategoryCreateArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + /** + * The data needed to create a Category. + */ + data: XOR + } + + /** + * Category createMany + */ + export type CategoryCreateManyArgs = { + /** + * The data used to create many Categories. + */ + data: CategoryCreateManyInput | CategoryCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Category createManyAndReturn + */ + export type CategoryCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelectCreateManyAndReturn | null + /** + * The data used to create many Categories. + */ + data: CategoryCreateManyInput | CategoryCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryIncludeCreateManyAndReturn | null + } + + /** + * Category update + */ + export type CategoryUpdateArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + /** + * The data needed to update a Category. + */ + data: XOR + /** + * Choose, which Category to update. + */ + where: CategoryWhereUniqueInput + } + + /** + * Category updateMany + */ + export type CategoryUpdateManyArgs = { + /** + * The data used to update Categories. + */ + data: XOR + /** + * Filter which Categories to update + */ + where?: CategoryWhereInput + } + + /** + * Category upsert + */ + export type CategoryUpsertArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + /** + * The filter to search for the Category to update in case it exists. + */ + where: CategoryWhereUniqueInput + /** + * In case the Category found by the `where` argument doesn't exist, create a new Category with this data. + */ + create: XOR + /** + * In case the Category was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Category delete + */ + export type CategoryDeleteArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + /** + * Filter which Category to delete. + */ + where: CategoryWhereUniqueInput + } + + /** + * Category deleteMany + */ + export type CategoryDeleteManyArgs = { + /** + * Filter which Categories to delete + */ + where?: CategoryWhereInput + } + + /** + * Category.parent + */ + export type Category$parentArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + where?: CategoryWhereInput + } + + /** + * Category.children + */ + export type Category$childrenArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + where?: CategoryWhereInput + orderBy?: CategoryOrderByWithRelationInput | CategoryOrderByWithRelationInput[] + cursor?: CategoryWhereUniqueInput + take?: number + skip?: number + distinct?: CategoryScalarFieldEnum | CategoryScalarFieldEnum[] + } + + /** + * Category.products + */ + export type Category$productsArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + where?: ProductWhereInput + orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] + cursor?: ProductWhereUniqueInput + take?: number + skip?: number + distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[] + } + + /** + * Category without action + */ + export type CategoryDefaultArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + } + + + /** + * Model Brand + */ + + export type AggregateBrand = { + _count: BrandCountAggregateOutputType | null + _min: BrandMinAggregateOutputType | null + _max: BrandMaxAggregateOutputType | null + } + + export type BrandMinAggregateOutputType = { + id: string | null + title: string | null + } + + export type BrandMaxAggregateOutputType = { + id: string | null + title: string | null + } + + export type BrandCountAggregateOutputType = { + id: number + title: number + _all: number + } + + + export type BrandMinAggregateInputType = { + id?: true + title?: true + } + + export type BrandMaxAggregateInputType = { + id?: true + title?: true + } + + export type BrandCountAggregateInputType = { + id?: true + title?: true + _all?: true + } + + export type BrandAggregateArgs = { + /** + * Filter which Brand to aggregate. + */ + where?: BrandWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Brands to fetch. + */ + orderBy?: BrandOrderByWithRelationInput | BrandOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: BrandWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Brands 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` Brands. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Brands + **/ + _count?: true | BrandCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: BrandMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: BrandMaxAggregateInputType + } + + export type GetBrandAggregateType = { + [P in keyof T & keyof AggregateBrand]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type BrandGroupByArgs = { + where?: BrandWhereInput + orderBy?: BrandOrderByWithAggregationInput | BrandOrderByWithAggregationInput[] + by: BrandScalarFieldEnum[] | BrandScalarFieldEnum + having?: BrandScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: BrandCountAggregateInputType | true + _min?: BrandMinAggregateInputType + _max?: BrandMaxAggregateInputType + } + + export type BrandGroupByOutputType = { + id: string + title: string + _count: BrandCountAggregateOutputType | null + _min: BrandMinAggregateOutputType | null + _max: BrandMaxAggregateOutputType | null + } + + type GetBrandGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof BrandGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type BrandSelect = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + products?: boolean | Brand$productsArgs + _count?: boolean | BrandCountOutputTypeDefaultArgs + }, ExtArgs["result"]["brand"]> + + export type BrandSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + }, ExtArgs["result"]["brand"]> + + export type BrandSelectScalar = { + id?: boolean + title?: boolean + } + + export type BrandInclude = { + products?: boolean | Brand$productsArgs + _count?: boolean | BrandCountOutputTypeDefaultArgs + } + export type BrandIncludeCreateManyAndReturn = {} + + export type $BrandPayload = { + name: "Brand" + objects: { + products: Prisma.$ProductPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + title: string + }, ExtArgs["result"]["brand"]> + composites: {} + } + + type BrandGetPayload = $Result.GetResult + + type BrandCountArgs = + Omit & { + select?: BrandCountAggregateInputType | true + } + + export interface BrandDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Brand'], meta: { name: 'Brand' } } + /** + * Find zero or one Brand that matches the filter. + * @param {BrandFindUniqueArgs} args - Arguments to find a Brand + * @example + * // Get one Brand + * const brand = await prisma.brand.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__BrandClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Brand that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {BrandFindUniqueOrThrowArgs} args - Arguments to find a Brand + * @example + * // Get one Brand + * const brand = await prisma.brand.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__BrandClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Brand 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 {BrandFindFirstArgs} args - Arguments to find a Brand + * @example + * // Get one Brand + * const brand = await prisma.brand.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__BrandClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Brand 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 {BrandFindFirstOrThrowArgs} args - Arguments to find a Brand + * @example + * // Get one Brand + * const brand = await prisma.brand.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__BrandClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Brands 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 {BrandFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Brands + * const brands = await prisma.brand.findMany() + * + * // Get first 10 Brands + * const brands = await prisma.brand.findMany({ take: 10 }) + * + * // Only select the `id` + * const brandWithIdOnly = await prisma.brand.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Brand. + * @param {BrandCreateArgs} args - Arguments to create a Brand. + * @example + * // Create one Brand + * const Brand = await prisma.brand.create({ + * data: { + * // ... data to create a Brand + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__BrandClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Brands. + * @param {BrandCreateManyArgs} args - Arguments to create many Brands. + * @example + * // Create many Brands + * const brand = await prisma.brand.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Brands and returns the data saved in the database. + * @param {BrandCreateManyAndReturnArgs} args - Arguments to create many Brands. + * @example + * // Create many Brands + * const brand = await prisma.brand.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Brands and only return the `id` + * const brandWithIdOnly = await prisma.brand.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 Brand. + * @param {BrandDeleteArgs} args - Arguments to delete one Brand. + * @example + * // Delete one Brand + * const Brand = await prisma.brand.delete({ + * where: { + * // ... filter to delete one Brand + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__BrandClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Brand. + * @param {BrandUpdateArgs} args - Arguments to update one Brand. + * @example + * // Update one Brand + * const brand = await prisma.brand.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__BrandClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Brands. + * @param {BrandDeleteManyArgs} args - Arguments to filter Brands to delete. + * @example + * // Delete a few Brands + * const { count } = await prisma.brand.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Brands. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BrandUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Brands + * const brand = await prisma.brand.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Brand. + * @param {BrandUpsertArgs} args - Arguments to update or create a Brand. + * @example + * // Update or create a Brand + * const brand = await prisma.brand.upsert({ + * create: { + * // ... data to create a Brand + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Brand we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__BrandClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Brands. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BrandCountArgs} args - Arguments to filter Brands to count. + * @example + * // Count the number of Brands + * const count = await prisma.brand.count({ + * where: { + * // ... the filter for the Brands 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 Brand. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BrandAggregateArgs} 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 Brand. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BrandGroupByArgs} 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 BrandGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: BrandGroupByArgs['orderBy'] } + : { orderBy?: BrandGroupByArgs['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 ? GetBrandGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Brand model + */ + readonly fields: BrandFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Brand. + * 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__BrandClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + products = {}>(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 Brand model + */ + interface BrandFieldRefs { + readonly id: FieldRef<"Brand", 'String'> + readonly title: FieldRef<"Brand", 'String'> + } + + + // Custom InputTypes + /** + * Brand findUnique + */ + export type BrandFindUniqueArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + /** + * Filter, which Brand to fetch. + */ + where: BrandWhereUniqueInput + } + + /** + * Brand findUniqueOrThrow + */ + export type BrandFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + /** + * Filter, which Brand to fetch. + */ + where: BrandWhereUniqueInput + } + + /** + * Brand findFirst + */ + export type BrandFindFirstArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + /** + * Filter, which Brand to fetch. + */ + where?: BrandWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Brands to fetch. + */ + orderBy?: BrandOrderByWithRelationInput | BrandOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Brands. + */ + cursor?: BrandWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Brands 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` Brands. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Brands. + */ + distinct?: BrandScalarFieldEnum | BrandScalarFieldEnum[] + } + + /** + * Brand findFirstOrThrow + */ + export type BrandFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + /** + * Filter, which Brand to fetch. + */ + where?: BrandWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Brands to fetch. + */ + orderBy?: BrandOrderByWithRelationInput | BrandOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Brands. + */ + cursor?: BrandWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Brands 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` Brands. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Brands. + */ + distinct?: BrandScalarFieldEnum | BrandScalarFieldEnum[] + } + + /** + * Brand findMany + */ + export type BrandFindManyArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + /** + * Filter, which Brands to fetch. + */ + where?: BrandWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Brands to fetch. + */ + orderBy?: BrandOrderByWithRelationInput | BrandOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Brands. + */ + cursor?: BrandWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Brands 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` Brands. + */ + skip?: number + distinct?: BrandScalarFieldEnum | BrandScalarFieldEnum[] + } + + /** + * Brand create + */ + export type BrandCreateArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + /** + * The data needed to create a Brand. + */ + data: XOR + } + + /** + * Brand createMany + */ + export type BrandCreateManyArgs = { + /** + * The data used to create many Brands. + */ + data: BrandCreateManyInput | BrandCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Brand createManyAndReturn + */ + export type BrandCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelectCreateManyAndReturn | null + /** + * The data used to create many Brands. + */ + data: BrandCreateManyInput | BrandCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Brand update + */ + export type BrandUpdateArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + /** + * The data needed to update a Brand. + */ + data: XOR + /** + * Choose, which Brand to update. + */ + where: BrandWhereUniqueInput + } + + /** + * Brand updateMany + */ + export type BrandUpdateManyArgs = { + /** + * The data used to update Brands. + */ + data: XOR + /** + * Filter which Brands to update + */ + where?: BrandWhereInput + } + + /** + * Brand upsert + */ + export type BrandUpsertArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + /** + * The filter to search for the Brand to update in case it exists. + */ + where: BrandWhereUniqueInput + /** + * In case the Brand found by the `where` argument doesn't exist, create a new Brand with this data. + */ + create: XOR + /** + * In case the Brand was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Brand delete + */ + export type BrandDeleteArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + /** + * Filter which Brand to delete. + */ + where: BrandWhereUniqueInput + } + + /** + * Brand deleteMany + */ + export type BrandDeleteManyArgs = { + /** + * Filter which Brands to delete + */ + where?: BrandWhereInput + } + + /** + * Brand.products + */ + export type Brand$productsArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + where?: ProductWhereInput + orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] + cursor?: ProductWhereUniqueInput + take?: number + skip?: number + distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[] + } + + /** + * Brand without action + */ + export type BrandDefaultArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + } + + + /** + * Model Collection + */ + + export type AggregateCollection = { + _count: CollectionCountAggregateOutputType | null + _min: CollectionMinAggregateOutputType | null + _max: CollectionMaxAggregateOutputType | null + } + + export type CollectionMinAggregateOutputType = { + id: string | null + title: string | null + description: string | null + isActive: boolean | null + } + + export type CollectionMaxAggregateOutputType = { + id: string | null + title: string | null + description: string | null + isActive: boolean | null + } + + export type CollectionCountAggregateOutputType = { + id: number + title: number + description: number + isActive: number + _all: number + } + + + export type CollectionMinAggregateInputType = { + id?: true + title?: true + description?: true + isActive?: true + } + + export type CollectionMaxAggregateInputType = { + id?: true + title?: true + description?: true + isActive?: true + } + + export type CollectionCountAggregateInputType = { + id?: true + title?: true + description?: true + isActive?: true + _all?: true + } + + export type CollectionAggregateArgs = { + /** + * Filter which Collection to aggregate. + */ + where?: CollectionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Collections to fetch. + */ + orderBy?: CollectionOrderByWithRelationInput | CollectionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CollectionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Collections 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` Collections. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Collections + **/ + _count?: true | CollectionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CollectionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CollectionMaxAggregateInputType + } + + export type GetCollectionAggregateType = { + [P in keyof T & keyof AggregateCollection]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CollectionGroupByArgs = { + where?: CollectionWhereInput + orderBy?: CollectionOrderByWithAggregationInput | CollectionOrderByWithAggregationInput[] + by: CollectionScalarFieldEnum[] | CollectionScalarFieldEnum + having?: CollectionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CollectionCountAggregateInputType | true + _min?: CollectionMinAggregateInputType + _max?: CollectionMaxAggregateInputType + } + + export type CollectionGroupByOutputType = { + id: string + title: string + description: string | null + isActive: boolean + _count: CollectionCountAggregateOutputType | null + _min: CollectionMinAggregateOutputType | null + _max: CollectionMaxAggregateOutputType | null + } + + type GetCollectionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CollectionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CollectionSelect = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + description?: boolean + isActive?: boolean + products?: boolean | Collection$productsArgs + _count?: boolean | CollectionCountOutputTypeDefaultArgs + }, ExtArgs["result"]["collection"]> + + export type CollectionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + description?: boolean + isActive?: boolean + }, ExtArgs["result"]["collection"]> + + export type CollectionSelectScalar = { + id?: boolean + title?: boolean + description?: boolean + isActive?: boolean + } + + export type CollectionInclude = { + products?: boolean | Collection$productsArgs + _count?: boolean | CollectionCountOutputTypeDefaultArgs + } + export type CollectionIncludeCreateManyAndReturn = {} + + export type $CollectionPayload = { + name: "Collection" + objects: { + products: Prisma.$CollectionProductPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + title: string + description: string | null + isActive: boolean + }, ExtArgs["result"]["collection"]> + composites: {} + } + + type CollectionGetPayload = $Result.GetResult + + type CollectionCountArgs = + Omit & { + select?: CollectionCountAggregateInputType | true + } + + export interface CollectionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Collection'], meta: { name: 'Collection' } } + /** + * Find zero or one Collection that matches the filter. + * @param {CollectionFindUniqueArgs} args - Arguments to find a Collection + * @example + * // Get one Collection + * const collection = await prisma.collection.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CollectionClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Collection that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CollectionFindUniqueOrThrowArgs} args - Arguments to find a Collection + * @example + * // Get one Collection + * const collection = await prisma.collection.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CollectionClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Collection 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 {CollectionFindFirstArgs} args - Arguments to find a Collection + * @example + * // Get one Collection + * const collection = await prisma.collection.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CollectionClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Collection 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 {CollectionFindFirstOrThrowArgs} args - Arguments to find a Collection + * @example + * // Get one Collection + * const collection = await prisma.collection.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CollectionClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Collections 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 {CollectionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Collections + * const collections = await prisma.collection.findMany() + * + * // Get first 10 Collections + * const collections = await prisma.collection.findMany({ take: 10 }) + * + * // Only select the `id` + * const collectionWithIdOnly = await prisma.collection.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Collection. + * @param {CollectionCreateArgs} args - Arguments to create a Collection. + * @example + * // Create one Collection + * const Collection = await prisma.collection.create({ + * data: { + * // ... data to create a Collection + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CollectionClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Collections. + * @param {CollectionCreateManyArgs} args - Arguments to create many Collections. + * @example + * // Create many Collections + * const collection = await prisma.collection.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Collections and returns the data saved in the database. + * @param {CollectionCreateManyAndReturnArgs} args - Arguments to create many Collections. + * @example + * // Create many Collections + * const collection = await prisma.collection.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Collections and only return the `id` + * const collectionWithIdOnly = await prisma.collection.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 Collection. + * @param {CollectionDeleteArgs} args - Arguments to delete one Collection. + * @example + * // Delete one Collection + * const Collection = await prisma.collection.delete({ + * where: { + * // ... filter to delete one Collection + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CollectionClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Collection. + * @param {CollectionUpdateArgs} args - Arguments to update one Collection. + * @example + * // Update one Collection + * const collection = await prisma.collection.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CollectionClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Collections. + * @param {CollectionDeleteManyArgs} args - Arguments to filter Collections to delete. + * @example + * // Delete a few Collections + * const { count } = await prisma.collection.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Collections. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CollectionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Collections + * const collection = await prisma.collection.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Collection. + * @param {CollectionUpsertArgs} args - Arguments to update or create a Collection. + * @example + * // Update or create a Collection + * const collection = await prisma.collection.upsert({ + * create: { + * // ... data to create a Collection + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Collection we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CollectionClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Collections. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CollectionCountArgs} args - Arguments to filter Collections to count. + * @example + * // Count the number of Collections + * const count = await prisma.collection.count({ + * where: { + * // ... the filter for the Collections 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 Collection. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CollectionAggregateArgs} 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 Collection. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CollectionGroupByArgs} 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 CollectionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CollectionGroupByArgs['orderBy'] } + : { orderBy?: CollectionGroupByArgs['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 ? GetCollectionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Collection model + */ + readonly fields: CollectionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Collection. + * 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__CollectionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + products = {}>(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 Collection model + */ + interface CollectionFieldRefs { + readonly id: FieldRef<"Collection", 'String'> + readonly title: FieldRef<"Collection", 'String'> + readonly description: FieldRef<"Collection", 'String'> + readonly isActive: FieldRef<"Collection", 'Boolean'> + } + + + // Custom InputTypes + /** + * Collection findUnique + */ + export type CollectionFindUniqueArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + /** + * Filter, which Collection to fetch. + */ + where: CollectionWhereUniqueInput + } + + /** + * Collection findUniqueOrThrow + */ + export type CollectionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + /** + * Filter, which Collection to fetch. + */ + where: CollectionWhereUniqueInput + } + + /** + * Collection findFirst + */ + export type CollectionFindFirstArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + /** + * Filter, which Collection to fetch. + */ + where?: CollectionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Collections to fetch. + */ + orderBy?: CollectionOrderByWithRelationInput | CollectionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Collections. + */ + cursor?: CollectionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Collections 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` Collections. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Collections. + */ + distinct?: CollectionScalarFieldEnum | CollectionScalarFieldEnum[] + } + + /** + * Collection findFirstOrThrow + */ + export type CollectionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + /** + * Filter, which Collection to fetch. + */ + where?: CollectionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Collections to fetch. + */ + orderBy?: CollectionOrderByWithRelationInput | CollectionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Collections. + */ + cursor?: CollectionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Collections 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` Collections. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Collections. + */ + distinct?: CollectionScalarFieldEnum | CollectionScalarFieldEnum[] + } + + /** + * Collection findMany + */ + export type CollectionFindManyArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + /** + * Filter, which Collections to fetch. + */ + where?: CollectionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Collections to fetch. + */ + orderBy?: CollectionOrderByWithRelationInput | CollectionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Collections. + */ + cursor?: CollectionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Collections 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` Collections. + */ + skip?: number + distinct?: CollectionScalarFieldEnum | CollectionScalarFieldEnum[] + } + + /** + * Collection create + */ + export type CollectionCreateArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + /** + * The data needed to create a Collection. + */ + data: XOR + } + + /** + * Collection createMany + */ + export type CollectionCreateManyArgs = { + /** + * The data used to create many Collections. + */ + data: CollectionCreateManyInput | CollectionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Collection createManyAndReturn + */ + export type CollectionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelectCreateManyAndReturn | null + /** + * The data used to create many Collections. + */ + data: CollectionCreateManyInput | CollectionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Collection update + */ + export type CollectionUpdateArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + /** + * The data needed to update a Collection. + */ + data: XOR + /** + * Choose, which Collection to update. + */ + where: CollectionWhereUniqueInput + } + + /** + * Collection updateMany + */ + export type CollectionUpdateManyArgs = { + /** + * The data used to update Collections. + */ + data: XOR + /** + * Filter which Collections to update + */ + where?: CollectionWhereInput + } + + /** + * Collection upsert + */ + export type CollectionUpsertArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + /** + * The filter to search for the Collection to update in case it exists. + */ + where: CollectionWhereUniqueInput + /** + * In case the Collection found by the `where` argument doesn't exist, create a new Collection with this data. + */ + create: XOR + /** + * In case the Collection was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Collection delete + */ + export type CollectionDeleteArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + /** + * Filter which Collection to delete. + */ + where: CollectionWhereUniqueInput + } + + /** + * Collection deleteMany + */ + export type CollectionDeleteManyArgs = { + /** + * Filter which Collections to delete + */ + where?: CollectionWhereInput + } + + /** + * Collection.products + */ + export type Collection$productsArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + where?: CollectionProductWhereInput + orderBy?: CollectionProductOrderByWithRelationInput | CollectionProductOrderByWithRelationInput[] + cursor?: CollectionProductWhereUniqueInput + take?: number + skip?: number + distinct?: CollectionProductScalarFieldEnum | CollectionProductScalarFieldEnum[] + } + + /** + * Collection without action + */ + export type CollectionDefaultArgs = { + /** + * Select specific fields to fetch from the Collection + */ + select?: CollectionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionInclude | null + } + + + /** + * Model CollectionProduct + */ + + export type AggregateCollectionProduct = { + _count: CollectionProductCountAggregateOutputType | null + _min: CollectionProductMinAggregateOutputType | null + _max: CollectionProductMaxAggregateOutputType | null + } + + export type CollectionProductMinAggregateOutputType = { + collectionId: string | null + productId: string | null + } + + export type CollectionProductMaxAggregateOutputType = { + collectionId: string | null + productId: string | null + } + + export type CollectionProductCountAggregateOutputType = { + collectionId: number + productId: number + _all: number + } + + + export type CollectionProductMinAggregateInputType = { + collectionId?: true + productId?: true + } + + export type CollectionProductMaxAggregateInputType = { + collectionId?: true + productId?: true + } + + export type CollectionProductCountAggregateInputType = { + collectionId?: true + productId?: true + _all?: true + } + + export type CollectionProductAggregateArgs = { + /** + * Filter which CollectionProduct to aggregate. + */ + where?: CollectionProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CollectionProducts to fetch. + */ + orderBy?: CollectionProductOrderByWithRelationInput | CollectionProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CollectionProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CollectionProducts 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` CollectionProducts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned CollectionProducts + **/ + _count?: true | CollectionProductCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CollectionProductMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CollectionProductMaxAggregateInputType + } + + export type GetCollectionProductAggregateType = { + [P in keyof T & keyof AggregateCollectionProduct]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CollectionProductGroupByArgs = { + where?: CollectionProductWhereInput + orderBy?: CollectionProductOrderByWithAggregationInput | CollectionProductOrderByWithAggregationInput[] + by: CollectionProductScalarFieldEnum[] | CollectionProductScalarFieldEnum + having?: CollectionProductScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CollectionProductCountAggregateInputType | true + _min?: CollectionProductMinAggregateInputType + _max?: CollectionProductMaxAggregateInputType + } + + export type CollectionProductGroupByOutputType = { + collectionId: string + productId: string + _count: CollectionProductCountAggregateOutputType | null + _min: CollectionProductMinAggregateOutputType | null + _max: CollectionProductMaxAggregateOutputType | null + } + + type GetCollectionProductGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CollectionProductGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CollectionProductSelect = $Extensions.GetSelect<{ + collectionId?: boolean + productId?: boolean + collection?: boolean | CollectionDefaultArgs + product?: boolean | ProductDefaultArgs + }, ExtArgs["result"]["collectionProduct"]> + + export type CollectionProductSelectCreateManyAndReturn = $Extensions.GetSelect<{ + collectionId?: boolean + productId?: boolean + collection?: boolean | CollectionDefaultArgs + product?: boolean | ProductDefaultArgs + }, ExtArgs["result"]["collectionProduct"]> + + export type CollectionProductSelectScalar = { + collectionId?: boolean + productId?: boolean + } + + export type CollectionProductInclude = { + collection?: boolean | CollectionDefaultArgs + product?: boolean | ProductDefaultArgs + } + export type CollectionProductIncludeCreateManyAndReturn = { + collection?: boolean | CollectionDefaultArgs + product?: boolean | ProductDefaultArgs + } + + export type $CollectionProductPayload = { + name: "CollectionProduct" + objects: { + collection: Prisma.$CollectionPayload + product: Prisma.$ProductPayload + } + scalars: $Extensions.GetPayloadResult<{ + collectionId: string + productId: string + }, ExtArgs["result"]["collectionProduct"]> + composites: {} + } + + type CollectionProductGetPayload = $Result.GetResult + + type CollectionProductCountArgs = + Omit & { + select?: CollectionProductCountAggregateInputType | true + } + + export interface CollectionProductDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['CollectionProduct'], meta: { name: 'CollectionProduct' } } + /** + * Find zero or one CollectionProduct that matches the filter. + * @param {CollectionProductFindUniqueArgs} args - Arguments to find a CollectionProduct + * @example + * // Get one CollectionProduct + * const collectionProduct = await prisma.collectionProduct.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CollectionProductClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one CollectionProduct that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CollectionProductFindUniqueOrThrowArgs} args - Arguments to find a CollectionProduct + * @example + * // Get one CollectionProduct + * const collectionProduct = await prisma.collectionProduct.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CollectionProductClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first CollectionProduct 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 {CollectionProductFindFirstArgs} args - Arguments to find a CollectionProduct + * @example + * // Get one CollectionProduct + * const collectionProduct = await prisma.collectionProduct.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CollectionProductClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first CollectionProduct 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 {CollectionProductFindFirstOrThrowArgs} args - Arguments to find a CollectionProduct + * @example + * // Get one CollectionProduct + * const collectionProduct = await prisma.collectionProduct.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CollectionProductClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more CollectionProducts 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 {CollectionProductFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all CollectionProducts + * const collectionProducts = await prisma.collectionProduct.findMany() + * + * // Get first 10 CollectionProducts + * const collectionProducts = await prisma.collectionProduct.findMany({ take: 10 }) + * + * // Only select the `collectionId` + * const collectionProductWithCollectionIdOnly = await prisma.collectionProduct.findMany({ select: { collectionId: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a CollectionProduct. + * @param {CollectionProductCreateArgs} args - Arguments to create a CollectionProduct. + * @example + * // Create one CollectionProduct + * const CollectionProduct = await prisma.collectionProduct.create({ + * data: { + * // ... data to create a CollectionProduct + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CollectionProductClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many CollectionProducts. + * @param {CollectionProductCreateManyArgs} args - Arguments to create many CollectionProducts. + * @example + * // Create many CollectionProducts + * const collectionProduct = await prisma.collectionProduct.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many CollectionProducts and returns the data saved in the database. + * @param {CollectionProductCreateManyAndReturnArgs} args - Arguments to create many CollectionProducts. + * @example + * // Create many CollectionProducts + * const collectionProduct = await prisma.collectionProduct.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many CollectionProducts and only return the `collectionId` + * const collectionProductWithCollectionIdOnly = await prisma.collectionProduct.createManyAndReturn({ + * select: { collectionId: 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 CollectionProduct. + * @param {CollectionProductDeleteArgs} args - Arguments to delete one CollectionProduct. + * @example + * // Delete one CollectionProduct + * const CollectionProduct = await prisma.collectionProduct.delete({ + * where: { + * // ... filter to delete one CollectionProduct + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CollectionProductClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one CollectionProduct. + * @param {CollectionProductUpdateArgs} args - Arguments to update one CollectionProduct. + * @example + * // Update one CollectionProduct + * const collectionProduct = await prisma.collectionProduct.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CollectionProductClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more CollectionProducts. + * @param {CollectionProductDeleteManyArgs} args - Arguments to filter CollectionProducts to delete. + * @example + * // Delete a few CollectionProducts + * const { count } = await prisma.collectionProduct.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more CollectionProducts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CollectionProductUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many CollectionProducts + * const collectionProduct = await prisma.collectionProduct.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one CollectionProduct. + * @param {CollectionProductUpsertArgs} args - Arguments to update or create a CollectionProduct. + * @example + * // Update or create a CollectionProduct + * const collectionProduct = await prisma.collectionProduct.upsert({ + * create: { + * // ... data to create a CollectionProduct + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the CollectionProduct we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CollectionProductClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of CollectionProducts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CollectionProductCountArgs} args - Arguments to filter CollectionProducts to count. + * @example + * // Count the number of CollectionProducts + * const count = await prisma.collectionProduct.count({ + * where: { + * // ... the filter for the CollectionProducts 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 CollectionProduct. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CollectionProductAggregateArgs} 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 CollectionProduct. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CollectionProductGroupByArgs} 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 CollectionProductGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CollectionProductGroupByArgs['orderBy'] } + : { orderBy?: CollectionProductGroupByArgs['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 ? GetCollectionProductGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the CollectionProduct model + */ + readonly fields: CollectionProductFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for CollectionProduct. + * 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__CollectionProductClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + collection = {}>(args?: Subset>): Prisma__CollectionClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + product = {}>(args?: Subset>): Prisma__ProductClient<$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 CollectionProduct model + */ + interface CollectionProductFieldRefs { + readonly collectionId: FieldRef<"CollectionProduct", 'String'> + readonly productId: FieldRef<"CollectionProduct", 'String'> + } + + + // Custom InputTypes + /** + * CollectionProduct findUnique + */ + export type CollectionProductFindUniqueArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + /** + * Filter, which CollectionProduct to fetch. + */ + where: CollectionProductWhereUniqueInput + } + + /** + * CollectionProduct findUniqueOrThrow + */ + export type CollectionProductFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + /** + * Filter, which CollectionProduct to fetch. + */ + where: CollectionProductWhereUniqueInput + } + + /** + * CollectionProduct findFirst + */ + export type CollectionProductFindFirstArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + /** + * Filter, which CollectionProduct to fetch. + */ + where?: CollectionProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CollectionProducts to fetch. + */ + orderBy?: CollectionProductOrderByWithRelationInput | CollectionProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for CollectionProducts. + */ + cursor?: CollectionProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CollectionProducts 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` CollectionProducts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of CollectionProducts. + */ + distinct?: CollectionProductScalarFieldEnum | CollectionProductScalarFieldEnum[] + } + + /** + * CollectionProduct findFirstOrThrow + */ + export type CollectionProductFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + /** + * Filter, which CollectionProduct to fetch. + */ + where?: CollectionProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CollectionProducts to fetch. + */ + orderBy?: CollectionProductOrderByWithRelationInput | CollectionProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for CollectionProducts. + */ + cursor?: CollectionProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CollectionProducts 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` CollectionProducts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of CollectionProducts. + */ + distinct?: CollectionProductScalarFieldEnum | CollectionProductScalarFieldEnum[] + } + + /** + * CollectionProduct findMany + */ + export type CollectionProductFindManyArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + /** + * Filter, which CollectionProducts to fetch. + */ + where?: CollectionProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CollectionProducts to fetch. + */ + orderBy?: CollectionProductOrderByWithRelationInput | CollectionProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing CollectionProducts. + */ + cursor?: CollectionProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CollectionProducts 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` CollectionProducts. + */ + skip?: number + distinct?: CollectionProductScalarFieldEnum | CollectionProductScalarFieldEnum[] + } + + /** + * CollectionProduct create + */ + export type CollectionProductCreateArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + /** + * The data needed to create a CollectionProduct. + */ + data: XOR + } + + /** + * CollectionProduct createMany + */ + export type CollectionProductCreateManyArgs = { + /** + * The data used to create many CollectionProducts. + */ + data: CollectionProductCreateManyInput | CollectionProductCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * CollectionProduct createManyAndReturn + */ + export type CollectionProductCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelectCreateManyAndReturn | null + /** + * The data used to create many CollectionProducts. + */ + data: CollectionProductCreateManyInput | CollectionProductCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductIncludeCreateManyAndReturn | null + } + + /** + * CollectionProduct update + */ + export type CollectionProductUpdateArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + /** + * The data needed to update a CollectionProduct. + */ + data: XOR + /** + * Choose, which CollectionProduct to update. + */ + where: CollectionProductWhereUniqueInput + } + + /** + * CollectionProduct updateMany + */ + export type CollectionProductUpdateManyArgs = { + /** + * The data used to update CollectionProducts. + */ + data: XOR + /** + * Filter which CollectionProducts to update + */ + where?: CollectionProductWhereInput + } + + /** + * CollectionProduct upsert + */ + export type CollectionProductUpsertArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + /** + * The filter to search for the CollectionProduct to update in case it exists. + */ + where: CollectionProductWhereUniqueInput + /** + * In case the CollectionProduct found by the `where` argument doesn't exist, create a new CollectionProduct with this data. + */ + create: XOR + /** + * In case the CollectionProduct was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * CollectionProduct delete + */ + export type CollectionProductDeleteArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + /** + * Filter which CollectionProduct to delete. + */ + where: CollectionProductWhereUniqueInput + } + + /** + * CollectionProduct deleteMany + */ + export type CollectionProductDeleteManyArgs = { + /** + * Filter which CollectionProducts to delete + */ + where?: CollectionProductWhereInput + } + + /** + * CollectionProduct without action + */ + export type CollectionProductDefaultArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + } + + + /** + * Model Product + */ + + export type AggregateProduct = { + _count: ProductCountAggregateOutputType | null + _min: ProductMinAggregateOutputType | null + _max: ProductMaxAggregateOutputType | null + } + + export type ProductMinAggregateOutputType = { + id: string | null + title: string | null + description: string | null + categoryId: string | null + brandId: string | null + isActive: boolean | null + createdAt: Date | null + } + + export type ProductMaxAggregateOutputType = { + id: string | null + title: string | null + description: string | null + categoryId: string | null + brandId: string | null + isActive: boolean | null + createdAt: Date | null + } + + export type ProductCountAggregateOutputType = { + id: number + title: number + description: number + categoryId: number + brandId: number + isActive: number + createdAt: number + _all: number + } + + + export type ProductMinAggregateInputType = { + id?: true + title?: true + description?: true + categoryId?: true + brandId?: true + isActive?: true + createdAt?: true + } + + export type ProductMaxAggregateInputType = { + id?: true + title?: true + description?: true + categoryId?: true + brandId?: true + isActive?: true + createdAt?: true + } + + export type ProductCountAggregateInputType = { + id?: true + title?: true + description?: true + categoryId?: true + brandId?: true + isActive?: true + createdAt?: true + _all?: true + } + + export type ProductAggregateArgs = { + /** + * Filter which Product to aggregate. + */ + where?: ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Products 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` Products. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Products + **/ + _count?: true | ProductCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ProductMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ProductMaxAggregateInputType + } + + export type GetProductAggregateType = { + [P in keyof T & keyof AggregateProduct]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ProductGroupByArgs = { + where?: ProductWhereInput + orderBy?: ProductOrderByWithAggregationInput | ProductOrderByWithAggregationInput[] + by: ProductScalarFieldEnum[] | ProductScalarFieldEnum + having?: ProductScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ProductCountAggregateInputType | true + _min?: ProductMinAggregateInputType + _max?: ProductMaxAggregateInputType + } + + export type ProductGroupByOutputType = { + id: string + title: string + description: string | null + categoryId: string | null + brandId: string | null + isActive: boolean + createdAt: Date + _count: ProductCountAggregateOutputType | null + _min: ProductMinAggregateOutputType | null + _max: ProductMaxAggregateOutputType | null + } + + type GetProductGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ProductGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ProductSelect = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + description?: boolean + categoryId?: boolean + brandId?: boolean + isActive?: boolean + createdAt?: boolean + category?: boolean | Product$categoryArgs + brand?: boolean | Product$brandArgs + variants?: boolean | Product$variantsArgs + images?: boolean | Product$imagesArgs + collections?: boolean | Product$collectionsArgs + _count?: boolean | ProductCountOutputTypeDefaultArgs + }, ExtArgs["result"]["product"]> + + export type ProductSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + description?: boolean + categoryId?: boolean + brandId?: boolean + isActive?: boolean + createdAt?: boolean + category?: boolean | Product$categoryArgs + brand?: boolean | Product$brandArgs + }, ExtArgs["result"]["product"]> + + export type ProductSelectScalar = { + id?: boolean + title?: boolean + description?: boolean + categoryId?: boolean + brandId?: boolean + isActive?: boolean + createdAt?: boolean + } + + export type ProductInclude = { + category?: boolean | Product$categoryArgs + brand?: boolean | Product$brandArgs + variants?: boolean | Product$variantsArgs + images?: boolean | Product$imagesArgs + collections?: boolean | Product$collectionsArgs + _count?: boolean | ProductCountOutputTypeDefaultArgs + } + export type ProductIncludeCreateManyAndReturn = { + category?: boolean | Product$categoryArgs + brand?: boolean | Product$brandArgs + } + + export type $ProductPayload = { + name: "Product" + objects: { + category: Prisma.$CategoryPayload | null + brand: Prisma.$BrandPayload | null + variants: Prisma.$ProductVariantPayload[] + images: Prisma.$ProductImagePayload[] + collections: Prisma.$CollectionProductPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + title: string + description: string | null + categoryId: string | null + brandId: string | null + isActive: boolean + createdAt: Date + }, ExtArgs["result"]["product"]> + composites: {} + } + + type ProductGetPayload = $Result.GetResult + + type ProductCountArgs = + Omit & { + select?: ProductCountAggregateInputType | true + } + + export interface ProductDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Product'], meta: { name: 'Product' } } + /** + * Find zero or one Product that matches the filter. + * @param {ProductFindUniqueArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ProductClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Product that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ProductFindUniqueOrThrowArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ProductClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Product 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 {ProductFindFirstArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ProductClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Product 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 {ProductFindFirstOrThrowArgs} args - Arguments to find a Product + * @example + * // Get one Product + * const product = await prisma.product.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ProductClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Products 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 {ProductFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Products + * const products = await prisma.product.findMany() + * + * // Get first 10 Products + * const products = await prisma.product.findMany({ take: 10 }) + * + * // Only select the `id` + * const productWithIdOnly = await prisma.product.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Product. + * @param {ProductCreateArgs} args - Arguments to create a Product. + * @example + * // Create one Product + * const Product = await prisma.product.create({ + * data: { + * // ... data to create a Product + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ProductClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Products. + * @param {ProductCreateManyArgs} args - Arguments to create many Products. + * @example + * // Create many Products + * const product = await prisma.product.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Products and returns the data saved in the database. + * @param {ProductCreateManyAndReturnArgs} args - Arguments to create many Products. + * @example + * // Create many Products + * const product = await prisma.product.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Products and only return the `id` + * const productWithIdOnly = await prisma.product.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 Product. + * @param {ProductDeleteArgs} args - Arguments to delete one Product. + * @example + * // Delete one Product + * const Product = await prisma.product.delete({ + * where: { + * // ... filter to delete one Product + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ProductClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Product. + * @param {ProductUpdateArgs} args - Arguments to update one Product. + * @example + * // Update one Product + * const product = await prisma.product.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ProductClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Products. + * @param {ProductDeleteManyArgs} args - Arguments to filter Products to delete. + * @example + * // Delete a few Products + * const { count } = await prisma.product.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Products. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Products + * const product = await prisma.product.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Product. + * @param {ProductUpsertArgs} args - Arguments to update or create a Product. + * @example + * // Update or create a Product + * const product = await prisma.product.upsert({ + * create: { + * // ... data to create a Product + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Product we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ProductClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Products. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductCountArgs} args - Arguments to filter Products to count. + * @example + * // Count the number of Products + * const count = await prisma.product.count({ + * where: { + * // ... the filter for the Products 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 Product. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductAggregateArgs} 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 Product. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductGroupByArgs} 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 ProductGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ProductGroupByArgs['orderBy'] } + : { orderBy?: ProductGroupByArgs['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 ? GetProductGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Product model + */ + readonly fields: ProductFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Product. + * 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__ProductClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + category = {}>(args?: Subset>): Prisma__CategoryClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + brand = {}>(args?: Subset>): Prisma__BrandClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + variants = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + images = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + collections = {}>(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 Product model + */ + interface ProductFieldRefs { + readonly id: FieldRef<"Product", 'String'> + readonly title: FieldRef<"Product", 'String'> + readonly description: FieldRef<"Product", 'String'> + readonly categoryId: FieldRef<"Product", 'String'> + readonly brandId: FieldRef<"Product", 'String'> + readonly isActive: FieldRef<"Product", 'Boolean'> + readonly createdAt: FieldRef<"Product", 'DateTime'> + } + + + // Custom InputTypes + /** + * Product findUnique + */ + export type ProductFindUniqueArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where: ProductWhereUniqueInput + } + + /** + * Product findUniqueOrThrow + */ + export type ProductFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where: ProductWhereUniqueInput + } + + /** + * Product findFirst + */ + export type ProductFindFirstArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where?: ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Products. + */ + cursor?: ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Products 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` Products. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Products. + */ + distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[] + } + + /** + * Product findFirstOrThrow + */ + export type ProductFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + /** + * Filter, which Product to fetch. + */ + where?: ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Products. + */ + cursor?: ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Products 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` Products. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Products. + */ + distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[] + } + + /** + * Product findMany + */ + export type ProductFindManyArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + /** + * Filter, which Products to fetch. + */ + where?: ProductWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Products to fetch. + */ + orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Products. + */ + cursor?: ProductWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Products 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` Products. + */ + skip?: number + distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[] + } + + /** + * Product create + */ + export type ProductCreateArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + /** + * The data needed to create a Product. + */ + data: XOR + } + + /** + * Product createMany + */ + export type ProductCreateManyArgs = { + /** + * The data used to create many Products. + */ + data: ProductCreateManyInput | ProductCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Product createManyAndReturn + */ + export type ProductCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelectCreateManyAndReturn | null + /** + * The data used to create many Products. + */ + data: ProductCreateManyInput | ProductCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductIncludeCreateManyAndReturn | null + } + + /** + * Product update + */ + export type ProductUpdateArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + /** + * The data needed to update a Product. + */ + data: XOR + /** + * Choose, which Product to update. + */ + where: ProductWhereUniqueInput + } + + /** + * Product updateMany + */ + export type ProductUpdateManyArgs = { + /** + * The data used to update Products. + */ + data: XOR + /** + * Filter which Products to update + */ + where?: ProductWhereInput + } + + /** + * Product upsert + */ + export type ProductUpsertArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + /** + * The filter to search for the Product to update in case it exists. + */ + where: ProductWhereUniqueInput + /** + * In case the Product found by the `where` argument doesn't exist, create a new Product with this data. + */ + create: XOR + /** + * In case the Product was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Product delete + */ + export type ProductDeleteArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + /** + * Filter which Product to delete. + */ + where: ProductWhereUniqueInput + } + + /** + * Product deleteMany + */ + export type ProductDeleteManyArgs = { + /** + * Filter which Products to delete + */ + where?: ProductWhereInput + } + + /** + * Product.category + */ + export type Product$categoryArgs = { + /** + * Select specific fields to fetch from the Category + */ + select?: CategorySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CategoryInclude | null + where?: CategoryWhereInput + } + + /** + * Product.brand + */ + export type Product$brandArgs = { + /** + * Select specific fields to fetch from the Brand + */ + select?: BrandSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BrandInclude | null + where?: BrandWhereInput + } + + /** + * Product.variants + */ + export type Product$variantsArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + where?: ProductVariantWhereInput + orderBy?: ProductVariantOrderByWithRelationInput | ProductVariantOrderByWithRelationInput[] + cursor?: ProductVariantWhereUniqueInput + take?: number + skip?: number + distinct?: ProductVariantScalarFieldEnum | ProductVariantScalarFieldEnum[] + } + + /** + * Product.images + */ + export type Product$imagesArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + where?: ProductImageWhereInput + orderBy?: ProductImageOrderByWithRelationInput | ProductImageOrderByWithRelationInput[] + cursor?: ProductImageWhereUniqueInput + take?: number + skip?: number + distinct?: ProductImageScalarFieldEnum | ProductImageScalarFieldEnum[] + } + + /** + * Product.collections + */ + export type Product$collectionsArgs = { + /** + * Select specific fields to fetch from the CollectionProduct + */ + select?: CollectionProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CollectionProductInclude | null + where?: CollectionProductWhereInput + orderBy?: CollectionProductOrderByWithRelationInput | CollectionProductOrderByWithRelationInput[] + cursor?: CollectionProductWhereUniqueInput + take?: number + skip?: number + distinct?: CollectionProductScalarFieldEnum | CollectionProductScalarFieldEnum[] + } + + /** + * Product without action + */ + export type ProductDefaultArgs = { + /** + * Select specific fields to fetch from the Product + */ + select?: ProductSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductInclude | null + } + + + /** + * Model ProductImage + */ + + export type AggregateProductImage = { + _count: ProductImageCountAggregateOutputType | null + _avg: ProductImageAvgAggregateOutputType | null + _sum: ProductImageSumAggregateOutputType | null + _min: ProductImageMinAggregateOutputType | null + _max: ProductImageMaxAggregateOutputType | null + } + + export type ProductImageAvgAggregateOutputType = { + sortOrder: number | null + } + + export type ProductImageSumAggregateOutputType = { + sortOrder: number | null + } + + export type ProductImageMinAggregateOutputType = { + id: string | null + productId: string | null + url: string | null + sortOrder: number | null + } + + export type ProductImageMaxAggregateOutputType = { + id: string | null + productId: string | null + url: string | null + sortOrder: number | null + } + + export type ProductImageCountAggregateOutputType = { + id: number + productId: number + url: number + sortOrder: number + _all: number + } + + + export type ProductImageAvgAggregateInputType = { + sortOrder?: true + } + + export type ProductImageSumAggregateInputType = { + sortOrder?: true + } + + export type ProductImageMinAggregateInputType = { + id?: true + productId?: true + url?: true + sortOrder?: true + } + + export type ProductImageMaxAggregateInputType = { + id?: true + productId?: true + url?: true + sortOrder?: true + } + + export type ProductImageCountAggregateInputType = { + id?: true + productId?: true + url?: true + sortOrder?: true + _all?: true + } + + export type ProductImageAggregateArgs = { + /** + * Filter which ProductImage to aggregate. + */ + where?: ProductImageWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ProductImages to fetch. + */ + orderBy?: ProductImageOrderByWithRelationInput | ProductImageOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ProductImageWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ProductImages 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` ProductImages. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ProductImages + **/ + _count?: true | ProductImageCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ProductImageAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ProductImageSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ProductImageMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ProductImageMaxAggregateInputType + } + + export type GetProductImageAggregateType = { + [P in keyof T & keyof AggregateProductImage]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ProductImageGroupByArgs = { + where?: ProductImageWhereInput + orderBy?: ProductImageOrderByWithAggregationInput | ProductImageOrderByWithAggregationInput[] + by: ProductImageScalarFieldEnum[] | ProductImageScalarFieldEnum + having?: ProductImageScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ProductImageCountAggregateInputType | true + _avg?: ProductImageAvgAggregateInputType + _sum?: ProductImageSumAggregateInputType + _min?: ProductImageMinAggregateInputType + _max?: ProductImageMaxAggregateInputType + } + + export type ProductImageGroupByOutputType = { + id: string + productId: string + url: string + sortOrder: number + _count: ProductImageCountAggregateOutputType | null + _avg: ProductImageAvgAggregateOutputType | null + _sum: ProductImageSumAggregateOutputType | null + _min: ProductImageMinAggregateOutputType | null + _max: ProductImageMaxAggregateOutputType | null + } + + type GetProductImageGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ProductImageGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ProductImageSelect = $Extensions.GetSelect<{ + id?: boolean + productId?: boolean + url?: boolean + sortOrder?: boolean + product?: boolean | ProductDefaultArgs + }, ExtArgs["result"]["productImage"]> + + export type ProductImageSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + productId?: boolean + url?: boolean + sortOrder?: boolean + product?: boolean | ProductDefaultArgs + }, ExtArgs["result"]["productImage"]> + + export type ProductImageSelectScalar = { + id?: boolean + productId?: boolean + url?: boolean + sortOrder?: boolean + } + + export type ProductImageInclude = { + product?: boolean | ProductDefaultArgs + } + export type ProductImageIncludeCreateManyAndReturn = { + product?: boolean | ProductDefaultArgs + } + + export type $ProductImagePayload = { + name: "ProductImage" + objects: { + product: Prisma.$ProductPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + productId: string + url: string + sortOrder: number + }, ExtArgs["result"]["productImage"]> + composites: {} + } + + type ProductImageGetPayload = $Result.GetResult + + type ProductImageCountArgs = + Omit & { + select?: ProductImageCountAggregateInputType | true + } + + export interface ProductImageDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ProductImage'], meta: { name: 'ProductImage' } } + /** + * Find zero or one ProductImage that matches the filter. + * @param {ProductImageFindUniqueArgs} args - Arguments to find a ProductImage + * @example + * // Get one ProductImage + * const productImage = await prisma.productImage.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ProductImageClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one ProductImage that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ProductImageFindUniqueOrThrowArgs} args - Arguments to find a ProductImage + * @example + * // Get one ProductImage + * const productImage = await prisma.productImage.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ProductImageClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first ProductImage 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 {ProductImageFindFirstArgs} args - Arguments to find a ProductImage + * @example + * // Get one ProductImage + * const productImage = await prisma.productImage.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ProductImageClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first ProductImage 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 {ProductImageFindFirstOrThrowArgs} args - Arguments to find a ProductImage + * @example + * // Get one ProductImage + * const productImage = await prisma.productImage.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ProductImageClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more ProductImages 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 {ProductImageFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ProductImages + * const productImages = await prisma.productImage.findMany() + * + * // Get first 10 ProductImages + * const productImages = await prisma.productImage.findMany({ take: 10 }) + * + * // Only select the `id` + * const productImageWithIdOnly = await prisma.productImage.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a ProductImage. + * @param {ProductImageCreateArgs} args - Arguments to create a ProductImage. + * @example + * // Create one ProductImage + * const ProductImage = await prisma.productImage.create({ + * data: { + * // ... data to create a ProductImage + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ProductImageClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many ProductImages. + * @param {ProductImageCreateManyArgs} args - Arguments to create many ProductImages. + * @example + * // Create many ProductImages + * const productImage = await prisma.productImage.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ProductImages and returns the data saved in the database. + * @param {ProductImageCreateManyAndReturnArgs} args - Arguments to create many ProductImages. + * @example + * // Create many ProductImages + * const productImage = await prisma.productImage.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ProductImages and only return the `id` + * const productImageWithIdOnly = await prisma.productImage.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 ProductImage. + * @param {ProductImageDeleteArgs} args - Arguments to delete one ProductImage. + * @example + * // Delete one ProductImage + * const ProductImage = await prisma.productImage.delete({ + * where: { + * // ... filter to delete one ProductImage + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ProductImageClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one ProductImage. + * @param {ProductImageUpdateArgs} args - Arguments to update one ProductImage. + * @example + * // Update one ProductImage + * const productImage = await prisma.productImage.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ProductImageClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more ProductImages. + * @param {ProductImageDeleteManyArgs} args - Arguments to filter ProductImages to delete. + * @example + * // Delete a few ProductImages + * const { count } = await prisma.productImage.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ProductImages. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductImageUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ProductImages + * const productImage = await prisma.productImage.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one ProductImage. + * @param {ProductImageUpsertArgs} args - Arguments to update or create a ProductImage. + * @example + * // Update or create a ProductImage + * const productImage = await prisma.productImage.upsert({ + * create: { + * // ... data to create a ProductImage + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ProductImage we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ProductImageClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of ProductImages. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductImageCountArgs} args - Arguments to filter ProductImages to count. + * @example + * // Count the number of ProductImages + * const count = await prisma.productImage.count({ + * where: { + * // ... the filter for the ProductImages 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 ProductImage. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductImageAggregateArgs} 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 ProductImage. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductImageGroupByArgs} 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 ProductImageGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ProductImageGroupByArgs['orderBy'] } + : { orderBy?: ProductImageGroupByArgs['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 ? GetProductImageGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ProductImage model + */ + readonly fields: ProductImageFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ProductImage. + * 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__ProductImageClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + product = {}>(args?: Subset>): Prisma__ProductClient<$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 ProductImage model + */ + interface ProductImageFieldRefs { + readonly id: FieldRef<"ProductImage", 'String'> + readonly productId: FieldRef<"ProductImage", 'String'> + readonly url: FieldRef<"ProductImage", 'String'> + readonly sortOrder: FieldRef<"ProductImage", 'Int'> + } + + + // Custom InputTypes + /** + * ProductImage findUnique + */ + export type ProductImageFindUniqueArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + /** + * Filter, which ProductImage to fetch. + */ + where: ProductImageWhereUniqueInput + } + + /** + * ProductImage findUniqueOrThrow + */ + export type ProductImageFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + /** + * Filter, which ProductImage to fetch. + */ + where: ProductImageWhereUniqueInput + } + + /** + * ProductImage findFirst + */ + export type ProductImageFindFirstArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + /** + * Filter, which ProductImage to fetch. + */ + where?: ProductImageWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ProductImages to fetch. + */ + orderBy?: ProductImageOrderByWithRelationInput | ProductImageOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ProductImages. + */ + cursor?: ProductImageWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ProductImages 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` ProductImages. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ProductImages. + */ + distinct?: ProductImageScalarFieldEnum | ProductImageScalarFieldEnum[] + } + + /** + * ProductImage findFirstOrThrow + */ + export type ProductImageFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + /** + * Filter, which ProductImage to fetch. + */ + where?: ProductImageWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ProductImages to fetch. + */ + orderBy?: ProductImageOrderByWithRelationInput | ProductImageOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ProductImages. + */ + cursor?: ProductImageWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ProductImages 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` ProductImages. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ProductImages. + */ + distinct?: ProductImageScalarFieldEnum | ProductImageScalarFieldEnum[] + } + + /** + * ProductImage findMany + */ + export type ProductImageFindManyArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + /** + * Filter, which ProductImages to fetch. + */ + where?: ProductImageWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ProductImages to fetch. + */ + orderBy?: ProductImageOrderByWithRelationInput | ProductImageOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ProductImages. + */ + cursor?: ProductImageWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ProductImages 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` ProductImages. + */ + skip?: number + distinct?: ProductImageScalarFieldEnum | ProductImageScalarFieldEnum[] + } + + /** + * ProductImage create + */ + export type ProductImageCreateArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + /** + * The data needed to create a ProductImage. + */ + data: XOR + } + + /** + * ProductImage createMany + */ + export type ProductImageCreateManyArgs = { + /** + * The data used to create many ProductImages. + */ + data: ProductImageCreateManyInput | ProductImageCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ProductImage createManyAndReturn + */ + export type ProductImageCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelectCreateManyAndReturn | null + /** + * The data used to create many ProductImages. + */ + data: ProductImageCreateManyInput | ProductImageCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageIncludeCreateManyAndReturn | null + } + + /** + * ProductImage update + */ + export type ProductImageUpdateArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + /** + * The data needed to update a ProductImage. + */ + data: XOR + /** + * Choose, which ProductImage to update. + */ + where: ProductImageWhereUniqueInput + } + + /** + * ProductImage updateMany + */ + export type ProductImageUpdateManyArgs = { + /** + * The data used to update ProductImages. + */ + data: XOR + /** + * Filter which ProductImages to update + */ + where?: ProductImageWhereInput + } + + /** + * ProductImage upsert + */ + export type ProductImageUpsertArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + /** + * The filter to search for the ProductImage to update in case it exists. + */ + where: ProductImageWhereUniqueInput + /** + * In case the ProductImage found by the `where` argument doesn't exist, create a new ProductImage with this data. + */ + create: XOR + /** + * In case the ProductImage was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ProductImage delete + */ + export type ProductImageDeleteArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + /** + * Filter which ProductImage to delete. + */ + where: ProductImageWhereUniqueInput + } + + /** + * ProductImage deleteMany + */ + export type ProductImageDeleteManyArgs = { + /** + * Filter which ProductImages to delete + */ + where?: ProductImageWhereInput + } + + /** + * ProductImage without action + */ + export type ProductImageDefaultArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + } + + + /** + * Model ProductVariant + */ + + export type AggregateProductVariant = { + _count: ProductVariantCountAggregateOutputType | null + _avg: ProductVariantAvgAggregateOutputType | null + _sum: ProductVariantSumAggregateOutputType | null + _min: ProductVariantMinAggregateOutputType | null + _max: ProductVariantMaxAggregateOutputType | null + } + + export type ProductVariantAvgAggregateOutputType = { + rashWeightGrams: Decimal | null + defaultWagePercent: Decimal | null + } + + export type ProductVariantSumAggregateOutputType = { + rashWeightGrams: Decimal | null + defaultWagePercent: Decimal | null + } + + export type ProductVariantMinAggregateOutputType = { + id: string | null + productId: string | null + title: string | null + sku: string | null + rashWeightGrams: Decimal | null + defaultWagePercent: Decimal | null + isActive: boolean | null + } + + export type ProductVariantMaxAggregateOutputType = { + id: string | null + productId: string | null + title: string | null + sku: string | null + rashWeightGrams: Decimal | null + defaultWagePercent: Decimal | null + isActive: boolean | null + } + + export type ProductVariantCountAggregateOutputType = { + id: number + productId: number + title: number + sku: number + rashWeightGrams: number + defaultWagePercent: number + isActive: number + _all: number + } + + + export type ProductVariantAvgAggregateInputType = { + rashWeightGrams?: true + defaultWagePercent?: true + } + + export type ProductVariantSumAggregateInputType = { + rashWeightGrams?: true + defaultWagePercent?: true + } + + export type ProductVariantMinAggregateInputType = { + id?: true + productId?: true + title?: true + sku?: true + rashWeightGrams?: true + defaultWagePercent?: true + isActive?: true + } + + export type ProductVariantMaxAggregateInputType = { + id?: true + productId?: true + title?: true + sku?: true + rashWeightGrams?: true + defaultWagePercent?: true + isActive?: true + } + + export type ProductVariantCountAggregateInputType = { + id?: true + productId?: true + title?: true + sku?: true + rashWeightGrams?: true + defaultWagePercent?: true + isActive?: true + _all?: true + } + + export type ProductVariantAggregateArgs = { + /** + * Filter which ProductVariant to aggregate. + */ + where?: ProductVariantWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ProductVariants to fetch. + */ + orderBy?: ProductVariantOrderByWithRelationInput | ProductVariantOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ProductVariantWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ProductVariants 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` ProductVariants. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ProductVariants + **/ + _count?: true | ProductVariantCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ProductVariantAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ProductVariantSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ProductVariantMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ProductVariantMaxAggregateInputType + } + + export type GetProductVariantAggregateType = { + [P in keyof T & keyof AggregateProductVariant]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ProductVariantGroupByArgs = { + where?: ProductVariantWhereInput + orderBy?: ProductVariantOrderByWithAggregationInput | ProductVariantOrderByWithAggregationInput[] + by: ProductVariantScalarFieldEnum[] | ProductVariantScalarFieldEnum + having?: ProductVariantScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ProductVariantCountAggregateInputType | true + _avg?: ProductVariantAvgAggregateInputType + _sum?: ProductVariantSumAggregateInputType + _min?: ProductVariantMinAggregateInputType + _max?: ProductVariantMaxAggregateInputType + } + + export type ProductVariantGroupByOutputType = { + id: string + productId: string + title: string + sku: string | null + rashWeightGrams: Decimal + defaultWagePercent: Decimal + isActive: boolean + _count: ProductVariantCountAggregateOutputType | null + _avg: ProductVariantAvgAggregateOutputType | null + _sum: ProductVariantSumAggregateOutputType | null + _min: ProductVariantMinAggregateOutputType | null + _max: ProductVariantMaxAggregateOutputType | null + } + + type GetProductVariantGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ProductVariantGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ProductVariantSelect = $Extensions.GetSelect<{ + id?: boolean + productId?: boolean + title?: boolean + sku?: boolean + rashWeightGrams?: boolean + defaultWagePercent?: boolean + isActive?: boolean + product?: boolean | ProductDefaultArgs + orderItems?: boolean | ProductVariant$orderItemsArgs + _count?: boolean | ProductVariantCountOutputTypeDefaultArgs + }, ExtArgs["result"]["productVariant"]> + + export type ProductVariantSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + productId?: boolean + title?: boolean + sku?: boolean + rashWeightGrams?: boolean + defaultWagePercent?: boolean + isActive?: boolean + product?: boolean | ProductDefaultArgs + }, ExtArgs["result"]["productVariant"]> + + export type ProductVariantSelectScalar = { + id?: boolean + productId?: boolean + title?: boolean + sku?: boolean + rashWeightGrams?: boolean + defaultWagePercent?: boolean + isActive?: boolean + } + + export type ProductVariantInclude = { + product?: boolean | ProductDefaultArgs + orderItems?: boolean | ProductVariant$orderItemsArgs + _count?: boolean | ProductVariantCountOutputTypeDefaultArgs + } + export type ProductVariantIncludeCreateManyAndReturn = { + product?: boolean | ProductDefaultArgs + } + + export type $ProductVariantPayload = { + name: "ProductVariant" + objects: { + product: Prisma.$ProductPayload + orderItems: Prisma.$OrderItemPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + productId: string + title: string + sku: string | null + /** + * Base/raw weight before making charge ("rash weight"). + */ + rashWeightGrams: Prisma.Decimal + /** + * Default making-charge percentage applied on top of rash weight. + */ + defaultWagePercent: Prisma.Decimal + isActive: boolean + }, ExtArgs["result"]["productVariant"]> + composites: {} + } + + type ProductVariantGetPayload = $Result.GetResult + + type ProductVariantCountArgs = + Omit & { + select?: ProductVariantCountAggregateInputType | true + } + + export interface ProductVariantDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ProductVariant'], meta: { name: 'ProductVariant' } } + /** + * Find zero or one ProductVariant that matches the filter. + * @param {ProductVariantFindUniqueArgs} args - Arguments to find a ProductVariant + * @example + * // Get one ProductVariant + * const productVariant = await prisma.productVariant.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ProductVariantClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one ProductVariant that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ProductVariantFindUniqueOrThrowArgs} args - Arguments to find a ProductVariant + * @example + * // Get one ProductVariant + * const productVariant = await prisma.productVariant.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ProductVariantClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first ProductVariant 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 {ProductVariantFindFirstArgs} args - Arguments to find a ProductVariant + * @example + * // Get one ProductVariant + * const productVariant = await prisma.productVariant.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ProductVariantClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first ProductVariant 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 {ProductVariantFindFirstOrThrowArgs} args - Arguments to find a ProductVariant + * @example + * // Get one ProductVariant + * const productVariant = await prisma.productVariant.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ProductVariantClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more ProductVariants 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 {ProductVariantFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ProductVariants + * const productVariants = await prisma.productVariant.findMany() + * + * // Get first 10 ProductVariants + * const productVariants = await prisma.productVariant.findMany({ take: 10 }) + * + * // Only select the `id` + * const productVariantWithIdOnly = await prisma.productVariant.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a ProductVariant. + * @param {ProductVariantCreateArgs} args - Arguments to create a ProductVariant. + * @example + * // Create one ProductVariant + * const ProductVariant = await prisma.productVariant.create({ + * data: { + * // ... data to create a ProductVariant + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ProductVariantClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many ProductVariants. + * @param {ProductVariantCreateManyArgs} args - Arguments to create many ProductVariants. + * @example + * // Create many ProductVariants + * const productVariant = await prisma.productVariant.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ProductVariants and returns the data saved in the database. + * @param {ProductVariantCreateManyAndReturnArgs} args - Arguments to create many ProductVariants. + * @example + * // Create many ProductVariants + * const productVariant = await prisma.productVariant.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ProductVariants and only return the `id` + * const productVariantWithIdOnly = await prisma.productVariant.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 ProductVariant. + * @param {ProductVariantDeleteArgs} args - Arguments to delete one ProductVariant. + * @example + * // Delete one ProductVariant + * const ProductVariant = await prisma.productVariant.delete({ + * where: { + * // ... filter to delete one ProductVariant + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ProductVariantClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one ProductVariant. + * @param {ProductVariantUpdateArgs} args - Arguments to update one ProductVariant. + * @example + * // Update one ProductVariant + * const productVariant = await prisma.productVariant.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ProductVariantClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more ProductVariants. + * @param {ProductVariantDeleteManyArgs} args - Arguments to filter ProductVariants to delete. + * @example + * // Delete a few ProductVariants + * const { count } = await prisma.productVariant.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ProductVariants. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductVariantUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ProductVariants + * const productVariant = await prisma.productVariant.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one ProductVariant. + * @param {ProductVariantUpsertArgs} args - Arguments to update or create a ProductVariant. + * @example + * // Update or create a ProductVariant + * const productVariant = await prisma.productVariant.upsert({ + * create: { + * // ... data to create a ProductVariant + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ProductVariant we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ProductVariantClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of ProductVariants. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductVariantCountArgs} args - Arguments to filter ProductVariants to count. + * @example + * // Count the number of ProductVariants + * const count = await prisma.productVariant.count({ + * where: { + * // ... the filter for the ProductVariants 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 ProductVariant. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductVariantAggregateArgs} 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 ProductVariant. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ProductVariantGroupByArgs} 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 ProductVariantGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ProductVariantGroupByArgs['orderBy'] } + : { orderBy?: ProductVariantGroupByArgs['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 ? GetProductVariantGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ProductVariant model + */ + readonly fields: ProductVariantFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ProductVariant. + * 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__ProductVariantClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + product = {}>(args?: Subset>): Prisma__ProductClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + orderItems = {}>(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 ProductVariant model + */ + interface ProductVariantFieldRefs { + readonly id: FieldRef<"ProductVariant", 'String'> + readonly productId: FieldRef<"ProductVariant", 'String'> + readonly title: FieldRef<"ProductVariant", 'String'> + readonly sku: FieldRef<"ProductVariant", 'String'> + readonly rashWeightGrams: FieldRef<"ProductVariant", 'Decimal'> + readonly defaultWagePercent: FieldRef<"ProductVariant", 'Decimal'> + readonly isActive: FieldRef<"ProductVariant", 'Boolean'> + } + + + // Custom InputTypes + /** + * ProductVariant findUnique + */ + export type ProductVariantFindUniqueArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + /** + * Filter, which ProductVariant to fetch. + */ + where: ProductVariantWhereUniqueInput + } + + /** + * ProductVariant findUniqueOrThrow + */ + export type ProductVariantFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + /** + * Filter, which ProductVariant to fetch. + */ + where: ProductVariantWhereUniqueInput + } + + /** + * ProductVariant findFirst + */ + export type ProductVariantFindFirstArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + /** + * Filter, which ProductVariant to fetch. + */ + where?: ProductVariantWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ProductVariants to fetch. + */ + orderBy?: ProductVariantOrderByWithRelationInput | ProductVariantOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ProductVariants. + */ + cursor?: ProductVariantWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ProductVariants 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` ProductVariants. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ProductVariants. + */ + distinct?: ProductVariantScalarFieldEnum | ProductVariantScalarFieldEnum[] + } + + /** + * ProductVariant findFirstOrThrow + */ + export type ProductVariantFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + /** + * Filter, which ProductVariant to fetch. + */ + where?: ProductVariantWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ProductVariants to fetch. + */ + orderBy?: ProductVariantOrderByWithRelationInput | ProductVariantOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ProductVariants. + */ + cursor?: ProductVariantWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ProductVariants 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` ProductVariants. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ProductVariants. + */ + distinct?: ProductVariantScalarFieldEnum | ProductVariantScalarFieldEnum[] + } + + /** + * ProductVariant findMany + */ + export type ProductVariantFindManyArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + /** + * Filter, which ProductVariants to fetch. + */ + where?: ProductVariantWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ProductVariants to fetch. + */ + orderBy?: ProductVariantOrderByWithRelationInput | ProductVariantOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ProductVariants. + */ + cursor?: ProductVariantWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ProductVariants 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` ProductVariants. + */ + skip?: number + distinct?: ProductVariantScalarFieldEnum | ProductVariantScalarFieldEnum[] + } + + /** + * ProductVariant create + */ + export type ProductVariantCreateArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + /** + * The data needed to create a ProductVariant. + */ + data: XOR + } + + /** + * ProductVariant createMany + */ + export type ProductVariantCreateManyArgs = { + /** + * The data used to create many ProductVariants. + */ + data: ProductVariantCreateManyInput | ProductVariantCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ProductVariant createManyAndReturn + */ + export type ProductVariantCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelectCreateManyAndReturn | null + /** + * The data used to create many ProductVariants. + */ + data: ProductVariantCreateManyInput | ProductVariantCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantIncludeCreateManyAndReturn | null + } + + /** + * ProductVariant update + */ + export type ProductVariantUpdateArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + /** + * The data needed to update a ProductVariant. + */ + data: XOR + /** + * Choose, which ProductVariant to update. + */ + where: ProductVariantWhereUniqueInput + } + + /** + * ProductVariant updateMany + */ + export type ProductVariantUpdateManyArgs = { + /** + * The data used to update ProductVariants. + */ + data: XOR + /** + * Filter which ProductVariants to update + */ + where?: ProductVariantWhereInput + } + + /** + * ProductVariant upsert + */ + export type ProductVariantUpsertArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + /** + * The filter to search for the ProductVariant to update in case it exists. + */ + where: ProductVariantWhereUniqueInput + /** + * In case the ProductVariant found by the `where` argument doesn't exist, create a new ProductVariant with this data. + */ + create: XOR + /** + * In case the ProductVariant was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ProductVariant delete + */ + export type ProductVariantDeleteArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + /** + * Filter which ProductVariant to delete. + */ + where: ProductVariantWhereUniqueInput + } + + /** + * ProductVariant deleteMany + */ + export type ProductVariantDeleteManyArgs = { + /** + * Filter which ProductVariants to delete + */ + where?: ProductVariantWhereInput + } + + /** + * ProductVariant.orderItems + */ + export type ProductVariant$orderItemsArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + where?: OrderItemWhereInput + orderBy?: OrderItemOrderByWithRelationInput | OrderItemOrderByWithRelationInput[] + cursor?: OrderItemWhereUniqueInput + take?: number + skip?: number + distinct?: OrderItemScalarFieldEnum | OrderItemScalarFieldEnum[] + } + + /** + * ProductVariant without action + */ + export type ProductVariantDefaultArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + } + + + /** + * Model Order + */ + + export type AggregateOrder = { + _count: OrderCountAggregateOutputType | null + _avg: OrderAvgAggregateOutputType | null + _sum: OrderSumAggregateOutputType | null + _min: OrderMinAggregateOutputType | null + _max: OrderMaxAggregateOutputType | null + } + + export type OrderAvgAggregateOutputType = { + totalGoldWeightGrams: Decimal | null + wageWeightGrams: Decimal | null + flatRialCharge: Decimal | null + } + + export type OrderSumAggregateOutputType = { + totalGoldWeightGrams: Decimal | null + wageWeightGrams: Decimal | null + flatRialCharge: Decimal | null + } + + export type OrderMinAggregateOutputType = { + id: string | null + orderNumber: string | null + customerId: string | null + branchId: string | null + status: $Enums.OrderStatus | null + totalGoldWeightGrams: Decimal | null + wageWeightGrams: Decimal | null + flatRialCharge: Decimal | null + isSuspendedOverCreditLimit: boolean | null + deliveredAt: Date | null + createdAt: Date | null + updatedAt: Date | null + } + + export type OrderMaxAggregateOutputType = { + id: string | null + orderNumber: string | null + customerId: string | null + branchId: string | null + status: $Enums.OrderStatus | null + totalGoldWeightGrams: Decimal | null + wageWeightGrams: Decimal | null + flatRialCharge: Decimal | null + isSuspendedOverCreditLimit: boolean | null + deliveredAt: Date | null + createdAt: Date | null + updatedAt: Date | null + } + + export type OrderCountAggregateOutputType = { + id: number + orderNumber: number + customerId: number + branchId: number + status: number + totalGoldWeightGrams: number + wageWeightGrams: number + flatRialCharge: number + isSuspendedOverCreditLimit: number + deliveredAt: number + createdAt: number + updatedAt: number + _all: number + } + + + export type OrderAvgAggregateInputType = { + totalGoldWeightGrams?: true + wageWeightGrams?: true + flatRialCharge?: true + } + + export type OrderSumAggregateInputType = { + totalGoldWeightGrams?: true + wageWeightGrams?: true + flatRialCharge?: true + } + + export type OrderMinAggregateInputType = { + id?: true + orderNumber?: true + customerId?: true + branchId?: true + status?: true + totalGoldWeightGrams?: true + wageWeightGrams?: true + flatRialCharge?: true + isSuspendedOverCreditLimit?: true + deliveredAt?: true + createdAt?: true + updatedAt?: true + } + + export type OrderMaxAggregateInputType = { + id?: true + orderNumber?: true + customerId?: true + branchId?: true + status?: true + totalGoldWeightGrams?: true + wageWeightGrams?: true + flatRialCharge?: true + isSuspendedOverCreditLimit?: true + deliveredAt?: true + createdAt?: true + updatedAt?: true + } + + export type OrderCountAggregateInputType = { + id?: true + orderNumber?: true + customerId?: true + branchId?: true + status?: true + totalGoldWeightGrams?: true + wageWeightGrams?: true + flatRialCharge?: true + isSuspendedOverCreditLimit?: true + deliveredAt?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type OrderAggregateArgs = { + /** + * Filter which Order to aggregate. + */ + where?: OrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Orders to fetch. + */ + orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: OrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Orders 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` Orders. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Orders + **/ + _count?: true | OrderCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: OrderAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: OrderSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: OrderMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: OrderMaxAggregateInputType + } + + export type GetOrderAggregateType = { + [P in keyof T & keyof AggregateOrder]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type OrderGroupByArgs = { + where?: OrderWhereInput + orderBy?: OrderOrderByWithAggregationInput | OrderOrderByWithAggregationInput[] + by: OrderScalarFieldEnum[] | OrderScalarFieldEnum + having?: OrderScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: OrderCountAggregateInputType | true + _avg?: OrderAvgAggregateInputType + _sum?: OrderSumAggregateInputType + _min?: OrderMinAggregateInputType + _max?: OrderMaxAggregateInputType + } + + export type OrderGroupByOutputType = { + id: string + orderNumber: string + customerId: string + branchId: string | null + status: $Enums.OrderStatus + totalGoldWeightGrams: Decimal + wageWeightGrams: Decimal + flatRialCharge: Decimal + isSuspendedOverCreditLimit: boolean + deliveredAt: Date | null + createdAt: Date + updatedAt: Date + _count: OrderCountAggregateOutputType | null + _avg: OrderAvgAggregateOutputType | null + _sum: OrderSumAggregateOutputType | null + _min: OrderMinAggregateOutputType | null + _max: OrderMaxAggregateOutputType | null + } + + type GetOrderGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof OrderGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type OrderSelect = $Extensions.GetSelect<{ + id?: boolean + orderNumber?: boolean + customerId?: boolean + branchId?: boolean + status?: boolean + totalGoldWeightGrams?: boolean + wageWeightGrams?: boolean + flatRialCharge?: boolean + isSuspendedOverCreditLimit?: boolean + deliveredAt?: boolean + createdAt?: boolean + updatedAt?: boolean + customer?: boolean | CustomerDefaultArgs + branch?: boolean | Order$branchArgs + items?: boolean | Order$itemsArgs + statusEvents?: boolean | Order$statusEventsArgs + ledgerEntries?: boolean | Order$ledgerEntriesArgs + convertedFromPreOrder?: boolean | Order$convertedFromPreOrderArgs + _count?: boolean | OrderCountOutputTypeDefaultArgs + }, ExtArgs["result"]["order"]> + + export type OrderSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + orderNumber?: boolean + customerId?: boolean + branchId?: boolean + status?: boolean + totalGoldWeightGrams?: boolean + wageWeightGrams?: boolean + flatRialCharge?: boolean + isSuspendedOverCreditLimit?: boolean + deliveredAt?: boolean + createdAt?: boolean + updatedAt?: boolean + customer?: boolean | CustomerDefaultArgs + branch?: boolean | Order$branchArgs + }, ExtArgs["result"]["order"]> + + export type OrderSelectScalar = { + id?: boolean + orderNumber?: boolean + customerId?: boolean + branchId?: boolean + status?: boolean + totalGoldWeightGrams?: boolean + wageWeightGrams?: boolean + flatRialCharge?: boolean + isSuspendedOverCreditLimit?: boolean + deliveredAt?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type OrderInclude = { + customer?: boolean | CustomerDefaultArgs + branch?: boolean | Order$branchArgs + items?: boolean | Order$itemsArgs + statusEvents?: boolean | Order$statusEventsArgs + ledgerEntries?: boolean | Order$ledgerEntriesArgs + convertedFromPreOrder?: boolean | Order$convertedFromPreOrderArgs + _count?: boolean | OrderCountOutputTypeDefaultArgs + } + export type OrderIncludeCreateManyAndReturn = { + customer?: boolean | CustomerDefaultArgs + branch?: boolean | Order$branchArgs + } + + export type $OrderPayload = { + name: "Order" + objects: { + customer: Prisma.$CustomerPayload + branch: Prisma.$BranchPayload | null + items: Prisma.$OrderItemPayload[] + statusEvents: Prisma.$OrderStatusEventPayload[] + ledgerEntries: Prisma.$LedgerEntryPayload[] + convertedFromPreOrder: Prisma.$PreOrderPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + orderNumber: string + customerId: string + branchId: string | null + status: $Enums.OrderStatus + /** + * Total gold weight incl. wage across all items ("allGram" / order.w). + */ + totalGoldWeightGrams: Prisma.Decimal + /** + * Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum). + */ + wageWeightGrams: Prisma.Decimal + /** + * Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input. + */ + flatRialCharge: Prisma.Decimal + isSuspendedOverCreditLimit: boolean + deliveredAt: Date | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["order"]> + composites: {} + } + + type OrderGetPayload = $Result.GetResult + + type OrderCountArgs = + Omit & { + select?: OrderCountAggregateInputType | true + } + + export interface OrderDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Order'], meta: { name: 'Order' } } + /** + * Find zero or one Order that matches the filter. + * @param {OrderFindUniqueArgs} args - Arguments to find a Order + * @example + * // Get one Order + * const order = await prisma.order.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__OrderClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Order that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {OrderFindUniqueOrThrowArgs} args - Arguments to find a Order + * @example + * // Get one Order + * const order = await prisma.order.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__OrderClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Order 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 {OrderFindFirstArgs} args - Arguments to find a Order + * @example + * // Get one Order + * const order = await prisma.order.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__OrderClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Order 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 {OrderFindFirstOrThrowArgs} args - Arguments to find a Order + * @example + * // Get one Order + * const order = await prisma.order.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__OrderClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Orders 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 {OrderFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Orders + * const orders = await prisma.order.findMany() + * + * // Get first 10 Orders + * const orders = await prisma.order.findMany({ take: 10 }) + * + * // Only select the `id` + * const orderWithIdOnly = await prisma.order.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Order. + * @param {OrderCreateArgs} args - Arguments to create a Order. + * @example + * // Create one Order + * const Order = await prisma.order.create({ + * data: { + * // ... data to create a Order + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__OrderClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Orders. + * @param {OrderCreateManyArgs} args - Arguments to create many Orders. + * @example + * // Create many Orders + * const order = await prisma.order.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Orders and returns the data saved in the database. + * @param {OrderCreateManyAndReturnArgs} args - Arguments to create many Orders. + * @example + * // Create many Orders + * const order = await prisma.order.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Orders and only return the `id` + * const orderWithIdOnly = await prisma.order.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 Order. + * @param {OrderDeleteArgs} args - Arguments to delete one Order. + * @example + * // Delete one Order + * const Order = await prisma.order.delete({ + * where: { + * // ... filter to delete one Order + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__OrderClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Order. + * @param {OrderUpdateArgs} args - Arguments to update one Order. + * @example + * // Update one Order + * const order = await prisma.order.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__OrderClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Orders. + * @param {OrderDeleteManyArgs} args - Arguments to filter Orders to delete. + * @example + * // Delete a few Orders + * const { count } = await prisma.order.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Orders. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Orders + * const order = await prisma.order.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Order. + * @param {OrderUpsertArgs} args - Arguments to update or create a Order. + * @example + * // Update or create a Order + * const order = await prisma.order.upsert({ + * create: { + * // ... data to create a Order + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Order we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__OrderClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Orders. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderCountArgs} args - Arguments to filter Orders to count. + * @example + * // Count the number of Orders + * const count = await prisma.order.count({ + * where: { + * // ... the filter for the Orders 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 Order. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderAggregateArgs} 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 Order. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderGroupByArgs} 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 OrderGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: OrderGroupByArgs['orderBy'] } + : { orderBy?: OrderGroupByArgs['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 ? GetOrderGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Order model + */ + readonly fields: OrderFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Order. + * 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__OrderClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + branch = {}>(args?: Subset>): Prisma__BranchClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + items = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + statusEvents = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + ledgerEntries = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + convertedFromPreOrder = {}>(args?: Subset>): Prisma__PreOrderClient<$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 Order model + */ + interface OrderFieldRefs { + readonly id: FieldRef<"Order", 'String'> + readonly orderNumber: FieldRef<"Order", 'String'> + readonly customerId: FieldRef<"Order", 'String'> + readonly branchId: FieldRef<"Order", 'String'> + readonly status: FieldRef<"Order", 'OrderStatus'> + readonly totalGoldWeightGrams: FieldRef<"Order", 'Decimal'> + readonly wageWeightGrams: FieldRef<"Order", 'Decimal'> + readonly flatRialCharge: FieldRef<"Order", 'Decimal'> + readonly isSuspendedOverCreditLimit: FieldRef<"Order", 'Boolean'> + readonly deliveredAt: FieldRef<"Order", 'DateTime'> + readonly createdAt: FieldRef<"Order", 'DateTime'> + readonly updatedAt: FieldRef<"Order", 'DateTime'> + } + + + // Custom InputTypes + /** + * Order findUnique + */ + export type OrderFindUniqueArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + /** + * Filter, which Order to fetch. + */ + where: OrderWhereUniqueInput + } + + /** + * Order findUniqueOrThrow + */ + export type OrderFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + /** + * Filter, which Order to fetch. + */ + where: OrderWhereUniqueInput + } + + /** + * Order findFirst + */ + export type OrderFindFirstArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + /** + * Filter, which Order to fetch. + */ + where?: OrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Orders to fetch. + */ + orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Orders. + */ + cursor?: OrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Orders 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` Orders. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Orders. + */ + distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] + } + + /** + * Order findFirstOrThrow + */ + export type OrderFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + /** + * Filter, which Order to fetch. + */ + where?: OrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Orders to fetch. + */ + orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Orders. + */ + cursor?: OrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Orders 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` Orders. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Orders. + */ + distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] + } + + /** + * Order findMany + */ + export type OrderFindManyArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + /** + * Filter, which Orders to fetch. + */ + where?: OrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Orders to fetch. + */ + orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Orders. + */ + cursor?: OrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Orders 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` Orders. + */ + skip?: number + distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] + } + + /** + * Order create + */ + export type OrderCreateArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + /** + * The data needed to create a Order. + */ + data: XOR + } + + /** + * Order createMany + */ + export type OrderCreateManyArgs = { + /** + * The data used to create many Orders. + */ + data: OrderCreateManyInput | OrderCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Order createManyAndReturn + */ + export type OrderCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelectCreateManyAndReturn | null + /** + * The data used to create many Orders. + */ + data: OrderCreateManyInput | OrderCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderIncludeCreateManyAndReturn | null + } + + /** + * Order update + */ + export type OrderUpdateArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + /** + * The data needed to update a Order. + */ + data: XOR + /** + * Choose, which Order to update. + */ + where: OrderWhereUniqueInput + } + + /** + * Order updateMany + */ + export type OrderUpdateManyArgs = { + /** + * The data used to update Orders. + */ + data: XOR + /** + * Filter which Orders to update + */ + where?: OrderWhereInput + } + + /** + * Order upsert + */ + export type OrderUpsertArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + /** + * The filter to search for the Order to update in case it exists. + */ + where: OrderWhereUniqueInput + /** + * In case the Order found by the `where` argument doesn't exist, create a new Order with this data. + */ + create: XOR + /** + * In case the Order was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Order delete + */ + export type OrderDeleteArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + /** + * Filter which Order to delete. + */ + where: OrderWhereUniqueInput + } + + /** + * Order deleteMany + */ + export type OrderDeleteManyArgs = { + /** + * Filter which Orders to delete + */ + where?: OrderWhereInput + } + + /** + * Order.branch + */ + export type Order$branchArgs = { + /** + * Select specific fields to fetch from the Branch + */ + select?: BranchSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: BranchInclude | null + where?: BranchWhereInput + } + + /** + * Order.items + */ + export type Order$itemsArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + where?: OrderItemWhereInput + orderBy?: OrderItemOrderByWithRelationInput | OrderItemOrderByWithRelationInput[] + cursor?: OrderItemWhereUniqueInput + take?: number + skip?: number + distinct?: OrderItemScalarFieldEnum | OrderItemScalarFieldEnum[] + } + + /** + * Order.statusEvents + */ + export type Order$statusEventsArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + where?: OrderStatusEventWhereInput + orderBy?: OrderStatusEventOrderByWithRelationInput | OrderStatusEventOrderByWithRelationInput[] + cursor?: OrderStatusEventWhereUniqueInput + take?: number + skip?: number + distinct?: OrderStatusEventScalarFieldEnum | OrderStatusEventScalarFieldEnum[] + } + + /** + * Order.ledgerEntries + */ + export type Order$ledgerEntriesArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + where?: LedgerEntryWhereInput + orderBy?: LedgerEntryOrderByWithRelationInput | LedgerEntryOrderByWithRelationInput[] + cursor?: LedgerEntryWhereUniqueInput + take?: number + skip?: number + distinct?: LedgerEntryScalarFieldEnum | LedgerEntryScalarFieldEnum[] + } + + /** + * Order.convertedFromPreOrder + */ + export type Order$convertedFromPreOrderArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + where?: PreOrderWhereInput + } + + /** + * Order without action + */ + export type OrderDefaultArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + } + + + /** + * Model OrderItem + */ + + export type AggregateOrderItem = { + _count: OrderItemCountAggregateOutputType | null + _avg: OrderItemAvgAggregateOutputType | null + _sum: OrderItemSumAggregateOutputType | null + _min: OrderItemMinAggregateOutputType | null + _max: OrderItemMaxAggregateOutputType | null + } + + export type OrderItemAvgAggregateOutputType = { + quantity: number | null + rashWeightGramsSnapshot: Decimal | null + wagePercentSnapshot: Decimal | null + discountPercentSnapshot: Decimal | null + computedWeightGrams: Decimal | null + flatRialCharge: Decimal | null + } + + export type OrderItemSumAggregateOutputType = { + quantity: number | null + rashWeightGramsSnapshot: Decimal | null + wagePercentSnapshot: Decimal | null + discountPercentSnapshot: Decimal | null + computedWeightGrams: Decimal | null + flatRialCharge: Decimal | null + } + + export type OrderItemMinAggregateOutputType = { + id: string | null + orderId: string | null + productVariantId: string | null + quantity: number | null + rashWeightGramsSnapshot: Decimal | null + wagePercentSnapshot: Decimal | null + discountPercentSnapshot: Decimal | null + computedWeightGrams: Decimal | null + flatRialCharge: Decimal | null + } + + export type OrderItemMaxAggregateOutputType = { + id: string | null + orderId: string | null + productVariantId: string | null + quantity: number | null + rashWeightGramsSnapshot: Decimal | null + wagePercentSnapshot: Decimal | null + discountPercentSnapshot: Decimal | null + computedWeightGrams: Decimal | null + flatRialCharge: Decimal | null + } + + export type OrderItemCountAggregateOutputType = { + id: number + orderId: number + productVariantId: number + quantity: number + rashWeightGramsSnapshot: number + wagePercentSnapshot: number + discountPercentSnapshot: number + computedWeightGrams: number + flatRialCharge: number + _all: number + } + + + export type OrderItemAvgAggregateInputType = { + quantity?: true + rashWeightGramsSnapshot?: true + wagePercentSnapshot?: true + discountPercentSnapshot?: true + computedWeightGrams?: true + flatRialCharge?: true + } + + export type OrderItemSumAggregateInputType = { + quantity?: true + rashWeightGramsSnapshot?: true + wagePercentSnapshot?: true + discountPercentSnapshot?: true + computedWeightGrams?: true + flatRialCharge?: true + } + + export type OrderItemMinAggregateInputType = { + id?: true + orderId?: true + productVariantId?: true + quantity?: true + rashWeightGramsSnapshot?: true + wagePercentSnapshot?: true + discountPercentSnapshot?: true + computedWeightGrams?: true + flatRialCharge?: true + } + + export type OrderItemMaxAggregateInputType = { + id?: true + orderId?: true + productVariantId?: true + quantity?: true + rashWeightGramsSnapshot?: true + wagePercentSnapshot?: true + discountPercentSnapshot?: true + computedWeightGrams?: true + flatRialCharge?: true + } + + export type OrderItemCountAggregateInputType = { + id?: true + orderId?: true + productVariantId?: true + quantity?: true + rashWeightGramsSnapshot?: true + wagePercentSnapshot?: true + discountPercentSnapshot?: true + computedWeightGrams?: true + flatRialCharge?: true + _all?: true + } + + export type OrderItemAggregateArgs = { + /** + * Filter which OrderItem to aggregate. + */ + where?: OrderItemWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OrderItems to fetch. + */ + orderBy?: OrderItemOrderByWithRelationInput | OrderItemOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: OrderItemWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OrderItems 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` OrderItems. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned OrderItems + **/ + _count?: true | OrderItemCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: OrderItemAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: OrderItemSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: OrderItemMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: OrderItemMaxAggregateInputType + } + + export type GetOrderItemAggregateType = { + [P in keyof T & keyof AggregateOrderItem]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type OrderItemGroupByArgs = { + where?: OrderItemWhereInput + orderBy?: OrderItemOrderByWithAggregationInput | OrderItemOrderByWithAggregationInput[] + by: OrderItemScalarFieldEnum[] | OrderItemScalarFieldEnum + having?: OrderItemScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: OrderItemCountAggregateInputType | true + _avg?: OrderItemAvgAggregateInputType + _sum?: OrderItemSumAggregateInputType + _min?: OrderItemMinAggregateInputType + _max?: OrderItemMaxAggregateInputType + } + + export type OrderItemGroupByOutputType = { + id: string + orderId: string + productVariantId: string + quantity: number + rashWeightGramsSnapshot: Decimal + wagePercentSnapshot: Decimal + discountPercentSnapshot: Decimal + computedWeightGrams: Decimal + flatRialCharge: Decimal + _count: OrderItemCountAggregateOutputType | null + _avg: OrderItemAvgAggregateOutputType | null + _sum: OrderItemSumAggregateOutputType | null + _min: OrderItemMinAggregateOutputType | null + _max: OrderItemMaxAggregateOutputType | null + } + + type GetOrderItemGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof OrderItemGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type OrderItemSelect = $Extensions.GetSelect<{ + id?: boolean + orderId?: boolean + productVariantId?: boolean + quantity?: boolean + rashWeightGramsSnapshot?: boolean + wagePercentSnapshot?: boolean + discountPercentSnapshot?: boolean + computedWeightGrams?: boolean + flatRialCharge?: boolean + order?: boolean | OrderDefaultArgs + productVariant?: boolean | ProductVariantDefaultArgs + }, ExtArgs["result"]["orderItem"]> + + export type OrderItemSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + orderId?: boolean + productVariantId?: boolean + quantity?: boolean + rashWeightGramsSnapshot?: boolean + wagePercentSnapshot?: boolean + discountPercentSnapshot?: boolean + computedWeightGrams?: boolean + flatRialCharge?: boolean + order?: boolean | OrderDefaultArgs + productVariant?: boolean | ProductVariantDefaultArgs + }, ExtArgs["result"]["orderItem"]> + + export type OrderItemSelectScalar = { + id?: boolean + orderId?: boolean + productVariantId?: boolean + quantity?: boolean + rashWeightGramsSnapshot?: boolean + wagePercentSnapshot?: boolean + discountPercentSnapshot?: boolean + computedWeightGrams?: boolean + flatRialCharge?: boolean + } + + export type OrderItemInclude = { + order?: boolean | OrderDefaultArgs + productVariant?: boolean | ProductVariantDefaultArgs + } + export type OrderItemIncludeCreateManyAndReturn = { + order?: boolean | OrderDefaultArgs + productVariant?: boolean | ProductVariantDefaultArgs + } + + export type $OrderItemPayload = { + name: "OrderItem" + objects: { + order: Prisma.$OrderPayload + productVariant: Prisma.$ProductVariantPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + orderId: string + productVariantId: string + quantity: number + rashWeightGramsSnapshot: Prisma.Decimal + wagePercentSnapshot: Prisma.Decimal + discountPercentSnapshot: Prisma.Decimal + /** + * computed: rash*(1 + (wagePercent-discount)/100) + */ + computedWeightGrams: Prisma.Decimal + flatRialCharge: Prisma.Decimal + }, ExtArgs["result"]["orderItem"]> + composites: {} + } + + type OrderItemGetPayload = $Result.GetResult + + type OrderItemCountArgs = + Omit & { + select?: OrderItemCountAggregateInputType | true + } + + export interface OrderItemDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['OrderItem'], meta: { name: 'OrderItem' } } + /** + * Find zero or one OrderItem that matches the filter. + * @param {OrderItemFindUniqueArgs} args - Arguments to find a OrderItem + * @example + * // Get one OrderItem + * const orderItem = await prisma.orderItem.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__OrderItemClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one OrderItem that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {OrderItemFindUniqueOrThrowArgs} args - Arguments to find a OrderItem + * @example + * // Get one OrderItem + * const orderItem = await prisma.orderItem.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__OrderItemClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first OrderItem 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 {OrderItemFindFirstArgs} args - Arguments to find a OrderItem + * @example + * // Get one OrderItem + * const orderItem = await prisma.orderItem.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__OrderItemClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first OrderItem 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 {OrderItemFindFirstOrThrowArgs} args - Arguments to find a OrderItem + * @example + * // Get one OrderItem + * const orderItem = await prisma.orderItem.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__OrderItemClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more OrderItems 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 {OrderItemFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all OrderItems + * const orderItems = await prisma.orderItem.findMany() + * + * // Get first 10 OrderItems + * const orderItems = await prisma.orderItem.findMany({ take: 10 }) + * + * // Only select the `id` + * const orderItemWithIdOnly = await prisma.orderItem.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a OrderItem. + * @param {OrderItemCreateArgs} args - Arguments to create a OrderItem. + * @example + * // Create one OrderItem + * const OrderItem = await prisma.orderItem.create({ + * data: { + * // ... data to create a OrderItem + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__OrderItemClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many OrderItems. + * @param {OrderItemCreateManyArgs} args - Arguments to create many OrderItems. + * @example + * // Create many OrderItems + * const orderItem = await prisma.orderItem.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many OrderItems and returns the data saved in the database. + * @param {OrderItemCreateManyAndReturnArgs} args - Arguments to create many OrderItems. + * @example + * // Create many OrderItems + * const orderItem = await prisma.orderItem.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many OrderItems and only return the `id` + * const orderItemWithIdOnly = await prisma.orderItem.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 OrderItem. + * @param {OrderItemDeleteArgs} args - Arguments to delete one OrderItem. + * @example + * // Delete one OrderItem + * const OrderItem = await prisma.orderItem.delete({ + * where: { + * // ... filter to delete one OrderItem + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__OrderItemClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one OrderItem. + * @param {OrderItemUpdateArgs} args - Arguments to update one OrderItem. + * @example + * // Update one OrderItem + * const orderItem = await prisma.orderItem.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__OrderItemClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more OrderItems. + * @param {OrderItemDeleteManyArgs} args - Arguments to filter OrderItems to delete. + * @example + * // Delete a few OrderItems + * const { count } = await prisma.orderItem.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more OrderItems. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderItemUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many OrderItems + * const orderItem = await prisma.orderItem.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one OrderItem. + * @param {OrderItemUpsertArgs} args - Arguments to update or create a OrderItem. + * @example + * // Update or create a OrderItem + * const orderItem = await prisma.orderItem.upsert({ + * create: { + * // ... data to create a OrderItem + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the OrderItem we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__OrderItemClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of OrderItems. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderItemCountArgs} args - Arguments to filter OrderItems to count. + * @example + * // Count the number of OrderItems + * const count = await prisma.orderItem.count({ + * where: { + * // ... the filter for the OrderItems 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 OrderItem. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderItemAggregateArgs} 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 OrderItem. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderItemGroupByArgs} 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 OrderItemGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: OrderItemGroupByArgs['orderBy'] } + : { orderBy?: OrderItemGroupByArgs['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 ? GetOrderItemGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the OrderItem model + */ + readonly fields: OrderItemFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for OrderItem. + * 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__OrderItemClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + order = {}>(args?: Subset>): Prisma__OrderClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + productVariant = {}>(args?: Subset>): Prisma__ProductVariantClient<$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 OrderItem model + */ + interface OrderItemFieldRefs { + readonly id: FieldRef<"OrderItem", 'String'> + readonly orderId: FieldRef<"OrderItem", 'String'> + readonly productVariantId: FieldRef<"OrderItem", 'String'> + readonly quantity: FieldRef<"OrderItem", 'Int'> + readonly rashWeightGramsSnapshot: FieldRef<"OrderItem", 'Decimal'> + readonly wagePercentSnapshot: FieldRef<"OrderItem", 'Decimal'> + readonly discountPercentSnapshot: FieldRef<"OrderItem", 'Decimal'> + readonly computedWeightGrams: FieldRef<"OrderItem", 'Decimal'> + readonly flatRialCharge: FieldRef<"OrderItem", 'Decimal'> + } + + + // Custom InputTypes + /** + * OrderItem findUnique + */ + export type OrderItemFindUniqueArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + /** + * Filter, which OrderItem to fetch. + */ + where: OrderItemWhereUniqueInput + } + + /** + * OrderItem findUniqueOrThrow + */ + export type OrderItemFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + /** + * Filter, which OrderItem to fetch. + */ + where: OrderItemWhereUniqueInput + } + + /** + * OrderItem findFirst + */ + export type OrderItemFindFirstArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + /** + * Filter, which OrderItem to fetch. + */ + where?: OrderItemWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OrderItems to fetch. + */ + orderBy?: OrderItemOrderByWithRelationInput | OrderItemOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for OrderItems. + */ + cursor?: OrderItemWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OrderItems 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` OrderItems. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of OrderItems. + */ + distinct?: OrderItemScalarFieldEnum | OrderItemScalarFieldEnum[] + } + + /** + * OrderItem findFirstOrThrow + */ + export type OrderItemFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + /** + * Filter, which OrderItem to fetch. + */ + where?: OrderItemWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OrderItems to fetch. + */ + orderBy?: OrderItemOrderByWithRelationInput | OrderItemOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for OrderItems. + */ + cursor?: OrderItemWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OrderItems 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` OrderItems. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of OrderItems. + */ + distinct?: OrderItemScalarFieldEnum | OrderItemScalarFieldEnum[] + } + + /** + * OrderItem findMany + */ + export type OrderItemFindManyArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + /** + * Filter, which OrderItems to fetch. + */ + where?: OrderItemWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OrderItems to fetch. + */ + orderBy?: OrderItemOrderByWithRelationInput | OrderItemOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing OrderItems. + */ + cursor?: OrderItemWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OrderItems 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` OrderItems. + */ + skip?: number + distinct?: OrderItemScalarFieldEnum | OrderItemScalarFieldEnum[] + } + + /** + * OrderItem create + */ + export type OrderItemCreateArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + /** + * The data needed to create a OrderItem. + */ + data: XOR + } + + /** + * OrderItem createMany + */ + export type OrderItemCreateManyArgs = { + /** + * The data used to create many OrderItems. + */ + data: OrderItemCreateManyInput | OrderItemCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * OrderItem createManyAndReturn + */ + export type OrderItemCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelectCreateManyAndReturn | null + /** + * The data used to create many OrderItems. + */ + data: OrderItemCreateManyInput | OrderItemCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemIncludeCreateManyAndReturn | null + } + + /** + * OrderItem update + */ + export type OrderItemUpdateArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + /** + * The data needed to update a OrderItem. + */ + data: XOR + /** + * Choose, which OrderItem to update. + */ + where: OrderItemWhereUniqueInput + } + + /** + * OrderItem updateMany + */ + export type OrderItemUpdateManyArgs = { + /** + * The data used to update OrderItems. + */ + data: XOR + /** + * Filter which OrderItems to update + */ + where?: OrderItemWhereInput + } + + /** + * OrderItem upsert + */ + export type OrderItemUpsertArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + /** + * The filter to search for the OrderItem to update in case it exists. + */ + where: OrderItemWhereUniqueInput + /** + * In case the OrderItem found by the `where` argument doesn't exist, create a new OrderItem with this data. + */ + create: XOR + /** + * In case the OrderItem was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * OrderItem delete + */ + export type OrderItemDeleteArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + /** + * Filter which OrderItem to delete. + */ + where: OrderItemWhereUniqueInput + } + + /** + * OrderItem deleteMany + */ + export type OrderItemDeleteManyArgs = { + /** + * Filter which OrderItems to delete + */ + where?: OrderItemWhereInput + } + + /** + * OrderItem without action + */ + export type OrderItemDefaultArgs = { + /** + * Select specific fields to fetch from the OrderItem + */ + select?: OrderItemSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderItemInclude | null + } + + + /** + * Model OrderStatusEvent + */ + + export type AggregateOrderStatusEvent = { + _count: OrderStatusEventCountAggregateOutputType | null + _min: OrderStatusEventMinAggregateOutputType | null + _max: OrderStatusEventMaxAggregateOutputType | null + } + + export type OrderStatusEventMinAggregateOutputType = { + id: string | null + orderId: string | null + fromStatus: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus | null + note: string | null + actorAdminUserId: string | null + createdAt: Date | null + } + + export type OrderStatusEventMaxAggregateOutputType = { + id: string | null + orderId: string | null + fromStatus: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus | null + note: string | null + actorAdminUserId: string | null + createdAt: Date | null + } + + export type OrderStatusEventCountAggregateOutputType = { + id: number + orderId: number + fromStatus: number + toStatus: number + note: number + actorAdminUserId: number + createdAt: number + _all: number + } + + + export type OrderStatusEventMinAggregateInputType = { + id?: true + orderId?: true + fromStatus?: true + toStatus?: true + note?: true + actorAdminUserId?: true + createdAt?: true + } + + export type OrderStatusEventMaxAggregateInputType = { + id?: true + orderId?: true + fromStatus?: true + toStatus?: true + note?: true + actorAdminUserId?: true + createdAt?: true + } + + export type OrderStatusEventCountAggregateInputType = { + id?: true + orderId?: true + fromStatus?: true + toStatus?: true + note?: true + actorAdminUserId?: true + createdAt?: true + _all?: true + } + + export type OrderStatusEventAggregateArgs = { + /** + * Filter which OrderStatusEvent to aggregate. + */ + where?: OrderStatusEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OrderStatusEvents to fetch. + */ + orderBy?: OrderStatusEventOrderByWithRelationInput | OrderStatusEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: OrderStatusEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OrderStatusEvents 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` OrderStatusEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned OrderStatusEvents + **/ + _count?: true | OrderStatusEventCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: OrderStatusEventMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: OrderStatusEventMaxAggregateInputType + } + + export type GetOrderStatusEventAggregateType = { + [P in keyof T & keyof AggregateOrderStatusEvent]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type OrderStatusEventGroupByArgs = { + where?: OrderStatusEventWhereInput + orderBy?: OrderStatusEventOrderByWithAggregationInput | OrderStatusEventOrderByWithAggregationInput[] + by: OrderStatusEventScalarFieldEnum[] | OrderStatusEventScalarFieldEnum + having?: OrderStatusEventScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: OrderStatusEventCountAggregateInputType | true + _min?: OrderStatusEventMinAggregateInputType + _max?: OrderStatusEventMaxAggregateInputType + } + + export type OrderStatusEventGroupByOutputType = { + id: string + orderId: string + fromStatus: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note: string | null + actorAdminUserId: string | null + createdAt: Date + _count: OrderStatusEventCountAggregateOutputType | null + _min: OrderStatusEventMinAggregateOutputType | null + _max: OrderStatusEventMaxAggregateOutputType | null + } + + type GetOrderStatusEventGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof OrderStatusEventGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type OrderStatusEventSelect = $Extensions.GetSelect<{ + id?: boolean + orderId?: boolean + fromStatus?: boolean + toStatus?: boolean + note?: boolean + actorAdminUserId?: boolean + createdAt?: boolean + order?: boolean | OrderDefaultArgs + actorAdminUser?: boolean | OrderStatusEvent$actorAdminUserArgs + }, ExtArgs["result"]["orderStatusEvent"]> + + export type OrderStatusEventSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + orderId?: boolean + fromStatus?: boolean + toStatus?: boolean + note?: boolean + actorAdminUserId?: boolean + createdAt?: boolean + order?: boolean | OrderDefaultArgs + actorAdminUser?: boolean | OrderStatusEvent$actorAdminUserArgs + }, ExtArgs["result"]["orderStatusEvent"]> + + export type OrderStatusEventSelectScalar = { + id?: boolean + orderId?: boolean + fromStatus?: boolean + toStatus?: boolean + note?: boolean + actorAdminUserId?: boolean + createdAt?: boolean + } + + export type OrderStatusEventInclude = { + order?: boolean | OrderDefaultArgs + actorAdminUser?: boolean | OrderStatusEvent$actorAdminUserArgs + } + export type OrderStatusEventIncludeCreateManyAndReturn = { + order?: boolean | OrderDefaultArgs + actorAdminUser?: boolean | OrderStatusEvent$actorAdminUserArgs + } + + export type $OrderStatusEventPayload = { + name: "OrderStatusEvent" + objects: { + order: Prisma.$OrderPayload + actorAdminUser: Prisma.$AdminUserPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + orderId: string + fromStatus: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note: string | null + actorAdminUserId: string | null + createdAt: Date + }, ExtArgs["result"]["orderStatusEvent"]> + composites: {} + } + + type OrderStatusEventGetPayload = $Result.GetResult + + type OrderStatusEventCountArgs = + Omit & { + select?: OrderStatusEventCountAggregateInputType | true + } + + export interface OrderStatusEventDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['OrderStatusEvent'], meta: { name: 'OrderStatusEvent' } } + /** + * Find zero or one OrderStatusEvent that matches the filter. + * @param {OrderStatusEventFindUniqueArgs} args - Arguments to find a OrderStatusEvent + * @example + * // Get one OrderStatusEvent + * const orderStatusEvent = await prisma.orderStatusEvent.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__OrderStatusEventClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one OrderStatusEvent that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {OrderStatusEventFindUniqueOrThrowArgs} args - Arguments to find a OrderStatusEvent + * @example + * // Get one OrderStatusEvent + * const orderStatusEvent = await prisma.orderStatusEvent.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__OrderStatusEventClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first OrderStatusEvent 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 {OrderStatusEventFindFirstArgs} args - Arguments to find a OrderStatusEvent + * @example + * // Get one OrderStatusEvent + * const orderStatusEvent = await prisma.orderStatusEvent.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__OrderStatusEventClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first OrderStatusEvent 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 {OrderStatusEventFindFirstOrThrowArgs} args - Arguments to find a OrderStatusEvent + * @example + * // Get one OrderStatusEvent + * const orderStatusEvent = await prisma.orderStatusEvent.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__OrderStatusEventClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more OrderStatusEvents 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 {OrderStatusEventFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all OrderStatusEvents + * const orderStatusEvents = await prisma.orderStatusEvent.findMany() + * + * // Get first 10 OrderStatusEvents + * const orderStatusEvents = await prisma.orderStatusEvent.findMany({ take: 10 }) + * + * // Only select the `id` + * const orderStatusEventWithIdOnly = await prisma.orderStatusEvent.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a OrderStatusEvent. + * @param {OrderStatusEventCreateArgs} args - Arguments to create a OrderStatusEvent. + * @example + * // Create one OrderStatusEvent + * const OrderStatusEvent = await prisma.orderStatusEvent.create({ + * data: { + * // ... data to create a OrderStatusEvent + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__OrderStatusEventClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many OrderStatusEvents. + * @param {OrderStatusEventCreateManyArgs} args - Arguments to create many OrderStatusEvents. + * @example + * // Create many OrderStatusEvents + * const orderStatusEvent = await prisma.orderStatusEvent.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many OrderStatusEvents and returns the data saved in the database. + * @param {OrderStatusEventCreateManyAndReturnArgs} args - Arguments to create many OrderStatusEvents. + * @example + * // Create many OrderStatusEvents + * const orderStatusEvent = await prisma.orderStatusEvent.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many OrderStatusEvents and only return the `id` + * const orderStatusEventWithIdOnly = await prisma.orderStatusEvent.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 OrderStatusEvent. + * @param {OrderStatusEventDeleteArgs} args - Arguments to delete one OrderStatusEvent. + * @example + * // Delete one OrderStatusEvent + * const OrderStatusEvent = await prisma.orderStatusEvent.delete({ + * where: { + * // ... filter to delete one OrderStatusEvent + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__OrderStatusEventClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one OrderStatusEvent. + * @param {OrderStatusEventUpdateArgs} args - Arguments to update one OrderStatusEvent. + * @example + * // Update one OrderStatusEvent + * const orderStatusEvent = await prisma.orderStatusEvent.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__OrderStatusEventClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more OrderStatusEvents. + * @param {OrderStatusEventDeleteManyArgs} args - Arguments to filter OrderStatusEvents to delete. + * @example + * // Delete a few OrderStatusEvents + * const { count } = await prisma.orderStatusEvent.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more OrderStatusEvents. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderStatusEventUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many OrderStatusEvents + * const orderStatusEvent = await prisma.orderStatusEvent.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one OrderStatusEvent. + * @param {OrderStatusEventUpsertArgs} args - Arguments to update or create a OrderStatusEvent. + * @example + * // Update or create a OrderStatusEvent + * const orderStatusEvent = await prisma.orderStatusEvent.upsert({ + * create: { + * // ... data to create a OrderStatusEvent + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the OrderStatusEvent we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__OrderStatusEventClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of OrderStatusEvents. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderStatusEventCountArgs} args - Arguments to filter OrderStatusEvents to count. + * @example + * // Count the number of OrderStatusEvents + * const count = await prisma.orderStatusEvent.count({ + * where: { + * // ... the filter for the OrderStatusEvents 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 OrderStatusEvent. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderStatusEventAggregateArgs} 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 OrderStatusEvent. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OrderStatusEventGroupByArgs} 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 OrderStatusEventGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: OrderStatusEventGroupByArgs['orderBy'] } + : { orderBy?: OrderStatusEventGroupByArgs['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 ? GetOrderStatusEventGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the OrderStatusEvent model + */ + readonly fields: OrderStatusEventFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for OrderStatusEvent. + * 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__OrderStatusEventClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + order = {}>(args?: Subset>): Prisma__OrderClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + actorAdminUser = {}>(args?: Subset>): Prisma__AdminUserClient<$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 OrderStatusEvent model + */ + interface OrderStatusEventFieldRefs { + readonly id: FieldRef<"OrderStatusEvent", 'String'> + readonly orderId: FieldRef<"OrderStatusEvent", 'String'> + readonly fromStatus: FieldRef<"OrderStatusEvent", 'OrderStatus'> + readonly toStatus: FieldRef<"OrderStatusEvent", 'OrderStatus'> + readonly note: FieldRef<"OrderStatusEvent", 'String'> + readonly actorAdminUserId: FieldRef<"OrderStatusEvent", 'String'> + readonly createdAt: FieldRef<"OrderStatusEvent", 'DateTime'> + } + + + // Custom InputTypes + /** + * OrderStatusEvent findUnique + */ + export type OrderStatusEventFindUniqueArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + /** + * Filter, which OrderStatusEvent to fetch. + */ + where: OrderStatusEventWhereUniqueInput + } + + /** + * OrderStatusEvent findUniqueOrThrow + */ + export type OrderStatusEventFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + /** + * Filter, which OrderStatusEvent to fetch. + */ + where: OrderStatusEventWhereUniqueInput + } + + /** + * OrderStatusEvent findFirst + */ + export type OrderStatusEventFindFirstArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + /** + * Filter, which OrderStatusEvent to fetch. + */ + where?: OrderStatusEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OrderStatusEvents to fetch. + */ + orderBy?: OrderStatusEventOrderByWithRelationInput | OrderStatusEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for OrderStatusEvents. + */ + cursor?: OrderStatusEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OrderStatusEvents 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` OrderStatusEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of OrderStatusEvents. + */ + distinct?: OrderStatusEventScalarFieldEnum | OrderStatusEventScalarFieldEnum[] + } + + /** + * OrderStatusEvent findFirstOrThrow + */ + export type OrderStatusEventFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + /** + * Filter, which OrderStatusEvent to fetch. + */ + where?: OrderStatusEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OrderStatusEvents to fetch. + */ + orderBy?: OrderStatusEventOrderByWithRelationInput | OrderStatusEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for OrderStatusEvents. + */ + cursor?: OrderStatusEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OrderStatusEvents 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` OrderStatusEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of OrderStatusEvents. + */ + distinct?: OrderStatusEventScalarFieldEnum | OrderStatusEventScalarFieldEnum[] + } + + /** + * OrderStatusEvent findMany + */ + export type OrderStatusEventFindManyArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + /** + * Filter, which OrderStatusEvents to fetch. + */ + where?: OrderStatusEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OrderStatusEvents to fetch. + */ + orderBy?: OrderStatusEventOrderByWithRelationInput | OrderStatusEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing OrderStatusEvents. + */ + cursor?: OrderStatusEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OrderStatusEvents 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` OrderStatusEvents. + */ + skip?: number + distinct?: OrderStatusEventScalarFieldEnum | OrderStatusEventScalarFieldEnum[] + } + + /** + * OrderStatusEvent create + */ + export type OrderStatusEventCreateArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + /** + * The data needed to create a OrderStatusEvent. + */ + data: XOR + } + + /** + * OrderStatusEvent createMany + */ + export type OrderStatusEventCreateManyArgs = { + /** + * The data used to create many OrderStatusEvents. + */ + data: OrderStatusEventCreateManyInput | OrderStatusEventCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * OrderStatusEvent createManyAndReturn + */ + export type OrderStatusEventCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelectCreateManyAndReturn | null + /** + * The data used to create many OrderStatusEvents. + */ + data: OrderStatusEventCreateManyInput | OrderStatusEventCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventIncludeCreateManyAndReturn | null + } + + /** + * OrderStatusEvent update + */ + export type OrderStatusEventUpdateArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + /** + * The data needed to update a OrderStatusEvent. + */ + data: XOR + /** + * Choose, which OrderStatusEvent to update. + */ + where: OrderStatusEventWhereUniqueInput + } + + /** + * OrderStatusEvent updateMany + */ + export type OrderStatusEventUpdateManyArgs = { + /** + * The data used to update OrderStatusEvents. + */ + data: XOR + /** + * Filter which OrderStatusEvents to update + */ + where?: OrderStatusEventWhereInput + } + + /** + * OrderStatusEvent upsert + */ + export type OrderStatusEventUpsertArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + /** + * The filter to search for the OrderStatusEvent to update in case it exists. + */ + where: OrderStatusEventWhereUniqueInput + /** + * In case the OrderStatusEvent found by the `where` argument doesn't exist, create a new OrderStatusEvent with this data. + */ + create: XOR + /** + * In case the OrderStatusEvent was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * OrderStatusEvent delete + */ + export type OrderStatusEventDeleteArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + /** + * Filter which OrderStatusEvent to delete. + */ + where: OrderStatusEventWhereUniqueInput + } + + /** + * OrderStatusEvent deleteMany + */ + export type OrderStatusEventDeleteManyArgs = { + /** + * Filter which OrderStatusEvents to delete + */ + where?: OrderStatusEventWhereInput + } + + /** + * OrderStatusEvent.actorAdminUser + */ + export type OrderStatusEvent$actorAdminUserArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + where?: AdminUserWhereInput + } + + /** + * OrderStatusEvent without action + */ + export type OrderStatusEventDefaultArgs = { + /** + * Select specific fields to fetch from the OrderStatusEvent + */ + select?: OrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderStatusEventInclude | null + } + + + /** + * Model PreOrder + */ + + export type AggregatePreOrder = { + _count: PreOrderCountAggregateOutputType | null + _avg: PreOrderAvgAggregateOutputType | null + _sum: PreOrderSumAggregateOutputType | null + _min: PreOrderMinAggregateOutputType | null + _max: PreOrderMaxAggregateOutputType | null + } + + export type PreOrderAvgAggregateOutputType = { + estimatedWeightGrams: Decimal | null + estimatedPriceRial: Decimal | null + } + + export type PreOrderSumAggregateOutputType = { + estimatedWeightGrams: Decimal | null + estimatedPriceRial: Decimal | null + } + + export type PreOrderMinAggregateOutputType = { + id: string | null + customerId: string | null + cityId: string | null + workshopId: string | null + status: $Enums.PreOrderStatus | null + designImageUrl: string | null + colorName: string | null + sizeSpec: string | null + stoneColor: string | null + minaColor: string | null + estimatedWeightGrams: Decimal | null + estimatedPriceRial: Decimal | null + description: string | null + convertedOrderId: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type PreOrderMaxAggregateOutputType = { + id: string | null + customerId: string | null + cityId: string | null + workshopId: string | null + status: $Enums.PreOrderStatus | null + designImageUrl: string | null + colorName: string | null + sizeSpec: string | null + stoneColor: string | null + minaColor: string | null + estimatedWeightGrams: Decimal | null + estimatedPriceRial: Decimal | null + description: string | null + convertedOrderId: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type PreOrderCountAggregateOutputType = { + id: number + customerId: number + cityId: number + workshopId: number + status: number + designImageUrl: number + colorName: number + sizeSpec: number + stoneColor: number + minaColor: number + estimatedWeightGrams: number + estimatedPriceRial: number + description: number + convertedOrderId: number + createdAt: number + updatedAt: number + _all: number + } + + + export type PreOrderAvgAggregateInputType = { + estimatedWeightGrams?: true + estimatedPriceRial?: true + } + + export type PreOrderSumAggregateInputType = { + estimatedWeightGrams?: true + estimatedPriceRial?: true + } + + export type PreOrderMinAggregateInputType = { + id?: true + customerId?: true + cityId?: true + workshopId?: true + status?: true + designImageUrl?: true + colorName?: true + sizeSpec?: true + stoneColor?: true + minaColor?: true + estimatedWeightGrams?: true + estimatedPriceRial?: true + description?: true + convertedOrderId?: true + createdAt?: true + updatedAt?: true + } + + export type PreOrderMaxAggregateInputType = { + id?: true + customerId?: true + cityId?: true + workshopId?: true + status?: true + designImageUrl?: true + colorName?: true + sizeSpec?: true + stoneColor?: true + minaColor?: true + estimatedWeightGrams?: true + estimatedPriceRial?: true + description?: true + convertedOrderId?: true + createdAt?: true + updatedAt?: true + } + + export type PreOrderCountAggregateInputType = { + id?: true + customerId?: true + cityId?: true + workshopId?: true + status?: true + designImageUrl?: true + colorName?: true + sizeSpec?: true + stoneColor?: true + minaColor?: true + estimatedWeightGrams?: true + estimatedPriceRial?: true + description?: true + convertedOrderId?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type PreOrderAggregateArgs = { + /** + * Filter which PreOrder to aggregate. + */ + where?: PreOrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PreOrders to fetch. + */ + orderBy?: PreOrderOrderByWithRelationInput | PreOrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PreOrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PreOrders 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` PreOrders. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned PreOrders + **/ + _count?: true | PreOrderCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PreOrderAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PreOrderSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PreOrderMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PreOrderMaxAggregateInputType + } + + export type GetPreOrderAggregateType = { + [P in keyof T & keyof AggregatePreOrder]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PreOrderGroupByArgs = { + where?: PreOrderWhereInput + orderBy?: PreOrderOrderByWithAggregationInput | PreOrderOrderByWithAggregationInput[] + by: PreOrderScalarFieldEnum[] | PreOrderScalarFieldEnum + having?: PreOrderScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PreOrderCountAggregateInputType | true + _avg?: PreOrderAvgAggregateInputType + _sum?: PreOrderSumAggregateInputType + _min?: PreOrderMinAggregateInputType + _max?: PreOrderMaxAggregateInputType + } + + export type PreOrderGroupByOutputType = { + id: string + customerId: string + cityId: string | null + workshopId: string | null + status: $Enums.PreOrderStatus + designImageUrl: string | null + colorName: string | null + sizeSpec: string | null + stoneColor: string | null + minaColor: string | null + estimatedWeightGrams: Decimal | null + estimatedPriceRial: Decimal | null + description: string | null + convertedOrderId: string | null + createdAt: Date + updatedAt: Date + _count: PreOrderCountAggregateOutputType | null + _avg: PreOrderAvgAggregateOutputType | null + _sum: PreOrderSumAggregateOutputType | null + _min: PreOrderMinAggregateOutputType | null + _max: PreOrderMaxAggregateOutputType | null + } + + type GetPreOrderGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PreOrderGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PreOrderSelect = $Extensions.GetSelect<{ + id?: boolean + customerId?: boolean + cityId?: boolean + workshopId?: boolean + status?: boolean + designImageUrl?: boolean + colorName?: boolean + sizeSpec?: boolean + stoneColor?: boolean + minaColor?: boolean + estimatedWeightGrams?: boolean + estimatedPriceRial?: boolean + description?: boolean + convertedOrderId?: boolean + createdAt?: boolean + updatedAt?: boolean + customer?: boolean | CustomerDefaultArgs + city?: boolean | PreOrder$cityArgs + workshop?: boolean | PreOrder$workshopArgs + convertedOrder?: boolean | PreOrder$convertedOrderArgs + statusEvents?: boolean | PreOrder$statusEventsArgs + _count?: boolean | PreOrderCountOutputTypeDefaultArgs + }, ExtArgs["result"]["preOrder"]> + + export type PreOrderSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + customerId?: boolean + cityId?: boolean + workshopId?: boolean + status?: boolean + designImageUrl?: boolean + colorName?: boolean + sizeSpec?: boolean + stoneColor?: boolean + minaColor?: boolean + estimatedWeightGrams?: boolean + estimatedPriceRial?: boolean + description?: boolean + convertedOrderId?: boolean + createdAt?: boolean + updatedAt?: boolean + customer?: boolean | CustomerDefaultArgs + city?: boolean | PreOrder$cityArgs + workshop?: boolean | PreOrder$workshopArgs + convertedOrder?: boolean | PreOrder$convertedOrderArgs + }, ExtArgs["result"]["preOrder"]> + + export type PreOrderSelectScalar = { + id?: boolean + customerId?: boolean + cityId?: boolean + workshopId?: boolean + status?: boolean + designImageUrl?: boolean + colorName?: boolean + sizeSpec?: boolean + stoneColor?: boolean + minaColor?: boolean + estimatedWeightGrams?: boolean + estimatedPriceRial?: boolean + description?: boolean + convertedOrderId?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type PreOrderInclude = { + customer?: boolean | CustomerDefaultArgs + city?: boolean | PreOrder$cityArgs + workshop?: boolean | PreOrder$workshopArgs + convertedOrder?: boolean | PreOrder$convertedOrderArgs + statusEvents?: boolean | PreOrder$statusEventsArgs + _count?: boolean | PreOrderCountOutputTypeDefaultArgs + } + export type PreOrderIncludeCreateManyAndReturn = { + customer?: boolean | CustomerDefaultArgs + city?: boolean | PreOrder$cityArgs + workshop?: boolean | PreOrder$workshopArgs + convertedOrder?: boolean | PreOrder$convertedOrderArgs + } + + export type $PreOrderPayload = { + name: "PreOrder" + objects: { + customer: Prisma.$CustomerPayload + city: Prisma.$CityPayload | null + workshop: Prisma.$WorkshopPayload | null + convertedOrder: Prisma.$OrderPayload | null + statusEvents: Prisma.$PreOrderStatusEventPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + customerId: string + cityId: string | null + workshopId: string | null + status: $Enums.PreOrderStatus + designImageUrl: string | null + colorName: string | null + sizeSpec: string | null + stoneColor: string | null + minaColor: string | null + estimatedWeightGrams: Prisma.Decimal | null + estimatedPriceRial: Prisma.Decimal | null + description: string | null + /** + * Once priced, an admin converts this into a real (debt-bearing) Order. + */ + convertedOrderId: string | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["preOrder"]> + composites: {} + } + + type PreOrderGetPayload = $Result.GetResult + + type PreOrderCountArgs = + Omit & { + select?: PreOrderCountAggregateInputType | true + } + + export interface PreOrderDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['PreOrder'], meta: { name: 'PreOrder' } } + /** + * Find zero or one PreOrder that matches the filter. + * @param {PreOrderFindUniqueArgs} args - Arguments to find a PreOrder + * @example + * // Get one PreOrder + * const preOrder = await prisma.preOrder.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PreOrderClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one PreOrder that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PreOrderFindUniqueOrThrowArgs} args - Arguments to find a PreOrder + * @example + * // Get one PreOrder + * const preOrder = await prisma.preOrder.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PreOrderClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first PreOrder 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 {PreOrderFindFirstArgs} args - Arguments to find a PreOrder + * @example + * // Get one PreOrder + * const preOrder = await prisma.preOrder.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PreOrderClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first PreOrder 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 {PreOrderFindFirstOrThrowArgs} args - Arguments to find a PreOrder + * @example + * // Get one PreOrder + * const preOrder = await prisma.preOrder.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PreOrderClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more PreOrders 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 {PreOrderFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all PreOrders + * const preOrders = await prisma.preOrder.findMany() + * + * // Get first 10 PreOrders + * const preOrders = await prisma.preOrder.findMany({ take: 10 }) + * + * // Only select the `id` + * const preOrderWithIdOnly = await prisma.preOrder.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a PreOrder. + * @param {PreOrderCreateArgs} args - Arguments to create a PreOrder. + * @example + * // Create one PreOrder + * const PreOrder = await prisma.preOrder.create({ + * data: { + * // ... data to create a PreOrder + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PreOrderClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many PreOrders. + * @param {PreOrderCreateManyArgs} args - Arguments to create many PreOrders. + * @example + * // Create many PreOrders + * const preOrder = await prisma.preOrder.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many PreOrders and returns the data saved in the database. + * @param {PreOrderCreateManyAndReturnArgs} args - Arguments to create many PreOrders. + * @example + * // Create many PreOrders + * const preOrder = await prisma.preOrder.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many PreOrders and only return the `id` + * const preOrderWithIdOnly = await prisma.preOrder.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 PreOrder. + * @param {PreOrderDeleteArgs} args - Arguments to delete one PreOrder. + * @example + * // Delete one PreOrder + * const PreOrder = await prisma.preOrder.delete({ + * where: { + * // ... filter to delete one PreOrder + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PreOrderClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one PreOrder. + * @param {PreOrderUpdateArgs} args - Arguments to update one PreOrder. + * @example + * // Update one PreOrder + * const preOrder = await prisma.preOrder.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PreOrderClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more PreOrders. + * @param {PreOrderDeleteManyArgs} args - Arguments to filter PreOrders to delete. + * @example + * // Delete a few PreOrders + * const { count } = await prisma.preOrder.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more PreOrders. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PreOrderUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many PreOrders + * const preOrder = await prisma.preOrder.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one PreOrder. + * @param {PreOrderUpsertArgs} args - Arguments to update or create a PreOrder. + * @example + * // Update or create a PreOrder + * const preOrder = await prisma.preOrder.upsert({ + * create: { + * // ... data to create a PreOrder + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the PreOrder we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PreOrderClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of PreOrders. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PreOrderCountArgs} args - Arguments to filter PreOrders to count. + * @example + * // Count the number of PreOrders + * const count = await prisma.preOrder.count({ + * where: { + * // ... the filter for the PreOrders 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 PreOrder. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PreOrderAggregateArgs} 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 PreOrder. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PreOrderGroupByArgs} 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 PreOrderGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PreOrderGroupByArgs['orderBy'] } + : { orderBy?: PreOrderGroupByArgs['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 ? GetPreOrderGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the PreOrder model + */ + readonly fields: PreOrderFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for PreOrder. + * 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__PreOrderClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + city = {}>(args?: Subset>): Prisma__CityClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + workshop = {}>(args?: Subset>): Prisma__WorkshopClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + convertedOrder = {}>(args?: Subset>): Prisma__OrderClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + statusEvents = {}>(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 PreOrder model + */ + interface PreOrderFieldRefs { + readonly id: FieldRef<"PreOrder", 'String'> + readonly customerId: FieldRef<"PreOrder", 'String'> + readonly cityId: FieldRef<"PreOrder", 'String'> + readonly workshopId: FieldRef<"PreOrder", 'String'> + readonly status: FieldRef<"PreOrder", 'PreOrderStatus'> + readonly designImageUrl: FieldRef<"PreOrder", 'String'> + readonly colorName: FieldRef<"PreOrder", 'String'> + readonly sizeSpec: FieldRef<"PreOrder", 'String'> + readonly stoneColor: FieldRef<"PreOrder", 'String'> + readonly minaColor: FieldRef<"PreOrder", 'String'> + readonly estimatedWeightGrams: FieldRef<"PreOrder", 'Decimal'> + readonly estimatedPriceRial: FieldRef<"PreOrder", 'Decimal'> + readonly description: FieldRef<"PreOrder", 'String'> + readonly convertedOrderId: FieldRef<"PreOrder", 'String'> + readonly createdAt: FieldRef<"PreOrder", 'DateTime'> + readonly updatedAt: FieldRef<"PreOrder", 'DateTime'> + } + + + // Custom InputTypes + /** + * PreOrder findUnique + */ + export type PreOrderFindUniqueArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + /** + * Filter, which PreOrder to fetch. + */ + where: PreOrderWhereUniqueInput + } + + /** + * PreOrder findUniqueOrThrow + */ + export type PreOrderFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + /** + * Filter, which PreOrder to fetch. + */ + where: PreOrderWhereUniqueInput + } + + /** + * PreOrder findFirst + */ + export type PreOrderFindFirstArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + /** + * Filter, which PreOrder to fetch. + */ + where?: PreOrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PreOrders to fetch. + */ + orderBy?: PreOrderOrderByWithRelationInput | PreOrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for PreOrders. + */ + cursor?: PreOrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PreOrders 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` PreOrders. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of PreOrders. + */ + distinct?: PreOrderScalarFieldEnum | PreOrderScalarFieldEnum[] + } + + /** + * PreOrder findFirstOrThrow + */ + export type PreOrderFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + /** + * Filter, which PreOrder to fetch. + */ + where?: PreOrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PreOrders to fetch. + */ + orderBy?: PreOrderOrderByWithRelationInput | PreOrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for PreOrders. + */ + cursor?: PreOrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PreOrders 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` PreOrders. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of PreOrders. + */ + distinct?: PreOrderScalarFieldEnum | PreOrderScalarFieldEnum[] + } + + /** + * PreOrder findMany + */ + export type PreOrderFindManyArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + /** + * Filter, which PreOrders to fetch. + */ + where?: PreOrderWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PreOrders to fetch. + */ + orderBy?: PreOrderOrderByWithRelationInput | PreOrderOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing PreOrders. + */ + cursor?: PreOrderWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PreOrders 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` PreOrders. + */ + skip?: number + distinct?: PreOrderScalarFieldEnum | PreOrderScalarFieldEnum[] + } + + /** + * PreOrder create + */ + export type PreOrderCreateArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + /** + * The data needed to create a PreOrder. + */ + data: XOR + } + + /** + * PreOrder createMany + */ + export type PreOrderCreateManyArgs = { + /** + * The data used to create many PreOrders. + */ + data: PreOrderCreateManyInput | PreOrderCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * PreOrder createManyAndReturn + */ + export type PreOrderCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelectCreateManyAndReturn | null + /** + * The data used to create many PreOrders. + */ + data: PreOrderCreateManyInput | PreOrderCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderIncludeCreateManyAndReturn | null + } + + /** + * PreOrder update + */ + export type PreOrderUpdateArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + /** + * The data needed to update a PreOrder. + */ + data: XOR + /** + * Choose, which PreOrder to update. + */ + where: PreOrderWhereUniqueInput + } + + /** + * PreOrder updateMany + */ + export type PreOrderUpdateManyArgs = { + /** + * The data used to update PreOrders. + */ + data: XOR + /** + * Filter which PreOrders to update + */ + where?: PreOrderWhereInput + } + + /** + * PreOrder upsert + */ + export type PreOrderUpsertArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + /** + * The filter to search for the PreOrder to update in case it exists. + */ + where: PreOrderWhereUniqueInput + /** + * In case the PreOrder found by the `where` argument doesn't exist, create a new PreOrder with this data. + */ + create: XOR + /** + * In case the PreOrder was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * PreOrder delete + */ + export type PreOrderDeleteArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + /** + * Filter which PreOrder to delete. + */ + where: PreOrderWhereUniqueInput + } + + /** + * PreOrder deleteMany + */ + export type PreOrderDeleteManyArgs = { + /** + * Filter which PreOrders to delete + */ + where?: PreOrderWhereInput + } + + /** + * PreOrder.city + */ + export type PreOrder$cityArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + where?: CityWhereInput + } + + /** + * PreOrder.workshop + */ + export type PreOrder$workshopArgs = { + /** + * Select specific fields to fetch from the Workshop + */ + select?: WorkshopSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WorkshopInclude | null + where?: WorkshopWhereInput + } + + /** + * PreOrder.convertedOrder + */ + export type PreOrder$convertedOrderArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + where?: OrderWhereInput + } + + /** + * PreOrder.statusEvents + */ + export type PreOrder$statusEventsArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + where?: PreOrderStatusEventWhereInput + orderBy?: PreOrderStatusEventOrderByWithRelationInput | PreOrderStatusEventOrderByWithRelationInput[] + cursor?: PreOrderStatusEventWhereUniqueInput + take?: number + skip?: number + distinct?: PreOrderStatusEventScalarFieldEnum | PreOrderStatusEventScalarFieldEnum[] + } + + /** + * PreOrder without action + */ + export type PreOrderDefaultArgs = { + /** + * Select specific fields to fetch from the PreOrder + */ + select?: PreOrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderInclude | null + } + + + /** + * Model PreOrderStatusEvent + */ + + export type AggregatePreOrderStatusEvent = { + _count: PreOrderStatusEventCountAggregateOutputType | null + _min: PreOrderStatusEventMinAggregateOutputType | null + _max: PreOrderStatusEventMaxAggregateOutputType | null + } + + export type PreOrderStatusEventMinAggregateOutputType = { + id: string | null + preOrderId: string | null + actorAdminUserId: string | null + ipAddress: string | null + createdAt: Date | null + } + + export type PreOrderStatusEventMaxAggregateOutputType = { + id: string | null + preOrderId: string | null + actorAdminUserId: string | null + ipAddress: string | null + createdAt: Date | null + } + + export type PreOrderStatusEventCountAggregateOutputType = { + id: number + preOrderId: number + changes: number + actorAdminUserId: number + ipAddress: number + createdAt: number + _all: number + } + + + export type PreOrderStatusEventMinAggregateInputType = { + id?: true + preOrderId?: true + actorAdminUserId?: true + ipAddress?: true + createdAt?: true + } + + export type PreOrderStatusEventMaxAggregateInputType = { + id?: true + preOrderId?: true + actorAdminUserId?: true + ipAddress?: true + createdAt?: true + } + + export type PreOrderStatusEventCountAggregateInputType = { + id?: true + preOrderId?: true + changes?: true + actorAdminUserId?: true + ipAddress?: true + createdAt?: true + _all?: true + } + + export type PreOrderStatusEventAggregateArgs = { + /** + * Filter which PreOrderStatusEvent to aggregate. + */ + where?: PreOrderStatusEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PreOrderStatusEvents to fetch. + */ + orderBy?: PreOrderStatusEventOrderByWithRelationInput | PreOrderStatusEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PreOrderStatusEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PreOrderStatusEvents 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` PreOrderStatusEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned PreOrderStatusEvents + **/ + _count?: true | PreOrderStatusEventCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PreOrderStatusEventMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PreOrderStatusEventMaxAggregateInputType + } + + export type GetPreOrderStatusEventAggregateType = { + [P in keyof T & keyof AggregatePreOrderStatusEvent]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PreOrderStatusEventGroupByArgs = { + where?: PreOrderStatusEventWhereInput + orderBy?: PreOrderStatusEventOrderByWithAggregationInput | PreOrderStatusEventOrderByWithAggregationInput[] + by: PreOrderStatusEventScalarFieldEnum[] | PreOrderStatusEventScalarFieldEnum + having?: PreOrderStatusEventScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PreOrderStatusEventCountAggregateInputType | true + _min?: PreOrderStatusEventMinAggregateInputType + _max?: PreOrderStatusEventMaxAggregateInputType + } + + export type PreOrderStatusEventGroupByOutputType = { + id: string + preOrderId: string + changes: JsonValue + actorAdminUserId: string | null + ipAddress: string | null + createdAt: Date + _count: PreOrderStatusEventCountAggregateOutputType | null + _min: PreOrderStatusEventMinAggregateOutputType | null + _max: PreOrderStatusEventMaxAggregateOutputType | null + } + + type GetPreOrderStatusEventGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PreOrderStatusEventGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PreOrderStatusEventSelect = $Extensions.GetSelect<{ + id?: boolean + preOrderId?: boolean + changes?: boolean + actorAdminUserId?: boolean + ipAddress?: boolean + createdAt?: boolean + preOrder?: boolean | PreOrderDefaultArgs + actorAdminUser?: boolean | PreOrderStatusEvent$actorAdminUserArgs + }, ExtArgs["result"]["preOrderStatusEvent"]> + + export type PreOrderStatusEventSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + preOrderId?: boolean + changes?: boolean + actorAdminUserId?: boolean + ipAddress?: boolean + createdAt?: boolean + preOrder?: boolean | PreOrderDefaultArgs + actorAdminUser?: boolean | PreOrderStatusEvent$actorAdminUserArgs + }, ExtArgs["result"]["preOrderStatusEvent"]> + + export type PreOrderStatusEventSelectScalar = { + id?: boolean + preOrderId?: boolean + changes?: boolean + actorAdminUserId?: boolean + ipAddress?: boolean + createdAt?: boolean + } + + export type PreOrderStatusEventInclude = { + preOrder?: boolean | PreOrderDefaultArgs + actorAdminUser?: boolean | PreOrderStatusEvent$actorAdminUserArgs + } + export type PreOrderStatusEventIncludeCreateManyAndReturn = { + preOrder?: boolean | PreOrderDefaultArgs + actorAdminUser?: boolean | PreOrderStatusEvent$actorAdminUserArgs + } + + export type $PreOrderStatusEventPayload = { + name: "PreOrderStatusEvent" + objects: { + preOrder: Prisma.$PreOrderPayload + actorAdminUser: Prisma.$AdminUserPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + preOrderId: string + /** + * Field-level diff, e.g. {"status": {"old": "PLACED", "new": "ADMIN_APPROVED"}} + */ + changes: Prisma.JsonValue + actorAdminUserId: string | null + ipAddress: string | null + createdAt: Date + }, ExtArgs["result"]["preOrderStatusEvent"]> + composites: {} + } + + type PreOrderStatusEventGetPayload = $Result.GetResult + + type PreOrderStatusEventCountArgs = + Omit & { + select?: PreOrderStatusEventCountAggregateInputType | true + } + + export interface PreOrderStatusEventDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['PreOrderStatusEvent'], meta: { name: 'PreOrderStatusEvent' } } + /** + * Find zero or one PreOrderStatusEvent that matches the filter. + * @param {PreOrderStatusEventFindUniqueArgs} args - Arguments to find a PreOrderStatusEvent + * @example + * // Get one PreOrderStatusEvent + * const preOrderStatusEvent = await prisma.preOrderStatusEvent.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PreOrderStatusEventClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one PreOrderStatusEvent that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PreOrderStatusEventFindUniqueOrThrowArgs} args - Arguments to find a PreOrderStatusEvent + * @example + * // Get one PreOrderStatusEvent + * const preOrderStatusEvent = await prisma.preOrderStatusEvent.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PreOrderStatusEventClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first PreOrderStatusEvent 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 {PreOrderStatusEventFindFirstArgs} args - Arguments to find a PreOrderStatusEvent + * @example + * // Get one PreOrderStatusEvent + * const preOrderStatusEvent = await prisma.preOrderStatusEvent.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PreOrderStatusEventClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first PreOrderStatusEvent 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 {PreOrderStatusEventFindFirstOrThrowArgs} args - Arguments to find a PreOrderStatusEvent + * @example + * // Get one PreOrderStatusEvent + * const preOrderStatusEvent = await prisma.preOrderStatusEvent.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PreOrderStatusEventClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more PreOrderStatusEvents 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 {PreOrderStatusEventFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all PreOrderStatusEvents + * const preOrderStatusEvents = await prisma.preOrderStatusEvent.findMany() + * + * // Get first 10 PreOrderStatusEvents + * const preOrderStatusEvents = await prisma.preOrderStatusEvent.findMany({ take: 10 }) + * + * // Only select the `id` + * const preOrderStatusEventWithIdOnly = await prisma.preOrderStatusEvent.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a PreOrderStatusEvent. + * @param {PreOrderStatusEventCreateArgs} args - Arguments to create a PreOrderStatusEvent. + * @example + * // Create one PreOrderStatusEvent + * const PreOrderStatusEvent = await prisma.preOrderStatusEvent.create({ + * data: { + * // ... data to create a PreOrderStatusEvent + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PreOrderStatusEventClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many PreOrderStatusEvents. + * @param {PreOrderStatusEventCreateManyArgs} args - Arguments to create many PreOrderStatusEvents. + * @example + * // Create many PreOrderStatusEvents + * const preOrderStatusEvent = await prisma.preOrderStatusEvent.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many PreOrderStatusEvents and returns the data saved in the database. + * @param {PreOrderStatusEventCreateManyAndReturnArgs} args - Arguments to create many PreOrderStatusEvents. + * @example + * // Create many PreOrderStatusEvents + * const preOrderStatusEvent = await prisma.preOrderStatusEvent.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many PreOrderStatusEvents and only return the `id` + * const preOrderStatusEventWithIdOnly = await prisma.preOrderStatusEvent.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 PreOrderStatusEvent. + * @param {PreOrderStatusEventDeleteArgs} args - Arguments to delete one PreOrderStatusEvent. + * @example + * // Delete one PreOrderStatusEvent + * const PreOrderStatusEvent = await prisma.preOrderStatusEvent.delete({ + * where: { + * // ... filter to delete one PreOrderStatusEvent + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PreOrderStatusEventClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one PreOrderStatusEvent. + * @param {PreOrderStatusEventUpdateArgs} args - Arguments to update one PreOrderStatusEvent. + * @example + * // Update one PreOrderStatusEvent + * const preOrderStatusEvent = await prisma.preOrderStatusEvent.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PreOrderStatusEventClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more PreOrderStatusEvents. + * @param {PreOrderStatusEventDeleteManyArgs} args - Arguments to filter PreOrderStatusEvents to delete. + * @example + * // Delete a few PreOrderStatusEvents + * const { count } = await prisma.preOrderStatusEvent.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more PreOrderStatusEvents. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PreOrderStatusEventUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many PreOrderStatusEvents + * const preOrderStatusEvent = await prisma.preOrderStatusEvent.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one PreOrderStatusEvent. + * @param {PreOrderStatusEventUpsertArgs} args - Arguments to update or create a PreOrderStatusEvent. + * @example + * // Update or create a PreOrderStatusEvent + * const preOrderStatusEvent = await prisma.preOrderStatusEvent.upsert({ + * create: { + * // ... data to create a PreOrderStatusEvent + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the PreOrderStatusEvent we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PreOrderStatusEventClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of PreOrderStatusEvents. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PreOrderStatusEventCountArgs} args - Arguments to filter PreOrderStatusEvents to count. + * @example + * // Count the number of PreOrderStatusEvents + * const count = await prisma.preOrderStatusEvent.count({ + * where: { + * // ... the filter for the PreOrderStatusEvents 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 PreOrderStatusEvent. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PreOrderStatusEventAggregateArgs} 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 PreOrderStatusEvent. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PreOrderStatusEventGroupByArgs} 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 PreOrderStatusEventGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PreOrderStatusEventGroupByArgs['orderBy'] } + : { orderBy?: PreOrderStatusEventGroupByArgs['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 ? GetPreOrderStatusEventGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the PreOrderStatusEvent model + */ + readonly fields: PreOrderStatusEventFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for PreOrderStatusEvent. + * 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__PreOrderStatusEventClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + preOrder = {}>(args?: Subset>): Prisma__PreOrderClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + actorAdminUser = {}>(args?: Subset>): Prisma__AdminUserClient<$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 PreOrderStatusEvent model + */ + interface PreOrderStatusEventFieldRefs { + readonly id: FieldRef<"PreOrderStatusEvent", 'String'> + readonly preOrderId: FieldRef<"PreOrderStatusEvent", 'String'> + readonly changes: FieldRef<"PreOrderStatusEvent", 'Json'> + readonly actorAdminUserId: FieldRef<"PreOrderStatusEvent", 'String'> + readonly ipAddress: FieldRef<"PreOrderStatusEvent", 'String'> + readonly createdAt: FieldRef<"PreOrderStatusEvent", 'DateTime'> + } + + + // Custom InputTypes + /** + * PreOrderStatusEvent findUnique + */ + export type PreOrderStatusEventFindUniqueArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + /** + * Filter, which PreOrderStatusEvent to fetch. + */ + where: PreOrderStatusEventWhereUniqueInput + } + + /** + * PreOrderStatusEvent findUniqueOrThrow + */ + export type PreOrderStatusEventFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + /** + * Filter, which PreOrderStatusEvent to fetch. + */ + where: PreOrderStatusEventWhereUniqueInput + } + + /** + * PreOrderStatusEvent findFirst + */ + export type PreOrderStatusEventFindFirstArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + /** + * Filter, which PreOrderStatusEvent to fetch. + */ + where?: PreOrderStatusEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PreOrderStatusEvents to fetch. + */ + orderBy?: PreOrderStatusEventOrderByWithRelationInput | PreOrderStatusEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for PreOrderStatusEvents. + */ + cursor?: PreOrderStatusEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PreOrderStatusEvents 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` PreOrderStatusEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of PreOrderStatusEvents. + */ + distinct?: PreOrderStatusEventScalarFieldEnum | PreOrderStatusEventScalarFieldEnum[] + } + + /** + * PreOrderStatusEvent findFirstOrThrow + */ + export type PreOrderStatusEventFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + /** + * Filter, which PreOrderStatusEvent to fetch. + */ + where?: PreOrderStatusEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PreOrderStatusEvents to fetch. + */ + orderBy?: PreOrderStatusEventOrderByWithRelationInput | PreOrderStatusEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for PreOrderStatusEvents. + */ + cursor?: PreOrderStatusEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PreOrderStatusEvents 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` PreOrderStatusEvents. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of PreOrderStatusEvents. + */ + distinct?: PreOrderStatusEventScalarFieldEnum | PreOrderStatusEventScalarFieldEnum[] + } + + /** + * PreOrderStatusEvent findMany + */ + export type PreOrderStatusEventFindManyArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + /** + * Filter, which PreOrderStatusEvents to fetch. + */ + where?: PreOrderStatusEventWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of PreOrderStatusEvents to fetch. + */ + orderBy?: PreOrderStatusEventOrderByWithRelationInput | PreOrderStatusEventOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing PreOrderStatusEvents. + */ + cursor?: PreOrderStatusEventWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` PreOrderStatusEvents 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` PreOrderStatusEvents. + */ + skip?: number + distinct?: PreOrderStatusEventScalarFieldEnum | PreOrderStatusEventScalarFieldEnum[] + } + + /** + * PreOrderStatusEvent create + */ + export type PreOrderStatusEventCreateArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + /** + * The data needed to create a PreOrderStatusEvent. + */ + data: XOR + } + + /** + * PreOrderStatusEvent createMany + */ + export type PreOrderStatusEventCreateManyArgs = { + /** + * The data used to create many PreOrderStatusEvents. + */ + data: PreOrderStatusEventCreateManyInput | PreOrderStatusEventCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * PreOrderStatusEvent createManyAndReturn + */ + export type PreOrderStatusEventCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelectCreateManyAndReturn | null + /** + * The data used to create many PreOrderStatusEvents. + */ + data: PreOrderStatusEventCreateManyInput | PreOrderStatusEventCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventIncludeCreateManyAndReturn | null + } + + /** + * PreOrderStatusEvent update + */ + export type PreOrderStatusEventUpdateArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + /** + * The data needed to update a PreOrderStatusEvent. + */ + data: XOR + /** + * Choose, which PreOrderStatusEvent to update. + */ + where: PreOrderStatusEventWhereUniqueInput + } + + /** + * PreOrderStatusEvent updateMany + */ + export type PreOrderStatusEventUpdateManyArgs = { + /** + * The data used to update PreOrderStatusEvents. + */ + data: XOR + /** + * Filter which PreOrderStatusEvents to update + */ + where?: PreOrderStatusEventWhereInput + } + + /** + * PreOrderStatusEvent upsert + */ + export type PreOrderStatusEventUpsertArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + /** + * The filter to search for the PreOrderStatusEvent to update in case it exists. + */ + where: PreOrderStatusEventWhereUniqueInput + /** + * In case the PreOrderStatusEvent found by the `where` argument doesn't exist, create a new PreOrderStatusEvent with this data. + */ + create: XOR + /** + * In case the PreOrderStatusEvent was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * PreOrderStatusEvent delete + */ + export type PreOrderStatusEventDeleteArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + /** + * Filter which PreOrderStatusEvent to delete. + */ + where: PreOrderStatusEventWhereUniqueInput + } + + /** + * PreOrderStatusEvent deleteMany + */ + export type PreOrderStatusEventDeleteManyArgs = { + /** + * Filter which PreOrderStatusEvents to delete + */ + where?: PreOrderStatusEventWhereInput + } + + /** + * PreOrderStatusEvent.actorAdminUser + */ + export type PreOrderStatusEvent$actorAdminUserArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + where?: AdminUserWhereInput + } + + /** + * PreOrderStatusEvent without action + */ + export type PreOrderStatusEventDefaultArgs = { + /** + * Select specific fields to fetch from the PreOrderStatusEvent + */ + select?: PreOrderStatusEventSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PreOrderStatusEventInclude | null + } + + + /** + * Model LedgerEntry + */ + + export type AggregateLedgerEntry = { + _count: LedgerEntryCountAggregateOutputType | null + _avg: LedgerEntryAvgAggregateOutputType | null + _sum: LedgerEntrySumAggregateOutputType | null + _min: LedgerEntryMinAggregateOutputType | null + _max: LedgerEntryMaxAggregateOutputType | null + } + + export type LedgerEntryAvgAggregateOutputType = { + amount: Decimal | null + karatPerMille: number | null + pricePerGramRialAtEntry: Decimal | null + } + + export type LedgerEntrySumAggregateOutputType = { + amount: Decimal | null + karatPerMille: number | null + pricePerGramRialAtEntry: Decimal | null + } + + export type LedgerEntryMinAggregateOutputType = { + id: string | null + customerId: string | null + currency: $Enums.LedgerCurrency | null + direction: $Enums.LedgerDirection | null + sourceType: $Enums.LedgerSourceType | null + amount: Decimal | null + karatPerMille: number | null + pricePerGramRialAtEntry: Decimal | null + orderId: string | null + confirmed: boolean | null + confirmedAt: Date | null + postedByAdminUserId: string | null + note: string | null + createdAt: Date | null + } + + export type LedgerEntryMaxAggregateOutputType = { + id: string | null + customerId: string | null + currency: $Enums.LedgerCurrency | null + direction: $Enums.LedgerDirection | null + sourceType: $Enums.LedgerSourceType | null + amount: Decimal | null + karatPerMille: number | null + pricePerGramRialAtEntry: Decimal | null + orderId: string | null + confirmed: boolean | null + confirmedAt: Date | null + postedByAdminUserId: string | null + note: string | null + createdAt: Date | null + } + + export type LedgerEntryCountAggregateOutputType = { + id: number + customerId: number + currency: number + direction: number + sourceType: number + amount: number + karatPerMille: number + pricePerGramRialAtEntry: number + orderId: number + confirmed: number + confirmedAt: number + postedByAdminUserId: number + note: number + createdAt: number + _all: number + } + + + export type LedgerEntryAvgAggregateInputType = { + amount?: true + karatPerMille?: true + pricePerGramRialAtEntry?: true + } + + export type LedgerEntrySumAggregateInputType = { + amount?: true + karatPerMille?: true + pricePerGramRialAtEntry?: true + } + + export type LedgerEntryMinAggregateInputType = { + id?: true + customerId?: true + currency?: true + direction?: true + sourceType?: true + amount?: true + karatPerMille?: true + pricePerGramRialAtEntry?: true + orderId?: true + confirmed?: true + confirmedAt?: true + postedByAdminUserId?: true + note?: true + createdAt?: true + } + + export type LedgerEntryMaxAggregateInputType = { + id?: true + customerId?: true + currency?: true + direction?: true + sourceType?: true + amount?: true + karatPerMille?: true + pricePerGramRialAtEntry?: true + orderId?: true + confirmed?: true + confirmedAt?: true + postedByAdminUserId?: true + note?: true + createdAt?: true + } + + export type LedgerEntryCountAggregateInputType = { + id?: true + customerId?: true + currency?: true + direction?: true + sourceType?: true + amount?: true + karatPerMille?: true + pricePerGramRialAtEntry?: true + orderId?: true + confirmed?: true + confirmedAt?: true + postedByAdminUserId?: true + note?: true + createdAt?: true + _all?: true + } + + export type LedgerEntryAggregateArgs = { + /** + * Filter which LedgerEntry to aggregate. + */ + where?: LedgerEntryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of LedgerEntries to fetch. + */ + orderBy?: LedgerEntryOrderByWithRelationInput | LedgerEntryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: LedgerEntryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` LedgerEntries 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` LedgerEntries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned LedgerEntries + **/ + _count?: true | LedgerEntryCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: LedgerEntryAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: LedgerEntrySumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: LedgerEntryMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: LedgerEntryMaxAggregateInputType + } + + export type GetLedgerEntryAggregateType = { + [P in keyof T & keyof AggregateLedgerEntry]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type LedgerEntryGroupByArgs = { + where?: LedgerEntryWhereInput + orderBy?: LedgerEntryOrderByWithAggregationInput | LedgerEntryOrderByWithAggregationInput[] + by: LedgerEntryScalarFieldEnum[] | LedgerEntryScalarFieldEnum + having?: LedgerEntryScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: LedgerEntryCountAggregateInputType | true + _avg?: LedgerEntryAvgAggregateInputType + _sum?: LedgerEntrySumAggregateInputType + _min?: LedgerEntryMinAggregateInputType + _max?: LedgerEntryMaxAggregateInputType + } + + export type LedgerEntryGroupByOutputType = { + id: string + customerId: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal + karatPerMille: number | null + pricePerGramRialAtEntry: Decimal | null + orderId: string | null + confirmed: boolean + confirmedAt: Date | null + postedByAdminUserId: string | null + note: string | null + createdAt: Date + _count: LedgerEntryCountAggregateOutputType | null + _avg: LedgerEntryAvgAggregateOutputType | null + _sum: LedgerEntrySumAggregateOutputType | null + _min: LedgerEntryMinAggregateOutputType | null + _max: LedgerEntryMaxAggregateOutputType | null + } + + type GetLedgerEntryGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof LedgerEntryGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type LedgerEntrySelect = $Extensions.GetSelect<{ + id?: boolean + customerId?: boolean + currency?: boolean + direction?: boolean + sourceType?: boolean + amount?: boolean + karatPerMille?: boolean + pricePerGramRialAtEntry?: boolean + orderId?: boolean + confirmed?: boolean + confirmedAt?: boolean + postedByAdminUserId?: boolean + note?: boolean + createdAt?: boolean + customer?: boolean | CustomerDefaultArgs + order?: boolean | LedgerEntry$orderArgs + postedByAdminUser?: boolean | LedgerEntry$postedByAdminUserArgs + }, ExtArgs["result"]["ledgerEntry"]> + + export type LedgerEntrySelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + customerId?: boolean + currency?: boolean + direction?: boolean + sourceType?: boolean + amount?: boolean + karatPerMille?: boolean + pricePerGramRialAtEntry?: boolean + orderId?: boolean + confirmed?: boolean + confirmedAt?: boolean + postedByAdminUserId?: boolean + note?: boolean + createdAt?: boolean + customer?: boolean | CustomerDefaultArgs + order?: boolean | LedgerEntry$orderArgs + postedByAdminUser?: boolean | LedgerEntry$postedByAdminUserArgs + }, ExtArgs["result"]["ledgerEntry"]> + + export type LedgerEntrySelectScalar = { + id?: boolean + customerId?: boolean + currency?: boolean + direction?: boolean + sourceType?: boolean + amount?: boolean + karatPerMille?: boolean + pricePerGramRialAtEntry?: boolean + orderId?: boolean + confirmed?: boolean + confirmedAt?: boolean + postedByAdminUserId?: boolean + note?: boolean + createdAt?: boolean + } + + export type LedgerEntryInclude = { + customer?: boolean | CustomerDefaultArgs + order?: boolean | LedgerEntry$orderArgs + postedByAdminUser?: boolean | LedgerEntry$postedByAdminUserArgs + } + export type LedgerEntryIncludeCreateManyAndReturn = { + customer?: boolean | CustomerDefaultArgs + order?: boolean | LedgerEntry$orderArgs + postedByAdminUser?: boolean | LedgerEntry$postedByAdminUserArgs + } + + export type $LedgerEntryPayload = { + name: "LedgerEntry" + objects: { + customer: Prisma.$CustomerPayload + order: Prisma.$OrderPayload | null + postedByAdminUser: Prisma.$AdminUserPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + customerId: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + /** + * Always positive; direction determines the sign applied to the customer balance. + */ + amount: Prisma.Decimal + /** + * Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916). + */ + karatPerMille: number | null + /** + * Gold price/gram at conversion time, for REPAYMENT_CASH. + */ + pricePerGramRialAtEntry: Prisma.Decimal | null + orderId: string | null + /** + * Pending entries don't count toward the cached customer balance until confirmed. + */ + confirmed: boolean + confirmedAt: Date | null + postedByAdminUserId: string | null + note: string | null + createdAt: Date + }, ExtArgs["result"]["ledgerEntry"]> + composites: {} + } + + type LedgerEntryGetPayload = $Result.GetResult + + type LedgerEntryCountArgs = + Omit & { + select?: LedgerEntryCountAggregateInputType | true + } + + export interface LedgerEntryDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['LedgerEntry'], meta: { name: 'LedgerEntry' } } + /** + * Find zero or one LedgerEntry that matches the filter. + * @param {LedgerEntryFindUniqueArgs} args - Arguments to find a LedgerEntry + * @example + * // Get one LedgerEntry + * const ledgerEntry = await prisma.ledgerEntry.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__LedgerEntryClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one LedgerEntry that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {LedgerEntryFindUniqueOrThrowArgs} args - Arguments to find a LedgerEntry + * @example + * // Get one LedgerEntry + * const ledgerEntry = await prisma.ledgerEntry.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__LedgerEntryClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first LedgerEntry 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 {LedgerEntryFindFirstArgs} args - Arguments to find a LedgerEntry + * @example + * // Get one LedgerEntry + * const ledgerEntry = await prisma.ledgerEntry.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__LedgerEntryClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first LedgerEntry 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 {LedgerEntryFindFirstOrThrowArgs} args - Arguments to find a LedgerEntry + * @example + * // Get one LedgerEntry + * const ledgerEntry = await prisma.ledgerEntry.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__LedgerEntryClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more LedgerEntries 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 {LedgerEntryFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all LedgerEntries + * const ledgerEntries = await prisma.ledgerEntry.findMany() + * + * // Get first 10 LedgerEntries + * const ledgerEntries = await prisma.ledgerEntry.findMany({ take: 10 }) + * + * // Only select the `id` + * const ledgerEntryWithIdOnly = await prisma.ledgerEntry.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a LedgerEntry. + * @param {LedgerEntryCreateArgs} args - Arguments to create a LedgerEntry. + * @example + * // Create one LedgerEntry + * const LedgerEntry = await prisma.ledgerEntry.create({ + * data: { + * // ... data to create a LedgerEntry + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__LedgerEntryClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many LedgerEntries. + * @param {LedgerEntryCreateManyArgs} args - Arguments to create many LedgerEntries. + * @example + * // Create many LedgerEntries + * const ledgerEntry = await prisma.ledgerEntry.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many LedgerEntries and returns the data saved in the database. + * @param {LedgerEntryCreateManyAndReturnArgs} args - Arguments to create many LedgerEntries. + * @example + * // Create many LedgerEntries + * const ledgerEntry = await prisma.ledgerEntry.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many LedgerEntries and only return the `id` + * const ledgerEntryWithIdOnly = await prisma.ledgerEntry.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 LedgerEntry. + * @param {LedgerEntryDeleteArgs} args - Arguments to delete one LedgerEntry. + * @example + * // Delete one LedgerEntry + * const LedgerEntry = await prisma.ledgerEntry.delete({ + * where: { + * // ... filter to delete one LedgerEntry + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__LedgerEntryClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one LedgerEntry. + * @param {LedgerEntryUpdateArgs} args - Arguments to update one LedgerEntry. + * @example + * // Update one LedgerEntry + * const ledgerEntry = await prisma.ledgerEntry.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__LedgerEntryClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more LedgerEntries. + * @param {LedgerEntryDeleteManyArgs} args - Arguments to filter LedgerEntries to delete. + * @example + * // Delete a few LedgerEntries + * const { count } = await prisma.ledgerEntry.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more LedgerEntries. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LedgerEntryUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many LedgerEntries + * const ledgerEntry = await prisma.ledgerEntry.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one LedgerEntry. + * @param {LedgerEntryUpsertArgs} args - Arguments to update or create a LedgerEntry. + * @example + * // Update or create a LedgerEntry + * const ledgerEntry = await prisma.ledgerEntry.upsert({ + * create: { + * // ... data to create a LedgerEntry + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the LedgerEntry we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__LedgerEntryClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of LedgerEntries. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LedgerEntryCountArgs} args - Arguments to filter LedgerEntries to count. + * @example + * // Count the number of LedgerEntries + * const count = await prisma.ledgerEntry.count({ + * where: { + * // ... the filter for the LedgerEntries 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 LedgerEntry. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LedgerEntryAggregateArgs} 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 LedgerEntry. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {LedgerEntryGroupByArgs} 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 LedgerEntryGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: LedgerEntryGroupByArgs['orderBy'] } + : { orderBy?: LedgerEntryGroupByArgs['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 ? GetLedgerEntryGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the LedgerEntry model + */ + readonly fields: LedgerEntryFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for LedgerEntry. + * 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__LedgerEntryClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + order = {}>(args?: Subset>): Prisma__OrderClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + postedByAdminUser = {}>(args?: Subset>): Prisma__AdminUserClient<$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 LedgerEntry model + */ + interface LedgerEntryFieldRefs { + readonly id: FieldRef<"LedgerEntry", 'String'> + readonly customerId: FieldRef<"LedgerEntry", 'String'> + readonly currency: FieldRef<"LedgerEntry", 'LedgerCurrency'> + readonly direction: FieldRef<"LedgerEntry", 'LedgerDirection'> + readonly sourceType: FieldRef<"LedgerEntry", 'LedgerSourceType'> + readonly amount: FieldRef<"LedgerEntry", 'Decimal'> + readonly karatPerMille: FieldRef<"LedgerEntry", 'Int'> + readonly pricePerGramRialAtEntry: FieldRef<"LedgerEntry", 'Decimal'> + readonly orderId: FieldRef<"LedgerEntry", 'String'> + readonly confirmed: FieldRef<"LedgerEntry", 'Boolean'> + readonly confirmedAt: FieldRef<"LedgerEntry", 'DateTime'> + readonly postedByAdminUserId: FieldRef<"LedgerEntry", 'String'> + readonly note: FieldRef<"LedgerEntry", 'String'> + readonly createdAt: FieldRef<"LedgerEntry", 'DateTime'> + } + + + // Custom InputTypes + /** + * LedgerEntry findUnique + */ + export type LedgerEntryFindUniqueArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + /** + * Filter, which LedgerEntry to fetch. + */ + where: LedgerEntryWhereUniqueInput + } + + /** + * LedgerEntry findUniqueOrThrow + */ + export type LedgerEntryFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + /** + * Filter, which LedgerEntry to fetch. + */ + where: LedgerEntryWhereUniqueInput + } + + /** + * LedgerEntry findFirst + */ + export type LedgerEntryFindFirstArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + /** + * Filter, which LedgerEntry to fetch. + */ + where?: LedgerEntryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of LedgerEntries to fetch. + */ + orderBy?: LedgerEntryOrderByWithRelationInput | LedgerEntryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for LedgerEntries. + */ + cursor?: LedgerEntryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` LedgerEntries 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` LedgerEntries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of LedgerEntries. + */ + distinct?: LedgerEntryScalarFieldEnum | LedgerEntryScalarFieldEnum[] + } + + /** + * LedgerEntry findFirstOrThrow + */ + export type LedgerEntryFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + /** + * Filter, which LedgerEntry to fetch. + */ + where?: LedgerEntryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of LedgerEntries to fetch. + */ + orderBy?: LedgerEntryOrderByWithRelationInput | LedgerEntryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for LedgerEntries. + */ + cursor?: LedgerEntryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` LedgerEntries 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` LedgerEntries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of LedgerEntries. + */ + distinct?: LedgerEntryScalarFieldEnum | LedgerEntryScalarFieldEnum[] + } + + /** + * LedgerEntry findMany + */ + export type LedgerEntryFindManyArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + /** + * Filter, which LedgerEntries to fetch. + */ + where?: LedgerEntryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of LedgerEntries to fetch. + */ + orderBy?: LedgerEntryOrderByWithRelationInput | LedgerEntryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing LedgerEntries. + */ + cursor?: LedgerEntryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` LedgerEntries 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` LedgerEntries. + */ + skip?: number + distinct?: LedgerEntryScalarFieldEnum | LedgerEntryScalarFieldEnum[] + } + + /** + * LedgerEntry create + */ + export type LedgerEntryCreateArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + /** + * The data needed to create a LedgerEntry. + */ + data: XOR + } + + /** + * LedgerEntry createMany + */ + export type LedgerEntryCreateManyArgs = { + /** + * The data used to create many LedgerEntries. + */ + data: LedgerEntryCreateManyInput | LedgerEntryCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * LedgerEntry createManyAndReturn + */ + export type LedgerEntryCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelectCreateManyAndReturn | null + /** + * The data used to create many LedgerEntries. + */ + data: LedgerEntryCreateManyInput | LedgerEntryCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryIncludeCreateManyAndReturn | null + } + + /** + * LedgerEntry update + */ + export type LedgerEntryUpdateArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + /** + * The data needed to update a LedgerEntry. + */ + data: XOR + /** + * Choose, which LedgerEntry to update. + */ + where: LedgerEntryWhereUniqueInput + } + + /** + * LedgerEntry updateMany + */ + export type LedgerEntryUpdateManyArgs = { + /** + * The data used to update LedgerEntries. + */ + data: XOR + /** + * Filter which LedgerEntries to update + */ + where?: LedgerEntryWhereInput + } + + /** + * LedgerEntry upsert + */ + export type LedgerEntryUpsertArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + /** + * The filter to search for the LedgerEntry to update in case it exists. + */ + where: LedgerEntryWhereUniqueInput + /** + * In case the LedgerEntry found by the `where` argument doesn't exist, create a new LedgerEntry with this data. + */ + create: XOR + /** + * In case the LedgerEntry was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * LedgerEntry delete + */ + export type LedgerEntryDeleteArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + /** + * Filter which LedgerEntry to delete. + */ + where: LedgerEntryWhereUniqueInput + } + + /** + * LedgerEntry deleteMany + */ + export type LedgerEntryDeleteManyArgs = { + /** + * Filter which LedgerEntries to delete + */ + where?: LedgerEntryWhereInput + } + + /** + * LedgerEntry.order + */ + export type LedgerEntry$orderArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + where?: OrderWhereInput + } + + /** + * LedgerEntry.postedByAdminUser + */ + export type LedgerEntry$postedByAdminUserArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + where?: AdminUserWhereInput + } + + /** + * LedgerEntry without action + */ + export type LedgerEntryDefaultArgs = { + /** + * Select specific fields to fetch from the LedgerEntry + */ + select?: LedgerEntrySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: LedgerEntryInclude | null + } + + + /** + * Model GoldPriceQuote + */ + + export type AggregateGoldPriceQuote = { + _count: GoldPriceQuoteCountAggregateOutputType | null + _avg: GoldPriceQuoteAvgAggregateOutputType | null + _sum: GoldPriceQuoteSumAggregateOutputType | null + _min: GoldPriceQuoteMinAggregateOutputType | null + _max: GoldPriceQuoteMaxAggregateOutputType | null + } + + export type GoldPriceQuoteAvgAggregateOutputType = { + karatPerMille: number | null + pricePerGramRial: Decimal | null + } + + export type GoldPriceQuoteSumAggregateOutputType = { + karatPerMille: number | null + pricePerGramRial: Decimal | null + } + + export type GoldPriceQuoteMinAggregateOutputType = { + id: string | null + karatPerMille: number | null + pricePerGramRial: Decimal | null + source: string | null + quotedAt: Date | null + } + + export type GoldPriceQuoteMaxAggregateOutputType = { + id: string | null + karatPerMille: number | null + pricePerGramRial: Decimal | null + source: string | null + quotedAt: Date | null + } + + export type GoldPriceQuoteCountAggregateOutputType = { + id: number + karatPerMille: number + pricePerGramRial: number + source: number + quotedAt: number + _all: number + } + + + export type GoldPriceQuoteAvgAggregateInputType = { + karatPerMille?: true + pricePerGramRial?: true + } + + export type GoldPriceQuoteSumAggregateInputType = { + karatPerMille?: true + pricePerGramRial?: true + } + + export type GoldPriceQuoteMinAggregateInputType = { + id?: true + karatPerMille?: true + pricePerGramRial?: true + source?: true + quotedAt?: true + } + + export type GoldPriceQuoteMaxAggregateInputType = { + id?: true + karatPerMille?: true + pricePerGramRial?: true + source?: true + quotedAt?: true + } + + export type GoldPriceQuoteCountAggregateInputType = { + id?: true + karatPerMille?: true + pricePerGramRial?: true + source?: true + quotedAt?: true + _all?: true + } + + export type GoldPriceQuoteAggregateArgs = { + /** + * Filter which GoldPriceQuote to aggregate. + */ + where?: GoldPriceQuoteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoldPriceQuotes to fetch. + */ + orderBy?: GoldPriceQuoteOrderByWithRelationInput | GoldPriceQuoteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: GoldPriceQuoteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoldPriceQuotes 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` GoldPriceQuotes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned GoldPriceQuotes + **/ + _count?: true | GoldPriceQuoteCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: GoldPriceQuoteAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: GoldPriceQuoteSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GoldPriceQuoteMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GoldPriceQuoteMaxAggregateInputType + } + + export type GetGoldPriceQuoteAggregateType = { + [P in keyof T & keyof AggregateGoldPriceQuote]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type GoldPriceQuoteGroupByArgs = { + where?: GoldPriceQuoteWhereInput + orderBy?: GoldPriceQuoteOrderByWithAggregationInput | GoldPriceQuoteOrderByWithAggregationInput[] + by: GoldPriceQuoteScalarFieldEnum[] | GoldPriceQuoteScalarFieldEnum + having?: GoldPriceQuoteScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GoldPriceQuoteCountAggregateInputType | true + _avg?: GoldPriceQuoteAvgAggregateInputType + _sum?: GoldPriceQuoteSumAggregateInputType + _min?: GoldPriceQuoteMinAggregateInputType + _max?: GoldPriceQuoteMaxAggregateInputType + } + + export type GoldPriceQuoteGroupByOutputType = { + id: string + karatPerMille: number + pricePerGramRial: Decimal + source: string + quotedAt: Date + _count: GoldPriceQuoteCountAggregateOutputType | null + _avg: GoldPriceQuoteAvgAggregateOutputType | null + _sum: GoldPriceQuoteSumAggregateOutputType | null + _min: GoldPriceQuoteMinAggregateOutputType | null + _max: GoldPriceQuoteMaxAggregateOutputType | null + } + + type GetGoldPriceQuoteGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof GoldPriceQuoteGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type GoldPriceQuoteSelect = $Extensions.GetSelect<{ + id?: boolean + karatPerMille?: boolean + pricePerGramRial?: boolean + source?: boolean + quotedAt?: boolean + }, ExtArgs["result"]["goldPriceQuote"]> + + export type GoldPriceQuoteSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + karatPerMille?: boolean + pricePerGramRial?: boolean + source?: boolean + quotedAt?: boolean + }, ExtArgs["result"]["goldPriceQuote"]> + + export type GoldPriceQuoteSelectScalar = { + id?: boolean + karatPerMille?: boolean + pricePerGramRial?: boolean + source?: boolean + quotedAt?: boolean + } + + + export type $GoldPriceQuotePayload = { + name: "GoldPriceQuote" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + karatPerMille: number + pricePerGramRial: Prisma.Decimal + source: string + quotedAt: Date + }, ExtArgs["result"]["goldPriceQuote"]> + composites: {} + } + + type GoldPriceQuoteGetPayload = $Result.GetResult + + type GoldPriceQuoteCountArgs = + Omit & { + select?: GoldPriceQuoteCountAggregateInputType | true + } + + export interface GoldPriceQuoteDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['GoldPriceQuote'], meta: { name: 'GoldPriceQuote' } } + /** + * Find zero or one GoldPriceQuote that matches the filter. + * @param {GoldPriceQuoteFindUniqueArgs} args - Arguments to find a GoldPriceQuote + * @example + * // Get one GoldPriceQuote + * const goldPriceQuote = await prisma.goldPriceQuote.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__GoldPriceQuoteClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one GoldPriceQuote that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GoldPriceQuoteFindUniqueOrThrowArgs} args - Arguments to find a GoldPriceQuote + * @example + * // Get one GoldPriceQuote + * const goldPriceQuote = await prisma.goldPriceQuote.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__GoldPriceQuoteClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first GoldPriceQuote 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 {GoldPriceQuoteFindFirstArgs} args - Arguments to find a GoldPriceQuote + * @example + * // Get one GoldPriceQuote + * const goldPriceQuote = await prisma.goldPriceQuote.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__GoldPriceQuoteClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first GoldPriceQuote 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 {GoldPriceQuoteFindFirstOrThrowArgs} args - Arguments to find a GoldPriceQuote + * @example + * // Get one GoldPriceQuote + * const goldPriceQuote = await prisma.goldPriceQuote.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__GoldPriceQuoteClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more GoldPriceQuotes 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 {GoldPriceQuoteFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all GoldPriceQuotes + * const goldPriceQuotes = await prisma.goldPriceQuote.findMany() + * + * // Get first 10 GoldPriceQuotes + * const goldPriceQuotes = await prisma.goldPriceQuote.findMany({ take: 10 }) + * + * // Only select the `id` + * const goldPriceQuoteWithIdOnly = await prisma.goldPriceQuote.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a GoldPriceQuote. + * @param {GoldPriceQuoteCreateArgs} args - Arguments to create a GoldPriceQuote. + * @example + * // Create one GoldPriceQuote + * const GoldPriceQuote = await prisma.goldPriceQuote.create({ + * data: { + * // ... data to create a GoldPriceQuote + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__GoldPriceQuoteClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many GoldPriceQuotes. + * @param {GoldPriceQuoteCreateManyArgs} args - Arguments to create many GoldPriceQuotes. + * @example + * // Create many GoldPriceQuotes + * const goldPriceQuote = await prisma.goldPriceQuote.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many GoldPriceQuotes and returns the data saved in the database. + * @param {GoldPriceQuoteCreateManyAndReturnArgs} args - Arguments to create many GoldPriceQuotes. + * @example + * // Create many GoldPriceQuotes + * const goldPriceQuote = await prisma.goldPriceQuote.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many GoldPriceQuotes and only return the `id` + * const goldPriceQuoteWithIdOnly = await prisma.goldPriceQuote.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 GoldPriceQuote. + * @param {GoldPriceQuoteDeleteArgs} args - Arguments to delete one GoldPriceQuote. + * @example + * // Delete one GoldPriceQuote + * const GoldPriceQuote = await prisma.goldPriceQuote.delete({ + * where: { + * // ... filter to delete one GoldPriceQuote + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__GoldPriceQuoteClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one GoldPriceQuote. + * @param {GoldPriceQuoteUpdateArgs} args - Arguments to update one GoldPriceQuote. + * @example + * // Update one GoldPriceQuote + * const goldPriceQuote = await prisma.goldPriceQuote.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__GoldPriceQuoteClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more GoldPriceQuotes. + * @param {GoldPriceQuoteDeleteManyArgs} args - Arguments to filter GoldPriceQuotes to delete. + * @example + * // Delete a few GoldPriceQuotes + * const { count } = await prisma.goldPriceQuote.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more GoldPriceQuotes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldPriceQuoteUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many GoldPriceQuotes + * const goldPriceQuote = await prisma.goldPriceQuote.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one GoldPriceQuote. + * @param {GoldPriceQuoteUpsertArgs} args - Arguments to update or create a GoldPriceQuote. + * @example + * // Update or create a GoldPriceQuote + * const goldPriceQuote = await prisma.goldPriceQuote.upsert({ + * create: { + * // ... data to create a GoldPriceQuote + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the GoldPriceQuote we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__GoldPriceQuoteClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of GoldPriceQuotes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldPriceQuoteCountArgs} args - Arguments to filter GoldPriceQuotes to count. + * @example + * // Count the number of GoldPriceQuotes + * const count = await prisma.goldPriceQuote.count({ + * where: { + * // ... the filter for the GoldPriceQuotes 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 GoldPriceQuote. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldPriceQuoteAggregateArgs} 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 GoldPriceQuote. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoldPriceQuoteGroupByArgs} 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 GoldPriceQuoteGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: GoldPriceQuoteGroupByArgs['orderBy'] } + : { orderBy?: GoldPriceQuoteGroupByArgs['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 ? GetGoldPriceQuoteGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the GoldPriceQuote model + */ + readonly fields: GoldPriceQuoteFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for GoldPriceQuote. + * 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__GoldPriceQuoteClient 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 GoldPriceQuote model + */ + interface GoldPriceQuoteFieldRefs { + readonly id: FieldRef<"GoldPriceQuote", 'String'> + readonly karatPerMille: FieldRef<"GoldPriceQuote", 'Int'> + readonly pricePerGramRial: FieldRef<"GoldPriceQuote", 'Decimal'> + readonly source: FieldRef<"GoldPriceQuote", 'String'> + readonly quotedAt: FieldRef<"GoldPriceQuote", 'DateTime'> + } + + + // Custom InputTypes + /** + * GoldPriceQuote findUnique + */ + export type GoldPriceQuoteFindUniqueArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + /** + * Filter, which GoldPriceQuote to fetch. + */ + where: GoldPriceQuoteWhereUniqueInput + } + + /** + * GoldPriceQuote findUniqueOrThrow + */ + export type GoldPriceQuoteFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + /** + * Filter, which GoldPriceQuote to fetch. + */ + where: GoldPriceQuoteWhereUniqueInput + } + + /** + * GoldPriceQuote findFirst + */ + export type GoldPriceQuoteFindFirstArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + /** + * Filter, which GoldPriceQuote to fetch. + */ + where?: GoldPriceQuoteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoldPriceQuotes to fetch. + */ + orderBy?: GoldPriceQuoteOrderByWithRelationInput | GoldPriceQuoteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GoldPriceQuotes. + */ + cursor?: GoldPriceQuoteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoldPriceQuotes 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` GoldPriceQuotes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GoldPriceQuotes. + */ + distinct?: GoldPriceQuoteScalarFieldEnum | GoldPriceQuoteScalarFieldEnum[] + } + + /** + * GoldPriceQuote findFirstOrThrow + */ + export type GoldPriceQuoteFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + /** + * Filter, which GoldPriceQuote to fetch. + */ + where?: GoldPriceQuoteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoldPriceQuotes to fetch. + */ + orderBy?: GoldPriceQuoteOrderByWithRelationInput | GoldPriceQuoteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GoldPriceQuotes. + */ + cursor?: GoldPriceQuoteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoldPriceQuotes 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` GoldPriceQuotes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GoldPriceQuotes. + */ + distinct?: GoldPriceQuoteScalarFieldEnum | GoldPriceQuoteScalarFieldEnum[] + } + + /** + * GoldPriceQuote findMany + */ + export type GoldPriceQuoteFindManyArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + /** + * Filter, which GoldPriceQuotes to fetch. + */ + where?: GoldPriceQuoteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoldPriceQuotes to fetch. + */ + orderBy?: GoldPriceQuoteOrderByWithRelationInput | GoldPriceQuoteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing GoldPriceQuotes. + */ + cursor?: GoldPriceQuoteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoldPriceQuotes 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` GoldPriceQuotes. + */ + skip?: number + distinct?: GoldPriceQuoteScalarFieldEnum | GoldPriceQuoteScalarFieldEnum[] + } + + /** + * GoldPriceQuote create + */ + export type GoldPriceQuoteCreateArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + /** + * The data needed to create a GoldPriceQuote. + */ + data: XOR + } + + /** + * GoldPriceQuote createMany + */ + export type GoldPriceQuoteCreateManyArgs = { + /** + * The data used to create many GoldPriceQuotes. + */ + data: GoldPriceQuoteCreateManyInput | GoldPriceQuoteCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * GoldPriceQuote createManyAndReturn + */ + export type GoldPriceQuoteCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelectCreateManyAndReturn | null + /** + * The data used to create many GoldPriceQuotes. + */ + data: GoldPriceQuoteCreateManyInput | GoldPriceQuoteCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * GoldPriceQuote update + */ + export type GoldPriceQuoteUpdateArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + /** + * The data needed to update a GoldPriceQuote. + */ + data: XOR + /** + * Choose, which GoldPriceQuote to update. + */ + where: GoldPriceQuoteWhereUniqueInput + } + + /** + * GoldPriceQuote updateMany + */ + export type GoldPriceQuoteUpdateManyArgs = { + /** + * The data used to update GoldPriceQuotes. + */ + data: XOR + /** + * Filter which GoldPriceQuotes to update + */ + where?: GoldPriceQuoteWhereInput + } + + /** + * GoldPriceQuote upsert + */ + export type GoldPriceQuoteUpsertArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + /** + * The filter to search for the GoldPriceQuote to update in case it exists. + */ + where: GoldPriceQuoteWhereUniqueInput + /** + * In case the GoldPriceQuote found by the `where` argument doesn't exist, create a new GoldPriceQuote with this data. + */ + create: XOR + /** + * In case the GoldPriceQuote was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * GoldPriceQuote delete + */ + export type GoldPriceQuoteDeleteArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + /** + * Filter which GoldPriceQuote to delete. + */ + where: GoldPriceQuoteWhereUniqueInput + } + + /** + * GoldPriceQuote deleteMany + */ + export type GoldPriceQuoteDeleteManyArgs = { + /** + * Filter which GoldPriceQuotes to delete + */ + where?: GoldPriceQuoteWhereInput + } + + /** + * GoldPriceQuote without action + */ + export type GoldPriceQuoteDefaultArgs = { + /** + * Select specific fields to fetch from the GoldPriceQuote + */ + select?: GoldPriceQuoteSelect | null + } + + + /** + * Model WalletBonus + */ + + export type AggregateWalletBonus = { + _count: WalletBonusCountAggregateOutputType | null + _avg: WalletBonusAvgAggregateOutputType | null + _sum: WalletBonusSumAggregateOutputType | null + _min: WalletBonusMinAggregateOutputType | null + _max: WalletBonusMaxAggregateOutputType | null + } + + export type WalletBonusAvgAggregateOutputType = { + goldGrams: Decimal | null + } + + export type WalletBonusSumAggregateOutputType = { + goldGrams: Decimal | null + } + + export type WalletBonusMinAggregateOutputType = { + id: string | null + customerId: string | null + orderId: string | null + goldGrams: Decimal | null + grantedAt: Date | null + expiresAt: Date | null + consumedAt: Date | null + isActive: boolean | null + } + + export type WalletBonusMaxAggregateOutputType = { + id: string | null + customerId: string | null + orderId: string | null + goldGrams: Decimal | null + grantedAt: Date | null + expiresAt: Date | null + consumedAt: Date | null + isActive: boolean | null + } + + export type WalletBonusCountAggregateOutputType = { + id: number + customerId: number + orderId: number + goldGrams: number + grantedAt: number + expiresAt: number + consumedAt: number + isActive: number + _all: number + } + + + export type WalletBonusAvgAggregateInputType = { + goldGrams?: true + } + + export type WalletBonusSumAggregateInputType = { + goldGrams?: true + } + + export type WalletBonusMinAggregateInputType = { + id?: true + customerId?: true + orderId?: true + goldGrams?: true + grantedAt?: true + expiresAt?: true + consumedAt?: true + isActive?: true + } + + export type WalletBonusMaxAggregateInputType = { + id?: true + customerId?: true + orderId?: true + goldGrams?: true + grantedAt?: true + expiresAt?: true + consumedAt?: true + isActive?: true + } + + export type WalletBonusCountAggregateInputType = { + id?: true + customerId?: true + orderId?: true + goldGrams?: true + grantedAt?: true + expiresAt?: true + consumedAt?: true + isActive?: true + _all?: true + } + + export type WalletBonusAggregateArgs = { + /** + * Filter which WalletBonus to aggregate. + */ + where?: WalletBonusWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of WalletBonuses to fetch. + */ + orderBy?: WalletBonusOrderByWithRelationInput | WalletBonusOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: WalletBonusWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` WalletBonuses 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` WalletBonuses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned WalletBonuses + **/ + _count?: true | WalletBonusCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: WalletBonusAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: WalletBonusSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: WalletBonusMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: WalletBonusMaxAggregateInputType + } + + export type GetWalletBonusAggregateType = { + [P in keyof T & keyof AggregateWalletBonus]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type WalletBonusGroupByArgs = { + where?: WalletBonusWhereInput + orderBy?: WalletBonusOrderByWithAggregationInput | WalletBonusOrderByWithAggregationInput[] + by: WalletBonusScalarFieldEnum[] | WalletBonusScalarFieldEnum + having?: WalletBonusScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: WalletBonusCountAggregateInputType | true + _avg?: WalletBonusAvgAggregateInputType + _sum?: WalletBonusSumAggregateInputType + _min?: WalletBonusMinAggregateInputType + _max?: WalletBonusMaxAggregateInputType + } + + export type WalletBonusGroupByOutputType = { + id: string + customerId: string + orderId: string | null + goldGrams: Decimal + grantedAt: Date + expiresAt: Date + consumedAt: Date | null + isActive: boolean + _count: WalletBonusCountAggregateOutputType | null + _avg: WalletBonusAvgAggregateOutputType | null + _sum: WalletBonusSumAggregateOutputType | null + _min: WalletBonusMinAggregateOutputType | null + _max: WalletBonusMaxAggregateOutputType | null + } + + type GetWalletBonusGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof WalletBonusGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type WalletBonusSelect = $Extensions.GetSelect<{ + id?: boolean + customerId?: boolean + orderId?: boolean + goldGrams?: boolean + grantedAt?: boolean + expiresAt?: boolean + consumedAt?: boolean + isActive?: boolean + customer?: boolean | CustomerDefaultArgs + }, ExtArgs["result"]["walletBonus"]> + + export type WalletBonusSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + customerId?: boolean + orderId?: boolean + goldGrams?: boolean + grantedAt?: boolean + expiresAt?: boolean + consumedAt?: boolean + isActive?: boolean + customer?: boolean | CustomerDefaultArgs + }, ExtArgs["result"]["walletBonus"]> + + export type WalletBonusSelectScalar = { + id?: boolean + customerId?: boolean + orderId?: boolean + goldGrams?: boolean + grantedAt?: boolean + expiresAt?: boolean + consumedAt?: boolean + isActive?: boolean + } + + export type WalletBonusInclude = { + customer?: boolean | CustomerDefaultArgs + } + export type WalletBonusIncludeCreateManyAndReturn = { + customer?: boolean | CustomerDefaultArgs + } + + export type $WalletBonusPayload = { + name: "WalletBonus" + objects: { + customer: Prisma.$CustomerPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + customerId: string + orderId: string | null + goldGrams: Prisma.Decimal + grantedAt: Date + expiresAt: Date + consumedAt: Date | null + isActive: boolean + }, ExtArgs["result"]["walletBonus"]> + composites: {} + } + + type WalletBonusGetPayload = $Result.GetResult + + type WalletBonusCountArgs = + Omit & { + select?: WalletBonusCountAggregateInputType | true + } + + export interface WalletBonusDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['WalletBonus'], meta: { name: 'WalletBonus' } } + /** + * Find zero or one WalletBonus that matches the filter. + * @param {WalletBonusFindUniqueArgs} args - Arguments to find a WalletBonus + * @example + * // Get one WalletBonus + * const walletBonus = await prisma.walletBonus.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__WalletBonusClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one WalletBonus that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {WalletBonusFindUniqueOrThrowArgs} args - Arguments to find a WalletBonus + * @example + * // Get one WalletBonus + * const walletBonus = await prisma.walletBonus.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__WalletBonusClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first WalletBonus 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 {WalletBonusFindFirstArgs} args - Arguments to find a WalletBonus + * @example + * // Get one WalletBonus + * const walletBonus = await prisma.walletBonus.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__WalletBonusClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first WalletBonus 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 {WalletBonusFindFirstOrThrowArgs} args - Arguments to find a WalletBonus + * @example + * // Get one WalletBonus + * const walletBonus = await prisma.walletBonus.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__WalletBonusClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more WalletBonuses 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 {WalletBonusFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all WalletBonuses + * const walletBonuses = await prisma.walletBonus.findMany() + * + * // Get first 10 WalletBonuses + * const walletBonuses = await prisma.walletBonus.findMany({ take: 10 }) + * + * // Only select the `id` + * const walletBonusWithIdOnly = await prisma.walletBonus.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a WalletBonus. + * @param {WalletBonusCreateArgs} args - Arguments to create a WalletBonus. + * @example + * // Create one WalletBonus + * const WalletBonus = await prisma.walletBonus.create({ + * data: { + * // ... data to create a WalletBonus + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__WalletBonusClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many WalletBonuses. + * @param {WalletBonusCreateManyArgs} args - Arguments to create many WalletBonuses. + * @example + * // Create many WalletBonuses + * const walletBonus = await prisma.walletBonus.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many WalletBonuses and returns the data saved in the database. + * @param {WalletBonusCreateManyAndReturnArgs} args - Arguments to create many WalletBonuses. + * @example + * // Create many WalletBonuses + * const walletBonus = await prisma.walletBonus.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many WalletBonuses and only return the `id` + * const walletBonusWithIdOnly = await prisma.walletBonus.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 WalletBonus. + * @param {WalletBonusDeleteArgs} args - Arguments to delete one WalletBonus. + * @example + * // Delete one WalletBonus + * const WalletBonus = await prisma.walletBonus.delete({ + * where: { + * // ... filter to delete one WalletBonus + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__WalletBonusClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one WalletBonus. + * @param {WalletBonusUpdateArgs} args - Arguments to update one WalletBonus. + * @example + * // Update one WalletBonus + * const walletBonus = await prisma.walletBonus.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__WalletBonusClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more WalletBonuses. + * @param {WalletBonusDeleteManyArgs} args - Arguments to filter WalletBonuses to delete. + * @example + * // Delete a few WalletBonuses + * const { count } = await prisma.walletBonus.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more WalletBonuses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WalletBonusUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many WalletBonuses + * const walletBonus = await prisma.walletBonus.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one WalletBonus. + * @param {WalletBonusUpsertArgs} args - Arguments to update or create a WalletBonus. + * @example + * // Update or create a WalletBonus + * const walletBonus = await prisma.walletBonus.upsert({ + * create: { + * // ... data to create a WalletBonus + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the WalletBonus we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__WalletBonusClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of WalletBonuses. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WalletBonusCountArgs} args - Arguments to filter WalletBonuses to count. + * @example + * // Count the number of WalletBonuses + * const count = await prisma.walletBonus.count({ + * where: { + * // ... the filter for the WalletBonuses 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 WalletBonus. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WalletBonusAggregateArgs} 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 WalletBonus. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WalletBonusGroupByArgs} 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 WalletBonusGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: WalletBonusGroupByArgs['orderBy'] } + : { orderBy?: WalletBonusGroupByArgs['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 ? GetWalletBonusGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the WalletBonus model + */ + readonly fields: WalletBonusFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for WalletBonus. + * 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__WalletBonusClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customer = {}>(args?: Subset>): Prisma__CustomerClient<$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 WalletBonus model + */ + interface WalletBonusFieldRefs { + readonly id: FieldRef<"WalletBonus", 'String'> + readonly customerId: FieldRef<"WalletBonus", 'String'> + readonly orderId: FieldRef<"WalletBonus", 'String'> + readonly goldGrams: FieldRef<"WalletBonus", 'Decimal'> + readonly grantedAt: FieldRef<"WalletBonus", 'DateTime'> + readonly expiresAt: FieldRef<"WalletBonus", 'DateTime'> + readonly consumedAt: FieldRef<"WalletBonus", 'DateTime'> + readonly isActive: FieldRef<"WalletBonus", 'Boolean'> + } + + + // Custom InputTypes + /** + * WalletBonus findUnique + */ + export type WalletBonusFindUniqueArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + /** + * Filter, which WalletBonus to fetch. + */ + where: WalletBonusWhereUniqueInput + } + + /** + * WalletBonus findUniqueOrThrow + */ + export type WalletBonusFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + /** + * Filter, which WalletBonus to fetch. + */ + where: WalletBonusWhereUniqueInput + } + + /** + * WalletBonus findFirst + */ + export type WalletBonusFindFirstArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + /** + * Filter, which WalletBonus to fetch. + */ + where?: WalletBonusWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of WalletBonuses to fetch. + */ + orderBy?: WalletBonusOrderByWithRelationInput | WalletBonusOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for WalletBonuses. + */ + cursor?: WalletBonusWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` WalletBonuses 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` WalletBonuses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of WalletBonuses. + */ + distinct?: WalletBonusScalarFieldEnum | WalletBonusScalarFieldEnum[] + } + + /** + * WalletBonus findFirstOrThrow + */ + export type WalletBonusFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + /** + * Filter, which WalletBonus to fetch. + */ + where?: WalletBonusWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of WalletBonuses to fetch. + */ + orderBy?: WalletBonusOrderByWithRelationInput | WalletBonusOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for WalletBonuses. + */ + cursor?: WalletBonusWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` WalletBonuses 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` WalletBonuses. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of WalletBonuses. + */ + distinct?: WalletBonusScalarFieldEnum | WalletBonusScalarFieldEnum[] + } + + /** + * WalletBonus findMany + */ + export type WalletBonusFindManyArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + /** + * Filter, which WalletBonuses to fetch. + */ + where?: WalletBonusWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of WalletBonuses to fetch. + */ + orderBy?: WalletBonusOrderByWithRelationInput | WalletBonusOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing WalletBonuses. + */ + cursor?: WalletBonusWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` WalletBonuses 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` WalletBonuses. + */ + skip?: number + distinct?: WalletBonusScalarFieldEnum | WalletBonusScalarFieldEnum[] + } + + /** + * WalletBonus create + */ + export type WalletBonusCreateArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + /** + * The data needed to create a WalletBonus. + */ + data: XOR + } + + /** + * WalletBonus createMany + */ + export type WalletBonusCreateManyArgs = { + /** + * The data used to create many WalletBonuses. + */ + data: WalletBonusCreateManyInput | WalletBonusCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * WalletBonus createManyAndReturn + */ + export type WalletBonusCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelectCreateManyAndReturn | null + /** + * The data used to create many WalletBonuses. + */ + data: WalletBonusCreateManyInput | WalletBonusCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusIncludeCreateManyAndReturn | null + } + + /** + * WalletBonus update + */ + export type WalletBonusUpdateArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + /** + * The data needed to update a WalletBonus. + */ + data: XOR + /** + * Choose, which WalletBonus to update. + */ + where: WalletBonusWhereUniqueInput + } + + /** + * WalletBonus updateMany + */ + export type WalletBonusUpdateManyArgs = { + /** + * The data used to update WalletBonuses. + */ + data: XOR + /** + * Filter which WalletBonuses to update + */ + where?: WalletBonusWhereInput + } + + /** + * WalletBonus upsert + */ + export type WalletBonusUpsertArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + /** + * The filter to search for the WalletBonus to update in case it exists. + */ + where: WalletBonusWhereUniqueInput + /** + * In case the WalletBonus found by the `where` argument doesn't exist, create a new WalletBonus with this data. + */ + create: XOR + /** + * In case the WalletBonus was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * WalletBonus delete + */ + export type WalletBonusDeleteArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + /** + * Filter which WalletBonus to delete. + */ + where: WalletBonusWhereUniqueInput + } + + /** + * WalletBonus deleteMany + */ + export type WalletBonusDeleteManyArgs = { + /** + * Filter which WalletBonuses to delete + */ + where?: WalletBonusWhereInput + } + + /** + * WalletBonus without action + */ + export type WalletBonusDefaultArgs = { + /** + * Select specific fields to fetch from the WalletBonus + */ + select?: WalletBonusSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WalletBonusInclude | null + } + + + /** + * Enums + */ + + export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' + }; + + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + + export const CityScalarFieldEnum: { + id: 'id', + name: 'name', + province: 'province' + }; + + export type CityScalarFieldEnum = (typeof CityScalarFieldEnum)[keyof typeof CityScalarFieldEnum] + + + export const AdminUserScalarFieldEnum: { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + passwordHash: 'passwordHash', + role: 'role', + branchId: 'branchId', + wagePercent: 'wagePercent', + isActive: 'isActive', + createdAt: 'createdAt' + }; + + export type AdminUserScalarFieldEnum = (typeof AdminUserScalarFieldEnum)[keyof typeof AdminUserScalarFieldEnum] + + + export const CustomerScalarFieldEnum: { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + nationalCode: 'nationalCode', + passwordHash: 'passwordHash', + cityId: 'cityId', + referredByAgentId: 'referredByAgentId', + goldCreditLimitGrams: 'goldCreditLimitGrams', + goldDebtGrams: 'goldDebtGrams', + fiatDebtRial: 'fiatDebtRial', + verificationStep: 'verificationStep', + nationalIdImageUrl: 'nationalIdImageUrl', + businessLicenseUrl: 'businessLicenseUrl', + shopImageUrl: 'shopImageUrl', + isActive: 'isActive', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum] + + + export const CustomerAddressScalarFieldEnum: { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + addressLine: 'addressLine', + isDefault: 'isDefault' + }; + + export type CustomerAddressScalarFieldEnum = (typeof CustomerAddressScalarFieldEnum)[keyof typeof CustomerAddressScalarFieldEnum] + + + export const BranchScalarFieldEnum: { + id: 'id', + name: 'name', + cityId: 'cityId' + }; + + export type BranchScalarFieldEnum = (typeof BranchScalarFieldEnum)[keyof typeof BranchScalarFieldEnum] + + + export const WorkshopScalarFieldEnum: { + id: 'id', + name: 'name', + isActive: 'isActive' + }; + + export type WorkshopScalarFieldEnum = (typeof WorkshopScalarFieldEnum)[keyof typeof WorkshopScalarFieldEnum] + + + export const CategoryScalarFieldEnum: { + id: 'id', + title: 'title', + parentId: 'parentId' + }; + + export type CategoryScalarFieldEnum = (typeof CategoryScalarFieldEnum)[keyof typeof CategoryScalarFieldEnum] + + + export const BrandScalarFieldEnum: { + id: 'id', + title: 'title' + }; + + export type BrandScalarFieldEnum = (typeof BrandScalarFieldEnum)[keyof typeof BrandScalarFieldEnum] + + + export const CollectionScalarFieldEnum: { + id: 'id', + title: 'title', + description: 'description', + isActive: 'isActive' + }; + + export type CollectionScalarFieldEnum = (typeof CollectionScalarFieldEnum)[keyof typeof CollectionScalarFieldEnum] + + + export const CollectionProductScalarFieldEnum: { + collectionId: 'collectionId', + productId: 'productId' + }; + + export type CollectionProductScalarFieldEnum = (typeof CollectionProductScalarFieldEnum)[keyof typeof CollectionProductScalarFieldEnum] + + + export const ProductScalarFieldEnum: { + id: 'id', + title: 'title', + description: 'description', + categoryId: 'categoryId', + brandId: 'brandId', + isActive: 'isActive', + createdAt: 'createdAt' + }; + + export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] + + + export const ProductImageScalarFieldEnum: { + id: 'id', + productId: 'productId', + url: 'url', + sortOrder: 'sortOrder' + }; + + export type ProductImageScalarFieldEnum = (typeof ProductImageScalarFieldEnum)[keyof typeof ProductImageScalarFieldEnum] + + + export const ProductVariantScalarFieldEnum: { + id: 'id', + productId: 'productId', + title: 'title', + sku: 'sku', + rashWeightGrams: 'rashWeightGrams', + defaultWagePercent: 'defaultWagePercent', + isActive: 'isActive' + }; + + export type ProductVariantScalarFieldEnum = (typeof ProductVariantScalarFieldEnum)[keyof typeof ProductVariantScalarFieldEnum] + + + export const OrderScalarFieldEnum: { + id: 'id', + orderNumber: 'orderNumber', + customerId: 'customerId', + branchId: 'branchId', + status: 'status', + totalGoldWeightGrams: 'totalGoldWeightGrams', + wageWeightGrams: 'wageWeightGrams', + flatRialCharge: 'flatRialCharge', + isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', + deliveredAt: 'deliveredAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] + + + export const OrderItemScalarFieldEnum: { + id: 'id', + orderId: 'orderId', + productVariantId: 'productVariantId', + quantity: 'quantity', + rashWeightGramsSnapshot: 'rashWeightGramsSnapshot', + wagePercentSnapshot: 'wagePercentSnapshot', + discountPercentSnapshot: 'discountPercentSnapshot', + computedWeightGrams: 'computedWeightGrams', + flatRialCharge: 'flatRialCharge' + }; + + export type OrderItemScalarFieldEnum = (typeof OrderItemScalarFieldEnum)[keyof typeof OrderItemScalarFieldEnum] + + + export const OrderStatusEventScalarFieldEnum: { + id: 'id', + orderId: 'orderId', + fromStatus: 'fromStatus', + toStatus: 'toStatus', + note: 'note', + actorAdminUserId: 'actorAdminUserId', + createdAt: 'createdAt' + }; + + export type OrderStatusEventScalarFieldEnum = (typeof OrderStatusEventScalarFieldEnum)[keyof typeof OrderStatusEventScalarFieldEnum] + + + export const PreOrderScalarFieldEnum: { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + workshopId: 'workshopId', + status: 'status', + designImageUrl: 'designImageUrl', + colorName: 'colorName', + sizeSpec: 'sizeSpec', + stoneColor: 'stoneColor', + minaColor: 'minaColor', + estimatedWeightGrams: 'estimatedWeightGrams', + estimatedPriceRial: 'estimatedPriceRial', + description: 'description', + convertedOrderId: 'convertedOrderId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type PreOrderScalarFieldEnum = (typeof PreOrderScalarFieldEnum)[keyof typeof PreOrderScalarFieldEnum] + + + export const PreOrderStatusEventScalarFieldEnum: { + id: 'id', + preOrderId: 'preOrderId', + changes: 'changes', + actorAdminUserId: 'actorAdminUserId', + ipAddress: 'ipAddress', + createdAt: 'createdAt' + }; + + export type PreOrderStatusEventScalarFieldEnum = (typeof PreOrderStatusEventScalarFieldEnum)[keyof typeof PreOrderStatusEventScalarFieldEnum] + + + export const LedgerEntryScalarFieldEnum: { + id: 'id', + customerId: 'customerId', + currency: 'currency', + direction: 'direction', + sourceType: 'sourceType', + amount: 'amount', + karatPerMille: 'karatPerMille', + pricePerGramRialAtEntry: 'pricePerGramRialAtEntry', + orderId: 'orderId', + confirmed: 'confirmed', + confirmedAt: 'confirmedAt', + postedByAdminUserId: 'postedByAdminUserId', + note: 'note', + createdAt: 'createdAt' + }; + + export type LedgerEntryScalarFieldEnum = (typeof LedgerEntryScalarFieldEnum)[keyof typeof LedgerEntryScalarFieldEnum] + + + export const GoldPriceQuoteScalarFieldEnum: { + id: 'id', + karatPerMille: 'karatPerMille', + pricePerGramRial: 'pricePerGramRial', + source: 'source', + quotedAt: 'quotedAt' + }; + + export type GoldPriceQuoteScalarFieldEnum = (typeof GoldPriceQuoteScalarFieldEnum)[keyof typeof GoldPriceQuoteScalarFieldEnum] + + + export const WalletBonusScalarFieldEnum: { + id: 'id', + customerId: 'customerId', + orderId: 'orderId', + goldGrams: 'goldGrams', + grantedAt: 'grantedAt', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + isActive: 'isActive' + }; + + export type WalletBonusScalarFieldEnum = (typeof WalletBonusScalarFieldEnum)[keyof typeof WalletBonusScalarFieldEnum] + + + export const SortOrder: { + asc: 'asc', + desc: 'desc' + }; + + export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + + export const JsonNullValueInput: { + JsonNull: typeof JsonNull + }; + + export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] + + + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' + }; + + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + + export const NullsOrder: { + first: 'first', + last: 'last' + }; + + export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + export const JsonNullValueFilter: { + DbNull: typeof DbNull, + JsonNull: typeof JsonNull, + AnyNull: typeof AnyNull + }; + + export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] + + + /** + * Field references + */ + + + /** + * Reference to a field of type 'String' + */ + export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + + /** + * Reference to a field of type 'String[]' + */ + export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> + + + + /** + * Reference to a field of type 'AdminRole' + */ + export type EnumAdminRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminRole'> + + + + /** + * Reference to a field of type 'AdminRole[]' + */ + export type ListEnumAdminRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminRole[]'> + + + + /** + * Reference to a field of type 'Decimal' + */ + export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'> + + + + /** + * Reference to a field of type 'Decimal[]' + */ + export type ListDecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal[]'> + + + + /** + * Reference to a field of type 'Boolean' + */ + export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + + /** + * Reference to a field of type 'DateTime' + */ + export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + + /** + * Reference to a field of type 'DateTime[]' + */ + export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + + /** + * Reference to a field of type 'VerificationStep' + */ + export type EnumVerificationStepFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'VerificationStep'> + + + + /** + * Reference to a field of type 'VerificationStep[]' + */ + export type ListEnumVerificationStepFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'VerificationStep[]'> + + + + /** + * Reference to a field of type 'Int' + */ + export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + + /** + * Reference to a field of type 'Int[]' + */ + export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + + /** + * Reference to a field of type 'OrderStatus' + */ + export type EnumOrderStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'OrderStatus'> + + + + /** + * Reference to a field of type 'OrderStatus[]' + */ + export type ListEnumOrderStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'OrderStatus[]'> + + + + /** + * Reference to a field of type 'PreOrderStatus' + */ + export type EnumPreOrderStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PreOrderStatus'> + + + + /** + * Reference to a field of type 'PreOrderStatus[]' + */ + export type ListEnumPreOrderStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PreOrderStatus[]'> + + + + /** + * Reference to a field of type 'Json' + */ + export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'> + + + + /** + * Reference to a field of type 'LedgerCurrency' + */ + export type EnumLedgerCurrencyFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'LedgerCurrency'> + + + + /** + * Reference to a field of type 'LedgerCurrency[]' + */ + export type ListEnumLedgerCurrencyFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'LedgerCurrency[]'> + + + + /** + * Reference to a field of type 'LedgerDirection' + */ + export type EnumLedgerDirectionFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'LedgerDirection'> + + + + /** + * Reference to a field of type 'LedgerDirection[]' + */ + export type ListEnumLedgerDirectionFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'LedgerDirection[]'> + + + + /** + * Reference to a field of type 'LedgerSourceType' + */ + export type EnumLedgerSourceTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'LedgerSourceType'> + + + + /** + * Reference to a field of type 'LedgerSourceType[]' + */ + export type ListEnumLedgerSourceTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'LedgerSourceType[]'> + + + + /** + * Reference to a field of type 'Float' + */ + export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + + /** + * Reference to a field of type 'Float[]' + */ + export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + + /** + * Deep Input Types + */ + + + export type CityWhereInput = { + AND?: CityWhereInput | CityWhereInput[] + OR?: CityWhereInput[] + NOT?: CityWhereInput | CityWhereInput[] + id?: StringFilter<"City"> | string + name?: StringFilter<"City"> | string + province?: StringNullableFilter<"City"> | string | null + customers?: CustomerListRelationFilter + addresses?: CustomerAddressListRelationFilter + branches?: BranchListRelationFilter + preOrders?: PreOrderListRelationFilter + } + + export type CityOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + province?: SortOrderInput | SortOrder + customers?: CustomerOrderByRelationAggregateInput + addresses?: CustomerAddressOrderByRelationAggregateInput + branches?: BranchOrderByRelationAggregateInput + preOrders?: PreOrderOrderByRelationAggregateInput + } + + export type CityWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: CityWhereInput | CityWhereInput[] + OR?: CityWhereInput[] + NOT?: CityWhereInput | CityWhereInput[] + name?: StringFilter<"City"> | string + province?: StringNullableFilter<"City"> | string | null + customers?: CustomerListRelationFilter + addresses?: CustomerAddressListRelationFilter + branches?: BranchListRelationFilter + preOrders?: PreOrderListRelationFilter + }, "id"> + + export type CityOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + province?: SortOrderInput | SortOrder + _count?: CityCountOrderByAggregateInput + _max?: CityMaxOrderByAggregateInput + _min?: CityMinOrderByAggregateInput + } + + export type CityScalarWhereWithAggregatesInput = { + AND?: CityScalarWhereWithAggregatesInput | CityScalarWhereWithAggregatesInput[] + OR?: CityScalarWhereWithAggregatesInput[] + NOT?: CityScalarWhereWithAggregatesInput | CityScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"City"> | string + name?: StringWithAggregatesFilter<"City"> | string + province?: StringNullableWithAggregatesFilter<"City"> | string | null + } + + export type AdminUserWhereInput = { + AND?: AdminUserWhereInput | AdminUserWhereInput[] + OR?: AdminUserWhereInput[] + NOT?: AdminUserWhereInput | AdminUserWhereInput[] + id?: StringFilter<"AdminUser"> | string + fullName?: StringFilter<"AdminUser"> | string + mobile?: StringFilter<"AdminUser"> | string + passwordHash?: StringFilter<"AdminUser"> | string + role?: EnumAdminRoleFilter<"AdminUser"> | $Enums.AdminRole + branchId?: StringNullableFilter<"AdminUser"> | string | null + wagePercent?: DecimalNullableFilter<"AdminUser"> | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFilter<"AdminUser"> | boolean + createdAt?: DateTimeFilter<"AdminUser"> | Date | string + branch?: XOR | null + referredCustomers?: CustomerListRelationFilter + postedLedgerEntries?: LedgerEntryListRelationFilter + orderStatusEvents?: OrderStatusEventListRelationFilter + preOrderStatusEvents?: PreOrderStatusEventListRelationFilter + } + + export type AdminUserOrderByWithRelationInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + branchId?: SortOrderInput | SortOrder + wagePercent?: SortOrderInput | SortOrder + isActive?: SortOrder + createdAt?: SortOrder + branch?: BranchOrderByWithRelationInput + referredCustomers?: CustomerOrderByRelationAggregateInput + postedLedgerEntries?: LedgerEntryOrderByRelationAggregateInput + orderStatusEvents?: OrderStatusEventOrderByRelationAggregateInput + preOrderStatusEvents?: PreOrderStatusEventOrderByRelationAggregateInput + } + + export type AdminUserWhereUniqueInput = Prisma.AtLeast<{ + id?: string + mobile?: string + AND?: AdminUserWhereInput | AdminUserWhereInput[] + OR?: AdminUserWhereInput[] + NOT?: AdminUserWhereInput | AdminUserWhereInput[] + fullName?: StringFilter<"AdminUser"> | string + passwordHash?: StringFilter<"AdminUser"> | string + role?: EnumAdminRoleFilter<"AdminUser"> | $Enums.AdminRole + branchId?: StringNullableFilter<"AdminUser"> | string | null + wagePercent?: DecimalNullableFilter<"AdminUser"> | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFilter<"AdminUser"> | boolean + createdAt?: DateTimeFilter<"AdminUser"> | Date | string + branch?: XOR | null + referredCustomers?: CustomerListRelationFilter + postedLedgerEntries?: LedgerEntryListRelationFilter + orderStatusEvents?: OrderStatusEventListRelationFilter + preOrderStatusEvents?: PreOrderStatusEventListRelationFilter + }, "id" | "mobile"> + + export type AdminUserOrderByWithAggregationInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + branchId?: SortOrderInput | SortOrder + wagePercent?: SortOrderInput | SortOrder + isActive?: SortOrder + createdAt?: SortOrder + _count?: AdminUserCountOrderByAggregateInput + _avg?: AdminUserAvgOrderByAggregateInput + _max?: AdminUserMaxOrderByAggregateInput + _min?: AdminUserMinOrderByAggregateInput + _sum?: AdminUserSumOrderByAggregateInput + } + + export type AdminUserScalarWhereWithAggregatesInput = { + AND?: AdminUserScalarWhereWithAggregatesInput | AdminUserScalarWhereWithAggregatesInput[] + OR?: AdminUserScalarWhereWithAggregatesInput[] + NOT?: AdminUserScalarWhereWithAggregatesInput | AdminUserScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"AdminUser"> | string + fullName?: StringWithAggregatesFilter<"AdminUser"> | string + mobile?: StringWithAggregatesFilter<"AdminUser"> | string + passwordHash?: StringWithAggregatesFilter<"AdminUser"> | string + role?: EnumAdminRoleWithAggregatesFilter<"AdminUser"> | $Enums.AdminRole + branchId?: StringNullableWithAggregatesFilter<"AdminUser"> | string | null + wagePercent?: DecimalNullableWithAggregatesFilter<"AdminUser"> | Decimal | DecimalJsLike | number | string | null + isActive?: BoolWithAggregatesFilter<"AdminUser"> | boolean + createdAt?: DateTimeWithAggregatesFilter<"AdminUser"> | Date | string + } + + export type CustomerWhereInput = { + AND?: CustomerWhereInput | CustomerWhereInput[] + OR?: CustomerWhereInput[] + NOT?: CustomerWhereInput | CustomerWhereInput[] + id?: StringFilter<"Customer"> | string + fullName?: StringFilter<"Customer"> | string + mobile?: StringFilter<"Customer"> | string + nationalCode?: StringFilter<"Customer"> | string + passwordHash?: StringFilter<"Customer"> | string + cityId?: StringNullableFilter<"Customer"> | string | null + referredByAgentId?: StringNullableFilter<"Customer"> | string | null + goldCreditLimitGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFilter<"Customer"> | $Enums.VerificationStep + nationalIdImageUrl?: StringNullableFilter<"Customer"> | string | null + businessLicenseUrl?: StringNullableFilter<"Customer"> | string | null + shopImageUrl?: StringNullableFilter<"Customer"> | string | null + isActive?: BoolFilter<"Customer"> | boolean + createdAt?: DateTimeFilter<"Customer"> | Date | string + updatedAt?: DateTimeFilter<"Customer"> | Date | string + city?: XOR | null + referredByAgent?: XOR | null + addresses?: CustomerAddressListRelationFilter + orders?: OrderListRelationFilter + preOrders?: PreOrderListRelationFilter + ledgerEntries?: LedgerEntryListRelationFilter + walletBonuses?: WalletBonusListRelationFilter + } + + export type CustomerOrderByWithRelationInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + nationalCode?: SortOrder + passwordHash?: SortOrder + cityId?: SortOrderInput | SortOrder + referredByAgentId?: SortOrderInput | SortOrder + goldCreditLimitGrams?: SortOrder + goldDebtGrams?: SortOrder + fiatDebtRial?: SortOrder + verificationStep?: SortOrder + nationalIdImageUrl?: SortOrderInput | SortOrder + businessLicenseUrl?: SortOrderInput | SortOrder + shopImageUrl?: SortOrderInput | SortOrder + isActive?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + city?: CityOrderByWithRelationInput + referredByAgent?: AdminUserOrderByWithRelationInput + addresses?: CustomerAddressOrderByRelationAggregateInput + orders?: OrderOrderByRelationAggregateInput + preOrders?: PreOrderOrderByRelationAggregateInput + ledgerEntries?: LedgerEntryOrderByRelationAggregateInput + walletBonuses?: WalletBonusOrderByRelationAggregateInput + } + + export type CustomerWhereUniqueInput = Prisma.AtLeast<{ + id?: string + mobile?: string + nationalCode?: string + AND?: CustomerWhereInput | CustomerWhereInput[] + OR?: CustomerWhereInput[] + NOT?: CustomerWhereInput | CustomerWhereInput[] + fullName?: StringFilter<"Customer"> | string + passwordHash?: StringFilter<"Customer"> | string + cityId?: StringNullableFilter<"Customer"> | string | null + referredByAgentId?: StringNullableFilter<"Customer"> | string | null + goldCreditLimitGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFilter<"Customer"> | $Enums.VerificationStep + nationalIdImageUrl?: StringNullableFilter<"Customer"> | string | null + businessLicenseUrl?: StringNullableFilter<"Customer"> | string | null + shopImageUrl?: StringNullableFilter<"Customer"> | string | null + isActive?: BoolFilter<"Customer"> | boolean + createdAt?: DateTimeFilter<"Customer"> | Date | string + updatedAt?: DateTimeFilter<"Customer"> | Date | string + city?: XOR | null + referredByAgent?: XOR | null + addresses?: CustomerAddressListRelationFilter + orders?: OrderListRelationFilter + preOrders?: PreOrderListRelationFilter + ledgerEntries?: LedgerEntryListRelationFilter + walletBonuses?: WalletBonusListRelationFilter + }, "id" | "mobile" | "nationalCode"> + + export type CustomerOrderByWithAggregationInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + nationalCode?: SortOrder + passwordHash?: SortOrder + cityId?: SortOrderInput | SortOrder + referredByAgentId?: SortOrderInput | SortOrder + goldCreditLimitGrams?: SortOrder + goldDebtGrams?: SortOrder + fiatDebtRial?: SortOrder + verificationStep?: SortOrder + nationalIdImageUrl?: SortOrderInput | SortOrder + businessLicenseUrl?: SortOrderInput | SortOrder + shopImageUrl?: SortOrderInput | SortOrder + isActive?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: CustomerCountOrderByAggregateInput + _avg?: CustomerAvgOrderByAggregateInput + _max?: CustomerMaxOrderByAggregateInput + _min?: CustomerMinOrderByAggregateInput + _sum?: CustomerSumOrderByAggregateInput + } + + export type CustomerScalarWhereWithAggregatesInput = { + AND?: CustomerScalarWhereWithAggregatesInput | CustomerScalarWhereWithAggregatesInput[] + OR?: CustomerScalarWhereWithAggregatesInput[] + NOT?: CustomerScalarWhereWithAggregatesInput | CustomerScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Customer"> | string + fullName?: StringWithAggregatesFilter<"Customer"> | string + mobile?: StringWithAggregatesFilter<"Customer"> | string + nationalCode?: StringWithAggregatesFilter<"Customer"> | string + passwordHash?: StringWithAggregatesFilter<"Customer"> | string + cityId?: StringNullableWithAggregatesFilter<"Customer"> | string | null + referredByAgentId?: StringNullableWithAggregatesFilter<"Customer"> | string | null + goldCreditLimitGrams?: DecimalWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepWithAggregatesFilter<"Customer"> | $Enums.VerificationStep + nationalIdImageUrl?: StringNullableWithAggregatesFilter<"Customer"> | string | null + businessLicenseUrl?: StringNullableWithAggregatesFilter<"Customer"> | string | null + shopImageUrl?: StringNullableWithAggregatesFilter<"Customer"> | string | null + isActive?: BoolWithAggregatesFilter<"Customer"> | boolean + createdAt?: DateTimeWithAggregatesFilter<"Customer"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"Customer"> | Date | string + } + + export type CustomerAddressWhereInput = { + AND?: CustomerAddressWhereInput | CustomerAddressWhereInput[] + OR?: CustomerAddressWhereInput[] + NOT?: CustomerAddressWhereInput | CustomerAddressWhereInput[] + id?: StringFilter<"CustomerAddress"> | string + customerId?: StringFilter<"CustomerAddress"> | string + cityId?: StringNullableFilter<"CustomerAddress"> | string | null + addressLine?: StringFilter<"CustomerAddress"> | string + isDefault?: BoolFilter<"CustomerAddress"> | boolean + customer?: XOR + city?: XOR | null + } + + export type CustomerAddressOrderByWithRelationInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrderInput | SortOrder + addressLine?: SortOrder + isDefault?: SortOrder + customer?: CustomerOrderByWithRelationInput + city?: CityOrderByWithRelationInput + } + + export type CustomerAddressWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: CustomerAddressWhereInput | CustomerAddressWhereInput[] + OR?: CustomerAddressWhereInput[] + NOT?: CustomerAddressWhereInput | CustomerAddressWhereInput[] + customerId?: StringFilter<"CustomerAddress"> | string + cityId?: StringNullableFilter<"CustomerAddress"> | string | null + addressLine?: StringFilter<"CustomerAddress"> | string + isDefault?: BoolFilter<"CustomerAddress"> | boolean + customer?: XOR + city?: XOR | null + }, "id"> + + export type CustomerAddressOrderByWithAggregationInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrderInput | SortOrder + addressLine?: SortOrder + isDefault?: SortOrder + _count?: CustomerAddressCountOrderByAggregateInput + _max?: CustomerAddressMaxOrderByAggregateInput + _min?: CustomerAddressMinOrderByAggregateInput + } + + export type CustomerAddressScalarWhereWithAggregatesInput = { + AND?: CustomerAddressScalarWhereWithAggregatesInput | CustomerAddressScalarWhereWithAggregatesInput[] + OR?: CustomerAddressScalarWhereWithAggregatesInput[] + NOT?: CustomerAddressScalarWhereWithAggregatesInput | CustomerAddressScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"CustomerAddress"> | string + customerId?: StringWithAggregatesFilter<"CustomerAddress"> | string + cityId?: StringNullableWithAggregatesFilter<"CustomerAddress"> | string | null + addressLine?: StringWithAggregatesFilter<"CustomerAddress"> | string + isDefault?: BoolWithAggregatesFilter<"CustomerAddress"> | boolean + } + + export type BranchWhereInput = { + AND?: BranchWhereInput | BranchWhereInput[] + OR?: BranchWhereInput[] + NOT?: BranchWhereInput | BranchWhereInput[] + id?: StringFilter<"Branch"> | string + name?: StringFilter<"Branch"> | string + cityId?: StringNullableFilter<"Branch"> | string | null + city?: XOR | null + adminUsers?: AdminUserListRelationFilter + orders?: OrderListRelationFilter + } + + export type BranchOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + cityId?: SortOrderInput | SortOrder + city?: CityOrderByWithRelationInput + adminUsers?: AdminUserOrderByRelationAggregateInput + orders?: OrderOrderByRelationAggregateInput + } + + export type BranchWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: BranchWhereInput | BranchWhereInput[] + OR?: BranchWhereInput[] + NOT?: BranchWhereInput | BranchWhereInput[] + name?: StringFilter<"Branch"> | string + cityId?: StringNullableFilter<"Branch"> | string | null + city?: XOR | null + adminUsers?: AdminUserListRelationFilter + orders?: OrderListRelationFilter + }, "id"> + + export type BranchOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + cityId?: SortOrderInput | SortOrder + _count?: BranchCountOrderByAggregateInput + _max?: BranchMaxOrderByAggregateInput + _min?: BranchMinOrderByAggregateInput + } + + export type BranchScalarWhereWithAggregatesInput = { + AND?: BranchScalarWhereWithAggregatesInput | BranchScalarWhereWithAggregatesInput[] + OR?: BranchScalarWhereWithAggregatesInput[] + NOT?: BranchScalarWhereWithAggregatesInput | BranchScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Branch"> | string + name?: StringWithAggregatesFilter<"Branch"> | string + cityId?: StringNullableWithAggregatesFilter<"Branch"> | string | null + } + + export type WorkshopWhereInput = { + AND?: WorkshopWhereInput | WorkshopWhereInput[] + OR?: WorkshopWhereInput[] + NOT?: WorkshopWhereInput | WorkshopWhereInput[] + id?: StringFilter<"Workshop"> | string + name?: StringFilter<"Workshop"> | string + isActive?: BoolFilter<"Workshop"> | boolean + preOrders?: PreOrderListRelationFilter + } + + export type WorkshopOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + isActive?: SortOrder + preOrders?: PreOrderOrderByRelationAggregateInput + } + + export type WorkshopWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: WorkshopWhereInput | WorkshopWhereInput[] + OR?: WorkshopWhereInput[] + NOT?: WorkshopWhereInput | WorkshopWhereInput[] + name?: StringFilter<"Workshop"> | string + isActive?: BoolFilter<"Workshop"> | boolean + preOrders?: PreOrderListRelationFilter + }, "id"> + + export type WorkshopOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + isActive?: SortOrder + _count?: WorkshopCountOrderByAggregateInput + _max?: WorkshopMaxOrderByAggregateInput + _min?: WorkshopMinOrderByAggregateInput + } + + export type WorkshopScalarWhereWithAggregatesInput = { + AND?: WorkshopScalarWhereWithAggregatesInput | WorkshopScalarWhereWithAggregatesInput[] + OR?: WorkshopScalarWhereWithAggregatesInput[] + NOT?: WorkshopScalarWhereWithAggregatesInput | WorkshopScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Workshop"> | string + name?: StringWithAggregatesFilter<"Workshop"> | string + isActive?: BoolWithAggregatesFilter<"Workshop"> | boolean + } + + export type CategoryWhereInput = { + AND?: CategoryWhereInput | CategoryWhereInput[] + OR?: CategoryWhereInput[] + NOT?: CategoryWhereInput | CategoryWhereInput[] + id?: StringFilter<"Category"> | string + title?: StringFilter<"Category"> | string + parentId?: StringNullableFilter<"Category"> | string | null + parent?: XOR | null + children?: CategoryListRelationFilter + products?: ProductListRelationFilter + } + + export type CategoryOrderByWithRelationInput = { + id?: SortOrder + title?: SortOrder + parentId?: SortOrderInput | SortOrder + parent?: CategoryOrderByWithRelationInput + children?: CategoryOrderByRelationAggregateInput + products?: ProductOrderByRelationAggregateInput + } + + export type CategoryWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: CategoryWhereInput | CategoryWhereInput[] + OR?: CategoryWhereInput[] + NOT?: CategoryWhereInput | CategoryWhereInput[] + title?: StringFilter<"Category"> | string + parentId?: StringNullableFilter<"Category"> | string | null + parent?: XOR | null + children?: CategoryListRelationFilter + products?: ProductListRelationFilter + }, "id"> + + export type CategoryOrderByWithAggregationInput = { + id?: SortOrder + title?: SortOrder + parentId?: SortOrderInput | SortOrder + _count?: CategoryCountOrderByAggregateInput + _max?: CategoryMaxOrderByAggregateInput + _min?: CategoryMinOrderByAggregateInput + } + + export type CategoryScalarWhereWithAggregatesInput = { + AND?: CategoryScalarWhereWithAggregatesInput | CategoryScalarWhereWithAggregatesInput[] + OR?: CategoryScalarWhereWithAggregatesInput[] + NOT?: CategoryScalarWhereWithAggregatesInput | CategoryScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Category"> | string + title?: StringWithAggregatesFilter<"Category"> | string + parentId?: StringNullableWithAggregatesFilter<"Category"> | string | null + } + + export type BrandWhereInput = { + AND?: BrandWhereInput | BrandWhereInput[] + OR?: BrandWhereInput[] + NOT?: BrandWhereInput | BrandWhereInput[] + id?: StringFilter<"Brand"> | string + title?: StringFilter<"Brand"> | string + products?: ProductListRelationFilter + } + + export type BrandOrderByWithRelationInput = { + id?: SortOrder + title?: SortOrder + products?: ProductOrderByRelationAggregateInput + } + + export type BrandWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: BrandWhereInput | BrandWhereInput[] + OR?: BrandWhereInput[] + NOT?: BrandWhereInput | BrandWhereInput[] + title?: StringFilter<"Brand"> | string + products?: ProductListRelationFilter + }, "id"> + + export type BrandOrderByWithAggregationInput = { + id?: SortOrder + title?: SortOrder + _count?: BrandCountOrderByAggregateInput + _max?: BrandMaxOrderByAggregateInput + _min?: BrandMinOrderByAggregateInput + } + + export type BrandScalarWhereWithAggregatesInput = { + AND?: BrandScalarWhereWithAggregatesInput | BrandScalarWhereWithAggregatesInput[] + OR?: BrandScalarWhereWithAggregatesInput[] + NOT?: BrandScalarWhereWithAggregatesInput | BrandScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Brand"> | string + title?: StringWithAggregatesFilter<"Brand"> | string + } + + export type CollectionWhereInput = { + AND?: CollectionWhereInput | CollectionWhereInput[] + OR?: CollectionWhereInput[] + NOT?: CollectionWhereInput | CollectionWhereInput[] + id?: StringFilter<"Collection"> | string + title?: StringFilter<"Collection"> | string + description?: StringNullableFilter<"Collection"> | string | null + isActive?: BoolFilter<"Collection"> | boolean + products?: CollectionProductListRelationFilter + } + + export type CollectionOrderByWithRelationInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + products?: CollectionProductOrderByRelationAggregateInput + } + + export type CollectionWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: CollectionWhereInput | CollectionWhereInput[] + OR?: CollectionWhereInput[] + NOT?: CollectionWhereInput | CollectionWhereInput[] + title?: StringFilter<"Collection"> | string + description?: StringNullableFilter<"Collection"> | string | null + isActive?: BoolFilter<"Collection"> | boolean + products?: CollectionProductListRelationFilter + }, "id"> + + export type CollectionOrderByWithAggregationInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrderInput | SortOrder + isActive?: SortOrder + _count?: CollectionCountOrderByAggregateInput + _max?: CollectionMaxOrderByAggregateInput + _min?: CollectionMinOrderByAggregateInput + } + + export type CollectionScalarWhereWithAggregatesInput = { + AND?: CollectionScalarWhereWithAggregatesInput | CollectionScalarWhereWithAggregatesInput[] + OR?: CollectionScalarWhereWithAggregatesInput[] + NOT?: CollectionScalarWhereWithAggregatesInput | CollectionScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Collection"> | string + title?: StringWithAggregatesFilter<"Collection"> | string + description?: StringNullableWithAggregatesFilter<"Collection"> | string | null + isActive?: BoolWithAggregatesFilter<"Collection"> | boolean + } + + export type CollectionProductWhereInput = { + AND?: CollectionProductWhereInput | CollectionProductWhereInput[] + OR?: CollectionProductWhereInput[] + NOT?: CollectionProductWhereInput | CollectionProductWhereInput[] + collectionId?: StringFilter<"CollectionProduct"> | string + productId?: StringFilter<"CollectionProduct"> | string + collection?: XOR + product?: XOR + } + + export type CollectionProductOrderByWithRelationInput = { + collectionId?: SortOrder + productId?: SortOrder + collection?: CollectionOrderByWithRelationInput + product?: ProductOrderByWithRelationInput + } + + export type CollectionProductWhereUniqueInput = Prisma.AtLeast<{ + collectionId_productId?: CollectionProductCollectionIdProductIdCompoundUniqueInput + AND?: CollectionProductWhereInput | CollectionProductWhereInput[] + OR?: CollectionProductWhereInput[] + NOT?: CollectionProductWhereInput | CollectionProductWhereInput[] + collectionId?: StringFilter<"CollectionProduct"> | string + productId?: StringFilter<"CollectionProduct"> | string + collection?: XOR + product?: XOR + }, "collectionId_productId"> + + export type CollectionProductOrderByWithAggregationInput = { + collectionId?: SortOrder + productId?: SortOrder + _count?: CollectionProductCountOrderByAggregateInput + _max?: CollectionProductMaxOrderByAggregateInput + _min?: CollectionProductMinOrderByAggregateInput + } + + export type CollectionProductScalarWhereWithAggregatesInput = { + AND?: CollectionProductScalarWhereWithAggregatesInput | CollectionProductScalarWhereWithAggregatesInput[] + OR?: CollectionProductScalarWhereWithAggregatesInput[] + NOT?: CollectionProductScalarWhereWithAggregatesInput | CollectionProductScalarWhereWithAggregatesInput[] + collectionId?: StringWithAggregatesFilter<"CollectionProduct"> | string + productId?: StringWithAggregatesFilter<"CollectionProduct"> | string + } + + export type ProductWhereInput = { + AND?: ProductWhereInput | ProductWhereInput[] + OR?: ProductWhereInput[] + NOT?: ProductWhereInput | ProductWhereInput[] + id?: StringFilter<"Product"> | string + title?: StringFilter<"Product"> | string + description?: StringNullableFilter<"Product"> | string | null + categoryId?: StringNullableFilter<"Product"> | string | null + brandId?: StringNullableFilter<"Product"> | string | null + isActive?: BoolFilter<"Product"> | boolean + createdAt?: DateTimeFilter<"Product"> | Date | string + category?: XOR | null + brand?: XOR | null + variants?: ProductVariantListRelationFilter + images?: ProductImageListRelationFilter + collections?: CollectionProductListRelationFilter + } + + export type ProductOrderByWithRelationInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrderInput | SortOrder + categoryId?: SortOrderInput | SortOrder + brandId?: SortOrderInput | SortOrder + isActive?: SortOrder + createdAt?: SortOrder + category?: CategoryOrderByWithRelationInput + brand?: BrandOrderByWithRelationInput + variants?: ProductVariantOrderByRelationAggregateInput + images?: ProductImageOrderByRelationAggregateInput + collections?: CollectionProductOrderByRelationAggregateInput + } + + export type ProductWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ProductWhereInput | ProductWhereInput[] + OR?: ProductWhereInput[] + NOT?: ProductWhereInput | ProductWhereInput[] + title?: StringFilter<"Product"> | string + description?: StringNullableFilter<"Product"> | string | null + categoryId?: StringNullableFilter<"Product"> | string | null + brandId?: StringNullableFilter<"Product"> | string | null + isActive?: BoolFilter<"Product"> | boolean + createdAt?: DateTimeFilter<"Product"> | Date | string + category?: XOR | null + brand?: XOR | null + variants?: ProductVariantListRelationFilter + images?: ProductImageListRelationFilter + collections?: CollectionProductListRelationFilter + }, "id"> + + export type ProductOrderByWithAggregationInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrderInput | SortOrder + categoryId?: SortOrderInput | SortOrder + brandId?: SortOrderInput | SortOrder + isActive?: SortOrder + createdAt?: SortOrder + _count?: ProductCountOrderByAggregateInput + _max?: ProductMaxOrderByAggregateInput + _min?: ProductMinOrderByAggregateInput + } + + export type ProductScalarWhereWithAggregatesInput = { + AND?: ProductScalarWhereWithAggregatesInput | ProductScalarWhereWithAggregatesInput[] + OR?: ProductScalarWhereWithAggregatesInput[] + NOT?: ProductScalarWhereWithAggregatesInput | ProductScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Product"> | string + title?: StringWithAggregatesFilter<"Product"> | string + description?: StringNullableWithAggregatesFilter<"Product"> | string | null + categoryId?: StringNullableWithAggregatesFilter<"Product"> | string | null + brandId?: StringNullableWithAggregatesFilter<"Product"> | string | null + isActive?: BoolWithAggregatesFilter<"Product"> | boolean + createdAt?: DateTimeWithAggregatesFilter<"Product"> | Date | string + } + + export type ProductImageWhereInput = { + AND?: ProductImageWhereInput | ProductImageWhereInput[] + OR?: ProductImageWhereInput[] + NOT?: ProductImageWhereInput | ProductImageWhereInput[] + id?: StringFilter<"ProductImage"> | string + productId?: StringFilter<"ProductImage"> | string + url?: StringFilter<"ProductImage"> | string + sortOrder?: IntFilter<"ProductImage"> | number + product?: XOR + } + + export type ProductImageOrderByWithRelationInput = { + id?: SortOrder + productId?: SortOrder + url?: SortOrder + sortOrder?: SortOrder + product?: ProductOrderByWithRelationInput + } + + export type ProductImageWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ProductImageWhereInput | ProductImageWhereInput[] + OR?: ProductImageWhereInput[] + NOT?: ProductImageWhereInput | ProductImageWhereInput[] + productId?: StringFilter<"ProductImage"> | string + url?: StringFilter<"ProductImage"> | string + sortOrder?: IntFilter<"ProductImage"> | number + product?: XOR + }, "id"> + + export type ProductImageOrderByWithAggregationInput = { + id?: SortOrder + productId?: SortOrder + url?: SortOrder + sortOrder?: SortOrder + _count?: ProductImageCountOrderByAggregateInput + _avg?: ProductImageAvgOrderByAggregateInput + _max?: ProductImageMaxOrderByAggregateInput + _min?: ProductImageMinOrderByAggregateInput + _sum?: ProductImageSumOrderByAggregateInput + } + + export type ProductImageScalarWhereWithAggregatesInput = { + AND?: ProductImageScalarWhereWithAggregatesInput | ProductImageScalarWhereWithAggregatesInput[] + OR?: ProductImageScalarWhereWithAggregatesInput[] + NOT?: ProductImageScalarWhereWithAggregatesInput | ProductImageScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ProductImage"> | string + productId?: StringWithAggregatesFilter<"ProductImage"> | string + url?: StringWithAggregatesFilter<"ProductImage"> | string + sortOrder?: IntWithAggregatesFilter<"ProductImage"> | number + } + + export type ProductVariantWhereInput = { + AND?: ProductVariantWhereInput | ProductVariantWhereInput[] + OR?: ProductVariantWhereInput[] + NOT?: ProductVariantWhereInput | ProductVariantWhereInput[] + id?: StringFilter<"ProductVariant"> | string + productId?: StringFilter<"ProductVariant"> | string + title?: StringFilter<"ProductVariant"> | string + sku?: StringNullableFilter<"ProductVariant"> | string | null + rashWeightGrams?: DecimalFilter<"ProductVariant"> | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFilter<"ProductVariant"> | Decimal | DecimalJsLike | number | string + isActive?: BoolFilter<"ProductVariant"> | boolean + product?: XOR + orderItems?: OrderItemListRelationFilter + } + + export type ProductVariantOrderByWithRelationInput = { + id?: SortOrder + productId?: SortOrder + title?: SortOrder + sku?: SortOrderInput | SortOrder + rashWeightGrams?: SortOrder + defaultWagePercent?: SortOrder + isActive?: SortOrder + product?: ProductOrderByWithRelationInput + orderItems?: OrderItemOrderByRelationAggregateInput + } + + export type ProductVariantWhereUniqueInput = Prisma.AtLeast<{ + id?: string + sku?: string + AND?: ProductVariantWhereInput | ProductVariantWhereInput[] + OR?: ProductVariantWhereInput[] + NOT?: ProductVariantWhereInput | ProductVariantWhereInput[] + productId?: StringFilter<"ProductVariant"> | string + title?: StringFilter<"ProductVariant"> | string + rashWeightGrams?: DecimalFilter<"ProductVariant"> | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFilter<"ProductVariant"> | Decimal | DecimalJsLike | number | string + isActive?: BoolFilter<"ProductVariant"> | boolean + product?: XOR + orderItems?: OrderItemListRelationFilter + }, "id" | "sku"> + + export type ProductVariantOrderByWithAggregationInput = { + id?: SortOrder + productId?: SortOrder + title?: SortOrder + sku?: SortOrderInput | SortOrder + rashWeightGrams?: SortOrder + defaultWagePercent?: SortOrder + isActive?: SortOrder + _count?: ProductVariantCountOrderByAggregateInput + _avg?: ProductVariantAvgOrderByAggregateInput + _max?: ProductVariantMaxOrderByAggregateInput + _min?: ProductVariantMinOrderByAggregateInput + _sum?: ProductVariantSumOrderByAggregateInput + } + + export type ProductVariantScalarWhereWithAggregatesInput = { + AND?: ProductVariantScalarWhereWithAggregatesInput | ProductVariantScalarWhereWithAggregatesInput[] + OR?: ProductVariantScalarWhereWithAggregatesInput[] + NOT?: ProductVariantScalarWhereWithAggregatesInput | ProductVariantScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ProductVariant"> | string + productId?: StringWithAggregatesFilter<"ProductVariant"> | string + title?: StringWithAggregatesFilter<"ProductVariant"> | string + sku?: StringNullableWithAggregatesFilter<"ProductVariant"> | string | null + rashWeightGrams?: DecimalWithAggregatesFilter<"ProductVariant"> | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalWithAggregatesFilter<"ProductVariant"> | Decimal | DecimalJsLike | number | string + isActive?: BoolWithAggregatesFilter<"ProductVariant"> | boolean + } + + export type OrderWhereInput = { + AND?: OrderWhereInput | OrderWhereInput[] + OR?: OrderWhereInput[] + NOT?: OrderWhereInput | OrderWhereInput[] + id?: StringFilter<"Order"> | string + orderNumber?: StringFilter<"Order"> | string + customerId?: StringFilter<"Order"> | string + branchId?: StringNullableFilter<"Order"> | string | null + status?: EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFilter<"Order"> | boolean + deliveredAt?: DateTimeNullableFilter<"Order"> | Date | string | null + createdAt?: DateTimeFilter<"Order"> | Date | string + updatedAt?: DateTimeFilter<"Order"> | Date | string + customer?: XOR + branch?: XOR | null + items?: OrderItemListRelationFilter + statusEvents?: OrderStatusEventListRelationFilter + ledgerEntries?: LedgerEntryListRelationFilter + convertedFromPreOrder?: XOR | null + } + + export type OrderOrderByWithRelationInput = { + id?: SortOrder + orderNumber?: SortOrder + customerId?: SortOrder + branchId?: SortOrderInput | SortOrder + status?: SortOrder + totalGoldWeightGrams?: SortOrder + wageWeightGrams?: SortOrder + flatRialCharge?: SortOrder + isSuspendedOverCreditLimit?: SortOrder + deliveredAt?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + customer?: CustomerOrderByWithRelationInput + branch?: BranchOrderByWithRelationInput + items?: OrderItemOrderByRelationAggregateInput + statusEvents?: OrderStatusEventOrderByRelationAggregateInput + ledgerEntries?: LedgerEntryOrderByRelationAggregateInput + convertedFromPreOrder?: PreOrderOrderByWithRelationInput + } + + export type OrderWhereUniqueInput = Prisma.AtLeast<{ + id?: string + orderNumber?: string + AND?: OrderWhereInput | OrderWhereInput[] + OR?: OrderWhereInput[] + NOT?: OrderWhereInput | OrderWhereInput[] + customerId?: StringFilter<"Order"> | string + branchId?: StringNullableFilter<"Order"> | string | null + status?: EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFilter<"Order"> | boolean + deliveredAt?: DateTimeNullableFilter<"Order"> | Date | string | null + createdAt?: DateTimeFilter<"Order"> | Date | string + updatedAt?: DateTimeFilter<"Order"> | Date | string + customer?: XOR + branch?: XOR | null + items?: OrderItemListRelationFilter + statusEvents?: OrderStatusEventListRelationFilter + ledgerEntries?: LedgerEntryListRelationFilter + convertedFromPreOrder?: XOR | null + }, "id" | "orderNumber"> + + export type OrderOrderByWithAggregationInput = { + id?: SortOrder + orderNumber?: SortOrder + customerId?: SortOrder + branchId?: SortOrderInput | SortOrder + status?: SortOrder + totalGoldWeightGrams?: SortOrder + wageWeightGrams?: SortOrder + flatRialCharge?: SortOrder + isSuspendedOverCreditLimit?: SortOrder + deliveredAt?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: OrderCountOrderByAggregateInput + _avg?: OrderAvgOrderByAggregateInput + _max?: OrderMaxOrderByAggregateInput + _min?: OrderMinOrderByAggregateInput + _sum?: OrderSumOrderByAggregateInput + } + + export type OrderScalarWhereWithAggregatesInput = { + AND?: OrderScalarWhereWithAggregatesInput | OrderScalarWhereWithAggregatesInput[] + OR?: OrderScalarWhereWithAggregatesInput[] + NOT?: OrderScalarWhereWithAggregatesInput | OrderScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Order"> | string + orderNumber?: StringWithAggregatesFilter<"Order"> | string + customerId?: StringWithAggregatesFilter<"Order"> | string + branchId?: StringNullableWithAggregatesFilter<"Order"> | string | null + status?: EnumOrderStatusWithAggregatesFilter<"Order"> | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalWithAggregatesFilter<"Order"> | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalWithAggregatesFilter<"Order"> | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalWithAggregatesFilter<"Order"> | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolWithAggregatesFilter<"Order"> | boolean + deliveredAt?: DateTimeNullableWithAggregatesFilter<"Order"> | Date | string | null + createdAt?: DateTimeWithAggregatesFilter<"Order"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"Order"> | Date | string + } + + export type OrderItemWhereInput = { + AND?: OrderItemWhereInput | OrderItemWhereInput[] + OR?: OrderItemWhereInput[] + NOT?: OrderItemWhereInput | OrderItemWhereInput[] + id?: StringFilter<"OrderItem"> | string + orderId?: StringFilter<"OrderItem"> | string + productVariantId?: StringFilter<"OrderItem"> | string + quantity?: IntFilter<"OrderItem"> | number + rashWeightGramsSnapshot?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + order?: XOR + productVariant?: XOR + } + + export type OrderItemOrderByWithRelationInput = { + id?: SortOrder + orderId?: SortOrder + productVariantId?: SortOrder + quantity?: SortOrder + rashWeightGramsSnapshot?: SortOrder + wagePercentSnapshot?: SortOrder + discountPercentSnapshot?: SortOrder + computedWeightGrams?: SortOrder + flatRialCharge?: SortOrder + order?: OrderOrderByWithRelationInput + productVariant?: ProductVariantOrderByWithRelationInput + } + + export type OrderItemWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: OrderItemWhereInput | OrderItemWhereInput[] + OR?: OrderItemWhereInput[] + NOT?: OrderItemWhereInput | OrderItemWhereInput[] + orderId?: StringFilter<"OrderItem"> | string + productVariantId?: StringFilter<"OrderItem"> | string + quantity?: IntFilter<"OrderItem"> | number + rashWeightGramsSnapshot?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + order?: XOR + productVariant?: XOR + }, "id"> + + export type OrderItemOrderByWithAggregationInput = { + id?: SortOrder + orderId?: SortOrder + productVariantId?: SortOrder + quantity?: SortOrder + rashWeightGramsSnapshot?: SortOrder + wagePercentSnapshot?: SortOrder + discountPercentSnapshot?: SortOrder + computedWeightGrams?: SortOrder + flatRialCharge?: SortOrder + _count?: OrderItemCountOrderByAggregateInput + _avg?: OrderItemAvgOrderByAggregateInput + _max?: OrderItemMaxOrderByAggregateInput + _min?: OrderItemMinOrderByAggregateInput + _sum?: OrderItemSumOrderByAggregateInput + } + + export type OrderItemScalarWhereWithAggregatesInput = { + AND?: OrderItemScalarWhereWithAggregatesInput | OrderItemScalarWhereWithAggregatesInput[] + OR?: OrderItemScalarWhereWithAggregatesInput[] + NOT?: OrderItemScalarWhereWithAggregatesInput | OrderItemScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"OrderItem"> | string + orderId?: StringWithAggregatesFilter<"OrderItem"> | string + productVariantId?: StringWithAggregatesFilter<"OrderItem"> | string + quantity?: IntWithAggregatesFilter<"OrderItem"> | number + rashWeightGramsSnapshot?: DecimalWithAggregatesFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalWithAggregatesFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalWithAggregatesFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalWithAggregatesFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalWithAggregatesFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + } + + export type OrderStatusEventWhereInput = { + AND?: OrderStatusEventWhereInput | OrderStatusEventWhereInput[] + OR?: OrderStatusEventWhereInput[] + NOT?: OrderStatusEventWhereInput | OrderStatusEventWhereInput[] + id?: StringFilter<"OrderStatusEvent"> | string + orderId?: StringFilter<"OrderStatusEvent"> | string + fromStatus?: EnumOrderStatusNullableFilter<"OrderStatusEvent"> | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFilter<"OrderStatusEvent"> | $Enums.OrderStatus + note?: StringNullableFilter<"OrderStatusEvent"> | string | null + actorAdminUserId?: StringNullableFilter<"OrderStatusEvent"> | string | null + createdAt?: DateTimeFilter<"OrderStatusEvent"> | Date | string + order?: XOR + actorAdminUser?: XOR | null + } + + export type OrderStatusEventOrderByWithRelationInput = { + id?: SortOrder + orderId?: SortOrder + fromStatus?: SortOrderInput | SortOrder + toStatus?: SortOrder + note?: SortOrderInput | SortOrder + actorAdminUserId?: SortOrderInput | SortOrder + createdAt?: SortOrder + order?: OrderOrderByWithRelationInput + actorAdminUser?: AdminUserOrderByWithRelationInput + } + + export type OrderStatusEventWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: OrderStatusEventWhereInput | OrderStatusEventWhereInput[] + OR?: OrderStatusEventWhereInput[] + NOT?: OrderStatusEventWhereInput | OrderStatusEventWhereInput[] + orderId?: StringFilter<"OrderStatusEvent"> | string + fromStatus?: EnumOrderStatusNullableFilter<"OrderStatusEvent"> | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFilter<"OrderStatusEvent"> | $Enums.OrderStatus + note?: StringNullableFilter<"OrderStatusEvent"> | string | null + actorAdminUserId?: StringNullableFilter<"OrderStatusEvent"> | string | null + createdAt?: DateTimeFilter<"OrderStatusEvent"> | Date | string + order?: XOR + actorAdminUser?: XOR | null + }, "id"> + + export type OrderStatusEventOrderByWithAggregationInput = { + id?: SortOrder + orderId?: SortOrder + fromStatus?: SortOrderInput | SortOrder + toStatus?: SortOrder + note?: SortOrderInput | SortOrder + actorAdminUserId?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: OrderStatusEventCountOrderByAggregateInput + _max?: OrderStatusEventMaxOrderByAggregateInput + _min?: OrderStatusEventMinOrderByAggregateInput + } + + export type OrderStatusEventScalarWhereWithAggregatesInput = { + AND?: OrderStatusEventScalarWhereWithAggregatesInput | OrderStatusEventScalarWhereWithAggregatesInput[] + OR?: OrderStatusEventScalarWhereWithAggregatesInput[] + NOT?: OrderStatusEventScalarWhereWithAggregatesInput | OrderStatusEventScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"OrderStatusEvent"> | string + orderId?: StringWithAggregatesFilter<"OrderStatusEvent"> | string + fromStatus?: EnumOrderStatusNullableWithAggregatesFilter<"OrderStatusEvent"> | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusWithAggregatesFilter<"OrderStatusEvent"> | $Enums.OrderStatus + note?: StringNullableWithAggregatesFilter<"OrderStatusEvent"> | string | null + actorAdminUserId?: StringNullableWithAggregatesFilter<"OrderStatusEvent"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"OrderStatusEvent"> | Date | string + } + + export type PreOrderWhereInput = { + AND?: PreOrderWhereInput | PreOrderWhereInput[] + OR?: PreOrderWhereInput[] + NOT?: PreOrderWhereInput | PreOrderWhereInput[] + id?: StringFilter<"PreOrder"> | string + customerId?: StringFilter<"PreOrder"> | string + cityId?: StringNullableFilter<"PreOrder"> | string | null + workshopId?: StringNullableFilter<"PreOrder"> | string | null + status?: EnumPreOrderStatusFilter<"PreOrder"> | $Enums.PreOrderStatus + designImageUrl?: StringNullableFilter<"PreOrder"> | string | null + colorName?: StringNullableFilter<"PreOrder"> | string | null + sizeSpec?: StringNullableFilter<"PreOrder"> | string | null + stoneColor?: StringNullableFilter<"PreOrder"> | string | null + minaColor?: StringNullableFilter<"PreOrder"> | string | null + estimatedWeightGrams?: DecimalNullableFilter<"PreOrder"> | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: DecimalNullableFilter<"PreOrder"> | Decimal | DecimalJsLike | number | string | null + description?: StringNullableFilter<"PreOrder"> | string | null + convertedOrderId?: StringNullableFilter<"PreOrder"> | string | null + createdAt?: DateTimeFilter<"PreOrder"> | Date | string + updatedAt?: DateTimeFilter<"PreOrder"> | Date | string + customer?: XOR + city?: XOR | null + workshop?: XOR | null + convertedOrder?: XOR | null + statusEvents?: PreOrderStatusEventListRelationFilter + } + + export type PreOrderOrderByWithRelationInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrderInput | SortOrder + workshopId?: SortOrderInput | SortOrder + status?: SortOrder + designImageUrl?: SortOrderInput | SortOrder + colorName?: SortOrderInput | SortOrder + sizeSpec?: SortOrderInput | SortOrder + stoneColor?: SortOrderInput | SortOrder + minaColor?: SortOrderInput | SortOrder + estimatedWeightGrams?: SortOrderInput | SortOrder + estimatedPriceRial?: SortOrderInput | SortOrder + description?: SortOrderInput | SortOrder + convertedOrderId?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + customer?: CustomerOrderByWithRelationInput + city?: CityOrderByWithRelationInput + workshop?: WorkshopOrderByWithRelationInput + convertedOrder?: OrderOrderByWithRelationInput + statusEvents?: PreOrderStatusEventOrderByRelationAggregateInput + } + + export type PreOrderWhereUniqueInput = Prisma.AtLeast<{ + id?: string + convertedOrderId?: string + AND?: PreOrderWhereInput | PreOrderWhereInput[] + OR?: PreOrderWhereInput[] + NOT?: PreOrderWhereInput | PreOrderWhereInput[] + customerId?: StringFilter<"PreOrder"> | string + cityId?: StringNullableFilter<"PreOrder"> | string | null + workshopId?: StringNullableFilter<"PreOrder"> | string | null + status?: EnumPreOrderStatusFilter<"PreOrder"> | $Enums.PreOrderStatus + designImageUrl?: StringNullableFilter<"PreOrder"> | string | null + colorName?: StringNullableFilter<"PreOrder"> | string | null + sizeSpec?: StringNullableFilter<"PreOrder"> | string | null + stoneColor?: StringNullableFilter<"PreOrder"> | string | null + minaColor?: StringNullableFilter<"PreOrder"> | string | null + estimatedWeightGrams?: DecimalNullableFilter<"PreOrder"> | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: DecimalNullableFilter<"PreOrder"> | Decimal | DecimalJsLike | number | string | null + description?: StringNullableFilter<"PreOrder"> | string | null + createdAt?: DateTimeFilter<"PreOrder"> | Date | string + updatedAt?: DateTimeFilter<"PreOrder"> | Date | string + customer?: XOR + city?: XOR | null + workshop?: XOR | null + convertedOrder?: XOR | null + statusEvents?: PreOrderStatusEventListRelationFilter + }, "id" | "convertedOrderId"> + + export type PreOrderOrderByWithAggregationInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrderInput | SortOrder + workshopId?: SortOrderInput | SortOrder + status?: SortOrder + designImageUrl?: SortOrderInput | SortOrder + colorName?: SortOrderInput | SortOrder + sizeSpec?: SortOrderInput | SortOrder + stoneColor?: SortOrderInput | SortOrder + minaColor?: SortOrderInput | SortOrder + estimatedWeightGrams?: SortOrderInput | SortOrder + estimatedPriceRial?: SortOrderInput | SortOrder + description?: SortOrderInput | SortOrder + convertedOrderId?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: PreOrderCountOrderByAggregateInput + _avg?: PreOrderAvgOrderByAggregateInput + _max?: PreOrderMaxOrderByAggregateInput + _min?: PreOrderMinOrderByAggregateInput + _sum?: PreOrderSumOrderByAggregateInput + } + + export type PreOrderScalarWhereWithAggregatesInput = { + AND?: PreOrderScalarWhereWithAggregatesInput | PreOrderScalarWhereWithAggregatesInput[] + OR?: PreOrderScalarWhereWithAggregatesInput[] + NOT?: PreOrderScalarWhereWithAggregatesInput | PreOrderScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"PreOrder"> | string + customerId?: StringWithAggregatesFilter<"PreOrder"> | string + cityId?: StringNullableWithAggregatesFilter<"PreOrder"> | string | null + workshopId?: StringNullableWithAggregatesFilter<"PreOrder"> | string | null + status?: EnumPreOrderStatusWithAggregatesFilter<"PreOrder"> | $Enums.PreOrderStatus + designImageUrl?: StringNullableWithAggregatesFilter<"PreOrder"> | string | null + colorName?: StringNullableWithAggregatesFilter<"PreOrder"> | string | null + sizeSpec?: StringNullableWithAggregatesFilter<"PreOrder"> | string | null + stoneColor?: StringNullableWithAggregatesFilter<"PreOrder"> | string | null + minaColor?: StringNullableWithAggregatesFilter<"PreOrder"> | string | null + estimatedWeightGrams?: DecimalNullableWithAggregatesFilter<"PreOrder"> | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: DecimalNullableWithAggregatesFilter<"PreOrder"> | Decimal | DecimalJsLike | number | string | null + description?: StringNullableWithAggregatesFilter<"PreOrder"> | string | null + convertedOrderId?: StringNullableWithAggregatesFilter<"PreOrder"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"PreOrder"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"PreOrder"> | Date | string + } + + export type PreOrderStatusEventWhereInput = { + AND?: PreOrderStatusEventWhereInput | PreOrderStatusEventWhereInput[] + OR?: PreOrderStatusEventWhereInput[] + NOT?: PreOrderStatusEventWhereInput | PreOrderStatusEventWhereInput[] + id?: StringFilter<"PreOrderStatusEvent"> | string + preOrderId?: StringFilter<"PreOrderStatusEvent"> | string + changes?: JsonFilter<"PreOrderStatusEvent"> + actorAdminUserId?: StringNullableFilter<"PreOrderStatusEvent"> | string | null + ipAddress?: StringNullableFilter<"PreOrderStatusEvent"> | string | null + createdAt?: DateTimeFilter<"PreOrderStatusEvent"> | Date | string + preOrder?: XOR + actorAdminUser?: XOR | null + } + + export type PreOrderStatusEventOrderByWithRelationInput = { + id?: SortOrder + preOrderId?: SortOrder + changes?: SortOrder + actorAdminUserId?: SortOrderInput | SortOrder + ipAddress?: SortOrderInput | SortOrder + createdAt?: SortOrder + preOrder?: PreOrderOrderByWithRelationInput + actorAdminUser?: AdminUserOrderByWithRelationInput + } + + export type PreOrderStatusEventWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: PreOrderStatusEventWhereInput | PreOrderStatusEventWhereInput[] + OR?: PreOrderStatusEventWhereInput[] + NOT?: PreOrderStatusEventWhereInput | PreOrderStatusEventWhereInput[] + preOrderId?: StringFilter<"PreOrderStatusEvent"> | string + changes?: JsonFilter<"PreOrderStatusEvent"> + actorAdminUserId?: StringNullableFilter<"PreOrderStatusEvent"> | string | null + ipAddress?: StringNullableFilter<"PreOrderStatusEvent"> | string | null + createdAt?: DateTimeFilter<"PreOrderStatusEvent"> | Date | string + preOrder?: XOR + actorAdminUser?: XOR | null + }, "id"> + + export type PreOrderStatusEventOrderByWithAggregationInput = { + id?: SortOrder + preOrderId?: SortOrder + changes?: SortOrder + actorAdminUserId?: SortOrderInput | SortOrder + ipAddress?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: PreOrderStatusEventCountOrderByAggregateInput + _max?: PreOrderStatusEventMaxOrderByAggregateInput + _min?: PreOrderStatusEventMinOrderByAggregateInput + } + + export type PreOrderStatusEventScalarWhereWithAggregatesInput = { + AND?: PreOrderStatusEventScalarWhereWithAggregatesInput | PreOrderStatusEventScalarWhereWithAggregatesInput[] + OR?: PreOrderStatusEventScalarWhereWithAggregatesInput[] + NOT?: PreOrderStatusEventScalarWhereWithAggregatesInput | PreOrderStatusEventScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"PreOrderStatusEvent"> | string + preOrderId?: StringWithAggregatesFilter<"PreOrderStatusEvent"> | string + changes?: JsonWithAggregatesFilter<"PreOrderStatusEvent"> + actorAdminUserId?: StringNullableWithAggregatesFilter<"PreOrderStatusEvent"> | string | null + ipAddress?: StringNullableWithAggregatesFilter<"PreOrderStatusEvent"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"PreOrderStatusEvent"> | Date | string + } + + export type LedgerEntryWhereInput = { + AND?: LedgerEntryWhereInput | LedgerEntryWhereInput[] + OR?: LedgerEntryWhereInput[] + NOT?: LedgerEntryWhereInput | LedgerEntryWhereInput[] + id?: StringFilter<"LedgerEntry"> | string + customerId?: StringFilter<"LedgerEntry"> | string + currency?: EnumLedgerCurrencyFilter<"LedgerEntry"> | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFilter<"LedgerEntry"> | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFilter<"LedgerEntry"> | $Enums.LedgerSourceType + amount?: DecimalFilter<"LedgerEntry"> | Decimal | DecimalJsLike | number | string + karatPerMille?: IntNullableFilter<"LedgerEntry"> | number | null + pricePerGramRialAtEntry?: DecimalNullableFilter<"LedgerEntry"> | Decimal | DecimalJsLike | number | string | null + orderId?: StringNullableFilter<"LedgerEntry"> | string | null + confirmed?: BoolFilter<"LedgerEntry"> | boolean + confirmedAt?: DateTimeNullableFilter<"LedgerEntry"> | Date | string | null + postedByAdminUserId?: StringNullableFilter<"LedgerEntry"> | string | null + note?: StringNullableFilter<"LedgerEntry"> | string | null + createdAt?: DateTimeFilter<"LedgerEntry"> | Date | string + customer?: XOR + order?: XOR | null + postedByAdminUser?: XOR | null + } + + export type LedgerEntryOrderByWithRelationInput = { + id?: SortOrder + customerId?: SortOrder + currency?: SortOrder + direction?: SortOrder + sourceType?: SortOrder + amount?: SortOrder + karatPerMille?: SortOrderInput | SortOrder + pricePerGramRialAtEntry?: SortOrderInput | SortOrder + orderId?: SortOrderInput | SortOrder + confirmed?: SortOrder + confirmedAt?: SortOrderInput | SortOrder + postedByAdminUserId?: SortOrderInput | SortOrder + note?: SortOrderInput | SortOrder + createdAt?: SortOrder + customer?: CustomerOrderByWithRelationInput + order?: OrderOrderByWithRelationInput + postedByAdminUser?: AdminUserOrderByWithRelationInput + } + + export type LedgerEntryWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: LedgerEntryWhereInput | LedgerEntryWhereInput[] + OR?: LedgerEntryWhereInput[] + NOT?: LedgerEntryWhereInput | LedgerEntryWhereInput[] + customerId?: StringFilter<"LedgerEntry"> | string + currency?: EnumLedgerCurrencyFilter<"LedgerEntry"> | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFilter<"LedgerEntry"> | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFilter<"LedgerEntry"> | $Enums.LedgerSourceType + amount?: DecimalFilter<"LedgerEntry"> | Decimal | DecimalJsLike | number | string + karatPerMille?: IntNullableFilter<"LedgerEntry"> | number | null + pricePerGramRialAtEntry?: DecimalNullableFilter<"LedgerEntry"> | Decimal | DecimalJsLike | number | string | null + orderId?: StringNullableFilter<"LedgerEntry"> | string | null + confirmed?: BoolFilter<"LedgerEntry"> | boolean + confirmedAt?: DateTimeNullableFilter<"LedgerEntry"> | Date | string | null + postedByAdminUserId?: StringNullableFilter<"LedgerEntry"> | string | null + note?: StringNullableFilter<"LedgerEntry"> | string | null + createdAt?: DateTimeFilter<"LedgerEntry"> | Date | string + customer?: XOR + order?: XOR | null + postedByAdminUser?: XOR | null + }, "id"> + + export type LedgerEntryOrderByWithAggregationInput = { + id?: SortOrder + customerId?: SortOrder + currency?: SortOrder + direction?: SortOrder + sourceType?: SortOrder + amount?: SortOrder + karatPerMille?: SortOrderInput | SortOrder + pricePerGramRialAtEntry?: SortOrderInput | SortOrder + orderId?: SortOrderInput | SortOrder + confirmed?: SortOrder + confirmedAt?: SortOrderInput | SortOrder + postedByAdminUserId?: SortOrderInput | SortOrder + note?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: LedgerEntryCountOrderByAggregateInput + _avg?: LedgerEntryAvgOrderByAggregateInput + _max?: LedgerEntryMaxOrderByAggregateInput + _min?: LedgerEntryMinOrderByAggregateInput + _sum?: LedgerEntrySumOrderByAggregateInput + } + + export type LedgerEntryScalarWhereWithAggregatesInput = { + AND?: LedgerEntryScalarWhereWithAggregatesInput | LedgerEntryScalarWhereWithAggregatesInput[] + OR?: LedgerEntryScalarWhereWithAggregatesInput[] + NOT?: LedgerEntryScalarWhereWithAggregatesInput | LedgerEntryScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"LedgerEntry"> | string + customerId?: StringWithAggregatesFilter<"LedgerEntry"> | string + currency?: EnumLedgerCurrencyWithAggregatesFilter<"LedgerEntry"> | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionWithAggregatesFilter<"LedgerEntry"> | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeWithAggregatesFilter<"LedgerEntry"> | $Enums.LedgerSourceType + amount?: DecimalWithAggregatesFilter<"LedgerEntry"> | Decimal | DecimalJsLike | number | string + karatPerMille?: IntNullableWithAggregatesFilter<"LedgerEntry"> | number | null + pricePerGramRialAtEntry?: DecimalNullableWithAggregatesFilter<"LedgerEntry"> | Decimal | DecimalJsLike | number | string | null + orderId?: StringNullableWithAggregatesFilter<"LedgerEntry"> | string | null + confirmed?: BoolWithAggregatesFilter<"LedgerEntry"> | boolean + confirmedAt?: DateTimeNullableWithAggregatesFilter<"LedgerEntry"> | Date | string | null + postedByAdminUserId?: StringNullableWithAggregatesFilter<"LedgerEntry"> | string | null + note?: StringNullableWithAggregatesFilter<"LedgerEntry"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"LedgerEntry"> | Date | string + } + + export type GoldPriceQuoteWhereInput = { + AND?: GoldPriceQuoteWhereInput | GoldPriceQuoteWhereInput[] + OR?: GoldPriceQuoteWhereInput[] + NOT?: GoldPriceQuoteWhereInput | GoldPriceQuoteWhereInput[] + id?: StringFilter<"GoldPriceQuote"> | string + karatPerMille?: IntFilter<"GoldPriceQuote"> | number + pricePerGramRial?: DecimalFilter<"GoldPriceQuote"> | Decimal | DecimalJsLike | number | string + source?: StringFilter<"GoldPriceQuote"> | string + quotedAt?: DateTimeFilter<"GoldPriceQuote"> | Date | string + } + + export type GoldPriceQuoteOrderByWithRelationInput = { + id?: SortOrder + karatPerMille?: SortOrder + pricePerGramRial?: SortOrder + source?: SortOrder + quotedAt?: SortOrder + } + + export type GoldPriceQuoteWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: GoldPriceQuoteWhereInput | GoldPriceQuoteWhereInput[] + OR?: GoldPriceQuoteWhereInput[] + NOT?: GoldPriceQuoteWhereInput | GoldPriceQuoteWhereInput[] + karatPerMille?: IntFilter<"GoldPriceQuote"> | number + pricePerGramRial?: DecimalFilter<"GoldPriceQuote"> | Decimal | DecimalJsLike | number | string + source?: StringFilter<"GoldPriceQuote"> | string + quotedAt?: DateTimeFilter<"GoldPriceQuote"> | Date | string + }, "id"> + + export type GoldPriceQuoteOrderByWithAggregationInput = { + id?: SortOrder + karatPerMille?: SortOrder + pricePerGramRial?: SortOrder + source?: SortOrder + quotedAt?: SortOrder + _count?: GoldPriceQuoteCountOrderByAggregateInput + _avg?: GoldPriceQuoteAvgOrderByAggregateInput + _max?: GoldPriceQuoteMaxOrderByAggregateInput + _min?: GoldPriceQuoteMinOrderByAggregateInput + _sum?: GoldPriceQuoteSumOrderByAggregateInput + } + + export type GoldPriceQuoteScalarWhereWithAggregatesInput = { + AND?: GoldPriceQuoteScalarWhereWithAggregatesInput | GoldPriceQuoteScalarWhereWithAggregatesInput[] + OR?: GoldPriceQuoteScalarWhereWithAggregatesInput[] + NOT?: GoldPriceQuoteScalarWhereWithAggregatesInput | GoldPriceQuoteScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"GoldPriceQuote"> | string + karatPerMille?: IntWithAggregatesFilter<"GoldPriceQuote"> | number + pricePerGramRial?: DecimalWithAggregatesFilter<"GoldPriceQuote"> | Decimal | DecimalJsLike | number | string + source?: StringWithAggregatesFilter<"GoldPriceQuote"> | string + quotedAt?: DateTimeWithAggregatesFilter<"GoldPriceQuote"> | Date | string + } + + export type WalletBonusWhereInput = { + AND?: WalletBonusWhereInput | WalletBonusWhereInput[] + OR?: WalletBonusWhereInput[] + NOT?: WalletBonusWhereInput | WalletBonusWhereInput[] + id?: StringFilter<"WalletBonus"> | string + customerId?: StringFilter<"WalletBonus"> | string + orderId?: StringNullableFilter<"WalletBonus"> | string | null + goldGrams?: DecimalFilter<"WalletBonus"> | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFilter<"WalletBonus"> | Date | string + expiresAt?: DateTimeFilter<"WalletBonus"> | Date | string + consumedAt?: DateTimeNullableFilter<"WalletBonus"> | Date | string | null + isActive?: BoolFilter<"WalletBonus"> | boolean + customer?: XOR + } + + export type WalletBonusOrderByWithRelationInput = { + id?: SortOrder + customerId?: SortOrder + orderId?: SortOrderInput | SortOrder + goldGrams?: SortOrder + grantedAt?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrderInput | SortOrder + isActive?: SortOrder + customer?: CustomerOrderByWithRelationInput + } + + export type WalletBonusWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: WalletBonusWhereInput | WalletBonusWhereInput[] + OR?: WalletBonusWhereInput[] + NOT?: WalletBonusWhereInput | WalletBonusWhereInput[] + customerId?: StringFilter<"WalletBonus"> | string + orderId?: StringNullableFilter<"WalletBonus"> | string | null + goldGrams?: DecimalFilter<"WalletBonus"> | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFilter<"WalletBonus"> | Date | string + expiresAt?: DateTimeFilter<"WalletBonus"> | Date | string + consumedAt?: DateTimeNullableFilter<"WalletBonus"> | Date | string | null + isActive?: BoolFilter<"WalletBonus"> | boolean + customer?: XOR + }, "id"> + + export type WalletBonusOrderByWithAggregationInput = { + id?: SortOrder + customerId?: SortOrder + orderId?: SortOrderInput | SortOrder + goldGrams?: SortOrder + grantedAt?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrderInput | SortOrder + isActive?: SortOrder + _count?: WalletBonusCountOrderByAggregateInput + _avg?: WalletBonusAvgOrderByAggregateInput + _max?: WalletBonusMaxOrderByAggregateInput + _min?: WalletBonusMinOrderByAggregateInput + _sum?: WalletBonusSumOrderByAggregateInput + } + + export type WalletBonusScalarWhereWithAggregatesInput = { + AND?: WalletBonusScalarWhereWithAggregatesInput | WalletBonusScalarWhereWithAggregatesInput[] + OR?: WalletBonusScalarWhereWithAggregatesInput[] + NOT?: WalletBonusScalarWhereWithAggregatesInput | WalletBonusScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"WalletBonus"> | string + customerId?: StringWithAggregatesFilter<"WalletBonus"> | string + orderId?: StringNullableWithAggregatesFilter<"WalletBonus"> | string | null + goldGrams?: DecimalWithAggregatesFilter<"WalletBonus"> | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeWithAggregatesFilter<"WalletBonus"> | Date | string + expiresAt?: DateTimeWithAggregatesFilter<"WalletBonus"> | Date | string + consumedAt?: DateTimeNullableWithAggregatesFilter<"WalletBonus"> | Date | string | null + isActive?: BoolWithAggregatesFilter<"WalletBonus"> | boolean + } + + export type CityCreateInput = { + id?: string + name: string + province?: string | null + customers?: CustomerCreateNestedManyWithoutCityInput + addresses?: CustomerAddressCreateNestedManyWithoutCityInput + branches?: BranchCreateNestedManyWithoutCityInput + preOrders?: PreOrderCreateNestedManyWithoutCityInput + } + + export type CityUncheckedCreateInput = { + id?: string + name: string + province?: string | null + customers?: CustomerUncheckedCreateNestedManyWithoutCityInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput + branches?: BranchUncheckedCreateNestedManyWithoutCityInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + } + + export type CityUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + customers?: CustomerUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUpdateManyWithoutCityNestedInput + branches?: BranchUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUpdateManyWithoutCityNestedInput + } + + export type CityUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput + branches?: BranchUncheckedUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + } + + export type CityCreateManyInput = { + id?: string + name: string + province?: string | null + } + + export type CityUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type CityUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AdminUserCreateInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + branch?: BranchCreateNestedOneWithoutAdminUsersInput + referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserUncheckedCreateInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + branch?: BranchUpdateOneWithoutAdminUsersNestedInput + referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + } + + export type AdminUserCreateManyInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + } + + export type AdminUserUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AdminUserUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerCreateInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type CustomerCreateManyInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + } + + export type CustomerUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerAddressCreateInput = { + id?: string + addressLine: string + isDefault?: boolean + customer: CustomerCreateNestedOneWithoutAddressesInput + city?: CityCreateNestedOneWithoutAddressesInput + } + + export type CustomerAddressUncheckedCreateInput = { + id?: string + customerId: string + cityId?: string | null + addressLine: string + isDefault?: boolean + } + + export type CustomerAddressUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + customer?: CustomerUpdateOneRequiredWithoutAddressesNestedInput + city?: CityUpdateOneWithoutAddressesNestedInput + } + + export type CustomerAddressUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + } + + export type CustomerAddressCreateManyInput = { + id?: string + customerId: string + cityId?: string | null + addressLine: string + isDefault?: boolean + } + + export type CustomerAddressUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + } + + export type CustomerAddressUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + } + + export type BranchCreateInput = { + id?: string + name: string + city?: CityCreateNestedOneWithoutBranchesInput + adminUsers?: AdminUserCreateNestedManyWithoutBranchInput + orders?: OrderCreateNestedManyWithoutBranchInput + } + + export type BranchUncheckedCreateInput = { + id?: string + name: string + cityId?: string | null + adminUsers?: AdminUserUncheckedCreateNestedManyWithoutBranchInput + orders?: OrderUncheckedCreateNestedManyWithoutBranchInput + } + + export type BranchUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + city?: CityUpdateOneWithoutBranchesNestedInput + adminUsers?: AdminUserUpdateManyWithoutBranchNestedInput + orders?: OrderUpdateManyWithoutBranchNestedInput + } + + export type BranchUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + adminUsers?: AdminUserUncheckedUpdateManyWithoutBranchNestedInput + orders?: OrderUncheckedUpdateManyWithoutBranchNestedInput + } + + export type BranchCreateManyInput = { + id?: string + name: string + cityId?: string | null + } + + export type BranchUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + } + + export type BranchUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type WorkshopCreateInput = { + id?: string + name: string + isActive?: boolean + preOrders?: PreOrderCreateNestedManyWithoutWorkshopInput + } + + export type WorkshopUncheckedCreateInput = { + id?: string + name: string + isActive?: boolean + preOrders?: PreOrderUncheckedCreateNestedManyWithoutWorkshopInput + } + + export type WorkshopUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + preOrders?: PreOrderUpdateManyWithoutWorkshopNestedInput + } + + export type WorkshopUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + preOrders?: PreOrderUncheckedUpdateManyWithoutWorkshopNestedInput + } + + export type WorkshopCreateManyInput = { + id?: string + name: string + isActive?: boolean + } + + export type WorkshopUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type WorkshopUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type CategoryCreateInput = { + id?: string + title: string + parent?: CategoryCreateNestedOneWithoutChildrenInput + children?: CategoryCreateNestedManyWithoutParentInput + products?: ProductCreateNestedManyWithoutCategoryInput + } + + export type CategoryUncheckedCreateInput = { + id?: string + title: string + parentId?: string | null + children?: CategoryUncheckedCreateNestedManyWithoutParentInput + products?: ProductUncheckedCreateNestedManyWithoutCategoryInput + } + + export type CategoryUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + parent?: CategoryUpdateOneWithoutChildrenNestedInput + children?: CategoryUpdateManyWithoutParentNestedInput + products?: ProductUpdateManyWithoutCategoryNestedInput + } + + export type CategoryUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + parentId?: NullableStringFieldUpdateOperationsInput | string | null + children?: CategoryUncheckedUpdateManyWithoutParentNestedInput + products?: ProductUncheckedUpdateManyWithoutCategoryNestedInput + } + + export type CategoryCreateManyInput = { + id?: string + title: string + parentId?: string | null + } + + export type CategoryUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + } + + export type CategoryUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + parentId?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type BrandCreateInput = { + id?: string + title: string + products?: ProductCreateNestedManyWithoutBrandInput + } + + export type BrandUncheckedCreateInput = { + id?: string + title: string + products?: ProductUncheckedCreateNestedManyWithoutBrandInput + } + + export type BrandUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + products?: ProductUpdateManyWithoutBrandNestedInput + } + + export type BrandUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + products?: ProductUncheckedUpdateManyWithoutBrandNestedInput + } + + export type BrandCreateManyInput = { + id?: string + title: string + } + + export type BrandUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + } + + export type BrandUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + } + + export type CollectionCreateInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + products?: CollectionProductCreateNestedManyWithoutCollectionInput + } + + export type CollectionUncheckedCreateInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + products?: CollectionProductUncheckedCreateNestedManyWithoutCollectionInput + } + + export type CollectionUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + products?: CollectionProductUpdateManyWithoutCollectionNestedInput + } + + export type CollectionUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + products?: CollectionProductUncheckedUpdateManyWithoutCollectionNestedInput + } + + export type CollectionCreateManyInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + } + + export type CollectionUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type CollectionUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type CollectionProductCreateInput = { + collection: CollectionCreateNestedOneWithoutProductsInput + product: ProductCreateNestedOneWithoutCollectionsInput + } + + export type CollectionProductUncheckedCreateInput = { + collectionId: string + productId: string + } + + export type CollectionProductUpdateInput = { + collection?: CollectionUpdateOneRequiredWithoutProductsNestedInput + product?: ProductUpdateOneRequiredWithoutCollectionsNestedInput + } + + export type CollectionProductUncheckedUpdateInput = { + collectionId?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + } + + export type CollectionProductCreateManyInput = { + collectionId: string + productId: string + } + + export type CollectionProductUpdateManyMutationInput = { + + } + + export type CollectionProductUncheckedUpdateManyInput = { + collectionId?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + } + + export type ProductCreateInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + category?: CategoryCreateNestedOneWithoutProductsInput + brand?: BrandCreateNestedOneWithoutProductsInput + variants?: ProductVariantCreateNestedManyWithoutProductInput + images?: ProductImageCreateNestedManyWithoutProductInput + collections?: CollectionProductCreateNestedManyWithoutProductInput + } + + export type ProductUncheckedCreateInput = { + id?: string + title: string + description?: string | null + categoryId?: string | null + brandId?: string | null + isActive?: boolean + createdAt?: Date | string + variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput + images?: ProductImageUncheckedCreateNestedManyWithoutProductInput + collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput + } + + export type ProductUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + category?: CategoryUpdateOneWithoutProductsNestedInput + brand?: BrandUpdateOneWithoutProductsNestedInput + variants?: ProductVariantUpdateManyWithoutProductNestedInput + images?: ProductImageUpdateManyWithoutProductNestedInput + collections?: CollectionProductUpdateManyWithoutProductNestedInput + } + + export type ProductUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + categoryId?: NullableStringFieldUpdateOperationsInput | string | null + brandId?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput + images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput + collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput + } + + export type ProductCreateManyInput = { + id?: string + title: string + description?: string | null + categoryId?: string | null + brandId?: string | null + isActive?: boolean + createdAt?: Date | string + } + + export type ProductUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ProductUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + categoryId?: NullableStringFieldUpdateOperationsInput | string | null + brandId?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ProductImageCreateInput = { + id?: string + url: string + sortOrder?: number + product: ProductCreateNestedOneWithoutImagesInput + } + + export type ProductImageUncheckedCreateInput = { + id?: string + productId: string + url: string + sortOrder?: number + } + + export type ProductImageUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + sortOrder?: IntFieldUpdateOperationsInput | number + product?: ProductUpdateOneRequiredWithoutImagesNestedInput + } + + export type ProductImageUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + sortOrder?: IntFieldUpdateOperationsInput | number + } + + export type ProductImageCreateManyInput = { + id?: string + productId: string + url: string + sortOrder?: number + } + + export type ProductImageUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + sortOrder?: IntFieldUpdateOperationsInput | number + } + + export type ProductImageUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + sortOrder?: IntFieldUpdateOperationsInput | number + } + + export type ProductVariantCreateInput = { + id?: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + isActive?: boolean + product: ProductCreateNestedOneWithoutVariantsInput + orderItems?: OrderItemCreateNestedManyWithoutProductVariantInput + } + + export type ProductVariantUncheckedCreateInput = { + id?: string + productId: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + isActive?: boolean + orderItems?: OrderItemUncheckedCreateNestedManyWithoutProductVariantInput + } + + export type ProductVariantUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isActive?: BoolFieldUpdateOperationsInput | boolean + product?: ProductUpdateOneRequiredWithoutVariantsNestedInput + orderItems?: OrderItemUpdateManyWithoutProductVariantNestedInput + } + + export type ProductVariantUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isActive?: BoolFieldUpdateOperationsInput | boolean + orderItems?: OrderItemUncheckedUpdateManyWithoutProductVariantNestedInput + } + + export type ProductVariantCreateManyInput = { + id?: string + productId: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + isActive?: boolean + } + + export type ProductVariantUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type ProductVariantUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type OrderCreateInput = { + id?: string + orderNumber: string + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutOrdersInput + branch?: BranchCreateNestedOneWithoutOrdersInput + items?: OrderItemCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderUncheckedCreateInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderUncheckedCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput + branch?: BranchUpdateOneWithoutOrdersNestedInput + items?: OrderItemUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUncheckedUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderCreateManyInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type OrderUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OrderUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OrderItemCreateInput = { + id?: string + quantity: number + rashWeightGramsSnapshot: Decimal | DecimalJsLike | number | string + wagePercentSnapshot: Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: Decimal | DecimalJsLike | number | string + computedWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + order: OrderCreateNestedOneWithoutItemsInput + productVariant: ProductVariantCreateNestedOneWithoutOrderItemsInput + } + + export type OrderItemUncheckedCreateInput = { + id?: string + orderId: string + productVariantId: string + quantity: number + rashWeightGramsSnapshot: Decimal | DecimalJsLike | number | string + wagePercentSnapshot: Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: Decimal | DecimalJsLike | number | string + computedWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + } + + export type OrderItemUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + order?: OrderUpdateOneRequiredWithoutItemsNestedInput + productVariant?: ProductVariantUpdateOneRequiredWithoutOrderItemsNestedInput + } + + export type OrderItemUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: StringFieldUpdateOperationsInput | string + productVariantId?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + } + + export type OrderItemCreateManyInput = { + id?: string + orderId: string + productVariantId: string + quantity: number + rashWeightGramsSnapshot: Decimal | DecimalJsLike | number | string + wagePercentSnapshot: Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: Decimal | DecimalJsLike | number | string + computedWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + } + + export type OrderItemUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + } + + export type OrderItemUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: StringFieldUpdateOperationsInput | string + productVariantId?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + } + + export type OrderStatusEventCreateInput = { + id?: string + fromStatus?: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note?: string | null + createdAt?: Date | string + order: OrderCreateNestedOneWithoutStatusEventsInput + actorAdminUser?: AdminUserCreateNestedOneWithoutOrderStatusEventsInput + } + + export type OrderStatusEventUncheckedCreateInput = { + id?: string + orderId: string + fromStatus?: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note?: string | null + actorAdminUserId?: string | null + createdAt?: Date | string + } + + export type OrderStatusEventUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + order?: OrderUpdateOneRequiredWithoutStatusEventsNestedInput + actorAdminUser?: AdminUserUpdateOneWithoutOrderStatusEventsNestedInput + } + + export type OrderStatusEventUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + actorAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OrderStatusEventCreateManyInput = { + id?: string + orderId: string + fromStatus?: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note?: string | null + actorAdminUserId?: string | null + createdAt?: Date | string + } + + export type OrderStatusEventUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OrderStatusEventUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + actorAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderCreateInput = { + id?: string + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutPreOrdersInput + city?: CityCreateNestedOneWithoutPreOrdersInput + workshop?: WorkshopCreateNestedOneWithoutPreOrdersInput + convertedOrder?: OrderCreateNestedOneWithoutConvertedFromPreOrderInput + statusEvents?: PreOrderStatusEventCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderUncheckedCreateInput = { + id?: string + customerId: string + cityId?: string | null + workshopId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + convertedOrderId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + statusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutPreOrdersNestedInput + city?: CityUpdateOneWithoutPreOrdersNestedInput + workshop?: WorkshopUpdateOneWithoutPreOrdersNestedInput + convertedOrder?: OrderUpdateOneWithoutConvertedFromPreOrderNestedInput + statusEvents?: PreOrderStatusEventUpdateManyWithoutPreOrderNestedInput + } + + export type PreOrderUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + workshopId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + convertedOrderId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + statusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutPreOrderNestedInput + } + + export type PreOrderCreateManyInput = { + id?: string + customerId: string + cityId?: string | null + workshopId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + convertedOrderId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PreOrderUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + workshopId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + convertedOrderId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderStatusEventCreateInput = { + id?: string + changes: JsonNullValueInput | InputJsonValue + ipAddress?: string | null + createdAt?: Date | string + preOrder: PreOrderCreateNestedOneWithoutStatusEventsInput + actorAdminUser?: AdminUserCreateNestedOneWithoutPreOrderStatusEventsInput + } + + export type PreOrderStatusEventUncheckedCreateInput = { + id?: string + preOrderId: string + changes: JsonNullValueInput | InputJsonValue + actorAdminUserId?: string | null + ipAddress?: string | null + createdAt?: Date | string + } + + export type PreOrderStatusEventUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + preOrder?: PreOrderUpdateOneRequiredWithoutStatusEventsNestedInput + actorAdminUser?: AdminUserUpdateOneWithoutPreOrderStatusEventsNestedInput + } + + export type PreOrderStatusEventUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + preOrderId?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + actorAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderStatusEventCreateManyInput = { + id?: string + preOrderId: string + changes: JsonNullValueInput | InputJsonValue + actorAdminUserId?: string | null + ipAddress?: string | null + createdAt?: Date | string + } + + export type PreOrderStatusEventUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderStatusEventUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + preOrderId?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + actorAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LedgerEntryCreateInput = { + id?: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + confirmed?: boolean + confirmedAt?: Date | string | null + note?: string | null + createdAt?: Date | string + customer: CustomerCreateNestedOneWithoutLedgerEntriesInput + order?: OrderCreateNestedOneWithoutLedgerEntriesInput + postedByAdminUser?: AdminUserCreateNestedOneWithoutPostedLedgerEntriesInput + } + + export type LedgerEntryUncheckedCreateInput = { + id?: string + customerId: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + orderId?: string | null + confirmed?: boolean + confirmedAt?: Date | string | null + postedByAdminUserId?: string | null + note?: string | null + createdAt?: Date | string + } + + export type LedgerEntryUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutLedgerEntriesNestedInput + order?: OrderUpdateOneWithoutLedgerEntriesNestedInput + postedByAdminUser?: AdminUserUpdateOneWithoutPostedLedgerEntriesNestedInput + } + + export type LedgerEntryUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + orderId?: NullableStringFieldUpdateOperationsInput | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + postedByAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LedgerEntryCreateManyInput = { + id?: string + customerId: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + orderId?: string | null + confirmed?: boolean + confirmedAt?: Date | string | null + postedByAdminUserId?: string | null + note?: string | null + createdAt?: Date | string + } + + export type LedgerEntryUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LedgerEntryUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + orderId?: NullableStringFieldUpdateOperationsInput | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + postedByAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GoldPriceQuoteCreateInput = { + id?: string + karatPerMille: number + pricePerGramRial: Decimal | DecimalJsLike | number | string + source: string + quotedAt?: Date | string + } + + export type GoldPriceQuoteUncheckedCreateInput = { + id?: string + karatPerMille: number + pricePerGramRial: Decimal | DecimalJsLike | number | string + source: string + quotedAt?: Date | string + } + + export type GoldPriceQuoteUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + karatPerMille?: IntFieldUpdateOperationsInput | number + pricePerGramRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + source?: StringFieldUpdateOperationsInput | string + quotedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GoldPriceQuoteUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + karatPerMille?: IntFieldUpdateOperationsInput | number + pricePerGramRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + source?: StringFieldUpdateOperationsInput | string + quotedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GoldPriceQuoteCreateManyInput = { + id?: string + karatPerMille: number + pricePerGramRial: Decimal | DecimalJsLike | number | string + source: string + quotedAt?: Date | string + } + + export type GoldPriceQuoteUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + karatPerMille?: IntFieldUpdateOperationsInput | number + pricePerGramRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + source?: StringFieldUpdateOperationsInput | string + quotedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type GoldPriceQuoteUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + karatPerMille?: IntFieldUpdateOperationsInput | number + pricePerGramRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + source?: StringFieldUpdateOperationsInput | string + quotedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WalletBonusCreateInput = { + id?: string + orderId?: string | null + goldGrams: Decimal | DecimalJsLike | number | string + grantedAt?: Date | string + expiresAt: Date | string + consumedAt?: Date | string | null + isActive?: boolean + customer: CustomerCreateNestedOneWithoutWalletBonusesInput + } + + export type WalletBonusUncheckedCreateInput = { + id?: string + customerId: string + orderId?: string | null + goldGrams: Decimal | DecimalJsLike | number | string + grantedAt?: Date | string + expiresAt: Date | string + consumedAt?: Date | string | null + isActive?: boolean + } + + export type WalletBonusUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: NullableStringFieldUpdateOperationsInput | string | null + goldGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + customer?: CustomerUpdateOneRequiredWithoutWalletBonusesNestedInput + } + + export type WalletBonusUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + orderId?: NullableStringFieldUpdateOperationsInput | string | null + goldGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type WalletBonusCreateManyInput = { + id?: string + customerId: string + orderId?: string | null + goldGrams: Decimal | DecimalJsLike | number | string + grantedAt?: Date | string + expiresAt: Date | string + consumedAt?: Date | string | null + isActive?: boolean + } + + export type WalletBonusUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: NullableStringFieldUpdateOperationsInput | string | null + goldGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type WalletBonusUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + orderId?: NullableStringFieldUpdateOperationsInput | string | null + goldGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type StringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + 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> + mode?: QueryMode + not?: NestedStringFilter<$PrismaModel> | string + } + + export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | 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> + mode?: QueryMode + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type CustomerListRelationFilter = { + every?: CustomerWhereInput + some?: CustomerWhereInput + none?: CustomerWhereInput + } + + export type CustomerAddressListRelationFilter = { + every?: CustomerAddressWhereInput + some?: CustomerAddressWhereInput + none?: CustomerAddressWhereInput + } + + export type BranchListRelationFilter = { + every?: BranchWhereInput + some?: BranchWhereInput + none?: BranchWhereInput + } + + export type PreOrderListRelationFilter = { + every?: PreOrderWhereInput + some?: PreOrderWhereInput + none?: PreOrderWhereInput + } + + export type SortOrderInput = { + sort: SortOrder + nulls?: NullsOrder + } + + export type CustomerOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type CustomerAddressOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type BranchOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type PreOrderOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type CityCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + province?: SortOrder + } + + export type CityMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + province?: SortOrder + } + + export type CityMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + province?: SortOrder + } + + export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + 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> + mode?: QueryMode + 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[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | 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> + mode?: QueryMode + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type EnumAdminRoleFilter<$PrismaModel = never> = { + equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel> + in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + not?: NestedEnumAdminRoleFilter<$PrismaModel> | $Enums.AdminRole + } + + export type DecimalNullableFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalNullableFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null + } + + export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + 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 BranchNullableRelationFilter = { + is?: BranchWhereInput | null + isNot?: BranchWhereInput | null + } + + export type LedgerEntryListRelationFilter = { + every?: LedgerEntryWhereInput + some?: LedgerEntryWhereInput + none?: LedgerEntryWhereInput + } + + export type OrderStatusEventListRelationFilter = { + every?: OrderStatusEventWhereInput + some?: OrderStatusEventWhereInput + none?: OrderStatusEventWhereInput + } + + export type PreOrderStatusEventListRelationFilter = { + every?: PreOrderStatusEventWhereInput + some?: PreOrderStatusEventWhereInput + none?: PreOrderStatusEventWhereInput + } + + export type LedgerEntryOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type OrderStatusEventOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type PreOrderStatusEventOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type AdminUserCountOrderByAggregateInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + branchId?: SortOrder + wagePercent?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + } + + export type AdminUserAvgOrderByAggregateInput = { + wagePercent?: SortOrder + } + + export type AdminUserMaxOrderByAggregateInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + branchId?: SortOrder + wagePercent?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + } + + export type AdminUserMinOrderByAggregateInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + branchId?: SortOrder + wagePercent?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + } + + export type AdminUserSumOrderByAggregateInput = { + wagePercent?: SortOrder + } + + export type EnumAdminRoleWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel> + in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + not?: NestedEnumAdminRoleWithAggregatesFilter<$PrismaModel> | $Enums.AdminRole + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAdminRoleFilter<$PrismaModel> + _max?: NestedEnumAdminRoleFilter<$PrismaModel> + } + + export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedDecimalNullableFilter<$PrismaModel> + _sum?: NestedDecimalNullableFilter<$PrismaModel> + _min?: NestedDecimalNullableFilter<$PrismaModel> + _max?: NestedDecimalNullableFilter<$PrismaModel> + } + + export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + 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 DecimalFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string + } + + export type EnumVerificationStepFilter<$PrismaModel = never> = { + equals?: $Enums.VerificationStep | EnumVerificationStepFieldRefInput<$PrismaModel> + in?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> + notIn?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> + not?: NestedEnumVerificationStepFilter<$PrismaModel> | $Enums.VerificationStep + } + + export type CityNullableRelationFilter = { + is?: CityWhereInput | null + isNot?: CityWhereInput | null + } + + export type AdminUserNullableRelationFilter = { + is?: AdminUserWhereInput | null + isNot?: AdminUserWhereInput | null + } + + export type OrderListRelationFilter = { + every?: OrderWhereInput + some?: OrderWhereInput + none?: OrderWhereInput + } + + export type WalletBonusListRelationFilter = { + every?: WalletBonusWhereInput + some?: WalletBonusWhereInput + none?: WalletBonusWhereInput + } + + export type OrderOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type WalletBonusOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type CustomerCountOrderByAggregateInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + nationalCode?: SortOrder + passwordHash?: SortOrder + cityId?: SortOrder + referredByAgentId?: SortOrder + goldCreditLimitGrams?: SortOrder + goldDebtGrams?: SortOrder + fiatDebtRial?: SortOrder + verificationStep?: SortOrder + nationalIdImageUrl?: SortOrder + businessLicenseUrl?: SortOrder + shopImageUrl?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type CustomerAvgOrderByAggregateInput = { + goldCreditLimitGrams?: SortOrder + goldDebtGrams?: SortOrder + fiatDebtRial?: SortOrder + } + + export type CustomerMaxOrderByAggregateInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + nationalCode?: SortOrder + passwordHash?: SortOrder + cityId?: SortOrder + referredByAgentId?: SortOrder + goldCreditLimitGrams?: SortOrder + goldDebtGrams?: SortOrder + fiatDebtRial?: SortOrder + verificationStep?: SortOrder + nationalIdImageUrl?: SortOrder + businessLicenseUrl?: SortOrder + shopImageUrl?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type CustomerMinOrderByAggregateInput = { + id?: SortOrder + fullName?: SortOrder + mobile?: SortOrder + nationalCode?: SortOrder + passwordHash?: SortOrder + cityId?: SortOrder + referredByAgentId?: SortOrder + goldCreditLimitGrams?: SortOrder + goldDebtGrams?: SortOrder + fiatDebtRial?: SortOrder + verificationStep?: SortOrder + nationalIdImageUrl?: SortOrder + businessLicenseUrl?: SortOrder + shopImageUrl?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type CustomerSumOrderByAggregateInput = { + goldCreditLimitGrams?: SortOrder + goldDebtGrams?: SortOrder + fiatDebtRial?: SortOrder + } + + export type DecimalWithAggregatesFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedDecimalFilter<$PrismaModel> + _sum?: NestedDecimalFilter<$PrismaModel> + _min?: NestedDecimalFilter<$PrismaModel> + _max?: NestedDecimalFilter<$PrismaModel> + } + + export type EnumVerificationStepWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.VerificationStep | EnumVerificationStepFieldRefInput<$PrismaModel> + in?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> + notIn?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> + not?: NestedEnumVerificationStepWithAggregatesFilter<$PrismaModel> | $Enums.VerificationStep + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumVerificationStepFilter<$PrismaModel> + _max?: NestedEnumVerificationStepFilter<$PrismaModel> + } + + export type CustomerRelationFilter = { + is?: CustomerWhereInput + isNot?: CustomerWhereInput + } + + export type CustomerAddressCountOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrder + addressLine?: SortOrder + isDefault?: SortOrder + } + + export type CustomerAddressMaxOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrder + addressLine?: SortOrder + isDefault?: SortOrder + } + + export type CustomerAddressMinOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrder + addressLine?: SortOrder + isDefault?: SortOrder + } + + export type AdminUserListRelationFilter = { + every?: AdminUserWhereInput + some?: AdminUserWhereInput + none?: AdminUserWhereInput + } + + export type AdminUserOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type BranchCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + cityId?: SortOrder + } + + export type BranchMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + cityId?: SortOrder + } + + export type BranchMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + cityId?: SortOrder + } + + export type WorkshopCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + isActive?: SortOrder + } + + export type WorkshopMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + isActive?: SortOrder + } + + export type WorkshopMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + isActive?: SortOrder + } + + export type CategoryNullableRelationFilter = { + is?: CategoryWhereInput | null + isNot?: CategoryWhereInput | null + } + + export type CategoryListRelationFilter = { + every?: CategoryWhereInput + some?: CategoryWhereInput + none?: CategoryWhereInput + } + + export type ProductListRelationFilter = { + every?: ProductWhereInput + some?: ProductWhereInput + none?: ProductWhereInput + } + + export type CategoryOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ProductOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type CategoryCountOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + parentId?: SortOrder + } + + export type CategoryMaxOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + parentId?: SortOrder + } + + export type CategoryMinOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + parentId?: SortOrder + } + + export type BrandCountOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + } + + export type BrandMaxOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + } + + export type BrandMinOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + } + + export type CollectionProductListRelationFilter = { + every?: CollectionProductWhereInput + some?: CollectionProductWhereInput + none?: CollectionProductWhereInput + } + + export type CollectionProductOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type CollectionCountOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrder + isActive?: SortOrder + } + + export type CollectionMaxOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrder + isActive?: SortOrder + } + + export type CollectionMinOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrder + isActive?: SortOrder + } + + export type CollectionRelationFilter = { + is?: CollectionWhereInput + isNot?: CollectionWhereInput + } + + export type ProductRelationFilter = { + is?: ProductWhereInput + isNot?: ProductWhereInput + } + + export type CollectionProductCollectionIdProductIdCompoundUniqueInput = { + collectionId: string + productId: string + } + + export type CollectionProductCountOrderByAggregateInput = { + collectionId?: SortOrder + productId?: SortOrder + } + + export type CollectionProductMaxOrderByAggregateInput = { + collectionId?: SortOrder + productId?: SortOrder + } + + export type CollectionProductMinOrderByAggregateInput = { + collectionId?: SortOrder + productId?: SortOrder + } + + export type BrandNullableRelationFilter = { + is?: BrandWhereInput | null + isNot?: BrandWhereInput | null + } + + export type ProductVariantListRelationFilter = { + every?: ProductVariantWhereInput + some?: ProductVariantWhereInput + none?: ProductVariantWhereInput + } + + export type ProductImageListRelationFilter = { + every?: ProductImageWhereInput + some?: ProductImageWhereInput + none?: ProductImageWhereInput + } + + export type ProductVariantOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ProductImageOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ProductCountOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrder + categoryId?: SortOrder + brandId?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + } + + export type ProductMaxOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrder + categoryId?: SortOrder + brandId?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + } + + export type ProductMinOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + description?: SortOrder + categoryId?: SortOrder + brandId?: SortOrder + isActive?: SortOrder + createdAt?: SortOrder + } + + export type IntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type ProductImageCountOrderByAggregateInput = { + id?: SortOrder + productId?: SortOrder + url?: SortOrder + sortOrder?: SortOrder + } + + export type ProductImageAvgOrderByAggregateInput = { + sortOrder?: SortOrder + } + + export type ProductImageMaxOrderByAggregateInput = { + id?: SortOrder + productId?: SortOrder + url?: SortOrder + sortOrder?: SortOrder + } + + export type ProductImageMinOrderByAggregateInput = { + id?: SortOrder + productId?: SortOrder + url?: SortOrder + sortOrder?: SortOrder + } + + export type ProductImageSumOrderByAggregateInput = { + sortOrder?: SortOrder + } + + export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + 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 OrderItemListRelationFilter = { + every?: OrderItemWhereInput + some?: OrderItemWhereInput + none?: OrderItemWhereInput + } + + export type OrderItemOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ProductVariantCountOrderByAggregateInput = { + id?: SortOrder + productId?: SortOrder + title?: SortOrder + sku?: SortOrder + rashWeightGrams?: SortOrder + defaultWagePercent?: SortOrder + isActive?: SortOrder + } + + export type ProductVariantAvgOrderByAggregateInput = { + rashWeightGrams?: SortOrder + defaultWagePercent?: SortOrder + } + + export type ProductVariantMaxOrderByAggregateInput = { + id?: SortOrder + productId?: SortOrder + title?: SortOrder + sku?: SortOrder + rashWeightGrams?: SortOrder + defaultWagePercent?: SortOrder + isActive?: SortOrder + } + + export type ProductVariantMinOrderByAggregateInput = { + id?: SortOrder + productId?: SortOrder + title?: SortOrder + sku?: SortOrder + rashWeightGrams?: SortOrder + defaultWagePercent?: SortOrder + isActive?: SortOrder + } + + export type ProductVariantSumOrderByAggregateInput = { + rashWeightGrams?: SortOrder + defaultWagePercent?: SortOrder + } + + export type EnumOrderStatusFilter<$PrismaModel = never> = { + equals?: $Enums.OrderStatus | EnumOrderStatusFieldRefInput<$PrismaModel> + in?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> + not?: NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus + } + + export type DateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | 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 PreOrderNullableRelationFilter = { + is?: PreOrderWhereInput | null + isNot?: PreOrderWhereInput | null + } + + export type OrderCountOrderByAggregateInput = { + id?: SortOrder + orderNumber?: SortOrder + customerId?: SortOrder + branchId?: SortOrder + status?: SortOrder + totalGoldWeightGrams?: SortOrder + wageWeightGrams?: SortOrder + flatRialCharge?: SortOrder + isSuspendedOverCreditLimit?: SortOrder + deliveredAt?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type OrderAvgOrderByAggregateInput = { + totalGoldWeightGrams?: SortOrder + wageWeightGrams?: SortOrder + flatRialCharge?: SortOrder + } + + export type OrderMaxOrderByAggregateInput = { + id?: SortOrder + orderNumber?: SortOrder + customerId?: SortOrder + branchId?: SortOrder + status?: SortOrder + totalGoldWeightGrams?: SortOrder + wageWeightGrams?: SortOrder + flatRialCharge?: SortOrder + isSuspendedOverCreditLimit?: SortOrder + deliveredAt?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type OrderMinOrderByAggregateInput = { + id?: SortOrder + orderNumber?: SortOrder + customerId?: SortOrder + branchId?: SortOrder + status?: SortOrder + totalGoldWeightGrams?: SortOrder + wageWeightGrams?: SortOrder + flatRialCharge?: SortOrder + isSuspendedOverCreditLimit?: SortOrder + deliveredAt?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type OrderSumOrderByAggregateInput = { + totalGoldWeightGrams?: SortOrder + wageWeightGrams?: SortOrder + flatRialCharge?: SortOrder + } + + export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.OrderStatus | EnumOrderStatusFieldRefInput<$PrismaModel> + in?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> + not?: NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumOrderStatusFilter<$PrismaModel> + _max?: NestedEnumOrderStatusFilter<$PrismaModel> + } + + export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | 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 OrderRelationFilter = { + is?: OrderWhereInput + isNot?: OrderWhereInput + } + + export type ProductVariantRelationFilter = { + is?: ProductVariantWhereInput + isNot?: ProductVariantWhereInput + } + + export type OrderItemCountOrderByAggregateInput = { + id?: SortOrder + orderId?: SortOrder + productVariantId?: SortOrder + quantity?: SortOrder + rashWeightGramsSnapshot?: SortOrder + wagePercentSnapshot?: SortOrder + discountPercentSnapshot?: SortOrder + computedWeightGrams?: SortOrder + flatRialCharge?: SortOrder + } + + export type OrderItemAvgOrderByAggregateInput = { + quantity?: SortOrder + rashWeightGramsSnapshot?: SortOrder + wagePercentSnapshot?: SortOrder + discountPercentSnapshot?: SortOrder + computedWeightGrams?: SortOrder + flatRialCharge?: SortOrder + } + + export type OrderItemMaxOrderByAggregateInput = { + id?: SortOrder + orderId?: SortOrder + productVariantId?: SortOrder + quantity?: SortOrder + rashWeightGramsSnapshot?: SortOrder + wagePercentSnapshot?: SortOrder + discountPercentSnapshot?: SortOrder + computedWeightGrams?: SortOrder + flatRialCharge?: SortOrder + } + + export type OrderItemMinOrderByAggregateInput = { + id?: SortOrder + orderId?: SortOrder + productVariantId?: SortOrder + quantity?: SortOrder + rashWeightGramsSnapshot?: SortOrder + wagePercentSnapshot?: SortOrder + discountPercentSnapshot?: SortOrder + computedWeightGrams?: SortOrder + flatRialCharge?: SortOrder + } + + export type OrderItemSumOrderByAggregateInput = { + quantity?: SortOrder + rashWeightGramsSnapshot?: SortOrder + wagePercentSnapshot?: SortOrder + discountPercentSnapshot?: SortOrder + computedWeightGrams?: SortOrder + flatRialCharge?: SortOrder + } + + export type EnumOrderStatusNullableFilter<$PrismaModel = never> = { + equals?: $Enums.OrderStatus | EnumOrderStatusFieldRefInput<$PrismaModel> | null + in?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> | null + notIn?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> | null + not?: NestedEnumOrderStatusNullableFilter<$PrismaModel> | $Enums.OrderStatus | null + } + + export type OrderStatusEventCountOrderByAggregateInput = { + id?: SortOrder + orderId?: SortOrder + fromStatus?: SortOrder + toStatus?: SortOrder + note?: SortOrder + actorAdminUserId?: SortOrder + createdAt?: SortOrder + } + + export type OrderStatusEventMaxOrderByAggregateInput = { + id?: SortOrder + orderId?: SortOrder + fromStatus?: SortOrder + toStatus?: SortOrder + note?: SortOrder + actorAdminUserId?: SortOrder + createdAt?: SortOrder + } + + export type OrderStatusEventMinOrderByAggregateInput = { + id?: SortOrder + orderId?: SortOrder + fromStatus?: SortOrder + toStatus?: SortOrder + note?: SortOrder + actorAdminUserId?: SortOrder + createdAt?: SortOrder + } + + export type EnumOrderStatusNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.OrderStatus | EnumOrderStatusFieldRefInput<$PrismaModel> | null + in?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> | null + notIn?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> | null + not?: NestedEnumOrderStatusNullableWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedEnumOrderStatusNullableFilter<$PrismaModel> + _max?: NestedEnumOrderStatusNullableFilter<$PrismaModel> + } + + export type EnumPreOrderStatusFilter<$PrismaModel = never> = { + equals?: $Enums.PreOrderStatus | EnumPreOrderStatusFieldRefInput<$PrismaModel> + in?: $Enums.PreOrderStatus[] | ListEnumPreOrderStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PreOrderStatus[] | ListEnumPreOrderStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPreOrderStatusFilter<$PrismaModel> | $Enums.PreOrderStatus + } + + export type WorkshopNullableRelationFilter = { + is?: WorkshopWhereInput | null + isNot?: WorkshopWhereInput | null + } + + export type OrderNullableRelationFilter = { + is?: OrderWhereInput | null + isNot?: OrderWhereInput | null + } + + export type PreOrderCountOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrder + workshopId?: SortOrder + status?: SortOrder + designImageUrl?: SortOrder + colorName?: SortOrder + sizeSpec?: SortOrder + stoneColor?: SortOrder + minaColor?: SortOrder + estimatedWeightGrams?: SortOrder + estimatedPriceRial?: SortOrder + description?: SortOrder + convertedOrderId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PreOrderAvgOrderByAggregateInput = { + estimatedWeightGrams?: SortOrder + estimatedPriceRial?: SortOrder + } + + export type PreOrderMaxOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrder + workshopId?: SortOrder + status?: SortOrder + designImageUrl?: SortOrder + colorName?: SortOrder + sizeSpec?: SortOrder + stoneColor?: SortOrder + minaColor?: SortOrder + estimatedWeightGrams?: SortOrder + estimatedPriceRial?: SortOrder + description?: SortOrder + convertedOrderId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PreOrderMinOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + cityId?: SortOrder + workshopId?: SortOrder + status?: SortOrder + designImageUrl?: SortOrder + colorName?: SortOrder + sizeSpec?: SortOrder + stoneColor?: SortOrder + minaColor?: SortOrder + estimatedWeightGrams?: SortOrder + estimatedPriceRial?: SortOrder + description?: SortOrder + convertedOrderId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PreOrderSumOrderByAggregateInput = { + estimatedWeightGrams?: SortOrder + estimatedPriceRial?: SortOrder + } + + export type EnumPreOrderStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PreOrderStatus | EnumPreOrderStatusFieldRefInput<$PrismaModel> + in?: $Enums.PreOrderStatus[] | ListEnumPreOrderStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PreOrderStatus[] | ListEnumPreOrderStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPreOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.PreOrderStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPreOrderStatusFilter<$PrismaModel> + _max?: NestedEnumPreOrderStatusFilter<$PrismaModel> + } + export type JsonFilter<$PrismaModel = never> = + | PatchUndefined< + Either>, Exclude>, 'path'>>, + Required> + > + | OptionalFlat>, 'path'>> + + export type JsonFilterBase<$PrismaModel = never> = { + equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + path?: string[] + string_contains?: string | StringFieldRefInput<$PrismaModel> + string_starts_with?: string | StringFieldRefInput<$PrismaModel> + string_ends_with?: string | StringFieldRefInput<$PrismaModel> + array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + } + + export type PreOrderRelationFilter = { + is?: PreOrderWhereInput + isNot?: PreOrderWhereInput + } + + export type PreOrderStatusEventCountOrderByAggregateInput = { + id?: SortOrder + preOrderId?: SortOrder + changes?: SortOrder + actorAdminUserId?: SortOrder + ipAddress?: SortOrder + createdAt?: SortOrder + } + + export type PreOrderStatusEventMaxOrderByAggregateInput = { + id?: SortOrder + preOrderId?: SortOrder + actorAdminUserId?: SortOrder + ipAddress?: SortOrder + createdAt?: SortOrder + } + + export type PreOrderStatusEventMinOrderByAggregateInput = { + id?: SortOrder + preOrderId?: SortOrder + actorAdminUserId?: SortOrder + ipAddress?: SortOrder + createdAt?: SortOrder + } + export type JsonWithAggregatesFilter<$PrismaModel = never> = + | PatchUndefined< + Either>, Exclude>, 'path'>>, + Required> + > + | OptionalFlat>, 'path'>> + + export type JsonWithAggregatesFilterBase<$PrismaModel = never> = { + equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + path?: string[] + string_contains?: string | StringFieldRefInput<$PrismaModel> + string_starts_with?: string | StringFieldRefInput<$PrismaModel> + string_ends_with?: string | StringFieldRefInput<$PrismaModel> + array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedJsonFilter<$PrismaModel> + _max?: NestedJsonFilter<$PrismaModel> + } + + export type EnumLedgerCurrencyFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerCurrency | EnumLedgerCurrencyFieldRefInput<$PrismaModel> + in?: $Enums.LedgerCurrency[] | ListEnumLedgerCurrencyFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerCurrency[] | ListEnumLedgerCurrencyFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerCurrencyFilter<$PrismaModel> | $Enums.LedgerCurrency + } + + export type EnumLedgerDirectionFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerDirection | EnumLedgerDirectionFieldRefInput<$PrismaModel> + in?: $Enums.LedgerDirection[] | ListEnumLedgerDirectionFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerDirection[] | ListEnumLedgerDirectionFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerDirectionFilter<$PrismaModel> | $Enums.LedgerDirection + } + + export type EnumLedgerSourceTypeFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerSourceType | EnumLedgerSourceTypeFieldRefInput<$PrismaModel> + in?: $Enums.LedgerSourceType[] | ListEnumLedgerSourceTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerSourceType[] | ListEnumLedgerSourceTypeFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerSourceTypeFilter<$PrismaModel> | $Enums.LedgerSourceType + } + + export type IntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type LedgerEntryCountOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + currency?: SortOrder + direction?: SortOrder + sourceType?: SortOrder + amount?: SortOrder + karatPerMille?: SortOrder + pricePerGramRialAtEntry?: SortOrder + orderId?: SortOrder + confirmed?: SortOrder + confirmedAt?: SortOrder + postedByAdminUserId?: SortOrder + note?: SortOrder + createdAt?: SortOrder + } + + export type LedgerEntryAvgOrderByAggregateInput = { + amount?: SortOrder + karatPerMille?: SortOrder + pricePerGramRialAtEntry?: SortOrder + } + + export type LedgerEntryMaxOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + currency?: SortOrder + direction?: SortOrder + sourceType?: SortOrder + amount?: SortOrder + karatPerMille?: SortOrder + pricePerGramRialAtEntry?: SortOrder + orderId?: SortOrder + confirmed?: SortOrder + confirmedAt?: SortOrder + postedByAdminUserId?: SortOrder + note?: SortOrder + createdAt?: SortOrder + } + + export type LedgerEntryMinOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + currency?: SortOrder + direction?: SortOrder + sourceType?: SortOrder + amount?: SortOrder + karatPerMille?: SortOrder + pricePerGramRialAtEntry?: SortOrder + orderId?: SortOrder + confirmed?: SortOrder + confirmedAt?: SortOrder + postedByAdminUserId?: SortOrder + note?: SortOrder + createdAt?: SortOrder + } + + export type LedgerEntrySumOrderByAggregateInput = { + amount?: SortOrder + karatPerMille?: SortOrder + pricePerGramRialAtEntry?: SortOrder + } + + export type EnumLedgerCurrencyWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerCurrency | EnumLedgerCurrencyFieldRefInput<$PrismaModel> + in?: $Enums.LedgerCurrency[] | ListEnumLedgerCurrencyFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerCurrency[] | ListEnumLedgerCurrencyFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerCurrencyWithAggregatesFilter<$PrismaModel> | $Enums.LedgerCurrency + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumLedgerCurrencyFilter<$PrismaModel> + _max?: NestedEnumLedgerCurrencyFilter<$PrismaModel> + } + + export type EnumLedgerDirectionWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerDirection | EnumLedgerDirectionFieldRefInput<$PrismaModel> + in?: $Enums.LedgerDirection[] | ListEnumLedgerDirectionFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerDirection[] | ListEnumLedgerDirectionFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerDirectionWithAggregatesFilter<$PrismaModel> | $Enums.LedgerDirection + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumLedgerDirectionFilter<$PrismaModel> + _max?: NestedEnumLedgerDirectionFilter<$PrismaModel> + } + + export type EnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerSourceType | EnumLedgerSourceTypeFieldRefInput<$PrismaModel> + in?: $Enums.LedgerSourceType[] | ListEnumLedgerSourceTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerSourceType[] | ListEnumLedgerSourceTypeFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel> | $Enums.LedgerSourceType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumLedgerSourceTypeFilter<$PrismaModel> + _max?: NestedEnumLedgerSourceTypeFilter<$PrismaModel> + } + + export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | 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 GoldPriceQuoteCountOrderByAggregateInput = { + id?: SortOrder + karatPerMille?: SortOrder + pricePerGramRial?: SortOrder + source?: SortOrder + quotedAt?: SortOrder + } + + export type GoldPriceQuoteAvgOrderByAggregateInput = { + karatPerMille?: SortOrder + pricePerGramRial?: SortOrder + } + + export type GoldPriceQuoteMaxOrderByAggregateInput = { + id?: SortOrder + karatPerMille?: SortOrder + pricePerGramRial?: SortOrder + source?: SortOrder + quotedAt?: SortOrder + } + + export type GoldPriceQuoteMinOrderByAggregateInput = { + id?: SortOrder + karatPerMille?: SortOrder + pricePerGramRial?: SortOrder + source?: SortOrder + quotedAt?: SortOrder + } + + export type GoldPriceQuoteSumOrderByAggregateInput = { + karatPerMille?: SortOrder + pricePerGramRial?: SortOrder + } + + export type WalletBonusCountOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + orderId?: SortOrder + goldGrams?: SortOrder + grantedAt?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrder + isActive?: SortOrder + } + + export type WalletBonusAvgOrderByAggregateInput = { + goldGrams?: SortOrder + } + + export type WalletBonusMaxOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + orderId?: SortOrder + goldGrams?: SortOrder + grantedAt?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrder + isActive?: SortOrder + } + + export type WalletBonusMinOrderByAggregateInput = { + id?: SortOrder + customerId?: SortOrder + orderId?: SortOrder + goldGrams?: SortOrder + grantedAt?: SortOrder + expiresAt?: SortOrder + consumedAt?: SortOrder + isActive?: SortOrder + } + + export type WalletBonusSumOrderByAggregateInput = { + goldGrams?: SortOrder + } + + export type CustomerCreateNestedManyWithoutCityInput = { + create?: XOR | CustomerCreateWithoutCityInput[] | CustomerUncheckedCreateWithoutCityInput[] + connectOrCreate?: CustomerCreateOrConnectWithoutCityInput | CustomerCreateOrConnectWithoutCityInput[] + createMany?: CustomerCreateManyCityInputEnvelope + connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + } + + export type CustomerAddressCreateNestedManyWithoutCityInput = { + create?: XOR | CustomerAddressCreateWithoutCityInput[] | CustomerAddressUncheckedCreateWithoutCityInput[] + connectOrCreate?: CustomerAddressCreateOrConnectWithoutCityInput | CustomerAddressCreateOrConnectWithoutCityInput[] + createMany?: CustomerAddressCreateManyCityInputEnvelope + connect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + } + + export type BranchCreateNestedManyWithoutCityInput = { + create?: XOR | BranchCreateWithoutCityInput[] | BranchUncheckedCreateWithoutCityInput[] + connectOrCreate?: BranchCreateOrConnectWithoutCityInput | BranchCreateOrConnectWithoutCityInput[] + createMany?: BranchCreateManyCityInputEnvelope + connect?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + } + + export type PreOrderCreateNestedManyWithoutCityInput = { + create?: XOR | PreOrderCreateWithoutCityInput[] | PreOrderUncheckedCreateWithoutCityInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutCityInput | PreOrderCreateOrConnectWithoutCityInput[] + createMany?: PreOrderCreateManyCityInputEnvelope + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + } + + export type CustomerUncheckedCreateNestedManyWithoutCityInput = { + create?: XOR | CustomerCreateWithoutCityInput[] | CustomerUncheckedCreateWithoutCityInput[] + connectOrCreate?: CustomerCreateOrConnectWithoutCityInput | CustomerCreateOrConnectWithoutCityInput[] + createMany?: CustomerCreateManyCityInputEnvelope + connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + } + + export type CustomerAddressUncheckedCreateNestedManyWithoutCityInput = { + create?: XOR | CustomerAddressCreateWithoutCityInput[] | CustomerAddressUncheckedCreateWithoutCityInput[] + connectOrCreate?: CustomerAddressCreateOrConnectWithoutCityInput | CustomerAddressCreateOrConnectWithoutCityInput[] + createMany?: CustomerAddressCreateManyCityInputEnvelope + connect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + } + + export type BranchUncheckedCreateNestedManyWithoutCityInput = { + create?: XOR | BranchCreateWithoutCityInput[] | BranchUncheckedCreateWithoutCityInput[] + connectOrCreate?: BranchCreateOrConnectWithoutCityInput | BranchCreateOrConnectWithoutCityInput[] + createMany?: BranchCreateManyCityInputEnvelope + connect?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + } + + export type PreOrderUncheckedCreateNestedManyWithoutCityInput = { + create?: XOR | PreOrderCreateWithoutCityInput[] | PreOrderUncheckedCreateWithoutCityInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutCityInput | PreOrderCreateOrConnectWithoutCityInput[] + createMany?: PreOrderCreateManyCityInputEnvelope + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + } + + export type StringFieldUpdateOperationsInput = { + set?: string + } + + export type NullableStringFieldUpdateOperationsInput = { + set?: string | null + } + + export type CustomerUpdateManyWithoutCityNestedInput = { + create?: XOR | CustomerCreateWithoutCityInput[] | CustomerUncheckedCreateWithoutCityInput[] + connectOrCreate?: CustomerCreateOrConnectWithoutCityInput | CustomerCreateOrConnectWithoutCityInput[] + upsert?: CustomerUpsertWithWhereUniqueWithoutCityInput | CustomerUpsertWithWhereUniqueWithoutCityInput[] + createMany?: CustomerCreateManyCityInputEnvelope + set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + update?: CustomerUpdateWithWhereUniqueWithoutCityInput | CustomerUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: CustomerUpdateManyWithWhereWithoutCityInput | CustomerUpdateManyWithWhereWithoutCityInput[] + deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[] + } + + export type CustomerAddressUpdateManyWithoutCityNestedInput = { + create?: XOR | CustomerAddressCreateWithoutCityInput[] | CustomerAddressUncheckedCreateWithoutCityInput[] + connectOrCreate?: CustomerAddressCreateOrConnectWithoutCityInput | CustomerAddressCreateOrConnectWithoutCityInput[] + upsert?: CustomerAddressUpsertWithWhereUniqueWithoutCityInput | CustomerAddressUpsertWithWhereUniqueWithoutCityInput[] + createMany?: CustomerAddressCreateManyCityInputEnvelope + set?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + disconnect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + delete?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + connect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + update?: CustomerAddressUpdateWithWhereUniqueWithoutCityInput | CustomerAddressUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: CustomerAddressUpdateManyWithWhereWithoutCityInput | CustomerAddressUpdateManyWithWhereWithoutCityInput[] + deleteMany?: CustomerAddressScalarWhereInput | CustomerAddressScalarWhereInput[] + } + + export type BranchUpdateManyWithoutCityNestedInput = { + create?: XOR | BranchCreateWithoutCityInput[] | BranchUncheckedCreateWithoutCityInput[] + connectOrCreate?: BranchCreateOrConnectWithoutCityInput | BranchCreateOrConnectWithoutCityInput[] + upsert?: BranchUpsertWithWhereUniqueWithoutCityInput | BranchUpsertWithWhereUniqueWithoutCityInput[] + createMany?: BranchCreateManyCityInputEnvelope + set?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + disconnect?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + delete?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + connect?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + update?: BranchUpdateWithWhereUniqueWithoutCityInput | BranchUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: BranchUpdateManyWithWhereWithoutCityInput | BranchUpdateManyWithWhereWithoutCityInput[] + deleteMany?: BranchScalarWhereInput | BranchScalarWhereInput[] + } + + export type PreOrderUpdateManyWithoutCityNestedInput = { + create?: XOR | PreOrderCreateWithoutCityInput[] | PreOrderUncheckedCreateWithoutCityInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutCityInput | PreOrderCreateOrConnectWithoutCityInput[] + upsert?: PreOrderUpsertWithWhereUniqueWithoutCityInput | PreOrderUpsertWithWhereUniqueWithoutCityInput[] + createMany?: PreOrderCreateManyCityInputEnvelope + set?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + disconnect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + delete?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + update?: PreOrderUpdateWithWhereUniqueWithoutCityInput | PreOrderUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: PreOrderUpdateManyWithWhereWithoutCityInput | PreOrderUpdateManyWithWhereWithoutCityInput[] + deleteMany?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] + } + + export type CustomerUncheckedUpdateManyWithoutCityNestedInput = { + create?: XOR | CustomerCreateWithoutCityInput[] | CustomerUncheckedCreateWithoutCityInput[] + connectOrCreate?: CustomerCreateOrConnectWithoutCityInput | CustomerCreateOrConnectWithoutCityInput[] + upsert?: CustomerUpsertWithWhereUniqueWithoutCityInput | CustomerUpsertWithWhereUniqueWithoutCityInput[] + createMany?: CustomerCreateManyCityInputEnvelope + set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + update?: CustomerUpdateWithWhereUniqueWithoutCityInput | CustomerUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: CustomerUpdateManyWithWhereWithoutCityInput | CustomerUpdateManyWithWhereWithoutCityInput[] + deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[] + } + + export type CustomerAddressUncheckedUpdateManyWithoutCityNestedInput = { + create?: XOR | CustomerAddressCreateWithoutCityInput[] | CustomerAddressUncheckedCreateWithoutCityInput[] + connectOrCreate?: CustomerAddressCreateOrConnectWithoutCityInput | CustomerAddressCreateOrConnectWithoutCityInput[] + upsert?: CustomerAddressUpsertWithWhereUniqueWithoutCityInput | CustomerAddressUpsertWithWhereUniqueWithoutCityInput[] + createMany?: CustomerAddressCreateManyCityInputEnvelope + set?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + disconnect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + delete?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + connect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + update?: CustomerAddressUpdateWithWhereUniqueWithoutCityInput | CustomerAddressUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: CustomerAddressUpdateManyWithWhereWithoutCityInput | CustomerAddressUpdateManyWithWhereWithoutCityInput[] + deleteMany?: CustomerAddressScalarWhereInput | CustomerAddressScalarWhereInput[] + } + + export type BranchUncheckedUpdateManyWithoutCityNestedInput = { + create?: XOR | BranchCreateWithoutCityInput[] | BranchUncheckedCreateWithoutCityInput[] + connectOrCreate?: BranchCreateOrConnectWithoutCityInput | BranchCreateOrConnectWithoutCityInput[] + upsert?: BranchUpsertWithWhereUniqueWithoutCityInput | BranchUpsertWithWhereUniqueWithoutCityInput[] + createMany?: BranchCreateManyCityInputEnvelope + set?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + disconnect?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + delete?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + connect?: BranchWhereUniqueInput | BranchWhereUniqueInput[] + update?: BranchUpdateWithWhereUniqueWithoutCityInput | BranchUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: BranchUpdateManyWithWhereWithoutCityInput | BranchUpdateManyWithWhereWithoutCityInput[] + deleteMany?: BranchScalarWhereInput | BranchScalarWhereInput[] + } + + export type PreOrderUncheckedUpdateManyWithoutCityNestedInput = { + create?: XOR | PreOrderCreateWithoutCityInput[] | PreOrderUncheckedCreateWithoutCityInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutCityInput | PreOrderCreateOrConnectWithoutCityInput[] + upsert?: PreOrderUpsertWithWhereUniqueWithoutCityInput | PreOrderUpsertWithWhereUniqueWithoutCityInput[] + createMany?: PreOrderCreateManyCityInputEnvelope + set?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + disconnect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + delete?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + update?: PreOrderUpdateWithWhereUniqueWithoutCityInput | PreOrderUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: PreOrderUpdateManyWithWhereWithoutCityInput | PreOrderUpdateManyWithWhereWithoutCityInput[] + deleteMany?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] + } + + export type BranchCreateNestedOneWithoutAdminUsersInput = { + create?: XOR + connectOrCreate?: BranchCreateOrConnectWithoutAdminUsersInput + connect?: BranchWhereUniqueInput + } + + export type CustomerCreateNestedManyWithoutReferredByAgentInput = { + create?: XOR | CustomerCreateWithoutReferredByAgentInput[] | CustomerUncheckedCreateWithoutReferredByAgentInput[] + connectOrCreate?: CustomerCreateOrConnectWithoutReferredByAgentInput | CustomerCreateOrConnectWithoutReferredByAgentInput[] + createMany?: CustomerCreateManyReferredByAgentInputEnvelope + connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + } + + export type LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput = { + create?: XOR | LedgerEntryCreateWithoutPostedByAdminUserInput[] | LedgerEntryUncheckedCreateWithoutPostedByAdminUserInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutPostedByAdminUserInput | LedgerEntryCreateOrConnectWithoutPostedByAdminUserInput[] + createMany?: LedgerEntryCreateManyPostedByAdminUserInputEnvelope + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + } + + export type OrderStatusEventCreateNestedManyWithoutActorAdminUserInput = { + create?: XOR | OrderStatusEventCreateWithoutActorAdminUserInput[] | OrderStatusEventUncheckedCreateWithoutActorAdminUserInput[] + connectOrCreate?: OrderStatusEventCreateOrConnectWithoutActorAdminUserInput | OrderStatusEventCreateOrConnectWithoutActorAdminUserInput[] + createMany?: OrderStatusEventCreateManyActorAdminUserInputEnvelope + connect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + } + + export type PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput = { + create?: XOR | PreOrderStatusEventCreateWithoutActorAdminUserInput[] | PreOrderStatusEventUncheckedCreateWithoutActorAdminUserInput[] + connectOrCreate?: PreOrderStatusEventCreateOrConnectWithoutActorAdminUserInput | PreOrderStatusEventCreateOrConnectWithoutActorAdminUserInput[] + createMany?: PreOrderStatusEventCreateManyActorAdminUserInputEnvelope + connect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + } + + export type CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput = { + create?: XOR | CustomerCreateWithoutReferredByAgentInput[] | CustomerUncheckedCreateWithoutReferredByAgentInput[] + connectOrCreate?: CustomerCreateOrConnectWithoutReferredByAgentInput | CustomerCreateOrConnectWithoutReferredByAgentInput[] + createMany?: CustomerCreateManyReferredByAgentInputEnvelope + connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + } + + export type LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput = { + create?: XOR | LedgerEntryCreateWithoutPostedByAdminUserInput[] | LedgerEntryUncheckedCreateWithoutPostedByAdminUserInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutPostedByAdminUserInput | LedgerEntryCreateOrConnectWithoutPostedByAdminUserInput[] + createMany?: LedgerEntryCreateManyPostedByAdminUserInputEnvelope + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + } + + export type OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput = { + create?: XOR | OrderStatusEventCreateWithoutActorAdminUserInput[] | OrderStatusEventUncheckedCreateWithoutActorAdminUserInput[] + connectOrCreate?: OrderStatusEventCreateOrConnectWithoutActorAdminUserInput | OrderStatusEventCreateOrConnectWithoutActorAdminUserInput[] + createMany?: OrderStatusEventCreateManyActorAdminUserInputEnvelope + connect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + } + + export type PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput = { + create?: XOR | PreOrderStatusEventCreateWithoutActorAdminUserInput[] | PreOrderStatusEventUncheckedCreateWithoutActorAdminUserInput[] + connectOrCreate?: PreOrderStatusEventCreateOrConnectWithoutActorAdminUserInput | PreOrderStatusEventCreateOrConnectWithoutActorAdminUserInput[] + createMany?: PreOrderStatusEventCreateManyActorAdminUserInputEnvelope + connect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + } + + export type EnumAdminRoleFieldUpdateOperationsInput = { + set?: $Enums.AdminRole + } + + export type NullableDecimalFieldUpdateOperationsInput = { + set?: Decimal | DecimalJsLike | number | string | null + increment?: Decimal | DecimalJsLike | number | string + decrement?: Decimal | DecimalJsLike | number | string + multiply?: Decimal | DecimalJsLike | number | string + divide?: Decimal | DecimalJsLike | number | string + } + + export type BoolFieldUpdateOperationsInput = { + set?: boolean + } + + export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string + } + + export type BranchUpdateOneWithoutAdminUsersNestedInput = { + create?: XOR + connectOrCreate?: BranchCreateOrConnectWithoutAdminUsersInput + upsert?: BranchUpsertWithoutAdminUsersInput + disconnect?: BranchWhereInput | boolean + delete?: BranchWhereInput | boolean + connect?: BranchWhereUniqueInput + update?: XOR, BranchUncheckedUpdateWithoutAdminUsersInput> + } + + export type CustomerUpdateManyWithoutReferredByAgentNestedInput = { + create?: XOR | CustomerCreateWithoutReferredByAgentInput[] | CustomerUncheckedCreateWithoutReferredByAgentInput[] + connectOrCreate?: CustomerCreateOrConnectWithoutReferredByAgentInput | CustomerCreateOrConnectWithoutReferredByAgentInput[] + upsert?: CustomerUpsertWithWhereUniqueWithoutReferredByAgentInput | CustomerUpsertWithWhereUniqueWithoutReferredByAgentInput[] + createMany?: CustomerCreateManyReferredByAgentInputEnvelope + set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + update?: CustomerUpdateWithWhereUniqueWithoutReferredByAgentInput | CustomerUpdateWithWhereUniqueWithoutReferredByAgentInput[] + updateMany?: CustomerUpdateManyWithWhereWithoutReferredByAgentInput | CustomerUpdateManyWithWhereWithoutReferredByAgentInput[] + deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[] + } + + export type LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput = { + create?: XOR | LedgerEntryCreateWithoutPostedByAdminUserInput[] | LedgerEntryUncheckedCreateWithoutPostedByAdminUserInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutPostedByAdminUserInput | LedgerEntryCreateOrConnectWithoutPostedByAdminUserInput[] + upsert?: LedgerEntryUpsertWithWhereUniqueWithoutPostedByAdminUserInput | LedgerEntryUpsertWithWhereUniqueWithoutPostedByAdminUserInput[] + createMany?: LedgerEntryCreateManyPostedByAdminUserInputEnvelope + set?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + disconnect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + delete?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + update?: LedgerEntryUpdateWithWhereUniqueWithoutPostedByAdminUserInput | LedgerEntryUpdateWithWhereUniqueWithoutPostedByAdminUserInput[] + updateMany?: LedgerEntryUpdateManyWithWhereWithoutPostedByAdminUserInput | LedgerEntryUpdateManyWithWhereWithoutPostedByAdminUserInput[] + deleteMany?: LedgerEntryScalarWhereInput | LedgerEntryScalarWhereInput[] + } + + export type OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput = { + create?: XOR | OrderStatusEventCreateWithoutActorAdminUserInput[] | OrderStatusEventUncheckedCreateWithoutActorAdminUserInput[] + connectOrCreate?: OrderStatusEventCreateOrConnectWithoutActorAdminUserInput | OrderStatusEventCreateOrConnectWithoutActorAdminUserInput[] + upsert?: OrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput | OrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput[] + createMany?: OrderStatusEventCreateManyActorAdminUserInputEnvelope + set?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + disconnect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + delete?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + connect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + update?: OrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput | OrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput[] + updateMany?: OrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput | OrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput[] + deleteMany?: OrderStatusEventScalarWhereInput | OrderStatusEventScalarWhereInput[] + } + + export type PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput = { + create?: XOR | PreOrderStatusEventCreateWithoutActorAdminUserInput[] | PreOrderStatusEventUncheckedCreateWithoutActorAdminUserInput[] + connectOrCreate?: PreOrderStatusEventCreateOrConnectWithoutActorAdminUserInput | PreOrderStatusEventCreateOrConnectWithoutActorAdminUserInput[] + upsert?: PreOrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput | PreOrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput[] + createMany?: PreOrderStatusEventCreateManyActorAdminUserInputEnvelope + set?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + disconnect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + delete?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + connect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + update?: PreOrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput | PreOrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput[] + updateMany?: PreOrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput | PreOrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput[] + deleteMany?: PreOrderStatusEventScalarWhereInput | PreOrderStatusEventScalarWhereInput[] + } + + export type CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput = { + create?: XOR | CustomerCreateWithoutReferredByAgentInput[] | CustomerUncheckedCreateWithoutReferredByAgentInput[] + connectOrCreate?: CustomerCreateOrConnectWithoutReferredByAgentInput | CustomerCreateOrConnectWithoutReferredByAgentInput[] + upsert?: CustomerUpsertWithWhereUniqueWithoutReferredByAgentInput | CustomerUpsertWithWhereUniqueWithoutReferredByAgentInput[] + createMany?: CustomerCreateManyReferredByAgentInputEnvelope + set?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + disconnect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + delete?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] + update?: CustomerUpdateWithWhereUniqueWithoutReferredByAgentInput | CustomerUpdateWithWhereUniqueWithoutReferredByAgentInput[] + updateMany?: CustomerUpdateManyWithWhereWithoutReferredByAgentInput | CustomerUpdateManyWithWhereWithoutReferredByAgentInput[] + deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[] + } + + export type LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput = { + create?: XOR | LedgerEntryCreateWithoutPostedByAdminUserInput[] | LedgerEntryUncheckedCreateWithoutPostedByAdminUserInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutPostedByAdminUserInput | LedgerEntryCreateOrConnectWithoutPostedByAdminUserInput[] + upsert?: LedgerEntryUpsertWithWhereUniqueWithoutPostedByAdminUserInput | LedgerEntryUpsertWithWhereUniqueWithoutPostedByAdminUserInput[] + createMany?: LedgerEntryCreateManyPostedByAdminUserInputEnvelope + set?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + disconnect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + delete?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + update?: LedgerEntryUpdateWithWhereUniqueWithoutPostedByAdminUserInput | LedgerEntryUpdateWithWhereUniqueWithoutPostedByAdminUserInput[] + updateMany?: LedgerEntryUpdateManyWithWhereWithoutPostedByAdminUserInput | LedgerEntryUpdateManyWithWhereWithoutPostedByAdminUserInput[] + deleteMany?: LedgerEntryScalarWhereInput | LedgerEntryScalarWhereInput[] + } + + export type OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput = { + create?: XOR | OrderStatusEventCreateWithoutActorAdminUserInput[] | OrderStatusEventUncheckedCreateWithoutActorAdminUserInput[] + connectOrCreate?: OrderStatusEventCreateOrConnectWithoutActorAdminUserInput | OrderStatusEventCreateOrConnectWithoutActorAdminUserInput[] + upsert?: OrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput | OrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput[] + createMany?: OrderStatusEventCreateManyActorAdminUserInputEnvelope + set?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + disconnect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + delete?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + connect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + update?: OrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput | OrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput[] + updateMany?: OrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput | OrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput[] + deleteMany?: OrderStatusEventScalarWhereInput | OrderStatusEventScalarWhereInput[] + } + + export type PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput = { + create?: XOR | PreOrderStatusEventCreateWithoutActorAdminUserInput[] | PreOrderStatusEventUncheckedCreateWithoutActorAdminUserInput[] + connectOrCreate?: PreOrderStatusEventCreateOrConnectWithoutActorAdminUserInput | PreOrderStatusEventCreateOrConnectWithoutActorAdminUserInput[] + upsert?: PreOrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput | PreOrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput[] + createMany?: PreOrderStatusEventCreateManyActorAdminUserInputEnvelope + set?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + disconnect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + delete?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + connect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + update?: PreOrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput | PreOrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput[] + updateMany?: PreOrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput | PreOrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput[] + deleteMany?: PreOrderStatusEventScalarWhereInput | PreOrderStatusEventScalarWhereInput[] + } + + export type CityCreateNestedOneWithoutCustomersInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutCustomersInput + connect?: CityWhereUniqueInput + } + + export type AdminUserCreateNestedOneWithoutReferredCustomersInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutReferredCustomersInput + connect?: AdminUserWhereUniqueInput + } + + export type CustomerAddressCreateNestedManyWithoutCustomerInput = { + create?: XOR | CustomerAddressCreateWithoutCustomerInput[] | CustomerAddressUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerAddressCreateOrConnectWithoutCustomerInput | CustomerAddressCreateOrConnectWithoutCustomerInput[] + createMany?: CustomerAddressCreateManyCustomerInputEnvelope + connect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + } + + export type OrderCreateNestedManyWithoutCustomerInput = { + create?: XOR | OrderCreateWithoutCustomerInput[] | OrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: OrderCreateOrConnectWithoutCustomerInput | OrderCreateOrConnectWithoutCustomerInput[] + createMany?: OrderCreateManyCustomerInputEnvelope + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + } + + export type PreOrderCreateNestedManyWithoutCustomerInput = { + create?: XOR | PreOrderCreateWithoutCustomerInput[] | PreOrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutCustomerInput | PreOrderCreateOrConnectWithoutCustomerInput[] + createMany?: PreOrderCreateManyCustomerInputEnvelope + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + } + + export type LedgerEntryCreateNestedManyWithoutCustomerInput = { + create?: XOR | LedgerEntryCreateWithoutCustomerInput[] | LedgerEntryUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutCustomerInput | LedgerEntryCreateOrConnectWithoutCustomerInput[] + createMany?: LedgerEntryCreateManyCustomerInputEnvelope + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + } + + export type WalletBonusCreateNestedManyWithoutCustomerInput = { + create?: XOR | WalletBonusCreateWithoutCustomerInput[] | WalletBonusUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: WalletBonusCreateOrConnectWithoutCustomerInput | WalletBonusCreateOrConnectWithoutCustomerInput[] + createMany?: WalletBonusCreateManyCustomerInputEnvelope + connect?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + } + + export type CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput = { + create?: XOR | CustomerAddressCreateWithoutCustomerInput[] | CustomerAddressUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerAddressCreateOrConnectWithoutCustomerInput | CustomerAddressCreateOrConnectWithoutCustomerInput[] + createMany?: CustomerAddressCreateManyCustomerInputEnvelope + connect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + } + + export type OrderUncheckedCreateNestedManyWithoutCustomerInput = { + create?: XOR | OrderCreateWithoutCustomerInput[] | OrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: OrderCreateOrConnectWithoutCustomerInput | OrderCreateOrConnectWithoutCustomerInput[] + createMany?: OrderCreateManyCustomerInputEnvelope + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + } + + export type PreOrderUncheckedCreateNestedManyWithoutCustomerInput = { + create?: XOR | PreOrderCreateWithoutCustomerInput[] | PreOrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutCustomerInput | PreOrderCreateOrConnectWithoutCustomerInput[] + createMany?: PreOrderCreateManyCustomerInputEnvelope + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + } + + export type LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput = { + create?: XOR | LedgerEntryCreateWithoutCustomerInput[] | LedgerEntryUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutCustomerInput | LedgerEntryCreateOrConnectWithoutCustomerInput[] + createMany?: LedgerEntryCreateManyCustomerInputEnvelope + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + } + + export type WalletBonusUncheckedCreateNestedManyWithoutCustomerInput = { + create?: XOR | WalletBonusCreateWithoutCustomerInput[] | WalletBonusUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: WalletBonusCreateOrConnectWithoutCustomerInput | WalletBonusCreateOrConnectWithoutCustomerInput[] + createMany?: WalletBonusCreateManyCustomerInputEnvelope + connect?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + } + + export type DecimalFieldUpdateOperationsInput = { + set?: Decimal | DecimalJsLike | number | string + increment?: Decimal | DecimalJsLike | number | string + decrement?: Decimal | DecimalJsLike | number | string + multiply?: Decimal | DecimalJsLike | number | string + divide?: Decimal | DecimalJsLike | number | string + } + + export type EnumVerificationStepFieldUpdateOperationsInput = { + set?: $Enums.VerificationStep + } + + export type CityUpdateOneWithoutCustomersNestedInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutCustomersInput + upsert?: CityUpsertWithoutCustomersInput + disconnect?: CityWhereInput | boolean + delete?: CityWhereInput | boolean + connect?: CityWhereUniqueInput + update?: XOR, CityUncheckedUpdateWithoutCustomersInput> + } + + export type AdminUserUpdateOneWithoutReferredCustomersNestedInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutReferredCustomersInput + upsert?: AdminUserUpsertWithoutReferredCustomersInput + disconnect?: AdminUserWhereInput | boolean + delete?: AdminUserWhereInput | boolean + connect?: AdminUserWhereUniqueInput + update?: XOR, AdminUserUncheckedUpdateWithoutReferredCustomersInput> + } + + export type CustomerAddressUpdateManyWithoutCustomerNestedInput = { + create?: XOR | CustomerAddressCreateWithoutCustomerInput[] | CustomerAddressUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerAddressCreateOrConnectWithoutCustomerInput | CustomerAddressCreateOrConnectWithoutCustomerInput[] + upsert?: CustomerAddressUpsertWithWhereUniqueWithoutCustomerInput | CustomerAddressUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: CustomerAddressCreateManyCustomerInputEnvelope + set?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + disconnect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + delete?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + connect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + update?: CustomerAddressUpdateWithWhereUniqueWithoutCustomerInput | CustomerAddressUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: CustomerAddressUpdateManyWithWhereWithoutCustomerInput | CustomerAddressUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: CustomerAddressScalarWhereInput | CustomerAddressScalarWhereInput[] + } + + export type OrderUpdateManyWithoutCustomerNestedInput = { + create?: XOR | OrderCreateWithoutCustomerInput[] | OrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: OrderCreateOrConnectWithoutCustomerInput | OrderCreateOrConnectWithoutCustomerInput[] + upsert?: OrderUpsertWithWhereUniqueWithoutCustomerInput | OrderUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: OrderCreateManyCustomerInputEnvelope + set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + update?: OrderUpdateWithWhereUniqueWithoutCustomerInput | OrderUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: OrderUpdateManyWithWhereWithoutCustomerInput | OrderUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] + } + + export type PreOrderUpdateManyWithoutCustomerNestedInput = { + create?: XOR | PreOrderCreateWithoutCustomerInput[] | PreOrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutCustomerInput | PreOrderCreateOrConnectWithoutCustomerInput[] + upsert?: PreOrderUpsertWithWhereUniqueWithoutCustomerInput | PreOrderUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: PreOrderCreateManyCustomerInputEnvelope + set?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + disconnect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + delete?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + update?: PreOrderUpdateWithWhereUniqueWithoutCustomerInput | PreOrderUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: PreOrderUpdateManyWithWhereWithoutCustomerInput | PreOrderUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] + } + + export type LedgerEntryUpdateManyWithoutCustomerNestedInput = { + create?: XOR | LedgerEntryCreateWithoutCustomerInput[] | LedgerEntryUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutCustomerInput | LedgerEntryCreateOrConnectWithoutCustomerInput[] + upsert?: LedgerEntryUpsertWithWhereUniqueWithoutCustomerInput | LedgerEntryUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: LedgerEntryCreateManyCustomerInputEnvelope + set?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + disconnect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + delete?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + update?: LedgerEntryUpdateWithWhereUniqueWithoutCustomerInput | LedgerEntryUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: LedgerEntryUpdateManyWithWhereWithoutCustomerInput | LedgerEntryUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: LedgerEntryScalarWhereInput | LedgerEntryScalarWhereInput[] + } + + export type WalletBonusUpdateManyWithoutCustomerNestedInput = { + create?: XOR | WalletBonusCreateWithoutCustomerInput[] | WalletBonusUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: WalletBonusCreateOrConnectWithoutCustomerInput | WalletBonusCreateOrConnectWithoutCustomerInput[] + upsert?: WalletBonusUpsertWithWhereUniqueWithoutCustomerInput | WalletBonusUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: WalletBonusCreateManyCustomerInputEnvelope + set?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + disconnect?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + delete?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + connect?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + update?: WalletBonusUpdateWithWhereUniqueWithoutCustomerInput | WalletBonusUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: WalletBonusUpdateManyWithWhereWithoutCustomerInput | WalletBonusUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: WalletBonusScalarWhereInput | WalletBonusScalarWhereInput[] + } + + export type CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput = { + create?: XOR | CustomerAddressCreateWithoutCustomerInput[] | CustomerAddressUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerAddressCreateOrConnectWithoutCustomerInput | CustomerAddressCreateOrConnectWithoutCustomerInput[] + upsert?: CustomerAddressUpsertWithWhereUniqueWithoutCustomerInput | CustomerAddressUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: CustomerAddressCreateManyCustomerInputEnvelope + set?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + disconnect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + delete?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + connect?: CustomerAddressWhereUniqueInput | CustomerAddressWhereUniqueInput[] + update?: CustomerAddressUpdateWithWhereUniqueWithoutCustomerInput | CustomerAddressUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: CustomerAddressUpdateManyWithWhereWithoutCustomerInput | CustomerAddressUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: CustomerAddressScalarWhereInput | CustomerAddressScalarWhereInput[] + } + + export type OrderUncheckedUpdateManyWithoutCustomerNestedInput = { + create?: XOR | OrderCreateWithoutCustomerInput[] | OrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: OrderCreateOrConnectWithoutCustomerInput | OrderCreateOrConnectWithoutCustomerInput[] + upsert?: OrderUpsertWithWhereUniqueWithoutCustomerInput | OrderUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: OrderCreateManyCustomerInputEnvelope + set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + update?: OrderUpdateWithWhereUniqueWithoutCustomerInput | OrderUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: OrderUpdateManyWithWhereWithoutCustomerInput | OrderUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] + } + + export type PreOrderUncheckedUpdateManyWithoutCustomerNestedInput = { + create?: XOR | PreOrderCreateWithoutCustomerInput[] | PreOrderUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutCustomerInput | PreOrderCreateOrConnectWithoutCustomerInput[] + upsert?: PreOrderUpsertWithWhereUniqueWithoutCustomerInput | PreOrderUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: PreOrderCreateManyCustomerInputEnvelope + set?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + disconnect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + delete?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + update?: PreOrderUpdateWithWhereUniqueWithoutCustomerInput | PreOrderUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: PreOrderUpdateManyWithWhereWithoutCustomerInput | PreOrderUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] + } + + export type LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput = { + create?: XOR | LedgerEntryCreateWithoutCustomerInput[] | LedgerEntryUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutCustomerInput | LedgerEntryCreateOrConnectWithoutCustomerInput[] + upsert?: LedgerEntryUpsertWithWhereUniqueWithoutCustomerInput | LedgerEntryUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: LedgerEntryCreateManyCustomerInputEnvelope + set?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + disconnect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + delete?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + update?: LedgerEntryUpdateWithWhereUniqueWithoutCustomerInput | LedgerEntryUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: LedgerEntryUpdateManyWithWhereWithoutCustomerInput | LedgerEntryUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: LedgerEntryScalarWhereInput | LedgerEntryScalarWhereInput[] + } + + export type WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput = { + create?: XOR | WalletBonusCreateWithoutCustomerInput[] | WalletBonusUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: WalletBonusCreateOrConnectWithoutCustomerInput | WalletBonusCreateOrConnectWithoutCustomerInput[] + upsert?: WalletBonusUpsertWithWhereUniqueWithoutCustomerInput | WalletBonusUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: WalletBonusCreateManyCustomerInputEnvelope + set?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + disconnect?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + delete?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + connect?: WalletBonusWhereUniqueInput | WalletBonusWhereUniqueInput[] + update?: WalletBonusUpdateWithWhereUniqueWithoutCustomerInput | WalletBonusUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: WalletBonusUpdateManyWithWhereWithoutCustomerInput | WalletBonusUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: WalletBonusScalarWhereInput | WalletBonusScalarWhereInput[] + } + + export type CustomerCreateNestedOneWithoutAddressesInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutAddressesInput + connect?: CustomerWhereUniqueInput + } + + export type CityCreateNestedOneWithoutAddressesInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutAddressesInput + connect?: CityWhereUniqueInput + } + + export type CustomerUpdateOneRequiredWithoutAddressesNestedInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutAddressesInput + upsert?: CustomerUpsertWithoutAddressesInput + connect?: CustomerWhereUniqueInput + update?: XOR, CustomerUncheckedUpdateWithoutAddressesInput> + } + + export type CityUpdateOneWithoutAddressesNestedInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutAddressesInput + upsert?: CityUpsertWithoutAddressesInput + disconnect?: CityWhereInput | boolean + delete?: CityWhereInput | boolean + connect?: CityWhereUniqueInput + update?: XOR, CityUncheckedUpdateWithoutAddressesInput> + } + + export type CityCreateNestedOneWithoutBranchesInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutBranchesInput + connect?: CityWhereUniqueInput + } + + export type AdminUserCreateNestedManyWithoutBranchInput = { + create?: XOR | AdminUserCreateWithoutBranchInput[] | AdminUserUncheckedCreateWithoutBranchInput[] + connectOrCreate?: AdminUserCreateOrConnectWithoutBranchInput | AdminUserCreateOrConnectWithoutBranchInput[] + createMany?: AdminUserCreateManyBranchInputEnvelope + connect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + } + + export type OrderCreateNestedManyWithoutBranchInput = { + create?: XOR | OrderCreateWithoutBranchInput[] | OrderUncheckedCreateWithoutBranchInput[] + connectOrCreate?: OrderCreateOrConnectWithoutBranchInput | OrderCreateOrConnectWithoutBranchInput[] + createMany?: OrderCreateManyBranchInputEnvelope + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + } + + export type AdminUserUncheckedCreateNestedManyWithoutBranchInput = { + create?: XOR | AdminUserCreateWithoutBranchInput[] | AdminUserUncheckedCreateWithoutBranchInput[] + connectOrCreate?: AdminUserCreateOrConnectWithoutBranchInput | AdminUserCreateOrConnectWithoutBranchInput[] + createMany?: AdminUserCreateManyBranchInputEnvelope + connect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + } + + export type OrderUncheckedCreateNestedManyWithoutBranchInput = { + create?: XOR | OrderCreateWithoutBranchInput[] | OrderUncheckedCreateWithoutBranchInput[] + connectOrCreate?: OrderCreateOrConnectWithoutBranchInput | OrderCreateOrConnectWithoutBranchInput[] + createMany?: OrderCreateManyBranchInputEnvelope + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + } + + export type CityUpdateOneWithoutBranchesNestedInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutBranchesInput + upsert?: CityUpsertWithoutBranchesInput + disconnect?: CityWhereInput | boolean + delete?: CityWhereInput | boolean + connect?: CityWhereUniqueInput + update?: XOR, CityUncheckedUpdateWithoutBranchesInput> + } + + export type AdminUserUpdateManyWithoutBranchNestedInput = { + create?: XOR | AdminUserCreateWithoutBranchInput[] | AdminUserUncheckedCreateWithoutBranchInput[] + connectOrCreate?: AdminUserCreateOrConnectWithoutBranchInput | AdminUserCreateOrConnectWithoutBranchInput[] + upsert?: AdminUserUpsertWithWhereUniqueWithoutBranchInput | AdminUserUpsertWithWhereUniqueWithoutBranchInput[] + createMany?: AdminUserCreateManyBranchInputEnvelope + set?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + disconnect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + delete?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + connect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + update?: AdminUserUpdateWithWhereUniqueWithoutBranchInput | AdminUserUpdateWithWhereUniqueWithoutBranchInput[] + updateMany?: AdminUserUpdateManyWithWhereWithoutBranchInput | AdminUserUpdateManyWithWhereWithoutBranchInput[] + deleteMany?: AdminUserScalarWhereInput | AdminUserScalarWhereInput[] + } + + export type OrderUpdateManyWithoutBranchNestedInput = { + create?: XOR | OrderCreateWithoutBranchInput[] | OrderUncheckedCreateWithoutBranchInput[] + connectOrCreate?: OrderCreateOrConnectWithoutBranchInput | OrderCreateOrConnectWithoutBranchInput[] + upsert?: OrderUpsertWithWhereUniqueWithoutBranchInput | OrderUpsertWithWhereUniqueWithoutBranchInput[] + createMany?: OrderCreateManyBranchInputEnvelope + set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + update?: OrderUpdateWithWhereUniqueWithoutBranchInput | OrderUpdateWithWhereUniqueWithoutBranchInput[] + updateMany?: OrderUpdateManyWithWhereWithoutBranchInput | OrderUpdateManyWithWhereWithoutBranchInput[] + deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] + } + + export type AdminUserUncheckedUpdateManyWithoutBranchNestedInput = { + create?: XOR | AdminUserCreateWithoutBranchInput[] | AdminUserUncheckedCreateWithoutBranchInput[] + connectOrCreate?: AdminUserCreateOrConnectWithoutBranchInput | AdminUserCreateOrConnectWithoutBranchInput[] + upsert?: AdminUserUpsertWithWhereUniqueWithoutBranchInput | AdminUserUpsertWithWhereUniqueWithoutBranchInput[] + createMany?: AdminUserCreateManyBranchInputEnvelope + set?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + disconnect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + delete?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + connect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + update?: AdminUserUpdateWithWhereUniqueWithoutBranchInput | AdminUserUpdateWithWhereUniqueWithoutBranchInput[] + updateMany?: AdminUserUpdateManyWithWhereWithoutBranchInput | AdminUserUpdateManyWithWhereWithoutBranchInput[] + deleteMany?: AdminUserScalarWhereInput | AdminUserScalarWhereInput[] + } + + export type OrderUncheckedUpdateManyWithoutBranchNestedInput = { + create?: XOR | OrderCreateWithoutBranchInput[] | OrderUncheckedCreateWithoutBranchInput[] + connectOrCreate?: OrderCreateOrConnectWithoutBranchInput | OrderCreateOrConnectWithoutBranchInput[] + upsert?: OrderUpsertWithWhereUniqueWithoutBranchInput | OrderUpsertWithWhereUniqueWithoutBranchInput[] + createMany?: OrderCreateManyBranchInputEnvelope + set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + update?: OrderUpdateWithWhereUniqueWithoutBranchInput | OrderUpdateWithWhereUniqueWithoutBranchInput[] + updateMany?: OrderUpdateManyWithWhereWithoutBranchInput | OrderUpdateManyWithWhereWithoutBranchInput[] + deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] + } + + export type PreOrderCreateNestedManyWithoutWorkshopInput = { + create?: XOR | PreOrderCreateWithoutWorkshopInput[] | PreOrderUncheckedCreateWithoutWorkshopInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutWorkshopInput | PreOrderCreateOrConnectWithoutWorkshopInput[] + createMany?: PreOrderCreateManyWorkshopInputEnvelope + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + } + + export type PreOrderUncheckedCreateNestedManyWithoutWorkshopInput = { + create?: XOR | PreOrderCreateWithoutWorkshopInput[] | PreOrderUncheckedCreateWithoutWorkshopInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutWorkshopInput | PreOrderCreateOrConnectWithoutWorkshopInput[] + createMany?: PreOrderCreateManyWorkshopInputEnvelope + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + } + + export type PreOrderUpdateManyWithoutWorkshopNestedInput = { + create?: XOR | PreOrderCreateWithoutWorkshopInput[] | PreOrderUncheckedCreateWithoutWorkshopInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutWorkshopInput | PreOrderCreateOrConnectWithoutWorkshopInput[] + upsert?: PreOrderUpsertWithWhereUniqueWithoutWorkshopInput | PreOrderUpsertWithWhereUniqueWithoutWorkshopInput[] + createMany?: PreOrderCreateManyWorkshopInputEnvelope + set?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + disconnect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + delete?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + update?: PreOrderUpdateWithWhereUniqueWithoutWorkshopInput | PreOrderUpdateWithWhereUniqueWithoutWorkshopInput[] + updateMany?: PreOrderUpdateManyWithWhereWithoutWorkshopInput | PreOrderUpdateManyWithWhereWithoutWorkshopInput[] + deleteMany?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] + } + + export type PreOrderUncheckedUpdateManyWithoutWorkshopNestedInput = { + create?: XOR | PreOrderCreateWithoutWorkshopInput[] | PreOrderUncheckedCreateWithoutWorkshopInput[] + connectOrCreate?: PreOrderCreateOrConnectWithoutWorkshopInput | PreOrderCreateOrConnectWithoutWorkshopInput[] + upsert?: PreOrderUpsertWithWhereUniqueWithoutWorkshopInput | PreOrderUpsertWithWhereUniqueWithoutWorkshopInput[] + createMany?: PreOrderCreateManyWorkshopInputEnvelope + set?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + disconnect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + delete?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] + update?: PreOrderUpdateWithWhereUniqueWithoutWorkshopInput | PreOrderUpdateWithWhereUniqueWithoutWorkshopInput[] + updateMany?: PreOrderUpdateManyWithWhereWithoutWorkshopInput | PreOrderUpdateManyWithWhereWithoutWorkshopInput[] + deleteMany?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] + } + + export type CategoryCreateNestedOneWithoutChildrenInput = { + create?: XOR + connectOrCreate?: CategoryCreateOrConnectWithoutChildrenInput + connect?: CategoryWhereUniqueInput + } + + export type CategoryCreateNestedManyWithoutParentInput = { + create?: XOR | CategoryCreateWithoutParentInput[] | CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: CategoryCreateOrConnectWithoutParentInput | CategoryCreateOrConnectWithoutParentInput[] + createMany?: CategoryCreateManyParentInputEnvelope + connect?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + } + + export type ProductCreateNestedManyWithoutCategoryInput = { + create?: XOR | ProductCreateWithoutCategoryInput[] | ProductUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: ProductCreateOrConnectWithoutCategoryInput | ProductCreateOrConnectWithoutCategoryInput[] + createMany?: ProductCreateManyCategoryInputEnvelope + connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + } + + export type CategoryUncheckedCreateNestedManyWithoutParentInput = { + create?: XOR | CategoryCreateWithoutParentInput[] | CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: CategoryCreateOrConnectWithoutParentInput | CategoryCreateOrConnectWithoutParentInput[] + createMany?: CategoryCreateManyParentInputEnvelope + connect?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + } + + export type ProductUncheckedCreateNestedManyWithoutCategoryInput = { + create?: XOR | ProductCreateWithoutCategoryInput[] | ProductUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: ProductCreateOrConnectWithoutCategoryInput | ProductCreateOrConnectWithoutCategoryInput[] + createMany?: ProductCreateManyCategoryInputEnvelope + connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + } + + export type CategoryUpdateOneWithoutChildrenNestedInput = { + create?: XOR + connectOrCreate?: CategoryCreateOrConnectWithoutChildrenInput + upsert?: CategoryUpsertWithoutChildrenInput + disconnect?: CategoryWhereInput | boolean + delete?: CategoryWhereInput | boolean + connect?: CategoryWhereUniqueInput + update?: XOR, CategoryUncheckedUpdateWithoutChildrenInput> + } + + export type CategoryUpdateManyWithoutParentNestedInput = { + create?: XOR | CategoryCreateWithoutParentInput[] | CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: CategoryCreateOrConnectWithoutParentInput | CategoryCreateOrConnectWithoutParentInput[] + upsert?: CategoryUpsertWithWhereUniqueWithoutParentInput | CategoryUpsertWithWhereUniqueWithoutParentInput[] + createMany?: CategoryCreateManyParentInputEnvelope + set?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + disconnect?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + delete?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + connect?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + update?: CategoryUpdateWithWhereUniqueWithoutParentInput | CategoryUpdateWithWhereUniqueWithoutParentInput[] + updateMany?: CategoryUpdateManyWithWhereWithoutParentInput | CategoryUpdateManyWithWhereWithoutParentInput[] + deleteMany?: CategoryScalarWhereInput | CategoryScalarWhereInput[] + } + + export type ProductUpdateManyWithoutCategoryNestedInput = { + create?: XOR | ProductCreateWithoutCategoryInput[] | ProductUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: ProductCreateOrConnectWithoutCategoryInput | ProductCreateOrConnectWithoutCategoryInput[] + upsert?: ProductUpsertWithWhereUniqueWithoutCategoryInput | ProductUpsertWithWhereUniqueWithoutCategoryInput[] + createMany?: ProductCreateManyCategoryInputEnvelope + set?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + disconnect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + delete?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + update?: ProductUpdateWithWhereUniqueWithoutCategoryInput | ProductUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: ProductUpdateManyWithWhereWithoutCategoryInput | ProductUpdateManyWithWhereWithoutCategoryInput[] + deleteMany?: ProductScalarWhereInput | ProductScalarWhereInput[] + } + + export type CategoryUncheckedUpdateManyWithoutParentNestedInput = { + create?: XOR | CategoryCreateWithoutParentInput[] | CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: CategoryCreateOrConnectWithoutParentInput | CategoryCreateOrConnectWithoutParentInput[] + upsert?: CategoryUpsertWithWhereUniqueWithoutParentInput | CategoryUpsertWithWhereUniqueWithoutParentInput[] + createMany?: CategoryCreateManyParentInputEnvelope + set?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + disconnect?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + delete?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + connect?: CategoryWhereUniqueInput | CategoryWhereUniqueInput[] + update?: CategoryUpdateWithWhereUniqueWithoutParentInput | CategoryUpdateWithWhereUniqueWithoutParentInput[] + updateMany?: CategoryUpdateManyWithWhereWithoutParentInput | CategoryUpdateManyWithWhereWithoutParentInput[] + deleteMany?: CategoryScalarWhereInput | CategoryScalarWhereInput[] + } + + export type ProductUncheckedUpdateManyWithoutCategoryNestedInput = { + create?: XOR | ProductCreateWithoutCategoryInput[] | ProductUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: ProductCreateOrConnectWithoutCategoryInput | ProductCreateOrConnectWithoutCategoryInput[] + upsert?: ProductUpsertWithWhereUniqueWithoutCategoryInput | ProductUpsertWithWhereUniqueWithoutCategoryInput[] + createMany?: ProductCreateManyCategoryInputEnvelope + set?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + disconnect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + delete?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + update?: ProductUpdateWithWhereUniqueWithoutCategoryInput | ProductUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: ProductUpdateManyWithWhereWithoutCategoryInput | ProductUpdateManyWithWhereWithoutCategoryInput[] + deleteMany?: ProductScalarWhereInput | ProductScalarWhereInput[] + } + + export type ProductCreateNestedManyWithoutBrandInput = { + create?: XOR | ProductCreateWithoutBrandInput[] | ProductUncheckedCreateWithoutBrandInput[] + connectOrCreate?: ProductCreateOrConnectWithoutBrandInput | ProductCreateOrConnectWithoutBrandInput[] + createMany?: ProductCreateManyBrandInputEnvelope + connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + } + + export type ProductUncheckedCreateNestedManyWithoutBrandInput = { + create?: XOR | ProductCreateWithoutBrandInput[] | ProductUncheckedCreateWithoutBrandInput[] + connectOrCreate?: ProductCreateOrConnectWithoutBrandInput | ProductCreateOrConnectWithoutBrandInput[] + createMany?: ProductCreateManyBrandInputEnvelope + connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + } + + export type ProductUpdateManyWithoutBrandNestedInput = { + create?: XOR | ProductCreateWithoutBrandInput[] | ProductUncheckedCreateWithoutBrandInput[] + connectOrCreate?: ProductCreateOrConnectWithoutBrandInput | ProductCreateOrConnectWithoutBrandInput[] + upsert?: ProductUpsertWithWhereUniqueWithoutBrandInput | ProductUpsertWithWhereUniqueWithoutBrandInput[] + createMany?: ProductCreateManyBrandInputEnvelope + set?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + disconnect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + delete?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + update?: ProductUpdateWithWhereUniqueWithoutBrandInput | ProductUpdateWithWhereUniqueWithoutBrandInput[] + updateMany?: ProductUpdateManyWithWhereWithoutBrandInput | ProductUpdateManyWithWhereWithoutBrandInput[] + deleteMany?: ProductScalarWhereInput | ProductScalarWhereInput[] + } + + export type ProductUncheckedUpdateManyWithoutBrandNestedInput = { + create?: XOR | ProductCreateWithoutBrandInput[] | ProductUncheckedCreateWithoutBrandInput[] + connectOrCreate?: ProductCreateOrConnectWithoutBrandInput | ProductCreateOrConnectWithoutBrandInput[] + upsert?: ProductUpsertWithWhereUniqueWithoutBrandInput | ProductUpsertWithWhereUniqueWithoutBrandInput[] + createMany?: ProductCreateManyBrandInputEnvelope + set?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + disconnect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + delete?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + connect?: ProductWhereUniqueInput | ProductWhereUniqueInput[] + update?: ProductUpdateWithWhereUniqueWithoutBrandInput | ProductUpdateWithWhereUniqueWithoutBrandInput[] + updateMany?: ProductUpdateManyWithWhereWithoutBrandInput | ProductUpdateManyWithWhereWithoutBrandInput[] + deleteMany?: ProductScalarWhereInput | ProductScalarWhereInput[] + } + + export type CollectionProductCreateNestedManyWithoutCollectionInput = { + create?: XOR | CollectionProductCreateWithoutCollectionInput[] | CollectionProductUncheckedCreateWithoutCollectionInput[] + connectOrCreate?: CollectionProductCreateOrConnectWithoutCollectionInput | CollectionProductCreateOrConnectWithoutCollectionInput[] + createMany?: CollectionProductCreateManyCollectionInputEnvelope + connect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + } + + export type CollectionProductUncheckedCreateNestedManyWithoutCollectionInput = { + create?: XOR | CollectionProductCreateWithoutCollectionInput[] | CollectionProductUncheckedCreateWithoutCollectionInput[] + connectOrCreate?: CollectionProductCreateOrConnectWithoutCollectionInput | CollectionProductCreateOrConnectWithoutCollectionInput[] + createMany?: CollectionProductCreateManyCollectionInputEnvelope + connect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + } + + export type CollectionProductUpdateManyWithoutCollectionNestedInput = { + create?: XOR | CollectionProductCreateWithoutCollectionInput[] | CollectionProductUncheckedCreateWithoutCollectionInput[] + connectOrCreate?: CollectionProductCreateOrConnectWithoutCollectionInput | CollectionProductCreateOrConnectWithoutCollectionInput[] + upsert?: CollectionProductUpsertWithWhereUniqueWithoutCollectionInput | CollectionProductUpsertWithWhereUniqueWithoutCollectionInput[] + createMany?: CollectionProductCreateManyCollectionInputEnvelope + set?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + disconnect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + delete?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + connect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + update?: CollectionProductUpdateWithWhereUniqueWithoutCollectionInput | CollectionProductUpdateWithWhereUniqueWithoutCollectionInput[] + updateMany?: CollectionProductUpdateManyWithWhereWithoutCollectionInput | CollectionProductUpdateManyWithWhereWithoutCollectionInput[] + deleteMany?: CollectionProductScalarWhereInput | CollectionProductScalarWhereInput[] + } + + export type CollectionProductUncheckedUpdateManyWithoutCollectionNestedInput = { + create?: XOR | CollectionProductCreateWithoutCollectionInput[] | CollectionProductUncheckedCreateWithoutCollectionInput[] + connectOrCreate?: CollectionProductCreateOrConnectWithoutCollectionInput | CollectionProductCreateOrConnectWithoutCollectionInput[] + upsert?: CollectionProductUpsertWithWhereUniqueWithoutCollectionInput | CollectionProductUpsertWithWhereUniqueWithoutCollectionInput[] + createMany?: CollectionProductCreateManyCollectionInputEnvelope + set?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + disconnect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + delete?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + connect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + update?: CollectionProductUpdateWithWhereUniqueWithoutCollectionInput | CollectionProductUpdateWithWhereUniqueWithoutCollectionInput[] + updateMany?: CollectionProductUpdateManyWithWhereWithoutCollectionInput | CollectionProductUpdateManyWithWhereWithoutCollectionInput[] + deleteMany?: CollectionProductScalarWhereInput | CollectionProductScalarWhereInput[] + } + + export type CollectionCreateNestedOneWithoutProductsInput = { + create?: XOR + connectOrCreate?: CollectionCreateOrConnectWithoutProductsInput + connect?: CollectionWhereUniqueInput + } + + export type ProductCreateNestedOneWithoutCollectionsInput = { + create?: XOR + connectOrCreate?: ProductCreateOrConnectWithoutCollectionsInput + connect?: ProductWhereUniqueInput + } + + export type CollectionUpdateOneRequiredWithoutProductsNestedInput = { + create?: XOR + connectOrCreate?: CollectionCreateOrConnectWithoutProductsInput + upsert?: CollectionUpsertWithoutProductsInput + connect?: CollectionWhereUniqueInput + update?: XOR, CollectionUncheckedUpdateWithoutProductsInput> + } + + export type ProductUpdateOneRequiredWithoutCollectionsNestedInput = { + create?: XOR + connectOrCreate?: ProductCreateOrConnectWithoutCollectionsInput + upsert?: ProductUpsertWithoutCollectionsInput + connect?: ProductWhereUniqueInput + update?: XOR, ProductUncheckedUpdateWithoutCollectionsInput> + } + + export type CategoryCreateNestedOneWithoutProductsInput = { + create?: XOR + connectOrCreate?: CategoryCreateOrConnectWithoutProductsInput + connect?: CategoryWhereUniqueInput + } + + export type BrandCreateNestedOneWithoutProductsInput = { + create?: XOR + connectOrCreate?: BrandCreateOrConnectWithoutProductsInput + connect?: BrandWhereUniqueInput + } + + export type ProductVariantCreateNestedManyWithoutProductInput = { + create?: XOR | ProductVariantCreateWithoutProductInput[] | ProductVariantUncheckedCreateWithoutProductInput[] + connectOrCreate?: ProductVariantCreateOrConnectWithoutProductInput | ProductVariantCreateOrConnectWithoutProductInput[] + createMany?: ProductVariantCreateManyProductInputEnvelope + connect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + } + + export type ProductImageCreateNestedManyWithoutProductInput = { + create?: XOR | ProductImageCreateWithoutProductInput[] | ProductImageUncheckedCreateWithoutProductInput[] + connectOrCreate?: ProductImageCreateOrConnectWithoutProductInput | ProductImageCreateOrConnectWithoutProductInput[] + createMany?: ProductImageCreateManyProductInputEnvelope + connect?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + } + + export type CollectionProductCreateNestedManyWithoutProductInput = { + create?: XOR | CollectionProductCreateWithoutProductInput[] | CollectionProductUncheckedCreateWithoutProductInput[] + connectOrCreate?: CollectionProductCreateOrConnectWithoutProductInput | CollectionProductCreateOrConnectWithoutProductInput[] + createMany?: CollectionProductCreateManyProductInputEnvelope + connect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + } + + export type ProductVariantUncheckedCreateNestedManyWithoutProductInput = { + create?: XOR | ProductVariantCreateWithoutProductInput[] | ProductVariantUncheckedCreateWithoutProductInput[] + connectOrCreate?: ProductVariantCreateOrConnectWithoutProductInput | ProductVariantCreateOrConnectWithoutProductInput[] + createMany?: ProductVariantCreateManyProductInputEnvelope + connect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + } + + export type ProductImageUncheckedCreateNestedManyWithoutProductInput = { + create?: XOR | ProductImageCreateWithoutProductInput[] | ProductImageUncheckedCreateWithoutProductInput[] + connectOrCreate?: ProductImageCreateOrConnectWithoutProductInput | ProductImageCreateOrConnectWithoutProductInput[] + createMany?: ProductImageCreateManyProductInputEnvelope + connect?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + } + + export type CollectionProductUncheckedCreateNestedManyWithoutProductInput = { + create?: XOR | CollectionProductCreateWithoutProductInput[] | CollectionProductUncheckedCreateWithoutProductInput[] + connectOrCreate?: CollectionProductCreateOrConnectWithoutProductInput | CollectionProductCreateOrConnectWithoutProductInput[] + createMany?: CollectionProductCreateManyProductInputEnvelope + connect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + } + + export type CategoryUpdateOneWithoutProductsNestedInput = { + create?: XOR + connectOrCreate?: CategoryCreateOrConnectWithoutProductsInput + upsert?: CategoryUpsertWithoutProductsInput + disconnect?: CategoryWhereInput | boolean + delete?: CategoryWhereInput | boolean + connect?: CategoryWhereUniqueInput + update?: XOR, CategoryUncheckedUpdateWithoutProductsInput> + } + + export type BrandUpdateOneWithoutProductsNestedInput = { + create?: XOR + connectOrCreate?: BrandCreateOrConnectWithoutProductsInput + upsert?: BrandUpsertWithoutProductsInput + disconnect?: BrandWhereInput | boolean + delete?: BrandWhereInput | boolean + connect?: BrandWhereUniqueInput + update?: XOR, BrandUncheckedUpdateWithoutProductsInput> + } + + export type ProductVariantUpdateManyWithoutProductNestedInput = { + create?: XOR | ProductVariantCreateWithoutProductInput[] | ProductVariantUncheckedCreateWithoutProductInput[] + connectOrCreate?: ProductVariantCreateOrConnectWithoutProductInput | ProductVariantCreateOrConnectWithoutProductInput[] + upsert?: ProductVariantUpsertWithWhereUniqueWithoutProductInput | ProductVariantUpsertWithWhereUniqueWithoutProductInput[] + createMany?: ProductVariantCreateManyProductInputEnvelope + set?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + disconnect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + delete?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + connect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + update?: ProductVariantUpdateWithWhereUniqueWithoutProductInput | ProductVariantUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: ProductVariantUpdateManyWithWhereWithoutProductInput | ProductVariantUpdateManyWithWhereWithoutProductInput[] + deleteMany?: ProductVariantScalarWhereInput | ProductVariantScalarWhereInput[] + } + + export type ProductImageUpdateManyWithoutProductNestedInput = { + create?: XOR | ProductImageCreateWithoutProductInput[] | ProductImageUncheckedCreateWithoutProductInput[] + connectOrCreate?: ProductImageCreateOrConnectWithoutProductInput | ProductImageCreateOrConnectWithoutProductInput[] + upsert?: ProductImageUpsertWithWhereUniqueWithoutProductInput | ProductImageUpsertWithWhereUniqueWithoutProductInput[] + createMany?: ProductImageCreateManyProductInputEnvelope + set?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + disconnect?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + delete?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + connect?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + update?: ProductImageUpdateWithWhereUniqueWithoutProductInput | ProductImageUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: ProductImageUpdateManyWithWhereWithoutProductInput | ProductImageUpdateManyWithWhereWithoutProductInput[] + deleteMany?: ProductImageScalarWhereInput | ProductImageScalarWhereInput[] + } + + export type CollectionProductUpdateManyWithoutProductNestedInput = { + create?: XOR | CollectionProductCreateWithoutProductInput[] | CollectionProductUncheckedCreateWithoutProductInput[] + connectOrCreate?: CollectionProductCreateOrConnectWithoutProductInput | CollectionProductCreateOrConnectWithoutProductInput[] + upsert?: CollectionProductUpsertWithWhereUniqueWithoutProductInput | CollectionProductUpsertWithWhereUniqueWithoutProductInput[] + createMany?: CollectionProductCreateManyProductInputEnvelope + set?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + disconnect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + delete?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + connect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + update?: CollectionProductUpdateWithWhereUniqueWithoutProductInput | CollectionProductUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: CollectionProductUpdateManyWithWhereWithoutProductInput | CollectionProductUpdateManyWithWhereWithoutProductInput[] + deleteMany?: CollectionProductScalarWhereInput | CollectionProductScalarWhereInput[] + } + + export type ProductVariantUncheckedUpdateManyWithoutProductNestedInput = { + create?: XOR | ProductVariantCreateWithoutProductInput[] | ProductVariantUncheckedCreateWithoutProductInput[] + connectOrCreate?: ProductVariantCreateOrConnectWithoutProductInput | ProductVariantCreateOrConnectWithoutProductInput[] + upsert?: ProductVariantUpsertWithWhereUniqueWithoutProductInput | ProductVariantUpsertWithWhereUniqueWithoutProductInput[] + createMany?: ProductVariantCreateManyProductInputEnvelope + set?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + disconnect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + delete?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + connect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + update?: ProductVariantUpdateWithWhereUniqueWithoutProductInput | ProductVariantUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: ProductVariantUpdateManyWithWhereWithoutProductInput | ProductVariantUpdateManyWithWhereWithoutProductInput[] + deleteMany?: ProductVariantScalarWhereInput | ProductVariantScalarWhereInput[] + } + + export type ProductImageUncheckedUpdateManyWithoutProductNestedInput = { + create?: XOR | ProductImageCreateWithoutProductInput[] | ProductImageUncheckedCreateWithoutProductInput[] + connectOrCreate?: ProductImageCreateOrConnectWithoutProductInput | ProductImageCreateOrConnectWithoutProductInput[] + upsert?: ProductImageUpsertWithWhereUniqueWithoutProductInput | ProductImageUpsertWithWhereUniqueWithoutProductInput[] + createMany?: ProductImageCreateManyProductInputEnvelope + set?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + disconnect?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + delete?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + connect?: ProductImageWhereUniqueInput | ProductImageWhereUniqueInput[] + update?: ProductImageUpdateWithWhereUniqueWithoutProductInput | ProductImageUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: ProductImageUpdateManyWithWhereWithoutProductInput | ProductImageUpdateManyWithWhereWithoutProductInput[] + deleteMany?: ProductImageScalarWhereInput | ProductImageScalarWhereInput[] + } + + export type CollectionProductUncheckedUpdateManyWithoutProductNestedInput = { + create?: XOR | CollectionProductCreateWithoutProductInput[] | CollectionProductUncheckedCreateWithoutProductInput[] + connectOrCreate?: CollectionProductCreateOrConnectWithoutProductInput | CollectionProductCreateOrConnectWithoutProductInput[] + upsert?: CollectionProductUpsertWithWhereUniqueWithoutProductInput | CollectionProductUpsertWithWhereUniqueWithoutProductInput[] + createMany?: CollectionProductCreateManyProductInputEnvelope + set?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + disconnect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + delete?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + connect?: CollectionProductWhereUniqueInput | CollectionProductWhereUniqueInput[] + update?: CollectionProductUpdateWithWhereUniqueWithoutProductInput | CollectionProductUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: CollectionProductUpdateManyWithWhereWithoutProductInput | CollectionProductUpdateManyWithWhereWithoutProductInput[] + deleteMany?: CollectionProductScalarWhereInput | CollectionProductScalarWhereInput[] + } + + export type ProductCreateNestedOneWithoutImagesInput = { + create?: XOR + connectOrCreate?: ProductCreateOrConnectWithoutImagesInput + connect?: ProductWhereUniqueInput + } + + export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type ProductUpdateOneRequiredWithoutImagesNestedInput = { + create?: XOR + connectOrCreate?: ProductCreateOrConnectWithoutImagesInput + upsert?: ProductUpsertWithoutImagesInput + connect?: ProductWhereUniqueInput + update?: XOR, ProductUncheckedUpdateWithoutImagesInput> + } + + export type ProductCreateNestedOneWithoutVariantsInput = { + create?: XOR + connectOrCreate?: ProductCreateOrConnectWithoutVariantsInput + connect?: ProductWhereUniqueInput + } + + export type OrderItemCreateNestedManyWithoutProductVariantInput = { + create?: XOR | OrderItemCreateWithoutProductVariantInput[] | OrderItemUncheckedCreateWithoutProductVariantInput[] + connectOrCreate?: OrderItemCreateOrConnectWithoutProductVariantInput | OrderItemCreateOrConnectWithoutProductVariantInput[] + createMany?: OrderItemCreateManyProductVariantInputEnvelope + connect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + } + + export type OrderItemUncheckedCreateNestedManyWithoutProductVariantInput = { + create?: XOR | OrderItemCreateWithoutProductVariantInput[] | OrderItemUncheckedCreateWithoutProductVariantInput[] + connectOrCreate?: OrderItemCreateOrConnectWithoutProductVariantInput | OrderItemCreateOrConnectWithoutProductVariantInput[] + createMany?: OrderItemCreateManyProductVariantInputEnvelope + connect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + } + + export type ProductUpdateOneRequiredWithoutVariantsNestedInput = { + create?: XOR + connectOrCreate?: ProductCreateOrConnectWithoutVariantsInput + upsert?: ProductUpsertWithoutVariantsInput + connect?: ProductWhereUniqueInput + update?: XOR, ProductUncheckedUpdateWithoutVariantsInput> + } + + export type OrderItemUpdateManyWithoutProductVariantNestedInput = { + create?: XOR | OrderItemCreateWithoutProductVariantInput[] | OrderItemUncheckedCreateWithoutProductVariantInput[] + connectOrCreate?: OrderItemCreateOrConnectWithoutProductVariantInput | OrderItemCreateOrConnectWithoutProductVariantInput[] + upsert?: OrderItemUpsertWithWhereUniqueWithoutProductVariantInput | OrderItemUpsertWithWhereUniqueWithoutProductVariantInput[] + createMany?: OrderItemCreateManyProductVariantInputEnvelope + set?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + disconnect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + delete?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + connect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + update?: OrderItemUpdateWithWhereUniqueWithoutProductVariantInput | OrderItemUpdateWithWhereUniqueWithoutProductVariantInput[] + updateMany?: OrderItemUpdateManyWithWhereWithoutProductVariantInput | OrderItemUpdateManyWithWhereWithoutProductVariantInput[] + deleteMany?: OrderItemScalarWhereInput | OrderItemScalarWhereInput[] + } + + export type OrderItemUncheckedUpdateManyWithoutProductVariantNestedInput = { + create?: XOR | OrderItemCreateWithoutProductVariantInput[] | OrderItemUncheckedCreateWithoutProductVariantInput[] + connectOrCreate?: OrderItemCreateOrConnectWithoutProductVariantInput | OrderItemCreateOrConnectWithoutProductVariantInput[] + upsert?: OrderItemUpsertWithWhereUniqueWithoutProductVariantInput | OrderItemUpsertWithWhereUniqueWithoutProductVariantInput[] + createMany?: OrderItemCreateManyProductVariantInputEnvelope + set?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + disconnect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + delete?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + connect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + update?: OrderItemUpdateWithWhereUniqueWithoutProductVariantInput | OrderItemUpdateWithWhereUniqueWithoutProductVariantInput[] + updateMany?: OrderItemUpdateManyWithWhereWithoutProductVariantInput | OrderItemUpdateManyWithWhereWithoutProductVariantInput[] + deleteMany?: OrderItemScalarWhereInput | OrderItemScalarWhereInput[] + } + + export type CustomerCreateNestedOneWithoutOrdersInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutOrdersInput + connect?: CustomerWhereUniqueInput + } + + export type BranchCreateNestedOneWithoutOrdersInput = { + create?: XOR + connectOrCreate?: BranchCreateOrConnectWithoutOrdersInput + connect?: BranchWhereUniqueInput + } + + export type OrderItemCreateNestedManyWithoutOrderInput = { + create?: XOR | OrderItemCreateWithoutOrderInput[] | OrderItemUncheckedCreateWithoutOrderInput[] + connectOrCreate?: OrderItemCreateOrConnectWithoutOrderInput | OrderItemCreateOrConnectWithoutOrderInput[] + createMany?: OrderItemCreateManyOrderInputEnvelope + connect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + } + + export type OrderStatusEventCreateNestedManyWithoutOrderInput = { + create?: XOR | OrderStatusEventCreateWithoutOrderInput[] | OrderStatusEventUncheckedCreateWithoutOrderInput[] + connectOrCreate?: OrderStatusEventCreateOrConnectWithoutOrderInput | OrderStatusEventCreateOrConnectWithoutOrderInput[] + createMany?: OrderStatusEventCreateManyOrderInputEnvelope + connect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + } + + export type LedgerEntryCreateNestedManyWithoutOrderInput = { + create?: XOR | LedgerEntryCreateWithoutOrderInput[] | LedgerEntryUncheckedCreateWithoutOrderInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutOrderInput | LedgerEntryCreateOrConnectWithoutOrderInput[] + createMany?: LedgerEntryCreateManyOrderInputEnvelope + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + } + + export type PreOrderCreateNestedOneWithoutConvertedOrderInput = { + create?: XOR + connectOrCreate?: PreOrderCreateOrConnectWithoutConvertedOrderInput + connect?: PreOrderWhereUniqueInput + } + + export type OrderItemUncheckedCreateNestedManyWithoutOrderInput = { + create?: XOR | OrderItemCreateWithoutOrderInput[] | OrderItemUncheckedCreateWithoutOrderInput[] + connectOrCreate?: OrderItemCreateOrConnectWithoutOrderInput | OrderItemCreateOrConnectWithoutOrderInput[] + createMany?: OrderItemCreateManyOrderInputEnvelope + connect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + } + + export type OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput = { + create?: XOR | OrderStatusEventCreateWithoutOrderInput[] | OrderStatusEventUncheckedCreateWithoutOrderInput[] + connectOrCreate?: OrderStatusEventCreateOrConnectWithoutOrderInput | OrderStatusEventCreateOrConnectWithoutOrderInput[] + createMany?: OrderStatusEventCreateManyOrderInputEnvelope + connect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + } + + export type LedgerEntryUncheckedCreateNestedManyWithoutOrderInput = { + create?: XOR | LedgerEntryCreateWithoutOrderInput[] | LedgerEntryUncheckedCreateWithoutOrderInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutOrderInput | LedgerEntryCreateOrConnectWithoutOrderInput[] + createMany?: LedgerEntryCreateManyOrderInputEnvelope + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + } + + export type PreOrderUncheckedCreateNestedOneWithoutConvertedOrderInput = { + create?: XOR + connectOrCreate?: PreOrderCreateOrConnectWithoutConvertedOrderInput + connect?: PreOrderWhereUniqueInput + } + + export type EnumOrderStatusFieldUpdateOperationsInput = { + set?: $Enums.OrderStatus + } + + export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null + } + + export type CustomerUpdateOneRequiredWithoutOrdersNestedInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutOrdersInput + upsert?: CustomerUpsertWithoutOrdersInput + connect?: CustomerWhereUniqueInput + update?: XOR, CustomerUncheckedUpdateWithoutOrdersInput> + } + + export type BranchUpdateOneWithoutOrdersNestedInput = { + create?: XOR + connectOrCreate?: BranchCreateOrConnectWithoutOrdersInput + upsert?: BranchUpsertWithoutOrdersInput + disconnect?: BranchWhereInput | boolean + delete?: BranchWhereInput | boolean + connect?: BranchWhereUniqueInput + update?: XOR, BranchUncheckedUpdateWithoutOrdersInput> + } + + export type OrderItemUpdateManyWithoutOrderNestedInput = { + create?: XOR | OrderItemCreateWithoutOrderInput[] | OrderItemUncheckedCreateWithoutOrderInput[] + connectOrCreate?: OrderItemCreateOrConnectWithoutOrderInput | OrderItemCreateOrConnectWithoutOrderInput[] + upsert?: OrderItemUpsertWithWhereUniqueWithoutOrderInput | OrderItemUpsertWithWhereUniqueWithoutOrderInput[] + createMany?: OrderItemCreateManyOrderInputEnvelope + set?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + disconnect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + delete?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + connect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + update?: OrderItemUpdateWithWhereUniqueWithoutOrderInput | OrderItemUpdateWithWhereUniqueWithoutOrderInput[] + updateMany?: OrderItemUpdateManyWithWhereWithoutOrderInput | OrderItemUpdateManyWithWhereWithoutOrderInput[] + deleteMany?: OrderItemScalarWhereInput | OrderItemScalarWhereInput[] + } + + export type OrderStatusEventUpdateManyWithoutOrderNestedInput = { + create?: XOR | OrderStatusEventCreateWithoutOrderInput[] | OrderStatusEventUncheckedCreateWithoutOrderInput[] + connectOrCreate?: OrderStatusEventCreateOrConnectWithoutOrderInput | OrderStatusEventCreateOrConnectWithoutOrderInput[] + upsert?: OrderStatusEventUpsertWithWhereUniqueWithoutOrderInput | OrderStatusEventUpsertWithWhereUniqueWithoutOrderInput[] + createMany?: OrderStatusEventCreateManyOrderInputEnvelope + set?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + disconnect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + delete?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + connect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + update?: OrderStatusEventUpdateWithWhereUniqueWithoutOrderInput | OrderStatusEventUpdateWithWhereUniqueWithoutOrderInput[] + updateMany?: OrderStatusEventUpdateManyWithWhereWithoutOrderInput | OrderStatusEventUpdateManyWithWhereWithoutOrderInput[] + deleteMany?: OrderStatusEventScalarWhereInput | OrderStatusEventScalarWhereInput[] + } + + export type LedgerEntryUpdateManyWithoutOrderNestedInput = { + create?: XOR | LedgerEntryCreateWithoutOrderInput[] | LedgerEntryUncheckedCreateWithoutOrderInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutOrderInput | LedgerEntryCreateOrConnectWithoutOrderInput[] + upsert?: LedgerEntryUpsertWithWhereUniqueWithoutOrderInput | LedgerEntryUpsertWithWhereUniqueWithoutOrderInput[] + createMany?: LedgerEntryCreateManyOrderInputEnvelope + set?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + disconnect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + delete?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + update?: LedgerEntryUpdateWithWhereUniqueWithoutOrderInput | LedgerEntryUpdateWithWhereUniqueWithoutOrderInput[] + updateMany?: LedgerEntryUpdateManyWithWhereWithoutOrderInput | LedgerEntryUpdateManyWithWhereWithoutOrderInput[] + deleteMany?: LedgerEntryScalarWhereInput | LedgerEntryScalarWhereInput[] + } + + export type PreOrderUpdateOneWithoutConvertedOrderNestedInput = { + create?: XOR + connectOrCreate?: PreOrderCreateOrConnectWithoutConvertedOrderInput + upsert?: PreOrderUpsertWithoutConvertedOrderInput + disconnect?: PreOrderWhereInput | boolean + delete?: PreOrderWhereInput | boolean + connect?: PreOrderWhereUniqueInput + update?: XOR, PreOrderUncheckedUpdateWithoutConvertedOrderInput> + } + + export type OrderItemUncheckedUpdateManyWithoutOrderNestedInput = { + create?: XOR | OrderItemCreateWithoutOrderInput[] | OrderItemUncheckedCreateWithoutOrderInput[] + connectOrCreate?: OrderItemCreateOrConnectWithoutOrderInput | OrderItemCreateOrConnectWithoutOrderInput[] + upsert?: OrderItemUpsertWithWhereUniqueWithoutOrderInput | OrderItemUpsertWithWhereUniqueWithoutOrderInput[] + createMany?: OrderItemCreateManyOrderInputEnvelope + set?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + disconnect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + delete?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + connect?: OrderItemWhereUniqueInput | OrderItemWhereUniqueInput[] + update?: OrderItemUpdateWithWhereUniqueWithoutOrderInput | OrderItemUpdateWithWhereUniqueWithoutOrderInput[] + updateMany?: OrderItemUpdateManyWithWhereWithoutOrderInput | OrderItemUpdateManyWithWhereWithoutOrderInput[] + deleteMany?: OrderItemScalarWhereInput | OrderItemScalarWhereInput[] + } + + export type OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput = { + create?: XOR | OrderStatusEventCreateWithoutOrderInput[] | OrderStatusEventUncheckedCreateWithoutOrderInput[] + connectOrCreate?: OrderStatusEventCreateOrConnectWithoutOrderInput | OrderStatusEventCreateOrConnectWithoutOrderInput[] + upsert?: OrderStatusEventUpsertWithWhereUniqueWithoutOrderInput | OrderStatusEventUpsertWithWhereUniqueWithoutOrderInput[] + createMany?: OrderStatusEventCreateManyOrderInputEnvelope + set?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + disconnect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + delete?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + connect?: OrderStatusEventWhereUniqueInput | OrderStatusEventWhereUniqueInput[] + update?: OrderStatusEventUpdateWithWhereUniqueWithoutOrderInput | OrderStatusEventUpdateWithWhereUniqueWithoutOrderInput[] + updateMany?: OrderStatusEventUpdateManyWithWhereWithoutOrderInput | OrderStatusEventUpdateManyWithWhereWithoutOrderInput[] + deleteMany?: OrderStatusEventScalarWhereInput | OrderStatusEventScalarWhereInput[] + } + + export type LedgerEntryUncheckedUpdateManyWithoutOrderNestedInput = { + create?: XOR | LedgerEntryCreateWithoutOrderInput[] | LedgerEntryUncheckedCreateWithoutOrderInput[] + connectOrCreate?: LedgerEntryCreateOrConnectWithoutOrderInput | LedgerEntryCreateOrConnectWithoutOrderInput[] + upsert?: LedgerEntryUpsertWithWhereUniqueWithoutOrderInput | LedgerEntryUpsertWithWhereUniqueWithoutOrderInput[] + createMany?: LedgerEntryCreateManyOrderInputEnvelope + set?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + disconnect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + delete?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + connect?: LedgerEntryWhereUniqueInput | LedgerEntryWhereUniqueInput[] + update?: LedgerEntryUpdateWithWhereUniqueWithoutOrderInput | LedgerEntryUpdateWithWhereUniqueWithoutOrderInput[] + updateMany?: LedgerEntryUpdateManyWithWhereWithoutOrderInput | LedgerEntryUpdateManyWithWhereWithoutOrderInput[] + deleteMany?: LedgerEntryScalarWhereInput | LedgerEntryScalarWhereInput[] + } + + export type PreOrderUncheckedUpdateOneWithoutConvertedOrderNestedInput = { + create?: XOR + connectOrCreate?: PreOrderCreateOrConnectWithoutConvertedOrderInput + upsert?: PreOrderUpsertWithoutConvertedOrderInput + disconnect?: PreOrderWhereInput | boolean + delete?: PreOrderWhereInput | boolean + connect?: PreOrderWhereUniqueInput + update?: XOR, PreOrderUncheckedUpdateWithoutConvertedOrderInput> + } + + export type OrderCreateNestedOneWithoutItemsInput = { + create?: XOR + connectOrCreate?: OrderCreateOrConnectWithoutItemsInput + connect?: OrderWhereUniqueInput + } + + export type ProductVariantCreateNestedOneWithoutOrderItemsInput = { + create?: XOR + connectOrCreate?: ProductVariantCreateOrConnectWithoutOrderItemsInput + connect?: ProductVariantWhereUniqueInput + } + + export type OrderUpdateOneRequiredWithoutItemsNestedInput = { + create?: XOR + connectOrCreate?: OrderCreateOrConnectWithoutItemsInput + upsert?: OrderUpsertWithoutItemsInput + connect?: OrderWhereUniqueInput + update?: XOR, OrderUncheckedUpdateWithoutItemsInput> + } + + export type ProductVariantUpdateOneRequiredWithoutOrderItemsNestedInput = { + create?: XOR + connectOrCreate?: ProductVariantCreateOrConnectWithoutOrderItemsInput + upsert?: ProductVariantUpsertWithoutOrderItemsInput + connect?: ProductVariantWhereUniqueInput + update?: XOR, ProductVariantUncheckedUpdateWithoutOrderItemsInput> + } + + export type OrderCreateNestedOneWithoutStatusEventsInput = { + create?: XOR + connectOrCreate?: OrderCreateOrConnectWithoutStatusEventsInput + connect?: OrderWhereUniqueInput + } + + export type AdminUserCreateNestedOneWithoutOrderStatusEventsInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutOrderStatusEventsInput + connect?: AdminUserWhereUniqueInput + } + + export type NullableEnumOrderStatusFieldUpdateOperationsInput = { + set?: $Enums.OrderStatus | null + } + + export type OrderUpdateOneRequiredWithoutStatusEventsNestedInput = { + create?: XOR + connectOrCreate?: OrderCreateOrConnectWithoutStatusEventsInput + upsert?: OrderUpsertWithoutStatusEventsInput + connect?: OrderWhereUniqueInput + update?: XOR, OrderUncheckedUpdateWithoutStatusEventsInput> + } + + export type AdminUserUpdateOneWithoutOrderStatusEventsNestedInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutOrderStatusEventsInput + upsert?: AdminUserUpsertWithoutOrderStatusEventsInput + disconnect?: AdminUserWhereInput | boolean + delete?: AdminUserWhereInput | boolean + connect?: AdminUserWhereUniqueInput + update?: XOR, AdminUserUncheckedUpdateWithoutOrderStatusEventsInput> + } + + export type CustomerCreateNestedOneWithoutPreOrdersInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutPreOrdersInput + connect?: CustomerWhereUniqueInput + } + + export type CityCreateNestedOneWithoutPreOrdersInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutPreOrdersInput + connect?: CityWhereUniqueInput + } + + export type WorkshopCreateNestedOneWithoutPreOrdersInput = { + create?: XOR + connectOrCreate?: WorkshopCreateOrConnectWithoutPreOrdersInput + connect?: WorkshopWhereUniqueInput + } + + export type OrderCreateNestedOneWithoutConvertedFromPreOrderInput = { + create?: XOR + connectOrCreate?: OrderCreateOrConnectWithoutConvertedFromPreOrderInput + connect?: OrderWhereUniqueInput + } + + export type PreOrderStatusEventCreateNestedManyWithoutPreOrderInput = { + create?: XOR | PreOrderStatusEventCreateWithoutPreOrderInput[] | PreOrderStatusEventUncheckedCreateWithoutPreOrderInput[] + connectOrCreate?: PreOrderStatusEventCreateOrConnectWithoutPreOrderInput | PreOrderStatusEventCreateOrConnectWithoutPreOrderInput[] + createMany?: PreOrderStatusEventCreateManyPreOrderInputEnvelope + connect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + } + + export type PreOrderStatusEventUncheckedCreateNestedManyWithoutPreOrderInput = { + create?: XOR | PreOrderStatusEventCreateWithoutPreOrderInput[] | PreOrderStatusEventUncheckedCreateWithoutPreOrderInput[] + connectOrCreate?: PreOrderStatusEventCreateOrConnectWithoutPreOrderInput | PreOrderStatusEventCreateOrConnectWithoutPreOrderInput[] + createMany?: PreOrderStatusEventCreateManyPreOrderInputEnvelope + connect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + } + + export type EnumPreOrderStatusFieldUpdateOperationsInput = { + set?: $Enums.PreOrderStatus + } + + export type CustomerUpdateOneRequiredWithoutPreOrdersNestedInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutPreOrdersInput + upsert?: CustomerUpsertWithoutPreOrdersInput + connect?: CustomerWhereUniqueInput + update?: XOR, CustomerUncheckedUpdateWithoutPreOrdersInput> + } + + export type CityUpdateOneWithoutPreOrdersNestedInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutPreOrdersInput + upsert?: CityUpsertWithoutPreOrdersInput + disconnect?: CityWhereInput | boolean + delete?: CityWhereInput | boolean + connect?: CityWhereUniqueInput + update?: XOR, CityUncheckedUpdateWithoutPreOrdersInput> + } + + export type WorkshopUpdateOneWithoutPreOrdersNestedInput = { + create?: XOR + connectOrCreate?: WorkshopCreateOrConnectWithoutPreOrdersInput + upsert?: WorkshopUpsertWithoutPreOrdersInput + disconnect?: WorkshopWhereInput | boolean + delete?: WorkshopWhereInput | boolean + connect?: WorkshopWhereUniqueInput + update?: XOR, WorkshopUncheckedUpdateWithoutPreOrdersInput> + } + + export type OrderUpdateOneWithoutConvertedFromPreOrderNestedInput = { + create?: XOR + connectOrCreate?: OrderCreateOrConnectWithoutConvertedFromPreOrderInput + upsert?: OrderUpsertWithoutConvertedFromPreOrderInput + disconnect?: OrderWhereInput | boolean + delete?: OrderWhereInput | boolean + connect?: OrderWhereUniqueInput + update?: XOR, OrderUncheckedUpdateWithoutConvertedFromPreOrderInput> + } + + export type PreOrderStatusEventUpdateManyWithoutPreOrderNestedInput = { + create?: XOR | PreOrderStatusEventCreateWithoutPreOrderInput[] | PreOrderStatusEventUncheckedCreateWithoutPreOrderInput[] + connectOrCreate?: PreOrderStatusEventCreateOrConnectWithoutPreOrderInput | PreOrderStatusEventCreateOrConnectWithoutPreOrderInput[] + upsert?: PreOrderStatusEventUpsertWithWhereUniqueWithoutPreOrderInput | PreOrderStatusEventUpsertWithWhereUniqueWithoutPreOrderInput[] + createMany?: PreOrderStatusEventCreateManyPreOrderInputEnvelope + set?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + disconnect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + delete?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + connect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + update?: PreOrderStatusEventUpdateWithWhereUniqueWithoutPreOrderInput | PreOrderStatusEventUpdateWithWhereUniqueWithoutPreOrderInput[] + updateMany?: PreOrderStatusEventUpdateManyWithWhereWithoutPreOrderInput | PreOrderStatusEventUpdateManyWithWhereWithoutPreOrderInput[] + deleteMany?: PreOrderStatusEventScalarWhereInput | PreOrderStatusEventScalarWhereInput[] + } + + export type PreOrderStatusEventUncheckedUpdateManyWithoutPreOrderNestedInput = { + create?: XOR | PreOrderStatusEventCreateWithoutPreOrderInput[] | PreOrderStatusEventUncheckedCreateWithoutPreOrderInput[] + connectOrCreate?: PreOrderStatusEventCreateOrConnectWithoutPreOrderInput | PreOrderStatusEventCreateOrConnectWithoutPreOrderInput[] + upsert?: PreOrderStatusEventUpsertWithWhereUniqueWithoutPreOrderInput | PreOrderStatusEventUpsertWithWhereUniqueWithoutPreOrderInput[] + createMany?: PreOrderStatusEventCreateManyPreOrderInputEnvelope + set?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + disconnect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + delete?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + connect?: PreOrderStatusEventWhereUniqueInput | PreOrderStatusEventWhereUniqueInput[] + update?: PreOrderStatusEventUpdateWithWhereUniqueWithoutPreOrderInput | PreOrderStatusEventUpdateWithWhereUniqueWithoutPreOrderInput[] + updateMany?: PreOrderStatusEventUpdateManyWithWhereWithoutPreOrderInput | PreOrderStatusEventUpdateManyWithWhereWithoutPreOrderInput[] + deleteMany?: PreOrderStatusEventScalarWhereInput | PreOrderStatusEventScalarWhereInput[] + } + + export type PreOrderCreateNestedOneWithoutStatusEventsInput = { + create?: XOR + connectOrCreate?: PreOrderCreateOrConnectWithoutStatusEventsInput + connect?: PreOrderWhereUniqueInput + } + + export type AdminUserCreateNestedOneWithoutPreOrderStatusEventsInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutPreOrderStatusEventsInput + connect?: AdminUserWhereUniqueInput + } + + export type PreOrderUpdateOneRequiredWithoutStatusEventsNestedInput = { + create?: XOR + connectOrCreate?: PreOrderCreateOrConnectWithoutStatusEventsInput + upsert?: PreOrderUpsertWithoutStatusEventsInput + connect?: PreOrderWhereUniqueInput + update?: XOR, PreOrderUncheckedUpdateWithoutStatusEventsInput> + } + + export type AdminUserUpdateOneWithoutPreOrderStatusEventsNestedInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutPreOrderStatusEventsInput + upsert?: AdminUserUpsertWithoutPreOrderStatusEventsInput + disconnect?: AdminUserWhereInput | boolean + delete?: AdminUserWhereInput | boolean + connect?: AdminUserWhereUniqueInput + update?: XOR, AdminUserUncheckedUpdateWithoutPreOrderStatusEventsInput> + } + + export type CustomerCreateNestedOneWithoutLedgerEntriesInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutLedgerEntriesInput + connect?: CustomerWhereUniqueInput + } + + export type OrderCreateNestedOneWithoutLedgerEntriesInput = { + create?: XOR + connectOrCreate?: OrderCreateOrConnectWithoutLedgerEntriesInput + connect?: OrderWhereUniqueInput + } + + export type AdminUserCreateNestedOneWithoutPostedLedgerEntriesInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutPostedLedgerEntriesInput + connect?: AdminUserWhereUniqueInput + } + + export type EnumLedgerCurrencyFieldUpdateOperationsInput = { + set?: $Enums.LedgerCurrency + } + + export type EnumLedgerDirectionFieldUpdateOperationsInput = { + set?: $Enums.LedgerDirection + } + + export type EnumLedgerSourceTypeFieldUpdateOperationsInput = { + set?: $Enums.LedgerSourceType + } + + export type NullableIntFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type CustomerUpdateOneRequiredWithoutLedgerEntriesNestedInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutLedgerEntriesInput + upsert?: CustomerUpsertWithoutLedgerEntriesInput + connect?: CustomerWhereUniqueInput + update?: XOR, CustomerUncheckedUpdateWithoutLedgerEntriesInput> + } + + export type OrderUpdateOneWithoutLedgerEntriesNestedInput = { + create?: XOR + connectOrCreate?: OrderCreateOrConnectWithoutLedgerEntriesInput + upsert?: OrderUpsertWithoutLedgerEntriesInput + disconnect?: OrderWhereInput | boolean + delete?: OrderWhereInput | boolean + connect?: OrderWhereUniqueInput + update?: XOR, OrderUncheckedUpdateWithoutLedgerEntriesInput> + } + + export type AdminUserUpdateOneWithoutPostedLedgerEntriesNestedInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutPostedLedgerEntriesInput + upsert?: AdminUserUpsertWithoutPostedLedgerEntriesInput + disconnect?: AdminUserWhereInput | boolean + delete?: AdminUserWhereInput | boolean + connect?: AdminUserWhereUniqueInput + update?: XOR, AdminUserUncheckedUpdateWithoutPostedLedgerEntriesInput> + } + + export type CustomerCreateNestedOneWithoutWalletBonusesInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutWalletBonusesInput + connect?: CustomerWhereUniqueInput + } + + export type CustomerUpdateOneRequiredWithoutWalletBonusesNestedInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutWalletBonusesInput + upsert?: CustomerUpsertWithoutWalletBonusesInput + connect?: CustomerWhereUniqueInput + update?: XOR, CustomerUncheckedUpdateWithoutWalletBonusesInput> + } + + export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + 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[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | 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 NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + 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[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + 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[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | 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[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type NestedEnumAdminRoleFilter<$PrismaModel = never> = { + equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel> + in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + not?: NestedEnumAdminRoleFilter<$PrismaModel> | $Enums.AdminRole + } + + export type NestedDecimalNullableFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalNullableFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null + } + + export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + 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 NestedEnumAdminRoleWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel> + in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + not?: NestedEnumAdminRoleWithAggregatesFilter<$PrismaModel> | $Enums.AdminRole + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAdminRoleFilter<$PrismaModel> + _max?: NestedEnumAdminRoleFilter<$PrismaModel> + } + + export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedDecimalNullableFilter<$PrismaModel> + _sum?: NestedDecimalNullableFilter<$PrismaModel> + _min?: NestedDecimalNullableFilter<$PrismaModel> + _max?: NestedDecimalNullableFilter<$PrismaModel> + } + + export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + 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 NestedDecimalFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string + } + + export type NestedEnumVerificationStepFilter<$PrismaModel = never> = { + equals?: $Enums.VerificationStep | EnumVerificationStepFieldRefInput<$PrismaModel> + in?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> + notIn?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> + not?: NestedEnumVerificationStepFilter<$PrismaModel> | $Enums.VerificationStep + } + + export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedDecimalFilter<$PrismaModel> + _sum?: NestedDecimalFilter<$PrismaModel> + _min?: NestedDecimalFilter<$PrismaModel> + _max?: NestedDecimalFilter<$PrismaModel> + } + + export type NestedEnumVerificationStepWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.VerificationStep | EnumVerificationStepFieldRefInput<$PrismaModel> + in?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> + notIn?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> + not?: NestedEnumVerificationStepWithAggregatesFilter<$PrismaModel> | $Enums.VerificationStep + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumVerificationStepFilter<$PrismaModel> + _max?: NestedEnumVerificationStepFilter<$PrismaModel> + } + + export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + 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[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + + export type NestedEnumOrderStatusFilter<$PrismaModel = never> = { + equals?: $Enums.OrderStatus | EnumOrderStatusFieldRefInput<$PrismaModel> + in?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> + not?: NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus + } + + export type NestedDateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | 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 NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.OrderStatus | EnumOrderStatusFieldRefInput<$PrismaModel> + in?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> + not?: NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumOrderStatusFilter<$PrismaModel> + _max?: NestedEnumOrderStatusFilter<$PrismaModel> + } + + export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | 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 NestedEnumOrderStatusNullableFilter<$PrismaModel = never> = { + equals?: $Enums.OrderStatus | EnumOrderStatusFieldRefInput<$PrismaModel> | null + in?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> | null + notIn?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> | null + not?: NestedEnumOrderStatusNullableFilter<$PrismaModel> | $Enums.OrderStatus | null + } + + export type NestedEnumOrderStatusNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.OrderStatus | EnumOrderStatusFieldRefInput<$PrismaModel> | null + in?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> | null + notIn?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> | null + not?: NestedEnumOrderStatusNullableWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedEnumOrderStatusNullableFilter<$PrismaModel> + _max?: NestedEnumOrderStatusNullableFilter<$PrismaModel> + } + + export type NestedEnumPreOrderStatusFilter<$PrismaModel = never> = { + equals?: $Enums.PreOrderStatus | EnumPreOrderStatusFieldRefInput<$PrismaModel> + in?: $Enums.PreOrderStatus[] | ListEnumPreOrderStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PreOrderStatus[] | ListEnumPreOrderStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPreOrderStatusFilter<$PrismaModel> | $Enums.PreOrderStatus + } + + export type NestedEnumPreOrderStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PreOrderStatus | EnumPreOrderStatusFieldRefInput<$PrismaModel> + in?: $Enums.PreOrderStatus[] | ListEnumPreOrderStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PreOrderStatus[] | ListEnumPreOrderStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPreOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.PreOrderStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPreOrderStatusFilter<$PrismaModel> + _max?: NestedEnumPreOrderStatusFilter<$PrismaModel> + } + export type NestedJsonFilter<$PrismaModel = never> = + | PatchUndefined< + Either>, Exclude>, 'path'>>, + Required> + > + | OptionalFlat>, 'path'>> + + export type NestedJsonFilterBase<$PrismaModel = never> = { + equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + path?: string[] + string_contains?: string | StringFieldRefInput<$PrismaModel> + string_starts_with?: string | StringFieldRefInput<$PrismaModel> + string_ends_with?: string | StringFieldRefInput<$PrismaModel> + array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + } + + export type NestedEnumLedgerCurrencyFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerCurrency | EnumLedgerCurrencyFieldRefInput<$PrismaModel> + in?: $Enums.LedgerCurrency[] | ListEnumLedgerCurrencyFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerCurrency[] | ListEnumLedgerCurrencyFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerCurrencyFilter<$PrismaModel> | $Enums.LedgerCurrency + } + + export type NestedEnumLedgerDirectionFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerDirection | EnumLedgerDirectionFieldRefInput<$PrismaModel> + in?: $Enums.LedgerDirection[] | ListEnumLedgerDirectionFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerDirection[] | ListEnumLedgerDirectionFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerDirectionFilter<$PrismaModel> | $Enums.LedgerDirection + } + + export type NestedEnumLedgerSourceTypeFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerSourceType | EnumLedgerSourceTypeFieldRefInput<$PrismaModel> + in?: $Enums.LedgerSourceType[] | ListEnumLedgerSourceTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerSourceType[] | ListEnumLedgerSourceTypeFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerSourceTypeFilter<$PrismaModel> | $Enums.LedgerSourceType + } + + export type NestedEnumLedgerCurrencyWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerCurrency | EnumLedgerCurrencyFieldRefInput<$PrismaModel> + in?: $Enums.LedgerCurrency[] | ListEnumLedgerCurrencyFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerCurrency[] | ListEnumLedgerCurrencyFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerCurrencyWithAggregatesFilter<$PrismaModel> | $Enums.LedgerCurrency + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumLedgerCurrencyFilter<$PrismaModel> + _max?: NestedEnumLedgerCurrencyFilter<$PrismaModel> + } + + export type NestedEnumLedgerDirectionWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerDirection | EnumLedgerDirectionFieldRefInput<$PrismaModel> + in?: $Enums.LedgerDirection[] | ListEnumLedgerDirectionFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerDirection[] | ListEnumLedgerDirectionFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerDirectionWithAggregatesFilter<$PrismaModel> | $Enums.LedgerDirection + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumLedgerDirectionFilter<$PrismaModel> + _max?: NestedEnumLedgerDirectionFilter<$PrismaModel> + } + + export type NestedEnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.LedgerSourceType | EnumLedgerSourceTypeFieldRefInput<$PrismaModel> + in?: $Enums.LedgerSourceType[] | ListEnumLedgerSourceTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.LedgerSourceType[] | ListEnumLedgerSourceTypeFieldRefInput<$PrismaModel> + not?: NestedEnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel> | $Enums.LedgerSourceType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumLedgerSourceTypeFilter<$PrismaModel> + _max?: NestedEnumLedgerSourceTypeFilter<$PrismaModel> + } + + export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | 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[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableFilter<$PrismaModel> | number | null + } + + export type CustomerCreateWithoutCityInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutCityInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutCityInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type CustomerCreateManyCityInputEnvelope = { + data: CustomerCreateManyCityInput | CustomerCreateManyCityInput[] + skipDuplicates?: boolean + } + + export type CustomerAddressCreateWithoutCityInput = { + id?: string + addressLine: string + isDefault?: boolean + customer: CustomerCreateNestedOneWithoutAddressesInput + } + + export type CustomerAddressUncheckedCreateWithoutCityInput = { + id?: string + customerId: string + addressLine: string + isDefault?: boolean + } + + export type CustomerAddressCreateOrConnectWithoutCityInput = { + where: CustomerAddressWhereUniqueInput + create: XOR + } + + export type CustomerAddressCreateManyCityInputEnvelope = { + data: CustomerAddressCreateManyCityInput | CustomerAddressCreateManyCityInput[] + skipDuplicates?: boolean + } + + export type BranchCreateWithoutCityInput = { + id?: string + name: string + adminUsers?: AdminUserCreateNestedManyWithoutBranchInput + orders?: OrderCreateNestedManyWithoutBranchInput + } + + export type BranchUncheckedCreateWithoutCityInput = { + id?: string + name: string + adminUsers?: AdminUserUncheckedCreateNestedManyWithoutBranchInput + orders?: OrderUncheckedCreateNestedManyWithoutBranchInput + } + + export type BranchCreateOrConnectWithoutCityInput = { + where: BranchWhereUniqueInput + create: XOR + } + + export type BranchCreateManyCityInputEnvelope = { + data: BranchCreateManyCityInput | BranchCreateManyCityInput[] + skipDuplicates?: boolean + } + + export type PreOrderCreateWithoutCityInput = { + id?: string + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutPreOrdersInput + workshop?: WorkshopCreateNestedOneWithoutPreOrdersInput + convertedOrder?: OrderCreateNestedOneWithoutConvertedFromPreOrderInput + statusEvents?: PreOrderStatusEventCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderUncheckedCreateWithoutCityInput = { + id?: string + customerId: string + workshopId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + convertedOrderId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + statusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderCreateOrConnectWithoutCityInput = { + where: PreOrderWhereUniqueInput + create: XOR + } + + export type PreOrderCreateManyCityInputEnvelope = { + data: PreOrderCreateManyCityInput | PreOrderCreateManyCityInput[] + skipDuplicates?: boolean + } + + export type CustomerUpsertWithWhereUniqueWithoutCityInput = { + where: CustomerWhereUniqueInput + update: XOR + create: XOR + } + + export type CustomerUpdateWithWhereUniqueWithoutCityInput = { + where: CustomerWhereUniqueInput + data: XOR + } + + export type CustomerUpdateManyWithWhereWithoutCityInput = { + where: CustomerScalarWhereInput + data: XOR + } + + export type CustomerScalarWhereInput = { + AND?: CustomerScalarWhereInput | CustomerScalarWhereInput[] + OR?: CustomerScalarWhereInput[] + NOT?: CustomerScalarWhereInput | CustomerScalarWhereInput[] + id?: StringFilter<"Customer"> | string + fullName?: StringFilter<"Customer"> | string + mobile?: StringFilter<"Customer"> | string + nationalCode?: StringFilter<"Customer"> | string + passwordHash?: StringFilter<"Customer"> | string + cityId?: StringNullableFilter<"Customer"> | string | null + referredByAgentId?: StringNullableFilter<"Customer"> | string | null + goldCreditLimitGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFilter<"Customer"> | $Enums.VerificationStep + nationalIdImageUrl?: StringNullableFilter<"Customer"> | string | null + businessLicenseUrl?: StringNullableFilter<"Customer"> | string | null + shopImageUrl?: StringNullableFilter<"Customer"> | string | null + isActive?: BoolFilter<"Customer"> | boolean + createdAt?: DateTimeFilter<"Customer"> | Date | string + updatedAt?: DateTimeFilter<"Customer"> | Date | string + } + + export type CustomerAddressUpsertWithWhereUniqueWithoutCityInput = { + where: CustomerAddressWhereUniqueInput + update: XOR + create: XOR + } + + export type CustomerAddressUpdateWithWhereUniqueWithoutCityInput = { + where: CustomerAddressWhereUniqueInput + data: XOR + } + + export type CustomerAddressUpdateManyWithWhereWithoutCityInput = { + where: CustomerAddressScalarWhereInput + data: XOR + } + + export type CustomerAddressScalarWhereInput = { + AND?: CustomerAddressScalarWhereInput | CustomerAddressScalarWhereInput[] + OR?: CustomerAddressScalarWhereInput[] + NOT?: CustomerAddressScalarWhereInput | CustomerAddressScalarWhereInput[] + id?: StringFilter<"CustomerAddress"> | string + customerId?: StringFilter<"CustomerAddress"> | string + cityId?: StringNullableFilter<"CustomerAddress"> | string | null + addressLine?: StringFilter<"CustomerAddress"> | string + isDefault?: BoolFilter<"CustomerAddress"> | boolean + } + + export type BranchUpsertWithWhereUniqueWithoutCityInput = { + where: BranchWhereUniqueInput + update: XOR + create: XOR + } + + export type BranchUpdateWithWhereUniqueWithoutCityInput = { + where: BranchWhereUniqueInput + data: XOR + } + + export type BranchUpdateManyWithWhereWithoutCityInput = { + where: BranchScalarWhereInput + data: XOR + } + + export type BranchScalarWhereInput = { + AND?: BranchScalarWhereInput | BranchScalarWhereInput[] + OR?: BranchScalarWhereInput[] + NOT?: BranchScalarWhereInput | BranchScalarWhereInput[] + id?: StringFilter<"Branch"> | string + name?: StringFilter<"Branch"> | string + cityId?: StringNullableFilter<"Branch"> | string | null + } + + export type PreOrderUpsertWithWhereUniqueWithoutCityInput = { + where: PreOrderWhereUniqueInput + update: XOR + create: XOR + } + + export type PreOrderUpdateWithWhereUniqueWithoutCityInput = { + where: PreOrderWhereUniqueInput + data: XOR + } + + export type PreOrderUpdateManyWithWhereWithoutCityInput = { + where: PreOrderScalarWhereInput + data: XOR + } + + export type PreOrderScalarWhereInput = { + AND?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] + OR?: PreOrderScalarWhereInput[] + NOT?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] + id?: StringFilter<"PreOrder"> | string + customerId?: StringFilter<"PreOrder"> | string + cityId?: StringNullableFilter<"PreOrder"> | string | null + workshopId?: StringNullableFilter<"PreOrder"> | string | null + status?: EnumPreOrderStatusFilter<"PreOrder"> | $Enums.PreOrderStatus + designImageUrl?: StringNullableFilter<"PreOrder"> | string | null + colorName?: StringNullableFilter<"PreOrder"> | string | null + sizeSpec?: StringNullableFilter<"PreOrder"> | string | null + stoneColor?: StringNullableFilter<"PreOrder"> | string | null + minaColor?: StringNullableFilter<"PreOrder"> | string | null + estimatedWeightGrams?: DecimalNullableFilter<"PreOrder"> | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: DecimalNullableFilter<"PreOrder"> | Decimal | DecimalJsLike | number | string | null + description?: StringNullableFilter<"PreOrder"> | string | null + convertedOrderId?: StringNullableFilter<"PreOrder"> | string | null + createdAt?: DateTimeFilter<"PreOrder"> | Date | string + updatedAt?: DateTimeFilter<"PreOrder"> | Date | string + } + + export type BranchCreateWithoutAdminUsersInput = { + id?: string + name: string + city?: CityCreateNestedOneWithoutBranchesInput + orders?: OrderCreateNestedManyWithoutBranchInput + } + + export type BranchUncheckedCreateWithoutAdminUsersInput = { + id?: string + name: string + cityId?: string | null + orders?: OrderUncheckedCreateNestedManyWithoutBranchInput + } + + export type BranchCreateOrConnectWithoutAdminUsersInput = { + where: BranchWhereUniqueInput + create: XOR + } + + export type CustomerCreateWithoutReferredByAgentInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutReferredByAgentInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutReferredByAgentInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type CustomerCreateManyReferredByAgentInputEnvelope = { + data: CustomerCreateManyReferredByAgentInput | CustomerCreateManyReferredByAgentInput[] + skipDuplicates?: boolean + } + + export type LedgerEntryCreateWithoutPostedByAdminUserInput = { + id?: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + confirmed?: boolean + confirmedAt?: Date | string | null + note?: string | null + createdAt?: Date | string + customer: CustomerCreateNestedOneWithoutLedgerEntriesInput + order?: OrderCreateNestedOneWithoutLedgerEntriesInput + } + + export type LedgerEntryUncheckedCreateWithoutPostedByAdminUserInput = { + id?: string + customerId: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + orderId?: string | null + confirmed?: boolean + confirmedAt?: Date | string | null + note?: string | null + createdAt?: Date | string + } + + export type LedgerEntryCreateOrConnectWithoutPostedByAdminUserInput = { + where: LedgerEntryWhereUniqueInput + create: XOR + } + + export type LedgerEntryCreateManyPostedByAdminUserInputEnvelope = { + data: LedgerEntryCreateManyPostedByAdminUserInput | LedgerEntryCreateManyPostedByAdminUserInput[] + skipDuplicates?: boolean + } + + export type OrderStatusEventCreateWithoutActorAdminUserInput = { + id?: string + fromStatus?: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note?: string | null + createdAt?: Date | string + order: OrderCreateNestedOneWithoutStatusEventsInput + } + + export type OrderStatusEventUncheckedCreateWithoutActorAdminUserInput = { + id?: string + orderId: string + fromStatus?: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note?: string | null + createdAt?: Date | string + } + + export type OrderStatusEventCreateOrConnectWithoutActorAdminUserInput = { + where: OrderStatusEventWhereUniqueInput + create: XOR + } + + export type OrderStatusEventCreateManyActorAdminUserInputEnvelope = { + data: OrderStatusEventCreateManyActorAdminUserInput | OrderStatusEventCreateManyActorAdminUserInput[] + skipDuplicates?: boolean + } + + export type PreOrderStatusEventCreateWithoutActorAdminUserInput = { + id?: string + changes: JsonNullValueInput | InputJsonValue + ipAddress?: string | null + createdAt?: Date | string + preOrder: PreOrderCreateNestedOneWithoutStatusEventsInput + } + + export type PreOrderStatusEventUncheckedCreateWithoutActorAdminUserInput = { + id?: string + preOrderId: string + changes: JsonNullValueInput | InputJsonValue + ipAddress?: string | null + createdAt?: Date | string + } + + export type PreOrderStatusEventCreateOrConnectWithoutActorAdminUserInput = { + where: PreOrderStatusEventWhereUniqueInput + create: XOR + } + + export type PreOrderStatusEventCreateManyActorAdminUserInputEnvelope = { + data: PreOrderStatusEventCreateManyActorAdminUserInput | PreOrderStatusEventCreateManyActorAdminUserInput[] + skipDuplicates?: boolean + } + + export type BranchUpsertWithoutAdminUsersInput = { + update: XOR + create: XOR + where?: BranchWhereInput + } + + export type BranchUpdateToOneWithWhereWithoutAdminUsersInput = { + where?: BranchWhereInput + data: XOR + } + + export type BranchUpdateWithoutAdminUsersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + city?: CityUpdateOneWithoutBranchesNestedInput + orders?: OrderUpdateManyWithoutBranchNestedInput + } + + export type BranchUncheckedUpdateWithoutAdminUsersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + orders?: OrderUncheckedUpdateManyWithoutBranchNestedInput + } + + export type CustomerUpsertWithWhereUniqueWithoutReferredByAgentInput = { + where: CustomerWhereUniqueInput + update: XOR + create: XOR + } + + export type CustomerUpdateWithWhereUniqueWithoutReferredByAgentInput = { + where: CustomerWhereUniqueInput + data: XOR + } + + export type CustomerUpdateManyWithWhereWithoutReferredByAgentInput = { + where: CustomerScalarWhereInput + data: XOR + } + + export type LedgerEntryUpsertWithWhereUniqueWithoutPostedByAdminUserInput = { + where: LedgerEntryWhereUniqueInput + update: XOR + create: XOR + } + + export type LedgerEntryUpdateWithWhereUniqueWithoutPostedByAdminUserInput = { + where: LedgerEntryWhereUniqueInput + data: XOR + } + + export type LedgerEntryUpdateManyWithWhereWithoutPostedByAdminUserInput = { + where: LedgerEntryScalarWhereInput + data: XOR + } + + export type LedgerEntryScalarWhereInput = { + AND?: LedgerEntryScalarWhereInput | LedgerEntryScalarWhereInput[] + OR?: LedgerEntryScalarWhereInput[] + NOT?: LedgerEntryScalarWhereInput | LedgerEntryScalarWhereInput[] + id?: StringFilter<"LedgerEntry"> | string + customerId?: StringFilter<"LedgerEntry"> | string + currency?: EnumLedgerCurrencyFilter<"LedgerEntry"> | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFilter<"LedgerEntry"> | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFilter<"LedgerEntry"> | $Enums.LedgerSourceType + amount?: DecimalFilter<"LedgerEntry"> | Decimal | DecimalJsLike | number | string + karatPerMille?: IntNullableFilter<"LedgerEntry"> | number | null + pricePerGramRialAtEntry?: DecimalNullableFilter<"LedgerEntry"> | Decimal | DecimalJsLike | number | string | null + orderId?: StringNullableFilter<"LedgerEntry"> | string | null + confirmed?: BoolFilter<"LedgerEntry"> | boolean + confirmedAt?: DateTimeNullableFilter<"LedgerEntry"> | Date | string | null + postedByAdminUserId?: StringNullableFilter<"LedgerEntry"> | string | null + note?: StringNullableFilter<"LedgerEntry"> | string | null + createdAt?: DateTimeFilter<"LedgerEntry"> | Date | string + } + + export type OrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput = { + where: OrderStatusEventWhereUniqueInput + update: XOR + create: XOR + } + + export type OrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput = { + where: OrderStatusEventWhereUniqueInput + data: XOR + } + + export type OrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput = { + where: OrderStatusEventScalarWhereInput + data: XOR + } + + export type OrderStatusEventScalarWhereInput = { + AND?: OrderStatusEventScalarWhereInput | OrderStatusEventScalarWhereInput[] + OR?: OrderStatusEventScalarWhereInput[] + NOT?: OrderStatusEventScalarWhereInput | OrderStatusEventScalarWhereInput[] + id?: StringFilter<"OrderStatusEvent"> | string + orderId?: StringFilter<"OrderStatusEvent"> | string + fromStatus?: EnumOrderStatusNullableFilter<"OrderStatusEvent"> | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFilter<"OrderStatusEvent"> | $Enums.OrderStatus + note?: StringNullableFilter<"OrderStatusEvent"> | string | null + actorAdminUserId?: StringNullableFilter<"OrderStatusEvent"> | string | null + createdAt?: DateTimeFilter<"OrderStatusEvent"> | Date | string + } + + export type PreOrderStatusEventUpsertWithWhereUniqueWithoutActorAdminUserInput = { + where: PreOrderStatusEventWhereUniqueInput + update: XOR + create: XOR + } + + export type PreOrderStatusEventUpdateWithWhereUniqueWithoutActorAdminUserInput = { + where: PreOrderStatusEventWhereUniqueInput + data: XOR + } + + export type PreOrderStatusEventUpdateManyWithWhereWithoutActorAdminUserInput = { + where: PreOrderStatusEventScalarWhereInput + data: XOR + } + + export type PreOrderStatusEventScalarWhereInput = { + AND?: PreOrderStatusEventScalarWhereInput | PreOrderStatusEventScalarWhereInput[] + OR?: PreOrderStatusEventScalarWhereInput[] + NOT?: PreOrderStatusEventScalarWhereInput | PreOrderStatusEventScalarWhereInput[] + id?: StringFilter<"PreOrderStatusEvent"> | string + preOrderId?: StringFilter<"PreOrderStatusEvent"> | string + changes?: JsonFilter<"PreOrderStatusEvent"> + actorAdminUserId?: StringNullableFilter<"PreOrderStatusEvent"> | string | null + ipAddress?: StringNullableFilter<"PreOrderStatusEvent"> | string | null + createdAt?: DateTimeFilter<"PreOrderStatusEvent"> | Date | string + } + + export type CityCreateWithoutCustomersInput = { + id?: string + name: string + province?: string | null + addresses?: CustomerAddressCreateNestedManyWithoutCityInput + branches?: BranchCreateNestedManyWithoutCityInput + preOrders?: PreOrderCreateNestedManyWithoutCityInput + } + + export type CityUncheckedCreateWithoutCustomersInput = { + id?: string + name: string + province?: string | null + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput + branches?: BranchUncheckedCreateNestedManyWithoutCityInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + } + + export type CityCreateOrConnectWithoutCustomersInput = { + where: CityWhereUniqueInput + create: XOR + } + + export type AdminUserCreateWithoutReferredCustomersInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + branch?: BranchCreateNestedOneWithoutAdminUsersInput + postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserUncheckedCreateWithoutReferredCustomersInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserCreateOrConnectWithoutReferredCustomersInput = { + where: AdminUserWhereUniqueInput + create: XOR + } + + export type CustomerAddressCreateWithoutCustomerInput = { + id?: string + addressLine: string + isDefault?: boolean + city?: CityCreateNestedOneWithoutAddressesInput + } + + export type CustomerAddressUncheckedCreateWithoutCustomerInput = { + id?: string + cityId?: string | null + addressLine: string + isDefault?: boolean + } + + export type CustomerAddressCreateOrConnectWithoutCustomerInput = { + where: CustomerAddressWhereUniqueInput + create: XOR + } + + export type CustomerAddressCreateManyCustomerInputEnvelope = { + data: CustomerAddressCreateManyCustomerInput | CustomerAddressCreateManyCustomerInput[] + skipDuplicates?: boolean + } + + export type OrderCreateWithoutCustomerInput = { + id?: string + orderNumber: string + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + branch?: BranchCreateNestedOneWithoutOrdersInput + items?: OrderItemCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderUncheckedCreateWithoutCustomerInput = { + id?: string + orderNumber: string + branchId?: string | null + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderUncheckedCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderCreateOrConnectWithoutCustomerInput = { + where: OrderWhereUniqueInput + create: XOR + } + + export type OrderCreateManyCustomerInputEnvelope = { + data: OrderCreateManyCustomerInput | OrderCreateManyCustomerInput[] + skipDuplicates?: boolean + } + + export type PreOrderCreateWithoutCustomerInput = { + id?: string + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutPreOrdersInput + workshop?: WorkshopCreateNestedOneWithoutPreOrdersInput + convertedOrder?: OrderCreateNestedOneWithoutConvertedFromPreOrderInput + statusEvents?: PreOrderStatusEventCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderUncheckedCreateWithoutCustomerInput = { + id?: string + cityId?: string | null + workshopId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + convertedOrderId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + statusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderCreateOrConnectWithoutCustomerInput = { + where: PreOrderWhereUniqueInput + create: XOR + } + + export type PreOrderCreateManyCustomerInputEnvelope = { + data: PreOrderCreateManyCustomerInput | PreOrderCreateManyCustomerInput[] + skipDuplicates?: boolean + } + + export type LedgerEntryCreateWithoutCustomerInput = { + id?: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + confirmed?: boolean + confirmedAt?: Date | string | null + note?: string | null + createdAt?: Date | string + order?: OrderCreateNestedOneWithoutLedgerEntriesInput + postedByAdminUser?: AdminUserCreateNestedOneWithoutPostedLedgerEntriesInput + } + + export type LedgerEntryUncheckedCreateWithoutCustomerInput = { + id?: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + orderId?: string | null + confirmed?: boolean + confirmedAt?: Date | string | null + postedByAdminUserId?: string | null + note?: string | null + createdAt?: Date | string + } + + export type LedgerEntryCreateOrConnectWithoutCustomerInput = { + where: LedgerEntryWhereUniqueInput + create: XOR + } + + export type LedgerEntryCreateManyCustomerInputEnvelope = { + data: LedgerEntryCreateManyCustomerInput | LedgerEntryCreateManyCustomerInput[] + skipDuplicates?: boolean + } + + export type WalletBonusCreateWithoutCustomerInput = { + id?: string + orderId?: string | null + goldGrams: Decimal | DecimalJsLike | number | string + grantedAt?: Date | string + expiresAt: Date | string + consumedAt?: Date | string | null + isActive?: boolean + } + + export type WalletBonusUncheckedCreateWithoutCustomerInput = { + id?: string + orderId?: string | null + goldGrams: Decimal | DecimalJsLike | number | string + grantedAt?: Date | string + expiresAt: Date | string + consumedAt?: Date | string | null + isActive?: boolean + } + + export type WalletBonusCreateOrConnectWithoutCustomerInput = { + where: WalletBonusWhereUniqueInput + create: XOR + } + + export type WalletBonusCreateManyCustomerInputEnvelope = { + data: WalletBonusCreateManyCustomerInput | WalletBonusCreateManyCustomerInput[] + skipDuplicates?: boolean + } + + export type CityUpsertWithoutCustomersInput = { + update: XOR + create: XOR + where?: CityWhereInput + } + + export type CityUpdateToOneWithWhereWithoutCustomersInput = { + where?: CityWhereInput + data: XOR + } + + export type CityUpdateWithoutCustomersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + addresses?: CustomerAddressUpdateManyWithoutCityNestedInput + branches?: BranchUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUpdateManyWithoutCityNestedInput + } + + export type CityUncheckedUpdateWithoutCustomersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput + branches?: BranchUncheckedUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + } + + export type AdminUserUpsertWithoutReferredCustomersInput = { + update: XOR + create: XOR + where?: AdminUserWhereInput + } + + export type AdminUserUpdateToOneWithWhereWithoutReferredCustomersInput = { + where?: AdminUserWhereInput + data: XOR + } + + export type AdminUserUpdateWithoutReferredCustomersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + branch?: BranchUpdateOneWithoutAdminUsersNestedInput + postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateWithoutReferredCustomersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + } + + export type CustomerAddressUpsertWithWhereUniqueWithoutCustomerInput = { + where: CustomerAddressWhereUniqueInput + update: XOR + create: XOR + } + + export type CustomerAddressUpdateWithWhereUniqueWithoutCustomerInput = { + where: CustomerAddressWhereUniqueInput + data: XOR + } + + export type CustomerAddressUpdateManyWithWhereWithoutCustomerInput = { + where: CustomerAddressScalarWhereInput + data: XOR + } + + export type OrderUpsertWithWhereUniqueWithoutCustomerInput = { + where: OrderWhereUniqueInput + update: XOR + create: XOR + } + + export type OrderUpdateWithWhereUniqueWithoutCustomerInput = { + where: OrderWhereUniqueInput + data: XOR + } + + export type OrderUpdateManyWithWhereWithoutCustomerInput = { + where: OrderScalarWhereInput + data: XOR + } + + export type OrderScalarWhereInput = { + AND?: OrderScalarWhereInput | OrderScalarWhereInput[] + OR?: OrderScalarWhereInput[] + NOT?: OrderScalarWhereInput | OrderScalarWhereInput[] + id?: StringFilter<"Order"> | string + orderNumber?: StringFilter<"Order"> | string + customerId?: StringFilter<"Order"> | string + branchId?: StringNullableFilter<"Order"> | string | null + status?: EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFilter<"Order"> | boolean + deliveredAt?: DateTimeNullableFilter<"Order"> | Date | string | null + createdAt?: DateTimeFilter<"Order"> | Date | string + updatedAt?: DateTimeFilter<"Order"> | Date | string + } + + export type PreOrderUpsertWithWhereUniqueWithoutCustomerInput = { + where: PreOrderWhereUniqueInput + update: XOR + create: XOR + } + + export type PreOrderUpdateWithWhereUniqueWithoutCustomerInput = { + where: PreOrderWhereUniqueInput + data: XOR + } + + export type PreOrderUpdateManyWithWhereWithoutCustomerInput = { + where: PreOrderScalarWhereInput + data: XOR + } + + export type LedgerEntryUpsertWithWhereUniqueWithoutCustomerInput = { + where: LedgerEntryWhereUniqueInput + update: XOR + create: XOR + } + + export type LedgerEntryUpdateWithWhereUniqueWithoutCustomerInput = { + where: LedgerEntryWhereUniqueInput + data: XOR + } + + export type LedgerEntryUpdateManyWithWhereWithoutCustomerInput = { + where: LedgerEntryScalarWhereInput + data: XOR + } + + export type WalletBonusUpsertWithWhereUniqueWithoutCustomerInput = { + where: WalletBonusWhereUniqueInput + update: XOR + create: XOR + } + + export type WalletBonusUpdateWithWhereUniqueWithoutCustomerInput = { + where: WalletBonusWhereUniqueInput + data: XOR + } + + export type WalletBonusUpdateManyWithWhereWithoutCustomerInput = { + where: WalletBonusScalarWhereInput + data: XOR + } + + export type WalletBonusScalarWhereInput = { + AND?: WalletBonusScalarWhereInput | WalletBonusScalarWhereInput[] + OR?: WalletBonusScalarWhereInput[] + NOT?: WalletBonusScalarWhereInput | WalletBonusScalarWhereInput[] + id?: StringFilter<"WalletBonus"> | string + customerId?: StringFilter<"WalletBonus"> | string + orderId?: StringNullableFilter<"WalletBonus"> | string | null + goldGrams?: DecimalFilter<"WalletBonus"> | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFilter<"WalletBonus"> | Date | string + expiresAt?: DateTimeFilter<"WalletBonus"> | Date | string + consumedAt?: DateTimeNullableFilter<"WalletBonus"> | Date | string | null + isActive?: BoolFilter<"WalletBonus"> | boolean + } + + export type CustomerCreateWithoutAddressesInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutAddressesInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutAddressesInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type CityCreateWithoutAddressesInput = { + id?: string + name: string + province?: string | null + customers?: CustomerCreateNestedManyWithoutCityInput + branches?: BranchCreateNestedManyWithoutCityInput + preOrders?: PreOrderCreateNestedManyWithoutCityInput + } + + export type CityUncheckedCreateWithoutAddressesInput = { + id?: string + name: string + province?: string | null + customers?: CustomerUncheckedCreateNestedManyWithoutCityInput + branches?: BranchUncheckedCreateNestedManyWithoutCityInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + } + + export type CityCreateOrConnectWithoutAddressesInput = { + where: CityWhereUniqueInput + create: XOR + } + + export type CustomerUpsertWithoutAddressesInput = { + update: XOR + create: XOR + where?: CustomerWhereInput + } + + export type CustomerUpdateToOneWithWhereWithoutAddressesInput = { + where?: CustomerWhereInput + data: XOR + } + + export type CustomerUpdateWithoutAddressesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutAddressesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type CityUpsertWithoutAddressesInput = { + update: XOR + create: XOR + where?: CityWhereInput + } + + export type CityUpdateToOneWithWhereWithoutAddressesInput = { + where?: CityWhereInput + data: XOR + } + + export type CityUpdateWithoutAddressesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + customers?: CustomerUpdateManyWithoutCityNestedInput + branches?: BranchUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUpdateManyWithoutCityNestedInput + } + + export type CityUncheckedUpdateWithoutAddressesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput + branches?: BranchUncheckedUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + } + + export type CityCreateWithoutBranchesInput = { + id?: string + name: string + province?: string | null + customers?: CustomerCreateNestedManyWithoutCityInput + addresses?: CustomerAddressCreateNestedManyWithoutCityInput + preOrders?: PreOrderCreateNestedManyWithoutCityInput + } + + export type CityUncheckedCreateWithoutBranchesInput = { + id?: string + name: string + province?: string | null + customers?: CustomerUncheckedCreateNestedManyWithoutCityInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + } + + export type CityCreateOrConnectWithoutBranchesInput = { + where: CityWhereUniqueInput + create: XOR + } + + export type AdminUserCreateWithoutBranchInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserUncheckedCreateWithoutBranchInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserCreateOrConnectWithoutBranchInput = { + where: AdminUserWhereUniqueInput + create: XOR + } + + export type AdminUserCreateManyBranchInputEnvelope = { + data: AdminUserCreateManyBranchInput | AdminUserCreateManyBranchInput[] + skipDuplicates?: boolean + } + + export type OrderCreateWithoutBranchInput = { + id?: string + orderNumber: string + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutOrdersInput + items?: OrderItemCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderUncheckedCreateWithoutBranchInput = { + id?: string + orderNumber: string + customerId: string + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderUncheckedCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderCreateOrConnectWithoutBranchInput = { + where: OrderWhereUniqueInput + create: XOR + } + + export type OrderCreateManyBranchInputEnvelope = { + data: OrderCreateManyBranchInput | OrderCreateManyBranchInput[] + skipDuplicates?: boolean + } + + export type CityUpsertWithoutBranchesInput = { + update: XOR + create: XOR + where?: CityWhereInput + } + + export type CityUpdateToOneWithWhereWithoutBranchesInput = { + where?: CityWhereInput + data: XOR + } + + export type CityUpdateWithoutBranchesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + customers?: CustomerUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUpdateManyWithoutCityNestedInput + } + + export type CityUncheckedUpdateWithoutBranchesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + } + + export type AdminUserUpsertWithWhereUniqueWithoutBranchInput = { + where: AdminUserWhereUniqueInput + update: XOR + create: XOR + } + + export type AdminUserUpdateWithWhereUniqueWithoutBranchInput = { + where: AdminUserWhereUniqueInput + data: XOR + } + + export type AdminUserUpdateManyWithWhereWithoutBranchInput = { + where: AdminUserScalarWhereInput + data: XOR + } + + export type AdminUserScalarWhereInput = { + AND?: AdminUserScalarWhereInput | AdminUserScalarWhereInput[] + OR?: AdminUserScalarWhereInput[] + NOT?: AdminUserScalarWhereInput | AdminUserScalarWhereInput[] + id?: StringFilter<"AdminUser"> | string + fullName?: StringFilter<"AdminUser"> | string + mobile?: StringFilter<"AdminUser"> | string + passwordHash?: StringFilter<"AdminUser"> | string + role?: EnumAdminRoleFilter<"AdminUser"> | $Enums.AdminRole + branchId?: StringNullableFilter<"AdminUser"> | string | null + wagePercent?: DecimalNullableFilter<"AdminUser"> | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFilter<"AdminUser"> | boolean + createdAt?: DateTimeFilter<"AdminUser"> | Date | string + } + + export type OrderUpsertWithWhereUniqueWithoutBranchInput = { + where: OrderWhereUniqueInput + update: XOR + create: XOR + } + + export type OrderUpdateWithWhereUniqueWithoutBranchInput = { + where: OrderWhereUniqueInput + data: XOR + } + + export type OrderUpdateManyWithWhereWithoutBranchInput = { + where: OrderScalarWhereInput + data: XOR + } + + export type PreOrderCreateWithoutWorkshopInput = { + id?: string + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutPreOrdersInput + city?: CityCreateNestedOneWithoutPreOrdersInput + convertedOrder?: OrderCreateNestedOneWithoutConvertedFromPreOrderInput + statusEvents?: PreOrderStatusEventCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderUncheckedCreateWithoutWorkshopInput = { + id?: string + customerId: string + cityId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + convertedOrderId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + statusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderCreateOrConnectWithoutWorkshopInput = { + where: PreOrderWhereUniqueInput + create: XOR + } + + export type PreOrderCreateManyWorkshopInputEnvelope = { + data: PreOrderCreateManyWorkshopInput | PreOrderCreateManyWorkshopInput[] + skipDuplicates?: boolean + } + + export type PreOrderUpsertWithWhereUniqueWithoutWorkshopInput = { + where: PreOrderWhereUniqueInput + update: XOR + create: XOR + } + + export type PreOrderUpdateWithWhereUniqueWithoutWorkshopInput = { + where: PreOrderWhereUniqueInput + data: XOR + } + + export type PreOrderUpdateManyWithWhereWithoutWorkshopInput = { + where: PreOrderScalarWhereInput + data: XOR + } + + export type CategoryCreateWithoutChildrenInput = { + id?: string + title: string + parent?: CategoryCreateNestedOneWithoutChildrenInput + products?: ProductCreateNestedManyWithoutCategoryInput + } + + export type CategoryUncheckedCreateWithoutChildrenInput = { + id?: string + title: string + parentId?: string | null + products?: ProductUncheckedCreateNestedManyWithoutCategoryInput + } + + export type CategoryCreateOrConnectWithoutChildrenInput = { + where: CategoryWhereUniqueInput + create: XOR + } + + export type CategoryCreateWithoutParentInput = { + id?: string + title: string + children?: CategoryCreateNestedManyWithoutParentInput + products?: ProductCreateNestedManyWithoutCategoryInput + } + + export type CategoryUncheckedCreateWithoutParentInput = { + id?: string + title: string + children?: CategoryUncheckedCreateNestedManyWithoutParentInput + products?: ProductUncheckedCreateNestedManyWithoutCategoryInput + } + + export type CategoryCreateOrConnectWithoutParentInput = { + where: CategoryWhereUniqueInput + create: XOR + } + + export type CategoryCreateManyParentInputEnvelope = { + data: CategoryCreateManyParentInput | CategoryCreateManyParentInput[] + skipDuplicates?: boolean + } + + export type ProductCreateWithoutCategoryInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + brand?: BrandCreateNestedOneWithoutProductsInput + variants?: ProductVariantCreateNestedManyWithoutProductInput + images?: ProductImageCreateNestedManyWithoutProductInput + collections?: CollectionProductCreateNestedManyWithoutProductInput + } + + export type ProductUncheckedCreateWithoutCategoryInput = { + id?: string + title: string + description?: string | null + brandId?: string | null + isActive?: boolean + createdAt?: Date | string + variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput + images?: ProductImageUncheckedCreateNestedManyWithoutProductInput + collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput + } + + export type ProductCreateOrConnectWithoutCategoryInput = { + where: ProductWhereUniqueInput + create: XOR + } + + export type ProductCreateManyCategoryInputEnvelope = { + data: ProductCreateManyCategoryInput | ProductCreateManyCategoryInput[] + skipDuplicates?: boolean + } + + export type CategoryUpsertWithoutChildrenInput = { + update: XOR + create: XOR + where?: CategoryWhereInput + } + + export type CategoryUpdateToOneWithWhereWithoutChildrenInput = { + where?: CategoryWhereInput + data: XOR + } + + export type CategoryUpdateWithoutChildrenInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + parent?: CategoryUpdateOneWithoutChildrenNestedInput + products?: ProductUpdateManyWithoutCategoryNestedInput + } + + export type CategoryUncheckedUpdateWithoutChildrenInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + parentId?: NullableStringFieldUpdateOperationsInput | string | null + products?: ProductUncheckedUpdateManyWithoutCategoryNestedInput + } + + export type CategoryUpsertWithWhereUniqueWithoutParentInput = { + where: CategoryWhereUniqueInput + update: XOR + create: XOR + } + + export type CategoryUpdateWithWhereUniqueWithoutParentInput = { + where: CategoryWhereUniqueInput + data: XOR + } + + export type CategoryUpdateManyWithWhereWithoutParentInput = { + where: CategoryScalarWhereInput + data: XOR + } + + export type CategoryScalarWhereInput = { + AND?: CategoryScalarWhereInput | CategoryScalarWhereInput[] + OR?: CategoryScalarWhereInput[] + NOT?: CategoryScalarWhereInput | CategoryScalarWhereInput[] + id?: StringFilter<"Category"> | string + title?: StringFilter<"Category"> | string + parentId?: StringNullableFilter<"Category"> | string | null + } + + export type ProductUpsertWithWhereUniqueWithoutCategoryInput = { + where: ProductWhereUniqueInput + update: XOR + create: XOR + } + + export type ProductUpdateWithWhereUniqueWithoutCategoryInput = { + where: ProductWhereUniqueInput + data: XOR + } + + export type ProductUpdateManyWithWhereWithoutCategoryInput = { + where: ProductScalarWhereInput + data: XOR + } + + export type ProductScalarWhereInput = { + AND?: ProductScalarWhereInput | ProductScalarWhereInput[] + OR?: ProductScalarWhereInput[] + NOT?: ProductScalarWhereInput | ProductScalarWhereInput[] + id?: StringFilter<"Product"> | string + title?: StringFilter<"Product"> | string + description?: StringNullableFilter<"Product"> | string | null + categoryId?: StringNullableFilter<"Product"> | string | null + brandId?: StringNullableFilter<"Product"> | string | null + isActive?: BoolFilter<"Product"> | boolean + createdAt?: DateTimeFilter<"Product"> | Date | string + } + + export type ProductCreateWithoutBrandInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + category?: CategoryCreateNestedOneWithoutProductsInput + variants?: ProductVariantCreateNestedManyWithoutProductInput + images?: ProductImageCreateNestedManyWithoutProductInput + collections?: CollectionProductCreateNestedManyWithoutProductInput + } + + export type ProductUncheckedCreateWithoutBrandInput = { + id?: string + title: string + description?: string | null + categoryId?: string | null + isActive?: boolean + createdAt?: Date | string + variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput + images?: ProductImageUncheckedCreateNestedManyWithoutProductInput + collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput + } + + export type ProductCreateOrConnectWithoutBrandInput = { + where: ProductWhereUniqueInput + create: XOR + } + + export type ProductCreateManyBrandInputEnvelope = { + data: ProductCreateManyBrandInput | ProductCreateManyBrandInput[] + skipDuplicates?: boolean + } + + export type ProductUpsertWithWhereUniqueWithoutBrandInput = { + where: ProductWhereUniqueInput + update: XOR + create: XOR + } + + export type ProductUpdateWithWhereUniqueWithoutBrandInput = { + where: ProductWhereUniqueInput + data: XOR + } + + export type ProductUpdateManyWithWhereWithoutBrandInput = { + where: ProductScalarWhereInput + data: XOR + } + + export type CollectionProductCreateWithoutCollectionInput = { + product: ProductCreateNestedOneWithoutCollectionsInput + } + + export type CollectionProductUncheckedCreateWithoutCollectionInput = { + productId: string + } + + export type CollectionProductCreateOrConnectWithoutCollectionInput = { + where: CollectionProductWhereUniqueInput + create: XOR + } + + export type CollectionProductCreateManyCollectionInputEnvelope = { + data: CollectionProductCreateManyCollectionInput | CollectionProductCreateManyCollectionInput[] + skipDuplicates?: boolean + } + + export type CollectionProductUpsertWithWhereUniqueWithoutCollectionInput = { + where: CollectionProductWhereUniqueInput + update: XOR + create: XOR + } + + export type CollectionProductUpdateWithWhereUniqueWithoutCollectionInput = { + where: CollectionProductWhereUniqueInput + data: XOR + } + + export type CollectionProductUpdateManyWithWhereWithoutCollectionInput = { + where: CollectionProductScalarWhereInput + data: XOR + } + + export type CollectionProductScalarWhereInput = { + AND?: CollectionProductScalarWhereInput | CollectionProductScalarWhereInput[] + OR?: CollectionProductScalarWhereInput[] + NOT?: CollectionProductScalarWhereInput | CollectionProductScalarWhereInput[] + collectionId?: StringFilter<"CollectionProduct"> | string + productId?: StringFilter<"CollectionProduct"> | string + } + + export type CollectionCreateWithoutProductsInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + } + + export type CollectionUncheckedCreateWithoutProductsInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + } + + export type CollectionCreateOrConnectWithoutProductsInput = { + where: CollectionWhereUniqueInput + create: XOR + } + + export type ProductCreateWithoutCollectionsInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + category?: CategoryCreateNestedOneWithoutProductsInput + brand?: BrandCreateNestedOneWithoutProductsInput + variants?: ProductVariantCreateNestedManyWithoutProductInput + images?: ProductImageCreateNestedManyWithoutProductInput + } + + export type ProductUncheckedCreateWithoutCollectionsInput = { + id?: string + title: string + description?: string | null + categoryId?: string | null + brandId?: string | null + isActive?: boolean + createdAt?: Date | string + variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput + images?: ProductImageUncheckedCreateNestedManyWithoutProductInput + } + + export type ProductCreateOrConnectWithoutCollectionsInput = { + where: ProductWhereUniqueInput + create: XOR + } + + export type CollectionUpsertWithoutProductsInput = { + update: XOR + create: XOR + where?: CollectionWhereInput + } + + export type CollectionUpdateToOneWithWhereWithoutProductsInput = { + where?: CollectionWhereInput + data: XOR + } + + export type CollectionUpdateWithoutProductsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type CollectionUncheckedUpdateWithoutProductsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type ProductUpsertWithoutCollectionsInput = { + update: XOR + create: XOR + where?: ProductWhereInput + } + + export type ProductUpdateToOneWithWhereWithoutCollectionsInput = { + where?: ProductWhereInput + data: XOR + } + + export type ProductUpdateWithoutCollectionsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + category?: CategoryUpdateOneWithoutProductsNestedInput + brand?: BrandUpdateOneWithoutProductsNestedInput + variants?: ProductVariantUpdateManyWithoutProductNestedInput + images?: ProductImageUpdateManyWithoutProductNestedInput + } + + export type ProductUncheckedUpdateWithoutCollectionsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + categoryId?: NullableStringFieldUpdateOperationsInput | string | null + brandId?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput + images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput + } + + export type CategoryCreateWithoutProductsInput = { + id?: string + title: string + parent?: CategoryCreateNestedOneWithoutChildrenInput + children?: CategoryCreateNestedManyWithoutParentInput + } + + export type CategoryUncheckedCreateWithoutProductsInput = { + id?: string + title: string + parentId?: string | null + children?: CategoryUncheckedCreateNestedManyWithoutParentInput + } + + export type CategoryCreateOrConnectWithoutProductsInput = { + where: CategoryWhereUniqueInput + create: XOR + } + + export type BrandCreateWithoutProductsInput = { + id?: string + title: string + } + + export type BrandUncheckedCreateWithoutProductsInput = { + id?: string + title: string + } + + export type BrandCreateOrConnectWithoutProductsInput = { + where: BrandWhereUniqueInput + create: XOR + } + + export type ProductVariantCreateWithoutProductInput = { + id?: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + isActive?: boolean + orderItems?: OrderItemCreateNestedManyWithoutProductVariantInput + } + + export type ProductVariantUncheckedCreateWithoutProductInput = { + id?: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + isActive?: boolean + orderItems?: OrderItemUncheckedCreateNestedManyWithoutProductVariantInput + } + + export type ProductVariantCreateOrConnectWithoutProductInput = { + where: ProductVariantWhereUniqueInput + create: XOR + } + + export type ProductVariantCreateManyProductInputEnvelope = { + data: ProductVariantCreateManyProductInput | ProductVariantCreateManyProductInput[] + skipDuplicates?: boolean + } + + export type ProductImageCreateWithoutProductInput = { + id?: string + url: string + sortOrder?: number + } + + export type ProductImageUncheckedCreateWithoutProductInput = { + id?: string + url: string + sortOrder?: number + } + + export type ProductImageCreateOrConnectWithoutProductInput = { + where: ProductImageWhereUniqueInput + create: XOR + } + + export type ProductImageCreateManyProductInputEnvelope = { + data: ProductImageCreateManyProductInput | ProductImageCreateManyProductInput[] + skipDuplicates?: boolean + } + + export type CollectionProductCreateWithoutProductInput = { + collection: CollectionCreateNestedOneWithoutProductsInput + } + + export type CollectionProductUncheckedCreateWithoutProductInput = { + collectionId: string + } + + export type CollectionProductCreateOrConnectWithoutProductInput = { + where: CollectionProductWhereUniqueInput + create: XOR + } + + export type CollectionProductCreateManyProductInputEnvelope = { + data: CollectionProductCreateManyProductInput | CollectionProductCreateManyProductInput[] + skipDuplicates?: boolean + } + + export type CategoryUpsertWithoutProductsInput = { + update: XOR + create: XOR + where?: CategoryWhereInput + } + + export type CategoryUpdateToOneWithWhereWithoutProductsInput = { + where?: CategoryWhereInput + data: XOR + } + + export type CategoryUpdateWithoutProductsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + parent?: CategoryUpdateOneWithoutChildrenNestedInput + children?: CategoryUpdateManyWithoutParentNestedInput + } + + export type CategoryUncheckedUpdateWithoutProductsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + parentId?: NullableStringFieldUpdateOperationsInput | string | null + children?: CategoryUncheckedUpdateManyWithoutParentNestedInput + } + + export type BrandUpsertWithoutProductsInput = { + update: XOR + create: XOR + where?: BrandWhereInput + } + + export type BrandUpdateToOneWithWhereWithoutProductsInput = { + where?: BrandWhereInput + data: XOR + } + + export type BrandUpdateWithoutProductsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + } + + export type BrandUncheckedUpdateWithoutProductsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + } + + export type ProductVariantUpsertWithWhereUniqueWithoutProductInput = { + where: ProductVariantWhereUniqueInput + update: XOR + create: XOR + } + + export type ProductVariantUpdateWithWhereUniqueWithoutProductInput = { + where: ProductVariantWhereUniqueInput + data: XOR + } + + export type ProductVariantUpdateManyWithWhereWithoutProductInput = { + where: ProductVariantScalarWhereInput + data: XOR + } + + export type ProductVariantScalarWhereInput = { + AND?: ProductVariantScalarWhereInput | ProductVariantScalarWhereInput[] + OR?: ProductVariantScalarWhereInput[] + NOT?: ProductVariantScalarWhereInput | ProductVariantScalarWhereInput[] + id?: StringFilter<"ProductVariant"> | string + productId?: StringFilter<"ProductVariant"> | string + title?: StringFilter<"ProductVariant"> | string + sku?: StringNullableFilter<"ProductVariant"> | string | null + rashWeightGrams?: DecimalFilter<"ProductVariant"> | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFilter<"ProductVariant"> | Decimal | DecimalJsLike | number | string + isActive?: BoolFilter<"ProductVariant"> | boolean + } + + export type ProductImageUpsertWithWhereUniqueWithoutProductInput = { + where: ProductImageWhereUniqueInput + update: XOR + create: XOR + } + + export type ProductImageUpdateWithWhereUniqueWithoutProductInput = { + where: ProductImageWhereUniqueInput + data: XOR + } + + export type ProductImageUpdateManyWithWhereWithoutProductInput = { + where: ProductImageScalarWhereInput + data: XOR + } + + export type ProductImageScalarWhereInput = { + AND?: ProductImageScalarWhereInput | ProductImageScalarWhereInput[] + OR?: ProductImageScalarWhereInput[] + NOT?: ProductImageScalarWhereInput | ProductImageScalarWhereInput[] + id?: StringFilter<"ProductImage"> | string + productId?: StringFilter<"ProductImage"> | string + url?: StringFilter<"ProductImage"> | string + sortOrder?: IntFilter<"ProductImage"> | number + } + + export type CollectionProductUpsertWithWhereUniqueWithoutProductInput = { + where: CollectionProductWhereUniqueInput + update: XOR + create: XOR + } + + export type CollectionProductUpdateWithWhereUniqueWithoutProductInput = { + where: CollectionProductWhereUniqueInput + data: XOR + } + + export type CollectionProductUpdateManyWithWhereWithoutProductInput = { + where: CollectionProductScalarWhereInput + data: XOR + } + + export type ProductCreateWithoutImagesInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + category?: CategoryCreateNestedOneWithoutProductsInput + brand?: BrandCreateNestedOneWithoutProductsInput + variants?: ProductVariantCreateNestedManyWithoutProductInput + collections?: CollectionProductCreateNestedManyWithoutProductInput + } + + export type ProductUncheckedCreateWithoutImagesInput = { + id?: string + title: string + description?: string | null + categoryId?: string | null + brandId?: string | null + isActive?: boolean + createdAt?: Date | string + variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput + collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput + } + + export type ProductCreateOrConnectWithoutImagesInput = { + where: ProductWhereUniqueInput + create: XOR + } + + export type ProductUpsertWithoutImagesInput = { + update: XOR + create: XOR + where?: ProductWhereInput + } + + export type ProductUpdateToOneWithWhereWithoutImagesInput = { + where?: ProductWhereInput + data: XOR + } + + export type ProductUpdateWithoutImagesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + category?: CategoryUpdateOneWithoutProductsNestedInput + brand?: BrandUpdateOneWithoutProductsNestedInput + variants?: ProductVariantUpdateManyWithoutProductNestedInput + collections?: CollectionProductUpdateManyWithoutProductNestedInput + } + + export type ProductUncheckedUpdateWithoutImagesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + categoryId?: NullableStringFieldUpdateOperationsInput | string | null + brandId?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput + collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput + } + + export type ProductCreateWithoutVariantsInput = { + id?: string + title: string + description?: string | null + isActive?: boolean + createdAt?: Date | string + category?: CategoryCreateNestedOneWithoutProductsInput + brand?: BrandCreateNestedOneWithoutProductsInput + images?: ProductImageCreateNestedManyWithoutProductInput + collections?: CollectionProductCreateNestedManyWithoutProductInput + } + + export type ProductUncheckedCreateWithoutVariantsInput = { + id?: string + title: string + description?: string | null + categoryId?: string | null + brandId?: string | null + isActive?: boolean + createdAt?: Date | string + images?: ProductImageUncheckedCreateNestedManyWithoutProductInput + collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput + } + + export type ProductCreateOrConnectWithoutVariantsInput = { + where: ProductWhereUniqueInput + create: XOR + } + + export type OrderItemCreateWithoutProductVariantInput = { + id?: string + quantity: number + rashWeightGramsSnapshot: Decimal | DecimalJsLike | number | string + wagePercentSnapshot: Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: Decimal | DecimalJsLike | number | string + computedWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + order: OrderCreateNestedOneWithoutItemsInput + } + + export type OrderItemUncheckedCreateWithoutProductVariantInput = { + id?: string + orderId: string + quantity: number + rashWeightGramsSnapshot: Decimal | DecimalJsLike | number | string + wagePercentSnapshot: Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: Decimal | DecimalJsLike | number | string + computedWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + } + + export type OrderItemCreateOrConnectWithoutProductVariantInput = { + where: OrderItemWhereUniqueInput + create: XOR + } + + export type OrderItemCreateManyProductVariantInputEnvelope = { + data: OrderItemCreateManyProductVariantInput | OrderItemCreateManyProductVariantInput[] + skipDuplicates?: boolean + } + + export type ProductUpsertWithoutVariantsInput = { + update: XOR + create: XOR + where?: ProductWhereInput + } + + export type ProductUpdateToOneWithWhereWithoutVariantsInput = { + where?: ProductWhereInput + data: XOR + } + + export type ProductUpdateWithoutVariantsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + category?: CategoryUpdateOneWithoutProductsNestedInput + brand?: BrandUpdateOneWithoutProductsNestedInput + images?: ProductImageUpdateManyWithoutProductNestedInput + collections?: CollectionProductUpdateManyWithoutProductNestedInput + } + + export type ProductUncheckedUpdateWithoutVariantsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + categoryId?: NullableStringFieldUpdateOperationsInput | string | null + brandId?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput + collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput + } + + export type OrderItemUpsertWithWhereUniqueWithoutProductVariantInput = { + where: OrderItemWhereUniqueInput + update: XOR + create: XOR + } + + export type OrderItemUpdateWithWhereUniqueWithoutProductVariantInput = { + where: OrderItemWhereUniqueInput + data: XOR + } + + export type OrderItemUpdateManyWithWhereWithoutProductVariantInput = { + where: OrderItemScalarWhereInput + data: XOR + } + + export type OrderItemScalarWhereInput = { + AND?: OrderItemScalarWhereInput | OrderItemScalarWhereInput[] + OR?: OrderItemScalarWhereInput[] + NOT?: OrderItemScalarWhereInput | OrderItemScalarWhereInput[] + id?: StringFilter<"OrderItem"> | string + orderId?: StringFilter<"OrderItem"> | string + productVariantId?: StringFilter<"OrderItem"> | string + quantity?: IntFilter<"OrderItem"> | number + rashWeightGramsSnapshot?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFilter<"OrderItem"> | Decimal | DecimalJsLike | number | string + } + + export type CustomerCreateWithoutOrdersInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutOrdersInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutOrdersInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type BranchCreateWithoutOrdersInput = { + id?: string + name: string + city?: CityCreateNestedOneWithoutBranchesInput + adminUsers?: AdminUserCreateNestedManyWithoutBranchInput + } + + export type BranchUncheckedCreateWithoutOrdersInput = { + id?: string + name: string + cityId?: string | null + adminUsers?: AdminUserUncheckedCreateNestedManyWithoutBranchInput + } + + export type BranchCreateOrConnectWithoutOrdersInput = { + where: BranchWhereUniqueInput + create: XOR + } + + export type OrderItemCreateWithoutOrderInput = { + id?: string + quantity: number + rashWeightGramsSnapshot: Decimal | DecimalJsLike | number | string + wagePercentSnapshot: Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: Decimal | DecimalJsLike | number | string + computedWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + productVariant: ProductVariantCreateNestedOneWithoutOrderItemsInput + } + + export type OrderItemUncheckedCreateWithoutOrderInput = { + id?: string + productVariantId: string + quantity: number + rashWeightGramsSnapshot: Decimal | DecimalJsLike | number | string + wagePercentSnapshot: Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: Decimal | DecimalJsLike | number | string + computedWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + } + + export type OrderItemCreateOrConnectWithoutOrderInput = { + where: OrderItemWhereUniqueInput + create: XOR + } + + export type OrderItemCreateManyOrderInputEnvelope = { + data: OrderItemCreateManyOrderInput | OrderItemCreateManyOrderInput[] + skipDuplicates?: boolean + } + + export type OrderStatusEventCreateWithoutOrderInput = { + id?: string + fromStatus?: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note?: string | null + createdAt?: Date | string + actorAdminUser?: AdminUserCreateNestedOneWithoutOrderStatusEventsInput + } + + export type OrderStatusEventUncheckedCreateWithoutOrderInput = { + id?: string + fromStatus?: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note?: string | null + actorAdminUserId?: string | null + createdAt?: Date | string + } + + export type OrderStatusEventCreateOrConnectWithoutOrderInput = { + where: OrderStatusEventWhereUniqueInput + create: XOR + } + + export type OrderStatusEventCreateManyOrderInputEnvelope = { + data: OrderStatusEventCreateManyOrderInput | OrderStatusEventCreateManyOrderInput[] + skipDuplicates?: boolean + } + + export type LedgerEntryCreateWithoutOrderInput = { + id?: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + confirmed?: boolean + confirmedAt?: Date | string | null + note?: string | null + createdAt?: Date | string + customer: CustomerCreateNestedOneWithoutLedgerEntriesInput + postedByAdminUser?: AdminUserCreateNestedOneWithoutPostedLedgerEntriesInput + } + + export type LedgerEntryUncheckedCreateWithoutOrderInput = { + id?: string + customerId: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + confirmed?: boolean + confirmedAt?: Date | string | null + postedByAdminUserId?: string | null + note?: string | null + createdAt?: Date | string + } + + export type LedgerEntryCreateOrConnectWithoutOrderInput = { + where: LedgerEntryWhereUniqueInput + create: XOR + } + + export type LedgerEntryCreateManyOrderInputEnvelope = { + data: LedgerEntryCreateManyOrderInput | LedgerEntryCreateManyOrderInput[] + skipDuplicates?: boolean + } + + export type PreOrderCreateWithoutConvertedOrderInput = { + id?: string + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutPreOrdersInput + city?: CityCreateNestedOneWithoutPreOrdersInput + workshop?: WorkshopCreateNestedOneWithoutPreOrdersInput + statusEvents?: PreOrderStatusEventCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderUncheckedCreateWithoutConvertedOrderInput = { + id?: string + customerId: string + cityId?: string | null + workshopId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + statusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutPreOrderInput + } + + export type PreOrderCreateOrConnectWithoutConvertedOrderInput = { + where: PreOrderWhereUniqueInput + create: XOR + } + + export type CustomerUpsertWithoutOrdersInput = { + update: XOR + create: XOR + where?: CustomerWhereInput + } + + export type CustomerUpdateToOneWithWhereWithoutOrdersInput = { + where?: CustomerWhereInput + data: XOR + } + + export type CustomerUpdateWithoutOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type BranchUpsertWithoutOrdersInput = { + update: XOR + create: XOR + where?: BranchWhereInput + } + + export type BranchUpdateToOneWithWhereWithoutOrdersInput = { + where?: BranchWhereInput + data: XOR + } + + export type BranchUpdateWithoutOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + city?: CityUpdateOneWithoutBranchesNestedInput + adminUsers?: AdminUserUpdateManyWithoutBranchNestedInput + } + + export type BranchUncheckedUpdateWithoutOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + adminUsers?: AdminUserUncheckedUpdateManyWithoutBranchNestedInput + } + + export type OrderItemUpsertWithWhereUniqueWithoutOrderInput = { + where: OrderItemWhereUniqueInput + update: XOR + create: XOR + } + + export type OrderItemUpdateWithWhereUniqueWithoutOrderInput = { + where: OrderItemWhereUniqueInput + data: XOR + } + + export type OrderItemUpdateManyWithWhereWithoutOrderInput = { + where: OrderItemScalarWhereInput + data: XOR + } + + export type OrderStatusEventUpsertWithWhereUniqueWithoutOrderInput = { + where: OrderStatusEventWhereUniqueInput + update: XOR + create: XOR + } + + export type OrderStatusEventUpdateWithWhereUniqueWithoutOrderInput = { + where: OrderStatusEventWhereUniqueInput + data: XOR + } + + export type OrderStatusEventUpdateManyWithWhereWithoutOrderInput = { + where: OrderStatusEventScalarWhereInput + data: XOR + } + + export type LedgerEntryUpsertWithWhereUniqueWithoutOrderInput = { + where: LedgerEntryWhereUniqueInput + update: XOR + create: XOR + } + + export type LedgerEntryUpdateWithWhereUniqueWithoutOrderInput = { + where: LedgerEntryWhereUniqueInput + data: XOR + } + + export type LedgerEntryUpdateManyWithWhereWithoutOrderInput = { + where: LedgerEntryScalarWhereInput + data: XOR + } + + export type PreOrderUpsertWithoutConvertedOrderInput = { + update: XOR + create: XOR + where?: PreOrderWhereInput + } + + export type PreOrderUpdateToOneWithWhereWithoutConvertedOrderInput = { + where?: PreOrderWhereInput + data: XOR + } + + export type PreOrderUpdateWithoutConvertedOrderInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutPreOrdersNestedInput + city?: CityUpdateOneWithoutPreOrdersNestedInput + workshop?: WorkshopUpdateOneWithoutPreOrdersNestedInput + statusEvents?: PreOrderStatusEventUpdateManyWithoutPreOrderNestedInput + } + + export type PreOrderUncheckedUpdateWithoutConvertedOrderInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + workshopId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + statusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutPreOrderNestedInput + } + + export type OrderCreateWithoutItemsInput = { + id?: string + orderNumber: string + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutOrdersInput + branch?: BranchCreateNestedOneWithoutOrdersInput + statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderUncheckedCreateWithoutItemsInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + statusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderUncheckedCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderCreateOrConnectWithoutItemsInput = { + where: OrderWhereUniqueInput + create: XOR + } + + export type ProductVariantCreateWithoutOrderItemsInput = { + id?: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + isActive?: boolean + product: ProductCreateNestedOneWithoutVariantsInput + } + + export type ProductVariantUncheckedCreateWithoutOrderItemsInput = { + id?: string + productId: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + isActive?: boolean + } + + export type ProductVariantCreateOrConnectWithoutOrderItemsInput = { + where: ProductVariantWhereUniqueInput + create: XOR + } + + export type OrderUpsertWithoutItemsInput = { + update: XOR + create: XOR + where?: OrderWhereInput + } + + export type OrderUpdateToOneWithWhereWithoutItemsInput = { + where?: OrderWhereInput + data: XOR + } + + export type OrderUpdateWithoutItemsInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput + branch?: BranchUpdateOneWithoutOrdersNestedInput + statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateWithoutItemsInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + statusEvents?: OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUncheckedUpdateOneWithoutConvertedOrderNestedInput + } + + export type ProductVariantUpsertWithoutOrderItemsInput = { + update: XOR + create: XOR + where?: ProductVariantWhereInput + } + + export type ProductVariantUpdateToOneWithWhereWithoutOrderItemsInput = { + where?: ProductVariantWhereInput + data: XOR + } + + export type ProductVariantUpdateWithoutOrderItemsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isActive?: BoolFieldUpdateOperationsInput | boolean + product?: ProductUpdateOneRequiredWithoutVariantsNestedInput + } + + export type ProductVariantUncheckedUpdateWithoutOrderItemsInput = { + id?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type OrderCreateWithoutStatusEventsInput = { + id?: string + orderNumber: string + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutOrdersInput + branch?: BranchCreateNestedOneWithoutOrdersInput + items?: OrderItemCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderUncheckedCreateWithoutStatusEventsInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderUncheckedCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderCreateOrConnectWithoutStatusEventsInput = { + where: OrderWhereUniqueInput + create: XOR + } + + export type AdminUserCreateWithoutOrderStatusEventsInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + branch?: BranchCreateNestedOneWithoutAdminUsersInput + referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserUncheckedCreateWithoutOrderStatusEventsInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserCreateOrConnectWithoutOrderStatusEventsInput = { + where: AdminUserWhereUniqueInput + create: XOR + } + + export type OrderUpsertWithoutStatusEventsInput = { + update: XOR + create: XOR + where?: OrderWhereInput + } + + export type OrderUpdateToOneWithWhereWithoutStatusEventsInput = { + where?: OrderWhereInput + data: XOR + } + + export type OrderUpdateWithoutStatusEventsInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput + branch?: BranchUpdateOneWithoutOrdersNestedInput + items?: OrderItemUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateWithoutStatusEventsInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUncheckedUpdateOneWithoutConvertedOrderNestedInput + } + + export type AdminUserUpsertWithoutOrderStatusEventsInput = { + update: XOR + create: XOR + where?: AdminUserWhereInput + } + + export type AdminUserUpdateToOneWithWhereWithoutOrderStatusEventsInput = { + where?: AdminUserWhereInput + data: XOR + } + + export type AdminUserUpdateWithoutOrderStatusEventsInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + branch?: BranchUpdateOneWithoutAdminUsersNestedInput + referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateWithoutOrderStatusEventsInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + } + + export type CustomerCreateWithoutPreOrdersInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + orders?: OrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutPreOrdersInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutPreOrdersInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type CityCreateWithoutPreOrdersInput = { + id?: string + name: string + province?: string | null + customers?: CustomerCreateNestedManyWithoutCityInput + addresses?: CustomerAddressCreateNestedManyWithoutCityInput + branches?: BranchCreateNestedManyWithoutCityInput + } + + export type CityUncheckedCreateWithoutPreOrdersInput = { + id?: string + name: string + province?: string | null + customers?: CustomerUncheckedCreateNestedManyWithoutCityInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput + branches?: BranchUncheckedCreateNestedManyWithoutCityInput + } + + export type CityCreateOrConnectWithoutPreOrdersInput = { + where: CityWhereUniqueInput + create: XOR + } + + export type WorkshopCreateWithoutPreOrdersInput = { + id?: string + name: string + isActive?: boolean + } + + export type WorkshopUncheckedCreateWithoutPreOrdersInput = { + id?: string + name: string + isActive?: boolean + } + + export type WorkshopCreateOrConnectWithoutPreOrdersInput = { + where: WorkshopWhereUniqueInput + create: XOR + } + + export type OrderCreateWithoutConvertedFromPreOrderInput = { + id?: string + orderNumber: string + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutOrdersInput + branch?: BranchCreateNestedOneWithoutOrdersInput + items?: OrderItemCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput + } + + export type OrderUncheckedCreateWithoutConvertedFromPreOrderInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutOrderInput + } + + export type OrderCreateOrConnectWithoutConvertedFromPreOrderInput = { + where: OrderWhereUniqueInput + create: XOR + } + + export type PreOrderStatusEventCreateWithoutPreOrderInput = { + id?: string + changes: JsonNullValueInput | InputJsonValue + ipAddress?: string | null + createdAt?: Date | string + actorAdminUser?: AdminUserCreateNestedOneWithoutPreOrderStatusEventsInput + } + + export type PreOrderStatusEventUncheckedCreateWithoutPreOrderInput = { + id?: string + changes: JsonNullValueInput | InputJsonValue + actorAdminUserId?: string | null + ipAddress?: string | null + createdAt?: Date | string + } + + export type PreOrderStatusEventCreateOrConnectWithoutPreOrderInput = { + where: PreOrderStatusEventWhereUniqueInput + create: XOR + } + + export type PreOrderStatusEventCreateManyPreOrderInputEnvelope = { + data: PreOrderStatusEventCreateManyPreOrderInput | PreOrderStatusEventCreateManyPreOrderInput[] + skipDuplicates?: boolean + } + + export type CustomerUpsertWithoutPreOrdersInput = { + update: XOR + create: XOR + where?: CustomerWhereInput + } + + export type CustomerUpdateToOneWithWhereWithoutPreOrdersInput = { + where?: CustomerWhereInput + data: XOR + } + + export type CustomerUpdateWithoutPreOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutPreOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type CityUpsertWithoutPreOrdersInput = { + update: XOR + create: XOR + where?: CityWhereInput + } + + export type CityUpdateToOneWithWhereWithoutPreOrdersInput = { + where?: CityWhereInput + data: XOR + } + + export type CityUpdateWithoutPreOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + customers?: CustomerUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUpdateManyWithoutCityNestedInput + branches?: BranchUpdateManyWithoutCityNestedInput + } + + export type CityUncheckedUpdateWithoutPreOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + province?: NullableStringFieldUpdateOperationsInput | string | null + customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput + branches?: BranchUncheckedUpdateManyWithoutCityNestedInput + } + + export type WorkshopUpsertWithoutPreOrdersInput = { + update: XOR + create: XOR + where?: WorkshopWhereInput + } + + export type WorkshopUpdateToOneWithWhereWithoutPreOrdersInput = { + where?: WorkshopWhereInput + data: XOR + } + + export type WorkshopUpdateWithoutPreOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type WorkshopUncheckedUpdateWithoutPreOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type OrderUpsertWithoutConvertedFromPreOrderInput = { + update: XOR + create: XOR + where?: OrderWhereInput + } + + export type OrderUpdateToOneWithWhereWithoutConvertedFromPreOrderInput = { + where?: OrderWhereInput + data: XOR + } + + export type OrderUpdateWithoutConvertedFromPreOrderInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput + branch?: BranchUpdateOneWithoutOrdersNestedInput + items?: OrderItemUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput + } + + export type OrderUncheckedUpdateWithoutConvertedFromPreOrderInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutOrderNestedInput + } + + export type PreOrderStatusEventUpsertWithWhereUniqueWithoutPreOrderInput = { + where: PreOrderStatusEventWhereUniqueInput + update: XOR + create: XOR + } + + export type PreOrderStatusEventUpdateWithWhereUniqueWithoutPreOrderInput = { + where: PreOrderStatusEventWhereUniqueInput + data: XOR + } + + export type PreOrderStatusEventUpdateManyWithWhereWithoutPreOrderInput = { + where: PreOrderStatusEventScalarWhereInput + data: XOR + } + + export type PreOrderCreateWithoutStatusEventsInput = { + id?: string + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutPreOrdersInput + city?: CityCreateNestedOneWithoutPreOrdersInput + workshop?: WorkshopCreateNestedOneWithoutPreOrdersInput + convertedOrder?: OrderCreateNestedOneWithoutConvertedFromPreOrderInput + } + + export type PreOrderUncheckedCreateWithoutStatusEventsInput = { + id?: string + customerId: string + cityId?: string | null + workshopId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + convertedOrderId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PreOrderCreateOrConnectWithoutStatusEventsInput = { + where: PreOrderWhereUniqueInput + create: XOR + } + + export type AdminUserCreateWithoutPreOrderStatusEventsInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + branch?: BranchCreateNestedOneWithoutAdminUsersInput + referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserUncheckedCreateWithoutPreOrderStatusEventsInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserCreateOrConnectWithoutPreOrderStatusEventsInput = { + where: AdminUserWhereUniqueInput + create: XOR + } + + export type PreOrderUpsertWithoutStatusEventsInput = { + update: XOR + create: XOR + where?: PreOrderWhereInput + } + + export type PreOrderUpdateToOneWithWhereWithoutStatusEventsInput = { + where?: PreOrderWhereInput + data: XOR + } + + export type PreOrderUpdateWithoutStatusEventsInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutPreOrdersNestedInput + city?: CityUpdateOneWithoutPreOrdersNestedInput + workshop?: WorkshopUpdateOneWithoutPreOrdersNestedInput + convertedOrder?: OrderUpdateOneWithoutConvertedFromPreOrderNestedInput + } + + export type PreOrderUncheckedUpdateWithoutStatusEventsInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + workshopId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + convertedOrderId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AdminUserUpsertWithoutPreOrderStatusEventsInput = { + update: XOR + create: XOR + where?: AdminUserWhereInput + } + + export type AdminUserUpdateToOneWithWhereWithoutPreOrderStatusEventsInput = { + where?: AdminUserWhereInput + data: XOR + } + + export type AdminUserUpdateWithoutPreOrderStatusEventsInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + branch?: BranchUpdateOneWithoutAdminUsersNestedInput + referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateWithoutPreOrderStatusEventsInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + } + + export type CustomerCreateWithoutLedgerEntriesInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutLedgerEntriesInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutLedgerEntriesInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type OrderCreateWithoutLedgerEntriesInput = { + id?: string + orderNumber: string + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutOrdersInput + branch?: BranchCreateNestedOneWithoutOrdersInput + items?: OrderItemCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderUncheckedCreateWithoutLedgerEntriesInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderUncheckedCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderCreateOrConnectWithoutLedgerEntriesInput = { + where: OrderWhereUniqueInput + create: XOR + } + + export type AdminUserCreateWithoutPostedLedgerEntriesInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + branch?: BranchCreateNestedOneWithoutAdminUsersInput + referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserUncheckedCreateWithoutPostedLedgerEntriesInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + } + + export type AdminUserCreateOrConnectWithoutPostedLedgerEntriesInput = { + where: AdminUserWhereUniqueInput + create: XOR + } + + export type CustomerUpsertWithoutLedgerEntriesInput = { + update: XOR + create: XOR + where?: CustomerWhereInput + } + + export type CustomerUpdateToOneWithWhereWithoutLedgerEntriesInput = { + where?: CustomerWhereInput + data: XOR + } + + export type CustomerUpdateWithoutLedgerEntriesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutLedgerEntriesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type OrderUpsertWithoutLedgerEntriesInput = { + update: XOR + create: XOR + where?: OrderWhereInput + } + + export type OrderUpdateToOneWithWhereWithoutLedgerEntriesInput = { + where?: OrderWhereInput + data: XOR + } + + export type OrderUpdateWithoutLedgerEntriesInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput + branch?: BranchUpdateOneWithoutOrdersNestedInput + items?: OrderItemUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateWithoutLedgerEntriesInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUncheckedUpdateOneWithoutConvertedOrderNestedInput + } + + export type AdminUserUpsertWithoutPostedLedgerEntriesInput = { + update: XOR + create: XOR + where?: AdminUserWhereInput + } + + export type AdminUserUpdateToOneWithWhereWithoutPostedLedgerEntriesInput = { + where?: AdminUserWhereInput + data: XOR + } + + export type AdminUserUpdateWithoutPostedLedgerEntriesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + branch?: BranchUpdateOneWithoutAdminUsersNestedInput + referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateWithoutPostedLedgerEntriesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + } + + export type CustomerCreateWithoutWalletBonusesInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutWalletBonusesInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutWalletBonusesInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type CustomerUpsertWithoutWalletBonusesInput = { + update: XOR + create: XOR + where?: CustomerWhereInput + } + + export type CustomerUpdateToOneWithWhereWithoutWalletBonusesInput = { + where?: CustomerWhereInput + data: XOR + } + + export type CustomerUpdateWithoutWalletBonusesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutWalletBonusesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type CustomerCreateManyCityInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + } + + export type CustomerAddressCreateManyCityInput = { + id?: string + customerId: string + addressLine: string + isDefault?: boolean + } + + export type BranchCreateManyCityInput = { + id?: string + name: string + } + + export type PreOrderCreateManyCityInput = { + id?: string + customerId: string + workshopId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + convertedOrderId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type CustomerUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateManyWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerAddressUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + customer?: CustomerUpdateOneRequiredWithoutAddressesNestedInput + } + + export type CustomerAddressUncheckedUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + } + + export type CustomerAddressUncheckedUpdateManyWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + } + + export type BranchUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + adminUsers?: AdminUserUpdateManyWithoutBranchNestedInput + orders?: OrderUpdateManyWithoutBranchNestedInput + } + + export type BranchUncheckedUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + adminUsers?: AdminUserUncheckedUpdateManyWithoutBranchNestedInput + orders?: OrderUncheckedUpdateManyWithoutBranchNestedInput + } + + export type BranchUncheckedUpdateManyWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + } + + export type PreOrderUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutPreOrdersNestedInput + workshop?: WorkshopUpdateOneWithoutPreOrdersNestedInput + convertedOrder?: OrderUpdateOneWithoutConvertedFromPreOrderNestedInput + statusEvents?: PreOrderStatusEventUpdateManyWithoutPreOrderNestedInput + } + + export type PreOrderUncheckedUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + workshopId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + convertedOrderId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + statusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutPreOrderNestedInput + } + + export type PreOrderUncheckedUpdateManyWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + workshopId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + convertedOrderId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerCreateManyReferredByAgentInput = { + id?: string + fullName: string + mobile: string + nationalCode: string + passwordHash: string + cityId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + } + + export type LedgerEntryCreateManyPostedByAdminUserInput = { + id?: string + customerId: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + orderId?: string | null + confirmed?: boolean + confirmedAt?: Date | string | null + note?: string | null + createdAt?: Date | string + } + + export type OrderStatusEventCreateManyActorAdminUserInput = { + id?: string + orderId: string + fromStatus?: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note?: string | null + createdAt?: Date | string + } + + export type PreOrderStatusEventCreateManyActorAdminUserInput = { + id?: string + preOrderId: string + changes: JsonNullValueInput | InputJsonValue + ipAddress?: string | null + createdAt?: Date | string + } + + export type CustomerUpdateWithoutReferredByAgentInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutReferredByAgentInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateManyWithoutReferredByAgentInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LedgerEntryUpdateWithoutPostedByAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutLedgerEntriesNestedInput + order?: OrderUpdateOneWithoutLedgerEntriesNestedInput + } + + export type LedgerEntryUncheckedUpdateWithoutPostedByAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + orderId?: NullableStringFieldUpdateOperationsInput | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + orderId?: NullableStringFieldUpdateOperationsInput | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OrderStatusEventUpdateWithoutActorAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + order?: OrderUpdateOneRequiredWithoutStatusEventsNestedInput + } + + export type OrderStatusEventUncheckedUpdateWithoutActorAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderStatusEventUpdateWithoutActorAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + preOrder?: PreOrderUpdateOneRequiredWithoutStatusEventsNestedInput + } + + export type PreOrderStatusEventUncheckedUpdateWithoutActorAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + preOrderId?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + preOrderId?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerAddressCreateManyCustomerInput = { + id?: string + cityId?: string | null + addressLine: string + isDefault?: boolean + } + + export type OrderCreateManyCustomerInput = { + id?: string + orderNumber: string + branchId?: string | null + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PreOrderCreateManyCustomerInput = { + id?: string + cityId?: string | null + workshopId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + convertedOrderId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type LedgerEntryCreateManyCustomerInput = { + id?: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + orderId?: string | null + confirmed?: boolean + confirmedAt?: Date | string | null + postedByAdminUserId?: string | null + note?: string | null + createdAt?: Date | string + } + + export type WalletBonusCreateManyCustomerInput = { + id?: string + orderId?: string | null + goldGrams: Decimal | DecimalJsLike | number | string + grantedAt?: Date | string + expiresAt: Date | string + consumedAt?: Date | string | null + isActive?: boolean + } + + export type CustomerAddressUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + city?: CityUpdateOneWithoutAddressesNestedInput + } + + export type CustomerAddressUncheckedUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + } + + export type CustomerAddressUncheckedUpdateManyWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + addressLine?: StringFieldUpdateOperationsInput | string + isDefault?: BoolFieldUpdateOperationsInput | boolean + } + + export type OrderUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + branch?: BranchUpdateOneWithoutOrdersNestedInput + items?: OrderItemUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUncheckedUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateManyWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutPreOrdersNestedInput + workshop?: WorkshopUpdateOneWithoutPreOrdersNestedInput + convertedOrder?: OrderUpdateOneWithoutConvertedFromPreOrderNestedInput + statusEvents?: PreOrderStatusEventUpdateManyWithoutPreOrderNestedInput + } + + export type PreOrderUncheckedUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + workshopId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + convertedOrderId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + statusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutPreOrderNestedInput + } + + export type PreOrderUncheckedUpdateManyWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + workshopId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + convertedOrderId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LedgerEntryUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + order?: OrderUpdateOneWithoutLedgerEntriesNestedInput + postedByAdminUser?: AdminUserUpdateOneWithoutPostedLedgerEntriesNestedInput + } + + export type LedgerEntryUncheckedUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + orderId?: NullableStringFieldUpdateOperationsInput | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + postedByAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LedgerEntryUncheckedUpdateManyWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + orderId?: NullableStringFieldUpdateOperationsInput | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + postedByAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WalletBonusUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: NullableStringFieldUpdateOperationsInput | string | null + goldGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type WalletBonusUncheckedUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: NullableStringFieldUpdateOperationsInput | string | null + goldGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type WalletBonusUncheckedUpdateManyWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: NullableStringFieldUpdateOperationsInput | string | null + goldGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + grantedAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type AdminUserCreateManyBranchInput = { + id?: string + fullName: string + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + } + + export type OrderCreateManyBranchInput = { + id?: string + orderNumber: string + customerId: string + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AdminUserUpdateWithoutBranchInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateWithoutBranchInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateManyWithoutBranchInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OrderUpdateWithoutBranchInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput + items?: OrderItemUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateWithoutBranchInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUncheckedUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateManyWithoutBranchInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderCreateManyWorkshopInput = { + id?: string + customerId: string + cityId?: string | null + status?: $Enums.PreOrderStatus + designImageUrl?: string | null + colorName?: string | null + sizeSpec?: string | null + stoneColor?: string | null + minaColor?: string | null + estimatedWeightGrams?: Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: Decimal | DecimalJsLike | number | string | null + description?: string | null + convertedOrderId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PreOrderUpdateWithoutWorkshopInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutPreOrdersNestedInput + city?: CityUpdateOneWithoutPreOrdersNestedInput + convertedOrder?: OrderUpdateOneWithoutConvertedFromPreOrderNestedInput + statusEvents?: PreOrderStatusEventUpdateManyWithoutPreOrderNestedInput + } + + export type PreOrderUncheckedUpdateWithoutWorkshopInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + convertedOrderId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + statusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutPreOrderNestedInput + } + + export type PreOrderUncheckedUpdateManyWithoutWorkshopInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumPreOrderStatusFieldUpdateOperationsInput | $Enums.PreOrderStatus + designImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + colorName?: NullableStringFieldUpdateOperationsInput | string | null + sizeSpec?: NullableStringFieldUpdateOperationsInput | string | null + stoneColor?: NullableStringFieldUpdateOperationsInput | string | null + minaColor?: NullableStringFieldUpdateOperationsInput | string | null + estimatedWeightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + estimatedPriceRial?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + convertedOrderId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CategoryCreateManyParentInput = { + id?: string + title: string + } + + export type ProductCreateManyCategoryInput = { + id?: string + title: string + description?: string | null + brandId?: string | null + isActive?: boolean + createdAt?: Date | string + } + + export type CategoryUpdateWithoutParentInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + children?: CategoryUpdateManyWithoutParentNestedInput + products?: ProductUpdateManyWithoutCategoryNestedInput + } + + export type CategoryUncheckedUpdateWithoutParentInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + children?: CategoryUncheckedUpdateManyWithoutParentNestedInput + products?: ProductUncheckedUpdateManyWithoutCategoryNestedInput + } + + export type CategoryUncheckedUpdateManyWithoutParentInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + } + + export type ProductUpdateWithoutCategoryInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + brand?: BrandUpdateOneWithoutProductsNestedInput + variants?: ProductVariantUpdateManyWithoutProductNestedInput + images?: ProductImageUpdateManyWithoutProductNestedInput + collections?: CollectionProductUpdateManyWithoutProductNestedInput + } + + export type ProductUncheckedUpdateWithoutCategoryInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + brandId?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput + images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput + collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput + } + + export type ProductUncheckedUpdateManyWithoutCategoryInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + brandId?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ProductCreateManyBrandInput = { + id?: string + title: string + description?: string | null + categoryId?: string | null + isActive?: boolean + createdAt?: Date | string + } + + export type ProductUpdateWithoutBrandInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + category?: CategoryUpdateOneWithoutProductsNestedInput + variants?: ProductVariantUpdateManyWithoutProductNestedInput + images?: ProductImageUpdateManyWithoutProductNestedInput + collections?: CollectionProductUpdateManyWithoutProductNestedInput + } + + export type ProductUncheckedUpdateWithoutBrandInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + categoryId?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput + images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput + collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput + } + + export type ProductUncheckedUpdateManyWithoutBrandInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + categoryId?: NullableStringFieldUpdateOperationsInput | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CollectionProductCreateManyCollectionInput = { + productId: string + } + + export type CollectionProductUpdateWithoutCollectionInput = { + product?: ProductUpdateOneRequiredWithoutCollectionsNestedInput + } + + export type CollectionProductUncheckedUpdateWithoutCollectionInput = { + productId?: StringFieldUpdateOperationsInput | string + } + + export type CollectionProductUncheckedUpdateManyWithoutCollectionInput = { + productId?: StringFieldUpdateOperationsInput | string + } + + export type ProductVariantCreateManyProductInput = { + id?: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + isActive?: boolean + } + + export type ProductImageCreateManyProductInput = { + id?: string + url: string + sortOrder?: number + } + + export type CollectionProductCreateManyProductInput = { + collectionId: string + } + + export type ProductVariantUpdateWithoutProductInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isActive?: BoolFieldUpdateOperationsInput | boolean + orderItems?: OrderItemUpdateManyWithoutProductVariantNestedInput + } + + export type ProductVariantUncheckedUpdateWithoutProductInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isActive?: BoolFieldUpdateOperationsInput | boolean + orderItems?: OrderItemUncheckedUpdateManyWithoutProductVariantNestedInput + } + + export type ProductVariantUncheckedUpdateManyWithoutProductInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isActive?: BoolFieldUpdateOperationsInput | boolean + } + + export type ProductImageUpdateWithoutProductInput = { + id?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + sortOrder?: IntFieldUpdateOperationsInput | number + } + + export type ProductImageUncheckedUpdateWithoutProductInput = { + id?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + sortOrder?: IntFieldUpdateOperationsInput | number + } + + export type ProductImageUncheckedUpdateManyWithoutProductInput = { + id?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + sortOrder?: IntFieldUpdateOperationsInput | number + } + + export type CollectionProductUpdateWithoutProductInput = { + collection?: CollectionUpdateOneRequiredWithoutProductsNestedInput + } + + export type CollectionProductUncheckedUpdateWithoutProductInput = { + collectionId?: StringFieldUpdateOperationsInput | string + } + + export type CollectionProductUncheckedUpdateManyWithoutProductInput = { + collectionId?: StringFieldUpdateOperationsInput | string + } + + export type OrderItemCreateManyProductVariantInput = { + id?: string + orderId: string + quantity: number + rashWeightGramsSnapshot: Decimal | DecimalJsLike | number | string + wagePercentSnapshot: Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: Decimal | DecimalJsLike | number | string + computedWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + } + + export type OrderItemUpdateWithoutProductVariantInput = { + id?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + order?: OrderUpdateOneRequiredWithoutItemsNestedInput + } + + export type OrderItemUncheckedUpdateWithoutProductVariantInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + } + + export type OrderItemUncheckedUpdateManyWithoutProductVariantInput = { + id?: StringFieldUpdateOperationsInput | string + orderId?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + } + + export type OrderItemCreateManyOrderInput = { + id?: string + productVariantId: string + quantity: number + rashWeightGramsSnapshot: Decimal | DecimalJsLike | number | string + wagePercentSnapshot: Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: Decimal | DecimalJsLike | number | string + computedWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + } + + export type OrderStatusEventCreateManyOrderInput = { + id?: string + fromStatus?: $Enums.OrderStatus | null + toStatus: $Enums.OrderStatus + note?: string | null + actorAdminUserId?: string | null + createdAt?: Date | string + } + + export type LedgerEntryCreateManyOrderInput = { + id?: string + customerId: string + currency: $Enums.LedgerCurrency + direction: $Enums.LedgerDirection + sourceType: $Enums.LedgerSourceType + amount: Decimal | DecimalJsLike | number | string + karatPerMille?: number | null + pricePerGramRialAtEntry?: Decimal | DecimalJsLike | number | string | null + confirmed?: boolean + confirmedAt?: Date | string | null + postedByAdminUserId?: string | null + note?: string | null + createdAt?: Date | string + } + + export type OrderItemUpdateWithoutOrderInput = { + id?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + productVariant?: ProductVariantUpdateOneRequiredWithoutOrderItemsNestedInput + } + + export type OrderItemUncheckedUpdateWithoutOrderInput = { + id?: StringFieldUpdateOperationsInput | string + productVariantId?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + } + + export type OrderItemUncheckedUpdateManyWithoutOrderInput = { + id?: StringFieldUpdateOperationsInput | string + productVariantId?: StringFieldUpdateOperationsInput | string + quantity?: IntFieldUpdateOperationsInput | number + rashWeightGramsSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wagePercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + discountPercentSnapshot?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + computedWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + } + + export type OrderStatusEventUpdateWithoutOrderInput = { + id?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + actorAdminUser?: AdminUserUpdateOneWithoutOrderStatusEventsNestedInput + } + + export type OrderStatusEventUncheckedUpdateWithoutOrderInput = { + id?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + actorAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OrderStatusEventUncheckedUpdateManyWithoutOrderInput = { + id?: StringFieldUpdateOperationsInput | string + fromStatus?: NullableEnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus | null + toStatus?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + note?: NullableStringFieldUpdateOperationsInput | string | null + actorAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LedgerEntryUpdateWithoutOrderInput = { + id?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutLedgerEntriesNestedInput + postedByAdminUser?: AdminUserUpdateOneWithoutPostedLedgerEntriesNestedInput + } + + export type LedgerEntryUncheckedUpdateWithoutOrderInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + postedByAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type LedgerEntryUncheckedUpdateManyWithoutOrderInput = { + id?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + currency?: EnumLedgerCurrencyFieldUpdateOperationsInput | $Enums.LedgerCurrency + direction?: EnumLedgerDirectionFieldUpdateOperationsInput | $Enums.LedgerDirection + sourceType?: EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType + amount?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + karatPerMille?: NullableIntFieldUpdateOperationsInput | number | null + pricePerGramRialAtEntry?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + confirmed?: BoolFieldUpdateOperationsInput | boolean + confirmedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + postedByAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + note?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderStatusEventCreateManyPreOrderInput = { + id?: string + changes: JsonNullValueInput | InputJsonValue + actorAdminUserId?: string | null + ipAddress?: string | null + createdAt?: Date | string + } + + export type PreOrderStatusEventUpdateWithoutPreOrderInput = { + id?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + actorAdminUser?: AdminUserUpdateOneWithoutPreOrderStatusEventsNestedInput + } + + export type PreOrderStatusEventUncheckedUpdateWithoutPreOrderInput = { + id?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + actorAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PreOrderStatusEventUncheckedUpdateManyWithoutPreOrderInput = { + id?: StringFieldUpdateOperationsInput | string + changes?: JsonNullValueInput | InputJsonValue + actorAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + + + /** + * Aliases for legacy arg types + */ + /** + * @deprecated Use CityCountOutputTypeDefaultArgs instead + */ + export type CityCountOutputTypeArgs = CityCountOutputTypeDefaultArgs + /** + * @deprecated Use AdminUserCountOutputTypeDefaultArgs instead + */ + export type AdminUserCountOutputTypeArgs = AdminUserCountOutputTypeDefaultArgs + /** + * @deprecated Use CustomerCountOutputTypeDefaultArgs instead + */ + export type CustomerCountOutputTypeArgs = CustomerCountOutputTypeDefaultArgs + /** + * @deprecated Use BranchCountOutputTypeDefaultArgs instead + */ + export type BranchCountOutputTypeArgs = BranchCountOutputTypeDefaultArgs + /** + * @deprecated Use WorkshopCountOutputTypeDefaultArgs instead + */ + export type WorkshopCountOutputTypeArgs = WorkshopCountOutputTypeDefaultArgs + /** + * @deprecated Use CategoryCountOutputTypeDefaultArgs instead + */ + export type CategoryCountOutputTypeArgs = CategoryCountOutputTypeDefaultArgs + /** + * @deprecated Use BrandCountOutputTypeDefaultArgs instead + */ + export type BrandCountOutputTypeArgs = BrandCountOutputTypeDefaultArgs + /** + * @deprecated Use CollectionCountOutputTypeDefaultArgs instead + */ + export type CollectionCountOutputTypeArgs = CollectionCountOutputTypeDefaultArgs + /** + * @deprecated Use ProductCountOutputTypeDefaultArgs instead + */ + export type ProductCountOutputTypeArgs = ProductCountOutputTypeDefaultArgs + /** + * @deprecated Use ProductVariantCountOutputTypeDefaultArgs instead + */ + export type ProductVariantCountOutputTypeArgs = ProductVariantCountOutputTypeDefaultArgs + /** + * @deprecated Use OrderCountOutputTypeDefaultArgs instead + */ + export type OrderCountOutputTypeArgs = OrderCountOutputTypeDefaultArgs + /** + * @deprecated Use PreOrderCountOutputTypeDefaultArgs instead + */ + export type PreOrderCountOutputTypeArgs = PreOrderCountOutputTypeDefaultArgs + /** + * @deprecated Use CityDefaultArgs instead + */ + export type CityArgs = CityDefaultArgs + /** + * @deprecated Use AdminUserDefaultArgs instead + */ + export type AdminUserArgs = AdminUserDefaultArgs + /** + * @deprecated Use CustomerDefaultArgs instead + */ + export type CustomerArgs = CustomerDefaultArgs + /** + * @deprecated Use CustomerAddressDefaultArgs instead + */ + export type CustomerAddressArgs = CustomerAddressDefaultArgs + /** + * @deprecated Use BranchDefaultArgs instead + */ + export type BranchArgs = BranchDefaultArgs + /** + * @deprecated Use WorkshopDefaultArgs instead + */ + export type WorkshopArgs = WorkshopDefaultArgs + /** + * @deprecated Use CategoryDefaultArgs instead + */ + export type CategoryArgs = CategoryDefaultArgs + /** + * @deprecated Use BrandDefaultArgs instead + */ + export type BrandArgs = BrandDefaultArgs + /** + * @deprecated Use CollectionDefaultArgs instead + */ + export type CollectionArgs = CollectionDefaultArgs + /** + * @deprecated Use CollectionProductDefaultArgs instead + */ + export type CollectionProductArgs = CollectionProductDefaultArgs + /** + * @deprecated Use ProductDefaultArgs instead + */ + export type ProductArgs = ProductDefaultArgs + /** + * @deprecated Use ProductImageDefaultArgs instead + */ + export type ProductImageArgs = ProductImageDefaultArgs + /** + * @deprecated Use ProductVariantDefaultArgs instead + */ + export type ProductVariantArgs = ProductVariantDefaultArgs + /** + * @deprecated Use OrderDefaultArgs instead + */ + export type OrderArgs = OrderDefaultArgs + /** + * @deprecated Use OrderItemDefaultArgs instead + */ + export type OrderItemArgs = OrderItemDefaultArgs + /** + * @deprecated Use OrderStatusEventDefaultArgs instead + */ + export type OrderStatusEventArgs = OrderStatusEventDefaultArgs + /** + * @deprecated Use PreOrderDefaultArgs instead + */ + export type PreOrderArgs = PreOrderDefaultArgs + /** + * @deprecated Use PreOrderStatusEventDefaultArgs instead + */ + export type PreOrderStatusEventArgs = PreOrderStatusEventDefaultArgs + /** + * @deprecated Use LedgerEntryDefaultArgs instead + */ + export type LedgerEntryArgs = LedgerEntryDefaultArgs + /** + * @deprecated Use GoldPriceQuoteDefaultArgs instead + */ + export type GoldPriceQuoteArgs = GoldPriceQuoteDefaultArgs + /** + * @deprecated Use WalletBonusDefaultArgs instead + */ + export type WalletBonusArgs = WalletBonusDefaultArgs + + /** + * 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/apps/api/release/vendor/.prisma/client/index.js b/apps/api/release/vendor/.prisma/client/index.js new file mode 100644 index 0000000..e089c9c --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/index.js @@ -0,0 +1,503 @@ + +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('@prisma/client/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({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.CityScalarFieldEnum = { + id: 'id', + name: 'name', + province: 'province' +}; + +exports.Prisma.AdminUserScalarFieldEnum = { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + passwordHash: 'passwordHash', + role: 'role', + branchId: 'branchId', + wagePercent: 'wagePercent', + isActive: 'isActive', + createdAt: 'createdAt' +}; + +exports.Prisma.CustomerScalarFieldEnum = { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + nationalCode: 'nationalCode', + passwordHash: 'passwordHash', + cityId: 'cityId', + referredByAgentId: 'referredByAgentId', + goldCreditLimitGrams: 'goldCreditLimitGrams', + goldDebtGrams: 'goldDebtGrams', + fiatDebtRial: 'fiatDebtRial', + verificationStep: 'verificationStep', + nationalIdImageUrl: 'nationalIdImageUrl', + businessLicenseUrl: 'businessLicenseUrl', + shopImageUrl: 'shopImageUrl', + isActive: 'isActive', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.CustomerAddressScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + addressLine: 'addressLine', + isDefault: 'isDefault' +}; + +exports.Prisma.BranchScalarFieldEnum = { + id: 'id', + name: 'name', + cityId: 'cityId' +}; + +exports.Prisma.WorkshopScalarFieldEnum = { + id: 'id', + name: 'name', + isActive: 'isActive' +}; + +exports.Prisma.CategoryScalarFieldEnum = { + id: 'id', + title: 'title', + parentId: 'parentId' +}; + +exports.Prisma.BrandScalarFieldEnum = { + id: 'id', + title: 'title' +}; + +exports.Prisma.CollectionScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + isActive: 'isActive' +}; + +exports.Prisma.CollectionProductScalarFieldEnum = { + collectionId: 'collectionId', + productId: 'productId' +}; + +exports.Prisma.ProductScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + categoryId: 'categoryId', + brandId: 'brandId', + isActive: 'isActive', + createdAt: 'createdAt' +}; + +exports.Prisma.ProductImageScalarFieldEnum = { + id: 'id', + productId: 'productId', + url: 'url', + sortOrder: 'sortOrder' +}; + +exports.Prisma.ProductVariantScalarFieldEnum = { + id: 'id', + productId: 'productId', + title: 'title', + sku: 'sku', + rashWeightGrams: 'rashWeightGrams', + defaultWagePercent: 'defaultWagePercent', + isActive: 'isActive' +}; + +exports.Prisma.OrderScalarFieldEnum = { + id: 'id', + orderNumber: 'orderNumber', + customerId: 'customerId', + branchId: 'branchId', + status: 'status', + totalGoldWeightGrams: 'totalGoldWeightGrams', + wageWeightGrams: 'wageWeightGrams', + flatRialCharge: 'flatRialCharge', + isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', + deliveredAt: 'deliveredAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.OrderItemScalarFieldEnum = { + id: 'id', + orderId: 'orderId', + productVariantId: 'productVariantId', + quantity: 'quantity', + rashWeightGramsSnapshot: 'rashWeightGramsSnapshot', + wagePercentSnapshot: 'wagePercentSnapshot', + discountPercentSnapshot: 'discountPercentSnapshot', + computedWeightGrams: 'computedWeightGrams', + flatRialCharge: 'flatRialCharge' +}; + +exports.Prisma.OrderStatusEventScalarFieldEnum = { + id: 'id', + orderId: 'orderId', + fromStatus: 'fromStatus', + toStatus: 'toStatus', + note: 'note', + actorAdminUserId: 'actorAdminUserId', + createdAt: 'createdAt' +}; + +exports.Prisma.PreOrderScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + workshopId: 'workshopId', + status: 'status', + designImageUrl: 'designImageUrl', + colorName: 'colorName', + sizeSpec: 'sizeSpec', + stoneColor: 'stoneColor', + minaColor: 'minaColor', + estimatedWeightGrams: 'estimatedWeightGrams', + estimatedPriceRial: 'estimatedPriceRial', + description: 'description', + convertedOrderId: 'convertedOrderId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.PreOrderStatusEventScalarFieldEnum = { + id: 'id', + preOrderId: 'preOrderId', + changes: 'changes', + actorAdminUserId: 'actorAdminUserId', + ipAddress: 'ipAddress', + createdAt: 'createdAt' +}; + +exports.Prisma.LedgerEntryScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + currency: 'currency', + direction: 'direction', + sourceType: 'sourceType', + amount: 'amount', + karatPerMille: 'karatPerMille', + pricePerGramRialAtEntry: 'pricePerGramRialAtEntry', + orderId: 'orderId', + confirmed: 'confirmed', + confirmedAt: 'confirmedAt', + postedByAdminUserId: 'postedByAdminUserId', + note: 'note', + createdAt: 'createdAt' +}; + +exports.Prisma.GoldPriceQuoteScalarFieldEnum = { + id: 'id', + karatPerMille: 'karatPerMille', + pricePerGramRial: 'pricePerGramRial', + source: 'source', + quotedAt: 'quotedAt' +}; + +exports.Prisma.WalletBonusScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + orderId: 'orderId', + goldGrams: 'goldGrams', + grantedAt: 'grantedAt', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + isActive: 'isActive' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.JsonNullValueInput = { + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; +exports.AdminRole = exports.$Enums.AdminRole = { + SUPER_ADMIN: 'SUPER_ADMIN', + SYSTEM_APPROVER: 'SYSTEM_APPROVER', + SALES_EXPERT: 'SALES_EXPERT', + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + ACCOUNTANT: 'ACCOUNTANT' +}; + +exports.VerificationStep = exports.$Enums.VerificationStep = { + UNVERIFIED: 'UNVERIFIED', + STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', + STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', + VERIFIED: 'VERIFIED' +}; + +exports.OrderStatus = exports.$Enums.OrderStatus = { + SUSPENDED: 'SUSPENDED', + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + SOURCING: 'SOURCING', + PREPARING: 'PREPARING', + DELIVERED_TO_AGENT: 'DELIVERED_TO_AGENT', + DELIVERED_TO_CUSTOMER: 'DELIVERED_TO_CUSTOMER', + CANCELLED: 'CANCELLED' +}; + +exports.PreOrderStatus = exports.$Enums.PreOrderStatus = { + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + WORKSHOP_APPROVED: 'WORKSHOP_APPROVED', + READY_TO_SHIP: 'READY_TO_SHIP', + DELIVERED: 'DELIVERED', + CANCELLED: 'CANCELLED' +}; + +exports.LedgerCurrency = exports.$Enums.LedgerCurrency = { + GOLD_GRAM: 'GOLD_GRAM', + RIAL: 'RIAL' +}; + +exports.LedgerDirection = exports.$Enums.LedgerDirection = { + DEBIT: 'DEBIT', + CREDIT: 'CREDIT' +}; + +exports.LedgerSourceType = exports.$Enums.LedgerSourceType = { + ORDER_STOCK: 'ORDER_STOCK', + ORDER_PRE_ORDER: 'ORDER_PRE_ORDER', + REPAYMENT_MELTED_GOLD: 'REPAYMENT_MELTED_GOLD', + REPAYMENT_TRANSFER: 'REPAYMENT_TRANSFER', + REPAYMENT_CHEQUE: 'REPAYMENT_CHEQUE', + REPAYMENT_CASH: 'REPAYMENT_CASH', + WALLET_BONUS: 'WALLET_BONUS', + ADJUSTMENT: 'ADJUSTMENT' +}; + +exports.Prisma.ModelName = { + City: 'City', + AdminUser: 'AdminUser', + Customer: 'Customer', + CustomerAddress: 'CustomerAddress', + Branch: 'Branch', + Workshop: 'Workshop', + Category: 'Category', + Brand: 'Brand', + Collection: 'Collection', + CollectionProduct: 'CollectionProduct', + Product: 'Product', + ProductImage: 'ProductImage', + ProductVariant: 'ProductVariant', + Order: 'Order', + OrderItem: 'OrderItem', + OrderStatusEvent: 'OrderStatusEvent', + PreOrder: 'PreOrder', + PreOrderStatusEvent: 'PreOrderStatusEvent', + LedgerEntry: 'LedgerEntry', + GoldPriceQuote: 'GoldPriceQuote', + WalletBonus: 'WalletBonus' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "C:\\App\\gold-bank\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", + "fromEnvVar": null + }, + "config": { + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "windows", + "native": true + }, + { + "fromEnvVar": null, + "value": "linux-musl-openssl-3.0.x" + } + ], + "previewFeatures": [], + "sourceFilePath": "C:\\App\\gold-bank\\apps\\api\\prisma\\schema.prisma" + }, + "relativeEnvPaths": { + "rootEnvPath": null + }, + "relativePath": "../../../../../../apps/api/prisma", + "clientVersion": "5.22.0", + "engineVersion": "605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "// Gold Banking System — core schema\n// Canonical accounting model: legacy \"System A\" gram ledger (see migration notes).\n// The external \"Tahesab\" service is retired — LedgerEntry is the sole source of truth.\n// All money/weight fields use Decimal, never Float, to avoid rounding drift in debt math.\n\ngenerator client {\n provider = \"prisma-client-js\"\n // native = local Windows/macOS build; linux-musl = Arvan/Alpine Docker runtime\n binaryTargets = [\"native\", \"linux-musl-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Enums\n// ─────────────────────────────────────────────────────────────────────────\n\nenum AdminRole {\n SUPER_ADMIN\n SYSTEM_APPROVER // legacy: تایید مدیر سیستم\n SALES_EXPERT // legacy Customer.type=1, also acts as a referral \"reagent\"\n WORKSHOP_SUPERVISOR\n ACCOUNTANT\n}\n\nenum VerificationStep {\n UNVERIFIED\n STEP_ONE_SUBMITTED\n STEP_TWO_SUBMITTED\n VERIFIED\n}\n\nenum OrderStatus {\n SUSPENDED // credit limit (goldCreditLimitGrams) exceeded at placement\n PLACED\n ADMIN_APPROVED\n SOURCING\n PREPARING\n DELIVERED_TO_AGENT\n DELIVERED_TO_CUSTOMER // debt recognition point — mirrors legacy sts>4\n CANCELLED\n}\n\nenum PreOrderStatus {\n PLACED\n ADMIN_APPROVED\n WORKSHOP_APPROVED\n READY_TO_SHIP\n DELIVERED\n CANCELLED\n}\n\nenum LedgerCurrency {\n GOLD_GRAM\n RIAL\n}\n\nenum LedgerDirection {\n DEBIT // increases what the customer owes\n CREDIT // decreases what the customer owes\n}\n\nenum LedgerSourceType {\n ORDER_STOCK\n ORDER_PRE_ORDER\n REPAYMENT_MELTED_GOLD // karat-normalized: amount * karatPerMille / 750\n REPAYMENT_TRANSFER\n REPAYMENT_CHEQUE\n REPAYMENT_CASH // price-per-gram-normalized via pricePerGramRialAtEntry\n WALLET_BONUS\n ADJUSTMENT\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Identity\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel City {\n id String @id @default(cuid())\n name String\n province String?\n customers Customer[]\n addresses CustomerAddress[]\n branches Branch[]\n preOrders PreOrder[]\n}\n\nmodel AdminUser {\n id String @id @default(cuid())\n fullName String\n mobile String @unique\n passwordHash String\n role AdminRole\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n wagePercent Decimal? @db.Decimal(6, 3) // legacy Customer.percent, commission on referred orders\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n referredCustomers Customer[] @relation(\"ReferralAgent\")\n postedLedgerEntries LedgerEntry[]\n orderStatusEvents OrderStatusEvent[]\n preOrderStatusEvents PreOrderStatusEvent[]\n\n @@index([role])\n}\n\nmodel Customer {\n id String @id @default(cuid())\n fullName String\n mobile String @unique\n nationalCode String @unique\n passwordHash String\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n\n referredByAgentId String?\n referredByAgent AdminUser? @relation(\"ReferralAgent\", fields: [referredByAgentId], references: [id])\n\n // Credit limit + cached ledger balances (source of truth is LedgerEntry; these\n // are denormalized for fast reads and reconciled by a scheduled job).\n goldCreditLimitGrams Decimal @default(0) @db.Decimal(14, 4) // legacy gram_level\n goldDebtGrams Decimal @default(0) @db.Decimal(14, 4) // legacy remain\n fiatDebtRial Decimal @default(0) @db.Decimal(20, 2) // legacy rial_remain\n\n verificationStep VerificationStep @default(UNVERIFIED)\n nationalIdImageUrl String?\n businessLicenseUrl String?\n shopImageUrl String?\n\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n addresses CustomerAddress[]\n orders Order[]\n preOrders PreOrder[]\n ledgerEntries LedgerEntry[]\n walletBonuses WalletBonus[]\n\n @@index([referredByAgentId])\n}\n\nmodel CustomerAddress {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n addressLine String\n isDefault Boolean @default(false)\n}\n\nmodel Branch {\n id String @id @default(cuid())\n name String\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n adminUsers AdminUser[]\n orders Order[]\n}\n\nmodel Workshop {\n id String @id @default(cuid())\n name String\n isActive Boolean @default(true)\n preOrders PreOrder[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Catalog — item reference catalog\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Category {\n id String @id @default(cuid())\n title String\n parentId String?\n parent Category? @relation(\"CategoryTree\", fields: [parentId], references: [id])\n children Category[] @relation(\"CategoryTree\")\n products Product[]\n}\n\nmodel Brand {\n id String @id @default(cuid())\n title String\n products Product[]\n}\n\n/// Curated product groupings — replaces legacy \"Ciny/CinyProduct\" (a tagging\n/// feature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\nmodel Collection {\n id String @id @default(cuid())\n title String\n description String?\n isActive Boolean @default(true)\n products CollectionProduct[]\n}\n\nmodel CollectionProduct {\n collectionId String\n collection Collection @relation(fields: [collectionId], references: [id])\n productId String\n product Product @relation(fields: [productId], references: [id])\n\n @@id([collectionId, productId])\n}\n\nmodel Product {\n id String @id @default(cuid())\n title String\n description String?\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n variants ProductVariant[]\n images ProductImage[]\n collections CollectionProduct[]\n}\n\nmodel ProductImage {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n url String\n sortOrder Int @default(0)\n}\n\nmodel ProductVariant {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n title String\n sku String? @unique\n /// Base/raw weight before making charge (\"rash weight\").\n rashWeightGrams Decimal @db.Decimal(14, 4)\n /// Default making-charge percentage applied on top of rash weight.\n defaultWagePercent Decimal @db.Decimal(6, 3)\n isActive Boolean @default(true)\n\n orderItems OrderItem[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Orders — stock orders (debt-bearing)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Order {\n id String @id @default(cuid())\n orderNumber String @unique\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n status OrderStatus @default(PLACED)\n\n /// Total gold weight incl. wage across all items (\"allGram\" / order.w).\n totalGoldWeightGrams Decimal @db.Decimal(14, 4)\n /// Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\n wageWeightGrams Decimal @db.Decimal(14, 4)\n /// Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n\n isSuspendedOverCreditLimit Boolean @default(false)\n deliveredAt DateTime? // setting this is what triggers debt recognition\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n items OrderItem[]\n statusEvents OrderStatusEvent[]\n ledgerEntries LedgerEntry[]\n convertedFromPreOrder PreOrder?\n\n @@index([customerId])\n @@index([status])\n}\n\nmodel OrderItem {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n productVariantId String\n productVariant ProductVariant @relation(fields: [productVariantId], references: [id])\n quantity Int\n\n // Snapshots at order time — never re-read from ProductVariant after placement.\n rashWeightGramsSnapshot Decimal @db.Decimal(14, 4)\n wagePercentSnapshot Decimal @db.Decimal(6, 3)\n discountPercentSnapshot Decimal @default(0) @db.Decimal(6, 3)\n /// computed: rash*(1 + (wagePercent-discount)/100)\n computedWeightGrams Decimal @db.Decimal(14, 4)\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n}\n\nmodel OrderStatusEvent {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n fromStatus OrderStatus?\n toStatus OrderStatus\n note String?\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n createdAt DateTime @default(now())\n\n @@index([orderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Pre-orders — custom manufacturing requests (not debt-bearing until converted)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel PreOrder {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n workshopId String?\n workshop Workshop? @relation(fields: [workshopId], references: [id])\n status PreOrderStatus @default(PLACED)\n\n designImageUrl String?\n colorName String?\n sizeSpec String?\n stoneColor String?\n minaColor String?\n estimatedWeightGrams Decimal? @db.Decimal(14, 4)\n estimatedPriceRial Decimal? @db.Decimal(20, 2)\n description String?\n\n /// Once priced, an admin converts this into a real (debt-bearing) Order.\n convertedOrderId String? @unique\n convertedOrder Order? @relation(fields: [convertedOrderId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n statusEvents PreOrderStatusEvent[]\n\n @@index([customerId])\n}\n\nmodel PreOrderStatusEvent {\n id String @id @default(cuid())\n preOrderId String\n preOrder PreOrder @relation(fields: [preOrderId], references: [id])\n /// Field-level diff, e.g. {\"status\": {\"old\": \"PLACED\", \"new\": \"ADMIN_APPROVED\"}}\n changes Json\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n ipAddress String?\n createdAt DateTime @default(now())\n\n @@index([preOrderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Accounting — the dual-currency ledger (core of the system)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel LedgerEntry {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n\n currency LedgerCurrency\n direction LedgerDirection\n sourceType LedgerSourceType\n /// Always positive; direction determines the sign applied to the customer balance.\n amount Decimal @db.Decimal(20, 4)\n\n /// Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\n karatPerMille Int?\n /// Gold price/gram at conversion time, for REPAYMENT_CASH.\n pricePerGramRialAtEntry Decimal? @db.Decimal(20, 2)\n\n orderId String?\n order Order? @relation(fields: [orderId], references: [id])\n\n /// Pending entries don't count toward the cached customer balance until confirmed.\n confirmed Boolean @default(false)\n confirmedAt DateTime?\n postedByAdminUserId String?\n postedByAdminUser AdminUser? @relation(fields: [postedByAdminUserId], references: [id])\n\n note String?\n createdAt DateTime @default(now())\n\n @@index([customerId, currency])\n @@index([orderId])\n}\n\n/// Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\nmodel GoldPriceQuote {\n id String @id @default(cuid())\n karatPerMille Int\n pricePerGramRial Decimal @db.Decimal(20, 2)\n source String\n quotedAt DateTime @default(now())\n\n @@index([karatPerMille, quotedAt])\n}\n\n/// Time-limited gold cashback bonus — replaces the legacy Rooyesh\\Wallet gold credit.\nmodel WalletBonus {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n orderId String?\n goldGrams Decimal @db.Decimal(14, 4)\n grantedAt DateTime @default(now())\n expiresAt DateTime\n consumedAt DateTime?\n isActive Boolean @default(true)\n\n @@index([customerId, isActive])\n}\n", + "inlineSchemaHash": "a66f1e6dda15d2844c43af681c7a944b20fa3bef306bf60c9ab2ee23322951df", + "copyEngine": true +} + +const fs = require('fs') + +config.dirname = __dirname +if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { + const alternativePaths = [ + "../../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client", + "../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client", + ] + + 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\":{\"City\":{\"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\":\"province\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AdminUser\":{\"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\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminRole\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"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\":\"referredCustomers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedLedgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Customer\":{\"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\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredByAgentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredByAgent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[\"referredByAgentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldCreditLimitGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldDebtGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiatDebtRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"verificationStep\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"VerificationStep\",\"default\":\"UNVERIFIED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalIdImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"businessLicenseUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shopImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"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\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"walletBonuses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"WalletBonus\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CustomerAddress\":{\"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\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addressLine\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Branch\":{\"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\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Workshop\":{\"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\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"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\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[\"parentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"children\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Brand\":{\"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\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Collection\":{\"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\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Curated product groupings — replaces legacy \\\"Ciny/CinyProduct\\\" (a tagging\\\\nfeature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\"},\"CollectionProduct\":{\"dbName\":null,\"fields\":[{\"name\":\"collectionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collection\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Collection\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[\"collectionId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"collectionId\",\"productId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Product\":{\"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\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"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\":\"variants\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductImage\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collections\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductImage\":{\"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\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sortOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductVariant\":{\"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\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sku\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Base/raw weight before making charge (\\\"rash weight\\\").\"},{\"name\":\"defaultWagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Default making-charge percentage applied on top of rash weight.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Order\":{\"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\":\"orderNumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalGoldWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Total gold weight incl. wage across all items (\\\"allGram\\\" / order.w).\"},{\"name\":\"wageWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\"},{\"name\":\"isSuspendedOverCreditLimit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deliveredAt\",\"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},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedFromPreOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderItem\":{\"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\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariantId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariant\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[\"productVariantId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quantity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGramsSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"computedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"computed: rash*(1 + (wagePercent-discount)/100)\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderStatusEvent\":{\"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\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fromStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"toStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"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}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrder\":{\"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\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshopId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshop\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[\"workshopId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PreOrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"colorName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeSpec\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stoneColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"minaColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedPriceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Once priced, an admin converts this into a real (debt-bearing) Order.\"},{\"name\":\"convertedOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[\"convertedOrderId\"],\"relationToFields\":[\"id\"],\"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\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrderStatusEvent\":{\"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\":\"preOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[\"preOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"changes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Field-level diff, e.g. {\\\"status\\\": {\\\"old\\\": \\\"PLACED\\\", \\\"new\\\": \\\"ADMIN_APPROVED\\\"}}\"},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"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}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"LedgerEntry\":{\"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\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currency\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerCurrency\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"direction\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerDirection\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sourceType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerSourceType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Always positive; direction determines the sign applied to the customer balance.\"},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\"},{\"name\":\"pricePerGramRialAtEntry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Gold price/gram at conversion time, for REPAYMENT_CASH.\"},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pending entries don't count toward the cached customer balance until confirmed.\"},{\"name\":\"confirmedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[\"postedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"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}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"GoldPriceQuote\":{\"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\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pricePerGramRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"source\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quotedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\"},\"WalletBonus\":{\"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\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"grantedAt\",\"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\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Time-limited gold cashback bonus — replaces the legacy Rooyesh\\\\Wallet gold credit.\"}},\"enums\":{\"AdminRole\":{\"values\":[{\"name\":\"SUPER_ADMIN\",\"dbName\":null},{\"name\":\"SYSTEM_APPROVER\",\"dbName\":null},{\"name\":\"SALES_EXPERT\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null},{\"name\":\"ACCOUNTANT\",\"dbName\":null}],\"dbName\":null},\"VerificationStep\":{\"values\":[{\"name\":\"UNVERIFIED\",\"dbName\":null},{\"name\":\"STEP_ONE_SUBMITTED\",\"dbName\":null},{\"name\":\"STEP_TWO_SUBMITTED\",\"dbName\":null},{\"name\":\"VERIFIED\",\"dbName\":null}],\"dbName\":null},\"OrderStatus\":{\"values\":[{\"name\":\"SUSPENDED\",\"dbName\":null},{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"SOURCING\",\"dbName\":null},{\"name\":\"PREPARING\",\"dbName\":null},{\"name\":\"DELIVERED_TO_AGENT\",\"dbName\":null},{\"name\":\"DELIVERED_TO_CUSTOMER\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"PreOrderStatus\":{\"values\":[{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"WORKSHOP_APPROVED\",\"dbName\":null},{\"name\":\"READY_TO_SHIP\",\"dbName\":null},{\"name\":\"DELIVERED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"LedgerCurrency\":{\"values\":[{\"name\":\"GOLD_GRAM\",\"dbName\":null},{\"name\":\"RIAL\",\"dbName\":null}],\"dbName\":null},\"LedgerDirection\":{\"values\":[{\"name\":\"DEBIT\",\"dbName\":null},{\"name\":\"CREDIT\",\"dbName\":null}],\"dbName\":null},\"LedgerSourceType\":{\"values\":[{\"name\":\"ORDER_STOCK\",\"dbName\":null},{\"name\":\"ORDER_PRE_ORDER\",\"dbName\":null},{\"name\":\"REPAYMENT_MELTED_GOLD\",\"dbName\":null},{\"name\":\"REPAYMENT_TRANSFER\",\"dbName\":null},{\"name\":\"REPAYMENT_CHEQUE\",\"dbName\":null},{\"name\":\"REPAYMENT_CASH\",\"dbName\":null},{\"name\":\"WALLET_BONUS\",\"dbName\":null},{\"name\":\"ADJUSTMENT\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined + + +const { warnEnvConflicts } = require('@prisma/client/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(), "../../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/query_engine-windows.dll.node") + +// file annotations for bundling tools to include these files +path.join(__dirname, "libquery_engine-linux-musl-openssl-3.0.x.so.node"); +path.join(process.cwd(), "../../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/libquery_engine-linux-musl-openssl-3.0.x.so.node") +// file annotations for bundling tools to include these files +path.join(__dirname, "schema.prisma"); +path.join(process.cwd(), "../../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/schema.prisma") diff --git a/apps/api/release/vendor/.prisma/client/libquery_engine-linux-musl-openssl-3.0.x.so.node b/apps/api/release/vendor/.prisma/client/libquery_engine-linux-musl-openssl-3.0.x.so.node new file mode 100644 index 0000000..6e849e2 Binary files /dev/null and b/apps/api/release/vendor/.prisma/client/libquery_engine-linux-musl-openssl-3.0.x.so.node differ diff --git a/apps/api/release/vendor/.prisma/client/package.json b/apps/api/release/vendor/.prisma/client/package.json new file mode 100644 index 0000000..46801d0 --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/package.json @@ -0,0 +1,97 @@ +{ + "name": "prisma-client-ba2f6fd6b3d86ffa3c394cb4a096d72809d8f078d1c406de497494345bae5d35", + "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/apps/api/release/vendor/.prisma/client/query_engine-windows.dll.node b/apps/api/release/vendor/.prisma/client/query_engine-windows.dll.node new file mode 100644 index 0000000..d46657b Binary files /dev/null and b/apps/api/release/vendor/.prisma/client/query_engine-windows.dll.node differ diff --git a/apps/api/release/vendor/.prisma/client/schema.prisma b/apps/api/release/vendor/.prisma/client/schema.prisma new file mode 100644 index 0000000..7a10caa --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/schema.prisma @@ -0,0 +1,425 @@ +// Gold Banking System — core schema +// Canonical accounting model: legacy "System A" gram ledger (see migration notes). +// The external "Tahesab" service is retired — LedgerEntry is the sole source of truth. +// All money/weight fields use Decimal, never Float, to avoid rounding drift in debt math. + +generator client { + provider = "prisma-client-js" + // native = local Windows/macOS build; linux-musl = Arvan/Alpine Docker runtime + binaryTargets = ["native", "linux-musl-openssl-3.0.x"] +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +// ───────────────────────────────────────────────────────────────────────── +// Enums +// ───────────────────────────────────────────────────────────────────────── + +enum AdminRole { + SUPER_ADMIN + SYSTEM_APPROVER // legacy: تایید مدیر سیستم + SALES_EXPERT // legacy Customer.type=1, also acts as a referral "reagent" + WORKSHOP_SUPERVISOR + ACCOUNTANT +} + +enum VerificationStep { + UNVERIFIED + STEP_ONE_SUBMITTED + STEP_TWO_SUBMITTED + VERIFIED +} + +enum OrderStatus { + SUSPENDED // credit limit (goldCreditLimitGrams) exceeded at placement + PLACED + ADMIN_APPROVED + SOURCING + PREPARING + DELIVERED_TO_AGENT + DELIVERED_TO_CUSTOMER // debt recognition point — mirrors legacy sts>4 + CANCELLED +} + +enum PreOrderStatus { + PLACED + ADMIN_APPROVED + WORKSHOP_APPROVED + READY_TO_SHIP + DELIVERED + CANCELLED +} + +enum LedgerCurrency { + GOLD_GRAM + RIAL +} + +enum LedgerDirection { + DEBIT // increases what the customer owes + CREDIT // decreases what the customer owes +} + +enum LedgerSourceType { + ORDER_STOCK + ORDER_PRE_ORDER + REPAYMENT_MELTED_GOLD // karat-normalized: amount * karatPerMille / 750 + REPAYMENT_TRANSFER + REPAYMENT_CHEQUE + REPAYMENT_CASH // price-per-gram-normalized via pricePerGramRialAtEntry + WALLET_BONUS + ADJUSTMENT +} + +// ───────────────────────────────────────────────────────────────────────── +// Identity +// ───────────────────────────────────────────────────────────────────────── + +model City { + id String @id @default(cuid()) + name String + province String? + customers Customer[] + addresses CustomerAddress[] + branches Branch[] + preOrders PreOrder[] +} + +model AdminUser { + id String @id @default(cuid()) + fullName String + mobile String @unique + passwordHash String + role AdminRole + branchId String? + branch Branch? @relation(fields: [branchId], references: [id]) + wagePercent Decimal? @db.Decimal(6, 3) // legacy Customer.percent, commission on referred orders + isActive Boolean @default(true) + createdAt DateTime @default(now()) + + referredCustomers Customer[] @relation("ReferralAgent") + postedLedgerEntries LedgerEntry[] + orderStatusEvents OrderStatusEvent[] + preOrderStatusEvents PreOrderStatusEvent[] + + @@index([role]) +} + +model Customer { + id String @id @default(cuid()) + fullName String + mobile String @unique + nationalCode String @unique + passwordHash String + cityId String? + city City? @relation(fields: [cityId], references: [id]) + + referredByAgentId String? + referredByAgent AdminUser? @relation("ReferralAgent", fields: [referredByAgentId], references: [id]) + + // Credit limit + cached ledger balances (source of truth is LedgerEntry; these + // are denormalized for fast reads and reconciled by a scheduled job). + goldCreditLimitGrams Decimal @default(0) @db.Decimal(14, 4) // legacy gram_level + goldDebtGrams Decimal @default(0) @db.Decimal(14, 4) // legacy remain + fiatDebtRial Decimal @default(0) @db.Decimal(20, 2) // legacy rial_remain + + verificationStep VerificationStep @default(UNVERIFIED) + nationalIdImageUrl String? + businessLicenseUrl String? + shopImageUrl String? + + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + addresses CustomerAddress[] + orders Order[] + preOrders PreOrder[] + ledgerEntries LedgerEntry[] + walletBonuses WalletBonus[] + + @@index([referredByAgentId]) +} + +model CustomerAddress { + id String @id @default(cuid()) + customerId String + customer Customer @relation(fields: [customerId], references: [id]) + cityId String? + city City? @relation(fields: [cityId], references: [id]) + addressLine String + isDefault Boolean @default(false) +} + +model Branch { + id String @id @default(cuid()) + name String + cityId String? + city City? @relation(fields: [cityId], references: [id]) + adminUsers AdminUser[] + orders Order[] +} + +model Workshop { + id String @id @default(cuid()) + name String + isActive Boolean @default(true) + preOrders PreOrder[] +} + +// ───────────────────────────────────────────────────────────────────────── +// Catalog — item reference catalog +// ───────────────────────────────────────────────────────────────────────── + +model Category { + id String @id @default(cuid()) + title String + parentId String? + parent Category? @relation("CategoryTree", fields: [parentId], references: [id]) + children Category[] @relation("CategoryTree") + products Product[] +} + +model Brand { + id String @id @default(cuid()) + title String + products Product[] +} + +/// Curated product groupings — replaces legacy "Ciny/CinyProduct" (a tagging +/// feature, NOT a gold-price snapshot mechanism, despite the misleading legacy name). +model Collection { + id String @id @default(cuid()) + title String + description String? + isActive Boolean @default(true) + products CollectionProduct[] +} + +model CollectionProduct { + collectionId String + collection Collection @relation(fields: [collectionId], references: [id]) + productId String + product Product @relation(fields: [productId], references: [id]) + + @@id([collectionId, productId]) +} + +model Product { + id String @id @default(cuid()) + title String + description String? + categoryId String? + category Category? @relation(fields: [categoryId], references: [id]) + brandId String? + brand Brand? @relation(fields: [brandId], references: [id]) + isActive Boolean @default(true) + createdAt DateTime @default(now()) + + variants ProductVariant[] + images ProductImage[] + collections CollectionProduct[] +} + +model ProductImage { + id String @id @default(cuid()) + productId String + product Product @relation(fields: [productId], references: [id]) + url String + sortOrder Int @default(0) +} + +model ProductVariant { + id String @id @default(cuid()) + productId String + product Product @relation(fields: [productId], references: [id]) + title String + sku String? @unique + /// Base/raw weight before making charge ("rash weight"). + rashWeightGrams Decimal @db.Decimal(14, 4) + /// Default making-charge percentage applied on top of rash weight. + defaultWagePercent Decimal @db.Decimal(6, 3) + isActive Boolean @default(true) + + orderItems OrderItem[] +} + +// ───────────────────────────────────────────────────────────────────────── +// Orders — stock orders (debt-bearing) +// ───────────────────────────────────────────────────────────────────────── + +model Order { + id String @id @default(cuid()) + orderNumber String @unique + customerId String + customer Customer @relation(fields: [customerId], references: [id]) + branchId String? + branch Branch? @relation(fields: [branchId], references: [id]) + status OrderStatus @default(PLACED) + + /// Total gold weight incl. wage across all items ("allGram" / order.w). + totalGoldWeightGrams Decimal @db.Decimal(14, 4) + /// Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum). + wageWeightGrams Decimal @db.Decimal(14, 4) + /// Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input. + flatRialCharge Decimal @default(0) @db.Decimal(20, 2) + + isSuspendedOverCreditLimit Boolean @default(false) + deliveredAt DateTime? // setting this is what triggers debt recognition + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + items OrderItem[] + statusEvents OrderStatusEvent[] + ledgerEntries LedgerEntry[] + convertedFromPreOrder PreOrder? + + @@index([customerId]) + @@index([status]) +} + +model OrderItem { + id String @id @default(cuid()) + orderId String + order Order @relation(fields: [orderId], references: [id]) + productVariantId String + productVariant ProductVariant @relation(fields: [productVariantId], references: [id]) + quantity Int + + // Snapshots at order time — never re-read from ProductVariant after placement. + rashWeightGramsSnapshot Decimal @db.Decimal(14, 4) + wagePercentSnapshot Decimal @db.Decimal(6, 3) + discountPercentSnapshot Decimal @default(0) @db.Decimal(6, 3) + /// computed: rash*(1 + (wagePercent-discount)/100) + computedWeightGrams Decimal @db.Decimal(14, 4) + flatRialCharge Decimal @default(0) @db.Decimal(20, 2) +} + +model OrderStatusEvent { + id String @id @default(cuid()) + orderId String + order Order @relation(fields: [orderId], references: [id]) + fromStatus OrderStatus? + toStatus OrderStatus + note String? + actorAdminUserId String? + actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id]) + createdAt DateTime @default(now()) + + @@index([orderId]) +} + +// ───────────────────────────────────────────────────────────────────────── +// Pre-orders — custom manufacturing requests (not debt-bearing until converted) +// ───────────────────────────────────────────────────────────────────────── + +model PreOrder { + id String @id @default(cuid()) + customerId String + customer Customer @relation(fields: [customerId], references: [id]) + cityId String? + city City? @relation(fields: [cityId], references: [id]) + workshopId String? + workshop Workshop? @relation(fields: [workshopId], references: [id]) + status PreOrderStatus @default(PLACED) + + designImageUrl String? + colorName String? + sizeSpec String? + stoneColor String? + minaColor String? + estimatedWeightGrams Decimal? @db.Decimal(14, 4) + estimatedPriceRial Decimal? @db.Decimal(20, 2) + description String? + + /// Once priced, an admin converts this into a real (debt-bearing) Order. + convertedOrderId String? @unique + convertedOrder Order? @relation(fields: [convertedOrderId], references: [id]) + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + statusEvents PreOrderStatusEvent[] + + @@index([customerId]) +} + +model PreOrderStatusEvent { + id String @id @default(cuid()) + preOrderId String + preOrder PreOrder @relation(fields: [preOrderId], references: [id]) + /// Field-level diff, e.g. {"status": {"old": "PLACED", "new": "ADMIN_APPROVED"}} + changes Json + actorAdminUserId String? + actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id]) + ipAddress String? + createdAt DateTime @default(now()) + + @@index([preOrderId]) +} + +// ───────────────────────────────────────────────────────────────────────── +// Accounting — the dual-currency ledger (core of the system) +// ───────────────────────────────────────────────────────────────────────── + +model LedgerEntry { + id String @id @default(cuid()) + customerId String + customer Customer @relation(fields: [customerId], references: [id]) + + currency LedgerCurrency + direction LedgerDirection + sourceType LedgerSourceType + /// Always positive; direction determines the sign applied to the customer balance. + amount Decimal @db.Decimal(20, 4) + + /// Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916). + karatPerMille Int? + /// Gold price/gram at conversion time, for REPAYMENT_CASH. + pricePerGramRialAtEntry Decimal? @db.Decimal(20, 2) + + orderId String? + order Order? @relation(fields: [orderId], references: [id]) + + /// Pending entries don't count toward the cached customer balance until confirmed. + confirmed Boolean @default(false) + confirmedAt DateTime? + postedByAdminUserId String? + postedByAdminUser AdminUser? @relation(fields: [postedByAdminUserId], references: [id]) + + note String? + createdAt DateTime @default(now()) + + @@index([customerId, currency]) + @@index([orderId]) +} + +/// Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed. +model GoldPriceQuote { + id String @id @default(cuid()) + karatPerMille Int + pricePerGramRial Decimal @db.Decimal(20, 2) + source String + quotedAt DateTime @default(now()) + + @@index([karatPerMille, quotedAt]) +} + +/// Time-limited gold cashback bonus — replaces the legacy Rooyesh\Wallet gold credit. +model WalletBonus { + id String @id @default(cuid()) + customerId String + customer Customer @relation(fields: [customerId], references: [id]) + orderId String? + goldGrams Decimal @db.Decimal(14, 4) + grantedAt DateTime @default(now()) + expiresAt DateTime + consumedAt DateTime? + isActive Boolean @default(true) + + @@index([customerId, isActive]) +} diff --git a/apps/api/release/vendor/.prisma/client/wasm.d.ts b/apps/api/release/vendor/.prisma/client/wasm.d.ts new file mode 100644 index 0000000..bc20c6c --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/wasm.d.ts @@ -0,0 +1 @@ +export * from "./index" \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/wasm.js b/apps/api/release/vendor/.prisma/client/wasm.js new file mode 100644 index 0000000..2152108 --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/wasm.js @@ -0,0 +1,467 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, + skip +} = require('@prisma/client/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({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.CityScalarFieldEnum = { + id: 'id', + name: 'name', + province: 'province' +}; + +exports.Prisma.AdminUserScalarFieldEnum = { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + passwordHash: 'passwordHash', + role: 'role', + branchId: 'branchId', + wagePercent: 'wagePercent', + isActive: 'isActive', + createdAt: 'createdAt' +}; + +exports.Prisma.CustomerScalarFieldEnum = { + id: 'id', + fullName: 'fullName', + mobile: 'mobile', + nationalCode: 'nationalCode', + passwordHash: 'passwordHash', + cityId: 'cityId', + referredByAgentId: 'referredByAgentId', + goldCreditLimitGrams: 'goldCreditLimitGrams', + goldDebtGrams: 'goldDebtGrams', + fiatDebtRial: 'fiatDebtRial', + verificationStep: 'verificationStep', + nationalIdImageUrl: 'nationalIdImageUrl', + businessLicenseUrl: 'businessLicenseUrl', + shopImageUrl: 'shopImageUrl', + isActive: 'isActive', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.CustomerAddressScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + addressLine: 'addressLine', + isDefault: 'isDefault' +}; + +exports.Prisma.BranchScalarFieldEnum = { + id: 'id', + name: 'name', + cityId: 'cityId' +}; + +exports.Prisma.WorkshopScalarFieldEnum = { + id: 'id', + name: 'name', + isActive: 'isActive' +}; + +exports.Prisma.CategoryScalarFieldEnum = { + id: 'id', + title: 'title', + parentId: 'parentId' +}; + +exports.Prisma.BrandScalarFieldEnum = { + id: 'id', + title: 'title' +}; + +exports.Prisma.CollectionScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + isActive: 'isActive' +}; + +exports.Prisma.CollectionProductScalarFieldEnum = { + collectionId: 'collectionId', + productId: 'productId' +}; + +exports.Prisma.ProductScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + categoryId: 'categoryId', + brandId: 'brandId', + isActive: 'isActive', + createdAt: 'createdAt' +}; + +exports.Prisma.ProductImageScalarFieldEnum = { + id: 'id', + productId: 'productId', + url: 'url', + sortOrder: 'sortOrder' +}; + +exports.Prisma.ProductVariantScalarFieldEnum = { + id: 'id', + productId: 'productId', + title: 'title', + sku: 'sku', + rashWeightGrams: 'rashWeightGrams', + defaultWagePercent: 'defaultWagePercent', + isActive: 'isActive' +}; + +exports.Prisma.OrderScalarFieldEnum = { + id: 'id', + orderNumber: 'orderNumber', + customerId: 'customerId', + branchId: 'branchId', + status: 'status', + totalGoldWeightGrams: 'totalGoldWeightGrams', + wageWeightGrams: 'wageWeightGrams', + flatRialCharge: 'flatRialCharge', + isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', + deliveredAt: 'deliveredAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.OrderItemScalarFieldEnum = { + id: 'id', + orderId: 'orderId', + productVariantId: 'productVariantId', + quantity: 'quantity', + rashWeightGramsSnapshot: 'rashWeightGramsSnapshot', + wagePercentSnapshot: 'wagePercentSnapshot', + discountPercentSnapshot: 'discountPercentSnapshot', + computedWeightGrams: 'computedWeightGrams', + flatRialCharge: 'flatRialCharge' +}; + +exports.Prisma.OrderStatusEventScalarFieldEnum = { + id: 'id', + orderId: 'orderId', + fromStatus: 'fromStatus', + toStatus: 'toStatus', + note: 'note', + actorAdminUserId: 'actorAdminUserId', + createdAt: 'createdAt' +}; + +exports.Prisma.PreOrderScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + cityId: 'cityId', + workshopId: 'workshopId', + status: 'status', + designImageUrl: 'designImageUrl', + colorName: 'colorName', + sizeSpec: 'sizeSpec', + stoneColor: 'stoneColor', + minaColor: 'minaColor', + estimatedWeightGrams: 'estimatedWeightGrams', + estimatedPriceRial: 'estimatedPriceRial', + description: 'description', + convertedOrderId: 'convertedOrderId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.PreOrderStatusEventScalarFieldEnum = { + id: 'id', + preOrderId: 'preOrderId', + changes: 'changes', + actorAdminUserId: 'actorAdminUserId', + ipAddress: 'ipAddress', + createdAt: 'createdAt' +}; + +exports.Prisma.LedgerEntryScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + currency: 'currency', + direction: 'direction', + sourceType: 'sourceType', + amount: 'amount', + karatPerMille: 'karatPerMille', + pricePerGramRialAtEntry: 'pricePerGramRialAtEntry', + orderId: 'orderId', + confirmed: 'confirmed', + confirmedAt: 'confirmedAt', + postedByAdminUserId: 'postedByAdminUserId', + note: 'note', + createdAt: 'createdAt' +}; + +exports.Prisma.GoldPriceQuoteScalarFieldEnum = { + id: 'id', + karatPerMille: 'karatPerMille', + pricePerGramRial: 'pricePerGramRial', + source: 'source', + quotedAt: 'quotedAt' +}; + +exports.Prisma.WalletBonusScalarFieldEnum = { + id: 'id', + customerId: 'customerId', + orderId: 'orderId', + goldGrams: 'goldGrams', + grantedAt: 'grantedAt', + expiresAt: 'expiresAt', + consumedAt: 'consumedAt', + isActive: 'isActive' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.JsonNullValueInput = { + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; +exports.AdminRole = exports.$Enums.AdminRole = { + SUPER_ADMIN: 'SUPER_ADMIN', + SYSTEM_APPROVER: 'SYSTEM_APPROVER', + SALES_EXPERT: 'SALES_EXPERT', + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + ACCOUNTANT: 'ACCOUNTANT' +}; + +exports.VerificationStep = exports.$Enums.VerificationStep = { + UNVERIFIED: 'UNVERIFIED', + STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', + STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', + VERIFIED: 'VERIFIED' +}; + +exports.OrderStatus = exports.$Enums.OrderStatus = { + SUSPENDED: 'SUSPENDED', + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + SOURCING: 'SOURCING', + PREPARING: 'PREPARING', + DELIVERED_TO_AGENT: 'DELIVERED_TO_AGENT', + DELIVERED_TO_CUSTOMER: 'DELIVERED_TO_CUSTOMER', + CANCELLED: 'CANCELLED' +}; + +exports.PreOrderStatus = exports.$Enums.PreOrderStatus = { + PLACED: 'PLACED', + ADMIN_APPROVED: 'ADMIN_APPROVED', + WORKSHOP_APPROVED: 'WORKSHOP_APPROVED', + READY_TO_SHIP: 'READY_TO_SHIP', + DELIVERED: 'DELIVERED', + CANCELLED: 'CANCELLED' +}; + +exports.LedgerCurrency = exports.$Enums.LedgerCurrency = { + GOLD_GRAM: 'GOLD_GRAM', + RIAL: 'RIAL' +}; + +exports.LedgerDirection = exports.$Enums.LedgerDirection = { + DEBIT: 'DEBIT', + CREDIT: 'CREDIT' +}; + +exports.LedgerSourceType = exports.$Enums.LedgerSourceType = { + ORDER_STOCK: 'ORDER_STOCK', + ORDER_PRE_ORDER: 'ORDER_PRE_ORDER', + REPAYMENT_MELTED_GOLD: 'REPAYMENT_MELTED_GOLD', + REPAYMENT_TRANSFER: 'REPAYMENT_TRANSFER', + REPAYMENT_CHEQUE: 'REPAYMENT_CHEQUE', + REPAYMENT_CASH: 'REPAYMENT_CASH', + WALLET_BONUS: 'WALLET_BONUS', + ADJUSTMENT: 'ADJUSTMENT' +}; + +exports.Prisma.ModelName = { + City: 'City', + AdminUser: 'AdminUser', + Customer: 'Customer', + CustomerAddress: 'CustomerAddress', + Branch: 'Branch', + Workshop: 'Workshop', + Category: 'Category', + Brand: 'Brand', + Collection: 'Collection', + CollectionProduct: 'CollectionProduct', + Product: 'Product', + ProductImage: 'ProductImage', + ProductVariant: 'ProductVariant', + Order: 'Order', + OrderItem: 'OrderItem', + OrderStatusEvent: 'OrderStatusEvent', + PreOrder: 'PreOrder', + PreOrderStatusEvent: 'PreOrderStatusEvent', + LedgerEntry: 'LedgerEntry', + GoldPriceQuote: 'GoldPriceQuote', + WalletBonus: 'WalletBonus' +}; + +/** + * 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/apps/api/release/vendor/@prisma/client/LICENSE b/apps/api/release/vendor/@prisma/client/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/apps/api/release/vendor/@prisma/client/README.md b/apps/api/release/vendor/@prisma/client/README.md new file mode 100644 index 0000000..c67b83c --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/README.md @@ -0,0 +1,27 @@ +# Prisma Client · [![npm version](https://img.shields.io/npm/v/@prisma/client.svg?style=flat)](https://www.npmjs.com/package/@prisma/client) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Discord](https://img.shields.io/discord/937751382725886062?label=Discord)](https://pris.ly/discord) + +Prisma Client JS is an **auto-generated query builder** that enables **type-safe** database access and **reduces boilerplate**. You can use it as an alternative to traditional ORMs such as Sequelize, TypeORM or SQL query builders like knex.js. + +It is part of the [Prisma](https://www.prisma.io/) ecosystem. Prisma provides database tools for data access, declarative data modeling, schema migrations and visual data management. Learn more in the main [`prisma`](https://github.com/prisma/prisma/) repository or read the [documentation](https://www.prisma.io/docs/). + +## Getting started + +Follow one of these guides to get started with Prisma Client JS: + +- [Quickstart](https://www.prisma.io/docs/getting-started/quickstart) (5 min) +- [Set up a new project with Prisma (SQL migrations)](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-sql) (15 min) +- [Set up a new project with Prisma (Prisma Migrate)](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-prisma-migrate) (15 min) +- [Add Prisma to an existing project](https://www.prisma.io/docs/getting-started/setup-prisma/add-to-existing-project) (15 min) + +Alternatively you can explore the ready-to-run [examples](https://github.com/prisma/prisma-examples/) (REST, GraphQL, gRPC, plain JavaScript and TypeScript demos, ...) or watch the [demo videos](https://www.youtube.com/watch?v=0RhtQgIs-TE&list=PLn2e1F9Rfr6k9PnR_figWOcSHgc_erDr5&index=1) (1-2 min per video). + +## Contributing + +Refer to our [contribution guidelines](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) and [Code of Conduct for contributors](https://github.com/prisma/prisma/blob/main/CODE_OF_CONDUCT.md). + +## Tests Status + +- Prisma Tests Status: + [![CI](https://github.com/prisma/prisma/actions/workflows/test.yml/badge.svg)](https://github.com/prisma/prisma/actions/workflows/test.yml) +- Ecosystem Tests Status: + [![Actions Status](https://github.com/prisma/ecosystem-tests/workflows/test/badge.svg)](https://github.com/prisma/ecosystem-tests/actions) diff --git a/apps/api/release/vendor/@prisma/client/default.d.ts b/apps/api/release/vendor/@prisma/client/default.d.ts new file mode 100644 index 0000000..bedfdce --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/default.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/default' diff --git a/apps/api/release/vendor/@prisma/client/default.js b/apps/api/release/vendor/@prisma/client/default.js new file mode 100644 index 0000000..3c2dafb --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/default.js @@ -0,0 +1,3 @@ +module.exports = { + ...require('.prisma/client/default'), +} diff --git a/apps/api/release/vendor/@prisma/client/edge.d.ts b/apps/api/release/vendor/@prisma/client/edge.d.ts new file mode 100644 index 0000000..b8d190e --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/edge.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/edge' diff --git a/apps/api/release/vendor/@prisma/client/edge.js b/apps/api/release/vendor/@prisma/client/edge.js new file mode 100644 index 0000000..c4925e8 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/edge.js @@ -0,0 +1,4 @@ +module.exports = { + // https://github.com/prisma/prisma/pull/12907 + ...require('.prisma/client/edge'), +} diff --git a/apps/api/release/vendor/@prisma/client/extension.d.ts b/apps/api/release/vendor/@prisma/client/extension.d.ts new file mode 100644 index 0000000..28e3968 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/extension.d.ts @@ -0,0 +1 @@ +export * from './scripts/default-index' diff --git a/apps/api/release/vendor/@prisma/client/extension.js b/apps/api/release/vendor/@prisma/client/extension.js new file mode 100644 index 0000000..3ab6e46 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/extension.js @@ -0,0 +1,4 @@ +module.exports = { + // https://github.com/prisma/prisma/pull/12907 + ...require('./scripts/default-index'), +} diff --git a/apps/api/release/vendor/@prisma/client/generator-build/index.js b/apps/api/release/vendor/@prisma/client/generator-build/index.js new file mode 100644 index 0000000..f0adad1 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/generator-build/index.js @@ -0,0 +1,10351 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json +var require_package = __commonJS({ + "../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json"(exports2, module2) { + module2.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" + } + }; + } +}); + +// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/index.js +var require_engines_version = __commonJS({ + "../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.enginesVersion = void 0; + exports2.enginesVersion = require_package().prisma.enginesVersion; + } +}); + +// ../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js +var require_universalify = __commonJS({ + "../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports2) { + "use strict"; + exports2.fromCallback = function(fn) { + return Object.defineProperty(function(...args) { + if (typeof args[args.length - 1] === "function") fn.apply(this, args); + else { + return new Promise((resolve, reject) => { + fn.call( + this, + ...args, + (err, res) => err != null ? reject(err) : resolve(res) + ); + }); + } + }, "name", { value: fn.name }); + }; + exports2.fromPromise = function(fn) { + return Object.defineProperty(function(...args) { + const cb = args[args.length - 1]; + if (typeof cb !== "function") return fn.apply(this, args); + else fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb); + }, "name", { value: fn.name }); + }; + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports2, module2) { + "use strict"; + var constants = require("constants"); + var origCwd = process.cwd; + var cwd2 = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd2) + cwd2 = origCwd.call(process); + return cwd2; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd2 = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs3) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs3); + } + if (!fs3.lutimes) { + patchLutimes(fs3); + } + fs3.chown = chownFix(fs3.chown); + fs3.fchown = chownFix(fs3.fchown); + fs3.lchown = chownFix(fs3.lchown); + fs3.chmod = chmodFix(fs3.chmod); + fs3.fchmod = chmodFix(fs3.fchmod); + fs3.lchmod = chmodFix(fs3.lchmod); + fs3.chownSync = chownFixSync(fs3.chownSync); + fs3.fchownSync = chownFixSync(fs3.fchownSync); + fs3.lchownSync = chownFixSync(fs3.lchownSync); + fs3.chmodSync = chmodFixSync(fs3.chmodSync); + fs3.fchmodSync = chmodFixSync(fs3.fchmodSync); + fs3.lchmodSync = chmodFixSync(fs3.lchmodSync); + fs3.stat = statFix(fs3.stat); + fs3.fstat = statFix(fs3.fstat); + fs3.lstat = statFix(fs3.lstat); + fs3.statSync = statFixSync(fs3.statSync); + fs3.fstatSync = statFixSync(fs3.fstatSync); + fs3.lstatSync = statFixSync(fs3.lstatSync); + if (fs3.chmod && !fs3.lchmod) { + fs3.lchmod = function(path5, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs3.lchmodSync = function() { + }; + } + if (fs3.chown && !fs3.lchown) { + fs3.lchown = function(path5, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs3.lchownSync = function() { + }; + } + if (platform === "win32") { + fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { + setTimeout(function() { + fs3.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + }(fs3.rename); + } + fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) { + function read(fd, buffer2, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs3, fd, buffer2, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs3, fd, buffer2, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + }(fs3.read); + fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) { + return function(fd, buffer2, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs3, fd, buffer2, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + }(fs3.readSync); + function patchLchmod(fs4) { + fs4.lchmod = function(path5, mode, callback) { + fs4.open( + path5, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs4.fchmod(fd, mode, function(err2) { + fs4.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs4.lchmodSync = function(path5, mode) { + var fd = fs4.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs4.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs4.closeSync(fd); + } catch (er) { + } + } else { + fs4.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs4) { + if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) { + fs4.lutimes = function(path5, at, mt, cb) { + fs4.open(path5, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs4.futimes(fd, at, mt, function(er2) { + fs4.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs4.lutimesSync = function(path5, at, mt) { + var fd = fs4.openSync(path5, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs4.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs4.closeSync(fd); + } catch (er) { + } + } else { + fs4.closeSync(fd); + } + } + return ret; + }; + } else if (fs4.futimes) { + fs4.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs4.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs3, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs3, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs3, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs3, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + "use strict"; + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs3) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path5, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path5, options); + Stream.call(this); + var self = this; + this.path = path5; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + fs3.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self.emit("error", err); + self.readable = false; + return; + } + self.fd = fd; + self.emit("open", fd); + self._read(); + }); + } + function WriteStream(path5, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path5, options); + Stream.call(this); + this.path = path5; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs3.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + "use strict"; + var fs3 = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util2 = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() { + } + function publishQueue(context, queue2) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug4 = noop; + if (util2.debuglog) + debug4 = util2.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug4 = function() { + var m = util2.format.apply(util2, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs3[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs3, queue); + fs3.close = function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs3, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + }(fs3.close); + fs3.closeSync = function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs3, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + }(fs3.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug4(fs3[gracefulQueue]); + require("assert").equal(fs3[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs3[gracefulQueue]); + } + module2.exports = patch(clone(fs3)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) { + module2.exports = patch(fs3); + fs3.__patched = true; + } + function patch(fs4) { + polyfills(fs4); + fs4.gracefulify = patch; + fs4.createReadStream = createReadStream; + fs4.createWriteStream = createWriteStream; + var fs$readFile = fs4.readFile; + fs4.readFile = readFile; + function readFile(path5, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path5, options, cb); + function go$readFile(path6, options2, cb2, startTime) { + return fs$readFile(path6, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs4.writeFile; + fs4.writeFile = writeFile; + function writeFile(path5, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path5, data, options, cb); + function go$writeFile(path6, data2, options2, cb2, startTime) { + return fs$writeFile(path6, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs4.appendFile; + if (fs$appendFile) + fs4.appendFile = appendFile; + function appendFile(path5, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path5, data, options, cb); + function go$appendFile(path6, data2, options2, cb2, startTime) { + return fs$appendFile(path6, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs4.copyFile; + if (fs$copyFile) + fs4.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs4.readdir; + fs4.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path5, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path6, options2, cb2, startTime) { + return fs$readdir(path6, fs$readdirCallback( + path6, + options2, + cb2, + startTime + )); + } : function go$readdir2(path6, options2, cb2, startTime) { + return fs$readdir(path6, options2, fs$readdirCallback( + path6, + options2, + cb2, + startTime + )); + }; + return go$readdir(path5, options, cb); + function fs$readdirCallback(path6, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path6, options2, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs4); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs4.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs4.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs4, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val) { + ReadStream = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs4, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val) { + WriteStream = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs4, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs4, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path5, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path5, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path5, options) { + return new fs4.ReadStream(path5, options); + } + function createWriteStream(path5, options) { + return new fs4.WriteStream(path5, options); + } + var fs$open = fs4.open; + fs4.open = open; + function open(path5, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path5, flags, mode, cb); + function go$open(path6, flags2, mode2, cb2, startTime) { + return fs$open(path6, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs4; + } + function enqueue(elem) { + debug4("ENQUEUE", elem[0].name, elem[1]); + fs3[gracefulQueue].push(elem); + retry(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs3[gracefulQueue].length; ++i) { + if (fs3[gracefulQueue][i].length > 2) { + fs3[gracefulQueue][i][3] = now; + fs3[gracefulQueue][i][4] = now; + } + } + retry(); + } + function retry() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs3[gracefulQueue].length === 0) + return; + var elem = fs3[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug4("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug4("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug4("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs3[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry, 0); + } + } + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js +var require_fs = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js"(exports2) { + "use strict"; + var u = require_universalify().fromCallback; + var fs3 = require_graceful_fs(); + var api = [ + "access", + "appendFile", + "chmod", + "chown", + "close", + "copyFile", + "fchmod", + "fchown", + "fdatasync", + "fstat", + "fsync", + "ftruncate", + "futimes", + "lchmod", + "lchown", + "link", + "lstat", + "mkdir", + "mkdtemp", + "open", + "opendir", + "readdir", + "readFile", + "readlink", + "realpath", + "rename", + "rm", + "rmdir", + "stat", + "symlink", + "truncate", + "unlink", + "utimes", + "writeFile" + ].filter((key) => { + return typeof fs3[key] === "function"; + }); + Object.assign(exports2, fs3); + api.forEach((method2) => { + exports2[method2] = u(fs3[method2]); + }); + exports2.exists = function(filename, callback) { + if (typeof callback === "function") { + return fs3.exists(filename, callback); + } + return new Promise((resolve) => { + return fs3.exists(filename, resolve); + }); + }; + exports2.read = function(fd, buffer2, offset, length, position, callback) { + if (typeof callback === "function") { + return fs3.read(fd, buffer2, offset, length, position, callback); + } + return new Promise((resolve, reject) => { + fs3.read(fd, buffer2, offset, length, position, (err, bytesRead, buffer3) => { + if (err) return reject(err); + resolve({ bytesRead, buffer: buffer3 }); + }); + }); + }; + exports2.write = function(fd, buffer2, ...args) { + if (typeof args[args.length - 1] === "function") { + return fs3.write(fd, buffer2, ...args); + } + return new Promise((resolve, reject) => { + fs3.write(fd, buffer2, ...args, (err, bytesWritten, buffer3) => { + if (err) return reject(err); + resolve({ bytesWritten, buffer: buffer3 }); + }); + }); + }; + exports2.readv = function(fd, buffers, ...args) { + if (typeof args[args.length - 1] === "function") { + return fs3.readv(fd, buffers, ...args); + } + return new Promise((resolve, reject) => { + fs3.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => { + if (err) return reject(err); + resolve({ bytesRead, buffers: buffers2 }); + }); + }); + }; + exports2.writev = function(fd, buffers, ...args) { + if (typeof args[args.length - 1] === "function") { + return fs3.writev(fd, buffers, ...args); + } + return new Promise((resolve, reject) => { + fs3.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => { + if (err) return reject(err); + resolve({ bytesWritten, buffers: buffers2 }); + }); + }); + }; + if (typeof fs3.realpath.native === "function") { + exports2.realpath.native = u(fs3.realpath.native); + } else { + process.emitWarning( + "fs.realpath.native is not a function. Is fs being monkey-patched?", + "Warning", + "fs-extra-WARN0003" + ); + } + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js +var require_utils = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + module2.exports.checkPath = function checkPath(pth) { + if (process.platform === "win32") { + const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path5.parse(pth).root, "")); + if (pathHasInvalidWinCharacters) { + const error = new Error(`Path contains invalid characters: ${pth}`); + error.code = "EINVAL"; + throw error; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js +var require_make_dir = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) { + "use strict"; + var fs3 = require_fs(); + var { checkPath } = require_utils(); + var getMode = (options) => { + const defaults = { mode: 511 }; + if (typeof options === "number") return options; + return { ...defaults, ...options }.mode; + }; + module2.exports.makeDir = async (dir, options) => { + checkPath(dir); + return fs3.mkdir(dir, { + mode: getMode(options), + recursive: true + }); + }; + module2.exports.makeDirSync = (dir, options) => { + checkPath(dir); + return fs3.mkdirSync(dir, { + mode: getMode(options), + recursive: true + }); + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js +var require_mkdirs = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var { makeDir: _makeDir, makeDirSync } = require_make_dir(); + var makeDir = u(_makeDir); + module2.exports = { + mkdirs: makeDir, + mkdirsSync: makeDirSync, + // alias + mkdirp: makeDir, + mkdirpSync: makeDirSync, + ensureDir: makeDir, + ensureDirSync: makeDirSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js +var require_path_exists = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var fs3 = require_fs(); + function pathExists2(path5) { + return fs3.access(path5).then(() => true).catch(() => false); + } + module2.exports = { + pathExists: u(pathExists2), + pathExistsSync: fs3.existsSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js +var require_utimes = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + function utimesMillis(path5, atime, mtime, callback) { + fs3.open(path5, "r+", (err, fd) => { + if (err) return callback(err); + fs3.futimes(fd, atime, mtime, (futimesErr) => { + fs3.close(fd, (closeErr) => { + if (callback) callback(futimesErr || closeErr); + }); + }); + }); + } + function utimesMillisSync(path5, atime, mtime) { + const fd = fs3.openSync(path5, "r+"); + fs3.futimesSync(fd, atime, mtime); + return fs3.closeSync(fd); + } + module2.exports = { + utimesMillis, + utimesMillisSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js +var require_stat = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) { + "use strict"; + var fs3 = require_fs(); + var path5 = require("path"); + var util2 = require("util"); + function getStats(src, dest, opts) { + const statFunc = opts.dereference ? (file2) => fs3.stat(file2, { bigint: true }) : (file2) => fs3.lstat(file2, { bigint: true }); + return Promise.all([ + statFunc(src), + statFunc(dest).catch((err) => { + if (err.code === "ENOENT") return null; + throw err; + }) + ]).then(([srcStat, destStat]) => ({ srcStat, destStat })); + } + function getStatsSync(src, dest, opts) { + let destStat; + const statFunc = opts.dereference ? (file2) => fs3.statSync(file2, { bigint: true }) : (file2) => fs3.lstatSync(file2, { bigint: true }); + const srcStat = statFunc(src); + try { + destStat = statFunc(dest); + } catch (err) { + if (err.code === "ENOENT") return { srcStat, destStat: null }; + throw err; + } + return { srcStat, destStat }; + } + function checkPaths(src, dest, funcName, opts, cb) { + util2.callbackify(getStats)(src, dest, opts, (err, stats) => { + if (err) return cb(err); + const { srcStat, destStat } = stats; + if (destStat) { + if (areIdentical(srcStat, destStat)) { + const srcBaseName = path5.basename(src); + const destBaseName = path5.basename(dest); + if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { + return cb(null, { srcStat, destStat, isChangingCase: true }); + } + return cb(new Error("Source and destination must not be the same.")); + } + if (srcStat.isDirectory() && !destStat.isDirectory()) { + return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)); + } + if (!srcStat.isDirectory() && destStat.isDirectory()) { + return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)); + } + } + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + return cb(new Error(errMsg(src, dest, funcName))); + } + return cb(null, { srcStat, destStat }); + }); + } + function checkPathsSync(src, dest, funcName, opts) { + const { srcStat, destStat } = getStatsSync(src, dest, opts); + if (destStat) { + if (areIdentical(srcStat, destStat)) { + const srcBaseName = path5.basename(src); + const destBaseName = path5.basename(dest); + if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { + return { srcStat, destStat, isChangingCase: true }; + } + throw new Error("Source and destination must not be the same."); + } + if (srcStat.isDirectory() && !destStat.isDirectory()) { + throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`); + } + if (!srcStat.isDirectory() && destStat.isDirectory()) { + throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`); + } + } + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + throw new Error(errMsg(src, dest, funcName)); + } + return { srcStat, destStat }; + } + function checkParentPaths(src, srcStat, dest, funcName, cb) { + const srcParent = path5.resolve(path5.dirname(src)); + const destParent = path5.resolve(path5.dirname(dest)); + if (destParent === srcParent || destParent === path5.parse(destParent).root) return cb(); + fs3.stat(destParent, { bigint: true }, (err, destStat) => { + if (err) { + if (err.code === "ENOENT") return cb(); + return cb(err); + } + if (areIdentical(srcStat, destStat)) { + return cb(new Error(errMsg(src, dest, funcName))); + } + return checkParentPaths(src, srcStat, destParent, funcName, cb); + }); + } + function checkParentPathsSync(src, srcStat, dest, funcName) { + const srcParent = path5.resolve(path5.dirname(src)); + const destParent = path5.resolve(path5.dirname(dest)); + if (destParent === srcParent || destParent === path5.parse(destParent).root) return; + let destStat; + try { + destStat = fs3.statSync(destParent, { bigint: true }); + } catch (err) { + if (err.code === "ENOENT") return; + throw err; + } + if (areIdentical(srcStat, destStat)) { + throw new Error(errMsg(src, dest, funcName)); + } + return checkParentPathsSync(src, srcStat, destParent, funcName); + } + function areIdentical(srcStat, destStat) { + return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev; + } + function isSrcSubdir(src, dest) { + const srcArr = path5.resolve(src).split(path5.sep).filter((i) => i); + const destArr = path5.resolve(dest).split(path5.sep).filter((i) => i); + return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true); + } + function errMsg(src, dest, funcName) { + return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`; + } + module2.exports = { + checkPaths, + checkPathsSync, + checkParentPaths, + checkParentPathsSync, + isSrcSubdir, + areIdentical + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js +var require_copy = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var mkdirs = require_mkdirs().mkdirs; + var pathExists2 = require_path_exists().pathExists; + var utimesMillis = require_utimes().utimesMillis; + var stat = require_stat(); + function copy(src, dest, opts, cb) { + if (typeof opts === "function" && !cb) { + cb = opts; + opts = {}; + } else if (typeof opts === "function") { + opts = { filter: opts }; + } + cb = cb || function() { + }; + opts = opts || {}; + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") { + process.emitWarning( + "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269", + "Warning", + "fs-extra-WARN0001" + ); + } + stat.checkPaths(src, dest, "copy", opts, (err, stats) => { + if (err) return cb(err); + const { srcStat, destStat } = stats; + stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => { + if (err2) return cb(err2); + runFilter(src, dest, opts, (err3, include) => { + if (err3) return cb(err3); + if (!include) return cb(); + checkParentDir(destStat, src, dest, opts, cb); + }); + }); + }); + } + function checkParentDir(destStat, src, dest, opts, cb) { + const destParent = path5.dirname(dest); + pathExists2(destParent, (err, dirExists) => { + if (err) return cb(err); + if (dirExists) return getStats(destStat, src, dest, opts, cb); + mkdirs(destParent, (err2) => { + if (err2) return cb(err2); + return getStats(destStat, src, dest, opts, cb); + }); + }); + } + function runFilter(src, dest, opts, cb) { + if (!opts.filter) return cb(null, true); + Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error)); + } + function getStats(destStat, src, dest, opts, cb) { + const stat2 = opts.dereference ? fs3.stat : fs3.lstat; + stat2(src, (err, srcStat) => { + if (err) return cb(err); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb); + else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb); + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb); + else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`)); + else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`)); + return cb(new Error(`Unknown file: ${src}`)); + }); + } + function onFile(srcStat, destStat, src, dest, opts, cb) { + if (!destStat) return copyFile(srcStat, src, dest, opts, cb); + return mayCopyFile(srcStat, src, dest, opts, cb); + } + function mayCopyFile(srcStat, src, dest, opts, cb) { + if (opts.overwrite) { + fs3.unlink(dest, (err) => { + if (err) return cb(err); + return copyFile(srcStat, src, dest, opts, cb); + }); + } else if (opts.errorOnExist) { + return cb(new Error(`'${dest}' already exists`)); + } else return cb(); + } + function copyFile(srcStat, src, dest, opts, cb) { + fs3.copyFile(src, dest, (err) => { + if (err) return cb(err); + if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb); + return setDestMode(dest, srcStat.mode, cb); + }); + } + function handleTimestampsAndMode(srcMode, src, dest, cb) { + if (fileIsNotWritable(srcMode)) { + return makeFileWritable(dest, srcMode, (err) => { + if (err) return cb(err); + return setDestTimestampsAndMode(srcMode, src, dest, cb); + }); + } + return setDestTimestampsAndMode(srcMode, src, dest, cb); + } + function fileIsNotWritable(srcMode) { + return (srcMode & 128) === 0; + } + function makeFileWritable(dest, srcMode, cb) { + return setDestMode(dest, srcMode | 128, cb); + } + function setDestTimestampsAndMode(srcMode, src, dest, cb) { + setDestTimestamps(src, dest, (err) => { + if (err) return cb(err); + return setDestMode(dest, srcMode, cb); + }); + } + function setDestMode(dest, srcMode, cb) { + return fs3.chmod(dest, srcMode, cb); + } + function setDestTimestamps(src, dest, cb) { + fs3.stat(src, (err, updatedSrcStat) => { + if (err) return cb(err); + return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb); + }); + } + function onDir(srcStat, destStat, src, dest, opts, cb) { + if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb); + return copyDir(src, dest, opts, cb); + } + function mkDirAndCopy(srcMode, src, dest, opts, cb) { + fs3.mkdir(dest, (err) => { + if (err) return cb(err); + copyDir(src, dest, opts, (err2) => { + if (err2) return cb(err2); + return setDestMode(dest, srcMode, cb); + }); + }); + } + function copyDir(src, dest, opts, cb) { + fs3.readdir(src, (err, items) => { + if (err) return cb(err); + return copyDirItems(items, src, dest, opts, cb); + }); + } + function copyDirItems(items, src, dest, opts, cb) { + const item = items.pop(); + if (!item) return cb(); + return copyDirItem(items, item, src, dest, opts, cb); + } + function copyDirItem(items, item, src, dest, opts, cb) { + const srcItem = path5.join(src, item); + const destItem = path5.join(dest, item); + runFilter(srcItem, destItem, opts, (err, include) => { + if (err) return cb(err); + if (!include) return copyDirItems(items, src, dest, opts, cb); + stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => { + if (err2) return cb(err2); + const { destStat } = stats; + getStats(destStat, srcItem, destItem, opts, (err3) => { + if (err3) return cb(err3); + return copyDirItems(items, src, dest, opts, cb); + }); + }); + }); + } + function onLink(destStat, src, dest, opts, cb) { + fs3.readlink(src, (err, resolvedSrc) => { + if (err) return cb(err); + if (opts.dereference) { + resolvedSrc = path5.resolve(process.cwd(), resolvedSrc); + } + if (!destStat) { + return fs3.symlink(resolvedSrc, dest, cb); + } else { + fs3.readlink(dest, (err2, resolvedDest) => { + if (err2) { + if (err2.code === "EINVAL" || err2.code === "UNKNOWN") return fs3.symlink(resolvedSrc, dest, cb); + return cb(err2); + } + if (opts.dereference) { + resolvedDest = path5.resolve(process.cwd(), resolvedDest); + } + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { + return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)); + } + if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) { + return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)); + } + return copyLink(resolvedSrc, dest, cb); + }); + } + }); + } + function copyLink(resolvedSrc, dest, cb) { + fs3.unlink(dest, (err) => { + if (err) return cb(err); + return fs3.symlink(resolvedSrc, dest, cb); + }); + } + module2.exports = copy; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js +var require_copy_sync = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var mkdirsSync = require_mkdirs().mkdirsSync; + var utimesMillisSync = require_utimes().utimesMillisSync; + var stat = require_stat(); + function copySync(src, dest, opts) { + if (typeof opts === "function") { + opts = { filter: opts }; + } + opts = opts || {}; + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") { + process.emitWarning( + "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269", + "Warning", + "fs-extra-WARN0002" + ); + } + const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts); + stat.checkParentPathsSync(src, srcStat, dest, "copy"); + if (opts.filter && !opts.filter(src, dest)) return; + const destParent = path5.dirname(dest); + if (!fs3.existsSync(destParent)) mkdirsSync(destParent); + return getStats(destStat, src, dest, opts); + } + function getStats(destStat, src, dest, opts) { + const statSync = opts.dereference ? fs3.statSync : fs3.lstatSync; + const srcStat = statSync(src); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts); + else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts); + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts); + else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`); + else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`); + throw new Error(`Unknown file: ${src}`); + } + function onFile(srcStat, destStat, src, dest, opts) { + if (!destStat) return copyFile(srcStat, src, dest, opts); + return mayCopyFile(srcStat, src, dest, opts); + } + function mayCopyFile(srcStat, src, dest, opts) { + if (opts.overwrite) { + fs3.unlinkSync(dest); + return copyFile(srcStat, src, dest, opts); + } else if (opts.errorOnExist) { + throw new Error(`'${dest}' already exists`); + } + } + function copyFile(srcStat, src, dest, opts) { + fs3.copyFileSync(src, dest); + if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest); + return setDestMode(dest, srcStat.mode); + } + function handleTimestamps(srcMode, src, dest) { + if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode); + return setDestTimestamps(src, dest); + } + function fileIsNotWritable(srcMode) { + return (srcMode & 128) === 0; + } + function makeFileWritable(dest, srcMode) { + return setDestMode(dest, srcMode | 128); + } + function setDestMode(dest, srcMode) { + return fs3.chmodSync(dest, srcMode); + } + function setDestTimestamps(src, dest) { + const updatedSrcStat = fs3.statSync(src); + return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime); + } + function onDir(srcStat, destStat, src, dest, opts) { + if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts); + return copyDir(src, dest, opts); + } + function mkDirAndCopy(srcMode, src, dest, opts) { + fs3.mkdirSync(dest); + copyDir(src, dest, opts); + return setDestMode(dest, srcMode); + } + function copyDir(src, dest, opts) { + fs3.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts)); + } + function copyDirItem(item, src, dest, opts) { + const srcItem = path5.join(src, item); + const destItem = path5.join(dest, item); + if (opts.filter && !opts.filter(srcItem, destItem)) return; + const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts); + return getStats(destStat, srcItem, destItem, opts); + } + function onLink(destStat, src, dest, opts) { + let resolvedSrc = fs3.readlinkSync(src); + if (opts.dereference) { + resolvedSrc = path5.resolve(process.cwd(), resolvedSrc); + } + if (!destStat) { + return fs3.symlinkSync(resolvedSrc, dest); + } else { + let resolvedDest; + try { + resolvedDest = fs3.readlinkSync(dest); + } catch (err) { + if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs3.symlinkSync(resolvedSrc, dest); + throw err; + } + if (opts.dereference) { + resolvedDest = path5.resolve(process.cwd(), resolvedDest); + } + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { + throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`); + } + if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) { + throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`); + } + return copyLink(resolvedSrc, dest); + } + } + function copyLink(resolvedSrc, dest) { + fs3.unlinkSync(dest); + return fs3.symlinkSync(resolvedSrc, dest); + } + module2.exports = copySync; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js +var require_copy2 = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + module2.exports = { + copy: u(require_copy()), + copySync: require_copy_sync() + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js +var require_remove = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var u = require_universalify().fromCallback; + function remove(path5, callback) { + fs3.rm(path5, { recursive: true, force: true }, callback); + } + function removeSync(path5) { + fs3.rmSync(path5, { recursive: true, force: true }); + } + module2.exports = { + remove: u(remove), + removeSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js +var require_empty = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var fs3 = require_fs(); + var path5 = require("path"); + var mkdir = require_mkdirs(); + var remove = require_remove(); + var emptyDir = u(async function emptyDir2(dir) { + let items; + try { + items = await fs3.readdir(dir); + } catch { + return mkdir.mkdirs(dir); + } + return Promise.all(items.map((item) => remove.remove(path5.join(dir, item)))); + }); + function emptyDirSync(dir) { + let items; + try { + items = fs3.readdirSync(dir); + } catch { + return mkdir.mkdirsSync(dir); + } + items.forEach((item) => { + item = path5.join(dir, item); + remove.removeSync(item); + }); + } + module2.exports = { + emptyDirSync, + emptydirSync: emptyDirSync, + emptyDir, + emptydir: emptyDir + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js +var require_file = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + var path5 = require("path"); + var fs3 = require_graceful_fs(); + var mkdir = require_mkdirs(); + function createFile(file2, callback) { + function makeFile() { + fs3.writeFile(file2, "", (err) => { + if (err) return callback(err); + callback(); + }); + } + fs3.stat(file2, (err, stats) => { + if (!err && stats.isFile()) return callback(); + const dir = path5.dirname(file2); + fs3.stat(dir, (err2, stats2) => { + if (err2) { + if (err2.code === "ENOENT") { + return mkdir.mkdirs(dir, (err3) => { + if (err3) return callback(err3); + makeFile(); + }); + } + return callback(err2); + } + if (stats2.isDirectory()) makeFile(); + else { + fs3.readdir(dir, (err3) => { + if (err3) return callback(err3); + }); + } + }); + }); + } + function createFileSync(file2) { + let stats; + try { + stats = fs3.statSync(file2); + } catch { + } + if (stats && stats.isFile()) return; + const dir = path5.dirname(file2); + try { + if (!fs3.statSync(dir).isDirectory()) { + fs3.readdirSync(dir); + } + } catch (err) { + if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir); + else throw err; + } + fs3.writeFileSync(file2, ""); + } + module2.exports = { + createFile: u(createFile), + createFileSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js +var require_link = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + var path5 = require("path"); + var fs3 = require_graceful_fs(); + var mkdir = require_mkdirs(); + var pathExists2 = require_path_exists().pathExists; + var { areIdentical } = require_stat(); + function createLink(srcpath, dstpath, callback) { + function makeLink(srcpath2, dstpath2) { + fs3.link(srcpath2, dstpath2, (err) => { + if (err) return callback(err); + callback(null); + }); + } + fs3.lstat(dstpath, (_, dstStat) => { + fs3.lstat(srcpath, (err, srcStat) => { + if (err) { + err.message = err.message.replace("lstat", "ensureLink"); + return callback(err); + } + if (dstStat && areIdentical(srcStat, dstStat)) return callback(null); + const dir = path5.dirname(dstpath); + pathExists2(dir, (err2, dirExists) => { + if (err2) return callback(err2); + if (dirExists) return makeLink(srcpath, dstpath); + mkdir.mkdirs(dir, (err3) => { + if (err3) return callback(err3); + makeLink(srcpath, dstpath); + }); + }); + }); + }); + } + function createLinkSync(srcpath, dstpath) { + let dstStat; + try { + dstStat = fs3.lstatSync(dstpath); + } catch { + } + try { + const srcStat = fs3.lstatSync(srcpath); + if (dstStat && areIdentical(srcStat, dstStat)) return; + } catch (err) { + err.message = err.message.replace("lstat", "ensureLink"); + throw err; + } + const dir = path5.dirname(dstpath); + const dirExists = fs3.existsSync(dir); + if (dirExists) return fs3.linkSync(srcpath, dstpath); + mkdir.mkdirsSync(dir); + return fs3.linkSync(srcpath, dstpath); + } + module2.exports = { + createLink: u(createLink), + createLinkSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js +var require_symlink_paths = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + var fs3 = require_graceful_fs(); + var pathExists2 = require_path_exists().pathExists; + function symlinkPaths(srcpath, dstpath, callback) { + if (path5.isAbsolute(srcpath)) { + return fs3.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace("lstat", "ensureSymlink"); + return callback(err); + } + return callback(null, { + toCwd: srcpath, + toDst: srcpath + }); + }); + } else { + const dstdir = path5.dirname(dstpath); + const relativeToDst = path5.join(dstdir, srcpath); + return pathExists2(relativeToDst, (err, exists) => { + if (err) return callback(err); + if (exists) { + return callback(null, { + toCwd: relativeToDst, + toDst: srcpath + }); + } else { + return fs3.lstat(srcpath, (err2) => { + if (err2) { + err2.message = err2.message.replace("lstat", "ensureSymlink"); + return callback(err2); + } + return callback(null, { + toCwd: srcpath, + toDst: path5.relative(dstdir, srcpath) + }); + }); + } + }); + } + } + function symlinkPathsSync(srcpath, dstpath) { + let exists; + if (path5.isAbsolute(srcpath)) { + exists = fs3.existsSync(srcpath); + if (!exists) throw new Error("absolute srcpath does not exist"); + return { + toCwd: srcpath, + toDst: srcpath + }; + } else { + const dstdir = path5.dirname(dstpath); + const relativeToDst = path5.join(dstdir, srcpath); + exists = fs3.existsSync(relativeToDst); + if (exists) { + return { + toCwd: relativeToDst, + toDst: srcpath + }; + } else { + exists = fs3.existsSync(srcpath); + if (!exists) throw new Error("relative srcpath does not exist"); + return { + toCwd: srcpath, + toDst: path5.relative(dstdir, srcpath) + }; + } + } + } + module2.exports = { + symlinkPaths, + symlinkPathsSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js +var require_symlink_type = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + function symlinkType(srcpath, type, callback) { + callback = typeof type === "function" ? type : callback; + type = typeof type === "function" ? false : type; + if (type) return callback(null, type); + fs3.lstat(srcpath, (err, stats) => { + if (err) return callback(null, "file"); + type = stats && stats.isDirectory() ? "dir" : "file"; + callback(null, type); + }); + } + function symlinkTypeSync(srcpath, type) { + let stats; + if (type) return type; + try { + stats = fs3.lstatSync(srcpath); + } catch { + return "file"; + } + return stats && stats.isDirectory() ? "dir" : "file"; + } + module2.exports = { + symlinkType, + symlinkTypeSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js +var require_symlink = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + var path5 = require("path"); + var fs3 = require_fs(); + var _mkdirs = require_mkdirs(); + var mkdirs = _mkdirs.mkdirs; + var mkdirsSync = _mkdirs.mkdirsSync; + var _symlinkPaths = require_symlink_paths(); + var symlinkPaths = _symlinkPaths.symlinkPaths; + var symlinkPathsSync = _symlinkPaths.symlinkPathsSync; + var _symlinkType = require_symlink_type(); + var symlinkType = _symlinkType.symlinkType; + var symlinkTypeSync = _symlinkType.symlinkTypeSync; + var pathExists2 = require_path_exists().pathExists; + var { areIdentical } = require_stat(); + function createSymlink(srcpath, dstpath, type, callback) { + callback = typeof type === "function" ? type : callback; + type = typeof type === "function" ? false : type; + fs3.lstat(dstpath, (err, stats) => { + if (!err && stats.isSymbolicLink()) { + Promise.all([ + fs3.stat(srcpath), + fs3.stat(dstpath) + ]).then(([srcStat, dstStat]) => { + if (areIdentical(srcStat, dstStat)) return callback(null); + _createSymlink(srcpath, dstpath, type, callback); + }); + } else _createSymlink(srcpath, dstpath, type, callback); + }); + } + function _createSymlink(srcpath, dstpath, type, callback) { + symlinkPaths(srcpath, dstpath, (err, relative) => { + if (err) return callback(err); + srcpath = relative.toDst; + symlinkType(relative.toCwd, type, (err2, type2) => { + if (err2) return callback(err2); + const dir = path5.dirname(dstpath); + pathExists2(dir, (err3, dirExists) => { + if (err3) return callback(err3); + if (dirExists) return fs3.symlink(srcpath, dstpath, type2, callback); + mkdirs(dir, (err4) => { + if (err4) return callback(err4); + fs3.symlink(srcpath, dstpath, type2, callback); + }); + }); + }); + }); + } + function createSymlinkSync(srcpath, dstpath, type) { + let stats; + try { + stats = fs3.lstatSync(dstpath); + } catch { + } + if (stats && stats.isSymbolicLink()) { + const srcStat = fs3.statSync(srcpath); + const dstStat = fs3.statSync(dstpath); + if (areIdentical(srcStat, dstStat)) return; + } + const relative = symlinkPathsSync(srcpath, dstpath); + srcpath = relative.toDst; + type = symlinkTypeSync(relative.toCwd, type); + const dir = path5.dirname(dstpath); + const exists = fs3.existsSync(dir); + if (exists) return fs3.symlinkSync(srcpath, dstpath, type); + mkdirsSync(dir); + return fs3.symlinkSync(srcpath, dstpath, type); + } + module2.exports = { + createSymlink: u(createSymlink), + createSymlinkSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js +var require_ensure = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports2, module2) { + "use strict"; + var { createFile, createFileSync } = require_file(); + var { createLink, createLinkSync } = require_link(); + var { createSymlink, createSymlinkSync } = require_symlink(); + module2.exports = { + // file + createFile, + createFileSync, + ensureFile: createFile, + ensureFileSync: createFileSync, + // link + createLink, + createLinkSync, + ensureLink: createLink, + ensureLinkSync: createLinkSync, + // symlink + createSymlink, + createSymlinkSync, + ensureSymlink: createSymlink, + ensureSymlinkSync: createSymlinkSync + }; + } +}); + +// ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js +var require_utils2 = __commonJS({ + "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports2, module2) { + "use strict"; + function stringify2(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) { + const EOF = finalEOL ? EOL : ""; + const str = JSON.stringify(obj, replacer, spaces); + return str.replace(/\n/g, EOL) + EOF; + } + function stripBom(content) { + if (Buffer.isBuffer(content)) content = content.toString("utf8"); + return content.replace(/^\uFEFF/, ""); + } + module2.exports = { stringify: stringify2, stripBom }; + } +}); + +// ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js +var require_jsonfile = __commonJS({ + "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports2, module2) { + "use strict"; + var _fs; + try { + _fs = require_graceful_fs(); + } catch (_) { + _fs = require("fs"); + } + var universalify = require_universalify(); + var { stringify: stringify2, stripBom } = require_utils2(); + async function _readFile(file2, options = {}) { + if (typeof options === "string") { + options = { encoding: options }; + } + const fs3 = options.fs || _fs; + const shouldThrow = "throws" in options ? options.throws : true; + let data = await universalify.fromCallback(fs3.readFile)(file2, options); + data = stripBom(data); + let obj; + try { + obj = JSON.parse(data, options ? options.reviver : null); + } catch (err) { + if (shouldThrow) { + err.message = `${file2}: ${err.message}`; + throw err; + } else { + return null; + } + } + return obj; + } + var readFile = universalify.fromPromise(_readFile); + function readFileSync(file2, options = {}) { + if (typeof options === "string") { + options = { encoding: options }; + } + const fs3 = options.fs || _fs; + const shouldThrow = "throws" in options ? options.throws : true; + try { + let content = fs3.readFileSync(file2, options); + content = stripBom(content); + return JSON.parse(content, options.reviver); + } catch (err) { + if (shouldThrow) { + err.message = `${file2}: ${err.message}`; + throw err; + } else { + return null; + } + } + } + async function _writeFile(file2, obj, options = {}) { + const fs3 = options.fs || _fs; + const str = stringify2(obj, options); + await universalify.fromCallback(fs3.writeFile)(file2, str, options); + } + var writeFile = universalify.fromPromise(_writeFile); + function writeFileSync(file2, obj, options = {}) { + const fs3 = options.fs || _fs; + const str = stringify2(obj, options); + return fs3.writeFileSync(file2, str, options); + } + var jsonfile = { + readFile, + readFileSync, + writeFile, + writeFileSync + }; + module2.exports = jsonfile; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js +var require_jsonfile2 = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports2, module2) { + "use strict"; + var jsonFile = require_jsonfile(); + module2.exports = { + // jsonfile exports + readJson: jsonFile.readFile, + readJsonSync: jsonFile.readFileSync, + writeJson: jsonFile.writeFile, + writeJsonSync: jsonFile.writeFileSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js +var require_output_file = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var mkdir = require_mkdirs(); + var pathExists2 = require_path_exists().pathExists; + function outputFile(file2, data, encoding, callback) { + if (typeof encoding === "function") { + callback = encoding; + encoding = "utf8"; + } + const dir = path5.dirname(file2); + pathExists2(dir, (err, itDoes) => { + if (err) return callback(err); + if (itDoes) return fs3.writeFile(file2, data, encoding, callback); + mkdir.mkdirs(dir, (err2) => { + if (err2) return callback(err2); + fs3.writeFile(file2, data, encoding, callback); + }); + }); + } + function outputFileSync(file2, ...args) { + const dir = path5.dirname(file2); + if (fs3.existsSync(dir)) { + return fs3.writeFileSync(file2, ...args); + } + mkdir.mkdirsSync(dir); + fs3.writeFileSync(file2, ...args); + } + module2.exports = { + outputFile: u(outputFile), + outputFileSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js +var require_output_json = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js"(exports2, module2) { + "use strict"; + var { stringify: stringify2 } = require_utils2(); + var { outputFile } = require_output_file(); + async function outputJson(file2, data, options = {}) { + const str = stringify2(data, options); + await outputFile(file2, str, options); + } + module2.exports = outputJson; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js +var require_output_json_sync = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports2, module2) { + "use strict"; + var { stringify: stringify2 } = require_utils2(); + var { outputFileSync } = require_output_file(); + function outputJsonSync(file2, data, options) { + const str = stringify2(data, options); + outputFileSync(file2, str, options); + } + module2.exports = outputJsonSync; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js +var require_json = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var jsonFile = require_jsonfile2(); + jsonFile.outputJson = u(require_output_json()); + jsonFile.outputJsonSync = require_output_json_sync(); + jsonFile.outputJSON = jsonFile.outputJson; + jsonFile.outputJSONSync = jsonFile.outputJsonSync; + jsonFile.writeJSON = jsonFile.writeJson; + jsonFile.writeJSONSync = jsonFile.writeJsonSync; + jsonFile.readJSON = jsonFile.readJson; + jsonFile.readJSONSync = jsonFile.readJsonSync; + module2.exports = jsonFile; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js +var require_move = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var copy = require_copy2().copy; + var remove = require_remove().remove; + var mkdirp = require_mkdirs().mkdirp; + var pathExists2 = require_path_exists().pathExists; + var stat = require_stat(); + function move(src, dest, opts, cb) { + if (typeof opts === "function") { + cb = opts; + opts = {}; + } + opts = opts || {}; + const overwrite = opts.overwrite || opts.clobber || false; + stat.checkPaths(src, dest, "move", opts, (err, stats) => { + if (err) return cb(err); + const { srcStat, isChangingCase = false } = stats; + stat.checkParentPaths(src, srcStat, dest, "move", (err2) => { + if (err2) return cb(err2); + if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb); + mkdirp(path5.dirname(dest), (err3) => { + if (err3) return cb(err3); + return doRename(src, dest, overwrite, isChangingCase, cb); + }); + }); + }); + } + function isParentRoot(dest) { + const parent = path5.dirname(dest); + const parsedPath = path5.parse(parent); + return parsedPath.root === parent; + } + function doRename(src, dest, overwrite, isChangingCase, cb) { + if (isChangingCase) return rename(src, dest, overwrite, cb); + if (overwrite) { + return remove(dest, (err) => { + if (err) return cb(err); + return rename(src, dest, overwrite, cb); + }); + } + pathExists2(dest, (err, destExists) => { + if (err) return cb(err); + if (destExists) return cb(new Error("dest already exists.")); + return rename(src, dest, overwrite, cb); + }); + } + function rename(src, dest, overwrite, cb) { + fs3.rename(src, dest, (err) => { + if (!err) return cb(); + if (err.code !== "EXDEV") return cb(err); + return moveAcrossDevice(src, dest, overwrite, cb); + }); + } + function moveAcrossDevice(src, dest, overwrite, cb) { + const opts = { + overwrite, + errorOnExist: true, + preserveTimestamps: true + }; + copy(src, dest, opts, (err) => { + if (err) return cb(err); + return remove(src, cb); + }); + } + module2.exports = move; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js +var require_move_sync = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var copySync = require_copy2().copySync; + var removeSync = require_remove().removeSync; + var mkdirpSync = require_mkdirs().mkdirpSync; + var stat = require_stat(); + function moveSync(src, dest, opts) { + opts = opts || {}; + const overwrite = opts.overwrite || opts.clobber || false; + const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts); + stat.checkParentPathsSync(src, srcStat, dest, "move"); + if (!isParentRoot(dest)) mkdirpSync(path5.dirname(dest)); + return doRename(src, dest, overwrite, isChangingCase); + } + function isParentRoot(dest) { + const parent = path5.dirname(dest); + const parsedPath = path5.parse(parent); + return parsedPath.root === parent; + } + function doRename(src, dest, overwrite, isChangingCase) { + if (isChangingCase) return rename(src, dest, overwrite); + if (overwrite) { + removeSync(dest); + return rename(src, dest, overwrite); + } + if (fs3.existsSync(dest)) throw new Error("dest already exists."); + return rename(src, dest, overwrite); + } + function rename(src, dest, overwrite) { + try { + fs3.renameSync(src, dest); + } catch (err) { + if (err.code !== "EXDEV") throw err; + return moveAcrossDevice(src, dest, overwrite); + } + } + function moveAcrossDevice(src, dest, overwrite) { + const opts = { + overwrite, + errorOnExist: true, + preserveTimestamps: true + }; + copySync(src, dest, opts); + return removeSync(src); + } + module2.exports = moveSync; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js +var require_move2 = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + module2.exports = { + move: u(require_move()), + moveSync: require_move_sync() + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = { + // Export promiseified graceful-fs: + ...require_fs(), + // Export extra methods: + ...require_copy2(), + ...require_empty(), + ...require_ensure(), + ...require_json(), + ...require_mkdirs(), + ...require_move2(), + ...require_output_file(), + ...require_path_exists(), + ...require_remove() + }; + } +}); + +// ../../node_modules/.pnpm/common-path-prefix@3.0.0/node_modules/common-path-prefix/index.js +var require_common_path_prefix = __commonJS({ + "../../node_modules/.pnpm/common-path-prefix@3.0.0/node_modules/common-path-prefix/index.js"(exports2, module2) { + "use strict"; + var { sep: DEFAULT_SEPARATOR } = require("path"); + var determineSeparator = (paths2) => { + for (const path5 of paths2) { + const match = /(\/|\\)/.exec(path5); + if (match !== null) return match[0]; + } + return DEFAULT_SEPARATOR; + }; + module2.exports = function commonPathPrefix2(paths2, sep = determineSeparator(paths2)) { + const [first = "", ...remaining] = paths2; + if (first === "" || remaining.length === 0) return ""; + const parts = first.split(sep); + let endOfPrefix = parts.length; + for (const path5 of remaining) { + const compare = path5.split(sep); + for (let i = 0; i < endOfPrefix; i++) { + if (compare[i] !== parts[i]) { + endOfPrefix = i; + } + } + if (endOfPrefix === 0) return ""; + } + const prefix = parts.slice(0, endOfPrefix).join(sep); + return prefix.endsWith(sep) ? prefix : prefix + sep; + }; + } +}); + +// ../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js +var require_indent_string = __commonJS({ + "../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string, count = 1, options) => { + options = { + indent: " ", + includeEmptyLines: false, + ...options + }; + if (typeof string !== "string") { + throw new TypeError( + `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` + ); + } + if (typeof count !== "number") { + throw new TypeError( + `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` + ); + } + if (typeof options.indent !== "string") { + throw new TypeError( + `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` + ); + } + if (count === 0) { + return string; + } + const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + return string.replace(regex, options.indent.repeat(count)); + }; + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js +var require_identifier = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isIdentifierChar = isIdentifierChar; + exports2.isIdentifierName = isIdentifierName2; + exports2.isIdentifierStart = isIdentifierStart; + var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; + var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65"; + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; + var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + function isInAstralSet(code, set) { + let pos = 65536; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + return false; + } + function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); + } + function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + } + function isIdentifierName2(name) { + let isFirst = true; + for (let i = 0; i < name.length; i++) { + let cp = name.charCodeAt(i); + if ((cp & 64512) === 55296 && i + 1 < name.length) { + const trail = name.charCodeAt(++i); + if ((trail & 64512) === 56320) { + cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); + } + } + if (isFirst) { + isFirst = false; + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; + } + } + return !isFirst; + } + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js +var require_keyword = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isKeyword = isKeyword; + exports2.isReservedWord = isReservedWord; + exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; + exports2.isStrictBindReservedWord = isStrictBindReservedWord; + exports2.isStrictReservedWord = isStrictReservedWord; + var reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] + }; + var keywords = new Set(reservedWords.keyword); + var reservedWordsStrictSet = new Set(reservedWords.strict); + var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); + function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; + } + function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); + } + function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); + } + function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); + } + function isKeyword(word) { + return keywords.has(word); + } + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/index.js +var require_lib2 = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "isIdentifierChar", { + enumerable: true, + get: function() { + return _identifier.isIdentifierChar; + } + }); + Object.defineProperty(exports2, "isIdentifierName", { + enumerable: true, + get: function() { + return _identifier.isIdentifierName; + } + }); + Object.defineProperty(exports2, "isIdentifierStart", { + enumerable: true, + get: function() { + return _identifier.isIdentifierStart; + } + }); + Object.defineProperty(exports2, "isKeyword", { + enumerable: true, + get: function() { + return _keyword.isKeyword; + } + }); + Object.defineProperty(exports2, "isReservedWord", { + enumerable: true, + get: function() { + return _keyword.isReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindOnlyReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictReservedWord; + } + }); + var _identifier = require_identifier(); + var _keyword = require_keyword(); + } +}); + +// ../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js +var require_pluralize = __commonJS({ + "../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js"(exports2, module2) { + "use strict"; + (function(root, pluralize3) { + if (typeof require === "function" && typeof exports2 === "object" && typeof module2 === "object") { + module2.exports = pluralize3(); + } else if (typeof define === "function" && define.amd) { + define(function() { + return pluralize3(); + }); + } else { + root.pluralize = pluralize3(); + } + })(exports2, function() { + var pluralRules = []; + var singularRules = []; + var uncountables = {}; + var irregularPlurals = {}; + var irregularSingles = {}; + function sanitizeRule(rule) { + if (typeof rule === "string") { + return new RegExp("^" + rule + "$", "i"); + } + return rule; + } + function restoreCase(word, token) { + if (word === token) return token; + if (word === word.toLowerCase()) return token.toLowerCase(); + if (word === word.toUpperCase()) return token.toUpperCase(); + if (word[0] === word[0].toUpperCase()) { + return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); + } + return token.toLowerCase(); + } + function interpolate(str, args) { + return str.replace(/\$(\d{1,2})/g, function(match, index) { + return args[index] || ""; + }); + } + function replace(word, rule) { + return word.replace(rule[0], function(match, index) { + var result = interpolate(rule[1], arguments); + if (match === "") { + return restoreCase(word[index - 1], result); + } + return restoreCase(match, result); + }); + } + function sanitizeWord(token, word, rules) { + if (!token.length || uncountables.hasOwnProperty(token)) { + return word; + } + var len = rules.length; + while (len--) { + var rule = rules[len]; + if (rule[0].test(word)) return replace(word, rule); + } + return word; + } + function replaceWord(replaceMap, keepMap, rules) { + return function(word) { + var token = word.toLowerCase(); + if (keepMap.hasOwnProperty(token)) { + return restoreCase(word, token); + } + if (replaceMap.hasOwnProperty(token)) { + return restoreCase(word, replaceMap[token]); + } + return sanitizeWord(token, word, rules); + }; + } + function checkWord(replaceMap, keepMap, rules, bool) { + return function(word) { + var token = word.toLowerCase(); + if (keepMap.hasOwnProperty(token)) return true; + if (replaceMap.hasOwnProperty(token)) return false; + return sanitizeWord(token, token, rules) === token; + }; + } + function pluralize3(word, count, inclusive) { + var pluralized = count === 1 ? pluralize3.singular(word) : pluralize3.plural(word); + return (inclusive ? count + " " : "") + pluralized; + } + pluralize3.plural = replaceWord( + irregularSingles, + irregularPlurals, + pluralRules + ); + pluralize3.isPlural = checkWord( + irregularSingles, + irregularPlurals, + pluralRules + ); + pluralize3.singular = replaceWord( + irregularPlurals, + irregularSingles, + singularRules + ); + pluralize3.isSingular = checkWord( + irregularPlurals, + irregularSingles, + singularRules + ); + pluralize3.addPluralRule = function(rule, replacement) { + pluralRules.push([sanitizeRule(rule), replacement]); + }; + pluralize3.addSingularRule = function(rule, replacement) { + singularRules.push([sanitizeRule(rule), replacement]); + }; + pluralize3.addUncountableRule = function(word) { + if (typeof word === "string") { + uncountables[word.toLowerCase()] = true; + return; + } + pluralize3.addPluralRule(word, "$0"); + pluralize3.addSingularRule(word, "$0"); + }; + pluralize3.addIrregularRule = function(single, plural) { + plural = plural.toLowerCase(); + single = single.toLowerCase(); + irregularSingles[single] = plural; + irregularPlurals[plural] = single; + }; + [ + // Pronouns. + ["I", "we"], + ["me", "us"], + ["he", "they"], + ["she", "they"], + ["them", "them"], + ["myself", "ourselves"], + ["yourself", "yourselves"], + ["itself", "themselves"], + ["herself", "themselves"], + ["himself", "themselves"], + ["themself", "themselves"], + ["is", "are"], + ["was", "were"], + ["has", "have"], + ["this", "these"], + ["that", "those"], + // Words ending in with a consonant and `o`. + ["echo", "echoes"], + ["dingo", "dingoes"], + ["volcano", "volcanoes"], + ["tornado", "tornadoes"], + ["torpedo", "torpedoes"], + // Ends with `us`. + ["genus", "genera"], + ["viscus", "viscera"], + // Ends with `ma`. + ["stigma", "stigmata"], + ["stoma", "stomata"], + ["dogma", "dogmata"], + ["lemma", "lemmata"], + ["schema", "schemata"], + ["anathema", "anathemata"], + // Other irregular rules. + ["ox", "oxen"], + ["axe", "axes"], + ["die", "dice"], + ["yes", "yeses"], + ["foot", "feet"], + ["eave", "eaves"], + ["goose", "geese"], + ["tooth", "teeth"], + ["quiz", "quizzes"], + ["human", "humans"], + ["proof", "proofs"], + ["carve", "carves"], + ["valve", "valves"], + ["looey", "looies"], + ["thief", "thieves"], + ["groove", "grooves"], + ["pickaxe", "pickaxes"], + ["passerby", "passersby"] + ].forEach(function(rule) { + return pluralize3.addIrregularRule(rule[0], rule[1]); + }); + [ + [/s?$/i, "s"], + [/[^\u0000-\u007F]$/i, "$0"], + [/([^aeiou]ese)$/i, "$1"], + [/(ax|test)is$/i, "$1es"], + [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"], + [/(e[mn]u)s?$/i, "$1s"], + [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"], + [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"], + [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"], + [/(seraph|cherub)(?:im)?$/i, "$1im"], + [/(her|at|gr)o$/i, "$1oes"], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"], + [/sis$/i, "ses"], + [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"], + [/([^aeiouy]|qu)y$/i, "$1ies"], + [/([^ch][ieo][ln])ey$/i, "$1ies"], + [/(x|ch|ss|sh|zz)$/i, "$1es"], + [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"], + [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"], + [/(pe)(?:rson|ople)$/i, "$1ople"], + [/(child)(?:ren)?$/i, "$1ren"], + [/eaux$/i, "$0"], + [/m[ae]n$/i, "men"], + ["thou", "you"] + ].forEach(function(rule) { + return pluralize3.addPluralRule(rule[0], rule[1]); + }); + [ + [/s$/i, ""], + [/(ss)$/i, "$1"], + [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"], + [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"], + [/ies$/i, "y"], + [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"], + [/\b(mon|smil)ies$/i, "$1ey"], + [/\b((?:tit)?m|l)ice$/i, "$1ouse"], + [/(seraph|cherub)im$/i, "$1"], + [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"], + [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"], + [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"], + [/(test)(?:is|es)$/i, "$1is"], + [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"], + [/(alumn|alg|vertebr)ae$/i, "$1a"], + [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"], + [/(matr|append)ices$/i, "$1ix"], + [/(pe)(rson|ople)$/i, "$1rson"], + [/(child)ren$/i, "$1"], + [/(eau)x?$/i, "$1"], + [/men$/i, "man"] + ].forEach(function(rule) { + return pluralize3.addSingularRule(rule[0], rule[1]); + }); + [ + // Singular words with no plurals. + "adulthood", + "advice", + "agenda", + "aid", + "aircraft", + "alcohol", + "ammo", + "analytics", + "anime", + "athletics", + "audio", + "bison", + "blood", + "bream", + "buffalo", + "butter", + "carp", + "cash", + "chassis", + "chess", + "clothing", + "cod", + "commerce", + "cooperation", + "corps", + "debris", + "diabetes", + "digestion", + "elk", + "energy", + "equipment", + "excretion", + "expertise", + "firmware", + "flounder", + "fun", + "gallows", + "garbage", + "graffiti", + "hardware", + "headquarters", + "health", + "herpes", + "highjinks", + "homework", + "housework", + "information", + "jeans", + "justice", + "kudos", + "labour", + "literature", + "machinery", + "mackerel", + "mail", + "media", + "mews", + "moose", + "music", + "mud", + "manga", + "news", + "only", + "personnel", + "pike", + "plankton", + "pliers", + "police", + "pollution", + "premises", + "rain", + "research", + "rice", + "salmon", + "scissors", + "series", + "sewage", + "shambles", + "shrimp", + "software", + "species", + "staff", + "swine", + "tennis", + "traffic", + "transportation", + "trout", + "tuna", + "wealth", + "welfare", + "whiting", + "wildebeest", + "wildlife", + "you", + /pok[eé]mon$/i, + // Regexes. + /[^aeiou]ese$/i, + // "chinese", "japanese" + /deer$/i, + // "deer", "reindeer" + /fish$/i, + // "fish", "blowfish", "angelfish" + /measles$/i, + /o[iu]s$/i, + // "carnivorous" + /pox$/i, + // "chickpox", "smallpox" + /sheep$/i + ].forEach(pluralize3.addUncountableRule); + return pluralize3; + }); + } +}); + +// ../../node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js +var require_env_paths = __commonJS({ + "../../node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + var os2 = require("os"); + var homedir = os2.homedir(); + var tmpdir = os2.tmpdir(); + var { env: env2 } = process; + var macos = (name) => { + const library = path5.join(homedir, "Library"); + return { + data: path5.join(library, "Application Support", name), + config: path5.join(library, "Preferences", name), + cache: path5.join(library, "Caches", name), + log: path5.join(library, "Logs", name), + temp: path5.join(tmpdir, name) + }; + }; + var windows = (name) => { + const appData = env2.APPDATA || path5.join(homedir, "AppData", "Roaming"); + const localAppData = env2.LOCALAPPDATA || path5.join(homedir, "AppData", "Local"); + return { + // Data/config/cache/log are invented by me as Windows isn't opinionated about this + data: path5.join(localAppData, name, "Data"), + config: path5.join(appData, name, "Config"), + cache: path5.join(localAppData, name, "Cache"), + log: path5.join(localAppData, name, "Log"), + temp: path5.join(tmpdir, name) + }; + }; + var linux = (name) => { + const username = path5.basename(homedir); + return { + data: path5.join(env2.XDG_DATA_HOME || path5.join(homedir, ".local", "share"), name), + config: path5.join(env2.XDG_CONFIG_HOME || path5.join(homedir, ".config"), name), + cache: path5.join(env2.XDG_CACHE_HOME || path5.join(homedir, ".cache"), name), + // https://wiki.debian.org/XDGBaseDirectorySpecification#state + log: path5.join(env2.XDG_STATE_HOME || path5.join(homedir, ".local", "state"), name), + temp: path5.join(tmpdir, username, name) + }; + }; + var envPaths = (name, options) => { + if (typeof name !== "string") { + throw new TypeError(`Expected string, got ${typeof name}`); + } + options = Object.assign({ suffix: "nodejs" }, options); + if (options.suffix) { + name += `-${options.suffix}`; + } + if (process.platform === "darwin") { + return macos(name); + } + if (process.platform === "win32") { + return windows(name); + } + return linux(name); + }; + module2.exports = envPaths; + module2.exports.default = envPaths; + } +}); + +// ../../node_modules/.pnpm/path-exists@3.0.0/node_modules/path-exists/index.js +var require_path_exists2 = __commonJS({ + "../../node_modules/.pnpm/path-exists@3.0.0/node_modules/path-exists/index.js"(exports2, module2) { + "use strict"; + var fs3 = require("fs"); + module2.exports = (fp) => new Promise((resolve) => { + fs3.access(fp, (err) => { + resolve(!err); + }); + }); + module2.exports.sync = (fp) => { + try { + fs3.accessSync(fp); + return true; + } catch (err) { + return false; + } + }; + } +}); + +// ../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js +var require_p_try = __commonJS({ + "../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js"(exports2, module2) { + "use strict"; + var pTry = (fn, ...arguments_) => new Promise((resolve) => { + resolve(fn(...arguments_)); + }); + module2.exports = pTry; + module2.exports.default = pTry; + } +}); + +// ../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js +var require_p_limit = __commonJS({ + "../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js"(exports2, module2) { + "use strict"; + var pTry = require_p_try(); + var pLimit2 = (concurrency) => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up")); + } + const queue = []; + let activeCount = 0; + const next = () => { + activeCount--; + if (queue.length > 0) { + queue.shift()(); + } + }; + const run = (fn, resolve, ...args) => { + activeCount++; + const result = pTry(fn, ...args); + resolve(result); + result.then(next, next); + }; + const enqueue = (fn, resolve, ...args) => { + if (activeCount < concurrency) { + run(fn, resolve, ...args); + } else { + queue.push(run.bind(null, fn, resolve, ...args)); + } + }; + const generator = (fn, ...args) => new Promise((resolve) => enqueue(fn, resolve, ...args)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + }, + clearQueue: { + value: () => { + queue.length = 0; + } + } + }); + return generator; + }; + module2.exports = pLimit2; + module2.exports.default = pLimit2; + } +}); + +// ../../node_modules/.pnpm/p-locate@3.0.0/node_modules/p-locate/index.js +var require_p_locate = __commonJS({ + "../../node_modules/.pnpm/p-locate@3.0.0/node_modules/p-locate/index.js"(exports2, module2) { + "use strict"; + var pLimit2 = require_p_limit(); + var EndError = class extends Error { + constructor(value) { + super(); + this.value = value; + } + }; + var testElement = (el, tester) => Promise.resolve(el).then(tester); + var finder = (el) => Promise.all(el).then((val) => val[1] === true && Promise.reject(new EndError(val[0]))); + module2.exports = (iterable, tester, opts) => { + opts = Object.assign({ + concurrency: Infinity, + preserveOrder: true + }, opts); + const limit = pLimit2(opts.concurrency); + const items = [...iterable].map((el) => [el, limit(testElement, el, tester)]); + const checkLimit = pLimit2(opts.preserveOrder ? 1 : Infinity); + return Promise.all(items.map((el) => checkLimit(finder, el))).then(() => { + }).catch((err) => err instanceof EndError ? err.value : Promise.reject(err)); + }; + } +}); + +// ../../node_modules/.pnpm/locate-path@3.0.0/node_modules/locate-path/index.js +var require_locate_path = __commonJS({ + "../../node_modules/.pnpm/locate-path@3.0.0/node_modules/locate-path/index.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + var pathExists2 = require_path_exists2(); + var pLocate2 = require_p_locate(); + module2.exports = (iterable, options) => { + options = Object.assign({ + cwd: process.cwd() + }, options); + return pLocate2(iterable, (el) => pathExists2(path5.resolve(options.cwd, el)), options); + }; + module2.exports.sync = (iterable, options) => { + options = Object.assign({ + cwd: process.cwd() + }, options); + for (const el of iterable) { + if (pathExists2.sync(path5.resolve(options.cwd, el))) { + return el; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/find-up@3.0.0/node_modules/find-up/index.js +var require_find_up = __commonJS({ + "../../node_modules/.pnpm/find-up@3.0.0/node_modules/find-up/index.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + var locatePath2 = require_locate_path(); + module2.exports = (filename, opts = {}) => { + const startDir = path5.resolve(opts.cwd || ""); + const { root } = path5.parse(startDir); + const filenames = [].concat(filename); + return new Promise((resolve) => { + (function find(dir) { + locatePath2(filenames, { cwd: dir }).then((file2) => { + if (file2) { + resolve(path5.join(dir, file2)); + } else if (dir === root) { + resolve(null); + } else { + find(path5.dirname(dir)); + } + }); + })(startDir); + }); + }; + module2.exports.sync = (filename, opts = {}) => { + let dir = path5.resolve(opts.cwd || ""); + const { root } = path5.parse(dir); + const filenames = [].concat(filename); + while (true) { + const file2 = locatePath2.sync(filenames, { cwd: dir }); + if (file2) { + return path5.join(dir, file2); + } + if (dir === root) { + return null; + } + dir = path5.dirname(dir); + } + }; + } +}); + +// ../../node_modules/.pnpm/pkg-up@3.1.0/node_modules/pkg-up/index.js +var require_pkg_up = __commonJS({ + "../../node_modules/.pnpm/pkg-up@3.1.0/node_modules/pkg-up/index.js"(exports2, module2) { + "use strict"; + var findUp2 = require_find_up(); + module2.exports = async ({ cwd: cwd2 } = {}) => findUp2("package.json", { cwd: cwd2 }); + module2.exports.sync = ({ cwd: cwd2 } = {}) => findUp2.sync("package.json", { cwd: cwd2 }); + } +}); + +// package.json +var require_package2 = __commonJS({ + "package.json"(exports2, module2) { + module2.exports = { + name: "@prisma/client", + version: "5.22.0", + description: "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.", + keywords: [ + "ORM", + "Prisma", + "prisma2", + "Prisma Client", + "client", + "query", + "query-builder", + "database", + "db", + "JavaScript", + "JS", + "TypeScript", + "TS", + "SQL", + "SQLite", + "pg", + "Postgres", + "PostgreSQL", + "CockroachDB", + "MySQL", + "MariaDB", + "MSSQL", + "SQL Server", + "SQLServer", + "MongoDB", + "react-native" + ], + main: "default.js", + types: "default.d.ts", + browser: "index-browser.js", + exports: { + "./package.json": "./package.json", + ".": { + require: { + types: "./default.d.ts", + node: "./default.js", + "edge-light": "./default.js", + workerd: "./default.js", + worker: "./default.js", + browser: "./index-browser.js" + }, + import: { + types: "./default.d.ts", + node: "./default.js", + "edge-light": "./default.js", + workerd: "./default.js", + worker: "./default.js", + browser: "./index-browser.js" + }, + default: "./default.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" + }, + "./*": "./*" + }, + license: "Apache-2.0", + engines: { + node: ">=16.13" + }, + homepage: "https://www.prisma.io", + repository: { + type: "git", + url: "https://github.com/prisma/prisma.git", + directory: "packages/client" + }, + author: "Tim Suchanek ", + bugs: "https://github.com/prisma/prisma/issues", + scripts: { + dev: "DEV=true tsx helpers/build.ts", + build: "tsx helpers/build.ts", + test: "dotenv -e ../../.db.env -- jest --silent", + "test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts", + "test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts", + "test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts", + "test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types", + "test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only", + "test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts", + generate: "node scripts/postinstall.js", + postinstall: "node scripts/postinstall.js", + prepublishOnly: "pnpm run build", + "new-test": "tsx ./helpers/new-test/new-test.ts" + }, + files: [ + "README.md", + "runtime", + "!runtime/*.map", + "scripts", + "generator-build", + "edge.js", + "edge.d.ts", + "wasm.js", + "wasm.d.ts", + "index.js", + "index.d.ts", + "react-native.js", + "react-native.d.ts", + "default.js", + "default.d.ts", + "index-browser.js", + "extension.js", + "extension.d.ts", + "sql.d.ts", + "sql.js", + "sql.mjs" + ], + devDependencies: { + "@cloudflare/workers-types": "4.20240614.0", + "@codspeed/benchmark.js-plugin": "3.1.1", + "@faker-js/faker": "8.4.1", + "@fast-check/jest": "1.8.2", + "@inquirer/prompts": "5.0.5", + "@jest/create-cache-key-function": "29.7.0", + "@jest/globals": "29.7.0", + "@jest/test-sequencer": "29.7.0", + "@libsql/client": "0.8.0", + "@neondatabase/serverless": "0.9.3", + "@opentelemetry/api": "1.9.0", + "@opentelemetry/context-async-hooks": "1.25.1", + "@opentelemetry/instrumentation": "0.52.1", + "@opentelemetry/resources": "1.25.1", + "@opentelemetry/sdk-trace-base": "1.25.1", + "@opentelemetry/semantic-conventions": "1.25.1", + "@planetscale/database": "1.18.0", + "@prisma/adapter-d1": "workspace:*", + "@prisma/adapter-libsql": "workspace:*", + "@prisma/adapter-neon": "workspace:*", + "@prisma/adapter-pg": "workspace:*", + "@prisma/adapter-pg-worker": "workspace:*", + "@prisma/adapter-planetscale": "workspace:*", + "@prisma/debug": "workspace:*", + "@prisma/driver-adapter-utils": "workspace:*", + "@prisma/engines": "workspace:*", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/fetch-engine": "workspace:*", + "@prisma/generator-helper": "workspace:*", + "@prisma/get-platform": "workspace:*", + "@prisma/instrumentation": "workspace:*", + "@prisma/internals": "workspace:*", + "@prisma/migrate": "workspace:*", + "@prisma/mini-proxy": "0.9.5", + "@prisma/pg-worker": "workspace:*", + "@prisma/query-engine-wasm": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@snaplet/copycat": "0.17.3", + "@swc-node/register": "1.10.9", + "@swc/core": "1.6.13", + "@swc/jest": "0.2.36", + "@timsuchanek/copy": "1.4.5", + "@types/debug": "4.1.12", + "@types/fs-extra": "9.0.13", + "@types/jest": "29.5.12", + "@types/js-levenshtein": "1.1.3", + "@types/mssql": "9.1.5", + "@types/node": "18.19.31", + "@types/pg": "8.11.6", + arg: "5.0.2", + benchmark: "2.1.4", + "ci-info": "4.0.0", + "decimal.js": "10.4.3", + "detect-runtime": "1.0.4", + "env-paths": "2.2.1", + esbuild: "0.23.0", + execa: "5.1.1", + "expect-type": "0.19.0", + "flat-map-polyfill": "0.3.8", + "fs-extra": "11.1.1", + "get-stream": "6.0.1", + globby: "11.1.0", + "indent-string": "4.0.0", + jest: "29.7.0", + "jest-extended": "4.0.2", + "jest-junit": "16.0.0", + "jest-serializer-ansi-escapes": "3.0.0", + "jest-snapshot": "29.7.0", + "js-levenshtein": "1.1.6", + kleur: "4.1.5", + klona: "2.0.6", + mariadb: "3.3.1", + memfs: "4.9.3", + mssql: "11.0.1", + "new-github-issue-url": "0.2.1", + "node-fetch": "3.3.2", + "p-retry": "4.6.2", + pg: "8.11.5", + "pkg-up": "3.1.0", + pluralize: "8.0.0", + resolve: "1.22.8", + rimraf: "3.0.2", + "simple-statistics": "7.8.5", + "sort-keys": "4.2.0", + "source-map-support": "0.5.21", + "sql-template-tag": "5.2.1", + "stacktrace-parser": "0.1.10", + "strip-ansi": "6.0.1", + "strip-indent": "3.0.0", + "ts-node": "10.9.2", + "ts-pattern": "5.2.0", + tsd: "0.31.1", + typescript: "5.4.5", + undici: "5.28.4", + wrangler: "3.62.0", + zx: "7.2.3" + }, + peerDependencies: { + prisma: "*" + }, + peerDependenciesMeta: { + prisma: { + optional: true + } + }, + sideEffects: false + }; + } +}); + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/array-species-create.js +var require_array_species_create = __commonJS({ + "../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/array-species-create.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + exports2.default = arraySpeciesCreate; + function arraySpeciesCreate(originalArray, length) { + var isArray = Array.isArray(originalArray); + if (!isArray) { + return Array(length); + } + var C = Object.getPrototypeOf(originalArray).constructor; + if (C) { + if ((typeof C === "undefined" ? "undefined" : _typeof(C)) === "object" || typeof C === "function") { + C = C[Symbol.species.toString()]; + C = C !== null ? C : void 0; + } + if (C === void 0) { + return Array(length); + } + if (typeof C !== "function") { + throw TypeError("invalid constructor"); + } + var result = new C(length); + return result; + } + } + } +}); + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flatten-into-array.js +var require_flatten_into_array = __commonJS({ + "../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flatten-into-array.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = flattenIntoArray; + function flattenIntoArray(target, source, start, depth, mapperFunction, thisArg) { + var mapperFunctionProvied = mapperFunction !== void 0; + var targetIndex = start; + var sourceIndex = 0; + var sourceLen = source.length; + while (sourceIndex < sourceLen) { + var p = sourceIndex; + var exists = !!source[p]; + if (exists === true) { + var element = source[p]; + if (element) { + if (mapperFunctionProvied) { + element = mapperFunction.call(thisArg, element, sourceIndex, target); + } + var spreadable = Object.getOwnPropertySymbols(element).includes(Symbol.isConcatSpreadable) || Array.isArray(element); + if (spreadable === true && depth > 0) { + var nextIndex = flattenIntoArray(target, element, targetIndex, depth - 1); + targetIndex = nextIndex; + } else { + if (!Number.isSafeInteger(targetIndex)) { + throw TypeError(); + } + target[targetIndex] = element; + } + } + } + targetIndex += 1; + sourceIndex += 1; + } + return targetIndex; + } + } +}); + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flatten.js +var require_flatten = __commonJS({ + "../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flatten.js"() { + "use strict"; + var _arraySpeciesCreate = require_array_species_create(); + var _arraySpeciesCreate2 = _interopRequireDefault(_arraySpeciesCreate); + var _flattenIntoArray = require_flatten_into_array(); + var _flattenIntoArray2 = _interopRequireDefault(_flattenIntoArray); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + if (!Object.prototype.hasOwnProperty.call(Array.prototype, "flatten")) { + Array.prototype.flatten = function flatten(depth) { + var o = Object(this); + var a = (0, _arraySpeciesCreate2.default)(o, this.length); + var depthNum = depth !== void 0 ? Number(depth) : Infinity; + (0, _flattenIntoArray2.default)(a, o, 0, depthNum); + return a.filter(function(e) { + return e !== void 0; + }); + }; + } + } +}); + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flat-map.js +var require_flat_map = __commonJS({ + "../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flat-map.js"() { + "use strict"; + var _flattenIntoArray = require_flatten_into_array(); + var _flattenIntoArray2 = _interopRequireDefault(_flattenIntoArray); + var _arraySpeciesCreate = require_array_species_create(); + var _arraySpeciesCreate2 = _interopRequireDefault(_arraySpeciesCreate); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + if (!Object.prototype.hasOwnProperty.call(Array.prototype, "flatMap")) { + Array.prototype.flatMap = function flatMap(callbackFn, thisArg) { + var o = Object(this); + if (!callbackFn || typeof callbackFn.call !== "function") { + throw TypeError("callbackFn must be callable."); + } + var t = thisArg !== void 0 ? thisArg : void 0; + var a = (0, _arraySpeciesCreate2.default)(o, o.length); + (0, _flattenIntoArray2.default)( + a, + o, + /*start*/ + 0, + /*depth*/ + 1, + callbackFn, + t + ); + return a.filter(function(x) { + return x !== void 0; + }, a); + }; + } + } +}); + +// src/generation/ts-builders/KeyType.ts +var KeyType_exports = {}; +__export(KeyType_exports, { + KeyType: () => KeyType, + keyType: () => keyType +}); +function keyType(baseType, key) { + return new KeyType(baseType, key); +} +var KeyType; +var init_KeyType = __esm({ + "src/generation/ts-builders/KeyType.ts"() { + "use strict"; + init_TypeBuilder(); + KeyType = class extends TypeBuilder { + constructor(baseType, key) { + super(); + this.baseType = baseType; + this.key = key; + } + write(writer) { + this.baseType.writeIndexed(writer); + writer.write("[").write(`"${this.key}"`).write("]"); + } + }; + } +}); + +// src/generation/ts-builders/TypeBuilder.ts +var TypeBuilder; +var init_TypeBuilder = __esm({ + "src/generation/ts-builders/TypeBuilder.ts"() { + "use strict"; + TypeBuilder = class { + constructor() { + // TODO(@SevInf): this should be replaced with precedence system that would + // automatically add parenthesis where they are needed + this.needsParenthesisWhenIndexed = false; + this.needsParenthesisInKeyof = false; + this.needsParenthesisInUnion = false; + } + subKey(key) { + const { KeyType: KeyType2 } = (init_KeyType(), __toCommonJS(KeyType_exports)); + return new KeyType2(this, key); + } + writeIndexed(writer) { + if (this.needsParenthesisWhenIndexed) { + writer.write("("); + } + writer.write(this); + if (this.needsParenthesisWhenIndexed) { + writer.write(")"); + } + } + }; + } +}); + +// ../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/vendors.json +var require_vendors = __commonJS({ + "../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/vendors.json"(exports2, module2) { + module2.exports = [ + { + name: "Agola CI", + constant: "AGOLA", + env: "AGOLA_GIT_REF", + pr: "AGOLA_PULL_REQUEST_ID" + }, + { + name: "Appcircle", + constant: "APPCIRCLE", + env: "AC_APPCIRCLE" + }, + { + name: "AppVeyor", + constant: "APPVEYOR", + env: "APPVEYOR", + pr: "APPVEYOR_PULL_REQUEST_NUMBER" + }, + { + name: "AWS CodeBuild", + constant: "CODEBUILD", + env: "CODEBUILD_BUILD_ARN" + }, + { + name: "Azure Pipelines", + constant: "AZURE_PIPELINES", + env: "TF_BUILD", + pr: { + BUILD_REASON: "PullRequest" + } + }, + { + name: "Bamboo", + constant: "BAMBOO", + env: "bamboo_planKey" + }, + { + name: "Bitbucket Pipelines", + constant: "BITBUCKET", + env: "BITBUCKET_COMMIT", + pr: "BITBUCKET_PR_ID" + }, + { + name: "Bitrise", + constant: "BITRISE", + env: "BITRISE_IO", + pr: "BITRISE_PULL_REQUEST" + }, + { + name: "Buddy", + constant: "BUDDY", + env: "BUDDY_WORKSPACE_ID", + pr: "BUDDY_EXECUTION_PULL_REQUEST_ID" + }, + { + name: "Buildkite", + constant: "BUILDKITE", + env: "BUILDKITE", + pr: { + env: "BUILDKITE_PULL_REQUEST", + ne: "false" + } + }, + { + name: "CircleCI", + constant: "CIRCLE", + env: "CIRCLECI", + pr: "CIRCLE_PULL_REQUEST" + }, + { + name: "Cirrus CI", + constant: "CIRRUS", + env: "CIRRUS_CI", + pr: "CIRRUS_PR" + }, + { + name: "Codefresh", + constant: "CODEFRESH", + env: "CF_BUILD_ID", + pr: { + any: [ + "CF_PULL_REQUEST_NUMBER", + "CF_PULL_REQUEST_ID" + ] + } + }, + { + name: "Codemagic", + constant: "CODEMAGIC", + env: "CM_BUILD_ID", + pr: "CM_PULL_REQUEST" + }, + { + name: "Codeship", + constant: "CODESHIP", + env: { + CI_NAME: "codeship" + } + }, + { + name: "Drone", + constant: "DRONE", + env: "DRONE", + pr: { + DRONE_BUILD_EVENT: "pull_request" + } + }, + { + name: "dsari", + constant: "DSARI", + env: "DSARI" + }, + { + name: "Earthly", + constant: "EARTHLY", + env: "EARTHLY_CI" + }, + { + name: "Expo Application Services", + constant: "EAS", + env: "EAS_BUILD" + }, + { + name: "Gerrit", + constant: "GERRIT", + env: "GERRIT_PROJECT" + }, + { + name: "Gitea Actions", + constant: "GITEA_ACTIONS", + env: "GITEA_ACTIONS" + }, + { + name: "GitHub Actions", + constant: "GITHUB_ACTIONS", + env: "GITHUB_ACTIONS", + pr: { + GITHUB_EVENT_NAME: "pull_request" + } + }, + { + name: "GitLab CI", + constant: "GITLAB", + env: "GITLAB_CI", + pr: "CI_MERGE_REQUEST_ID" + }, + { + name: "GoCD", + constant: "GOCD", + env: "GO_PIPELINE_LABEL" + }, + { + name: "Google Cloud Build", + constant: "GOOGLE_CLOUD_BUILD", + env: "BUILDER_OUTPUT" + }, + { + name: "Harness CI", + constant: "HARNESS", + env: "HARNESS_BUILD_ID" + }, + { + name: "Heroku", + constant: "HEROKU", + env: { + env: "NODE", + includes: "/app/.heroku/node/bin/node" + } + }, + { + name: "Hudson", + constant: "HUDSON", + env: "HUDSON_URL" + }, + { + name: "Jenkins", + constant: "JENKINS", + env: [ + "JENKINS_URL", + "BUILD_ID" + ], + pr: { + any: [ + "ghprbPullId", + "CHANGE_ID" + ] + } + }, + { + name: "LayerCI", + constant: "LAYERCI", + env: "LAYERCI", + pr: "LAYERCI_PULL_REQUEST" + }, + { + name: "Magnum CI", + constant: "MAGNUM", + env: "MAGNUM" + }, + { + name: "Netlify CI", + constant: "NETLIFY", + env: "NETLIFY", + pr: { + env: "PULL_REQUEST", + ne: "false" + } + }, + { + name: "Nevercode", + constant: "NEVERCODE", + env: "NEVERCODE", + pr: { + env: "NEVERCODE_PULL_REQUEST", + ne: "false" + } + }, + { + name: "Prow", + constant: "PROW", + env: "PROW_JOB_ID" + }, + { + name: "ReleaseHub", + constant: "RELEASEHUB", + env: "RELEASE_BUILD_ID" + }, + { + name: "Render", + constant: "RENDER", + env: "RENDER", + pr: { + IS_PULL_REQUEST: "true" + } + }, + { + name: "Sail CI", + constant: "SAIL", + env: "SAILCI", + pr: "SAIL_PULL_REQUEST_NUMBER" + }, + { + name: "Screwdriver", + constant: "SCREWDRIVER", + env: "SCREWDRIVER", + pr: { + env: "SD_PULL_REQUEST", + ne: "false" + } + }, + { + name: "Semaphore", + constant: "SEMAPHORE", + env: "SEMAPHORE", + pr: "PULL_REQUEST_NUMBER" + }, + { + name: "Sourcehut", + constant: "SOURCEHUT", + env: { + CI_NAME: "sourcehut" + } + }, + { + name: "Strider CD", + constant: "STRIDER", + env: "STRIDER" + }, + { + name: "TaskCluster", + constant: "TASKCLUSTER", + env: [ + "TASK_ID", + "RUN_ID" + ] + }, + { + name: "TeamCity", + constant: "TEAMCITY", + env: "TEAMCITY_VERSION" + }, + { + name: "Travis CI", + constant: "TRAVIS", + env: "TRAVIS", + pr: { + env: "TRAVIS_PULL_REQUEST", + ne: "false" + } + }, + { + name: "Vela", + constant: "VELA", + env: "VELA", + pr: { + VELA_PULL_REQUEST: "1" + } + }, + { + name: "Vercel", + constant: "VERCEL", + env: { + any: [ + "NOW_BUILDER", + "VERCEL" + ] + }, + pr: "VERCEL_GIT_PULL_REQUEST_ID" + }, + { + name: "Visual Studio App Center", + constant: "APPCENTER", + env: "APPCENTER_BUILD_ID" + }, + { + name: "Woodpecker", + constant: "WOODPECKER", + env: { + CI: "woodpecker" + }, + pr: { + CI_BUILD_EVENT: "pull_request" + } + }, + { + name: "Xcode Cloud", + constant: "XCODE_CLOUD", + env: "CI_XCODE_PROJECT", + pr: "CI_PULL_REQUEST_NUMBER" + }, + { + name: "Xcode Server", + constant: "XCODE_SERVER", + env: "XCS" + } + ]; + } +}); + +// ../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/index.js +var require_ci_info = __commonJS({ + "../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/index.js"(exports2) { + "use strict"; + var vendors = require_vendors(); + var env2 = process.env; + Object.defineProperty(exports2, "_vendors", { + value: vendors.map(function(v) { + return v.constant; + }) + }); + exports2.name = null; + exports2.isPR = null; + vendors.forEach(function(vendor) { + const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]; + const isCI = envs.every(function(obj) { + return checkEnv(obj); + }); + exports2[vendor.constant] = isCI; + if (!isCI) { + return; + } + exports2.name = vendor.name; + switch (typeof vendor.pr) { + case "string": + exports2.isPR = !!env2[vendor.pr]; + break; + case "object": + if ("env" in vendor.pr) { + exports2.isPR = vendor.pr.env in env2 && env2[vendor.pr.env] !== vendor.pr.ne; + } else if ("any" in vendor.pr) { + exports2.isPR = vendor.pr.any.some(function(key) { + return !!env2[key]; + }); + } else { + exports2.isPR = checkEnv(vendor.pr); + } + break; + default: + exports2.isPR = null; + } + }); + exports2.isCI = !!(env2.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false' + (env2.BUILD_ID || // Jenkins, Cloudbees + env2.BUILD_NUMBER || // Jenkins, TeamCity + env2.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari + env2.CI_APP_ID || // Appflow + env2.CI_BUILD_ID || // Appflow + env2.CI_BUILD_NUMBER || // Appflow + env2.CI_NAME || // Codeship and others + env2.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI + env2.RUN_ID || // TaskCluster, dsari + exports2.name || false)); + function checkEnv(obj) { + if (typeof obj === "string") return !!env2[obj]; + if ("env" in obj) { + return env2[obj.env] && env2[obj.env].includes(obj.includes); + } + if ("any" in obj) { + return obj.any.some(function(k) { + return !!env2[k]; + }); + } + return Object.keys(obj).every(function(k) { + return env2[k] === obj[k]; + }); + } + } +}); + +// src/generation/generator.ts +var generator_exports = {}; +__export(generator_exports, { + dmmfToTypes: () => dmmfToTypes, + externalToInternalDmmf: () => externalToInternalDmmf +}); +module.exports = __toCommonJS(generator_exports); + +// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +var colors_exports = {}; +__export(colors_exports, { + $: () => $, + bgBlack: () => bgBlack, + bgBlue: () => bgBlue, + bgCyan: () => bgCyan, + bgGreen: () => bgGreen, + bgMagenta: () => bgMagenta, + bgRed: () => bgRed, + bgWhite: () => bgWhite, + bgYellow: () => bgYellow, + black: () => black, + blue: () => blue, + bold: () => bold, + cyan: () => cyan, + dim: () => dim, + gray: () => gray, + green: () => green, + grey: () => grey, + hidden: () => hidden, + inverse: () => inverse, + italic: () => italic, + magenta: () => magenta, + red: () => red, + reset: () => reset, + strikethrough: () => strikethrough, + underline: () => underline, + white: () => white, + yellow: () => yellow +}); +var FORCE_COLOR; +var NODE_DISABLE_COLORS; +var NO_COLOR; +var TERM; +var isTTY = true; +if (typeof process !== "undefined") { + ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}); + isTTY = process.stdout && process.stdout.isTTY; +} +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"); + let open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + if (!$.enabled || txt == null) return txt; + return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0); +var bold = init(1, 22); +var dim = init(2, 22); +var italic = init(3, 23); +var underline = init(4, 24); +var inverse = init(7, 27); +var hidden = init(8, 28); +var strikethrough = init(9, 29); +var black = init(30, 39); +var red = init(31, 39); +var green = init(32, 39); +var yellow = init(33, 39); +var blue = init(34, 39); +var magenta = init(35, 39); +var cyan = init(36, 39); +var white = init(37, 39); +var gray = init(90, 39); +var grey = init(90, 39); +var bgBlack = init(40, 49); +var bgRed = init(41, 49); +var bgGreen = init(42, 49); +var bgYellow = init(43, 49); +var bgBlue = init(44, 49); +var bgMagenta = init(45, 49); +var bgCyan = init(46, 49); +var bgWhite = init(47, 49); + +// ../debug/src/index.ts +var MAX_ARGS_HISTORY = 100; +var COLORS = ["green", "yellow", "blue", "magenta", "cyan", "red"]; +var argsHistory = []; +var lastTimestamp = Date.now(); +var lastColor = 0; +var processEnv = typeof process !== "undefined" ? process.env : {}; +globalThis.DEBUG ??= processEnv.DEBUG ?? ""; +globalThis.DEBUG_COLORS ??= processEnv.DEBUG_COLORS ? processEnv.DEBUG_COLORS === "true" : true; +var topProps = { + enable(namespace2) { + if (typeof namespace2 === "string") { + globalThis.DEBUG = namespace2; + } + }, + disable() { + const prev = globalThis.DEBUG; + globalThis.DEBUG = ""; + return prev; + }, + // this is the core logic to check if logging should happen or not + enabled(namespace2) { + const listenedNamespaces = globalThis.DEBUG.split(",").map((s) => { + return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&"); + }); + const isListened = listenedNamespaces.some((listenedNamespace) => { + if (listenedNamespace === "" || listenedNamespace[0] === "-") return false; + return namespace2.match(RegExp(listenedNamespace.split("*").join(".*") + "$")); + }); + const isExcluded = listenedNamespaces.some((listenedNamespace) => { + if (listenedNamespace === "" || listenedNamespace[0] !== "-") return false; + return namespace2.match(RegExp(listenedNamespace.slice(1).split("*").join(".*") + "$")); + }); + return isListened && !isExcluded; + }, + log: (...args) => { + const [namespace2, format, ...rest] = args; + const logWithFormatting = console.warn ?? console.log; + logWithFormatting(`${namespace2} ${format}`, ...rest); + }, + formatters: {} + // not implemented +}; +function debugCreate(namespace2) { + const instanceProps = { + color: COLORS[lastColor++ % COLORS.length], + enabled: topProps.enabled(namespace2), + namespace: namespace2, + log: topProps.log, + extend: () => { + } + // not implemented + }; + const debugCall = (...args) => { + const { enabled, namespace: namespace3, color, log } = instanceProps; + if (args.length !== 0) { + argsHistory.push([namespace3, ...args]); + } + if (argsHistory.length > MAX_ARGS_HISTORY) { + argsHistory.shift(); + } + if (topProps.enabled(namespace3) || enabled) { + const stringArgs = args.map((arg) => { + if (typeof arg === "string") { + return arg; + } + return safeStringify(arg); + }); + const ms = `+${Date.now() - lastTimestamp}ms`; + lastTimestamp = Date.now(); + if (globalThis.DEBUG_COLORS) { + log(colors_exports[color](bold(namespace3)), ...stringArgs, colors_exports[color](ms)); + } else { + log(namespace3, ...stringArgs, ms); + } + } + }; + return new Proxy(debugCall, { + get: (_, prop) => instanceProps[prop], + set: (_, prop, value) => instanceProps[prop] = value + }); +} +var Debug = new Proxy(debugCreate, { + get: (_, prop) => topProps[prop], + set: (_, prop, value) => topProps[prop] = value +}); +function safeStringify(value, indent9 = 2) { + const cache = /* @__PURE__ */ new Set(); + return JSON.stringify( + value, + (key, value2) => { + if (typeof value2 === "object" && value2 !== null) { + if (cache.has(value2)) { + return `[Circular *]`; + } + cache.add(value2); + } else if (typeof value2 === "bigint") { + return value2.toString(); + } + return value2; + }, + indent9 + ); +} +var src_default = Debug; + +// src/generation/generator.ts +var import_engines_version = __toESM(require_engines_version()); + +// ../generator-helper/src/dmmf.ts +var DMMF; +((DMMF2) => { + let ModelAction; + ((ModelAction2) => { + ModelAction2["findUnique"] = "findUnique"; + ModelAction2["findUniqueOrThrow"] = "findUniqueOrThrow"; + ModelAction2["findFirst"] = "findFirst"; + ModelAction2["findFirstOrThrow"] = "findFirstOrThrow"; + ModelAction2["findMany"] = "findMany"; + ModelAction2["create"] = "create"; + ModelAction2["createMany"] = "createMany"; + ModelAction2["createManyAndReturn"] = "createManyAndReturn"; + ModelAction2["update"] = "update"; + ModelAction2["updateMany"] = "updateMany"; + ModelAction2["upsert"] = "upsert"; + ModelAction2["delete"] = "delete"; + ModelAction2["deleteMany"] = "deleteMany"; + ModelAction2["groupBy"] = "groupBy"; + ModelAction2["count"] = "count"; + ModelAction2["aggregate"] = "aggregate"; + ModelAction2["findRaw"] = "findRaw"; + ModelAction2["aggregateRaw"] = "aggregateRaw"; + })(ModelAction = DMMF2.ModelAction || (DMMF2.ModelAction = {})); +})(DMMF || (DMMF = {})); + +// ../generator-helper/src/byline.ts +var import_stream = __toESM(require("stream")); +var import_util = __toESM(require("util")); +function byline(readStream, options) { + return createStream(readStream, options); +} +function createStream(readStream, options) { + if (readStream) { + return createLineStream(readStream, options); + } else { + return new LineStream(options); + } +} +function createLineStream(readStream, options) { + if (!readStream) { + throw new Error("expected readStream"); + } + if (!readStream.readable) { + throw new Error("readStream must be readable"); + } + const ls = new LineStream(options); + readStream.pipe(ls); + return ls; +} +function LineStream(options) { + import_stream.default.Transform.call(this, options); + options = options || {}; + this._readableState.objectMode = true; + this._lineBuffer = []; + this._keepEmptyLines = options.keepEmptyLines || false; + this._lastChunkEndedWithCR = false; + this.on("pipe", function(src) { + if (!this.encoding) { + if (src instanceof import_stream.default.Readable) { + this.encoding = src._readableState.encoding; + } + } + }); +} +import_util.default.inherits(LineStream, import_stream.default.Transform); +LineStream.prototype._transform = function(chunk, encoding, done) { + encoding = encoding || "utf8"; + if (Buffer.isBuffer(chunk)) { + if (encoding == "buffer") { + chunk = chunk.toString(); + encoding = "utf8"; + } else { + chunk = chunk.toString(encoding); + } + } + this._chunkEncoding = encoding; + const lines = chunk.split(/\r\n|\r|\n/g); + if (this._lastChunkEndedWithCR && chunk[0] == "\n") { + lines.shift(); + } + if (this._lineBuffer.length > 0) { + this._lineBuffer[this._lineBuffer.length - 1] += lines[0]; + lines.shift(); + } + this._lastChunkEndedWithCR = chunk[chunk.length - 1] == "\r"; + this._lineBuffer = this._lineBuffer.concat(lines); + this._pushBuffer(encoding, 1, done); +}; +LineStream.prototype._pushBuffer = function(encoding, keep, done) { + while (this._lineBuffer.length > keep) { + const line = this._lineBuffer.shift(); + if (this._keepEmptyLines || line.length > 0) { + if (!this.push(this._reencode(line, encoding))) { + const self = this; + setImmediate(function() { + self._pushBuffer(encoding, keep, done); + }); + return; + } + } + } + done(); +}; +LineStream.prototype._flush = function(done) { + this._pushBuffer(this._chunkEncoding, 0, done); +}; +LineStream.prototype._reencode = function(line, chunkEncoding) { + if (this.encoding && this.encoding != chunkEncoding) { + return Buffer.from(line, chunkEncoding).toString(this.encoding); + } else if (this.encoding) { + return line; + } else { + return Buffer.from(line, chunkEncoding); + } +}; + +// ../generator-helper/src/generatorHandler.ts +function generatorHandler(handler) { + byline(process.stdin).on("data", async (line) => { + const json = JSON.parse(String(line)); + if (json.method === "generate" && json.params) { + try { + const result = await handler.onGenerate(json.params); + respond({ + jsonrpc: "2.0", + result, + id: json.id + }); + } catch (_e) { + const e = _e; + respond({ + jsonrpc: "2.0", + error: { + code: -32e3, + message: e.message, + data: { + stack: e.stack + } + }, + id: json.id + }); + } + } + if (json.method === "getManifest") { + if (handler.onManifest) { + try { + const manifest = handler.onManifest(json.params); + respond({ + jsonrpc: "2.0", + result: { + manifest + }, + id: json.id + }); + } catch (_e) { + const e = _e; + respond({ + jsonrpc: "2.0", + error: { + code: -32e3, + message: e.message, + data: { + stack: e.stack + } + }, + id: json.id + }); + } + } else { + respond({ + jsonrpc: "2.0", + result: { + manifest: null + }, + id: json.id + }); + } + } + }); + process.stdin.resume(); +} +function respond(response) { + console.error(JSON.stringify(response)); +} + +// ../get-platform/src/getNodeAPIName.ts +var NODE_API_QUERY_ENGINE_URL_BASE = "libquery_engine"; +function getNodeAPIName(binaryTarget, type) { + const isUrl = type === "url"; + if (binaryTarget.includes("windows")) { + return isUrl ? `query_engine.dll.node` : `query_engine-${binaryTarget}.dll.node`; + } else if (binaryTarget.includes("darwin")) { + return isUrl ? `${NODE_API_QUERY_ENGINE_URL_BASE}.dylib.node` : `${NODE_API_QUERY_ENGINE_URL_BASE}-${binaryTarget}.dylib.node`; + } else { + return isUrl ? `${NODE_API_QUERY_ENGINE_URL_BASE}.so.node` : `${NODE_API_QUERY_ENGINE_URL_BASE}-${binaryTarget}.so.node`; + } +} + +// ../../node_modules/.pnpm/find-cache-dir@5.0.0/node_modules/find-cache-dir/index.js +var import_node_process = __toESM(require("process"), 1); +var import_common_path_prefix = __toESM(require_common_path_prefix(), 1); + +// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js +var findUpStop = Symbol("findUpStop"); + +// ../../node_modules/.pnpm/find-cache-dir@5.0.0/node_modules/find-cache-dir/index.js +var { env, cwd } = import_node_process.default; + +// ../fetch-engine/src/utils.ts +var import_fs = __toESM(require("fs")); +var import_os = __toESM(require("os")); +var debug = src_default("prisma:fetch-engine:cache-dir"); +async function overwriteFile(sourcePath, targetPath) { + if (import_os.default.platform() === "darwin") { + await removeFileIfExists(targetPath); + await import_fs.default.promises.copyFile(sourcePath, targetPath); + } else { + let tempPath = `${targetPath}.tmp${process.pid}`; + await import_fs.default.promises.copyFile(sourcePath, tempPath); + await import_fs.default.promises.rename(tempPath, targetPath); + } +} +async function removeFileIfExists(filePath) { + try { + await import_fs.default.promises.unlink(filePath); + } catch (e) { + if (e.code !== "ENOENT") { + throw e; + } + } +} + +// ../internals/src/client/getClientEngineType.ts +var DEFAULT_CLIENT_ENGINE_TYPE = "library" /* Library */; +function getClientEngineType(generatorConfig) { + const engineTypeFromEnvVar = getEngineTypeFromEnvVar(); + if (engineTypeFromEnvVar) return engineTypeFromEnvVar; + if (generatorConfig?.config.engineType === "library" /* Library */) { + return "library" /* Library */; + } else if (generatorConfig?.config.engineType === "binary" /* Binary */) { + return "binary" /* Binary */; + } else { + return DEFAULT_CLIENT_ENGINE_TYPE; + } +} +function getEngineTypeFromEnvVar() { + const engineType = process.env.PRISMA_CLIENT_ENGINE_TYPE; + if (engineType === "library" /* Library */) { + return "library" /* Library */; + } else if (engineType === "binary" /* Binary */) { + return "binary" /* Binary */; + } else { + return void 0; + } +} + +// ../internals/src/utils/parseEnvValue.ts +function parseEnvValue(object) { + if (object.fromEnvVar && object.fromEnvVar != "null") { + const value = process.env[object.fromEnvVar]; + if (!value) { + throw new Error( + `Attempted to load provider value using \`env(${object.fromEnvVar})\` but it was not present. Please ensure that ${dim( + object.fromEnvVar + )} is present in your Environment Variables` + ); + } + return value; + } + return object.value; +} + +// ../internals/src/utils/path.ts +var import_path = __toESM(require("path")); +function pathToPosix(filePath) { + if (import_path.default.sep === import_path.default.posix.sep) { + return filePath; + } + return filePath.split(import_path.default.sep).join(import_path.default.posix.sep); +} + +// ../internals/src/utils/parseAWSNodejsRuntimeEnvVarVersion.ts +function parseAWSNodejsRuntimeEnvVarVersion() { + const runtimeEnvVar = process.env.AWS_LAMBDA_JS_RUNTIME; + if (!runtimeEnvVar || runtimeEnvVar === "") return null; + try { + const runtimeRegex = /^nodejs(\d+).x$/; + const match = runtimeRegex.exec(runtimeEnvVar); + if (match) { + return parseInt(match[1]); + } + } catch (e) { + console.error( + `We could not parse the AWS_LAMBDA_JS_RUNTIME env var with the following value: ${runtimeEnvVar}. This was silently ignored.` + ); + } + return null; +} + +// ../internals/src/utils/assertNever.ts +function assertNever(arg, errorMessage) { + throw new Error(errorMessage); +} + +// ../internals/src/utils/hasOwnProperty.ts +function hasOwnProperty(object, key) { + return Object.prototype.hasOwnProperty.call(object, key); +} + +// ../internals/src/utils/isValidJsIdentifier.ts +var import_helper_validator_identifier = __toESM(require_lib2()); +function isValidJsIdentifier(str) { + return (0, import_helper_validator_identifier.isIdentifierName)(str); +} + +// ../internals/src/utils/setClassName.ts +function setClassName(classObject, name) { + Object.defineProperty(classObject, "name", { + value: name, + configurable: true + }); +} + +// src/runtime/externalToInternalDmmf.ts +var import_pluralize = __toESM(require_pluralize()); + +// src/generation/utils/common.ts +var keyBy = (collection, prop) => { + const acc = {}; + for (const obj of collection) { + const key = obj[prop]; + acc[key] = obj; + } + return acc; +}; +function needsNamespace(field) { + if (field.kind === "object") { + return true; + } + if (field.kind === "scalar") { + return field.type === "Json" || field.type === "Decimal"; + } + return false; +} +var GraphQLScalarToJSTypeTable = { + String: "string", + Int: "number", + Float: "number", + Boolean: "boolean", + Long: "number", + DateTime: ["Date", "string"], + ID: "string", + UUID: "string", + Json: "JsonValue", + Bytes: "Buffer", + Decimal: ["Decimal", "DecimalJsLike", "number", "string"], + BigInt: ["bigint", "number"] +}; +var JSOutputTypeToInputType = { + JsonValue: "InputJsonValue" +}; +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); +} +function lowerCase(name) { + return name.substring(0, 1).toLowerCase() + name.substring(1); +} + +// src/runtime/externalToInternalDmmf.ts +function externalToInternalDmmf(document) { + return { + ...document, + mappings: getMappings(document.mappings, document.datamodel) + }; +} +function getMappings(mappings, datamodel) { + const modelOperations = mappings.modelOperations.filter((mapping) => { + const model = datamodel.models.find((m) => m.name === mapping.model); + if (!model) { + throw new Error(`Mapping without model ${mapping.model}`); + } + return model.fields.some((f) => f.kind !== "object"); + }).map((mapping) => ({ + model: mapping.model, + plural: (0, import_pluralize.default)(lowerCase(mapping.model)), + // TODO not needed anymore + findUnique: mapping.findUnique || mapping.findSingle, + findUniqueOrThrow: mapping.findUniqueOrThrow, + findFirst: mapping.findFirst, + findFirstOrThrow: mapping.findFirstOrThrow, + findMany: mapping.findMany, + create: mapping.createOne || mapping.createSingle || mapping.create, + createMany: mapping.createMany, + createManyAndReturn: mapping.createManyAndReturn, + delete: mapping.deleteOne || mapping.deleteSingle || mapping.delete, + update: mapping.updateOne || mapping.updateSingle || mapping.update, + deleteMany: mapping.deleteMany, + updateMany: mapping.updateMany, + upsert: mapping.upsertOne || mapping.upsertSingle || mapping.upsert, + aggregate: mapping.aggregate, + groupBy: mapping.groupBy, + findRaw: mapping.findRaw, + aggregateRaw: mapping.aggregateRaw + })); + return { + modelOperations, + otherOperations: mappings.otherOperations + }; +} + +// src/generation/generateClient.ts +var import_crypto2 = require("crypto"); +var import_env_paths = __toESM(require_env_paths()); +var import_fs2 = require("fs"); +var import_promises = __toESM(require("fs/promises")); +var import_fs_extra = __toESM(require_lib()); +var import_path5 = __toESM(require("path")); +var import_pkg_up = __toESM(require_pkg_up()); +var import_package = __toESM(require_package2()); + +// src/generation/getDMMF.ts +function getPrismaClientDMMF(dmmf) { + return externalToInternalDmmf(dmmf); +} + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/index.js +require_flatten(); +require_flat_map(); + +// src/generation/TSClient/Enum.ts +var import_indent_string = __toESM(require_indent_string()); + +// src/runtime/core/types/exported/ObjectEnums.ts +var objectEnumNames = ["JsonNullValueInput", "NullableJsonNullValueInput", "JsonNullValueFilter"]; +var secret = Symbol(); +var representations = /* @__PURE__ */ new WeakMap(); +var ObjectEnumValue = class { + constructor(arg) { + if (arg === secret) { + representations.set(this, `Prisma.${this._getName()}`); + } else { + representations.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); + } + } + _getName() { + return this.constructor.name; + } + toString() { + return representations.get(this); + } +}; +var NullTypesEnumValue = class extends ObjectEnumValue { + _getNamespace() { + return "NullTypes"; + } +}; +var DbNull = class extends NullTypesEnumValue { +}; +setClassName2(DbNull, "DbNull"); +var JsonNull = class extends NullTypesEnumValue { +}; +setClassName2(JsonNull, "JsonNull"); +var AnyNull = class extends NullTypesEnumValue { +}; +setClassName2(AnyNull, "AnyNull"); +var objectEnumValues = { + classes: { + DbNull, + JsonNull, + AnyNull + }, + instances: { + DbNull: new DbNull(secret), + JsonNull: new JsonNull(secret), + AnyNull: new AnyNull(secret) + } +}; +function setClassName2(classObject, name) { + Object.defineProperty(classObject, "name", { + value: name, + configurable: true + }); +} + +// src/runtime/strictEnum.ts +var strictEnumNames = ["TransactionIsolationLevel"]; + +// src/generation/TSClient/constants.ts +var TAB_SIZE = 2; + +// src/generation/TSClient/Enum.ts +var Enum = class { + constructor(type, useNamespace) { + this.type = type; + this.useNamespace = useNamespace; + } + isObjectEnum() { + return this.useNamespace && objectEnumNames.includes(this.type.name); + } + isStrictEnum() { + return this.useNamespace && strictEnumNames.includes(this.type.name); + } + toJS() { + const { type } = this; + const enumVariants = `{ +${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValueJS(v)}`).join(",\n"), TAB_SIZE)} +}`; + const enumBody = this.isStrictEnum() ? `makeStrictEnum(${enumVariants})` : enumVariants; + return this.useNamespace ? `exports.Prisma.${type.name} = ${enumBody};` : `exports.${type.name} = exports.$Enums.${type.name} = ${enumBody};`; + } + getValueJS(value) { + return this.isObjectEnum() ? `Prisma.${value}` : `'${value}'`; + } + toTS() { + const { type } = this; + return `export const ${type.name}: { +${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValueTS(v)}`).join(",\n"), TAB_SIZE)} +}; + +export type ${type.name} = (typeof ${type.name})[keyof typeof ${type.name}] +`; + } + getValueTS(value) { + return this.isObjectEnum() ? `typeof ${value}` : `'${value}'`; + } +}; + +// src/generation/TSClient/Generable.ts +function JS(gen) { + return gen.toJS?.() ?? ""; +} +function BrowserJS(gen) { + return gen.toBrowserJS?.() ?? ""; +} +function TS(gen) { + return gen.toTS(); +} + +// src/generation/TSClient/Input.ts +var import_indent_string2 = __toESM(require_indent_string()); + +// src/runtime/utils/uniqueBy.ts +function uniqueBy(arr, callee) { + const result = {}; + for (const value of arr) { + const hash = callee(value); + if (!result[hash]) { + result[hash] = value; + } + } + return Object.values(result); +} + +// src/generation/ts-builders/ArraySpread.ts +init_TypeBuilder(); +var ArraySpread = class extends TypeBuilder { + constructor(innerType) { + super(); + this.innerType = innerType; + } + write(writer) { + writer.write("[...").write(this.innerType).write("]"); + } +}; +function arraySpread(innerType) { + return new ArraySpread(innerType); +} + +// src/generation/ts-builders/ArrayType.ts +init_TypeBuilder(); +var ArrayType = class extends TypeBuilder { + constructor(elementType) { + super(); + this.elementType = elementType; + } + write(writer) { + this.elementType.writeIndexed(writer); + writer.write("[]"); + } +}; +function array(elementType) { + return new ArrayType(elementType); +} + +// src/generation/ts-builders/ConstDeclaration.ts +var ConstDeclaration = class { + constructor(name, type) { + this.name = name; + this.type = type; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + writer.write("const ").write(this.name).write(": ").write(this.type); + } +}; +function constDeclaration(name, type) { + return new ConstDeclaration(name, type); +} + +// src/generation/ts-builders/DocComment.ts +var DocComment = class { + constructor(startingText) { + this.lines = []; + if (startingText) { + this.addText(startingText); + } + } + addText(text) { + this.lines.push(...text.split("\n")); + return this; + } + write(writer) { + writer.writeLine("/**"); + for (const line of this.lines) { + writer.writeLine(` * ${line}`); + } + writer.writeLine(" */"); + return writer; + } +}; +function docComment(firstParameter, ...args) { + if (typeof firstParameter === "string" || typeof firstParameter === "undefined") { + return new DocComment(firstParameter); + } + return docCommentTag(firstParameter, args); +} +function docCommentTag(strings, args) { + const docComment2 = new DocComment(); + const fullText = strings.flatMap((str, i) => { + if (i < args.length) { + return [str, args[i]]; + } + return [str]; + }).join(""); + const lines = trimEmptyLines(fullText.split("\n")); + if (lines.length === 0) { + return docComment2; + } + const indent9 = getIndent(lines[0]); + for (const line of lines) { + docComment2.addText(line.slice(indent9)); + } + return docComment2; +} +function trimEmptyLines(lines) { + const firstLine = findFirstNonEmptyLine(lines); + const lastLine = findLastNonEmptyLine(lines); + if (firstLine === -1 || lastLine === -1) { + return []; + } + return lines.slice(firstLine, lastLine + 1); +} +function findFirstNonEmptyLine(lines) { + return lines.findIndex((line) => !isEmptyLine(line)); +} +function findLastNonEmptyLine(lines) { + let i = lines.length - 1; + while (i > 0 && isEmptyLine(lines[i])) { + i--; + } + return i; +} +function isEmptyLine(line) { + return line.trim().length === 0; +} +function getIndent(line) { + let indent9 = 0; + while (line[indent9] === " ") { + indent9++; + } + return indent9; +} + +// src/generation/ts-builders/Export.ts +var Export = class { + constructor(declaration) { + this.declaration = declaration; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + writer.write("export ").write(this.declaration); + } +}; +function moduleExport(declaration) { + return new Export(declaration); +} + +// src/generation/ts-builders/ExportFrom.ts +var NamespaceExport = class { + constructor(from, namespace2) { + this.from = from; + this.namespace = namespace2; + } + write(writer) { + writer.write(`export * as ${this.namespace} from '${this.from}'`); + } +}; +var BindingsExport = class { + constructor(from) { + this.from = from; + this.namedExports = []; + } + named(namedExport) { + if (typeof namedExport === "string") { + namedExport = new NamedExport(namedExport); + } + this.namedExports.push(namedExport); + return this; + } + write(writer) { + writer.write("export ").write("{ ").writeJoined(", ", this.namedExports).write(" }").write(` from "${this.from}"`); + } +}; +var NamedExport = class { + constructor(name) { + this.name = name; + } + as(alias) { + this.alias = alias; + return this; + } + write(writer) { + writer.write(this.name); + if (this.alias) { + writer.write(" as ").write(this.alias); + } + } +}; +var ExportAllFrom = class { + constructor(from) { + this.from = from; + } + asNamespace(namespace2) { + return new NamespaceExport(this.from, namespace2); + } + named(binding) { + return new BindingsExport(this.from).named(binding); + } + write(writer) { + writer.write(`export * from "${this.from}"`); + } +}; +function moduleExportFrom(from) { + return new ExportAllFrom(from); +} + +// src/generation/ts-builders/File.ts +var File = class { + constructor() { + this.imports = []; + this.declarations = []; + } + addImport(moduleImport2) { + this.imports.push(moduleImport2); + return this; + } + add(declaration) { + this.declarations.push(declaration); + } + write(writer) { + for (const moduleImport2 of this.imports) { + writer.writeLine(moduleImport2); + } + if (this.imports.length > 0) { + writer.newLine(); + } + for (const [i, declaration] of this.declarations.entries()) { + writer.writeLine(declaration); + if (i < this.declarations.length - 1) { + writer.newLine(); + } + } + } +}; +function file() { + return new File(); +} + +// src/generation/ts-builders/PrimitiveType.ts +init_TypeBuilder(); +var PrimitiveType = class extends TypeBuilder { + constructor(name) { + super(); + this.name = name; + } + write(writer) { + writer.write(this.name); + } +}; +var stringType = new PrimitiveType("string"); +var numberType = new PrimitiveType("number"); +var booleanType = new PrimitiveType("boolean"); +var nullType = new PrimitiveType("null"); +var undefinedType = new PrimitiveType("undefined"); +var bigintType = new PrimitiveType("bigint"); +var unknownType = new PrimitiveType("unknown"); +var anyType = new PrimitiveType("any"); +var voidType = new PrimitiveType("void"); +var thisType = new PrimitiveType("this"); +var neverType = new PrimitiveType("never"); + +// src/generation/ts-builders/FunctionType.ts +init_TypeBuilder(); +var FunctionType = class extends TypeBuilder { + constructor() { + super(...arguments); + this.needsParenthesisWhenIndexed = true; + this.needsParenthesisInKeyof = true; + this.needsParenthesisInUnion = true; + this.returnType = voidType; + this.parameters = []; + this.genericParameters = []; + } + setReturnType(returnType) { + this.returnType = returnType; + return this; + } + addParameter(param) { + this.parameters.push(param); + return this; + } + addGenericParameter(param) { + this.genericParameters.push(param); + return this; + } + write(writer) { + if (this.genericParameters.length > 0) { + writer.write("<").writeJoined(", ", this.genericParameters).write(">"); + } + writer.write("(").writeJoined(", ", this.parameters).write(") => ").write(this.returnType); + } +}; +function functionType() { + return new FunctionType(); +} + +// src/generation/ts-builders/NamedType.ts +init_TypeBuilder(); +var NamedType = class extends TypeBuilder { + constructor(name) { + super(); + this.name = name; + this.genericArguments = []; + } + addGenericArgument(type) { + this.genericArguments.push(type); + return this; + } + write(writer) { + writer.write(this.name); + if (this.genericArguments.length > 0) { + writer.write("<").writeJoined(", ", this.genericArguments).write(">"); + } + } +}; +function namedType(name) { + return new NamedType(name); +} + +// src/generation/ts-builders/GenericParameter.ts +var GenericParameter = class { + constructor(name) { + this.name = name; + } + extends(type) { + this.extendedType = type; + return this; + } + default(type) { + this.defaultType = type; + return this; + } + toArgument() { + return new NamedType(this.name); + } + write(writer) { + writer.write(this.name); + if (this.extendedType) { + writer.write(" extends ").write(this.extendedType); + } + if (this.defaultType) { + writer.write(" = ").write(this.defaultType); + } + } +}; +function genericParameter(name) { + return new GenericParameter(name); +} + +// src/generation/ts-builders/helpers.ts +function omit(type, keyType2) { + return namedType("Omit").addGenericArgument(type).addGenericArgument(keyType2); +} +function promise(resultType) { + return new NamedType("$Utils.JsPromise").addGenericArgument(resultType); +} +function prismaPromise(resultType) { + return new NamedType("Prisma.PrismaPromise").addGenericArgument(resultType); +} +function optional(innerType) { + return new NamedType("$Utils.Optional").addGenericArgument(innerType); +} + +// src/generation/ts-builders/Import.ts +var NamespaceImport = class { + constructor(alias, from) { + this.alias = alias; + this.from = from; + } + write(writer) { + writer.write("import * as ").write(this.alias).write(` from "${this.from}"`); + } +}; +var BindingsImport = class { + constructor(from) { + this.from = from; + this.namedImports = []; + } + default(name) { + this.defaultImport = name; + return this; + } + named(namedImport) { + if (typeof namedImport === "string") { + namedImport = new NamedImport(namedImport); + } + this.namedImports.push(namedImport); + return this; + } + write(writer) { + writer.write("import "); + if (this.defaultImport) { + writer.write(this.defaultImport); + if (this.hasNamedImports()) { + writer.write(", "); + } + } + if (this.hasNamedImports()) { + writer.write("{ ").writeJoined(", ", this.namedImports).write(" }"); + } + writer.write(` from "${this.from}"`); + } + hasNamedImports() { + return this.namedImports.length > 0; + } +}; +var NamedImport = class { + constructor(name) { + this.name = name; + } + as(alias) { + this.alias = alias; + return this; + } + write(writer) { + writer.write(this.name); + if (this.alias) { + writer.write(" as ").write(this.alias); + } + } +}; +var ModuleImport = class { + constructor(from) { + this.from = from; + } + asNamespace(alias) { + return new NamespaceImport(alias, this.from); + } + default(alias) { + return new BindingsImport(this.from).default(alias); + } + named(namedImport) { + return new BindingsImport(this.from).named(namedImport); + } + write(writer) { + writer.write("import ").write(`"${this.from}"`); + } +}; +function moduleImport(from) { + return new ModuleImport(from); +} + +// src/generation/ts-builders/Interface.ts +init_TypeBuilder(); +var InterfaceDeclaration = class extends TypeBuilder { + constructor(name) { + super(); + this.name = name; + this.needsParenthesisWhenIndexed = true; + this.items = []; + this.genericParameters = []; + this.extendedTypes = []; + } + add(item) { + this.items.push(item); + return this; + } + addMultiple(items) { + for (const item of items) { + this.add(item); + } + return this; + } + addGenericParameter(param) { + this.genericParameters.push(param); + return this; + } + extends(type) { + this.extendedTypes.push(type); + return this; + } + write(writer) { + writer.write("interface ").write(this.name); + if (this.genericParameters.length > 0) { + writer.write("<").writeJoined(", ", this.genericParameters).write(">"); + } + if (this.extendedTypes.length > 0) { + writer.write(" extends ").writeJoined(", ", this.extendedTypes); + } + if (this.items.length === 0) { + writer.writeLine(" {}"); + return; + } + writer.writeLine(" {").withIndent(() => { + for (const item of this.items) { + writer.writeLine(item); + } + }).write("}"); + } +}; +function interfaceDeclaration(name) { + return new InterfaceDeclaration(name); +} + +// src/generation/ts-builders/Method.ts +var Method = class { + constructor(name) { + this.name = name; + this.returnType = voidType; + this.parameters = []; + this.genericParameters = []; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + setReturnType(returnType) { + this.returnType = returnType; + return this; + } + addParameter(param) { + this.parameters.push(param); + return this; + } + addGenericParameter(param) { + this.genericParameters.push(param); + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + writer.write(this.name); + if (this.genericParameters.length > 0) { + writer.write("<").writeJoined(", ", this.genericParameters).write(">"); + } + writer.write("("); + if (this.parameters.length > 0) { + writer.writeJoined(", ", this.parameters); + } + writer.write(")"); + if (this.name !== "constructor") { + writer.write(": ").write(this.returnType); + } + } +}; +function method(name) { + return new Method(name); +} + +// src/generation/ts-builders/NamespaceDeclaration.ts +var NamespaceDeclaration = class { + constructor(name) { + this.name = name; + this.items = []; + } + add(declaration) { + this.items.push(declaration); + } + write(writer) { + writer.writeLine(`namespace ${this.name} {`).withIndent(() => { + for (const item of this.items) { + writer.writeLine(item); + } + }).write("}"); + } +}; +function namespace(name) { + return new NamespaceDeclaration(name); +} + +// src/generation/ts-builders/ObjectType.ts +init_TypeBuilder(); +var ObjectType = class extends TypeBuilder { + constructor() { + super(...arguments); + this.needsParenthesisWhenIndexed = true; + this.items = []; + this.inline = false; + } + add(item) { + this.items.push(item); + return this; + } + addMultiple(items) { + for (const item of items) { + this.add(item); + } + return this; + } + formatInline() { + this.inline = true; + return this; + } + write(writer) { + if (this.items.length === 0) { + writer.write("{}"); + } else if (this.inline) { + this.writeInline(writer); + } else { + this.writeMultiline(writer); + } + } + writeMultiline(writer) { + writer.writeLine("{").withIndent(() => { + for (const item of this.items) { + writer.writeLine(item); + } + }).write("}"); + } + writeInline(writer) { + writer.write("{ ").writeJoined(", ", this.items).write(" }"); + } +}; +function objectType() { + return new ObjectType(); +} + +// src/generation/ts-builders/Parameter.ts +var Parameter = class { + constructor(name, type) { + this.name = name; + this.type = type; + this.isOptional = false; + } + optional() { + this.isOptional = true; + return this; + } + write(writer) { + writer.write(this.name); + if (this.isOptional) { + writer.write("?"); + } + writer.write(": ").write(this.type); + } +}; +function parameter(name, type) { + return new Parameter(name, type); +} + +// src/generation/ts-builders/Property.ts +var Property = class { + constructor(name, type) { + this.name = name; + this.type = type; + this.isOptional = false; + this.isReadonly = false; + } + optional() { + this.isOptional = true; + return this; + } + readonly() { + this.isReadonly = true; + return this; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + if (this.isReadonly) { + writer.write("readonly "); + } + if (typeof this.name === "string") { + if (isValidJsIdentifier(this.name)) { + writer.write(this.name); + } else { + writer.write("[").write(JSON.stringify(this.name)).write("]"); + } + } else { + writer.write("[").write(this.name).write("]"); + } + if (this.isOptional) { + writer.write("?"); + } + writer.write(": ").write(this.type); + } +}; +function property(name, type) { + return new Property(name, type); +} + +// src/generation/ts-builders/Writer.ts +var INDENT_SIZE = 2; +var Writer = class { + constructor(startingIndent = 0, context) { + this.context = context; + this.lines = []; + this.currentLine = ""; + this.currentIndent = 0; + this.currentIndent = startingIndent; + } + /** + * Adds provided value to the current line. Does not end the line. + * + * @param value + * @returns + */ + write(value) { + if (typeof value === "string") { + this.currentLine += value; + } else { + value.write(this); + } + return this; + } + /** + * Adds several `values` to the current line, separated by `separator`. Both values and separator + * can also be `Builder` instances for more advanced formatting. + * + * @param separator + * @param values + * @param writeItem allow to customize how individual item is written + * @returns + */ + writeJoined(separator, values, writeItem = (item, w) => w.write(item)) { + const last = values.length - 1; + for (let i = 0; i < values.length; i++) { + writeItem(values[i], this); + if (i !== last) { + this.write(separator); + } + } + return this; + } + /** + * Adds a string to current line, flushes current line and starts a new line. + * @param line + * @returns + */ + writeLine(line) { + return this.write(line).newLine(); + } + /** + * Flushes current line and starts a new line. New line starts at previously configured indentation level + * @returns + */ + newLine() { + this.lines.push(this.indentedCurrentLine()); + this.currentLine = ""; + this.marginSymbol = void 0; + const afterNextNewLineCallback = this.afterNextNewLineCallback; + this.afterNextNewLineCallback = void 0; + afterNextNewLineCallback?.(); + return this; + } + /** + * Increases indentation level by 1, calls provided callback and then decreases indentation again. + * Could be used for writing indented blocks of text: + * + * @example + * ```ts + * writer + * .writeLine('{') + * .withIndent(() => { + * writer.writeLine('foo: 123'); + * writer.writeLine('bar: 456'); + * }) + * .writeLine('}') + * ``` + * @param callback + * @returns + */ + withIndent(callback) { + this.indent(); + callback(this); + this.unindent(); + return this; + } + /** + * Calls provided callback next time when new line is started. + * Callback is called after old line have already been flushed and a new + * line have been started. Can be used for adding "between the lines" decorations, + * such as underlines. + * + * @param callback + * @returns + */ + afterNextNewline(callback) { + this.afterNextNewLineCallback = callback; + return this; + } + /** + * Increases indentation level of the current line by 1 + * @returns + */ + indent() { + this.currentIndent++; + return this; + } + /** + * Decreases indentation level of the current line by 1, if it is possible + * @returns + */ + unindent() { + if (this.currentIndent > 0) { + this.currentIndent--; + } + return this; + } + /** + * Adds a symbol, that will replace the first character of the current line (including indentation) + * when it is flushed. Can be used for adding markers to the line. + * + * Note: if indentation level of the line is 0, it will replace the first actually printed character + * of the line. Use with caution. + * @param symbol + * @returns + */ + addMarginSymbol(symbol) { + this.marginSymbol = symbol; + return this; + } + toString() { + return this.lines.concat(this.indentedCurrentLine()).join("\n"); + } + getCurrentLineLength() { + return this.currentLine.length; + } + indentedCurrentLine() { + const line = this.currentLine.padStart(this.currentLine.length + INDENT_SIZE * this.currentIndent); + if (this.marginSymbol) { + return this.marginSymbol + line.slice(1); + } + return line; + } +}; + +// src/generation/ts-builders/stringify.ts +function stringify(builder, { indentLevel = 0, newLine = "none" } = {}) { + const str = new Writer(indentLevel, void 0).write(builder).toString(); + switch (newLine) { + case "none": + return str; + case "leading": + return "\n" + str; + case "trailing": + return str + "\n"; + case "both": + return "\n" + str + "\n"; + default: + assertNever(newLine, "Unexpected value"); + } +} + +// src/generation/ts-builders/StringLiteralType.ts +init_TypeBuilder(); +var StringLiteralType = class extends TypeBuilder { + constructor(content) { + super(); + this.content = content; + } + write(writer) { + writer.write(JSON.stringify(this.content)); + } +}; +function stringLiteral(content) { + return new StringLiteralType(content); +} + +// src/generation/ts-builders/TupleType.ts +init_TypeBuilder(); +var TupleItem = class { + constructor(type) { + this.type = type; + } + setName(name) { + this.name = name; + return this; + } + write(writer) { + if (this.name) { + writer.write(this.name).write(": "); + } + writer.write(this.type); + } +}; +var TupleType = class extends TypeBuilder { + constructor() { + super(...arguments); + this.items = []; + } + add(item) { + if (item instanceof TypeBuilder) { + item = new TupleItem(item); + } + this.items.push(item); + return this; + } + write(writer) { + writer.write("[").writeJoined(", ", this.items).write("]"); + } +}; +function tupleType() { + return new TupleType(); +} +function tupleItem(type) { + return new TupleItem(type); +} + +// src/generation/ts-builders/TypeDeclaration.ts +var TypeDeclaration = class { + constructor(name, type) { + this.name = name; + this.type = type; + this.genericParameters = []; + } + addGenericParameter(param) { + this.genericParameters.push(param); + return this; + } + setName(name) { + this.name = name; + return this; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + writer.write("type ").write(this.name); + if (this.genericParameters.length > 0) { + writer.write("<").writeJoined(", ", this.genericParameters).write(">"); + } + writer.write(" = ").write(this.type); + } +}; +function typeDeclaration(name, type) { + return new TypeDeclaration(name, type); +} + +// src/generation/ts-builders/UnionType.ts +init_TypeBuilder(); +var UnionType = class extends TypeBuilder { + constructor(firstType) { + super(); + this.needsParenthesisWhenIndexed = true; + this.needsParenthesisInKeyof = true; + this.variants = [firstType]; + } + addVariant(variant) { + this.variants.push(variant); + return this; + } + addVariants(variants) { + for (const variant of variants) { + this.addVariant(variant); + } + return this; + } + write(writer) { + writer.writeJoined(" | ", this.variants, (variant, writer2) => { + if (variant.needsParenthesisInUnion) { + writer2.write("(").write(variant).write(")"); + } else { + writer2.write(variant); + } + }); + } + mapVariants(callback) { + return unionType(this.variants.map((v) => callback(v))); + } +}; +function unionType(types) { + if (Array.isArray(types)) { + if (types.length === 0) { + throw new TypeError("Union types array can not be empty"); + } + const union = new UnionType(types[0]); + for (let i = 1; i < types.length; i++) { + union.addVariant(types[i]); + } + return union; + } + return new UnionType(types); +} + +// src/generation/ts-builders/WellKnownSymbol.ts +var WellKnownSymbol = class { + constructor(name) { + this.name = name; + } + write(writer) { + writer.write("Symbol.").write(this.name); + } +}; +function wellKnownSymbol(name) { + return new WellKnownSymbol(name); +} +var toStringTag = wellKnownSymbol("toStringTag"); + +// src/generation/utils.ts +function getSelectName(modelName) { + return `${modelName}Select`; +} +function getSelectCreateManyAndReturnName(modelName) { + return `${modelName}SelectCreateManyAndReturn`; +} +function getIncludeName(modelName) { + return `${modelName}Include`; +} +function getIncludeCreateManyAndReturnName(modelName) { + return `${modelName}IncludeCreateManyAndReturn`; +} +function getCreateManyAndReturnOutputType(modelName) { + return `CreateMany${modelName}AndReturnOutputType`; +} +function getOmitName(modelName) { + return `${modelName}Omit`; +} +function getAggregateName(modelName) { + return `Aggregate${capitalize2(modelName)}`; +} +function getGroupByName(modelName) { + return `${capitalize2(modelName)}GroupByOutputType`; +} +function getAvgAggregateName(modelName) { + return `${capitalize2(modelName)}AvgAggregateOutputType`; +} +function getSumAggregateName(modelName) { + return `${capitalize2(modelName)}SumAggregateOutputType`; +} +function getMinAggregateName(modelName) { + return `${capitalize2(modelName)}MinAggregateOutputType`; +} +function getMaxAggregateName(modelName) { + return `${capitalize2(modelName)}MaxAggregateOutputType`; +} +function getCountAggregateInputName(modelName) { + return `${capitalize2(modelName)}CountAggregateInputType`; +} +function getCountAggregateOutputName(modelName) { + return `${capitalize2(modelName)}CountAggregateOutputType`; +} +function getAggregateInputType(aggregateOutputType) { + return aggregateOutputType.replace(/OutputType$/, "InputType"); +} +function getGroupByArgsName(modelName) { + return `${modelName}GroupByArgs`; +} +function getGroupByPayloadName(modelName) { + return `Get${capitalize2(modelName)}GroupByPayload`; +} +function getAggregateArgsName(modelName) { + return `${capitalize2(modelName)}AggregateArgs`; +} +function getAggregateGetName(modelName) { + return `Get${capitalize2(modelName)}AggregateType`; +} +function getFieldArgName(field, modelName) { + if (field.args.length) { + return getModelFieldArgsName(field, modelName); + } + return getModelArgName(field.outputType.type); +} +function getModelFieldArgsName(field, modelName) { + return `${modelName}$${field.name}Args`; +} +function getLegacyModelArgName(modelName) { + return `${modelName}Args`; +} +function getModelArgName(modelName, action) { + if (!action) { + return `${modelName}DefaultArgs`; + } + switch (action) { + case DMMF.ModelAction.findMany: + return `${modelName}FindManyArgs`; + case DMMF.ModelAction.findUnique: + return `${modelName}FindUniqueArgs`; + case DMMF.ModelAction.findUniqueOrThrow: + return `${modelName}FindUniqueOrThrowArgs`; + case DMMF.ModelAction.findFirst: + return `${modelName}FindFirstArgs`; + case DMMF.ModelAction.findFirstOrThrow: + return `${modelName}FindFirstOrThrowArgs`; + case DMMF.ModelAction.upsert: + return `${modelName}UpsertArgs`; + case DMMF.ModelAction.update: + return `${modelName}UpdateArgs`; + case DMMF.ModelAction.updateMany: + return `${modelName}UpdateManyArgs`; + case DMMF.ModelAction.delete: + return `${modelName}DeleteArgs`; + case DMMF.ModelAction.create: + return `${modelName}CreateArgs`; + case DMMF.ModelAction.createMany: + return `${modelName}CreateManyArgs`; + case DMMF.ModelAction.createManyAndReturn: + return `${modelName}CreateManyAndReturnArgs`; + case DMMF.ModelAction.deleteMany: + return `${modelName}DeleteManyArgs`; + case DMMF.ModelAction.groupBy: + return getGroupByArgsName(modelName); + case DMMF.ModelAction.aggregate: + return getAggregateArgsName(modelName); + case DMMF.ModelAction.count: + return `${modelName}CountArgs`; + case DMMF.ModelAction.findRaw: + return `${modelName}FindRawArgs`; + case DMMF.ModelAction.aggregateRaw: + return `${modelName}AggregateRawArgs`; + default: + assertNever(action, `Unknown action: ${action}`); + } +} +function getPayloadName(modelName, namespace2 = true) { + if (namespace2) { + return `Prisma.${getPayloadName(modelName, false)}`; + } + return `$${modelName}Payload`; +} +function getFieldRefsTypeName(name) { + return `${name}FieldRefs`; +} +function capitalize2(str) { + return str[0].toUpperCase() + str.slice(1); +} +function getRefAllowedTypeName(type) { + let typeName = type.type; + if (type.isList) { + typeName += "[]"; + } + return `'${typeName}'`; +} +function appendSkipType(context, type) { + if (context.isPreviewFeatureOn("strictUndefinedChecks")) { + return unionType([type, namedType("$Types.Skip")]); + } + return type; +} +var extArgsParam = genericParameter("ExtArgs").extends(namedType("$Extensions.InternalArgs")).default(namedType("$Extensions.DefaultArgs")); + +// src/generation/TSClient/Input.ts +var InputField = class { + constructor(field, context, source) { + this.field = field; + this.context = context; + this.source = source; + } + toTS() { + const property2 = buildInputField(this.field, this.context, this.source); + return stringify(property2); + } +}; +function buildInputField(field, context, source) { + const tsType = buildAllFieldTypes(field.inputTypes, context, source); + const tsProperty = property(field.name, field.isRequired ? tsType : appendSkipType(context, tsType)); + if (!field.isRequired) { + tsProperty.optional(); + } + const docComment2 = docComment(); + if (field.comment) { + docComment2.addText(field.comment); + } + if (field.deprecation) { + docComment2.addText(`@deprecated since ${field.deprecation.sinceVersion}: ${field.deprecation.reason}`); + } + if (docComment2.lines.length > 0) { + tsProperty.setDocComment(docComment2); + } + return tsProperty; +} +function buildSingleFieldType(t, genericsInfo, source) { + let type; + const scalarType = GraphQLScalarToJSTypeTable[t.type]; + if (t.location === "enumTypes" && t.namespace === "model") { + type = namedType(`$Enums.${t.type}`); + } else if (t.type === "Null") { + return nullType; + } else if (Array.isArray(scalarType)) { + const union = unionType(scalarType.map(namedInputType)); + if (t.isList) { + return union.mapVariants((variant) => array(variant)); + } + return union; + } else { + type = namedInputType(scalarType ?? t.type); + } + if (genericsInfo.typeRefNeedsGenericModelArg(t)) { + if (source) { + type.addGenericArgument(stringLiteral(source)); + } else { + type.addGenericArgument(namedType("$PrismaModel")); + } + } + if (t.isList) { + return array(type); + } + return type; +} +function namedInputType(typeName) { + return namedType(JSOutputTypeToInputType[typeName] ?? typeName); +} +function buildAllFieldTypes(inputTypes, context, source) { + const inputObjectTypes = inputTypes.filter((t) => t.location === "inputObjectTypes" && !t.isList); + const otherTypes = inputTypes.filter((t) => t.location !== "inputObjectTypes" || t.isList); + const tsInputObjectTypes = inputObjectTypes.map((type) => buildSingleFieldType(type, context.genericArgsInfo, source)); + const tsOtherTypes = otherTypes.map((type) => buildSingleFieldType(type, context.genericArgsInfo, source)); + if (tsOtherTypes.length === 0) { + return xorTypes(tsInputObjectTypes); + } + if (tsInputObjectTypes.length === 0) { + return unionType(tsOtherTypes); + } + return unionType(xorTypes(tsInputObjectTypes)).addVariants(tsOtherTypes); +} +function xorTypes(types) { + return types.reduce((prev, curr) => namedType("XOR").addGenericArgument(prev).addGenericArgument(curr)); +} +var InputType = class { + constructor(type, context) { + this.type = type; + this.context = context; + this.generatedName = type.name; + } + toTS() { + const { type } = this; + const source = type.meta?.source; + const fields = uniqueBy(type.fields, (f) => f.name); + const body = `{ +${(0, import_indent_string2.default)( + fields.map((arg) => { + return new InputField(arg, this.context, source).toTS(); + }).join("\n"), + TAB_SIZE + )} +}`; + return ` +export type ${this.getTypeName()} = ${wrapWithAtLeast(body, type)}`; + } + overrideName(name) { + this.generatedName = name; + return this; + } + getTypeName() { + if (this.context.genericArgsInfo.typeNeedsGenericModelArg(this.type)) { + return `${this.generatedName}<$PrismaModel = never>`; + } + return this.generatedName; + } +}; +function wrapWithAtLeast(body, input) { + if (input.constraints?.fields && input.constraints.fields.length > 0) { + const fields = input.constraints.fields.map((f) => `"${f}"`).join(" | "); + return `Prisma.AtLeast<${body}, ${fields}>`; + } + return body; +} + +// src/generation/TSClient/Model.ts +var import_indent_string3 = __toESM(require_indent_string()); + +// ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs +function klona(x) { + if (typeof x !== "object") return x; + var k, tmp, str = Object.prototype.toString.call(x); + if (str === "[object Object]") { + if (x.constructor !== Object && typeof x.constructor === "function") { + tmp = new x.constructor(); + for (k in x) { + if (x.hasOwnProperty(k) && tmp[k] !== x[k]) { + tmp[k] = klona(x[k]); + } + } + } else { + tmp = {}; + for (k in x) { + if (k === "__proto__") { + Object.defineProperty(tmp, k, { + value: klona(x[k]), + configurable: true, + enumerable: true, + writable: true + }); + } else { + tmp[k] = klona(x[k]); + } + } + } + return tmp; + } + if (str === "[object Array]") { + k = x.length; + for (tmp = Array(k); k--; ) { + tmp[k] = klona(x[k]); + } + return tmp; + } + if (str === "[object Set]") { + tmp = /* @__PURE__ */ new Set(); + x.forEach(function(val) { + tmp.add(klona(val)); + }); + return tmp; + } + if (str === "[object Map]") { + tmp = /* @__PURE__ */ new Map(); + x.forEach(function(val, key) { + tmp.set(klona(key), klona(val)); + }); + return tmp; + } + if (str === "[object Date]") { + return /* @__PURE__ */ new Date(+x); + } + if (str === "[object RegExp]") { + tmp = new RegExp(x.source, x.flags); + tmp.lastIndex = x.lastIndex; + return tmp; + } + if (str === "[object DataView]") { + return new x.constructor(klona(x.buffer)); + } + if (str === "[object ArrayBuffer]") { + return x.slice(0); + } + if (str.slice(-6) === "Array]") { + return new x.constructor(x); + } + return x; +} + +// src/generation/TSClient/helpers.ts +var import_pluralize2 = __toESM(require_pluralize()); + +// src/generation/TSClient/jsdoc.ts +var Docs = { + cursor: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}`, + pagination: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}`, + aggregations: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}`, + distinct: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}`, + sorting: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}` +}; +function addLinkToDocs(comment, docs) { + return `${Docs[docs]} + +${comment}`; +} +function getDeprecationString(since, replacement) { + return `@deprecated since ${since} please use \`${replacement}\``; +} +var undefinedNote = `Note, that providing \`undefined\` is treated as the value not being there. +Read more here: https://pris.ly/d/null-undefined`; +var JSDocFields = { + take: (singular, plural) => addLinkToDocs(`Take \`\xB1n\` ${plural} from the position of the cursor.`, "pagination"), + skip: (singular, plural) => addLinkToDocs(`Skip the first \`n\` ${plural}.`, "pagination"), + _count: (singular, plural) => addLinkToDocs(`Count returned ${plural}`, "aggregations"), + _avg: () => addLinkToDocs(`Select which fields to average`, "aggregations"), + _sum: () => addLinkToDocs(`Select which fields to sum`, "aggregations"), + _min: () => addLinkToDocs(`Select which fields to find the minimum value`, "aggregations"), + _max: () => addLinkToDocs(`Select which fields to find the maximum value`, "aggregations"), + count: () => getDeprecationString("2.23.0", "_count"), + avg: () => getDeprecationString("2.23.0", "_avg"), + sum: () => getDeprecationString("2.23.0", "_sum"), + min: () => getDeprecationString("2.23.0", "_min"), + max: () => getDeprecationString("2.23.0", "_max"), + distinct: (singular, plural) => addLinkToDocs(`Filter by unique combinations of ${plural}.`, "distinct"), + orderBy: (singular, plural) => addLinkToDocs(`Determine the order of ${plural} to fetch.`, "sorting") +}; +var JSDocs = { + groupBy: { + body: (ctx) => `Group by ${ctx.singular}. +${undefinedNote} +@param {${getGroupByArgsName(ctx.model.name)}} 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 + }, +}) +`, + fields: {} + }, + create: { + body: (ctx) => `Create a ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to create a ${ctx.singular}. +@example +// Create one ${ctx.singular} +const ${ctx.singular} = await ${ctx.method}({ + data: { + // ... data to create a ${ctx.singular} + } +}) +`, + fields: { + data: (singular) => `The data needed to create a ${singular}.` + } + }, + createMany: { + body: (ctx) => `Create many ${ctx.plural}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to create many ${ctx.plural}. +@example +// Create many ${ctx.plural} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + data: [ + // ... provide data here + ] +}) + `, + fields: { + data: (singular, plural) => `The data used to create many ${plural}.` + } + }, + createManyAndReturn: { + body: (ctx) => { + const onlySelect = ctx.firstScalar ? ` +// Create many ${ctx.plural} and only return the \`${ctx.firstScalar.name}\` +const ${lowerCase(ctx.mapping.model)}With${capitalize(ctx.firstScalar.name)}Only = await ${ctx.method}({ + select: { ${ctx.firstScalar.name}: true }, + data: [ + // ... provide data here + ] +})` : ""; + return `Create many ${ctx.plural} and returns the data saved in the database. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to create many ${ctx.plural}. +@example +// Create many ${ctx.plural} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + data: [ + // ... provide data here + ] +}) +${onlySelect} +${undefinedNote} +`; + }, + fields: { + data: (singular, plural) => `The data used to create many ${plural}.` + } + }, + findUnique: { + body: (ctx) => `Find zero or one ${ctx.singular} that matches the filter. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to find a ${ctx.singular} +@example +// Get one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + } +})`, + fields: { + where: (singular) => `Filter, which ${singular} to fetch.` + } + }, + findUniqueOrThrow: { + body: (ctx) => `Find one ${ctx.singular} that matches the filter or throw an error with \`error.code='P2025'\` +if no matches were found. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to find a ${ctx.singular} +@example +// Get one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + } +})`, + fields: { + where: (singular) => `Filter, which ${singular} to fetch.` + } + }, + findFirst: { + body: (ctx) => `Find the first ${ctx.singular} that matches the filter. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to find a ${ctx.singular} +@example +// Get one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + } +})`, + fields: { + where: (singular) => `Filter, which ${singular} to fetch.`, + orderBy: JSDocFields.orderBy, + cursor: (singular, plural) => addLinkToDocs(`Sets the position for searching for ${plural}.`, "cursor"), + take: JSDocFields.take, + skip: JSDocFields.skip, + distinct: JSDocFields.distinct + } + }, + findFirstOrThrow: { + body: (ctx) => `Find the first ${ctx.singular} that matches the filter or +throw \`PrismaKnownClientError\` with \`P2025\` code if no matches were found. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to find a ${ctx.singular} +@example +// Get one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + } +})`, + fields: { + where: (singular) => `Filter, which ${singular} to fetch.`, + orderBy: JSDocFields.orderBy, + cursor: (singular, plural) => addLinkToDocs(`Sets the position for searching for ${plural}.`, "cursor"), + take: JSDocFields.take, + skip: JSDocFields.skip, + distinct: JSDocFields.distinct + } + }, + findMany: { + body: (ctx) => { + const onlySelect = ctx.firstScalar ? ` +// Only select the \`${ctx.firstScalar.name}\` +const ${lowerCase(ctx.mapping.model)}With${capitalize(ctx.firstScalar.name)}Only = await ${ctx.method}({ select: { ${ctx.firstScalar.name}: true } })` : ""; + return `Find zero or more ${ctx.plural} that matches the filter. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to filter and select certain fields only. +@example +// Get all ${ctx.plural} +const ${ctx.mapping.plural} = await ${ctx.method}() + +// Get first 10 ${ctx.plural} +const ${ctx.mapping.plural} = await ${ctx.method}({ take: 10 }) +${onlySelect} +`; + }, + fields: { + where: (singular, plural) => `Filter, which ${plural} to fetch.`, + orderBy: JSDocFields.orderBy, + skip: JSDocFields.skip, + cursor: (singular, plural) => addLinkToDocs(`Sets the position for listing ${plural}.`, "cursor"), + take: JSDocFields.take + } + }, + update: { + body: (ctx) => `Update one ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to update one ${ctx.singular}. +@example +// Update one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + }, + data: { + // ... provide data here + } +}) +`, + fields: { + data: (singular) => `The data needed to update a ${singular}.`, + where: (singular) => `Choose, which ${singular} to update.` + } + }, + upsert: { + body: (ctx) => `Create or update one ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to update or create a ${ctx.singular}. +@example +// Update or create a ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + create: { + // ... data to create a ${ctx.singular} + }, + update: { + // ... in case it already exists, update + }, + where: { + // ... the filter for the ${ctx.singular} we want to update + } +})`, + fields: { + where: (singular) => `The filter to search for the ${singular} to update in case it exists.`, + create: (singular) => `In case the ${singular} found by the \`where\` argument doesn't exist, create a new ${singular} with this data.`, + update: (singular) => `In case the ${singular} was found with the provided \`where\` argument, update it with this data.` + } + }, + delete: { + body: (ctx) => `Delete a ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to delete one ${ctx.singular}. +@example +// Delete one ${ctx.singular} +const ${ctx.singular} = await ${ctx.method}({ + where: { + // ... filter to delete one ${ctx.singular} + } +}) +`, + fields: { + where: (singular) => `Filter which ${singular} to delete.` + } + }, + aggregate: { + body: (ctx) => `Allows you to perform aggregations operations on a ${ctx.singular}. +${undefinedNote} +@param {${getModelArgName( + ctx.model.name, + ctx.action + )}} 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, +})`, + fields: { + where: (singular) => `Filter which ${singular} to aggregate.`, + orderBy: JSDocFields.orderBy, + cursor: () => addLinkToDocs(`Sets the start position`, "cursor"), + take: JSDocFields.take, + skip: JSDocFields.skip, + _count: JSDocFields._count, + _avg: JSDocFields._avg, + _sum: JSDocFields._sum, + _min: JSDocFields._min, + _max: JSDocFields._max, + count: JSDocFields.count, + avg: JSDocFields.avg, + sum: JSDocFields.sum, + min: JSDocFields.min, + max: JSDocFields.max + } + }, + count: { + body: (ctx) => `Count the number of ${ctx.plural}. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to filter ${ctx.plural} to count. +@example +// Count the number of ${ctx.plural} +const count = await ${ctx.method}({ + where: { + // ... the filter for the ${ctx.plural} we want to count + } +})`, + fields: {} + }, + updateMany: { + body: (ctx) => `Update zero or more ${ctx.plural}. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to update one or more rows. +@example +// Update many ${ctx.plural} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + }, + data: { + // ... provide data here + } +}) +`, + fields: { + data: (singular, plural) => `The data used to update ${plural}.`, + where: (singular, plural) => `Filter which ${plural} to update` + } + }, + deleteMany: { + body: (ctx) => `Delete zero or more ${ctx.plural}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to filter ${ctx.plural} to delete. +@example +// Delete a few ${ctx.plural} +const { count } = await ${ctx.method}({ + where: { + // ... provide filter here + } +}) +`, + fields: { + where: (singular, plural) => `Filter which ${plural} to delete` + } + }, + aggregateRaw: { + body: (ctx) => `Perform aggregation operations on a ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Select which aggregations you would like to apply. +@example +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + pipeline: [ + { $match: { status: "registered" } }, + { $group: { _id: "$country", total: { $sum: 1 } } } + ] +})`, + fields: { + pipeline: () => "An array of aggregation stages to process and transform the document stream via the aggregation pipeline. ${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}.", + options: () => "Additional options to pass to the `aggregate` command ${@link https://docs.mongodb.com/manual/reference/command/aggregate/#command-fields MongoDB Docs}." + } + }, + findRaw: { + body: (ctx) => `Find zero or more ${ctx.plural} that matches the filter. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Select which filters you would like to apply. +@example +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + filter: { age: { $gt: 25 } } +})`, + fields: { + filter: () => "The query predicate filter. If unspecified, then all documents in the collection will match the predicate. ${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}.", + options: () => "Additional options to pass to the `find` command ${@link https://docs.mongodb.com/manual/reference/command/find/#command-fields MongoDB Docs}." + } + } +}; + +// src/generation/TSClient/helpers.ts +function getMethodJSDocBody(action, mapping, model) { + const ctx = { + singular: capitalize(mapping.model), + plural: capitalize(mapping.plural), + firstScalar: model.fields.find((f) => f.kind === "scalar"), + method: `prisma.${lowerCase(mapping.model)}.${action}`, + action, + mapping, + model + }; + const jsdoc = JSDocs[action]?.body(ctx); + return jsdoc ? jsdoc : ""; +} +function getMethodJSDoc(action, mapping, model) { + return wrapComment(getMethodJSDocBody(action, mapping, model)); +} +function wrapComment(str) { + return `/** +${str.split("\n").map((l) => " * " + l).join("\n")} +**/`; +} +function getArgFieldJSDoc(type, action, field) { + if (!field || !action || !type) return; + const fieldName = typeof field === "string" ? field : field.name; + if (JSDocs[action] && JSDocs[action]?.fields[fieldName]) { + const singular = type.name; + const plural = (0, import_pluralize2.default)(type.name); + const comment = JSDocs[action]?.fields[fieldName](singular, plural); + return comment; + } + return void 0; +} +function escapeJson(str) { + return str.replace(/\\n/g, "\\\\n").replace(/\\r/g, "\\\\r").replace(/\\t/g, "\\\\t"); +} + +// src/generation/TSClient/Args.ts +var ArgsTypeBuilder = class { + constructor(type, context, action) { + this.type = type; + this.context = context; + this.action = action; + this.hasDefaultName = true; + this.moduleExport = moduleExport( + typeDeclaration(getModelArgName(type.name, action), objectType()).addGenericParameter(extArgsParam) + ).setDocComment(docComment(`${type.name} ${action ?? "without action"}`)); + } + addProperty(prop) { + this.moduleExport.declaration.type.add(prop); + } + addSchemaArgs(args) { + for (const arg of args) { + const inputField = buildInputField(arg, this.context); + const docComment2 = getArgFieldJSDoc(this.type, this.action, arg); + if (docComment2) { + inputField.setDocComment(docComment(docComment2)); + } + this.addProperty(inputField); + } + return this; + } + addSelectArg(selectTypeName = getSelectName(this.type.name)) { + this.addProperty( + property( + "select", + unionType([namedType(selectTypeName).addGenericArgument(extArgsParam.toArgument()), nullType]) + ).optional().setDocComment(docComment(`Select specific fields to fetch from the ${this.type.name}`)) + ); + return this; + } + addIncludeArgIfHasRelations(includeTypeName = getIncludeName(this.type.name), type = this.type) { + const hasRelationField = type.fields.some((f) => f.outputType.location === "outputObjectTypes"); + if (!hasRelationField) { + return this; + } + this.addProperty( + property( + "include", + unionType([namedType(includeTypeName).addGenericArgument(extArgsParam.toArgument()), nullType]) + ).optional().setDocComment(docComment("Choose, which related nodes to fetch as well")) + ); + return this; + } + addOmitArg() { + if (!this.context.isPreviewFeatureOn("omitApi")) { + return this; + } + this.addProperty( + property( + "omit", + unionType([ + namedType(getOmitName(this.type.name)).addGenericArgument(extArgsParam.toArgument()), + nullType + ]) + ).optional().setDocComment(docComment(`Omit specific fields from the ${this.type.name}`)) + ); + return this; + } + setGeneratedName(name) { + this.hasDefaultName = false; + this.moduleExport.declaration.setName(name); + return this; + } + setComment(comment) { + this.moduleExport.setDocComment(docComment(comment)); + return this; + } + createExport() { + if (!this.action && this.hasDefaultName) { + this.context.defaultArgsAliases.addPossibleAlias( + getModelArgName(this.type.name), + getLegacyModelArgName(this.type.name) + ); + } + this.context.defaultArgsAliases.registerArgName(this.moduleExport.declaration.name); + return this.moduleExport; + } +}; + +// src/generation/TSClient/ModelFieldRefs.ts +var ModelFieldRefs = class { + constructor(outputType) { + this.outputType = outputType; + } + toTS() { + const { name } = this.outputType; + return ` + +/** + * Fields of the ${name} model + */ +interface ${getFieldRefsTypeName(name)} { +${this.stringifyFields()} +} + `; + } + stringifyFields() { + const { name } = this.outputType; + return this.outputType.fields.filter((field) => field.outputType.location !== "outputObjectTypes").map((field) => { + const fieldOutput = field.outputType; + const refTypeName = getRefAllowedTypeName(fieldOutput); + return ` readonly ${field.name}: FieldRef<"${name}", ${refTypeName}>`; + }).join("\n"); + } +}; + +// src/generation/TSClient/Output.ts +function buildModelOutputProperty(field, dmmf) { + let fieldTypeName = hasOwnProperty(GraphQLScalarToJSTypeTable, field.type) ? GraphQLScalarToJSTypeTable[field.type] : field.type; + if (Array.isArray(fieldTypeName)) { + fieldTypeName = fieldTypeName[0]; + } + if (needsNamespace(field)) { + fieldTypeName = `Prisma.${fieldTypeName}`; + } + let fieldType; + if (field.kind === "object") { + const payloadType = namedType(getPayloadName(field.type)); + if (!dmmf.isComposite(field.type)) { + payloadType.addGenericArgument(namedType("ExtArgs")); + } + fieldType = payloadType; + } else if (field.kind === "enum") { + fieldType = namedType(`$Enums.${fieldTypeName}`); + } else { + fieldType = namedType(fieldTypeName); + } + if (field.isList) { + fieldType = array(fieldType); + } else if (!field.isRequired) { + fieldType = unionType(fieldType).addVariant(nullType); + } + const property2 = property(field.name, fieldType); + if (field.documentation) { + property2.setDocComment(docComment(field.documentation)); + } + return property2; +} +function buildOutputType(type) { + return moduleExport(typeDeclaration(type.name, objectType().addMultiple(type.fields.map(buildOutputField)))); +} +function buildOutputField(field) { + let fieldType; + if (field.outputType.location === "enumTypes" && field.outputType.namespace === "model") { + fieldType = namedType(enumTypeName(field.outputType)); + } else { + const typeNames = GraphQLScalarToJSTypeTable[field.outputType.type] ?? field.outputType.type; + fieldType = Array.isArray(typeNames) ? namedType(typeNames[0]) : namedType(typeNames); + } + if (field.outputType.isList) { + fieldType = array(fieldType); + } else if (field.isNullable) { + fieldType = unionType(fieldType).addVariant(nullType); + } + const property2 = property(field.name, fieldType); + if (field.deprecation) { + property2.setDocComment( + docComment(`@deprecated since ${field.deprecation.sinceVersion} because ${field.deprecation.reason}`) + ); + } + return property2; +} +function enumTypeName(ref) { + const name = ref.type; + const namespace2 = ref.namespace === "model" ? "$Enums" : "Prisma"; + return `${namespace2}.${name}`; +} + +// src/generation/TSClient/Payload.ts +function buildModelPayload(model, context) { + const isComposite = context.dmmf.isComposite(model.name); + const objects = objectType(); + const scalars = objectType(); + const composites = objectType(); + for (const field of model.fields) { + if (field.kind === "object") { + if (context.dmmf.isComposite(field.type)) { + composites.add(buildModelOutputProperty(field, context.dmmf)); + } else { + objects.add(buildModelOutputProperty(field, context.dmmf)); + } + } else if (field.kind === "enum" || field.kind === "scalar") { + scalars.add(buildModelOutputProperty(field, context.dmmf)); + } + } + const scalarsType = isComposite ? scalars : namedType("$Extensions.GetPayloadResult").addGenericArgument(scalars).addGenericArgument(namedType("ExtArgs").subKey("result").subKey(lowerCase(model.name))); + const payloadTypeDeclaration = typeDeclaration( + getPayloadName(model.name, false), + objectType().add(property("name", stringLiteral(model.name))).add(property("objects", objects)).add(property("scalars", scalarsType)).add(property("composites", composites)) + ); + if (!isComposite) { + payloadTypeDeclaration.addGenericParameter(extArgsParam); + } + return moduleExport(payloadTypeDeclaration); +} + +// src/generation/TSClient/SelectIncludeOmit.ts +function buildIncludeType({ + modelName, + typeName = getIncludeName(modelName), + context, + fields +}) { + const type = buildSelectOrIncludeObject(modelName, getIncludeFields(fields, context.dmmf), context); + return buildExport(typeName, type); +} +function buildOmitType({ modelName, fields, context }) { + const keysType = unionType( + fields.filter( + (field) => field.outputType.location === "scalar" || field.outputType.location === "enumTypes" || context.dmmf.isComposite(field.outputType.type) + ).map((field) => stringLiteral(field.name)) + ); + const omitType = namedType("$Extensions.GetOmit").addGenericArgument(keysType).addGenericArgument(modelResultExtensionsType(modelName)); + if (context.isPreviewFeatureOn("strictUndefinedChecks")) { + omitType.addGenericArgument(namedType("$Types.Skip")); + } + return buildExport(getOmitName(modelName), omitType); +} +function buildSelectType({ + modelName, + typeName = getSelectName(modelName), + fields, + context +}) { + const objectType2 = buildSelectOrIncludeObject(modelName, fields, context); + const selectType = namedType("$Extensions.GetSelect").addGenericArgument(objectType2).addGenericArgument(modelResultExtensionsType(modelName)); + return buildExport(typeName, selectType); +} +function modelResultExtensionsType(modelName) { + return extArgsParam.toArgument().subKey("result").subKey(lowerCase(modelName)); +} +function buildScalarSelectType({ modelName, fields, context }) { + const object = buildSelectOrIncludeObject( + modelName, + fields.filter((field) => field.outputType.location === "scalar" || field.outputType.location === "enumTypes"), + context + ); + return moduleExport(typeDeclaration(`${getSelectName(modelName)}Scalar`, object)); +} +function buildSelectOrIncludeObject(modelName, fields, context) { + const objectType2 = objectType(); + for (const field of fields) { + const fieldType = unionType(booleanType); + if (field.outputType.location === "outputObjectTypes") { + const subSelectType = namedType(getFieldArgName(field, modelName)); + subSelectType.addGenericArgument(extArgsParam.toArgument()); + fieldType.addVariant(subSelectType); + } + objectType2.add(property(field.name, appendSkipType(context, fieldType)).optional()); + } + return objectType2; +} +function buildExport(typeName, type) { + const declaration = typeDeclaration(typeName, type); + return moduleExport(declaration.addGenericParameter(extArgsParam)); +} +function getIncludeFields(fields, dmmf) { + return fields.filter((field) => { + if (field.outputType.location !== "outputObjectTypes") { + return false; + } + return !dmmf.isComposite(field.outputType.type); + }); +} + +// src/generation/TSClient/utils/getModelActions.ts +function getModelActions(dmmf, name) { + const mapping = dmmf.mappingsMap[name] ?? { model: name, plural: `${name}s` }; + const mappingKeys = Object.keys(mapping).filter( + (key) => key !== "model" && key !== "plural" && mapping[key] + ); + if ("aggregate" in mapping) { + mappingKeys.push("count"); + } + return mappingKeys; +} + +// src/generation/TSClient/Model.ts +var Model = class { + constructor(model, context) { + this.model = model; + this.context = context; + this.dmmf = context.dmmf; + this.type = this.context.dmmf.outputTypeMap.model[model.name]; + this.createManyAndReturnType = this.context.dmmf.outputTypeMap.model[getCreateManyAndReturnOutputType(model.name)]; + this.mapping = this.context.dmmf.mappings.modelOperations.find((m) => m.model === model.name); + } + get argsTypes() { + const argsTypes = []; + for (const action of Object.keys(DMMF.ModelAction)) { + const fieldName = this.rootFieldNameForAction(action); + if (!fieldName) { + continue; + } + const field = this.dmmf.rootFieldMap[fieldName]; + if (!field) { + throw new Error(`Oops this must not happen. Could not find field ${fieldName} on either Query or Mutation`); + } + if (action === "updateMany" || action === "deleteMany" || action === "createMany" || action === "findRaw" || action === "aggregateRaw") { + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context, action).addSchemaArgs(field.args).createExport() + ); + } else if (action === "createManyAndReturn") { + const args = new ArgsTypeBuilder(this.type, this.context, action).addSelectArg(getSelectCreateManyAndReturnName(this.type.name)).addOmitArg().addSchemaArgs(field.args); + if (this.createManyAndReturnType) { + args.addIncludeArgIfHasRelations( + getIncludeCreateManyAndReturnName(this.model.name), + this.createManyAndReturnType + ); + } + argsTypes.push(args.createExport()); + } else if (action !== "groupBy" && action !== "aggregate") { + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context, action).addSelectArg().addOmitArg().addIncludeArgIfHasRelations().addSchemaArgs(field.args).createExport() + ); + } + } + for (const field of this.type.fields) { + if (!field.args.length) { + continue; + } + const fieldOutput = this.dmmf.resolveOutputObjectType(field.outputType); + if (!fieldOutput) { + continue; + } + argsTypes.push( + new ArgsTypeBuilder(fieldOutput, this.context).addSelectArg().addOmitArg().addIncludeArgIfHasRelations().addSchemaArgs(field.args).setGeneratedName(getModelFieldArgsName(field, this.model.name)).setComment(`${this.model.name}.${field.name}`).createExport() + ); + } + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context).addSelectArg().addOmitArg().addIncludeArgIfHasRelations().createExport() + ); + return argsTypes; + } + rootFieldNameForAction(action) { + return this.mapping?.[action]; + } + getGroupByTypes() { + const { model, mapping } = this; + const groupByType = this.dmmf.outputTypeMap.prisma[getGroupByName(model.name)]; + if (!groupByType) { + throw new Error(`Could not get group by type for model ${model.name}`); + } + const groupByRootField = this.dmmf.rootFieldMap[mapping.groupBy]; + if (!groupByRootField) { + throw new Error(`Could not find groupBy root field for model ${model.name}. Mapping: ${mapping?.groupBy}`); + } + const groupByArgsName = getGroupByArgsName(model.name); + this.context.defaultArgsAliases.registerArgName(groupByArgsName); + return ` + + +export type ${groupByArgsName} = { +${(0, import_indent_string3.default)( + groupByRootField.args.map((arg) => { + const updatedArg = { ...arg, comment: getArgFieldJSDoc(this.type, DMMF.ModelAction.groupBy, arg) }; + return new InputField(updatedArg, this.context).toTS(); + }).concat( + groupByType.fields.filter((f) => f.outputType.location === "outputObjectTypes").map((f) => { + if (f.outputType.location === "outputObjectTypes") { + return `${f.name}?: ${getAggregateInputType(f.outputType.type)}${f.name === "_count" ? " | true" : ""}`; + } + return ""; + }) + ).join("\n"), + TAB_SIZE + )} +} + +${stringify(buildOutputType(groupByType))} + +type ${getGroupByPayloadName(model.name)} = Prisma.PrismaPromise< + Array< + PickEnumerable<${groupByType.name}, T['by']> & + { + [P in ((keyof T) & (keyof ${groupByType.name}))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > +`; + } + getAggregationTypes() { + const { model, mapping } = this; + let aggregateType = this.dmmf.outputTypeMap.prisma[getAggregateName(model.name)]; + if (!aggregateType) { + throw new Error(`Could not get aggregate type "${getAggregateName(model.name)}" for "${model.name}"`); + } + aggregateType = klona(aggregateType); + const aggregateRootField = this.dmmf.rootFieldMap[mapping.aggregate]; + if (!aggregateRootField) { + throw new Error(`Could not find aggregate root field for model ${model.name}. Mapping: ${mapping?.aggregate}`); + } + const aggregateTypes = [aggregateType]; + const avgType = this.dmmf.outputTypeMap.prisma[getAvgAggregateName(model.name)]; + const sumType = this.dmmf.outputTypeMap.prisma[getSumAggregateName(model.name)]; + const minType = this.dmmf.outputTypeMap.prisma[getMinAggregateName(model.name)]; + const maxType = this.dmmf.outputTypeMap.prisma[getMaxAggregateName(model.name)]; + const countType = this.dmmf.outputTypeMap.prisma[getCountAggregateOutputName(model.name)]; + if (avgType) { + aggregateTypes.push(avgType); + } + if (sumType) { + aggregateTypes.push(sumType); + } + if (minType) { + aggregateTypes.push(minType); + } + if (maxType) { + aggregateTypes.push(maxType); + } + if (countType) { + aggregateTypes.push(countType); + } + const aggregateArgsName = getAggregateArgsName(model.name); + this.context.defaultArgsAliases.registerArgName(aggregateArgsName); + const aggregateName = getAggregateName(model.name); + return `${aggregateTypes.map(buildOutputType).map((type) => stringify(type)).join("\n\n")} + +${aggregateTypes.length > 1 ? aggregateTypes.slice(1).map((type) => { + const newType = { + name: getAggregateInputType(type.name), + constraints: { + maxNumFields: null, + minNumFields: null + }, + fields: type.fields.map((field) => ({ + ...field, + name: field.name, + isNullable: false, + isRequired: false, + inputTypes: [ + { + isList: false, + location: "scalar", + type: "true" + } + ] + })) + }; + return new InputType(newType, this.context).toTS(); + }).join("\n") : ""} + +export type ${aggregateArgsName} = { +${(0, import_indent_string3.default)( + aggregateRootField.args.map((arg) => { + const updatedArg = { ...arg, comment: getArgFieldJSDoc(this.type, DMMF.ModelAction.aggregate, arg) }; + return new InputField(updatedArg, this.context).toTS(); + }).concat( + aggregateType.fields.map((f) => { + let data = ""; + const comment = getArgFieldJSDoc(this.type, DMMF.ModelAction.aggregate, f.name); + data += comment ? wrapComment(comment) + "\n" : ""; + if (f.name === "_count" || f.name === "count") { + data += `${f.name}?: true | ${getCountAggregateInputName(model.name)}`; + } else { + data += `${f.name}?: ${getAggregateInputType(f.outputType.type)}`; + } + return data; + }) + ).join("\n"), + TAB_SIZE + )} +} + +export type ${getAggregateGetName(model.name)} = { + [P in keyof T & keyof ${aggregateName}]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType +}`; + } + toTSWithoutNamespace() { + const { model } = this; + const docLines = model.documentation ?? ""; + const modelLine = `Model ${model.name} +`; + const docs = `${modelLine}${docLines}`; + const modelTypeExport = moduleExport( + typeDeclaration( + model.name, + namedType(`$Result.DefaultSelection`).addGenericArgument(namedType(getPayloadName(model.name))) + ) + ).setDocComment(docComment(docs)); + return stringify(modelTypeExport); + } + toTS() { + const { model } = this; + const isComposite = this.dmmf.isComposite(model.name); + const omitType = this.context.isPreviewFeatureOn("omitApi") ? stringify(buildOmitType({ modelName: this.model.name, context: this.context, fields: this.type.fields }), { + newLine: "leading" + }) : ""; + const hasRelationField = model.fields.some((f) => f.kind === "object"); + const includeType = hasRelationField ? stringify( + buildIncludeType({ modelName: this.model.name, context: this.context, fields: this.type.fields }), + { + newLine: "leading" + } + ) : ""; + const createManyAndReturnIncludeType = hasRelationField && this.createManyAndReturnType ? stringify( + buildIncludeType({ + typeName: getIncludeCreateManyAndReturnName(this.model.name), + modelName: this.model.name, + context: this.context, + fields: this.createManyAndReturnType.fields + }), + { + newLine: "leading" + } + ) : ""; + return ` +/** + * Model ${model.name} + */ + +${!isComposite ? this.getAggregationTypes() : ""} + +${!isComposite ? this.getGroupByTypes() : ""} + +${stringify(buildSelectType({ modelName: this.model.name, fields: this.type.fields, context: this.context }))} +${this.createManyAndReturnType ? stringify( + buildSelectType({ + modelName: this.model.name, + fields: this.createManyAndReturnType.fields, + context: this.context, + typeName: getSelectCreateManyAndReturnName(this.model.name) + }), + { newLine: "leading" } + ) : ""} +${stringify(buildScalarSelectType({ modelName: this.model.name, fields: this.type.fields, context: this.context }), { + newLine: "leading" + })} +${omitType}${includeType}${createManyAndReturnIncludeType} + +${stringify(buildModelPayload(this.model, this.context), { newLine: "none" })} + +type ${model.name}GetPayload = $Result.GetResult<${getPayloadName(model.name)}, S> + +${isComposite ? "" : new ModelDelegate(this.type, this.context).toTS()} + +${new ModelFieldRefs(this.type).toTS()} + +// Custom InputTypes +${this.argsTypes.map((type) => stringify(type)).join("\n\n")} +`; + } +}; +var ModelDelegate = class { + constructor(outputType, context) { + this.outputType = outputType; + this.context = context; + } + /** + * Returns all available non-aggregate or group actions + * Includes both dmmf and client-only actions + * + * @param availableActions + * @returns + */ + getNonAggregateActions(availableActions) { + const actions = availableActions.filter( + (key) => key !== DMMF.ModelAction.aggregate && key !== DMMF.ModelAction.groupBy && key !== DMMF.ModelAction.count + ); + return actions; + } + toTS() { + const { name } = this.outputType; + const { dmmf } = this.context; + const mapping = dmmf.mappingsMap[name] ?? { model: name, plural: `${name}s` }; + const modelOrType = dmmf.typeAndModelMap[name]; + const availableActions = getModelActions(dmmf, name); + const nonAggregateActions = this.getNonAggregateActions(availableActions); + const groupByArgsName = getGroupByArgsName(name); + const countArgsName = getModelArgName(name, DMMF.ModelAction.count); + this.context.defaultArgsAliases.registerArgName(countArgsName); + const genericDelegateParams = [extArgsParam]; + const excludedArgsForCount = ["select", "include", "distinct"]; + if (this.context.isPreviewFeatureOn("omitApi")) { + excludedArgsForCount.push("omit"); + genericDelegateParams.push(genericParameter("ClientOptions").default(objectType())); + } + if (this.context.isPreviewFeatureOn("relationJoins")) { + excludedArgsForCount.push("relationLoadStrategy"); + } + const excludedArgsForCountType = excludedArgsForCount.map((name2) => `'${name2}'`).join(" | "); + return `${availableActions.includes(DMMF.ModelAction.aggregate) ? `type ${countArgsName} = + Omit<${getModelArgName(name, DMMF.ModelAction.findMany)}, ${excludedArgsForCountType}> & { + select?: ${getCountAggregateInputName(name)} | true + } +` : ""} +export interface ${name}Delegate<${genericDelegateParams.map((param) => stringify(param)).join(", ")}> { +${(0, import_indent_string3.default)(`[K: symbol]: { types: Prisma.TypeMap['model']['${name}'], meta: { name: '${name}' } }`, TAB_SIZE)} +${nonAggregateActions.map((action) => { + const method2 = buildModelDelegateMethod(name, action, this.context); + return stringify(method2, { indentLevel: 1, newLine: "trailing" }); + }).join("\n")} + +${availableActions.includes(DMMF.ModelAction.aggregate) ? `${(0, import_indent_string3.default)(getMethodJSDoc(DMMF.ModelAction.count, mapping, modelOrType), TAB_SIZE)} + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > +` : ""} +${availableActions.includes(DMMF.ModelAction.aggregate) ? `${(0, import_indent_string3.default)(getMethodJSDoc(DMMF.ModelAction.aggregate, mapping, modelOrType), TAB_SIZE)} + aggregate(args: Subset): Prisma.PrismaPromise<${getAggregateGetName(name)}> +` : ""} +${availableActions.includes(DMMF.ModelAction.groupBy) ? `${(0, import_indent_string3.default)(getMethodJSDoc(DMMF.ModelAction.groupBy, mapping, modelOrType), TAB_SIZE)} + groupBy< + T extends ${groupByArgsName}, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ${groupByArgsName}['orderBy'] } + : { orderBy?: ${groupByArgsName}['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 ? ${getGroupByPayloadName( + name + )} : Prisma.PrismaPromise` : ""} +/** + * Fields of the ${name} model + */ +readonly fields: ${getFieldRefsTypeName(name)}; +} + +${stringify(buildFluentWrapperDefinition(name, this.outputType, this.context))} +`; + } +}; +function buildModelDelegateMethod(modelName, actionName, context) { + const mapping = context.dmmf.mappingsMap[modelName] ?? { model: modelName, plural: `${modelName}s` }; + const modelOrType = context.dmmf.typeAndModelMap[modelName]; + const method2 = method(actionName).setDocComment(docComment(getMethodJSDocBody(actionName, mapping, modelOrType))).addParameter(getNonAggregateMethodArgs(modelName, actionName)).setReturnType(getReturnType({ modelName, actionName, context })); + const generic = getNonAggregateMethodGenericParam(modelName, actionName); + if (generic) { + method2.addGenericParameter(generic); + } + return method2; +} +function getNonAggregateMethodArgs(modelName, actionName) { + getReturnType; + const makeParameter = (type2) => parameter("args", type2); + if (actionName === DMMF.ModelAction.count) { + const type2 = omit( + namedType(getModelArgName(modelName, DMMF.ModelAction.findMany)), + unionType(stringLiteral("select")).addVariant(stringLiteral("include")).addVariant(stringLiteral("distinct")) + ); + return makeParameter(type2).optional(); + } + if (actionName === DMMF.ModelAction.findRaw || actionName === DMMF.ModelAction.aggregateRaw) { + return makeParameter(namedType(getModelArgName(modelName, actionName))).optional(); + } + const type = namedType("SelectSubset").addGenericArgument(namedType("T")).addGenericArgument( + namedType(getModelArgName(modelName, actionName)).addGenericArgument(extArgsParam.toArgument()) + ); + const param = makeParameter(type); + if (actionName === DMMF.ModelAction.findMany || actionName === DMMF.ModelAction.findFirst || actionName === DMMF.ModelAction.deleteMany || actionName === DMMF.ModelAction.createMany || actionName === DMMF.ModelAction.createManyAndReturn || actionName === DMMF.ModelAction.findFirstOrThrow) { + param.optional(); + } + return param; +} +function getNonAggregateMethodGenericParam(modelName, actionName) { + if (actionName === DMMF.ModelAction.count || actionName === DMMF.ModelAction.findRaw || actionName === DMMF.ModelAction.aggregateRaw) { + return null; + } + const arg = genericParameter("T"); + if (actionName === DMMF.ModelAction.aggregate) { + return arg.extends(namedType(getAggregateArgsName(modelName))); + } + return arg.extends(namedType(getModelArgName(modelName, actionName))); +} +function getReturnType({ + modelName, + actionName, + context, + isChaining = false, + isNullable = false +}) { + if (actionName === DMMF.ModelAction.count) { + return promise(numberType); + } + if (actionName === DMMF.ModelAction.aggregate) { + return promise(namedType(getAggregateGetName(modelName)).addGenericArgument(namedType("T"))); + } + if (actionName === DMMF.ModelAction.findRaw || actionName === DMMF.ModelAction.aggregateRaw) { + return prismaPromise(namedType("JsonObject")); + } + if (actionName === DMMF.ModelAction.deleteMany || actionName === DMMF.ModelAction.updateMany || actionName === DMMF.ModelAction.createMany) { + return prismaPromise(namedType("BatchPayload")); + } + const isList = actionName === DMMF.ModelAction.findMany || actionName === DMMF.ModelAction.createManyAndReturn; + if (isList) { + let result = getResultType(modelName, actionName, context); + if (isChaining) { + result = unionType(result).addVariant(namedType("Null")); + } + return prismaPromise(result); + } + if (isChaining && actionName === DMMF.ModelAction.findUniqueOrThrow) { + const nullType2 = isNullable ? nullType : namedType("Null"); + const result = unionType(getResultType(modelName, actionName, context)).addVariant(nullType2); + return getFluentWrapper(modelName, context, result, nullType2); + } + if (actionName === DMMF.ModelAction.findFirst || actionName === DMMF.ModelAction.findUnique) { + const result = unionType(getResultType(modelName, actionName, context)).addVariant(nullType); + return getFluentWrapper(modelName, context, result, nullType); + } + return getFluentWrapper(modelName, context, getResultType(modelName, actionName, context)); +} +function getFluentWrapper(modelName, context, resultType, nullType2 = neverType) { + const result = namedType(fluentWrapperName(modelName)).addGenericArgument(resultType).addGenericArgument(nullType2).addGenericArgument(extArgsParam.toArgument()); + if (context.isPreviewFeatureOn("omitApi")) { + result.addGenericArgument(namedType("ClientOptions")); + } + return result; +} +function getResultType(modelName, actionName, context) { + const result = namedType("$Result.GetResult").addGenericArgument(namedType(getPayloadName(modelName)).addGenericArgument(extArgsParam.toArgument())).addGenericArgument(namedType("T")).addGenericArgument(stringLiteral(actionName)); + if (context.isPreviewFeatureOn("omitApi")) { + result.addGenericArgument(namedType("ClientOptions")); + } + return result; +} +function buildFluentWrapperDefinition(modelName, outputType, context) { + const definition = interfaceDeclaration(fluentWrapperName(modelName)); + definition.addGenericParameter(genericParameter("T")).addGenericParameter(genericParameter("Null").default(neverType)).addGenericParameter(extArgsParam).extends(prismaPromise(namedType("T"))); + if (context.isPreviewFeatureOn("omitApi")) { + definition.addGenericParameter(genericParameter("ClientOptions").default(objectType())); + } + definition.add(property(toStringTag, stringLiteral("PrismaPromise")).readonly()); + definition.addMultiple( + outputType.fields.filter( + (field) => field.outputType.location === "outputObjectTypes" && !context.dmmf.isComposite(field.outputType.type) && field.name !== "_count" + ).map((field) => { + const fieldArgType = namedType(getFieldArgName(field, modelName)).addGenericArgument(extArgsParam.toArgument()); + const argsParam = genericParameter("T").extends(fieldArgType).default(objectType()); + return method(field.name).addGenericParameter(argsParam).addParameter(parameter("args", subset(argsParam.toArgument(), fieldArgType)).optional()).setReturnType( + getReturnType({ + modelName: field.outputType.type, + actionName: field.outputType.isList ? DMMF.ModelAction.findMany : DMMF.ModelAction.findUniqueOrThrow, + isChaining: true, + context, + isNullable: field.isNullable + }) + ); + }) + ); + definition.add( + method("then").setDocComment( + docComment` + 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. + ` + ).addGenericParameter(genericParameter("TResult1").default(namedType("T"))).addGenericParameter(genericParameter("TResult2").default(neverType)).addParameter(promiseCallback("onfulfilled", parameter("value", namedType("T")), namedType("TResult1"))).addParameter(promiseCallback("onrejected", parameter("reason", anyType), namedType("TResult2"))).setReturnType(promise(unionType([namedType("TResult1"), namedType("TResult2")]))) + ); + definition.add( + method("catch").setDocComment( + docComment` + 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. + ` + ).addGenericParameter(genericParameter("TResult").default(neverType)).addParameter(promiseCallback("onrejected", parameter("reason", anyType), namedType("TResult"))).setReturnType(promise(unionType([namedType("T"), namedType("TResult")]))) + ); + definition.add( + method("finally").setDocComment( + docComment` + 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. + ` + ).addParameter( + parameter("onfinally", unionType([functionType(), undefinedType, nullType])).optional() + ).setReturnType(promise(namedType("T"))) + ); + return moduleExport(definition).setDocComment(docComment` + The delegate class that acts as a "Promise-like" for ${modelName}. + 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 + `); +} +function promiseCallback(name, callbackParam, returnType) { + return parameter( + name, + unionType([ + functionType().addParameter(callbackParam).setReturnType(typeOrPromiseLike(returnType)), + undefinedType, + nullType + ]) + ).optional(); +} +function typeOrPromiseLike(type) { + return unionType([type, namedType("PromiseLike").addGenericArgument(type)]); +} +function subset(arg, baseType) { + return namedType("Subset").addGenericArgument(arg).addGenericArgument(baseType); +} +function fluentWrapperName(modelName) { + return `Prisma__${modelName}Client`; +} + +// src/generation/TSClient/TSClient.ts +var import_ci_info = __toESM(require_ci_info()); +var import_crypto = __toESM(require("crypto")); +var import_indent_string8 = __toESM(require_indent_string()); +var import_path4 = __toESM(require("path")); + +// src/generation/dmmf.ts +var DMMFHelper = class { + constructor(document) { + this.document = document; + } + get compositeNames() { + return this._compositeNames ??= new Set(this.datamodel.types.map((t) => t.name)); + } + get inputTypesByName() { + return this._inputTypesByName ??= this.buildInputTypesMap(); + } + get typeAndModelMap() { + return this._typeAndModelMap ??= this.buildTypeModelMap(); + } + get mappingsMap() { + return this._mappingsMap ??= this.buildMappingsMap(); + } + get outputTypeMap() { + return this._outputTypeMap ??= this.buildMergedOutputTypeMap(); + } + get rootFieldMap() { + return this._rootFieldMap ??= this.buildRootFieldMap(); + } + get datamodel() { + return this.document.datamodel; + } + get mappings() { + return this.document.mappings; + } + get schema() { + return this.document.schema; + } + get inputObjectTypes() { + return this.schema.inputObjectTypes; + } + get outputObjectTypes() { + return this.schema.outputObjectTypes; + } + isComposite(modelOrTypeName) { + return this.compositeNames.has(modelOrTypeName); + } + getOtherOperationNames() { + return [ + Object.values(this.mappings.otherOperations.write), + Object.values(this.mappings.otherOperations.read) + ].flat(); + } + hasEnumInNamespace(enumName, namespace2) { + return this.schema.enumTypes[namespace2]?.find((schemaEnum) => schemaEnum.name === enumName) !== void 0; + } + resolveInputObjectType(ref) { + return this.inputTypesByName.get(fullyQualifiedName(ref.type, ref.namespace)); + } + resolveOutputObjectType(ref) { + if (ref.location !== "outputObjectTypes") { + return void 0; + } + return this.outputObjectTypes[ref.namespace ?? "prisma"].find((outputObject) => outputObject.name === ref.type); + } + buildModelMap() { + return keyBy(this.datamodel.models, "name"); + } + buildTypeMap() { + return keyBy(this.datamodel.types, "name"); + } + buildTypeModelMap() { + return { ...this.buildTypeMap(), ...this.buildModelMap() }; + } + buildMappingsMap() { + return keyBy(this.mappings.modelOperations, "model"); + } + buildMergedOutputTypeMap() { + if (!this.schema.outputObjectTypes.prisma) { + return { + model: keyBy(this.schema.outputObjectTypes.model, "name"), + prisma: keyBy([], "name") + }; + } + return { + model: keyBy(this.schema.outputObjectTypes.model, "name"), + prisma: keyBy(this.schema.outputObjectTypes.prisma, "name") + }; + } + buildRootFieldMap() { + return { + ...keyBy(this.outputTypeMap.prisma.Query.fields, "name"), + ...keyBy(this.outputTypeMap.prisma.Mutation.fields, "name") + }; + } + buildInputTypesMap() { + const result = /* @__PURE__ */ new Map(); + for (const type of this.inputObjectTypes.prisma) { + result.set(fullyQualifiedName(type.name, "prisma"), type); + } + if (!this.inputObjectTypes.model) { + return result; + } + for (const type of this.inputObjectTypes.model) { + result.set(fullyQualifiedName(type.name, "model"), type); + } + return result; + } +}; +function fullyQualifiedName(typeName, namespace2) { + if (namespace2) { + return `${namespace2}.${typeName}`; + } + return typeName; +} + +// src/generation/Cache.ts +var Cache = class { + constructor() { + this._map = /* @__PURE__ */ new Map(); + } + get(key) { + return this._map.get(key)?.value; + } + set(key, value) { + this._map.set(key, { value }); + } + getOrCreate(key, create) { + const cached = this._map.get(key); + if (cached) { + return cached.value; + } + const value = create(); + this.set(key, value); + return value; + } +}; + +// src/generation/GenericsArgsInfo.ts +var GenericArgsInfo = class { + constructor(_dmmf) { + this._dmmf = _dmmf; + this._cache = new Cache(); + } + /** + * Determines if arg types need generic <$PrismaModel> argument added. + * Essentially, performs breadth-first search for any fieldRefTypes that + * do not have corresponding `meta.source` defined. + * + * @param type + * @returns + */ + typeNeedsGenericModelArg(topLevelType) { + return this._cache.getOrCreate(topLevelType, () => { + const toVisit = [{ type: topLevelType }]; + const visited = /* @__PURE__ */ new Set(); + let item; + while (item = toVisit.shift()) { + const { type: currentType } = item; + const cached = this._cache.get(currentType); + if (cached === true) { + this._cacheResultsForTree(item); + return true; + } + if (cached === false) { + continue; + } + if (visited.has(currentType)) { + continue; + } + if (currentType.meta?.source) { + this._cache.set(currentType, false); + continue; + } + visited.add(currentType); + for (const field of currentType.fields) { + for (const fieldType of field.inputTypes) { + if (fieldType.location === "fieldRefTypes") { + this._cacheResultsForTree(item); + return true; + } + const inputObject = this._dmmf.resolveInputObjectType(fieldType); + if (inputObject) { + toVisit.push({ type: inputObject, parent: item }); + } + } + } + } + for (const visitedType of visited) { + this._cache.set(visitedType, false); + } + return false; + }); + } + typeRefNeedsGenericModelArg(ref) { + if (ref.location === "fieldRefTypes") { + return true; + } + const inputType = this._dmmf.resolveInputObjectType(ref); + if (!inputType) { + return false; + } + return this.typeNeedsGenericModelArg(inputType); + } + _cacheResultsForTree(item) { + let currentItem = item; + while (currentItem) { + this._cache.set(currentItem.type, true); + currentItem = currentItem.parent; + } + } +}; + +// src/generation/utils/buildInjectableEdgeEnv.ts +function buildInjectableEdgeEnv(edge, datasources) { + if (edge === true) { + return declareInjectableEdgeEnv(datasources); + } + return ``; +} +function declareInjectableEdgeEnv(datasources) { + const injectableEdgeEnv = { parsed: {} }; + const envVarNames = getSelectedEnvVarNames(datasources); + for (const envVarName of envVarNames) { + injectableEdgeEnv.parsed[envVarName] = getRuntimeEdgeEnvVar(envVarName); + } + const injectableEdgeEnvJson = JSON.stringify(injectableEdgeEnv, null, 2); + const injectableEdgeEnvCode = injectableEdgeEnvJson.replace(/"/g, ""); + return ` +config.injectableEdgeEnv = () => (${injectableEdgeEnvCode})`; +} +function getSelectedEnvVarNames(datasources) { + return datasources.reduce((acc, datasource) => { + if (datasource.url.fromEnvVar) { + return [...acc, datasource.url.fromEnvVar]; + } + return acc; + }, []); +} +function getRuntimeEdgeEnvVar(envVarName) { + const cfwEnv = `typeof globalThis !== 'undefined' && globalThis['${envVarName}']`; + const nodeOrVercelEnv = `typeof process !== 'undefined' && process.env && process.env.${envVarName}`; + return `${cfwEnv} || ${nodeOrVercelEnv} || undefined`; +} + +// src/generation/utils/buildDebugInitialization.ts +function buildDebugInitialization(edge) { + if (!edge) { + return ""; + } + const debugVar = getRuntimeEdgeEnvVar("DEBUG"); + return `if (${debugVar}) { + Debug.enable(${debugVar}) +} +`; +} + +// src/generation/utils/buildDirname.ts +function buildDirname(edge, relativeOutdir) { + if (edge === true) { + return buildDirnameDefault(); + } + return buildDirnameFind(relativeOutdir); +} +function buildDirnameFind(relativeOutdir) { + return ` +const fs = require('fs') + +config.dirname = __dirname +if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { + const alternativePaths = [ + ${JSON.stringify(pathToPosix(relativeOutdir))}, + ${JSON.stringify(pathToPosix(relativeOutdir).split("/").slice(1).join("/"))}, + ] + + 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 +}`; +} +function buildDirnameDefault() { + return `config.dirname = '/'`; +} + +// src/runtime/core/runtimeDataModel.ts +function dmmfToRuntimeDataModel(dmmfDataModel) { + return { + models: buildMapForRuntime(dmmfDataModel.models), + enums: buildMapForRuntime(dmmfDataModel.enums), + types: buildMapForRuntime(dmmfDataModel.types) + }; +} +function pruneRuntimeDataModel({ models }) { + const prunedModels = {}; + for (const modelName of Object.keys(models)) { + prunedModels[modelName] = { fields: [], dbName: models[modelName].dbName }; + for (const { name, kind, type, relationName, dbName } of models[modelName].fields) { + prunedModels[modelName].fields.push({ name, kind, type, relationName, dbName }); + } + } + return { models: prunedModels, enums: {}, types: {} }; +} +function buildMapForRuntime(list) { + const result = {}; + for (const { name, ...rest } of list) { + result[name] = rest; + } + return result; +} + +// src/generation/utils/buildDMMF.ts +function buildRuntimeDataModel(datamodel, runtimeNameJs) { + const runtimeDataModel = dmmfToRuntimeDataModel(datamodel); + let prunedDataModel; + if (runtimeNameJs === "wasm") { + prunedDataModel = pruneRuntimeDataModel(runtimeDataModel); + } else { + prunedDataModel = runtimeDataModel; + } + const datamodelString = escapeJson(JSON.stringify(prunedDataModel)); + return ` +config.runtimeDataModel = JSON.parse(${JSON.stringify(datamodelString)}) +defineDmmfProperty(exports.Prisma, config.runtimeDataModel)`; +} + +// src/generation/utils/buildGetQueryEngineWasmModule.ts +function buildQueryEngineWasmModule(wasm, copyEngine, runtimeNameJs) { + if (copyEngine && runtimeNameJs === "library" && process.env.PRISMA_CLIENT_FORCE_WASM) { + return `config.engineWasm = { + getRuntime: () => require('./query_engine_bg.js'), + getQueryEngineWasmModule: async () => { + const queryEngineWasmFilePath = require('path').join(config.dirname, 'query_engine_bg.wasm') + const queryEngineWasmFileBytes = require('fs').readFileSync(queryEngineWasmFilePath) + + return new WebAssembly.Module(queryEngineWasmFileBytes) + } + }`; + } + if (copyEngine && wasm === true) { + return `config.engineWasm = { + getRuntime: () => require('./query_engine_bg.js'), + getQueryEngineWasmModule: async () => { + const loader = (await import('#wasm-engine-loader')).default + const engine = (await loader).default + return engine + } +}`; + } + return `config.engineWasm = undefined`; +} + +// src/generation/utils/buildNFTAnnotations.ts +var import_path3 = __toESM(require("path")); + +// ../../helpers/blaze/map.ts +function mapList(object, mapper) { + const mapped = new Array(object.length); + for (let i = 0; i < object.length; ++i) { + mapped[i] = mapper(object[i], i); + } + return mapped; +} +function mapObject(object, mapper) { + const mapped = {}; + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) { + mapped[i] = mapper(object[keys[i]], keys[i]); + } + return mapped; +} +var map = (object, mapper) => { + return Array.isArray(object) ? mapList(object, mapper) : mapObject(object, mapper); +}; + +// src/generation/utils/buildNFTAnnotations.ts +function buildNFTAnnotations(noEngine, engineType, binaryTargets, relativeOutdir) { + if (noEngine === true) return ""; + if (binaryTargets === void 0) { + return ""; + } + if (process.env.NETLIFY) { + const isNodeMajor20OrUp = parseInt(process.versions.node.split(".")[0]) >= 20; + const awsRuntimeVersion = parseAWSNodejsRuntimeEnvVarVersion(); + const isRuntimeEnvVar20OrUp = awsRuntimeVersion && awsRuntimeVersion >= 20; + const isRuntimeEnvVar18OrDown = awsRuntimeVersion && awsRuntimeVersion <= 18; + if ((isNodeMajor20OrUp || isRuntimeEnvVar20OrUp) && !isRuntimeEnvVar18OrDown) { + binaryTargets = ["rhel-openssl-3.0.x"]; + } else { + binaryTargets = ["rhel-openssl-1.0.x"]; + } + } + const engineAnnotations = map(binaryTargets, (binaryTarget) => { + const engineFilename = getQueryEngineFilename(engineType, binaryTarget); + return engineFilename ? buildNFTAnnotation(engineFilename, relativeOutdir) : ""; + }).join("\n"); + const schemaAnnotations = buildNFTAnnotation("schema.prisma", relativeOutdir); + return `${engineAnnotations}${schemaAnnotations}`; +} +function getQueryEngineFilename(engineType, binaryTarget) { + if (engineType === "library" /* Library */) { + return getNodeAPIName(binaryTarget, "fs"); + } + if (engineType === "binary" /* Binary */) { + return `query-engine-${binaryTarget}`; + } + return void 0; +} +function buildNFTAnnotation(fileName, relativeOutdir) { + const relativeFilePath = import_path3.default.join(relativeOutdir, fileName); + return ` +// file annotations for bundling tools to include these files +path.join(__dirname, ${JSON.stringify(pathToPosix(fileName))}); +path.join(process.cwd(), ${JSON.stringify(pathToPosix(relativeFilePath))})`; +} + +// src/generation/utils/buildRequirePath.ts +function buildRequirePath(edge) { + if (edge === true) return ""; + return ` + const path = require('path')`; +} + +// src/generation/utils/buildWarnEnvConflicts.ts +function buildWarnEnvConflicts(edge, runtimeBase, runtimeNameJs) { + if (edge === true) return ""; + return ` +const { warnEnvConflicts } = require('${runtimeBase}/${runtimeNameJs}.js') + +warnEnvConflicts({ + rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), + schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) +})`; +} + +// src/generation/TSClient/common.ts +var import_indent_string4 = __toESM(require_indent_string()); +var commonCodeJS = ({ + runtimeBase, + runtimeNameJs, + browser, + clientVersion: clientVersion2, + engineVersion, + generator, + deno +}) => `${deno ? "const exports = {}" : ""} +Object.defineProperty(exports, "__esModule", { value: true }); +${deno ? ` +import { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + NotFoundError, + getPrismaClient, + sqltag, + empty, + join, + raw, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + defineDmmfProperty, + Public, + getRuntime, + skip +} from '${runtimeBase}/${runtimeNameJs}.js'` : browser ? ` +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, + skip +} = require('${runtimeBase}/${runtimeNameJs}.js') +` : ` +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + NotFoundError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime +} = require('${runtimeBase}/${runtimeNameJs}.js') +`} + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: ${clientVersion2} + * Query Engine version: ${engineVersion} + */ +Prisma.prismaVersion = { + client: "${clientVersion2}", + engine: "${engineVersion}" +} + +Prisma.PrismaClientKnownRequestError = ${notSupportOnBrowser("PrismaClientKnownRequestError", browser)}; +Prisma.PrismaClientUnknownRequestError = ${notSupportOnBrowser("PrismaClientUnknownRequestError", browser)} +Prisma.PrismaClientRustPanicError = ${notSupportOnBrowser("PrismaClientRustPanicError", browser)} +Prisma.PrismaClientInitializationError = ${notSupportOnBrowser("PrismaClientInitializationError", browser)} +Prisma.PrismaClientValidationError = ${notSupportOnBrowser("PrismaClientValidationError", browser)} +Prisma.NotFoundError = ${notSupportOnBrowser("NotFoundError", browser)} +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = ${notSupportOnBrowser("sqltag", browser)} +Prisma.empty = ${notSupportOnBrowser("empty", browser)} +Prisma.join = ${notSupportOnBrowser("join", browser)} +Prisma.raw = ${notSupportOnBrowser("raw", browser)} +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = ${notSupportOnBrowser("Extensions.getExtensionContext", browser)} +Prisma.defineExtension = ${notSupportOnBrowser("Extensions.defineExtension", browser)} + +/** + * 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 +} + +${buildPrismaSkipJs(generator.previewFeatures)} +`; +var notSupportOnBrowser = (fnc, browser) => { + if (browser) { + return `() => { + const runtimeName = getRuntime().prettyName; + throw new Error(\`${fnc} 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\`, +)}`; + } + return fnc; +}; +var commonCodeTS = ({ + runtimeBase, + runtimeNameTs, + clientVersion: clientVersion2, + engineVersion, + generator +}) => ({ + tsWithoutNamespace: () => `import * as runtime from '${runtimeBase}/${runtimeNameTs}'; +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 +`, + ts: () => `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 + +${buildPrismaSkipTs(generator.previewFeatures)} + +/** + * 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: ${clientVersion2} + * Query Engine version: ${engineVersion} + */ +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 { +${buildNullClass("DbNull")} + +${buildNullClass("JsonNull")} + +${buildNullClass("AnyNull")} +} + +/** + * 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 + +` +}); +function buildNullClass(name) { + const source = `/** +* Type of \`Prisma.${name}\`. +* +* You cannot use other instances of this class. Please use the \`Prisma.${name}\` value. +* +* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field +*/ +class ${name} { + private ${name}: never + private constructor() +}`; + return (0, import_indent_string4.default)(source, TAB_SIZE); +} +function buildPrismaSkipTs(previewFeatures) { + if (previewFeatures.includes("strictUndefinedChecks")) { + return ` +/** + * Prisma.skip + */ +export import skip = runtime.skip +`; + } + return ""; +} +function buildPrismaSkipJs(previewFeatures) { + if (previewFeatures.includes("strictUndefinedChecks")) { + return ` +Prisma.skip = skip +`; + } + return ""; +} + +// src/generation/TSClient/Count.ts +var import_indent_string5 = __toESM(require_indent_string()); +var Count = class { + constructor(type, context) { + this.type = type; + this.context = context; + } + get argsTypes() { + const argsTypes = []; + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context).addSelectArg().addIncludeArgIfHasRelations().createExport() + ); + for (const field of this.type.fields) { + if (field.args.length > 0) { + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context).addSchemaArgs(field.args).setGeneratedName(getCountArgsType(this.type.name, field.name)).createExport() + ); + } + } + return argsTypes; + } + toTS() { + const { type } = this; + const { name } = type; + const outputType = buildOutputType(type); + return ` +/** + * Count Type ${name} + */ + +${stringify(outputType)} + +export type ${getSelectName(name)} = { +${(0, import_indent_string5.default)( + type.fields.map((field) => { + const types = ["boolean"]; + if (field.outputType.location === "outputObjectTypes") { + types.push(getFieldArgName(field, this.type.name)); + } + if (field.args.length > 0) { + types.push(getCountArgsType(name, field.name)); + } + return `${field.name}?: ${types.join(" | ")}`; + }).join("\n"), + TAB_SIZE + )} +} + +// Custom InputTypes +${this.argsTypes.map((typeExport) => stringify(typeExport)).join("\n\n")} +`; + } +}; +function getCountArgsType(typeName, fieldName) { + return `${typeName}Count${capitalize2(fieldName)}Args`; +} + +// src/generation/TSClient/DefaultArgsAliases.ts +var DefaultArgsAliases = class { + constructor() { + this.existingArgTypes = /* @__PURE__ */ new Set(); + this.possibleAliases = []; + } + addPossibleAlias(newName, legacyName) { + this.possibleAliases.push({ newName, legacyName }); + } + registerArgName(name) { + this.existingArgTypes.add(name); + } + generateAliases() { + const aliases = []; + for (const { newName, legacyName } of this.possibleAliases) { + if (this.existingArgTypes.has(legacyName)) { + continue; + } + aliases.push( + stringify( + moduleExport( + typeDeclaration(legacyName, namedType(newName).addGenericArgument(extArgsParam.toArgument())).addGenericParameter(extArgsParam) + ).setDocComment(docComment(`@deprecated Use ${newName} instead`)), + { indentLevel: 1 } + ) + ); + } + return aliases.join("\n"); + } +}; + +// src/generation/TSClient/FieldRefInput.ts +var FieldRefInput = class { + constructor(type) { + this.type = type; + } + toTS() { + const allowedTypes = this.getAllowedTypes(); + return ` +/** + * Reference to a field of type ${allowedTypes} + */ +export type ${this.type.name}<$PrismaModel> = FieldRefInputType<$PrismaModel, ${allowedTypes}> + `; + } + getAllowedTypes() { + return this.type.allowTypes.map(getRefAllowedTypeName).join(" | "); + } +}; + +// src/generation/TSClient/GenerateContext.ts +var GenerateContext = class { + constructor({ dmmf, genericArgsInfo, defaultArgsAliases, generator }) { + this.dmmf = dmmf; + this.genericArgsInfo = genericArgsInfo; + this.defaultArgsAliases = defaultArgsAliases; + this.generator = generator; + } + isPreviewFeatureOn(previewFeature) { + return this.generator?.previewFeatures?.includes(previewFeature) ?? false; + } +}; + +// src/generation/TSClient/PrismaClient.ts +var import_indent_string7 = __toESM(require_indent_string()); + +// src/generation/utils/runtimeImport.ts +function runtimeImport(name) { + return name; +} +function runtimeImportedType(name) { + return namedType(`runtime.${name}`); +} + +// src/generation/TSClient/Datasources.ts +var import_indent_string6 = __toESM(require_indent_string()); +var Datasources = class { + constructor(internalDatasources) { + this.internalDatasources = internalDatasources; + } + toTS() { + const sources = this.internalDatasources; + return `export type Datasources = { +${(0, import_indent_string6.default)(sources.map((s) => `${s.name}?: Datasource`).join("\n"), 2)} +}`; + } +}; + +// src/generation/TSClient/globalOmit.ts +function globalOmitConfig(dmmf) { + const objectType2 = objectType().addMultiple( + dmmf.datamodel.models.map((model) => { + const type = namedType(getOmitName(model.name)); + return property(lowerCase(model.name), type).optional(); + }) + ); + return moduleExport(typeDeclaration("GlobalOmitConfig", objectType2)); +} + +// src/generation/TSClient/PrismaClient.ts +function clientTypeMapModelsDefinition(context) { + const meta = objectType(); + const modelNames = context.dmmf.datamodel.models.map((m) => m.name); + if (modelNames.length === 0) { + meta.add(property("modelProps", neverType)); + } else { + meta.add(property("modelProps", unionType(modelNames.map((name) => stringLiteral(lowerCase(name)))))); + } + const isolationLevel = context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma") ? namedType("Prisma.TransactionIsolationLevel") : neverType; + meta.add(property("txIsolationLevel", isolationLevel)); + const model = objectType(); + model.addMultiple( + modelNames.map((modelName) => { + const entry = objectType(); + entry.add( + property("payload", namedType(getPayloadName(modelName)).addGenericArgument(extArgsParam.toArgument())) + ); + entry.add(property("fields", namedType(`Prisma.${getFieldRefsTypeName(modelName)}`))); + const actions = getModelActions(context.dmmf, modelName); + const operations = objectType(); + operations.addMultiple( + actions.map((action) => { + const operationType = objectType(); + const argsType = `Prisma.${getModelArgName(modelName, action)}`; + operationType.add(property("args", namedType(argsType).addGenericArgument(extArgsParam.toArgument()))); + operationType.add(property("result", clientTypeMapModelsResultDefinition(modelName, action))); + return property(action, operationType); + }) + ); + entry.add(property("operations", operations)); + return property(modelName, entry); + }) + ); + return objectType().add(property("meta", meta)).add(property("model", model)); +} +function clientTypeMapModelsResultDefinition(modelName, action) { + if (action === "count") + return unionType([optional(namedType(getCountAggregateOutputName(modelName))), numberType]); + if (action === "groupBy") return array(optional(namedType(getGroupByName(modelName)))); + if (action === "aggregate") return optional(namedType(getAggregateName(modelName))); + if (action === "findRaw") return namedType("JsonObject"); + if (action === "aggregateRaw") return namedType("JsonObject"); + if (action === "deleteMany") return namedType("BatchPayload"); + if (action === "createMany") return namedType("BatchPayload"); + if (action === "createManyAndReturn") return array(payloadToResult(modelName)); + if (action === "updateMany") return namedType("BatchPayload"); + if (action === "findMany") return array(payloadToResult(modelName)); + if (action === "findFirst") return unionType([payloadToResult(modelName), nullType]); + if (action === "findUnique") return unionType([payloadToResult(modelName), nullType]); + if (action === "findFirstOrThrow") return payloadToResult(modelName); + if (action === "findUniqueOrThrow") return payloadToResult(modelName); + if (action === "create") return payloadToResult(modelName); + if (action === "update") return payloadToResult(modelName); + if (action === "upsert") return payloadToResult(modelName); + if (action === "delete") return payloadToResult(modelName); + assertNever(action, `Unknown action: ${action}`); +} +function payloadToResult(modelName) { + return namedType("$Utils.PayloadToResult").addGenericArgument(namedType(getPayloadName(modelName))); +} +function clientTypeMapOthersDefinition(context) { + const otherOperationsNames = context.dmmf.getOtherOperationNames().flatMap((name) => { + const results = [`$${name}`]; + if (name === "executeRaw" || name === "queryRaw") { + results.push(`$${name}Unsafe`); + } + if (name === "queryRaw" && context.isPreviewFeatureOn("typedSql")) { + results.push(`$queryRawTyped`); + } + return results; + }); + const argsResultMap = { + $executeRaw: { args: "[query: TemplateStringsArray | Prisma.Sql, ...values: any[]]", result: "any" }, + $queryRaw: { args: "[query: TemplateStringsArray | Prisma.Sql, ...values: any[]]", result: "any" }, + $executeRawUnsafe: { args: "[query: string, ...values: any[]]", result: "any" }, + $queryRawUnsafe: { args: "[query: string, ...values: any[]]", result: "any" }, + $runCommandRaw: { args: "Prisma.InputJsonObject", result: "Prisma.JsonObject" }, + $queryRawTyped: { args: "runtime.UnknownTypedSql", result: "Prisma.JsonObject" } + }; + return `{ + other: { + payload: any + operations: {${otherOperationsNames.reduce((acc, action) => { + return `${acc} + ${action}: { + args: ${argsResultMap[action].args}, + result: ${argsResultMap[action].result} + }`; + }, "")} + } + } +}`; +} +function clientTypeMapDefinition(context) { + const typeMap = `${stringify(clientTypeMapModelsDefinition(context))} & ${clientTypeMapOthersDefinition(context)}`; + return ` +interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record> { + returns: Prisma.TypeMap +} + +export type TypeMap = ${typeMap}`; +} +function clientExtensionsDefinitions(context) { + const typeMap = clientTypeMapDefinition(context); + const define2 = moduleExport( + constDeclaration( + "defineExtension", + namedType("$Extensions.ExtendsHook").addGenericArgument(stringLiteral("define")).addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(namedType("$Extensions.DefaultArgs")) + ) + ); + return [typeMap, stringify(define2)].join("\n"); +} +function extendsPropertyDefinition(context) { + const extendsDefinition = namedType("$Extensions.ExtendsHook").addGenericArgument(stringLiteral("extends")).addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(namedType("ExtArgs")); + if (context.isPreviewFeatureOn("omitApi")) { + extendsDefinition.addGenericArgument( + namedType("$Utils.Call").addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(objectType().add(property("extArgs", namedType("ExtArgs")))) + ).addGenericArgument(namedType("ClientOptions")); + } + return stringify(property("$extends", extendsDefinition), { indentLevel: 1 }); +} +function batchingTransactionDefinition(context) { + const method2 = method("$transaction").setDocComment( + docComment` + 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). + ` + ).addGenericParameter(genericParameter("P").extends(array(prismaPromise(anyType)))).addParameter(parameter("arg", arraySpread(namedType("P")))).setReturnType(promise(namedType("runtime.Types.Utils.UnwrapTuple").addGenericArgument(namedType("P")))); + if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) { + const options = objectType().formatInline().add(property("isolationLevel", namedType("Prisma.TransactionIsolationLevel")).optional()); + method2.addParameter(parameter("options", options).optional()); + } + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function interactiveTransactionDefinition(context) { + const options = objectType().formatInline().add(property("maxWait", numberType).optional()).add(property("timeout", numberType).optional()); + if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) { + const isolationLevel = property("isolationLevel", namedType("Prisma.TransactionIsolationLevel")).optional(); + options.add(isolationLevel); + } + const returnType = promise(namedType("R")); + const callbackType = functionType().addParameter( + parameter("prisma", omit(namedType("PrismaClient"), namedType("runtime.ITXClientDenyList"))) + ).setReturnType(returnType); + const method2 = method("$transaction").addGenericParameter(genericParameter("R")).addParameter(parameter("fn", callbackType)).addParameter(parameter("options", options).optional()).setReturnType(returnType); + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function queryRawDefinition(context) { + if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) { + return ""; + } + return ` + /** + * 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;`; +} +function executeRawDefinition(context) { + if (!context.dmmf.mappings.otherOperations.write.includes("executeRaw")) { + return ""; + } + return ` + /** + * 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;`; +} +function queryRawTypedDefinition(context) { + if (!context.isPreviewFeatureOn("typedSql")) { + return ""; + } + if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) { + return ""; + } + const param = genericParameter("T"); + const method2 = method("$queryRawTyped").setDocComment( + docComment` + Executes a typed SQL query and returns a typed result + @example + \`\`\` + import { myQuery } from '@prisma/client/sql' + + const result = await prisma.$queryRawTyped(myQuery()) + \`\`\` + ` + ).addGenericParameter(param).addParameter( + parameter( + "typedSql", + runtimeImportedType("TypedSql").addGenericArgument(array(unknownType)).addGenericArgument(param.toArgument()) + ) + ).setReturnType(prismaPromise(array(param.toArgument()))); + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function metricDefinition(context) { + if (!context.isPreviewFeatureOn("metrics")) { + return ""; + } + const property2 = property("$metrics", namedType(`runtime.${runtimeImport("MetricsClient")}`)).setDocComment( + docComment` + Gives access to the client metrics in json or prometheus format. + + @example + \`\`\` + const metrics = await prisma.$metrics.json() + // or + const metrics = await prisma.$metrics.prometheus() + \`\`\` + ` + ).readonly(); + return stringify(property2, { indentLevel: 1, newLine: "leading" }); +} +function runCommandRawDefinition(context) { + if (!context.dmmf.mappings.otherOperations.write.includes("runCommandRaw")) { + return ""; + } + const method2 = method("$runCommandRaw").addParameter(parameter("command", namedType("Prisma.InputJsonObject"))).setReturnType(prismaPromise(namedType("Prisma.JsonObject"))).setDocComment(docComment` + Executes a raw MongoDB command and returns the result of it. + @example + \`\`\` + const user = await prisma.$runCommandRaw({ + aggregate: 'User', + pipeline: [{ $match: { name: 'Bob' } }, { $project: { email: true, _id: false } }], + explain: false, + }) + \`\`\` + + Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + `); + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function applyPendingMigrationsDefinition() { + if (this.runtimeNameTs !== "react-native") { + return null; + } + const method2 = method("$applyPendingMigrations").setReturnType(promise(voidType)).setDocComment( + docComment`Tries to apply pending migrations one by one. If a migration fails to apply, the function will stop and throw an error. You are responsible for informing the user and possibly blocking the app as we cannot guarantee the state of the database.` + ); + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function eventRegistrationMethodDeclaration(runtimeNameTs) { + if (runtimeNameTs === "binary.js") { + return `$on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : V extends 'beforeExit' ? () => $Utils.JsPromise : Prisma.LogEvent) => void): void;`; + } else { + return `$on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void;`; + } +} +var PrismaClientClass = class { + constructor(context, internalDatasources, outputDir, runtimeNameTs, browser) { + this.context = context; + this.internalDatasources = internalDatasources; + this.outputDir = outputDir; + this.runtimeNameTs = runtimeNameTs; + this.browser = browser; + } + get jsDoc() { + const { dmmf } = this.context; + let example; + if (dmmf.mappings.modelOperations.length) { + example = dmmf.mappings.modelOperations[0]; + } else { + example = { + model: "User", + plural: "users" + }; + } + return `/** + * ## Prisma Client \u02B2\u02E2 + * + * Type-safe database client for TypeScript & Node.js + * @example + * \`\`\` + * const prisma = new PrismaClient() + * // Fetch zero or more ${capitalize2(example.plural)} + * const ${lowerCase(example.plural)} = await prisma.${lowerCase(example.model)}.findMany() + * \`\`\` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */`; + } + toTSWithoutNamespace() { + const { dmmf } = this.context; + return `${this.jsDoc} +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'] } + + ${(0, import_indent_string7.default)(this.jsDoc, TAB_SIZE)} + + constructor(optionsArg ?: Prisma.Subset); + ${eventRegistrationMethodDeclaration(this.runtimeNameTs)} + + /** + * 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 + +${[ + executeRawDefinition(this.context), + queryRawDefinition(this.context), + queryRawTypedDefinition(this.context), + batchingTransactionDefinition(this.context), + interactiveTransactionDefinition(this.context), + runCommandRawDefinition(this.context), + metricDefinition(this.context), + applyPendingMigrationsDefinition.bind(this)(), + extendsPropertyDefinition(this.context) + ].filter((d) => d !== null).join("\n").trim()} + + ${(0, import_indent_string7.default)( + dmmf.mappings.modelOperations.filter((m) => m.findMany).map((m) => { + let methodName = lowerCase(m.model); + if (methodName === "constructor") { + methodName = '["constructor"]'; + } + const generics = ["ExtArgs"]; + if (this.context.isPreviewFeatureOn("omitApi")) { + generics.push("ClientOptions"); + } + return `/** + * \`prisma.${methodName}\`: Exposes CRUD operations for the **${m.model}** model. + * Example usage: + * \`\`\`ts + * // Fetch zero or more ${capitalize2(m.plural)} + * const ${lowerCase(m.plural)} = await prisma.${methodName}.findMany() + * \`\`\` + */ +get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`; + }).join("\n\n"), + 2 + )} +}`; + } + toTS() { + const clientOptions = this.buildClientOptions(); + const isOmitEnabled = this.context.isPreviewFeatureOn("omitApi"); + return `${new Datasources(this.internalDatasources).toTS()} +${clientExtensionsDefinitions(this.context)} +export type DefaultPrismaClient = PrismaClient +export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' +${stringify(moduleExport(clientOptions))} +${isOmitEnabled ? stringify(globalOmitConfig(this.context.dmmf)) : ""} + +/* 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 +`; + } + buildClientOptions() { + const clientOptions = interfaceDeclaration("PrismaClientOptions").add( + property("datasources", namedType("Datasources")).optional().setDocComment(docComment("Overwrites the datasource url from your schema.prisma file")) + ).add( + property("datasourceUrl", stringType).optional().setDocComment(docComment("Overwrites the datasource url from your schema.prisma file")) + ).add( + property("errorFormat", namedType("ErrorFormat")).optional().setDocComment(docComment('@default "colorless"')) + ).add( + property("log", array(unionType([namedType("LogLevel"), namedType("LogDefinition")]))).optional().setDocComment(docComment` + @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). + `) + ); + const transactionOptions = objectType().add(property("maxWait", numberType).optional()).add(property("timeout", numberType).optional()); + if (this.context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) { + transactionOptions.add(property("isolationLevel", namedType("Prisma.TransactionIsolationLevel")).optional()); + } + clientOptions.add( + property("transactionOptions", transactionOptions).optional().setDocComment(docComment` + The default values for transactionOptions + maxWait ?= 2000 + timeout ?= 5000 + `) + ); + if (this.runtimeNameTs === "library.js" && this.context.isPreviewFeatureOn("driverAdapters")) { + clientOptions.add( + property("adapter", unionType([namedType("runtime.DriverAdapter"), namedType("null")])).optional().setDocComment( + docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`") + ) + ); + } + if (this.context.isPreviewFeatureOn("omitApi")) { + clientOptions.add( + property("omit", namedType("Prisma.GlobalOmitConfig")).optional().setDocComment(docComment` + Global configuration for omitting model fields by default. + + @example + \`\`\` + const prisma = new PrismaClient({ + omit: { + user: { + password: true + } + } + }) + \`\`\` + `) + ); + } + return clientOptions; + } +}; + +// src/generation/TSClient/TSClient.ts +var TSClient = class { + constructor(options) { + this.options = options; + this.dmmf = new DMMFHelper(options.dmmf); + this.genericsInfo = new GenericArgsInfo(this.dmmf); + } + toJS() { + const { + edge, + wasm, + binaryPaths, + generator, + outputDir, + datamodel: inlineSchema, + runtimeBase, + runtimeNameJs, + datasources, + deno, + copyEngine = true, + reusedJs, + envPaths + } = this.options; + if (reusedJs) { + return `module.exports = { ...require('${reusedJs}') }`; + } + const relativeEnvPaths = { + rootEnvPath: envPaths.rootEnvPath && pathToPosix(import_path4.default.relative(outputDir, envPaths.rootEnvPath)), + schemaEnvPath: envPaths.schemaEnvPath && pathToPosix(import_path4.default.relative(outputDir, envPaths.schemaEnvPath)) + }; + const clientEngineType = getClientEngineType(generator); + generator.config.engineType = clientEngineType; + const binaryTargets = clientEngineType === "library" /* Library */ ? Object.keys(binaryPaths.libqueryEngine ?? {}) : Object.keys(binaryPaths.queryEngine ?? {}); + const inlineSchemaHash = import_crypto.default.createHash("sha256").update(Buffer.from(inlineSchema, "utf8").toString("base64")).digest("hex"); + const datasourceFilePath = datasources[0].sourceFilePath; + const config = { + generator, + relativeEnvPaths, + relativePath: pathToPosix(import_path4.default.relative(outputDir, import_path4.default.dirname(datasourceFilePath))), + clientVersion: this.options.clientVersion, + engineVersion: this.options.engineVersion, + datasourceNames: datasources.map((d) => d.name), + activeProvider: this.options.activeProvider, + postinstall: this.options.postinstall, + ciName: import_ci_info.default.name ?? void 0, + inlineDatasources: datasources.reduce((acc, ds) => { + return acc[ds.name] = { url: ds.url }, acc; + }, {}), + inlineSchema, + inlineSchemaHash, + copyEngine + }; + const relativeOutdir = import_path4.default.relative(process.cwd(), outputDir); + const code = `${commonCodeJS({ ...this.options, browser: false })} +${buildRequirePath(edge)} + +/** + * Enums + */ +${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")} +${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""} + +${new Enum( + { + name: "ModelName", + values: this.dmmf.mappings.modelOperations.map((m) => m.model) + }, + true + ).toJS()} +/** + * Create the Client + */ +const config = ${JSON.stringify(config, null, 2)} +${buildDirname(edge, relativeOutdir)} +${buildRuntimeDataModel(this.dmmf.datamodel, runtimeNameJs)} +${buildQueryEngineWasmModule(wasm, copyEngine, runtimeNameJs)} +${buildInjectableEdgeEnv(edge, datasources)} +${buildWarnEnvConflicts(edge, runtimeBase, runtimeNameJs)} +${buildDebugInitialization(edge)} +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma)${deno ? "\nexport { exports as default, Prisma, PrismaClient }" : ""} +${buildNFTAnnotations(edge || !copyEngine, clientEngineType, binaryTargets, relativeOutdir)} +`; + return code; + } + toTS() { + const { reusedTs } = this.options; + if (reusedTs) { + const topExports = moduleExportFrom(`./${reusedTs}`); + return stringify(topExports); + } + const context = new GenerateContext({ + dmmf: this.dmmf, + genericArgsInfo: this.genericsInfo, + generator: this.options.generator, + defaultArgsAliases: new DefaultArgsAliases() + }); + const prismaClientClass = new PrismaClientClass( + context, + this.options.datasources, + this.options.outputDir, + this.options.runtimeNameTs, + this.options.browser + ); + const commonCode = commonCodeTS(this.options); + const modelAndTypes = Object.values(this.dmmf.typeAndModelMap).reduce((acc, modelOrType) => { + if (this.dmmf.outputTypeMap.model[modelOrType.name]) { + acc.push(new Model(modelOrType, context)); + } + return acc; + }, []); + const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS()); + const modelEnums = []; + const modelEnumsAliases = []; + for (const enumType of this.dmmf.schema.enumTypes.model ?? []) { + modelEnums.push(new Enum(enumType, false).toTS()); + modelEnumsAliases.push( + stringify(moduleExport(typeDeclaration(enumType.name, namedType(`$Enums.${enumType.name}`)))), + stringify( + moduleExport(constDeclaration(enumType.name, namedType(`typeof $Enums.${enumType.name}`))) + ) + ); + } + const fieldRefs = this.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? []; + const countTypes = this.dmmf.schema.outputObjectTypes.prisma?.filter((t) => t.name.endsWith("CountOutputType")).map((t) => new Count(t, context)); + const code = ` +/** + * Client +**/ + +${commonCode.tsWithoutNamespace()} + +${modelAndTypes.map((m) => m.toTSWithoutNamespace()).join("\n")} +${modelEnums.length > 0 ? ` +/** + * Enums + */ +export namespace $Enums { + ${modelEnums.join("\n\n")} +} + +${modelEnumsAliases.join("\n\n")} +` : ""} +${prismaClientClass.toTSWithoutNamespace()} + +export namespace Prisma { +${(0, import_indent_string8.default)( + `${commonCode.ts()} +${new Enum( + { + name: "ModelName", + values: this.dmmf.mappings.modelOperations.map((m) => m.model) + }, + true + ).toTS()} + +${prismaClientClass.toTS()} +export type Datasource = { + url?: string +} + +/** + * Count Types + */ + +${countTypes.map((t) => t.toTS()).join("\n")} + +/** + * Models + */ +${modelAndTypes.map((model) => model.toTS()).join("\n")} + +/** + * Enums + */ + +${prismaEnums?.join("\n\n")} +${fieldRefs.length > 0 ? ` +/** + * Field references + */ + +${fieldRefs.join("\n\n")}` : ""} +/** + * Deep Input Types + */ + +${this.dmmf.inputObjectTypes.prisma?.reduce((acc, inputType) => { + if (inputType.name.includes("Json") && inputType.name.includes("Filter")) { + const needsGeneric = this.genericsInfo.typeNeedsGenericModelArg(inputType); + const innerName = needsGeneric ? `${inputType.name}Base<$PrismaModel>` : `${inputType.name}Base`; + const typeName = needsGeneric ? `${inputType.name}<$PrismaModel = never>` : inputType.name; + const baseName = `Required<${innerName}>`; + acc.push(`export type ${typeName} = + | PatchUndefined< + Either<${baseName}, Exclude>, + ${baseName} + > + | OptionalFlat>`); + acc.push(new InputType(inputType, context).overrideName(`${inputType.name}Base`).toTS()); + } else { + acc.push(new InputType(inputType, context).toTS()); + } + return acc; + }, []).join("\n")} + +${this.dmmf.inputObjectTypes.model?.map((inputType) => new InputType(inputType, context).toTS()).join("\n") ?? ""} + +/** + * Aliases for legacy arg types + */ +${context.defaultArgsAliases.generateAliases()} + +/** + * Batch Payload for updateMany & deleteMany & createMany + */ + +export type BatchPayload = { + count: number +} + +/** + * DMMF + */ +export const dmmf: runtime.BaseDMMF +`, + 2 + )}}`; + return code; + } + toBrowserJS() { + const code = `${commonCodeJS({ + ...this.options, + runtimeNameJs: "index-browser", + browser: true + })} +/** + * Enums + */ + +${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")} +${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""} + +${new Enum( + { + name: "ModelName", + values: this.dmmf.mappings.modelOperations.map((m) => m.model) + }, + true + ).toJS()} + +/** + * 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) +`; + return code; + } +}; + +// src/generation/typedSql/buildDbEnums.ts +var DbEnumsList = class { + constructor(enums) { + this.enums = enums.map((dmmfEnum) => ({ + name: dmmfEnum.dbName ?? dmmfEnum.name, + values: dmmfEnum.values.map((dmmfValue) => dmmfValue.dbName ?? dmmfValue.name) + })); + } + isEmpty() { + return this.enums.length === 0; + } + hasEnum(name) { + return Boolean(this.enums.find((dbEnum) => dbEnum.name === name)); + } + *validJsIdentifiers() { + for (const dbEnum of this.enums) { + if (isValidJsIdentifier(dbEnum.name)) { + yield dbEnum; + } + } + } + *invalidJsIdentifiers() { + for (const dbEnum of this.enums) { + if (!isValidJsIdentifier(dbEnum.name)) { + yield dbEnum; + } + } + } +}; +function buildDbEnums(list) { + const file2 = file(); + file2.add(buildInvalidIdentifierEnums(list)); + file2.add(buildValidIdentifierEnums(list)); + return stringify(file2); +} +function buildValidIdentifierEnums(list) { + const namespace2 = namespace("$DbEnums"); + for (const dbEnum of list.validJsIdentifiers()) { + namespace2.add(typeDeclaration(dbEnum.name, enumToUnion(dbEnum))); + } + return moduleExport(namespace2); +} +function buildInvalidIdentifierEnums(list) { + const iface = interfaceDeclaration("$DbEnums"); + for (const dbEnum of list.invalidJsIdentifiers()) { + iface.add(property(dbEnum.name, enumToUnion(dbEnum))); + } + return moduleExport(iface); +} +function enumToUnion(dbEnum) { + return unionType(dbEnum.values.map(stringLiteral)); +} +function queryUsesEnums(query, enums) { + if (enums.isEmpty()) { + return false; + } + return query.parameters.some((param) => enums.hasEnum(param.typ)) || query.resultColumns.some((column) => enums.hasEnum(column.typ)); +} + +// src/generation/typedSql/buildIndex.ts +function buildIndexTs(queries, enums) { + const file2 = file(); + if (!enums.isEmpty()) { + file2.add(moduleExportFrom("./$DbEnums").named("$DbEnums")); + } + for (const query of queries) { + file2.add(moduleExportFrom(`./${query.name}`)); + } + return stringify(file2); +} +function buildIndexCjs(queries, edgeRuntimeSuffix) { + const writer = new Writer(0, void 0); + writer.writeLine('"use strict"'); + for (const { name } of queries) { + const fileName = edgeRuntimeSuffix ? `${name}.${edgeRuntimeSuffix}` : name; + writer.writeLine(`exports.${name} = require("./${fileName}.js").${name}`); + } + return writer.toString(); +} +function buildIndexEsm(queries, edgeRuntimeSuffix) { + const writer = new Writer(0, void 0); + for (const { name } of queries) { + const fileName = edgeRuntimeSuffix ? `${name}.${edgeRuntimeSuffix}` : name; + writer.writeLine(`export * from "./${fileName}.mjs"`); + } + return writer.toString(); +} + +// src/generation/typedSql/mapTypes.ts +var decimal = namedType("$runtime.Decimal"); +var buffer = namedType("Buffer"); +var date = namedType("Date"); +var inputJsonValue = namedType("$runtime.InputJsonObject"); +var jsonValue = namedType("$runtime.JsonValue"); +var bigintIn = unionType([numberType, bigintType]); +var decimalIn = unionType([numberType, decimal]); +var typeMappings = { + unknown: unknownType, + string: stringType, + int: numberType, + bigint: { + in: bigintIn, + out: bigintType + }, + decimal: { + in: decimalIn, + out: decimal + }, + float: numberType, + double: numberType, + enum: stringType, + // TODO: + bytes: buffer, + bool: booleanType, + char: stringType, + json: { + in: inputJsonValue, + out: jsonValue + }, + xml: stringType, + uuid: stringType, + date, + datetime: date, + time: date, + null: nullType, + "int-array": array(numberType), + "string-array": array(stringType), + "json-array": { + in: array(inputJsonValue), + out: array(jsonValue) + }, + "uuid-array": array(stringType), + "xml-array": array(stringType), + "bigint-array": { + in: array(bigintIn), + out: array(bigintType) + }, + "float-array": array(numberType), + "double-array": array(numberType), + "char-array": array(stringType), + "bytes-array": array(buffer), + "bool-array": array(booleanType), + "date-array": array(date), + "time-array": array(date), + "datetime-array": array(date), + "decimal-array": { + in: array(decimalIn), + out: array(decimal) + } +}; +function getInputType(introspectionType, nullable, enums) { + const inn = getMappingConfig(introspectionType, enums).in; + if (!nullable) { + return inn; + } else { + return new UnionType(inn).addVariant(nullType); + } +} +function getOutputType(introspectionType, nullable, enums) { + const out = getMappingConfig(introspectionType, enums).out; + if (!nullable) { + return out; + } else { + return new UnionType(out).addVariant(nullType); + } +} +function getMappingConfig(introspectionType, enums) { + const config = typeMappings[introspectionType]; + if (!config) { + if (enums.hasEnum(introspectionType)) { + const type = getEnumType(introspectionType); + return { in: type, out: type }; + } + throw new Error("Unknown type"); + } + if (config instanceof TypeBuilder) { + return { in: config, out: config }; + } + return config; +} +function getEnumType(name) { + if (isValidJsIdentifier(name)) { + return namedType(`$DbEnums.${name}`); + } + return namedType("$DbEnums").subKey(name); +} + +// src/generation/typedSql/buildTypedQuery.ts +function buildTypedQueryTs({ query, runtimeBase, runtimeName, enums }) { + const file2 = file(); + file2.addImport(moduleImport(`${runtimeBase}/${runtimeName}`).asNamespace("$runtime")); + if (queryUsesEnums(query, enums)) { + file2.addImport(moduleImport("./$DbEnums").named("$DbEnums")); + } + const doc = docComment(query.documentation ?? void 0); + const factoryType = functionType(); + const parametersType = tupleType(); + for (const param of query.parameters) { + const paramType = getInputType(param.typ, param.nullable, enums); + factoryType.addParameter(parameter(param.name, paramType)); + parametersType.add(tupleItem(paramType).setName(param.name)); + if (param.documentation) { + doc.addText(`@param ${param.name} ${param.documentation}`); + } else { + doc.addText(`@param ${param.name}`); + } + } + factoryType.setReturnType( + namedType("$runtime.TypedSql").addGenericArgument(namedType(`${query.name}.Parameters`)).addGenericArgument(namedType(`${query.name}.Result`)) + ); + file2.add(moduleExport(constDeclaration(query.name, factoryType)).setDocComment(doc)); + const namespace2 = namespace(query.name); + namespace2.add(moduleExport(typeDeclaration("Parameters", parametersType))); + namespace2.add(buildResultType(query, enums)); + file2.add(moduleExport(namespace2)); + return stringify(file2); +} +function buildResultType(query, enums) { + const type = objectType().addMultiple( + query.resultColumns.map((column) => property(column.name, getOutputType(column.typ, column.nullable, enums))) + ); + return moduleExport(typeDeclaration("Result", type)); +} +function buildTypedQueryCjs({ query, runtimeBase, runtimeName }) { + const writer = new Writer(0, void 0); + writer.writeLine('"use strict"'); + writer.writeLine(`const { makeTypedQueryFactory: $mkFactory } = require("${runtimeBase}/${runtimeName}")`); + writer.writeLine(`exports.${query.name} = /*#__PURE__*/ $mkFactory(${JSON.stringify(query.source)})`); + return writer.toString(); +} +function buildTypedQueryEsm({ query, runtimeBase, runtimeName }) { + const writer = new Writer(0, void 0); + writer.writeLine(`import { makeTypedQueryFactory as $mkFactory } from "${runtimeBase}/${runtimeName}"`); + writer.writeLine(`export const ${query.name} = /*#__PURE__*/ $mkFactory(${JSON.stringify(query.source)})`); + return writer.toString(); +} + +// src/generation/typedSql/typedSql.ts +function buildTypedSql({ + queries, + runtimeBase, + edgeRuntimeName, + mainRuntimeName, + dmmf +}) { + const fileMap = {}; + const enums = new DbEnumsList(dmmf.datamodel.enums); + if (!enums.isEmpty()) { + fileMap["$DbEnums.d.ts"] = buildDbEnums(enums); + } + for (const query of queries) { + const options = { query, runtimeBase, runtimeName: mainRuntimeName, enums }; + const edgeOptions = { ...options, runtimeName: `${edgeRuntimeName}.js` }; + fileMap[`${query.name}.d.ts`] = buildTypedQueryTs(options); + fileMap[`${query.name}.js`] = buildTypedQueryCjs(options); + fileMap[`${query.name}.${edgeRuntimeName}.js`] = buildTypedQueryCjs(edgeOptions); + fileMap[`${query.name}.mjs`] = buildTypedQueryEsm(options); + fileMap[`${query.name}.edge.mjs`] = buildTypedQueryEsm(edgeOptions); + } + fileMap["index.d.ts"] = buildIndexTs(queries, enums); + fileMap["index.js"] = buildIndexCjs(queries); + fileMap["index.mjs"] = buildIndexEsm(queries); + fileMap[`index.${edgeRuntimeName}.mjs`] = buildIndexEsm(queries, edgeRuntimeName); + fileMap[`index.${edgeRuntimeName}.js`] = buildIndexCjs(queries, edgeRuntimeName); + return fileMap; +} + +// src/generation/generateClient.ts +var debug2 = src_default("prisma:client:generateClient"); +var DenylistError = class extends Error { + constructor(message) { + super(message); + this.stack = void 0; + } +}; +setClassName(DenylistError, "DenylistError"); +async function buildClient({ + schemaPath, + runtimeBase, + datamodel, + binaryPaths, + outputDir, + generator, + dmmf, + datasources, + engineVersion, + clientVersion: clientVersion2, + activeProvider, + postinstall, + copyEngine, + envPaths, + typedSql +}) { + const clientEngineType = getClientEngineType(generator); + const baseClientOptions = { + dmmf: getPrismaClientDMMF(dmmf), + envPaths: envPaths ?? { rootEnvPath: null, schemaEnvPath: void 0 }, + datasources, + generator, + binaryPaths, + schemaPath, + outputDir, + runtimeBase, + clientVersion: clientVersion2, + engineVersion, + activeProvider, + postinstall, + copyEngine, + datamodel, + browser: false, + deno: false, + edge: false, + wasm: false + }; + const nodeClientOptions = { + ...baseClientOptions, + runtimeNameJs: getNodeRuntimeName(clientEngineType), + runtimeNameTs: `${getNodeRuntimeName(clientEngineType)}.js` + }; + const nodeClient = new TSClient(nodeClientOptions); + const defaultClient = new TSClient({ + ...nodeClientOptions, + reusedTs: "index", + reusedJs: "." + }); + const edgeClient = new TSClient({ + ...baseClientOptions, + runtimeNameJs: "edge", + runtimeNameTs: "library.js", + reusedTs: "default", + edge: true + }); + const rnTsClient = new TSClient({ + ...baseClientOptions, + runtimeNameJs: "react-native", + runtimeNameTs: "react-native", + edge: true + }); + const trampolineTsClient = new TSClient({ + ...nodeClientOptions, + reusedTs: "index", + reusedJs: "#main-entry-point" + }); + const exportsMapBase = { + node: "./index.js", + "edge-light": "./wasm.js", + workerd: "./wasm.js", + worker: "./wasm.js", + browser: "./index-browser.js", + default: "./index.js" + }; + const exportsMapDefault = { + require: exportsMapBase, + import: exportsMapBase, + default: exportsMapBase.default + }; + const pkgJson = { + name: getUniquePackageName(datamodel), + main: "index.js", + types: "index.d.ts", + browser: "index-browser.js", + exports: { + ...import_package.default.exports, + // TODO: remove on DA ga + ...{ ".": exportsMapDefault } + }, + version: clientVersion2, + sideEffects: false + }; + const fileMap = {}; + fileMap["index.js"] = JS(nodeClient); + fileMap["index.d.ts"] = TS(nodeClient); + fileMap["default.js"] = JS(defaultClient); + fileMap["default.d.ts"] = TS(defaultClient); + fileMap["index-browser.js"] = BrowserJS(nodeClient); + fileMap["edge.js"] = JS(edgeClient); + fileMap["edge.d.ts"] = TS(edgeClient); + if (generator.previewFeatures.includes("reactNative")) { + fileMap["react-native.js"] = JS(rnTsClient); + fileMap["react-native.d.ts"] = TS(rnTsClient); + } + const usesWasmRuntime = generator.previewFeatures.includes("driverAdapters"); + if (usesWasmRuntime) { + fileMap["default.js"] = JS(trampolineTsClient); + fileMap["default.d.ts"] = TS(trampolineTsClient); + fileMap["wasm-worker-loader.mjs"] = `export default import('./query_engine_bg.wasm')`; + fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_engine_bg.wasm?module')`; + pkgJson["browser"] = "default.js"; + pkgJson["imports"] = { + // when `import('#wasm-engine-loader')` is called, it will be resolved to the correct file + "#wasm-engine-loader": { + // Keys reference: https://runtime-keys.proposal.wintercg.org/#keys + /** + * Vercel Edge Functions / Next.js Middlewares + */ + "edge-light": "./wasm-edge-light-loader.mjs", + /** + * Cloudflare Workers, Cloudflare Pages + */ + workerd: "./wasm-worker-loader.mjs", + /** + * (Old) Cloudflare Workers + * @millsp It's a fallback, in case both other keys didn't work because we could be on a different edge platform. It's a hypothetical case rather than anything actually tested. + */ + worker: "./wasm-worker-loader.mjs", + /** + * Fallback for every other JavaScript runtime + */ + default: "./wasm-worker-loader.mjs" + }, + // when `require('#main-entry-point')` is called, it will be resolved to the correct file + "#main-entry-point": exportsMapDefault + }; + const wasmClient = new TSClient({ + ...baseClientOptions, + runtimeNameJs: "wasm", + runtimeNameTs: "library.js", + reusedTs: "default", + edge: true, + wasm: true + }); + fileMap["wasm.js"] = JS(wasmClient); + fileMap["wasm.d.ts"] = TS(wasmClient); + } else { + fileMap["wasm.js"] = fileMap["index-browser.js"]; + fileMap["wasm.d.ts"] = fileMap["default.d.ts"]; + } + if (generator.previewFeatures.includes("deno") && !!globalThis.Deno) { + const denoEdgeClient = new TSClient({ + ...baseClientOptions, + runtimeBase: `../${runtimeBase}`, + runtimeNameJs: "edge-esm", + runtimeNameTs: "library.d.ts", + deno: true, + edge: true + }); + fileMap["deno/edge.js"] = JS(denoEdgeClient); + fileMap["deno/index.d.ts"] = TS(denoEdgeClient); + fileMap["deno/edge.ts"] = ` +import './polyfill.js' +// @deno-types="./index.d.ts" +export * from './edge.js'`; + fileMap["deno/polyfill.js"] = "globalThis.process = { env: Deno.env.toObject() }; globalThis.global = globalThis"; + } + if (typedSql && typedSql.length > 0) { + const edgeRuntimeName = usesWasmRuntime ? "wasm" : "edge"; + const cjsEdgeIndex = `./sql/index.${edgeRuntimeName}.js`; + const esmEdgeIndex = `./sql/index.${edgeRuntimeName}.mjs`; + pkgJson.exports["./sql"] = { + require: { + types: "./sql/index.d.ts", + "edge-light": cjsEdgeIndex, + workerd: cjsEdgeIndex, + worker: cjsEdgeIndex, + node: "./sql/index.js", + default: "./sql/index.js" + }, + import: { + types: "./sql/index.d.ts", + "edge-light": esmEdgeIndex, + workerd: esmEdgeIndex, + worker: esmEdgeIndex, + node: "./sql/index.mjs", + default: "./sql/index.mjs" + }, + default: "./sql/index.js" + }; + fileMap["sql"] = buildTypedSql({ + dmmf, + runtimeBase: getTypedSqlRuntimeBase(runtimeBase), + mainRuntimeName: getNodeRuntimeName(clientEngineType), + queries: typedSql, + edgeRuntimeName + }); + } + fileMap["package.json"] = JSON.stringify(pkgJson, null, 2); + return { + fileMap, + // a map of file names to their contents + prismaClientDmmf: dmmf + // the DMMF document + }; +} +function getTypedSqlRuntimeBase(runtimeBase) { + if (!runtimeBase.startsWith(".")) { + return runtimeBase; + } + if (runtimeBase.startsWith("./")) { + return `.${runtimeBase}`; + } + return `../${runtimeBase}`; +} +async function getDefaultOutdir(outputDir) { + if (outputDir.endsWith("node_modules/@prisma/client")) { + return import_path5.default.join(outputDir, "../../.prisma/client"); + } + if (process.env.INIT_CWD && process.env.npm_lifecycle_event === "postinstall" && !process.env.PWD?.includes(".pnpm")) { + if ((0, import_fs2.existsSync)(import_path5.default.join(process.env.INIT_CWD, "package.json"))) { + return import_path5.default.join(process.env.INIT_CWD, "node_modules/.prisma/client"); + } + const packagePath = await (0, import_pkg_up.default)({ cwd: process.env.INIT_CWD }); + if (packagePath) { + return import_path5.default.join(import_path5.default.dirname(packagePath), "node_modules/.prisma/client"); + } + } + return import_path5.default.join(outputDir, "../../.prisma/client"); +} +async function generateClient(options) { + const { + datamodel, + schemaPath, + generator, + dmmf, + datasources, + binaryPaths, + testMode, + copyRuntime, + copyRuntimeSourceMaps = false, + clientVersion: clientVersion2, + engineVersion, + activeProvider, + postinstall, + envPaths, + copyEngine = true, + typedSql + } = options; + const clientEngineType = getClientEngineType(generator); + const { runtimeBase, outputDir } = await getGenerationDirs(options); + const { prismaClientDmmf, fileMap } = await buildClient({ + datamodel, + schemaPath, + runtimeBase, + outputDir, + generator, + dmmf, + datasources, + binaryPaths, + clientVersion: clientVersion2, + engineVersion, + activeProvider, + postinstall, + copyEngine, + testMode, + envPaths, + typedSql + }); + const provider = datasources[0].provider; + const denylistsErrors = validateDmmfAgainstDenylists(prismaClientDmmf); + if (denylistsErrors) { + let message = `${bold( + red("Error: ") + )}The schema at "${schemaPath}" contains reserved keywords. + Rename the following items:`; + for (const error of denylistsErrors) { + message += "\n - " + error.message; + } + message += ` +To learn more about how to rename models, check out https://pris.ly/d/naming-models`; + throw new DenylistError(message); + } + if (!copyEngine) { + await deleteOutputDir(outputDir); + } + await (0, import_fs_extra.ensureDir)(outputDir); + if (generator.previewFeatures.includes("deno") && !!globalThis.Deno) { + await (0, import_fs_extra.ensureDir)(import_path5.default.join(outputDir, "deno")); + } + await writeFileMap(outputDir, fileMap); + const runtimeDir = import_path5.default.join(__dirname, `${testMode ? "../" : ""}../runtime`); + if (copyRuntime || generator.isCustomOutput === true) { + const copiedRuntimeDir = import_path5.default.join(outputDir, "runtime"); + await (0, import_fs_extra.ensureDir)(copiedRuntimeDir); + await copyRuntimeFiles({ + from: runtimeDir, + to: copiedRuntimeDir, + sourceMaps: copyRuntimeSourceMaps, + runtimeName: getNodeRuntimeName(clientEngineType) + }); + } + const enginePath = clientEngineType === "library" /* Library */ ? binaryPaths.libqueryEngine : binaryPaths.queryEngine; + if (!enginePath) { + throw new Error( + `Prisma Client needs \`${clientEngineType === "library" /* Library */ ? "libqueryEngine" : "queryEngine"}\` in the \`binaryPaths\` object.` + ); + } + if (copyEngine) { + if (process.env.NETLIFY) { + await (0, import_fs_extra.ensureDir)("/tmp/prisma-engines"); + } + for (const [binaryTarget, filePath] of Object.entries(enginePath)) { + const fileName = import_path5.default.basename(filePath); + let target; + if (process.env.NETLIFY && !["rhel-openssl-1.0.x", "rhel-openssl-3.0.x"].includes(binaryTarget)) { + target = import_path5.default.join("/tmp/prisma-engines", fileName); + } else { + target = import_path5.default.join(outputDir, fileName); + } + await overwriteFile(filePath, target); + } + } + const schemaTargetPath = import_path5.default.join(outputDir, "schema.prisma"); + await import_promises.default.writeFile(schemaTargetPath, datamodel, { encoding: "utf-8" }); + if (generator.previewFeatures.includes("driverAdapters") && isWasmEngineSupported(provider) && copyEngine && !testMode) { + const suffix = provider === "postgres" ? "postgresql" : provider; + await import_promises.default.copyFile( + import_path5.default.join(runtimeDir, `query_engine_bg.${suffix}.wasm`), + import_path5.default.join(outputDir, `query_engine_bg.wasm`) + ); + await import_promises.default.copyFile(import_path5.default.join(runtimeDir, `query_engine_bg.${suffix}.js`), import_path5.default.join(outputDir, `query_engine_bg.js`)); + } + try { + const prismaCache = (0, import_env_paths.default)("prisma").cache; + const signalsPath = import_path5.default.join(prismaCache, "last-generate"); + await import_promises.default.mkdir(prismaCache, { recursive: true }); + await import_promises.default.writeFile(signalsPath, Date.now().toString()); + } catch { + } +} +function writeFileMap(outputDir, fileMap) { + return Promise.all( + Object.entries(fileMap).map(async ([fileName, content]) => { + const absolutePath = import_path5.default.join(outputDir, fileName); + await import_promises.default.rm(absolutePath, { recursive: true, force: true }); + if (typeof content === "string") { + await import_promises.default.writeFile(absolutePath, content); + } else { + await import_promises.default.mkdir(absolutePath); + await writeFileMap(absolutePath, content); + } + }) + ); +} +function isWasmEngineSupported(provider) { + return provider === "postgresql" || provider === "postgres" || provider === "mysql" || provider === "sqlite"; +} +function validateDmmfAgainstDenylists(prismaClientDmmf) { + const errorArray = []; + const denylists = { + // A copy of this list is also in prisma-engines. Any edit should be done in both places. + // https://github.com/prisma/prisma-engines/blob/main/psl/parser-database/src/names/reserved_model_names.rs + models: [ + // Reserved Prisma keywords + "PrismaClient", + "Prisma", + // JavaScript keywords + "break", + "case", + "catch", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "enum", + "export", + "extends", + "false", + "finally", + "for", + "function", + "if", + "implements", + "import", + "in", + "instanceof", + "interface", + "let", + "new", + "null", + "package", + "private", + "protected", + "public", + "return", + "super", + "switch", + "this", + "throw", + "true", + "try", + "typeof", + "var", + "void", + "while", + "with", + "yield" + ], + fields: ["AND", "OR", "NOT"], + dynamic: [] + }; + if (prismaClientDmmf.datamodel.enums) { + for (const it of prismaClientDmmf.datamodel.enums) { + if (denylists.models.includes(it.name) || denylists.fields.includes(it.name)) { + errorArray.push(Error(`"enum ${it.name}"`)); + } + } + } + if (prismaClientDmmf.datamodel.models) { + for (const it of prismaClientDmmf.datamodel.models) { + if (denylists.models.includes(it.name) || denylists.fields.includes(it.name)) { + errorArray.push(Error(`"model ${it.name}"`)); + } + } + } + return errorArray.length > 0 ? errorArray : null; +} +async function getGenerationDirs({ + runtimeBase, + generator, + outputDir, + datamodel, + schemaPath, + testMode +}) { + const isCustomOutput = generator.isCustomOutput === true; + let userRuntimeImport = isCustomOutput ? "./runtime" : "@prisma/client/runtime"; + let userOutputDir = isCustomOutput ? outputDir : await getDefaultOutdir(outputDir); + if (testMode && runtimeBase) { + userOutputDir = outputDir; + userRuntimeImport = pathToPosix(runtimeBase); + } + if (isCustomOutput) { + await verifyOutputDirectory(userOutputDir, datamodel, schemaPath); + } + const userPackageRoot = await (0, import_pkg_up.default)({ cwd: import_path5.default.dirname(userOutputDir) }); + const userProjectRoot = userPackageRoot ? import_path5.default.dirname(userPackageRoot) : process.cwd(); + return { + runtimeBase: userRuntimeImport, + outputDir: userOutputDir, + projectRoot: userProjectRoot + }; +} +async function verifyOutputDirectory(directory, datamodel, schemaPath) { + let content; + try { + content = await import_promises.default.readFile(import_path5.default.join(directory, "package.json"), "utf8"); + } catch (e) { + if (e.code === "ENOENT") { + return; + } + throw e; + } + const { name } = JSON.parse(content); + if (name === import_package.default.name) { + const message = [`Generating client into ${bold(directory)} is not allowed.`]; + message.push("This package is used by `prisma generate` and overwriting its content is dangerous."); + message.push(""); + message.push("Suggestion:"); + const outputDeclaration = findOutputPathDeclaration(datamodel); + if (outputDeclaration && outputDeclaration.content.includes(import_package.default.name)) { + const outputLine = outputDeclaration.content; + message.push(`In ${bold(schemaPath)} replace:`); + message.push(""); + message.push(`${dim(outputDeclaration.lineNumber)} ${replacePackageName(outputLine, red(import_package.default.name))}`); + message.push("with"); + message.push(`${dim(outputDeclaration.lineNumber)} ${replacePackageName(outputLine, green(".prisma/client"))}`); + } else { + message.push(`Generate client into ${bold(replacePackageName(directory, green(".prisma/client")))} instead`); + } + message.push(""); + message.push("You won't need to change your imports."); + message.push("Imports from `@prisma/client` will be automatically forwarded to `.prisma/client`"); + const error = new Error(message.join("\n")); + throw error; + } +} +function replacePackageName(directoryPath, replacement) { + return directoryPath.replace(import_package.default.name, replacement); +} +function findOutputPathDeclaration(datamodel) { + const lines = datamodel.split(/\r?\n/); + for (const [i, line] of lines.entries()) { + if (/output\s*=/.test(line)) { + return { lineNumber: i + 1, content: line.trim() }; + } + } + return null; +} +function getNodeRuntimeName(engineType) { + if (engineType === "binary" /* Binary */) { + return "binary"; + } + if (engineType === "library" /* Library */) { + return "library"; + } + assertNever(engineType, "Unknown engine type"); +} +async function copyRuntimeFiles({ from, to, runtimeName, sourceMaps }) { + const files = [ + // library.d.ts is always included, as it contains the actual runtime type + // definitions. Rest of the `runtime.d.ts` files just re-export everything + // from `library.d.ts` + "library.d.ts", + "index-browser.js", + "index-browser.d.ts", + "edge.js", + "edge-esm.js", + "react-native.js", + "wasm.js" + ]; + files.push(`${runtimeName}.js`); + if (runtimeName !== "library") { + files.push(`${runtimeName}.d.ts`); + } + if (sourceMaps) { + files.push(...files.filter((file2) => file2.endsWith(".js")).map((file2) => `${file2}.map`)); + } + await Promise.all(files.map((file2) => import_promises.default.copyFile(import_path5.default.join(from, file2), import_path5.default.join(to, file2)))); +} +async function deleteOutputDir(outputDir) { + try { + debug2(`attempting to delete ${outputDir} recursively`); + if (require(`${outputDir}/package.json`).name?.startsWith(GENERATED_PACKAGE_NAME_PREFIX)) { + await import_promises.default.rmdir(outputDir, { recursive: true }).catch(() => { + debug2(`failed to delete ${outputDir} recursively`); + }); + } + } catch { + debug2(`failed to delete ${outputDir} recursively, not found`); + } +} +function getUniquePackageName(datamodel) { + const hash = (0, import_crypto2.createHash)("sha256"); + hash.write(datamodel); + return `${GENERATED_PACKAGE_NAME_PREFIX}${hash.digest().toString("hex")}`; +} +var GENERATED_PACKAGE_NAME_PREFIX = "prisma-client-"; + +// src/generation/utils/types/dmmfToTypes.ts +function dmmfToTypes(dmmf) { + return new TSClient({ + dmmf, + datasources: [], + clientVersion: "", + engineVersion: "", + runtimeBase: "@prisma/client", + runtimeNameJs: "library", + runtimeNameTs: "library", + schemaPath: "", + outputDir: "", + activeProvider: "", + binaryPaths: {}, + generator: { + binaryTargets: [], + config: {}, + name: "prisma-client-js", + output: null, + provider: { value: "prisma-client-js", fromEnvVar: null }, + previewFeatures: [], + isCustomOutput: false, + sourceFilePath: "schema.prisma" + }, + datamodel: "", + browser: false, + deno: false, + edge: false, + wasm: false, + envPaths: { + rootEnvPath: null, + schemaEnvPath: void 0 + } + }).toTS(); +} + +// src/generation/generator.ts +var debug3 = src_default("prisma:client:generator"); +var pkg = require_package2(); +var clientVersion = pkg.version; +if (process.argv[1] === __filename) { + generatorHandler({ + onManifest(config) { + const requiredEngine = getClientEngineType(config) === "library" /* Library */ ? "libqueryEngine" : "queryEngine"; + debug3(`requiredEngine: ${requiredEngine}`); + return { + defaultOutput: ".prisma/client", + // the value here doesn't matter, as it's resolved in https://github.com/prisma/prisma/blob/88fe98a09092d8e53e51f11b730c7672c19d1bd4/packages/sdk/src/get-generators/getGenerators.ts + prettyName: "Prisma Client", + requiresEngines: [requiredEngine], + version: clientVersion, + requiresEngineVersion: import_engines_version.enginesVersion + }; + }, + async onGenerate(options) { + const outputDir = parseEnvValue(options.generator.output); + return generateClient({ + datamodel: options.datamodel, + schemaPath: options.schemaPath, + binaryPaths: options.binaryPaths, + datasources: options.datasources, + envPaths: options.envPaths, + outputDir, + copyRuntime: Boolean(options.generator.config.copyRuntime), + // TODO: is this needed/valid? + copyRuntimeSourceMaps: Boolean(process.env.PRISMA_COPY_RUNTIME_SOURCEMAPS), + dmmf: options.dmmf, + generator: options.generator, + engineVersion: options.version, + clientVersion, + activeProvider: options.datasources[0]?.activeProvider, + postinstall: options.postinstall, + copyEngine: !options.noEngine, + typedSql: options.typedSql + }); + } + }); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + dmmfToTypes, + externalToInternalDmmf +}); diff --git a/apps/api/release/vendor/@prisma/client/index-browser.js b/apps/api/release/vendor/@prisma/client/index-browser.js new file mode 100644 index 0000000..3ea8d77 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/index-browser.js @@ -0,0 +1,3 @@ +const prisma = require('.prisma/client/index-browser') + +module.exports = prisma diff --git a/apps/api/release/vendor/@prisma/client/index.d.ts b/apps/api/release/vendor/@prisma/client/index.d.ts new file mode 100644 index 0000000..bedfdce --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/index.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/default' diff --git a/apps/api/release/vendor/@prisma/client/index.js b/apps/api/release/vendor/@prisma/client/index.js new file mode 100644 index 0000000..1be37eb --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/index.js @@ -0,0 +1,4 @@ +module.exports = { + // https://github.com/prisma/prisma/pull/12907 + ...require('.prisma/client/default'), +} diff --git a/apps/api/release/vendor/@prisma/client/package.json b/apps/api/release/vendor/@prisma/client/package.json new file mode 100644 index 0000000..297061e --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/package.json @@ -0,0 +1,280 @@ +{ + "name": "@prisma/client", + "version": "5.22.0", + "description": "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.", + "keywords": [ + "ORM", + "Prisma", + "prisma2", + "Prisma Client", + "client", + "query", + "query-builder", + "database", + "db", + "JavaScript", + "JS", + "TypeScript", + "TS", + "SQL", + "SQLite", + "pg", + "Postgres", + "PostgreSQL", + "CockroachDB", + "MySQL", + "MariaDB", + "MSSQL", + "SQL Server", + "SQLServer", + "MongoDB", + "react-native" + ], + "main": "default.js", + "types": "default.d.ts", + "browser": "index-browser.js", + "exports": { + "./package.json": "./package.json", + ".": { + "require": { + "types": "./default.d.ts", + "node": "./default.js", + "edge-light": "./default.js", + "workerd": "./default.js", + "worker": "./default.js", + "browser": "./index-browser.js" + }, + "import": { + "types": "./default.d.ts", + "node": "./default.js", + "edge-light": "./default.js", + "workerd": "./default.js", + "worker": "./default.js", + "browser": "./index-browser.js" + }, + "default": "./default.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" + }, + "./*": "./*" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=16.13" + }, + "homepage": "https://www.prisma.io", + "repository": { + "type": "git", + "url": "https://github.com/prisma/prisma.git", + "directory": "packages/client" + }, + "author": "Tim Suchanek ", + "bugs": "https://github.com/prisma/prisma/issues", + "files": [ + "README.md", + "runtime", + "!runtime/*.map", + "scripts", + "generator-build", + "edge.js", + "edge.d.ts", + "wasm.js", + "wasm.d.ts", + "index.js", + "index.d.ts", + "react-native.js", + "react-native.d.ts", + "default.js", + "default.d.ts", + "index-browser.js", + "extension.js", + "extension.d.ts", + "sql.d.ts", + "sql.js", + "sql.mjs" + ], + "devDependencies": { + "@cloudflare/workers-types": "4.20240614.0", + "@codspeed/benchmark.js-plugin": "3.1.1", + "@faker-js/faker": "8.4.1", + "@fast-check/jest": "1.8.2", + "@inquirer/prompts": "5.0.5", + "@jest/create-cache-key-function": "29.7.0", + "@jest/globals": "29.7.0", + "@jest/test-sequencer": "29.7.0", + "@libsql/client": "0.8.0", + "@neondatabase/serverless": "0.9.3", + "@opentelemetry/api": "1.9.0", + "@opentelemetry/context-async-hooks": "1.25.1", + "@opentelemetry/instrumentation": "0.52.1", + "@opentelemetry/resources": "1.25.1", + "@opentelemetry/sdk-trace-base": "1.25.1", + "@opentelemetry/semantic-conventions": "1.25.1", + "@planetscale/database": "1.18.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/mini-proxy": "0.9.5", + "@prisma/query-engine-wasm": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@snaplet/copycat": "0.17.3", + "@swc-node/register": "1.10.9", + "@swc/core": "1.6.13", + "@swc/jest": "0.2.36", + "@timsuchanek/copy": "1.4.5", + "@types/debug": "4.1.12", + "@types/fs-extra": "9.0.13", + "@types/jest": "29.5.12", + "@types/js-levenshtein": "1.1.3", + "@types/mssql": "9.1.5", + "@types/node": "18.19.31", + "@types/pg": "8.11.6", + "arg": "5.0.2", + "benchmark": "2.1.4", + "ci-info": "4.0.0", + "decimal.js": "10.4.3", + "detect-runtime": "1.0.4", + "env-paths": "2.2.1", + "esbuild": "0.23.0", + "execa": "5.1.1", + "expect-type": "0.19.0", + "flat-map-polyfill": "0.3.8", + "fs-extra": "11.1.1", + "get-stream": "6.0.1", + "globby": "11.1.0", + "indent-string": "4.0.0", + "jest": "29.7.0", + "jest-extended": "4.0.2", + "jest-junit": "16.0.0", + "jest-serializer-ansi-escapes": "3.0.0", + "jest-snapshot": "29.7.0", + "js-levenshtein": "1.1.6", + "kleur": "4.1.5", + "klona": "2.0.6", + "mariadb": "3.3.1", + "memfs": "4.9.3", + "mssql": "11.0.1", + "new-github-issue-url": "0.2.1", + "node-fetch": "3.3.2", + "p-retry": "4.6.2", + "pg": "8.11.5", + "pkg-up": "3.1.0", + "pluralize": "8.0.0", + "resolve": "1.22.8", + "rimraf": "3.0.2", + "simple-statistics": "7.8.5", + "sort-keys": "4.2.0", + "source-map-support": "0.5.21", + "sql-template-tag": "5.2.1", + "stacktrace-parser": "0.1.10", + "strip-ansi": "6.0.1", + "strip-indent": "3.0.0", + "ts-node": "10.9.2", + "ts-pattern": "5.2.0", + "tsd": "0.31.1", + "typescript": "5.4.5", + "undici": "5.28.4", + "wrangler": "3.62.0", + "zx": "7.2.3", + "@prisma/adapter-d1": "5.22.0", + "@prisma/adapter-libsql": "5.22.0", + "@prisma/adapter-neon": "5.22.0", + "@prisma/adapter-pg": "5.22.0", + "@prisma/adapter-planetscale": "5.22.0", + "@prisma/driver-adapter-utils": "5.22.0", + "@prisma/adapter-pg-worker": "5.22.0", + "@prisma/debug": "5.22.0", + "@prisma/engines": "5.22.0", + "@prisma/fetch-engine": "5.22.0", + "@prisma/generator-helper": "5.22.0", + "@prisma/get-platform": "5.22.0", + "@prisma/instrumentation": "5.22.0", + "@prisma/internals": "5.22.0", + "@prisma/migrate": "5.22.0", + "@prisma/pg-worker": "5.22.0" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + }, + "sideEffects": false, + "scripts": { + "dev": "DEV=true tsx helpers/build.ts", + "build": "tsx helpers/build.ts", + "test": "dotenv -e ../../.db.env -- jest --silent", + "test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts", + "test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts", + "test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts", + "test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types", + "test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only", + "test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts", + "generate": "node scripts/postinstall.js", + "postinstall": "node scripts/postinstall.js", + "new-test": "tsx ./helpers/new-test/new-test.ts" + } +} \ No newline at end of file diff --git a/apps/api/release/vendor/@prisma/client/react-native.d.ts b/apps/api/release/vendor/@prisma/client/react-native.d.ts new file mode 100644 index 0000000..bfcd706 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/react-native.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/react-native' diff --git a/apps/api/release/vendor/@prisma/client/react-native.js b/apps/api/release/vendor/@prisma/client/react-native.js new file mode 100644 index 0000000..12b76d3 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/react-native.js @@ -0,0 +1,3 @@ +module.exports = { + ...require('.prisma/client/react-native'), +} diff --git a/apps/api/release/vendor/@prisma/client/runtime/binary.d.ts b/apps/api/release/vendor/@prisma/client/runtime/binary.d.ts new file mode 100644 index 0000000..b935a73 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/binary.d.ts @@ -0,0 +1 @@ +export * from "./library" diff --git a/apps/api/release/vendor/@prisma/client/runtime/binary.js b/apps/api/release/vendor/@prisma/client/runtime/binary.js new file mode 100644 index 0000000..c46100b --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/binary.js @@ -0,0 +1,210 @@ +"use strict";var FD=Object.create;var Hi=Object.defineProperty;var ND=Object.getOwnPropertyDescriptor;var xD=Object.getOwnPropertyNames;var LD=Object.getPrototypeOf,UD=Object.prototype.hasOwnProperty;var wd=e=>{throw TypeError(e)};var TD=(e,A,t)=>A in e?Hi(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t;var Q=(e,A)=>()=>(A||e((A={exports:{}}).exports,A),A.exports),Wi=(e,A)=>{for(var t in A)Hi(e,t,{get:A[t],enumerable:!0})},Rd=(e,A,t,r)=>{if(A&&typeof A=="object"||typeof A=="function")for(let n of xD(A))!UD.call(e,n)&&n!==t&&Hi(e,n,{get:()=>A[n],enumerable:!(r=ND(A,n))||r.enumerable});return e};var Z=(e,A,t)=>(t=e!=null?FD(LD(e)):{},Rd(A||!e||!e.__esModule?Hi(t,"default",{value:e,enumerable:!0}):t,e)),MD=e=>Rd(Hi({},"__esModule",{value:!0}),e);var Dd=(e,A,t)=>TD(e,typeof A!="symbol"?A+"":A,t),Hg=(e,A,t)=>A.has(e)||wd("Cannot "+t);var f=(e,A,t)=>(Hg(e,A,"read from private field"),t?t.call(e):A.get(e)),Ne=(e,A,t)=>A.has(e)?wd("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(e):A.set(e,t),Ae=(e,A,t,r)=>(Hg(e,A,"write to private field"),r?r.call(e,t):A.set(e,t),t),MA=(e,A,t)=>(Hg(e,A,"access private method"),t);var Xd=Q((LV,Zd)=>{"use strict";Zd.exports=Kd;Kd.sync=yb;var _d=require("fs");function mb(e,A){var t=A.pathExt!==void 0?A.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var r=0;r{"use strict";AQ.exports=$d;$d.sync=wb;var zd=require("fs");function $d(e,A,t){zd.stat(e,function(r,n){t(r,r?!1:eQ(n,A))})}function wb(e,A){return eQ(zd.statSync(e),A)}function eQ(e,A){return e.isFile()&&Rb(e,A)}function Rb(e,A){var t=e.mode,r=e.uid,n=e.gid,i=A.uid!==void 0?A.uid:process.getuid&&process.getuid(),s=A.gid!==void 0?A.gid:process.getgid&&process.getgid(),o=parseInt("100",8),a=parseInt("010",8),c=parseInt("001",8),g=o|a,l=t&c||t&a&&n===s||t&o&&r===i||t&g&&i===0;return l}});var nQ=Q((MV,rQ)=>{"use strict";var TV=require("fs"),_o;process.platform==="win32"||global.TESTING_WINDOWS?_o=Xd():_o=tQ();rQ.exports=tl;tl.sync=Db;function tl(e,A,t){if(typeof A=="function"&&(t=A,A={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,n){tl(e,A||{},function(i,s){i?n(i):r(s)})})}_o(e,A||{},function(r,n){r&&(r.code==="EACCES"||A&&A.ignoreErrors)&&(r=null,n=!1),t(r,n)})}function Db(e,A){try{return _o.sync(e,A||{})}catch(t){if(A&&A.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var lQ=Q((vV,gQ)=>{"use strict";var Cn=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",iQ=require("path"),bb=Cn?";":":",sQ=nQ(),oQ=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),aQ=(e,A)=>{let t=A.colon||bb,r=e.match(/\//)||Cn&&e.match(/\\/)?[""]:[...Cn?[process.cwd()]:[],...(A.path||process.env.PATH||"").split(t)],n=Cn?A.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=Cn?n.split(t):[""];return Cn&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:n}},cQ=(e,A,t)=>{typeof A=="function"&&(t=A,A={}),A||(A={});let{pathEnv:r,pathExt:n,pathExtExe:i}=aQ(e,A),s=[],o=c=>new Promise((g,l)=>{if(c===r.length)return A.all&&s.length?g(s):l(oQ(e));let u=r[c],E=/^".*"$/.test(u)?u.slice(1,-1):u,h=iQ.join(E,e),d=!E&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;g(a(d,c,0))}),a=(c,g,l)=>new Promise((u,E)=>{if(l===n.length)return u(o(g+1));let h=n[l];sQ(c+h,{pathExt:i},(d,C)=>{if(!d&&C)if(A.all)s.push(c+h);else return u(c+h);return u(a(c,g,l+1))})});return t?o(0).then(c=>t(null,c),t):o(0)},kb=(e,A)=>{A=A||{};let{pathEnv:t,pathExt:r,pathExtExe:n}=aQ(e,A),i=[];for(let s=0;s{"use strict";var uQ=(e={})=>{let A=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(A).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};rl.exports=uQ;rl.exports.default=uQ});var QQ=Q((GV,dQ)=>{"use strict";var EQ=require("path"),Sb=lQ(),Fb=nl();function hQ(e,A){let t=e.options.env||process.env,r=process.cwd(),n=e.options.cwd!=null,i=n&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=Sb.sync(e.command,{path:t[Fb({env:t})],pathExt:A?EQ.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return s&&(s=EQ.resolve(n?e.options.cwd:"",s)),s}function Nb(e){return hQ(e)||hQ(e,!0)}dQ.exports=Nb});var CQ=Q((JV,sl)=>{"use strict";var il=/([()\][%!^"`<>&|;, *?])/g;function xb(e){return e=e.replace(il,"^$1"),e}function Lb(e,A){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(il,"^$1"),A&&(e=e.replace(il,"^$1")),e}sl.exports.command=xb;sl.exports.argument=Lb});var IQ=Q((YV,fQ)=>{"use strict";fQ.exports=/^#!(.*)/});var pQ=Q((VV,BQ)=>{"use strict";var Ub=IQ();BQ.exports=(e="")=>{let A=e.match(Ub);if(!A)return null;let[t,r]=A[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?r:r?`${n} ${r}`:n}});var yQ=Q((qV,mQ)=>{"use strict";var ol=require("fs"),Tb=pQ();function Mb(e){let t=Buffer.alloc(150),r;try{r=ol.openSync(e,"r"),ol.readSync(r,t,0,150,0),ol.closeSync(r)}catch{}return Tb(t.toString())}mQ.exports=Mb});var bQ=Q((OV,DQ)=>{"use strict";var vb=require("path"),wQ=QQ(),RQ=CQ(),Pb=yQ(),Gb=process.platform==="win32",Jb=/\.(?:com|exe)$/i,Yb=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Vb(e){e.file=wQ(e);let A=e.file&&Pb(e.file);return A?(e.args.unshift(e.file),e.command=A,wQ(e)):e.file}function qb(e){if(!Gb)return e;let A=Vb(e),t=!Jb.test(A);if(e.options.forceShell||t){let r=Yb.test(A);e.command=vb.normalize(e.command),e.command=RQ.command(e.command),e.args=e.args.map(i=>RQ.argument(i,r));let n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Ob(e,A,t){A&&!Array.isArray(A)&&(t=A,A=null),A=A?A.slice(0):[],t=Object.assign({},t);let r={command:e,args:A,options:t,file:void 0,original:{command:e,args:A}};return t.shell?r:qb(r)}DQ.exports=Ob});var FQ=Q((HV,SQ)=>{"use strict";var al=process.platform==="win32";function cl(e,A){return Object.assign(new Error(`${A} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${A} ${e.command}`,path:e.command,spawnargs:e.args})}function Hb(e,A){if(!al)return;let t=e.emit;e.emit=function(r,n){if(r==="exit"){let i=kQ(n,A,"spawn");if(i)return t.call(e,"error",i)}return t.apply(e,arguments)}}function kQ(e,A){return al&&e===1&&!A.file?cl(A.original,"spawn"):null}function Wb(e,A){return al&&e===1&&!A.file?cl(A.original,"spawnSync"):null}SQ.exports={hookChildProcess:Hb,verifyENOENT:kQ,verifyENOENTSync:Wb,notFoundError:cl}});var LQ=Q((WV,fn)=>{"use strict";var NQ=require("child_process"),gl=bQ(),ll=FQ();function xQ(e,A,t){let r=gl(e,A,t),n=NQ.spawn(r.command,r.args,r.options);return ll.hookChildProcess(n,r),n}function _b(e,A,t){let r=gl(e,A,t),n=NQ.spawnSync(r.command,r.args,r.options);return n.error=n.error||ll.verifyENOENTSync(n.status,r),n}fn.exports=xQ;fn.exports.spawn=xQ;fn.exports.sync=_b;fn.exports._parse=gl;fn.exports._enoent=ll});var TQ=Q((_V,UQ)=>{"use strict";UQ.exports=e=>{let A=typeof e=="string"?` +`:10,t=typeof e=="string"?"\r":13;return e[e.length-1]===A&&(e=e.slice(0,e.length-1)),e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e}});var PQ=Q((jV,zi)=>{"use strict";var Xi=require("path"),MQ=nl(),vQ=e=>{e={cwd:process.cwd(),path:process.env[MQ()],execPath:process.execPath,...e};let A,t=Xi.resolve(e.cwd),r=[];for(;A!==t;)r.push(Xi.join(t,"node_modules/.bin")),A=t,t=Xi.resolve(t,"..");let n=Xi.resolve(e.cwd,e.execPath,"..");return r.push(n),r.concat(e.path).join(Xi.delimiter)};zi.exports=vQ;zi.exports.default=vQ;zi.exports.env=e=>{e={env:process.env,...e};let A={...e.env},t=MQ({env:A});return e.path=A[t],A[t]=zi.exports(e),A}});var JQ=Q((KV,ul)=>{"use strict";var GQ=(e,A)=>{for(let t of Reflect.ownKeys(A))Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(A,t));return e};ul.exports=GQ;ul.exports.default=GQ});var VQ=Q((ZV,Ko)=>{"use strict";var jb=JQ(),jo=new WeakMap,YQ=(e,A={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let t,r=0,n=e.displayName||e.name||"",i=function(...s){if(jo.set(i,++r),r===1)t=e.apply(this,s),e=null;else if(A.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return t};return jb(i,e),jo.set(i,r),i};Ko.exports=YQ;Ko.exports.default=YQ;Ko.exports.callCount=e=>{if(!jo.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return jo.get(e)}});var qQ=Q(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.SIGNALS=void 0;var Kb=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];Zo.SIGNALS=Kb});var El=Q(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.SIGRTMAX=In.getRealtimeSignals=void 0;var Zb=function(){let e=HQ-OQ+1;return Array.from({length:e},Xb)};In.getRealtimeSignals=Zb;var Xb=function(e,A){return{name:`SIGRT${A+1}`,number:OQ+A,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},OQ=34,HQ=64;In.SIGRTMAX=HQ});var WQ=Q(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.getSignals=void 0;var zb=require("os"),$b=qQ(),ek=El(),Ak=function(){let e=(0,ek.getRealtimeSignals)();return[...$b.SIGNALS,...e].map(tk)};Xo.getSignals=Ak;var tk=function({name:e,number:A,description:t,action:r,forced:n=!1,standard:i}){let{signals:{[e]:s}}=zb.constants,o=s!==void 0;return{name:e,number:o?s:A,description:t,supported:o,action:r,forced:n,standard:i}}});var jQ=Q(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.signalsByNumber=Bn.signalsByName=void 0;var rk=require("os"),_Q=WQ(),nk=El(),ik=function(){return(0,_Q.getSignals)().reduce(sk,{})},sk=function(e,{name:A,number:t,description:r,supported:n,action:i,forced:s,standard:o}){return{...e,[A]:{name:A,number:t,description:r,supported:n,action:i,forced:s,standard:o}}},ok=ik();Bn.signalsByName=ok;var ak=function(){let e=(0,_Q.getSignals)(),A=nk.SIGRTMAX+1,t=Array.from({length:A},(r,n)=>ck(n,e));return Object.assign({},...t)},ck=function(e,A){let t=gk(e,A);if(t===void 0)return{};let{name:r,description:n,supported:i,action:s,forced:o,standard:a}=t;return{[e]:{name:r,number:e,description:n,supported:i,action:s,forced:o,standard:a}}},gk=function(e,A){let t=A.find(({name:r})=>rk.constants.signals[r]===e);return t!==void 0?t:A.find(r=>r.number===e)},lk=ak();Bn.signalsByNumber=lk});var ZQ=Q((Aq,KQ)=>{"use strict";var{signalsByName:uk}=jQ(),Ek=({timedOut:e,timeout:A,errorCode:t,signal:r,signalDescription:n,exitCode:i,isCanceled:s})=>e?`timed out after ${A} milliseconds`:s?"was canceled":t!==void 0?`failed with ${t}`:r!==void 0?`was killed with ${r} (${n})`:i!==void 0?`failed with exit code ${i}`:"failed",hk=({stdout:e,stderr:A,all:t,error:r,signal:n,exitCode:i,command:s,escapedCommand:o,timedOut:a,isCanceled:c,killed:g,parsed:{options:{timeout:l}}})=>{i=i===null?void 0:i,n=n===null?void 0:n;let u=n===void 0?void 0:uk[n].description,E=r&&r.code,d=`Command ${Ek({timedOut:a,timeout:l,errorCode:E,signal:n,signalDescription:u,exitCode:i,isCanceled:c})}: ${s}`,C=Object.prototype.toString.call(r)==="[object Error]",I=C?`${d} +${r.message}`:d,p=[I,A,e].filter(Boolean).join(` +`);return C?(r.originalMessage=r.message,r.message=p):r=new Error(p),r.shortMessage=I,r.command=s,r.escapedCommand=o,r.exitCode=i,r.signal=n,r.signalDescription=u,r.stdout=e,r.stderr=A,t!==void 0&&(r.all=t),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!a,r.isCanceled=c,r.killed=g&&!a,r};KQ.exports=hk});var zQ=Q((tq,hl)=>{"use strict";var zo=["stdin","stdout","stderr"],dk=e=>zo.some(A=>e[A]!==void 0),XQ=e=>{if(!e)return;let{stdio:A}=e;if(A===void 0)return zo.map(r=>e[r]);if(dk(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${zo.map(r=>`\`${r}\``).join(", ")}`);if(typeof A=="string")return A;if(!Array.isArray(A))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof A}\``);let t=Math.max(A.length,zo.length);return Array.from({length:t},(r,n)=>A[n])};hl.exports=XQ;hl.exports.node=e=>{let A=XQ(e);return A==="ipc"?"ipc":A===void 0||typeof A=="string"?[A,A,A,"ipc"]:A.includes("ipc")?A:[...A,"ipc"]}});var $Q=Q((rq,$o)=>{"use strict";$o.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&$o.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&$o.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var nC=Q((nq,yn)=>{"use strict";var we=global.process,Mr=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Mr(we)?(eC=require("assert"),pn=$Q(),AC=/^win/i.test(we.platform),$i=require("events"),typeof $i!="function"&&($i=$i.EventEmitter),we.__signal_exit_emitter__?qe=we.__signal_exit_emitter__:(qe=we.__signal_exit_emitter__=new $i,qe.count=0,qe.emitted={}),qe.infinite||(qe.setMaxListeners(1/0),qe.infinite=!0),yn.exports=function(e,A){if(!Mr(global.process))return function(){};eC.equal(typeof e,"function","a callback must be provided for exit handler"),mn===!1&&dl();var t="exit";A&&A.alwaysLast&&(t="afterexit");var r=function(){qe.removeListener(t,e),qe.listeners("exit").length===0&&qe.listeners("afterexit").length===0&&ea()};return qe.on(t,e),r},ea=function(){!mn||!Mr(global.process)||(mn=!1,pn.forEach(function(A){try{we.removeListener(A,Aa[A])}catch{}}),we.emit=ta,we.reallyExit=Ql,qe.count-=1)},yn.exports.unload=ea,vr=function(A,t,r){qe.emitted[A]||(qe.emitted[A]=!0,qe.emit(A,t,r))},Aa={},pn.forEach(function(e){Aa[e]=function(){if(Mr(global.process)){var t=we.listeners(e);t.length===qe.count&&(ea(),vr("exit",null,e),vr("afterexit",null,e),AC&&e==="SIGHUP"&&(e="SIGINT"),we.kill(we.pid,e))}}}),yn.exports.signals=function(){return pn},mn=!1,dl=function(){mn||!Mr(global.process)||(mn=!0,qe.count+=1,pn=pn.filter(function(A){try{return we.on(A,Aa[A]),!0}catch{return!1}}),we.emit=rC,we.reallyExit=tC)},yn.exports.load=dl,Ql=we.reallyExit,tC=function(A){Mr(global.process)&&(we.exitCode=A||0,vr("exit",we.exitCode,null),vr("afterexit",we.exitCode,null),Ql.call(we,we.exitCode))},ta=we.emit,rC=function(A,t){if(A==="exit"&&Mr(global.process)){t!==void 0&&(we.exitCode=t);var r=ta.apply(this,arguments);return vr("exit",we.exitCode,null),vr("afterexit",we.exitCode,null),r}else return ta.apply(this,arguments)}):yn.exports=function(){return function(){}};var eC,pn,AC,$i,qe,ea,vr,Aa,mn,dl,Ql,tC,ta,rC});var sC=Q((iq,iC)=>{"use strict";var Qk=require("os"),Ck=nC(),fk=1e3*5,Ik=(e,A="SIGTERM",t={})=>{let r=e(A);return Bk(e,A,t,r),r},Bk=(e,A,t,r)=>{if(!pk(A,t,r))return;let n=yk(t),i=setTimeout(()=>{e("SIGKILL")},n);i.unref&&i.unref()},pk=(e,{forceKillAfterTimeout:A},t)=>mk(e)&&A!==!1&&t,mk=e=>e===Qk.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",yk=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return fk;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},wk=(e,A)=>{e.kill()&&(A.isCanceled=!0)},Rk=(e,A,t)=>{e.kill(A),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:A}))},Dk=(e,{timeout:A,killSignal:t="SIGTERM"},r)=>{if(A===0||A===void 0)return r;let n,i=new Promise((o,a)=>{n=setTimeout(()=>{Rk(e,t,a)},A)}),s=r.finally(()=>{clearTimeout(n)});return Promise.race([i,s])},bk=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},kk=async(e,{cleanup:A,detached:t},r)=>{if(!A||t)return r;let n=Ck(()=>{e.kill()});return r.finally(()=>{n()})};iC.exports={spawnedKill:Ik,spawnedCancel:wk,setupTimeout:Dk,validateTimeout:bk,setExitHandler:kk}});var aC=Q((sq,oC)=>{"use strict";var gt=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";gt.writable=e=>gt(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";gt.readable=e=>gt(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";gt.duplex=e=>gt.writable(e)&>.readable(e);gt.transform=e=>gt.duplex(e)&&typeof e._transform=="function";oC.exports=gt});var gC=Q((oq,cC)=>{"use strict";var{PassThrough:Sk}=require("stream");cC.exports=e=>{e={...e};let{array:A}=e,{encoding:t}=e,r=t==="buffer",n=!1;A?n=!(t||r):t=t||"utf8",r&&(t=null);let i=new Sk({objectMode:n});t&&i.setEncoding(t);let s=0,o=[];return i.on("data",a=>{o.push(a),n?s=o.length:s+=a.length}),i.getBufferedValue=()=>A?o:r?Buffer.concat(o,s):o.join(""),i.getBufferedLength=()=>s,i}});var fl=Q((aq,es)=>{"use strict";var{constants:Fk}=require("buffer"),Nk=require("stream"),{promisify:xk}=require("util"),Lk=gC(),Uk=xk(Nk.pipeline),ra=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Cl(e,A){if(!e)throw new Error("Expected a stream");A={maxBuffer:1/0,...A};let{maxBuffer:t}=A,r=Lk(A);return await new Promise((n,i)=>{let s=o=>{o&&r.getBufferedLength()<=Fk.MAX_LENGTH&&(o.bufferedData=r.getBufferedValue()),i(o)};(async()=>{try{await Uk(e,r),n()}catch(o){s(o)}})(),r.on("data",()=>{r.getBufferedLength()>t&&s(new ra)})}),r.getBufferedValue()}es.exports=Cl;es.exports.buffer=(e,A)=>Cl(e,{...A,encoding:"buffer"});es.exports.array=(e,A)=>Cl(e,{...A,array:!0});es.exports.MaxBufferError=ra});var uC=Q((cq,lC)=>{"use strict";var{PassThrough:Tk}=require("stream");lC.exports=function(){var e=[],A=new Tk({objectMode:!0});return A.setMaxListeners(0),A.add=t,A.isEmpty=r,A.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(t),A;function t(i){return Array.isArray(i)?(i.forEach(t),this):(e.push(i),i.once("end",n.bind(null,i)),i.once("error",A.emit.bind(A,"error")),i.pipe(A,{end:!1}),this)}function r(){return e.length==0}function n(i){e=e.filter(function(s){return s!==i}),!e.length&&A.readable&&A.end()}}});var QC=Q((gq,dC)=>{"use strict";var hC=aC(),EC=fl(),Mk=uC(),vk=(e,A)=>{A===void 0||e.stdin===void 0||(hC(A)?A.pipe(e.stdin):e.stdin.end(A))},Pk=(e,{all:A})=>{if(!A||!e.stdout&&!e.stderr)return;let t=Mk();return e.stdout&&t.add(e.stdout),e.stderr&&t.add(e.stderr),t},Il=async(e,A)=>{if(e){e.destroy();try{return await A}catch(t){return t.bufferedData}}},Bl=(e,{encoding:A,buffer:t,maxBuffer:r})=>{if(!(!e||!t))return A?EC(e,{encoding:A,maxBuffer:r}):EC.buffer(e,{maxBuffer:r})},Gk=async({stdout:e,stderr:A,all:t},{encoding:r,buffer:n,maxBuffer:i},s)=>{let o=Bl(e,{encoding:r,buffer:n,maxBuffer:i}),a=Bl(A,{encoding:r,buffer:n,maxBuffer:i}),c=Bl(t,{encoding:r,buffer:n,maxBuffer:i*2});try{return await Promise.all([s,o,a,c])}catch(g){return Promise.all([{error:g,signal:g.signal,timedOut:g.timedOut},Il(e,o),Il(A,a),Il(t,c)])}},Jk=({input:e})=>{if(hC(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};dC.exports={handleInput:vk,makeAllStream:Pk,getSpawnedResult:Gk,validateInputSync:Jk}});var fC=Q((lq,CC)=>{"use strict";var Yk=(async()=>{})().constructor.prototype,Vk=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Yk,e)]),qk=(e,A)=>{for(let[t,r]of Vk){let n=typeof A=="function"?(...i)=>Reflect.apply(r.value,A(),i):r.value.bind(A);Reflect.defineProperty(e,t,{...r,value:n})}return e},Ok=e=>new Promise((A,t)=>{e.on("exit",(r,n)=>{A({exitCode:r,signal:n})}),e.on("error",r=>{t(r)}),e.stdin&&e.stdin.on("error",r=>{t(r)})});CC.exports={mergePromise:qk,getSpawnedPromise:Ok}});var pC=Q((uq,BC)=>{"use strict";var IC=(e,A=[])=>Array.isArray(A)?[e,...A]:[e],Hk=/^[\w.-]+$/,Wk=/"/g,_k=e=>typeof e!="string"||Hk.test(e)?e:`"${e.replace(Wk,'\\"')}"`,jk=(e,A)=>IC(e,A).join(" "),Kk=(e,A)=>IC(e,A).map(t=>_k(t)).join(" "),Zk=/ +/g,Xk=e=>{let A=[];for(let t of e.trim().split(Zk)){let r=A[A.length-1];r&&r.endsWith("\\")?A[A.length-1]=`${r.slice(0,-1)} ${t}`:A.push(t)}return A};BC.exports={joinCommand:jk,getEscapedCommand:Kk,parseCommand:Xk}});var kC=Q((Eq,wn)=>{"use strict";var zk=require("path"),pl=require("child_process"),$k=LQ(),eS=TQ(),AS=PQ(),tS=VQ(),na=ZQ(),yC=zQ(),{spawnedKill:rS,spawnedCancel:nS,setupTimeout:iS,validateTimeout:sS,setExitHandler:oS}=sC(),{handleInput:aS,getSpawnedResult:cS,makeAllStream:gS,validateInputSync:lS}=QC(),{mergePromise:mC,getSpawnedPromise:uS}=fC(),{joinCommand:wC,parseCommand:RC,getEscapedCommand:DC}=pC(),ES=1e3*1e3*100,hS=({env:e,extendEnv:A,preferLocal:t,localDir:r,execPath:n})=>{let i=A?{...process.env,...e}:e;return t?AS.env({env:i,cwd:r,execPath:n}):i},bC=(e,A,t={})=>{let r=$k._parse(e,A,t);return e=r.command,A=r.args,t=r.options,t={maxBuffer:ES,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:t.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...t},t.env=hS(t),t.stdio=yC(t),process.platform==="win32"&&zk.basename(e,".exe")==="cmd"&&A.unshift("/q"),{file:e,args:A,options:t,parsed:r}},As=(e,A,t)=>typeof A!="string"&&!Buffer.isBuffer(A)?t===void 0?void 0:"":e.stripFinalNewline?eS(A):A,ia=(e,A,t)=>{let r=bC(e,A,t),n=wC(e,A),i=DC(e,A);sS(r.options);let s;try{s=pl.spawn(r.file,r.args,r.options)}catch(E){let h=new pl.ChildProcess,d=Promise.reject(na({error:E,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return mC(h,d)}let o=uS(s),a=iS(s,r.options,o),c=oS(s,r.options,a),g={isCanceled:!1};s.kill=rS.bind(null,s.kill.bind(s)),s.cancel=nS.bind(null,s,g);let u=tS(async()=>{let[{error:E,exitCode:h,signal:d,timedOut:C},I,p,w]=await cS(s,r.options,c),m=As(r.options,I),K=As(r.options,p),H=As(r.options,w);if(E||h!==0||d!==null){let ne=na({error:E,exitCode:h,signal:d,stdout:m,stderr:K,all:H,command:n,escapedCommand:i,parsed:r,timedOut:C,isCanceled:g.isCanceled,killed:s.killed});if(!r.options.reject)return ne;throw ne}return{command:n,escapedCommand:i,exitCode:0,stdout:m,stderr:K,all:H,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return aS(s,r.options.input),s.all=gS(s,r.options),mC(s,u)};wn.exports=ia;wn.exports.sync=(e,A,t)=>{let r=bC(e,A,t),n=wC(e,A),i=DC(e,A);lS(r.options);let s;try{s=pl.spawnSync(r.file,r.args,r.options)}catch(c){throw na({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let o=As(r.options,s.stdout,s.error),a=As(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let c=na({stdout:o,stderr:a,error:s.error,signal:s.signal,exitCode:s.status,command:n,escapedCommand:i,parsed:r,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return c;throw c}return{command:n,escapedCommand:i,exitCode:0,stdout:o,stderr:a,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};wn.exports.command=(e,A)=>{let[t,...r]=RC(e);return ia(t,r,A)};wn.exports.commandSync=(e,A)=>{let[t,...r]=RC(e);return ia.sync(t,r,A)};wn.exports.node=(e,A,t={})=>{A&&!Array.isArray(A)&&typeof A=="object"&&(t=A,A=[]);let r=yC.node(t),n=process.execArgv.filter(o=>!o.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=n}=t;return ia(i,[...s,e,...Array.isArray(A)?A:[]],{...t,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var ml=Q((Bq,dS)=>{dS.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 yl=Q(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.enginesVersion=void 0;sa.enginesVersion=ml().prisma.enginesVersion});var FC=Q((mq,SC)=>{"use strict";function GA(e,A){typeof A=="boolean"&&(A={forever:A}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=A||{},this._maxRetryTime=A&&A.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}SC.exports=GA;GA.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};GA.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};GA.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var A=new Date().getTime();if(e&&A-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};GA.prototype.attempt=function(e,A){this._fn=e,A&&(A.timeout&&(this._operationTimeout=A.timeout),A.cb&&(this._operationTimeoutCb=A.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};GA.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};GA.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};GA.prototype.start=GA.prototype.try;GA.prototype.errors=function(){return this._errors};GA.prototype.attempts=function(){return this._attempts};GA.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},A=null,t=0,r=0;r=t&&(A=n,t=s)}return A}});var NC=Q(Pr=>{"use strict";var QS=FC();Pr.operation=function(e){var A=Pr.timeouts(e);return new QS(A,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Pr.timeouts=function(e){if(e instanceof Array)return[].concat(e);var A={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in e)A[t]=e[t];if(A.minTimeout>A.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n{"use strict";xC.exports=NC()});var TC=Q((Rq,aa)=>{"use strict";var CS=LC(),fS=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],oa=class extends Error{constructor(A){super(),A instanceof Error?(this.originalError=A,{message:A}=A):(this.originalError=new Error(A),this.originalError.stack=this.stack),this.name="AbortError",this.message=A}},IS=(e,A,t)=>{let r=t.retries-(A-1);return e.attemptNumber=A,e.retriesLeft=r,e},BS=e=>fS.includes(e),UC=(e,A)=>new Promise((t,r)=>{A={onFailedAttempt:()=>{},retries:10,...A};let n=CS.operation(A);n.attempt(async i=>{try{t(await e(i))}catch(s){if(!(s instanceof Error)){r(new TypeError(`Non-error was thrown: "${s}". You should only throw errors.`));return}if(s instanceof oa)n.stop(),r(s.originalError);else if(s instanceof TypeError&&!BS(s.message))n.stop(),r(s);else{IS(s,i,A);try{await A.onFailedAttempt(s)}catch(o){r(o);return}n.retry(s)||r(n.mainError())}}})});aa.exports=UC;aa.exports.default=UC;aa.exports.AbortError=oa});var PC=Q((Gq,yS)=>{yS.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 JC=Q((Jq,ga)=>{"use strict";var wS=require("fs"),GC=require("path"),RS=require("os"),DS=PC(),bS=DS.version,kS=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function SS(e){let A={},t=e.toString();t=t.replace(/\r\n?/mg,` +`);let r;for(;(r=kS.exec(t))!=null;){let n=r[1],i=r[2]||"";i=i.trim();let s=i[0];i=i.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(i=i.replace(/\\n/g,` +`),i=i.replace(/\\r/g,"\r")),A[n]=i}return A}function Dl(e){console.log(`[dotenv@${bS}][DEBUG] ${e}`)}function FS(e){return e[0]==="~"?GC.join(RS.homedir(),e.slice(1)):e}function NS(e){let A=GC.resolve(process.cwd(),".env"),t="utf8",r=!!(e&&e.debug),n=!!(e&&e.override);e&&(e.path!=null&&(A=FS(e.path)),e.encoding!=null&&(t=e.encoding));try{let i=ca.parse(wS.readFileSync(A,{encoding:t}));return Object.keys(i).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?(n===!0&&(process.env[s]=i[s]),r&&Dl(n===!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]=i[s]}),{parsed:i}}catch(i){return r&&Dl(`Failed to load ${A} ${i.message}`),{error:i}}}var ca={config:NS,parse:SS};ga.exports.config=ca.config;ga.exports.parse=ca.parse;ga.exports=ca});var WC=Q((_q,HC)=>{"use strict";HC.exports=e=>{let A=e.match(/^[ \t]*(?=\S)/gm);return A?A.reduce((t,r)=>Math.min(t,r.length),1/0):0}});var jC=Q((jq,_C)=>{"use strict";var TS=WC();_C.exports=e=>{let A=TS(e);if(A===0)return e;let t=new RegExp(`^[ \\t]{${A}}`,"gm");return e.replace(t,"")}});var Fl=Q((eO,KC)=>{"use strict";KC.exports=(e,A=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof A!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof A}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(A===0)return e;let r=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(r,t.indent.repeat(A))}});var $C=Q((rO,zC)=>{"use strict";zC.exports=({onlyFirst:e=!1}={})=>{let A=["[\\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(A,e?void 0:"g")}});var Ul=Q((nO,ef)=>{"use strict";var qS=$C();ef.exports=e=>typeof e=="string"?e.replace(qS(),""):e});var tf=Q((oO,Ea)=>{"use strict";Ea.exports=(e={})=>{let A;if(e.repoUrl)A=e.repoUrl;else if(e.user&&e.repo)A=`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 t=new URL(`${A}/issues/new`),r=["body","title","labels","template","milestone","assignee","projects"];for(let n of r){let i=e[n];if(i!==void 0){if(n==="labels"||n==="projects"){if(!Array.isArray(i))throw new TypeError(`The \`${n}\` option should be an array`);i=i.join(",")}t.searchParams.set(n,i)}}return t.toString()};Ea.exports.default=Ea.exports});var Ol=Q((fH,Rf)=>{"use strict";Rf.exports=function(){function e(A,t,r,n,i){return Ar?r+1:A+1:n===i?t:t+1}return function(A,t){if(A===t)return 0;if(A.length>t.length){var r=A;A=t,t=r}for(var n=A.length,i=t.length;n>0&&A.charCodeAt(n-1)===t.charCodeAt(i-1);)n--,i--;for(var s=0;s{"use strict";_I.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable")}});var le=Q((K4,jI)=>{"use strict";var Le=class extends Error{constructor(A){super(A),this.name="UndiciError",this.code="UND_ERR"}},Eu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ConnectTimeoutError",this.message=A||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},hu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="HeadersTimeoutError",this.message=A||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},du=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="HeadersOverflowError",this.message=A||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},Qu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="BodyTimeoutError",this.message=A||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},Cu=class e extends Le{constructor(A,t,r,n){super(A),Error.captureStackTrace(this,e),this.name="ResponseStatusCodeError",this.message=A||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=n,this.status=t,this.statusCode=t,this.headers=r}},fu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InvalidArgumentError",this.message=A||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},Iu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InvalidReturnValueError",this.message=A||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},Bu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="AbortError",this.message=A||"Request aborted",this.code="UND_ERR_ABORTED"}},pu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InformationalError",this.message=A||"Request information",this.code="UND_ERR_INFO"}},mu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="RequestContentLengthMismatchError",this.message=A||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}},yu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ResponseContentLengthMismatchError",this.message=A||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}},wu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ClientDestroyedError",this.message=A||"The client is destroyed",this.code="UND_ERR_DESTROYED"}},Ru=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ClientClosedError",this.message=A||"The client is closed",this.code="UND_ERR_CLOSED"}},Du=class e extends Le{constructor(A,t){super(A),Error.captureStackTrace(this,e),this.name="SocketError",this.message=A||"Socket error",this.code="UND_ERR_SOCKET",this.socket=t}},Wa=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="NotSupportedError",this.message=A||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}},bu=class extends Le{constructor(A){super(A),Error.captureStackTrace(this,Wa),this.name="MissingUpstreamError",this.message=A||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}},ku=class e extends Error{constructor(A,t,r){super(A),Error.captureStackTrace(this,e),this.name="HTTPParserError",this.code=t?`HPE_${t}`:void 0,this.data=r?r.toString():void 0}},Su=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ResponseExceededMaxSizeError",this.message=A||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}},Fu=class e extends Le{constructor(A,t,{headers:r,data:n}){super(A),Error.captureStackTrace(this,e),this.name="RequestRetryError",this.message=A||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=t,this.data=n,this.headers=r}};jI.exports={HTTPParserError:ku,UndiciError:Le,HeadersTimeoutError:hu,HeadersOverflowError:du,BodyTimeoutError:Qu,RequestContentLengthMismatchError:mu,ConnectTimeoutError:Eu,ResponseStatusCodeError:Cu,InvalidArgumentError:fu,InvalidReturnValueError:Iu,RequestAbortedError:Bu,ClientDestroyedError:wu,ClientClosedError:Ru,InformationalError:pu,SocketError:Du,NotSupportedError:Wa,ResponseContentLengthMismatchError:yu,BalancedPoolMissingUpstreamError:bu,ResponseExceededMaxSizeError:Su,RequestRetryError:Fu}});var ZI=Q((Z4,KI)=>{"use strict";var _a={},Nu=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let e=0;e{"use strict";var eB=require("assert"),{kDestroyed:AB,kBodyUsed:XI}=de(),{IncomingMessage:Sx}=require("http"),Wn=require("stream"),Fx=require("net"),{InvalidArgumentError:je}=le(),{Blob:zI}=require("buffer"),ja=require("util"),{stringify:Nx}=require("querystring"),{headerNameLowerCasedRecord:xx}=ZI(),[xu,$I]=process.versions.node.split(".").map(e=>Number(e));function Lx(){}function Lu(e){return e&&typeof e=="object"&&typeof e.pipe=="function"&&typeof e.on=="function"}function tB(e){return zI&&e instanceof zI||e&&typeof e=="object"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function Ux(e,A){if(e.includes("?")||e.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let t=Nx(A);return t&&(e+="?"+t),e}function rB(e){if(typeof e=="string"){if(e=new URL(e),!/^https?:/.test(e.origin||e.protocol))throw new je("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!="object")throw new je("Invalid URL: The URL argument must be a non-null object.");if(!/^https?:/.test(e.origin||e.protocol))throw new je("Invalid URL protocol: the URL must start with `http:` or `https:`.");if(!(e instanceof URL)){if(e.port!=null&&e.port!==""&&!Number.isFinite(parseInt(e.port)))throw new je("Invalid URL: port must be a valid integer or a string representation of an integer.");if(e.path!=null&&typeof e.path!="string")throw new je("Invalid URL path: the path must be a string or null/undefined.");if(e.pathname!=null&&typeof e.pathname!="string")throw new je("Invalid URL pathname: the pathname must be a string or null/undefined.");if(e.hostname!=null&&typeof e.hostname!="string")throw new je("Invalid URL hostname: the hostname must be a string or null/undefined.");if(e.origin!=null&&typeof e.origin!="string")throw new je("Invalid URL origin: the origin must be a string or null/undefined.");let A=e.port!=null?e.port:e.protocol==="https:"?443:80,t=e.origin!=null?e.origin:`${e.protocol}//${e.hostname}:${A}`,r=e.path!=null?e.path:`${e.pathname||""}${e.search||""}`;t.endsWith("/")&&(t=t.substring(0,t.length-1)),r&&!r.startsWith("/")&&(r=`/${r}`),e=new URL(t+r)}return e}function Tx(e){if(e=rB(e),e.pathname!=="/"||e.search||e.hash)throw new je("invalid url");return e}function Mx(e){if(e[0]==="["){let t=e.indexOf("]");return eB(t!==-1),e.substring(1,t)}let A=e.indexOf(":");return A===-1?e:e.substring(0,A)}function vx(e){if(!e)return null;eB.strictEqual(typeof e,"string");let A=Mx(e);return Fx.isIP(A)?"":A}function Px(e){return JSON.parse(JSON.stringify(e))}function Gx(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}function Jx(e){return e!=null&&(typeof e[Symbol.iterator]=="function"||typeof e[Symbol.asyncIterator]=="function")}function Yx(e){if(e==null)return 0;if(Lu(e)){let A=e._readableState;return A&&A.objectMode===!1&&A.ended===!0&&Number.isFinite(A.length)?A.length:null}else{if(tB(e))return e.size!=null?e.size:null;if(iB(e))return e.byteLength}return null}function Uu(e){return!e||!!(e.destroyed||e[AB])}function nB(e){let A=e&&e._readableState;return Uu(e)&&A&&!A.endEmitted}function Vx(e,A){e==null||!Lu(e)||Uu(e)||(typeof e.destroy=="function"?(Object.getPrototypeOf(e).constructor===Sx&&(e.socket=null),e.destroy(A)):A&&process.nextTick((t,r)=>{t.emit("error",r)},e,A),e.destroyed!==!0&&(e[AB]=!0))}var qx=/timeout=(\d+)/;function Ox(e){let A=e.toString().match(qx);return A?parseInt(A[1],10)*1e3:null}function Hx(e){return xx[e]||e.toLowerCase()}function Wx(e,A={}){if(!Array.isArray(e))return e;for(let t=0;ti.toString("utf8")):A[r]=e[t+1].toString("utf8")}return"content-length"in A&&"content-disposition"in A&&(A["content-disposition"]=Buffer.from(A["content-disposition"]).toString("latin1")),A}function _x(e){let A=[],t=!1,r=-1;for(let n=0;n{t.close()});else{let i=Buffer.isBuffer(n)?n:Buffer.from(n);t.enqueue(new Uint8Array(i))}return t.desiredSize>0},async cancel(t){await A.return()}},0)}function AL(e){return e&&typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&e[Symbol.toStringTag]==="FormData"}function tL(e){if(e){if(typeof e.throwIfAborted=="function")e.throwIfAborted();else if(e.aborted){let A=new Error("The operation was aborted");throw A.name="AbortError",A}}}function rL(e,A){return"addEventListener"in e?(e.addEventListener("abort",A,{once:!0}),()=>e.removeEventListener("abort",A)):(e.addListener("abort",A),()=>e.removeListener("abort",A))}var nL=!!String.prototype.toWellFormed;function iL(e){return nL?`${e}`.toWellFormed():ja.toUSVString?ja.toUSVString(e):`${e}`}function sL(e){if(e==null||e==="")return{start:0,end:null,size:null};let A=e?e.match(/^bytes (\d+)-(\d+)\/(\d+)?$/):null;return A?{start:parseInt(A[1]),end:A[2]?parseInt(A[2]):null,size:A[3]?parseInt(A[3]):null}:null}var sB=Object.create(null);sB.enumerable=!0;oB.exports={kEnumerableProperty:sB,nop:Lx,isDisturbed:Kx,isErrored:Zx,isReadable:Xx,toUSVString:iL,isReadableAborted:nB,isBlobLike:tB,parseOrigin:Tx,parseURL:rB,getServerName:vx,isStream:Lu,isIterable:Jx,isAsyncIterable:Gx,isDestroyed:Uu,headerNameToString:Hx,parseRawHeaders:_x,parseHeaders:Wx,parseKeepAliveTimeout:Ox,destroy:Vx,bodyLength:Yx,deepClone:Px,ReadableStreamFrom:eL,isBuffer:iB,validateHandler:jx,getSocketInfo:zx,isFormDataLike:AL,buildURL:Ux,throwIfAborted:tL,addAbortListener:rL,parseRangeHeader:sL,nodeMajor:xu,nodeMinor:$I,nodeHasAutoSelectFamily:xu>18||xu===18&&$I>=13,safeHTTPMethods:["GET","HEAD","OPTIONS","TRACE"]}});var gB=Q((z4,cB)=>{"use strict";var Tu=Date.now(),Br,pr=[];function oL(){Tu=Date.now();let e=pr.length,A=0;for(;A0&&Tu>=t.state&&(t.state=-1,t.callback(t.opaque)),t.state===-1?(t.state=-2,A!==e-1?pr[A]=pr.pop():pr.pop(),e-=1):A+=1}pr.length>0&&aB()}function aB(){Br&&Br.refresh?Br.refresh():(clearTimeout(Br),Br=setTimeout(oL,1e3),Br.unref&&Br.unref())}var Ka=class{constructor(A,t,r){this.callback=A,this.delay=t,this.opaque=r,this.state=-2,this.refresh()}refresh(){this.state===-2&&(pr.push(this),(!Br||pr.length===1)&&aB()),this.state=0}clear(){this.state=-1}};cB.exports={setTimeout(e,A,t){return A<1e3?setTimeout(e,A,t):new Ka(e,A,t)},clearTimeout(e){e instanceof Ka?e.clear():clearTimeout(e)}}});var Mu=Q(($4,lB)=>{"use strict";var aL=require("events").EventEmitter,cL=require("util").inherits;function Vr(e){if(typeof e=="string"&&(e=Buffer.from(e)),!Buffer.isBuffer(e))throw new TypeError("The needle has to be a String or a Buffer.");let A=e.length;if(A===0)throw new Error("The needle cannot be an empty String/Buffer.");if(A>256)throw new Error("The needle cannot have a length bigger than 256.");this.maxMatches=1/0,this.matches=0,this._occ=new Array(256).fill(A),this._lookbehind_size=0,this._needle=e,this._bufpos=0,this._lookbehind=Buffer.alloc(A);for(var t=0;t=0)this.emit("info",!1,this._lookbehind,0,this._lookbehind_size),this._lookbehind_size=0;else{let o=this._lookbehind_size+i;return o>0&&this.emit("info",!1,this._lookbehind,0,o),this._lookbehind.copy(this._lookbehind,0,o,this._lookbehind_size-o),this._lookbehind_size-=o,e.copy(this._lookbehind,this._lookbehind_size),this._lookbehind_size+=A,this._bufpos=A,A}}if(i+=(i>=0)*this._bufpos,e.indexOf(t,i)!==-1)return i=e.indexOf(t,i),++this.matches,i>0?this.emit("info",!0,e,this._bufpos,i):this.emit("info",!0),this._bufpos=i+r;for(i=A-r;i0&&this.emit("info",!1,e,this._bufpos,i{"use strict";var gL=require("util").inherits,uB=require("stream").Readable;function vu(e){uB.call(this,e)}gL(vu,uB);vu.prototype._read=function(e){};EB.exports=vu});var Za=Q((Aj,dB)=>{"use strict";dB.exports=function(A,t,r){if(!A||A[t]===void 0||A[t]===null)return r;if(typeof A[t]!="number"||isNaN(A[t]))throw new TypeError("Limit "+t+" is not a valid number");return A[t]}});var IB=Q((tj,fB)=>{"use strict";var CB=require("events").EventEmitter,lL=require("util").inherits,QB=Za(),uL=Mu(),EL=Buffer.from(`\r +\r +`),hL=/\r\n/g,dL=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function _n(e){CB.call(this),e=e||{};let A=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=QB(e,"maxHeaderPairs",2e3),this.maxHeaderSize=QB(e,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new uL(EL),this.ss.on("info",function(t,r,n,i){r&&!A.maxed&&(A.nread+i-n>=A.maxHeaderSize?(i=A.maxHeaderSize-A.nread+n,A.nread=A.maxHeaderSize,A.maxed=!0):A.nread+=i-n,A.buffer+=r.toString("binary",n,i)),t&&A._finish()})}lL(_n,CB);_n.prototype.push=function(e){let A=this.ss.push(e);if(this.finished)return A};_n.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};_n.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let e=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",e)};_n.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let e=this.buffer.split(hL),A=e.length,t,r;for(var n=0;n{"use strict";var Pu=require("stream").Writable,QL=require("util").inherits,CL=Mu(),BB=hB(),fL=IB(),IL=45,BL=Buffer.from("-"),pL=Buffer.from(`\r +`),mL=function(){};function zA(e){if(!(this instanceof zA))return new zA(e);if(Pu.call(this,e),!e||!e.headerFirst&&typeof e.boundary!="string")throw new TypeError("Boundary required");typeof e.boundary=="string"?this.setBoundary(e.boundary):this._bparser=void 0,this._headerFirst=e.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:e.partHwm},this._pause=!1;let A=this;this._hparser=new fL(e),this._hparser.on("header",function(t){A._inHeader=!1,A._part.emit("header",t)})}QL(zA,Pu);zA.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){let A=this;process.nextTick(function(){if(A.emit("error",new Error("Unexpected end of multipart data")),A._part&&!A._ignoreData){let t=A._isPreamble?"Preamble":"Part";A._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data")),A._part.push(null),process.nextTick(function(){A._realFinish=!0,A.emit("finish"),A._realFinish=!1});return}A._realFinish=!0,A.emit("finish"),A._realFinish=!1})}}else Pu.prototype.emit.apply(this,arguments)};zA.prototype._write=function(e,A,t){if(!this._hparser&&!this._bparser)return t();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new BB(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(e);if(!this._inHeader&&r!==void 0&&r{"use strict";var mB=new TextDecoder("utf-8"),Xa=new Map([["utf-8",mB],["utf8",mB]]);function yL(e,A,t){if(e)if(Xa.has(t))try{return Xa.get(t).decode(Buffer.from(e,A))}catch{}else try{return Xa.set(t,new TextDecoder(t)),Xa.get(t).decode(Buffer.from(e,A))}catch{}return e}yB.exports=yL});var Ju=Q((ij,DB)=>{"use strict";var $a=za(),wB=/%([a-fA-F0-9]{2})/g;function RB(e,A){return String.fromCharCode(parseInt(A,16))}function wL(e){let A=[],t="key",r="",n=!1,i=!1,s=0,o="";for(var a=0,c=e.length;a{"use strict";bB.exports=function(A){if(typeof A!="string")return"";for(var t=A.length-1;t>=0;--t)switch(A.charCodeAt(t)){case 47:case 92:return A=A.slice(t+1),A===".."||A==="."?"":A}return A===".."||A==="."?"":A}});var xB=Q((oj,NB)=>{"use strict";var{Readable:FB}=require("stream"),{inherits:RL}=require("util"),DL=Gu(),SB=Ju(),bL=za(),kL=kB(),qr=Za(),SL=/^boundary$/i,FL=/^form-data$/i,NL=/^charset$/i,xL=/^filename$/i,LL=/^name$/i;ec.detect=/^multipart\/form-data/i;function ec(e,A){let t,r,n=this,i,s=A.limits,o=A.isPartAFile||((ee,Y,ce)=>Y==="application/octet-stream"||ce!==void 0),a=A.parsedConType||[],c=A.defCharset||"utf8",g=A.preservePath,l={highWaterMark:A.fileHwm};for(t=0,r=a.length;tI)return n.parser.removeListener("part",ee),n.parser.on("part",jn),e.hitPartsLimit=!0,e.emit("partsLimit"),jn(Y);if(q){let ce=q;ce.emit("end"),ce.removeAllListeners("end")}Y.on("header",function(ce){let Je,fe,P,To,Mo,qi,Oi=0;if(ce["content-type"]&&(P=SB(ce["content-type"][0]),P[0])){for(Je=P[0].toLowerCase(),t=0,r=P.length;th){let xt=h-Oi+st.length;xt>0&&Ye.push(st.slice(0,xt)),Ye.truncated=!0,Ye.bytesRead=h,Y.removeAllListeners("data"),Ye.emit("limit");return}else Ye.push(st)||(n._pause=!0);Ye.bytesRead=Oi},Og=function(){ne=void 0,Ye.push(null)}}else{if(K===C)return e.hitFieldsLimit||(e.hitFieldsLimit=!0,e.emit("fieldsLimit")),jn(Y);++K,++H;let Ye="",st=!1;q=Y,qg=function(xt){if((Oi+=xt.length)>E){let SD=E-(Oi-xt.length);Ye+=xt.toString("binary",0,SD),st=!0,Y.removeAllListeners("data")}else Ye+=xt.toString("binary")},Og=function(){q=void 0,Ye.length&&(Ye=bL(Ye,"binary",To)),e.emit("field",fe,Ye,!1,st,Mo,Je),--H,u()}}Y._readableState.sync=!1,Y.on("data",qg),Y.on("end",Og)}).on("error",function(ce){ne&&ne.emit("error",ce)})}).on("error",function(ee){e.emit("error",ee)}).on("finish",function(){ae=!0,u()})}ec.prototype.write=function(e,A){let t=this.parser.write(e);t&&!this._pause?A():(this._needDrain=!t,this._cb=A)};ec.prototype.end=function(){let e=this;e.parser.writable?e.parser.end():e._boy._done||process.nextTick(function(){e._boy._done=!0,e._boy.emit("finish")})};function jn(e){e.resume()}function Yu(e){FB.call(this,e),this.bytesRead=0,this.truncated=!1}RL(Yu,FB);Yu.prototype._read=function(e){};NB.exports=ec});var UB=Q((aj,LB)=>{"use strict";var UL=/\+/g,TL=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Vu(){this.buffer=void 0}Vu.prototype.write=function(e){e=e.replace(UL," ");let A="",t=0,r=0,n=e.length;for(;tr&&(A+=e.substring(r,t),r=t),this.buffer="",++r);return r{"use strict";var ML=UB(),Kn=za(),qu=Za(),vL=/^charset$/i;Ac.detect=/^application\/x-www-form-urlencoded/i;function Ac(e,A){let t=A.limits,r=A.parsedConType;this.boy=e,this.fieldSizeLimit=qu(t,"fieldSize",1*1024*1024),this.fieldNameSizeLimit=qu(t,"fieldNameSize",100),this.fieldsLimit=qu(t,"fields",1/0);let n;for(var i=0,s=r.length;ii&&(this._key+=this.decoder.write(e.toString("binary",i,t))),this._state="val",this._hitLimit=!1,this._checkingBytes=!0,this._val="",this._bytesVal=0,this._valTrunc=!1,this.decoder.reset(),i=t+1;else if(r!==void 0){++this._fields;let o,a=this._keyTrunc;if(r>i?o=this._key+=this.decoder.write(e.toString("binary",i,r)):o=this._key,this._hitLimit=!1,this._checkingBytes=!0,this._key="",this._bytesKey=0,this._keyTrunc=!1,this.decoder.reset(),o.length&&this.boy.emit("field",Kn(o,"binary",this.charset),"",a,!1),i=r+1,this._fields===this.fieldsLimit)return A()}else this._hitLimit?(n>i&&(this._key+=this.decoder.write(e.toString("binary",i,n))),i=n,(this._bytesKey=this._key.length)===this.fieldNameSizeLimit&&(this._checkingBytes=!1,this._keyTrunc=!0)):(ii&&(this._val+=this.decoder.write(e.toString("binary",i,r))),this.boy.emit("field",Kn(this._key,"binary",this.charset),Kn(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc),this._state="key",this._hitLimit=!1,this._checkingBytes=!0,this._key="",this._bytesKey=0,this._keyTrunc=!1,this.decoder.reset(),i=r+1,this._fields===this.fieldsLimit)return A()}else this._hitLimit?(n>i&&(this._val+=this.decoder.write(e.toString("binary",i,n))),i=n,(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit)&&(this._checkingBytes=!1,this._valTrunc=!0)):(i0?this.boy.emit("field",Kn(this._key,"binary",this.charset),"",this._keyTrunc,!1):this._state==="val"&&this.boy.emit("field",Kn(this._key,"binary",this.charset),Kn(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc),this.boy._done=!0,this.boy.emit("finish"))};TB.exports=Ac});var GB=Q((gj,Ss)=>{"use strict";var Ou=require("stream").Writable,{inherits:PL}=require("util"),GL=Gu(),vB=xB(),PB=MB(),JL=Ju();function Vt(e){if(!(this instanceof Vt))return new Vt(e);if(typeof e!="object")throw new TypeError("Busboy expected an options-Object.");if(typeof e.headers!="object")throw new TypeError("Busboy expected an options-Object with headers-attribute.");if(typeof e.headers["content-type"]!="string")throw new TypeError("Missing Content-Type-header.");let{headers:A,...t}=e;this.opts={autoDestroy:!1,...t},Ou.call(this,this.opts),this._done=!1,this._parser=this.getParserByHeaders(A),this._finished=!1}PL(Vt,Ou);Vt.prototype.emit=function(e){if(e==="finish"){if(this._done){if(this._finished)return}else{this._parser?.end();return}this._finished=!0}Ou.prototype.emit.apply(this,arguments)};Vt.prototype.getParserByHeaders=function(e){let A=JL(e["content-type"]),t={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:A,preservePath:this.opts.preservePath};if(vB.detect.test(A[0]))return new vB(this,t);if(PB.detect.test(A[0]))return new PB(this,t);throw new Error("Unsupported Content-Type.")};Vt.prototype._write=function(e,A,t){this._parser.write(e,t)};Ss.exports=Vt;Ss.exports.default=Vt;Ss.exports.Busboy=Vt;Ss.exports.Dicer=GL});var mr=Q((lj,_B)=>{"use strict";var{MessageChannel:YL,receiveMessageOnPort:VL}=require("worker_threads"),JB=["GET","HEAD","POST"],qL=new Set(JB),OL=[101,204,205,304],YB=[301,302,303,307,308],HL=new Set(YB),VB=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","5060","5061","6000","6566","6665","6666","6667","6668","6669","6697","10080"],WL=new Set(VB),qB=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],_L=new Set(qB),jL=["follow","manual","error"],OB=["GET","HEAD","OPTIONS","TRACE"],KL=new Set(OB),ZL=["navigate","same-origin","no-cors","cors"],XL=["omit","same-origin","include"],zL=["default","no-store","reload","no-cache","force-cache","only-if-cached"],$L=["content-encoding","content-language","content-location","content-type","content-length"],eU=["half"],HB=["CONNECT","TRACE","TRACK"],AU=new Set(HB),WB=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],tU=new Set(WB),rU=globalThis.DOMException??(()=>{try{atob("~")}catch(e){return Object.getPrototypeOf(e).constructor}})(),Zn,nU=globalThis.structuredClone??function(A,t=void 0){if(arguments.length===0)throw new TypeError("missing argument");return Zn||(Zn=new YL),Zn.port1.unref(),Zn.port2.unref(),Zn.port1.postMessage(A,t?.transfer),VL(Zn.port2).message};_B.exports={DOMException:rU,structuredClone:nU,subresource:WB,forbiddenMethods:HB,requestBodyHeader:$L,referrerPolicy:qB,requestRedirect:jL,requestMode:ZL,requestCredentials:XL,requestCache:zL,redirectStatus:YB,corsSafeListedMethods:JB,nullBodyStatus:OL,safeMethods:OB,badPorts:VB,requestDuplex:eU,subresourceSet:tU,badPortsSet:WL,redirectStatusSet:HL,corsSafeListedMethodsSet:qL,safeMethodsSet:KL,forbiddenMethodsSet:AU,referrerPolicySet:_L}});var Xn=Q((uj,jB)=>{"use strict";var Hu=Symbol.for("undici.globalOrigin.1");function iU(){return globalThis[Hu]}function sU(e){if(e===void 0){Object.defineProperty(globalThis,Hu,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let A=new URL(e);if(A.protocol!=="http:"&&A.protocol!=="https:")throw new TypeError(`Only http & https urls are allowed, received ${A.protocol}`);Object.defineProperty(globalThis,Hu,{value:A,writable:!0,enumerable:!1,configurable:!1})}jB.exports={getGlobalOrigin:iU,setGlobalOrigin:sU}});var YA=Q((Ej,tp)=>{"use strict";var{redirectStatusSet:oU,referrerPolicySet:aU,badPortsSet:cU}=mr(),{getGlobalOrigin:gU}=Xn(),{performance:lU}=require("perf_hooks"),{isBlobLike:uU,toUSVString:EU,ReadableStreamFrom:hU}=W(),zn=require("assert"),{isUint8Array:dU}=require("util/types"),KB=[],tc;try{tc=require("crypto");let e=["sha256","sha384","sha512"];KB=tc.getHashes().filter(A=>e.includes(A))}catch{}function ZB(e){let A=e.urlList,t=A.length;return t===0?null:A[t-1].toString()}function QU(e,A){if(!oU.has(e.status))return null;let t=e.headersList.get("location");return t!==null&&zB(t)&&(t=new URL(t,ZB(e))),t&&!t.hash&&(t.hash=A),t}function Ns(e){return e.urlList[e.urlList.length-1]}function CU(e){let A=Ns(e);return Ap(A)&&cU.has(A.port)?"blocked":"allowed"}function fU(e){return e instanceof Error||e?.constructor?.name==="Error"||e?.constructor?.name==="DOMException"}function IU(e){for(let A=0;A=32&&t<=126||t>=128&&t<=255))return!1}return!0}function BU(e){switch(e){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return e>=33&&e<=126}}function XB(e){if(e.length===0)return!1;for(let A=0;A0)for(let i=r.length;i!==0;i--){let s=r[i-1].trim();if(aU.has(s)){n=s;break}}n!==""&&(e.referrerPolicy=n)}function yU(){return"allowed"}function wU(){return"success"}function RU(){return"success"}function DU(e){let A=null;A=e.mode,e.headersList.set("sec-fetch-mode",A)}function bU(e){let A=e.origin;if(e.responseTainting==="cors"||e.mode==="websocket")A&&e.headersList.append("origin",A);else if(e.method!=="GET"&&e.method!=="HEAD"){switch(e.referrerPolicy){case"no-referrer":A=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":e.origin&&ju(e.origin)&&!ju(Ns(e))&&(A=null);break;case"same-origin":rc(e,Ns(e))||(A=null);break;default:}A&&e.headersList.append("origin",A)}}function kU(e){return lU.now()}function SU(e){return{startTime:e.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:e.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function FU(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function NU(e){return{referrerPolicy:e.referrerPolicy}}function xU(e){let A=e.referrerPolicy;zn(A);let t=null;if(e.referrer==="client"){let o=gU();if(!o||o.origin==="null")return"no-referrer";t=new URL(o)}else e.referrer instanceof URL&&(t=e.referrer);let r=Wu(t),n=Wu(t,!0);r.toString().length>4096&&(r=n);let i=rc(e,r),s=Fs(r)&&!Fs(e.url);switch(A){case"origin":return n??Wu(t,!0);case"unsafe-url":return r;case"same-origin":return i?n:"no-referrer";case"origin-when-cross-origin":return i?r:n;case"strict-origin-when-cross-origin":{let o=Ns(e);return rc(r,o)?r:Fs(r)&&!Fs(o)?"no-referrer":n}case"strict-origin":case"no-referrer-when-downgrade":default:return s?"no-referrer":n}}function Wu(e,A){return zn(e instanceof URL),e.protocol==="file:"||e.protocol==="about:"||e.protocol==="blank:"?"no-referrer":(e.username="",e.password="",e.hash="",A&&(e.pathname="",e.search=""),e)}function Fs(e){if(!(e instanceof URL))return!1;if(e.href==="about:blank"||e.href==="about:srcdoc"||e.protocol==="data:"||e.protocol==="file:")return!0;return A(e.origin);function A(t){if(t==null||t==="null")return!1;let r=new URL(t);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}function LU(e,A){if(tc===void 0)return!0;let t=$B(A);if(t==="no metadata"||t.length===0)return!0;let r=TU(t),n=MU(t,r);for(let i of n){let s=i.algo,o=i.hash,a=tc.createHash(s).update(e).digest("base64");if(a[a.length-1]==="="&&(a[a.length-2]==="="?a=a.slice(0,-2):a=a.slice(0,-1)),vU(a,o))return!0}return!1}var UU=/(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function $B(e){let A=[],t=!0;for(let r of e.split(" ")){t=!1;let n=UU.exec(r);if(n===null||n.groups===void 0||n.groups.algo===void 0)continue;let i=n.groups.algo.toLowerCase();KB.includes(i)&&A.push(n.groups)}return t===!0?"no metadata":A}function TU(e){let A=e[0].algo;if(A[3]==="5")return A;for(let t=1;t{e=r,A=n}),resolve:e,reject:A}}function JU(e){return e.controller.state==="aborted"}function YU(e){return e.controller.state==="aborted"||e.controller.state==="terminated"}var Ku={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"};Object.setPrototypeOf(Ku,null);function VU(e){return Ku[e.toLowerCase()]??e}function qU(e){let A=JSON.stringify(e);if(A===void 0)throw new TypeError("Value is not JSON serializable");return zn(typeof A=="string"),A}var OU=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function HU(e,A,t){let r={index:0,kind:t,target:e},n={next(){if(Object.getPrototypeOf(this)!==n)throw new TypeError(`'next' called on an object that does not implement interface ${A} Iterator.`);let{index:i,kind:s,target:o}=r,a=o(),c=a.length;if(i>=c)return{value:void 0,done:!0};let g=a[i];return r.index=i+1,WU(g,s)},[Symbol.toStringTag]:`${A} Iterator`};return Object.setPrototypeOf(n,OU),Object.setPrototypeOf({},n)}function WU(e,A){let t;switch(A){case"key":{t=e[0];break}case"value":{t=e[1];break}case"key+value":{t=e;break}}return{value:t,done:!1}}async function _U(e,A,t){let r=A,n=t,i;try{i=e.stream.getReader()}catch(s){n(s);return}try{let s=await ep(i);r(s)}catch(s){n(s)}}var _u=globalThis.ReadableStream;function jU(e){return _u||(_u=require("stream/web").ReadableStream),e instanceof _u||e[Symbol.toStringTag]==="ReadableStream"&&typeof e.tee=="function"}var KU=65535;function ZU(e){return e.lengthA+String.fromCharCode(t),"")}function XU(e){try{e.close()}catch(A){if(!A.message.includes("Controller is already closed"))throw A}}function zU(e){for(let A=0;AObject.prototype.hasOwnProperty.call(e,A));tp.exports={isAborted:JU,isCancelled:YU,createDeferredPromise:GU,ReadableStreamFrom:hU,toUSVString:EU,tryUpgradeRequestToAPotentiallyTrustworthyURL:PU,coarsenedSharedCurrentTime:kU,determineRequestsReferrer:xU,makePolicyContainer:FU,clonePolicyContainer:NU,appendFetchMetadata:DU,appendRequestOriginHeader:bU,TAOCheck:RU,corsCheck:wU,crossOriginResourcePolicyCheck:yU,createOpaqueTimingInfo:SU,setRequestReferrerPolicyOnRedirect:mU,isValidHTTPToken:XB,requestBadPort:CU,requestCurrentURL:Ns,responseURL:ZB,responseLocationURL:QU,isBlobLike:uU,isURLPotentiallyTrustworthy:Fs,isValidReasonPhrase:IU,sameOrigin:rc,normalizeMethod:VU,serializeJavascriptValueToJSONString:qU,makeIterator:HU,isValidHeaderName:pU,isValidHeaderValue:zB,hasOwn:eT,isErrorLike:fU,fullyReadBody:_U,bytesMatch:LU,isReadableStreamLike:jU,readableStreamClose:XU,isomorphicEncode:zU,isomorphicDecode:ZU,urlIsLocal:$U,urlHasHttpsScheme:ju,urlIsHttpHttpsScheme:Ap,readAllBytes:ep,normalizeMethodRecord:Ku,parseMetadata:$B}});var qt=Q((hj,rp)=>{"use strict";rp.exports={kUrl:Symbol("url"),kHeaders:Symbol("headers"),kSignal:Symbol("signal"),kState:Symbol("state"),kGuard:Symbol("guard"),kRealm:Symbol("realm")}});var iA=Q((dj,ip)=>{"use strict";var{types:It}=require("util"),{hasOwn:np,toUSVString:AT}=YA(),R={};R.converters={};R.util={};R.errors={};R.errors.exception=function(e){return new TypeError(`${e.header}: ${e.message}`)};R.errors.conversionFailed=function(e){let A=e.types.length===1?"":" one of",t=`${e.argument} could not be converted to${A}: ${e.types.join(", ")}.`;return R.errors.exception({header:e.prefix,message:t})};R.errors.invalidArgument=function(e){return R.errors.exception({header:e.prefix,message:`"${e.value}" is an invalid ${e.type}.`})};R.brandCheck=function(e,A,t=void 0){if(t?.strict!==!1&&!(e instanceof A))throw new TypeError("Illegal invocation");return e?.[Symbol.toStringTag]===A.prototype[Symbol.toStringTag]};R.argumentLengthCheck=function({length:e},A,t){if(en)throw R.errors.exception({header:"Integer conversion",message:`Value must be between ${i}-${n}, got ${s}.`});return s}return!Number.isNaN(s)&&r.clamp===!0?(s=Math.min(Math.max(s,i),n),Math.floor(s)%2===0?s=Math.floor(s):s=Math.ceil(s),s):Number.isNaN(s)||s===0&&Object.is(0,s)||s===Number.POSITIVE_INFINITY||s===Number.NEGATIVE_INFINITY?0:(s=R.util.IntegerPart(s),s=s%Math.pow(2,A),t==="signed"&&s>=Math.pow(2,A)-1?s-Math.pow(2,A):s)};R.util.IntegerPart=function(e){let A=Math.floor(Math.abs(e));return e<0?-1*A:A};R.sequenceConverter=function(e){return A=>{if(R.util.Type(A)!=="Object")throw R.errors.exception({header:"Sequence",message:`Value of type ${R.util.Type(A)} is not an Object.`});let t=A?.[Symbol.iterator]?.(),r=[];if(t===void 0||typeof t.next!="function")throw R.errors.exception({header:"Sequence",message:"Object is not an iterator."});for(;;){let{done:n,value:i}=t.next();if(n)break;r.push(e(i))}return r}};R.recordConverter=function(e,A){return t=>{if(R.util.Type(t)!=="Object")throw R.errors.exception({header:"Record",message:`Value of type ${R.util.Type(t)} is not an Object.`});let r={};if(!It.isProxy(t)){let i=Object.keys(t);for(let s of i){let o=e(s),a=A(t[s]);r[o]=a}return r}let n=Reflect.ownKeys(t);for(let i of n)if(Reflect.getOwnPropertyDescriptor(t,i)?.enumerable){let o=e(i),a=A(t[i]);r[o]=a}return r}};R.interfaceConverter=function(e){return(A,t={})=>{if(t.strict!==!1&&!(A instanceof e))throw R.errors.exception({header:e.name,message:`Expected ${A} to be an instance of ${e.name}.`});return A}};R.dictionaryConverter=function(e){return A=>{let t=R.util.Type(A),r={};if(t==="Null"||t==="Undefined")return r;if(t!=="Object")throw R.errors.exception({header:"Dictionary",message:`Expected ${A} to be one of: Null, Undefined, Object.`});for(let n of e){let{key:i,defaultValue:s,required:o,converter:a}=n;if(o===!0&&!np(A,i))throw R.errors.exception({header:"Dictionary",message:`Missing required key "${i}".`});let c=A[i],g=np(n,"defaultValue");if(g&&c!==null&&(c=c??s),o||g||c!==void 0){if(c=a(c),n.allowedValues&&!n.allowedValues.includes(c))throw R.errors.exception({header:"Dictionary",message:`${c} is not an accepted type. Expected one of ${n.allowedValues.join(", ")}.`});r[i]=c}}return r}};R.nullableConverter=function(e){return A=>A===null?A:e(A)};R.converters.DOMString=function(e,A={}){if(e===null&&A.legacyNullToEmptyString)return"";if(typeof e=="symbol")throw new TypeError("Could not convert argument of type symbol to string.");return String(e)};R.converters.ByteString=function(e){let A=R.converters.DOMString(e);for(let t=0;t255)throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${t} has a value of ${A.charCodeAt(t)} which is greater than 255.`);return A};R.converters.USVString=AT;R.converters.boolean=function(e){return!!e};R.converters.any=function(e){return e};R.converters["long long"]=function(e){return R.util.ConvertToInt(e,64,"signed")};R.converters["unsigned long long"]=function(e){return R.util.ConvertToInt(e,64,"unsigned")};R.converters["unsigned long"]=function(e){return R.util.ConvertToInt(e,32,"unsigned")};R.converters["unsigned short"]=function(e,A){return R.util.ConvertToInt(e,16,"unsigned",A)};R.converters.ArrayBuffer=function(e,A={}){if(R.util.Type(e)!=="Object"||!It.isAnyArrayBuffer(e))throw R.errors.conversionFailed({prefix:`${e}`,argument:`${e}`,types:["ArrayBuffer"]});if(A.allowShared===!1&&It.isSharedArrayBuffer(e))throw R.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});return e};R.converters.TypedArray=function(e,A,t={}){if(R.util.Type(e)!=="Object"||!It.isTypedArray(e)||e.constructor.name!==A.name)throw R.errors.conversionFailed({prefix:`${A.name}`,argument:`${e}`,types:[A.name]});if(t.allowShared===!1&&It.isSharedArrayBuffer(e.buffer))throw R.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});return e};R.converters.DataView=function(e,A={}){if(R.util.Type(e)!=="Object"||!It.isDataView(e))throw R.errors.exception({header:"DataView",message:"Object is not a DataView."});if(A.allowShared===!1&&It.isSharedArrayBuffer(e.buffer))throw R.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});return e};R.converters.BufferSource=function(e,A={}){if(It.isAnyArrayBuffer(e))return R.converters.ArrayBuffer(e,A);if(It.isTypedArray(e))return R.converters.TypedArray(e,e.constructor);if(It.isDataView(e))return R.converters.DataView(e,A);throw new TypeError(`Could not convert ${e} to a BufferSource.`)};R.converters["sequence"]=R.sequenceConverter(R.converters.ByteString);R.converters["sequence>"]=R.sequenceConverter(R.converters["sequence"]);R.converters["record"]=R.recordConverter(R.converters.ByteString,R.converters.ByteString);ip.exports={webidl:R}});var $A=Q((Qj,lp)=>{"use strict";var ic=require("assert"),{atob:tT}=require("buffer"),{isomorphicDecode:rT}=YA(),nT=new TextEncoder,nc=/^[!#$%&'*+-.^_|~A-Za-z0-9]+$/,iT=/(\u000A|\u000D|\u0009|\u0020)/,sT=/[\u0009|\u0020-\u007E|\u0080-\u00FF]/;function oT(e){ic(e.protocol==="data:");let A=ap(e,!0);A=A.slice(5);let t={position:0},r=$n(",",A,t),n=r.length;if(r=lT(r,!0,!0),t.position>=A.length)return"failure";t.position++;let i=A.slice(n+1),s=cp(i);if(/;(\u0020){0,}base64$/i.test(r)){let a=rT(s);if(s=cT(a),s==="failure")return"failure";r=r.slice(0,-6),r=r.replace(/(\u0020)+$/,""),r=r.slice(0,-1)}r.startsWith(";")&&(r="text/plain"+r);let o=Xu(r);return o==="failure"&&(o=Xu("text/plain;charset=US-ASCII")),{mimeType:o,body:s}}function ap(e,A=!1){if(!A)return e.href;let t=e.href,r=e.hash.length;return r===0?t:t.substring(0,t.length-r)}function sc(e,A,t){let r="";for(;t.positione.length)return"failure";A.position++;let r=$n(";",e,A);if(r=Zu(r,!1,!0),r.length===0||!nc.test(r))return"failure";let n=t.toLowerCase(),i=r.toLowerCase(),s={type:n,subtype:i,parameters:new Map,essence:`${n}/${i}`};for(;A.positioniT.test(c),e,A);let o=sc(c=>c!==";"&&c!=="=",e,A);if(o=o.toLowerCase(),A.positione.length)break;let a=null;if(e[A.position]==='"')a=gp(e,A,!0),$n(";",e,A);else if(a=$n(";",e,A),a=Zu(a,!1,!0),a.length===0)continue;o.length!==0&&nc.test(o)&&(a.length===0||sT.test(a))&&!s.parameters.has(o)&&s.parameters.set(o,a)}return s}function cT(e){if(e=e.replace(/[\u0009\u000A\u000C\u000D\u0020]/g,""),e.length%4===0&&(e=e.replace(/=?=$/,"")),e.length%4===1||/[^+/0-9A-Za-z]/.test(e))return"failure";let A=tT(e),t=new Uint8Array(A.length);for(let r=0;rs!=='"'&&s!=="\\",e,A),!(A.position>=e.length);){let i=e[A.position];if(A.position++,i==="\\"){if(A.position>=e.length){n+="\\";break}n+=e[A.position],A.position++}else{ic(i==='"');break}}return t?n:e.slice(r,A.position)}function gT(e){ic(e!=="failure");let{parameters:A,essence:t}=e,r=t;for(let[n,i]of A.entries())r+=";",r+=n,r+="=",nc.test(i)||(i=i.replace(/(\\|")/g,"\\$1"),i='"'+i,i+='"'),r+=i;return r}function sp(e){return e==="\r"||e===` +`||e===" "||e===" "}function Zu(e,A=!0,t=!0){let r=0,n=e.length-1;if(A)for(;r0&&sp(e[n]);n--);return e.slice(r,n+1)}function op(e){return e==="\r"||e===` +`||e===" "||e==="\f"||e===" "}function lT(e,A=!0,t=!0){let r=0,n=e.length-1;if(A)for(;r0&&op(e[n]);n--);return e.slice(r,n+1)}lp.exports={dataURLProcessor:oT,URLSerializer:ap,collectASequenceOfCodePoints:sc,collectASequenceOfCodePointsFast:$n,stringPercentDecode:cp,parseMIMEType:Xu,collectAnHTTPQuotedString:gp,serializeAMimeType:gT}});var oc=Q((Cj,Qp)=>{"use strict";var{Blob:hp,File:up}=require("buffer"),{types:zu}=require("util"),{kState:DA}=qt(),{isBlobLike:dp}=YA(),{webidl:te}=iA(),{parseMIMEType:uT,serializeAMimeType:ET}=$A(),{kEnumerableProperty:Ep}=W(),hT=new TextEncoder,xs=class e extends hp{constructor(A,t,r={}){te.argumentLengthCheck(arguments,2,{header:"File constructor"}),A=te.converters["sequence"](A),t=te.converters.USVString(t),r=te.converters.FilePropertyBag(r);let n=t,i=r.type,s;e:{if(i){if(i=uT(i),i==="failure"){i="";break e}i=ET(i).toLowerCase()}s=r.lastModified}super(dT(A,r),{type:i}),this[DA]={name:n,lastModified:s,type:i}}get name(){return te.brandCheck(this,e),this[DA].name}get lastModified(){return te.brandCheck(this,e),this[DA].lastModified}get type(){return te.brandCheck(this,e),this[DA].type}},$u=class e{constructor(A,t,r={}){let n=t,i=r.type,s=r.lastModified??Date.now();this[DA]={blobLike:A,name:n,type:i,lastModified:s}}stream(...A){return te.brandCheck(this,e),this[DA].blobLike.stream(...A)}arrayBuffer(...A){return te.brandCheck(this,e),this[DA].blobLike.arrayBuffer(...A)}slice(...A){return te.brandCheck(this,e),this[DA].blobLike.slice(...A)}text(...A){return te.brandCheck(this,e),this[DA].blobLike.text(...A)}get size(){return te.brandCheck(this,e),this[DA].blobLike.size}get type(){return te.brandCheck(this,e),this[DA].blobLike.type}get name(){return te.brandCheck(this,e),this[DA].name}get lastModified(){return te.brandCheck(this,e),this[DA].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(xs.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:Ep,lastModified:Ep});te.converters.Blob=te.interfaceConverter(hp);te.converters.BlobPart=function(e,A){if(te.util.Type(e)==="Object"){if(dp(e))return te.converters.Blob(e,{strict:!1});if(ArrayBuffer.isView(e)||zu.isAnyArrayBuffer(e))return te.converters.BufferSource(e,A)}return te.converters.USVString(e,A)};te.converters["sequence"]=te.sequenceConverter(te.converters.BlobPart);te.converters.FilePropertyBag=te.dictionaryConverter([{key:"lastModified",converter:te.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:te.converters.DOMString,defaultValue:""},{key:"endings",converter:e=>(e=te.converters.DOMString(e),e=e.toLowerCase(),e!=="native"&&(e="transparent"),e),defaultValue:"transparent"}]);function dT(e,A){let t=[];for(let r of e)if(typeof r=="string"){let n=r;A.endings==="native"&&(n=QT(n)),t.push(hT.encode(n))}else zu.isAnyArrayBuffer(r)||zu.isTypedArray(r)?r.buffer?t.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):t.push(new Uint8Array(r)):dp(r)&&t.push(r);return t}function QT(e){let A=` +`;return process.platform==="win32"&&(A=`\r +`),e.replace(/\r?\n/g,A)}function CT(e){return up&&e instanceof up||e instanceof xs||e&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&e[Symbol.toStringTag]==="File"}Qp.exports={File:xs,FileLike:$u,isFileLike:CT}});var cc=Q((fj,pp)=>{"use strict";var{isBlobLike:ac,toUSVString:fT,makeIterator:eE}=YA(),{kState:$e}=qt(),{File:Bp,FileLike:Cp,isFileLike:IT}=oc(),{webidl:re}=iA(),{Blob:BT,File:AE}=require("buffer"),fp=AE??Bp,ei=class e{constructor(A){if(A!==void 0)throw re.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[$e]=[]}append(A,t,r=void 0){if(re.brandCheck(this,e),re.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!ac(t))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");A=re.converters.USVString(A),t=ac(t)?re.converters.Blob(t,{strict:!1}):re.converters.USVString(t),r=arguments.length===3?re.converters.USVString(r):void 0;let n=Ip(A,t,r);this[$e].push(n)}delete(A){re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),A=re.converters.USVString(A),this[$e]=this[$e].filter(t=>t.name!==A)}get(A){re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.get"}),A=re.converters.USVString(A);let t=this[$e].findIndex(r=>r.name===A);return t===-1?null:this[$e][t].value}getAll(A){return re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),A=re.converters.USVString(A),this[$e].filter(t=>t.name===A).map(t=>t.value)}has(A){return re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.has"}),A=re.converters.USVString(A),this[$e].findIndex(t=>t.name===A)!==-1}set(A,t,r=void 0){if(re.brandCheck(this,e),re.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!ac(t))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");A=re.converters.USVString(A),t=ac(t)?re.converters.Blob(t,{strict:!1}):re.converters.USVString(t),r=arguments.length===3?fT(r):void 0;let n=Ip(A,t,r),i=this[$e].findIndex(s=>s.name===A);i!==-1?this[$e]=[...this[$e].slice(0,i),n,...this[$e].slice(i+1).filter(s=>s.name!==A)]:this[$e].push(n)}entries(){return re.brandCheck(this,e),eE(()=>this[$e].map(A=>[A.name,A.value]),"FormData","key+value")}keys(){return re.brandCheck(this,e),eE(()=>this[$e].map(A=>[A.name,A.value]),"FormData","key")}values(){return re.brandCheck(this,e),eE(()=>this[$e].map(A=>[A.name,A.value]),"FormData","value")}forEach(A,t=globalThis){if(re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof A!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,n]of this)A.apply(t,[n,r,this])}};ei.prototype[Symbol.iterator]=ei.prototype.entries;Object.defineProperties(ei.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function Ip(e,A,t){if(e=Buffer.from(e).toString("utf8"),typeof A=="string")A=Buffer.from(A).toString("utf8");else if(IT(A)||(A=A instanceof BT?new fp([A],"blob",{type:A.type}):new Cp(A,"blob",{type:A.type})),t!==void 0){let r={type:A.type,lastModified:A.lastModified};A=AE&&A instanceof AE||A instanceof Bp?new fp([A],t,r):new Cp(A,t,r)}return{name:e,value:A}}pp.exports={FormData:ei}});var Ls=Q((Ij,Fp)=>{"use strict";var pT=GB(),Ai=W(),{ReadableStreamFrom:mT,isBlobLike:mp,isReadableStreamLike:yT,readableStreamClose:wT,createDeferredPromise:RT,fullyReadBody:DT}=YA(),{FormData:yp}=cc(),{kState:Ht}=qt(),{webidl:tE}=iA(),{DOMException:Dp,structuredClone:bT}=mr(),{Blob:kT,File:ST}=require("buffer"),{kBodyUsed:FT}=de(),rE=require("assert"),{isErrored:NT}=W(),{isUint8Array:bp,isArrayBuffer:xT}=require("util/types"),{File:LT}=oc(),{parseMIMEType:UT,serializeAMimeType:TT}=$A(),Ot=globalThis.ReadableStream,wp=ST??LT,gc=new TextEncoder,MT=new TextDecoder;function kp(e,A=!1){Ot||(Ot=require("stream/web").ReadableStream);let t=null;e instanceof Ot?t=e:mp(e)?t=e.stream():t=new Ot({async pull(a){a.enqueue(typeof n=="string"?gc.encode(n):n),queueMicrotask(()=>wT(a))},start(){},type:void 0}),rE(yT(t));let r=null,n=null,i=null,s=null;if(typeof e=="string")n=e,s="text/plain;charset=UTF-8";else if(e instanceof URLSearchParams)n=e.toString(),s="application/x-www-form-urlencoded;charset=UTF-8";else if(xT(e))n=new Uint8Array(e.slice());else if(ArrayBuffer.isView(e))n=new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));else if(Ai.isFormDataLike(e)){let a=`----formdata-undici-0${`${Math.floor(Math.random()*1e11)}`.padStart(11,"0")}`,c=`--${a}\r +Content-Disposition: form-data`;let g=C=>C.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),l=C=>C.replace(/\r?\n|\r/g,`\r +`),u=[],E=new Uint8Array([13,10]);i=0;let h=!1;for(let[C,I]of e)if(typeof I=="string"){let p=gc.encode(c+`; name="${g(l(C))}"\r +\r +${l(I)}\r +`);u.push(p),i+=p.byteLength}else{let p=gc.encode(`${c}; name="${g(l(C))}"`+(I.name?`; filename="${g(I.name)}"`:"")+`\r +Content-Type: ${I.type||"application/octet-stream"}\r +\r +`);u.push(p,I,E),typeof I.size=="number"?i+=p.byteLength+I.size+E.byteLength:h=!0}let d=gc.encode(`--${a}--`);u.push(d),i+=d.byteLength,h&&(i=null),n=e,r=async function*(){for(let C of u)C.stream?yield*C.stream():yield C},s="multipart/form-data; boundary="+a}else if(mp(e))n=e,i=e.size,e.type&&(s=e.type);else if(typeof e[Symbol.asyncIterator]=="function"){if(A)throw new TypeError("keepalive");if(Ai.isDisturbed(e)||e.locked)throw new TypeError("Response body object should not be disturbed or locked");t=e instanceof Ot?e:mT(e)}if((typeof n=="string"||Ai.isBuffer(n))&&(i=Buffer.byteLength(n)),r!=null){let a;t=new Ot({async start(){a=r(e)[Symbol.asyncIterator]()},async pull(c){let{value:g,done:l}=await a.next();return l?queueMicrotask(()=>{c.close()}):NT(t)||c.enqueue(new Uint8Array(g)),c.desiredSize>0},async cancel(c){await a.return()},type:void 0})}return[{stream:t,source:n,length:i},s]}function vT(e,A=!1){return Ot||(Ot=require("stream/web").ReadableStream),e instanceof Ot&&(rE(!Ai.isDisturbed(e),"The body has already been consumed."),rE(!e.locked,"The stream is locked.")),kp(e,A)}function PT(e){let[A,t]=e.stream.tee(),r=bT(t,{transfer:[t]}),[,n]=r.tee();return e.stream=A,{stream:n,length:e.length,source:e.source}}async function*Rp(e){if(e)if(bp(e))yield e;else{let A=e.stream;if(Ai.isDisturbed(A))throw new TypeError("The body has already been consumed.");if(A.locked)throw new TypeError("The stream is locked.");A[FT]=!0,yield*A}}function nE(e){if(e.aborted)throw new Dp("The operation was aborted.","AbortError")}function GT(e){return{blob(){return lc(this,t=>{let r=qT(this);return r==="failure"?r="":r&&(r=TT(r)),new kT([t],{type:r})},e)},arrayBuffer(){return lc(this,t=>new Uint8Array(t).buffer,e)},text(){return lc(this,Sp,e)},json(){return lc(this,VT,e)},async formData(){tE.brandCheck(this,e),nE(this[Ht]);let t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){let r={};for(let[o,a]of this.headers)r[o.toLowerCase()]=a;let n=new yp,i;try{i=new pT({headers:r,preservePath:!0})}catch(o){throw new Dp(`${o}`,"AbortError")}i.on("field",(o,a)=>{n.append(o,a)}),i.on("file",(o,a,c,g,l)=>{let u=[];if(g==="base64"||g.toLowerCase()==="base64"){let E="";a.on("data",h=>{E+=h.toString().replace(/[\r\n]/gm,"");let d=E.length-E.length%4;u.push(Buffer.from(E.slice(0,d),"base64")),E=E.slice(d)}),a.on("end",()=>{u.push(Buffer.from(E,"base64")),n.append(o,new wp(u,c,{type:l}))})}else a.on("data",E=>{u.push(E)}),a.on("end",()=>{n.append(o,new wp(u,c,{type:l}))})});let s=new Promise((o,a)=>{i.on("finish",o),i.on("error",c=>a(new TypeError(c)))});if(this.body!==null)for await(let o of Rp(this[Ht].body))i.write(o);return i.end(),await s,n}else if(/application\/x-www-form-urlencoded/.test(t)){let r;try{let i="",s=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let o of Rp(this[Ht].body)){if(!bp(o))throw new TypeError("Expected Uint8Array chunk");i+=s.decode(o,{stream:!0})}i+=s.decode(),r=new URLSearchParams(i)}catch(i){throw Object.assign(new TypeError,{cause:i})}let n=new yp;for(let[i,s]of r)n.append(i,s);return n}else throw await Promise.resolve(),nE(this[Ht]),tE.errors.exception({header:`${e.name}.formData`,message:"Could not parse content as FormData."})}}}function JT(e){Object.assign(e.prototype,GT(e))}async function lc(e,A,t){if(tE.brandCheck(e,t),nE(e[Ht]),YT(e[Ht].body))throw new TypeError("Body is unusable");let r=RT(),n=s=>r.reject(s),i=s=>{try{r.resolve(A(s))}catch(o){n(o)}};return e[Ht].body==null?(i(new Uint8Array),r.promise):(await DT(e[Ht].body,i,n),r.promise)}function YT(e){return e!=null&&(e.stream.locked||Ai.isDisturbed(e.stream))}function Sp(e){return e.length===0?"":(e[0]===239&&e[1]===187&&e[2]===191&&(e=e.subarray(3)),MT.decode(e))}function VT(e){return JSON.parse(Sp(e))}function qT(e){let{headersList:A}=e[Ht],t=A.get("content-type");return t===null?"failure":UT(t)}Fp.exports={extractBody:kp,safelyExtractBody:vT,cloneBody:PT,mixinBody:JT}});var Up=Q((Bj,Lp)=>{"use strict";var{InvalidArgumentError:Qe,NotSupportedError:OT}=le(),Wt=require("assert"),{kHTTP2BuildRequest:HT,kHTTP2CopyHeaders:WT,kHTTP1BuildRequest:_T}=de(),QA=W(),Np=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,xp=/[^\t\x20-\x7e\x80-\xff]/,jT=/[^\u0021-\u00ff]/,et=Symbol("handler"),Te={},iE;try{let e=require("diagnostics_channel");Te.create=e.channel("undici:request:create"),Te.bodySent=e.channel("undici:request:bodySent"),Te.headers=e.channel("undici:request:headers"),Te.trailers=e.channel("undici:request:trailers"),Te.error=e.channel("undici:request:error")}catch{Te.create={hasSubscribers:!1},Te.bodySent={hasSubscribers:!1},Te.headers={hasSubscribers:!1},Te.trailers={hasSubscribers:!1},Te.error={hasSubscribers:!1}}var sE=class e{constructor(A,{path:t,method:r,body:n,headers:i,query:s,idempotent:o,blocking:a,upgrade:c,headersTimeout:g,bodyTimeout:l,reset:u,throwOnError:E,expectContinue:h},d){if(typeof t!="string")throw new Qe("path must be a string");if(t[0]!=="/"&&!(t.startsWith("http://")||t.startsWith("https://"))&&r!=="CONNECT")throw new Qe("path must be an absolute URL or start with a slash");if(jT.exec(t)!==null)throw new Qe("invalid request path");if(typeof r!="string")throw new Qe("method must be a string");if(Np.exec(r)===null)throw new Qe("invalid request method");if(c&&typeof c!="string")throw new Qe("upgrade must be a string");if(g!=null&&(!Number.isFinite(g)||g<0))throw new Qe("invalid headersTimeout");if(l!=null&&(!Number.isFinite(l)||l<0))throw new Qe("invalid bodyTimeout");if(u!=null&&typeof u!="boolean")throw new Qe("invalid reset");if(h!=null&&typeof h!="boolean")throw new Qe("invalid expectContinue");if(this.headersTimeout=g,this.bodyTimeout=l,this.throwOnError=E===!0,this.method=r,this.abort=null,n==null)this.body=null;else if(QA.isStream(n)){this.body=n;let C=this.body._readableState;(!C||!C.autoDestroy)&&(this.endHandler=function(){QA.destroy(this)},this.body.on("end",this.endHandler)),this.errorHandler=I=>{this.abort?this.abort(I):this.error=I},this.body.on("error",this.errorHandler)}else if(QA.isBuffer(n))this.body=n.byteLength?n:null;else if(ArrayBuffer.isView(n))this.body=n.buffer.byteLength?Buffer.from(n.buffer,n.byteOffset,n.byteLength):null;else if(n instanceof ArrayBuffer)this.body=n.byteLength?Buffer.from(n):null;else if(typeof n=="string")this.body=n.length?Buffer.from(n):null;else if(QA.isFormDataLike(n)||QA.isIterable(n)||QA.isBlobLike(n))this.body=n;else throw new Qe("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=c||null,this.path=s?QA.buildURL(t,s):t,this.origin=A,this.idempotent=o??(r==="HEAD"||r==="GET"),this.blocking=a??!1,this.reset=u??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers="",this.expectContinue=h??!1,Array.isArray(i)){if(i.length%2!==0)throw new Qe("headers array must be even");for(let C=0;C{"use strict";var KT=require("events"),oE=class extends KT{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};Tp.exports=oE});var Ms=Q((mj,Mp)=>{"use strict";var ZT=uc(),{ClientDestroyedError:aE,ClientClosedError:XT,InvalidArgumentError:ti}=le(),{kDestroy:zT,kClose:$T,kDispatch:cE,kInterceptors:Hr}=de(),ri=Symbol("destroyed"),Ts=Symbol("closed"),_t=Symbol("onDestroyed"),ni=Symbol("onClosed"),Ec=Symbol("Intercepted Dispatch"),gE=class extends ZT{constructor(){super(),this[ri]=!1,this[_t]=null,this[Ts]=!1,this[ni]=[]}get destroyed(){return this[ri]}get closed(){return this[Ts]}get interceptors(){return this[Hr]}set interceptors(A){if(A){for(let t=A.length-1;t>=0;t--)if(typeof this[Hr][t]!="function")throw new ti("interceptor must be an function")}this[Hr]=A}close(A){if(A===void 0)return new Promise((r,n)=>{this.close((i,s)=>i?n(i):r(s))});if(typeof A!="function")throw new ti("invalid callback");if(this[ri]){queueMicrotask(()=>A(new aE,null));return}if(this[Ts]){this[ni]?this[ni].push(A):queueMicrotask(()=>A(null,null));return}this[Ts]=!0,this[ni].push(A);let t=()=>{let r=this[ni];this[ni]=null;for(let n=0;nthis.destroy()).then(()=>{queueMicrotask(t)})}destroy(A,t){if(typeof A=="function"&&(t=A,A=null),t===void 0)return new Promise((n,i)=>{this.destroy(A,(s,o)=>s?i(s):n(o))});if(typeof t!="function")throw new ti("invalid callback");if(this[ri]){this[_t]?this[_t].push(t):queueMicrotask(()=>t(null,null));return}A||(A=new aE),this[ri]=!0,this[_t]=this[_t]||[],this[_t].push(t);let r=()=>{let n=this[_t];this[_t]=null;for(let i=0;i{queueMicrotask(r)})}[Ec](A,t){if(!this[Hr]||this[Hr].length===0)return this[Ec]=this[cE],this[cE](A,t);let r=this[cE].bind(this);for(let n=this[Hr].length-1;n>=0;n--)r=this[Hr][n](r);return this[Ec]=r,r(A,t)}dispatch(A,t){if(!t||typeof t!="object")throw new ti("handler must be an object");try{if(!A||typeof A!="object")throw new ti("opts must be an object.");if(this[ri]||this[_t])throw new aE;if(this[Ts])throw new XT;return this[Ec](A,t)}catch(r){if(typeof t.onError!="function")throw new ti("invalid onError method");return t.onError(r),!1}}};Mp.exports=gE});var vs=Q((Rj,Gp)=>{"use strict";var eM=require("net"),vp=require("assert"),Pp=W(),{InvalidArgumentError:AM,ConnectTimeoutError:tM}=le(),lE,uE;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?uE=class{constructor(A){this._maxCachedSessions=A,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(t=>{if(this._sessionCache.size=this._maxCachedSessions){let{value:r}=this._sessionCache.keys().next();this._sessionCache.delete(r)}this._sessionCache.set(A,t)}}};function rM({allowH2:e,maxCachedSessions:A,socketPath:t,timeout:r,...n}){if(A!=null&&(!Number.isInteger(A)||A<0))throw new AM("maxCachedSessions must be a positive integer or zero");let i={path:t,...n},s=new uE(A??100);return r=r??1e4,e=e??!1,function({hostname:a,host:c,protocol:g,port:l,servername:u,localAddress:E,httpSocket:h},d){let C;if(g==="https:"){lE||(lE=require("tls")),u=u||i.servername||Pp.getServerName(c)||null;let p=u||a,w=s.get(p)||null;vp(p),C=lE.connect({highWaterMark:16384,...i,servername:u,session:w,localAddress:E,ALPNProtocols:e?["http/1.1","h2"]:["http/1.1"],socket:h,port:l||443,host:a}),C.on("session",function(m){s.set(p,m)})}else vp(!h,"httpSocket can only be sent on TLS update"),C=eM.connect({highWaterMark:64*1024,...i,localAddress:E,port:l||80,host:a});if(i.keepAlive==null||i.keepAlive){let p=i.keepAliveInitialDelay===void 0?6e4:i.keepAliveInitialDelay;C.setKeepAlive(!0,p)}let I=nM(()=>iM(C),r);return C.setNoDelay(!0).once(g==="https:"?"secureConnect":"connect",function(){if(I(),d){let p=d;d=null,p(null,this)}}).on("error",function(p){if(I(),d){let w=d;d=null,w(p)}}),C}}function nM(e,A){if(!A)return()=>{};let t=null,r=null,n=setTimeout(()=>{t=setImmediate(()=>{process.platform==="win32"?r=setImmediate(()=>e()):e()})},A);return()=>{clearTimeout(n),clearImmediate(t),clearImmediate(r)}}function iM(e){Pp.destroy(e,new tM)}Gp.exports=rM});var Jp=Q(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.enumToMap=void 0;function sM(e){let A={};return Object.keys(e).forEach(t=>{let r=e[t];typeof r=="number"&&(A[t]=r)}),A}hc.enumToMap=sM});var Yp=Q(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});y.SPECIAL_HEADERS=y.HEADER_STATE=y.MINOR=y.MAJOR=y.CONNECTION_TOKEN_CHARS=y.HEADER_CHARS=y.TOKEN=y.STRICT_TOKEN=y.HEX=y.URL_CHAR=y.STRICT_URL_CHAR=y.USERINFO_CHARS=y.MARK=y.ALPHANUM=y.NUM=y.HEX_MAP=y.NUM_MAP=y.ALPHA=y.FINISH=y.H_METHOD_MAP=y.METHOD_MAP=y.METHODS_RTSP=y.METHODS_ICE=y.METHODS_HTTP=y.METHODS=y.LENIENT_FLAGS=y.FLAGS=y.TYPE=y.ERROR=void 0;var oM=Jp(),aM;(function(e){e[e.OK=0]="OK",e[e.INTERNAL=1]="INTERNAL",e[e.STRICT=2]="STRICT",e[e.LF_EXPECTED=3]="LF_EXPECTED",e[e.UNEXPECTED_CONTENT_LENGTH=4]="UNEXPECTED_CONTENT_LENGTH",e[e.CLOSED_CONNECTION=5]="CLOSED_CONNECTION",e[e.INVALID_METHOD=6]="INVALID_METHOD",e[e.INVALID_URL=7]="INVALID_URL",e[e.INVALID_CONSTANT=8]="INVALID_CONSTANT",e[e.INVALID_VERSION=9]="INVALID_VERSION",e[e.INVALID_HEADER_TOKEN=10]="INVALID_HEADER_TOKEN",e[e.INVALID_CONTENT_LENGTH=11]="INVALID_CONTENT_LENGTH",e[e.INVALID_CHUNK_SIZE=12]="INVALID_CHUNK_SIZE",e[e.INVALID_STATUS=13]="INVALID_STATUS",e[e.INVALID_EOF_STATE=14]="INVALID_EOF_STATE",e[e.INVALID_TRANSFER_ENCODING=15]="INVALID_TRANSFER_ENCODING",e[e.CB_MESSAGE_BEGIN=16]="CB_MESSAGE_BEGIN",e[e.CB_HEADERS_COMPLETE=17]="CB_HEADERS_COMPLETE",e[e.CB_MESSAGE_COMPLETE=18]="CB_MESSAGE_COMPLETE",e[e.CB_CHUNK_HEADER=19]="CB_CHUNK_HEADER",e[e.CB_CHUNK_COMPLETE=20]="CB_CHUNK_COMPLETE",e[e.PAUSED=21]="PAUSED",e[e.PAUSED_UPGRADE=22]="PAUSED_UPGRADE",e[e.PAUSED_H2_UPGRADE=23]="PAUSED_H2_UPGRADE",e[e.USER=24]="USER"})(aM=y.ERROR||(y.ERROR={}));var cM;(function(e){e[e.BOTH=0]="BOTH",e[e.REQUEST=1]="REQUEST",e[e.RESPONSE=2]="RESPONSE"})(cM=y.TYPE||(y.TYPE={}));var gM;(function(e){e[e.CONNECTION_KEEP_ALIVE=1]="CONNECTION_KEEP_ALIVE",e[e.CONNECTION_CLOSE=2]="CONNECTION_CLOSE",e[e.CONNECTION_UPGRADE=4]="CONNECTION_UPGRADE",e[e.CHUNKED=8]="CHUNKED",e[e.UPGRADE=16]="UPGRADE",e[e.CONTENT_LENGTH=32]="CONTENT_LENGTH",e[e.SKIPBODY=64]="SKIPBODY",e[e.TRAILING=128]="TRAILING",e[e.TRANSFER_ENCODING=512]="TRANSFER_ENCODING"})(gM=y.FLAGS||(y.FLAGS={}));var lM;(function(e){e[e.HEADERS=1]="HEADERS",e[e.CHUNKED_LENGTH=2]="CHUNKED_LENGTH",e[e.KEEP_ALIVE=4]="KEEP_ALIVE"})(lM=y.LENIENT_FLAGS||(y.LENIENT_FLAGS={}));var S;(function(e){e[e.DELETE=0]="DELETE",e[e.GET=1]="GET",e[e.HEAD=2]="HEAD",e[e.POST=3]="POST",e[e.PUT=4]="PUT",e[e.CONNECT=5]="CONNECT",e[e.OPTIONS=6]="OPTIONS",e[e.TRACE=7]="TRACE",e[e.COPY=8]="COPY",e[e.LOCK=9]="LOCK",e[e.MKCOL=10]="MKCOL",e[e.MOVE=11]="MOVE",e[e.PROPFIND=12]="PROPFIND",e[e.PROPPATCH=13]="PROPPATCH",e[e.SEARCH=14]="SEARCH",e[e.UNLOCK=15]="UNLOCK",e[e.BIND=16]="BIND",e[e.REBIND=17]="REBIND",e[e.UNBIND=18]="UNBIND",e[e.ACL=19]="ACL",e[e.REPORT=20]="REPORT",e[e.MKACTIVITY=21]="MKACTIVITY",e[e.CHECKOUT=22]="CHECKOUT",e[e.MERGE=23]="MERGE",e[e["M-SEARCH"]=24]="M-SEARCH",e[e.NOTIFY=25]="NOTIFY",e[e.SUBSCRIBE=26]="SUBSCRIBE",e[e.UNSUBSCRIBE=27]="UNSUBSCRIBE",e[e.PATCH=28]="PATCH",e[e.PURGE=29]="PURGE",e[e.MKCALENDAR=30]="MKCALENDAR",e[e.LINK=31]="LINK",e[e.UNLINK=32]="UNLINK",e[e.SOURCE=33]="SOURCE",e[e.PRI=34]="PRI",e[e.DESCRIBE=35]="DESCRIBE",e[e.ANNOUNCE=36]="ANNOUNCE",e[e.SETUP=37]="SETUP",e[e.PLAY=38]="PLAY",e[e.PAUSE=39]="PAUSE",e[e.TEARDOWN=40]="TEARDOWN",e[e.GET_PARAMETER=41]="GET_PARAMETER",e[e.SET_PARAMETER=42]="SET_PARAMETER",e[e.REDIRECT=43]="REDIRECT",e[e.RECORD=44]="RECORD",e[e.FLUSH=45]="FLUSH"})(S=y.METHODS||(y.METHODS={}));y.METHODS_HTTP=[S.DELETE,S.GET,S.HEAD,S.POST,S.PUT,S.CONNECT,S.OPTIONS,S.TRACE,S.COPY,S.LOCK,S.MKCOL,S.MOVE,S.PROPFIND,S.PROPPATCH,S.SEARCH,S.UNLOCK,S.BIND,S.REBIND,S.UNBIND,S.ACL,S.REPORT,S.MKACTIVITY,S.CHECKOUT,S.MERGE,S["M-SEARCH"],S.NOTIFY,S.SUBSCRIBE,S.UNSUBSCRIBE,S.PATCH,S.PURGE,S.MKCALENDAR,S.LINK,S.UNLINK,S.PRI,S.SOURCE];y.METHODS_ICE=[S.SOURCE];y.METHODS_RTSP=[S.OPTIONS,S.DESCRIBE,S.ANNOUNCE,S.SETUP,S.PLAY,S.PAUSE,S.TEARDOWN,S.GET_PARAMETER,S.SET_PARAMETER,S.REDIRECT,S.RECORD,S.FLUSH,S.GET,S.POST];y.METHOD_MAP=oM.enumToMap(S);y.H_METHOD_MAP={};Object.keys(y.METHOD_MAP).forEach(e=>{/^H/.test(e)&&(y.H_METHOD_MAP[e]=y.METHOD_MAP[e])});var uM;(function(e){e[e.SAFE=0]="SAFE",e[e.SAFE_WITH_CB=1]="SAFE_WITH_CB",e[e.UNSAFE=2]="UNSAFE"})(uM=y.FINISH||(y.FINISH={}));y.ALPHA=[];for(let e=65;e<=90;e++)y.ALPHA.push(String.fromCharCode(e)),y.ALPHA.push(String.fromCharCode(e+32));y.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};y.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};y.NUM=["0","1","2","3","4","5","6","7","8","9"];y.ALPHANUM=y.ALPHA.concat(y.NUM);y.MARK=["-","_",".","!","~","*","'","(",")"];y.USERINFO_CHARS=y.ALPHANUM.concat(y.MARK).concat(["%",";",":","&","=","+","$",","]);y.STRICT_URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(y.ALPHANUM);y.URL_CHAR=y.STRICT_URL_CHAR.concat([" ","\f"]);for(let e=128;e<=255;e++)y.URL_CHAR.push(e);y.HEX=y.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);y.STRICT_TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(y.ALPHANUM);y.TOKEN=y.STRICT_TOKEN.concat([" "]);y.HEADER_CHARS=[" "];for(let e=32;e<=255;e++)e!==127&&y.HEADER_CHARS.push(e);y.CONNECTION_TOKEN_CHARS=y.HEADER_CHARS.filter(e=>e!==44);y.MAJOR=y.NUM_MAP;y.MINOR=y.MAJOR;var ii;(function(e){e[e.GENERAL=0]="GENERAL",e[e.CONNECTION=1]="CONNECTION",e[e.CONTENT_LENGTH=2]="CONTENT_LENGTH",e[e.TRANSFER_ENCODING=3]="TRANSFER_ENCODING",e[e.UPGRADE=4]="UPGRADE",e[e.CONNECTION_KEEP_ALIVE=5]="CONNECTION_KEEP_ALIVE",e[e.CONNECTION_CLOSE=6]="CONNECTION_CLOSE",e[e.CONNECTION_UPGRADE=7]="CONNECTION_UPGRADE",e[e.TRANSFER_ENCODING_CHUNKED=8]="TRANSFER_ENCODING_CHUNKED"})(ii=y.HEADER_STATE||(y.HEADER_STATE={}));y.SPECIAL_HEADERS={connection:ii.CONNECTION,"content-length":ii.CONTENT_LENGTH,"proxy-connection":ii.CONNECTION,"transfer-encoding":ii.TRANSFER_ENCODING,upgrade:ii.UPGRADE}});var dE=Q((kj,Op)=>{"use strict";var jt=W(),{kBodyUsed:Ps}=de(),hE=require("assert"),{InvalidArgumentError:EM}=le(),hM=require("events"),dM=[300,301,302,303,307,308],Vp=Symbol("body"),dc=class{constructor(A){this[Vp]=A,this[Ps]=!1}async*[Symbol.asyncIterator](){hE(!this[Ps],"disturbed"),this[Ps]=!0,yield*this[Vp]}},EE=class{constructor(A,t,r,n){if(t!=null&&(!Number.isInteger(t)||t<0))throw new EM("maxRedirections must be a positive number");jt.validateHandler(n,r.method,r.upgrade),this.dispatch=A,this.location=null,this.abort=null,this.opts={...r,maxRedirections:0},this.maxRedirections=t,this.handler=n,this.history=[],jt.isStream(this.opts.body)?(jt.bodyLength(this.opts.body)===0&&this.opts.body.on("data",function(){hE(!1)}),typeof this.opts.body.readableDidRead!="boolean"&&(this.opts.body[Ps]=!1,hM.prototype.on.call(this.opts.body,"data",function(){this[Ps]=!0}))):this.opts.body&&typeof this.opts.body.pipeTo=="function"?this.opts.body=new dc(this.opts.body):this.opts.body&&typeof this.opts.body!="string"&&!ArrayBuffer.isView(this.opts.body)&&jt.isIterable(this.opts.body)&&(this.opts.body=new dc(this.opts.body))}onConnect(A){this.abort=A,this.handler.onConnect(A,{history:this.history})}onUpgrade(A,t,r){this.handler.onUpgrade(A,t,r)}onError(A){this.handler.onError(A)}onHeaders(A,t,r,n){if(this.location=this.history.length>=this.maxRedirections||jt.isDisturbed(this.opts.body)?null:QM(A,t),this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return this.handler.onHeaders(A,t,r,n);let{origin:i,pathname:s,search:o}=jt.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),a=o?`${s}${o}`:s;this.opts.headers=CM(this.opts.headers,A===303,this.opts.origin!==i),this.opts.path=a,this.opts.origin=i,this.opts.maxRedirections=0,this.opts.query=null,A===303&&this.opts.method!=="HEAD"&&(this.opts.method="GET",this.opts.body=null)}onData(A){if(!this.location)return this.handler.onData(A)}onComplete(A){this.location?(this.location=null,this.abort=null,this.dispatch(this.opts,this)):this.handler.onComplete(A)}onBodySent(A){this.handler.onBodySent&&this.handler.onBodySent(A)}};function QM(e,A){if(dM.indexOf(e)===-1)return null;for(let t=0;t{"use strict";var fM=dE();function IM({maxRedirections:e}){return A=>function(r,n){let{maxRedirections:i=e}=r;if(!i)return A(r,n);let s=new fM(A,i,r,n);return r={...r,maxRedirections:0},A(r,s)}}Hp.exports=IM});var QE=Q((Fj,Wp)=>{"use strict";Wp.exports="AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKwAv4C/gILIAEiBCACRw3zAUHdASEQDP8DCyABIhAgAkcN3QFBwwEhEAz+AwsgASIBIAJHDZABQfcAIRAM/QMLIAEiASACRw2GAUHvACEQDPwDCyABIgEgAkcNf0HqACEQDPsDCyABIgEgAkcNe0HoACEQDPoDCyABIgEgAkcNeEHmACEQDPkDCyABIgEgAkcNGkEYIRAM+AMLIAEiASACRw0UQRIhEAz3AwsgASIBIAJHDVlBxQAhEAz2AwsgASIBIAJHDUpBPyEQDPUDCyABIgEgAkcNSEE8IRAM9AMLIAEiASACRw1BQTEhEAzzAwsgAC0ALkEBRg3rAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiEA3nASABIQEM9QILAkAgASIBIAJHDQBBBiEQDPADCyAAIAFBAWoiASACELuAgIAAIhAN6AEgASEBDDELIABCADcDIEESIRAM1QMLIAEiECACRw0rQR0hEAztAwsCQCABIgEgAkYNACABQQFqIQFBECEQDNQDC0EHIRAM7AMLIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN5QFBCCEQDOsDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUIRAM0gMLQQkhEAzqAwsgASEBIAApAyBQDeQBIAEhAQzyAgsCQCABIgEgAkcNAEELIRAM6QMLIAAgAUEBaiIBIAIQtoCAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3mASABIQEMDQsgACABIgEgAhC6gICAACIQDecBIAEhAQzwAgsCQCABIgEgAkcNAEEPIRAM5QMLIAEtAAAiEEE7Rg0IIBBBDUcN6AEgAUEBaiEBDO8CCyAAIAEiASACELqAgIAAIhAN6AEgASEBDPICCwNAAkAgAS0AAEHwtYCAAGotAAAiEEEBRg0AIBBBAkcN6wEgACgCBCEQIABBADYCBCAAIBAgAUEBaiIBELmAgIAAIhAN6gEgASEBDPQCCyABQQFqIgEgAkcNAAtBEiEQDOIDCyAAIAEiASACELqAgIAAIhAN6QEgASEBDAoLIAEiASACRw0GQRshEAzgAwsCQCABIgEgAkcNAEEWIRAM4AMLIABBioCAgAA2AgggACABNgIEIAAgASACELiAgIAAIhAN6gEgASEBQSAhEAzGAwsCQCABIgEgAkYNAANAAkAgAS0AAEHwt4CAAGotAAAiEEECRg0AAkAgEEF/ag4E5QHsAQDrAewBCyABQQFqIQFBCCEQDMgDCyABQQFqIgEgAkcNAAtBFSEQDN8DC0EVIRAM3gMLA0ACQCABLQAAQfC5gIAAai0AACIQQQJGDQAgEEF/ag4E3gHsAeAB6wHsAQsgAUEBaiIBIAJHDQALQRghEAzdAwsCQCABIgEgAkYNACAAQYuAgIAANgIIIAAgATYCBCABIQFBByEQDMQDC0EZIRAM3AMLIAFBAWohAQwCCwJAIAEiFCACRw0AQRohEAzbAwsgFCEBAkAgFC0AAEFzag4U3QLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gIA7gILQQAhECAAQQA2AhwgAEGvi4CAADYCECAAQQI2AgwgACAUQQFqNgIUDNoDCwJAIAEtAAAiEEE7Rg0AIBBBDUcN6AEgAUEBaiEBDOUCCyABQQFqIQELQSIhEAy/AwsCQCABIhAgAkcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3TASABIQEM2AELAkAgASIQIAJHDQBBKSEQDLcDCyAQLQAAIgFBIEYNFCABQQlHDdMBIBBBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqIRAMtQMLAkAgASIQIAJHDQBBKyEQDLUDCwJAIBAtAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgECEBDJEDCwJAIAEiASACRw0AQSwhEAy0AwsgAS0AAEEKRw3VASABQQFqIQEMyQILIAEiDiACRw3VAUEvIRAMsgMLA0ACQCABLQAAIhBBIEYNAAJAIBBBdmoOBADcAdwBANoBCyABIQEM4AELIAFBAWoiASACRw0AC0ExIRAMsQMLQTIhECABIhQgAkYNsAMgAiAUayAAKAIAIgFqIRUgFCABa0EDaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfC7gIAAai0AAEcNAQJAIAFBA0cNAEEGIQEMlgMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLEDCyAAQQA2AgAgFCEBDNkBC0EzIRAgASIUIAJGDa8DIAIgFGsgACgCACIBaiEVIBQgAWtBCGohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUH0u4CAAGotAABHDQECQCABQQhHDQBBBSEBDJUDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAywAwsgAEEANgIAIBQhAQzYAQtBNCEQIAEiFCACRg2uAyACIBRrIAAoAgAiAWohFSAUIAFrQQVqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw0BAkAgAUEFRw0AQQchAQyUAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMrwMLIABBADYCACAUIQEM1wELAkAgASIBIAJGDQADQAJAIAEtAABBgL6AgABqLQAAIhBBAUYNACAQQQJGDQogASEBDN0BCyABQQFqIgEgAkcNAAtBMCEQDK4DC0EwIRAMrQMLAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AIBBBdmoOBNkB2gHaAdkB2gELIAFBAWoiASACRw0AC0E4IRAMrQMLQTghEAysAwsDQAJAIAEtAAAiEEEgRg0AIBBBCUcNAwsgAUEBaiIBIAJHDQALQTwhEAyrAwsDQAJAIAEtAAAiEEEgRg0AAkACQCAQQXZqDgTaAQEB2gEACyAQQSxGDdsBCyABIQEMBAsgAUEBaiIBIAJHDQALQT8hEAyqAwsgASEBDNsBC0HAACEQIAEiFCACRg2oAyACIBRrIAAoAgAiAWohFiAUIAFrQQZqIRcCQANAIBQtAABBIHIgAUGAwICAAGotAABHDQEgAUEGRg2OAyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAypAwsgAEEANgIAIBQhAQtBNiEQDI4DCwJAIAEiDyACRw0AQcEAIRAMpwMLIABBjICAgAA2AgggACAPNgIEIA8hASAALQAsQX9qDgTNAdUB1wHZAYcDCyABQQFqIQEMzAELAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgciAQIBBBv39qQf8BcUEaSRtB/wFxIhBBCUYNACAQQSBGDQACQAJAAkACQCAQQZ1/ag4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIRAMkQMLIAFBAWohAUEyIRAMkAMLIAFBAWohAUEzIRAMjwMLIAEhAQzQAQsgAUEBaiIBIAJHDQALQTUhEAylAwtBNSEQDKQDCwJAIAEiASACRg0AA0ACQCABLQAAQYC8gIAAai0AAEEBRg0AIAEhAQzTAQsgAUEBaiIBIAJHDQALQT0hEAykAwtBPSEQDKMDCyAAIAEiASACELCAgIAAIhAN1gEgASEBDAELIBBBAWohAQtBPCEQDIcDCwJAIAEiASACRw0AQcIAIRAMoAMLAkADQAJAIAEtAABBd2oOGAAC/gL+AoQD/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4CAP4CCyABQQFqIgEgAkcNAAtBwgAhEAygAwsgAUEBaiEBIAAtAC1BAXFFDb0BIAEhAQtBLCEQDIUDCyABIgEgAkcN0wFBxAAhEAydAwsDQAJAIAEtAABBkMCAgABqLQAAQQFGDQAgASEBDLcCCyABQQFqIgEgAkcNAAtBxQAhEAycAwsgDS0AACIQQSBGDbMBIBBBOkcNgQMgACgCBCEBIABBADYCBCAAIAEgDRCvgICAACIBDdABIA1BAWohAQyzAgtBxwAhECABIg0gAkYNmgMgAiANayAAKAIAIgFqIRYgDSABa0EFaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGQwoCAAGotAABHDYADIAFBBUYN9AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmgMLQcgAIRAgASINIAJGDZkDIAIgDWsgACgCACIBaiEWIA0gAWtBCWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBlsKAgABqLQAARw3/AgJAIAFBCUcNAEECIQEM9QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJkDCwJAIAEiDSACRw0AQckAIRAMmQMLAkACQCANLQAAIgFBIHIgASABQb9/akH/AXFBGkkbQf8BcUGSf2oOBwCAA4ADgAOAA4ADAYADCyANQQFqIQFBPiEQDIADCyANQQFqIQFBPyEQDP8CC0HKACEQIAEiDSACRg2XAyACIA1rIAAoAgAiAWohFiANIAFrQQFqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaDCgIAAai0AAEcN/QIgAUEBRg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyXAwtBywAhECABIg0gAkYNlgMgAiANayAAKAIAIgFqIRYgDSABa0EOaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGiwoCAAGotAABHDfwCIAFBDkYN8AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlgMLQcwAIRAgASINIAJGDZUDIAIgDWsgACgCACIBaiEWIA0gAWtBD2ohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBwMKAgABqLQAARw37AgJAIAFBD0cNAEEDIQEM8QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJUDC0HNACEQIAEiDSACRg2UAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQdDCgIAAai0AAEcN+gICQCABQQVHDQBBBCEBDPACCyABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyUAwsCQCABIg0gAkcNAEHOACEQDJQDCwJAAkACQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZ1/ag4TAP0C/QL9Av0C/QL9Av0C/QL9Av0C/QL9AgH9Av0C/QICA/0CCyANQQFqIQFBwQAhEAz9AgsgDUEBaiEBQcIAIRAM/AILIA1BAWohAUHDACEQDPsCCyANQQFqIQFBxAAhEAz6AgsCQCABIgEgAkYNACAAQY2AgIAANgIIIAAgATYCBCABIQFBxQAhEAz6AgtBzwAhEAySAwsgECEBAkACQCAQLQAAQXZqDgQBqAKoAgCoAgsgEEEBaiEBC0EnIRAM+AILAkAgASIBIAJHDQBB0QAhEAyRAwsCQCABLQAAQSBGDQAgASEBDI0BCyABQQFqIQEgAC0ALUEBcUUNxwEgASEBDIwBCyABIhcgAkcNyAFB0gAhEAyPAwtB0wAhECABIhQgAkYNjgMgAiAUayAAKAIAIgFqIRYgFCABa0EBaiEXA0AgFC0AACABQdbCgIAAai0AAEcNzAEgAUEBRg3HASABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAyOAwsCQCABIgEgAkcNAEHVACEQDI4DCyABLQAAQQpHDcwBIAFBAWohAQzHAQsCQCABIgEgAkcNAEHWACEQDI0DCwJAAkAgAS0AAEF2ag4EAM0BzQEBzQELIAFBAWohAQzHAQsgAUEBaiEBQcoAIRAM8wILIAAgASIBIAIQroCAgAAiEA3LASABIQFBzQAhEAzyAgsgAC0AKUEiRg2FAwymAgsCQCABIgEgAkcNAEHbACEQDIoDC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgAS0AAEFQag4K1AHTAQABAgMEBQYI1QELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMzAELQQkhEEEBIRRBACEXQQAhFgzLAQsCQCABIgEgAkcNAEHdACEQDIkDCyABLQAAQS5HDcwBIAFBAWohAQymAgsgASIBIAJHDcwBQd8AIRAMhwMLAkAgASIBIAJGDQAgAEGOgICAADYCCCAAIAE2AgQgASEBQdAAIRAM7gILQeAAIRAMhgMLQeEAIRAgASIBIAJGDYUDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHiwoCAAGotAABHDc0BIBRBA0YNzAEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhQMLQeIAIRAgASIBIAJGDYQDIAIgAWsgACgCACIUaiEWIAEgFGtBAmohFwNAIAEtAAAgFEHmwoCAAGotAABHDcwBIBRBAkYNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhAMLQeMAIRAgASIBIAJGDYMDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHpwoCAAGotAABHDcsBIBRBA0YNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMgwMLAkAgASIBIAJHDQBB5QAhEAyDAwsgACABQQFqIgEgAhCogICAACIQDc0BIAEhAUHWACEQDOkCCwJAIAEiASACRg0AA0ACQCABLQAAIhBBIEYNAAJAAkACQCAQQbh/ag4LAAHPAc8BzwHPAc8BzwHPAc8BAs8BCyABQQFqIQFB0gAhEAztAgsgAUEBaiEBQdMAIRAM7AILIAFBAWohAUHUACEQDOsCCyABQQFqIgEgAkcNAAtB5AAhEAyCAwtB5AAhEAyBAwsDQAJAIAEtAABB8MKAgABqLQAAIhBBAUYNACAQQX5qDgPPAdAB0QHSAQsgAUEBaiIBIAJHDQALQeYAIRAMgAMLAkAgASIBIAJGDQAgAUEBaiEBDAMLQecAIRAM/wILA0ACQCABLQAAQfDEgIAAai0AACIQQQFGDQACQCAQQX5qDgTSAdMB1AEA1QELIAEhAUHXACEQDOcCCyABQQFqIgEgAkcNAAtB6AAhEAz+AgsCQCABIgEgAkcNAEHpACEQDP4CCwJAIAEtAAAiEEF2ag4augHVAdUBvAHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHKAdUB1QEA0wELIAFBAWohAQtBBiEQDOMCCwNAAkAgAS0AAEHwxoCAAGotAABBAUYNACABIQEMngILIAFBAWoiASACRw0AC0HqACEQDPsCCwJAIAEiASACRg0AIAFBAWohAQwDC0HrACEQDPoCCwJAIAEiASACRw0AQewAIRAM+gILIAFBAWohAQwBCwJAIAEiASACRw0AQe0AIRAM+QILIAFBAWohAQtBBCEQDN4CCwJAIAEiFCACRw0AQe4AIRAM9wILIBQhAQJAAkACQCAULQAAQfDIgIAAai0AAEF/ag4H1AHVAdYBAJwCAQLXAQsgFEEBaiEBDAoLIBRBAWohAQzNAQtBACEQIABBADYCHCAAQZuSgIAANgIQIABBBzYCDCAAIBRBAWo2AhQM9gILAkADQAJAIAEtAABB8MiAgABqLQAAIhBBBEYNAAJAAkAgEEF/ag4H0gHTAdQB2QEABAHZAQsgASEBQdoAIRAM4AILIAFBAWohAUHcACEQDN8CCyABQQFqIgEgAkcNAAtB7wAhEAz2AgsgAUEBaiEBDMsBCwJAIAEiFCACRw0AQfAAIRAM9QILIBQtAABBL0cN1AEgFEEBaiEBDAYLAkAgASIUIAJHDQBB8QAhEAz0AgsCQCAULQAAIgFBL0cNACAUQQFqIQFB3QAhEAzbAgsgAUF2aiIEQRZLDdMBQQEgBHRBiYCAAnFFDdMBDMoCCwJAIAEiASACRg0AIAFBAWohAUHeACEQDNoCC0HyACEQDPICCwJAIAEiFCACRw0AQfQAIRAM8gILIBQhAQJAIBQtAABB8MyAgABqLQAAQX9qDgPJApQCANQBC0HhACEQDNgCCwJAIAEiFCACRg0AA0ACQCAULQAAQfDKgIAAai0AACIBQQNGDQACQCABQX9qDgLLAgDVAQsgFCEBQd8AIRAM2gILIBRBAWoiFCACRw0AC0HzACEQDPECC0HzACEQDPACCwJAIAEiASACRg0AIABBj4CAgAA2AgggACABNgIEIAEhAUHgACEQDNcCC0H1ACEQDO8CCwJAIAEiASACRw0AQfYAIRAM7wILIABBj4CAgAA2AgggACABNgIEIAEhAQtBAyEQDNQCCwNAIAEtAABBIEcNwwIgAUEBaiIBIAJHDQALQfcAIRAM7AILAkAgASIBIAJHDQBB+AAhEAzsAgsgAS0AAEEgRw3OASABQQFqIQEM7wELIAAgASIBIAIQrICAgAAiEA3OASABIQEMjgILAkAgASIEIAJHDQBB+gAhEAzqAgsgBC0AAEHMAEcN0QEgBEEBaiEBQRMhEAzPAQsCQCABIgQgAkcNAEH7ACEQDOkCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRADQCAELQAAIAFB8M6AgABqLQAARw3QASABQQVGDc4BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQfsAIRAM6AILAkAgASIEIAJHDQBB/AAhEAzoAgsCQAJAIAQtAABBvX9qDgwA0QHRAdEB0QHRAdEB0QHRAdEB0QEB0QELIARBAWohAUHmACEQDM8CCyAEQQFqIQFB5wAhEAzOAgsCQCABIgQgAkcNAEH9ACEQDOcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDc8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH9ACEQDOcCCyAAQQA2AgAgEEEBaiEBQRAhEAzMAQsCQCABIgQgAkcNAEH+ACEQDOYCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUH2zoCAAGotAABHDc4BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH+ACEQDOYCCyAAQQA2AgAgEEEBaiEBQRYhEAzLAQsCQCABIgQgAkcNAEH/ACEQDOUCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUH8zoCAAGotAABHDc0BIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH/ACEQDOUCCyAAQQA2AgAgEEEBaiEBQQUhEAzKAQsCQCABIgQgAkcNAEGAASEQDOQCCyAELQAAQdkARw3LASAEQQFqIQFBCCEQDMkBCwJAIAEiBCACRw0AQYEBIRAM4wILAkACQCAELQAAQbJ/ag4DAMwBAcwBCyAEQQFqIQFB6wAhEAzKAgsgBEEBaiEBQewAIRAMyQILAkAgASIEIAJHDQBBggEhEAziAgsCQAJAIAQtAABBuH9qDggAywHLAcsBywHLAcsBAcsBCyAEQQFqIQFB6gAhEAzJAgsgBEEBaiEBQe0AIRAMyAILAkAgASIEIAJHDQBBgwEhEAzhAgsgAiAEayAAKAIAIgFqIRAgBCABa0ECaiEUAkADQCAELQAAIAFBgM+AgABqLQAARw3JASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBA2AgBBgwEhEAzhAgtBACEQIABBADYCACAUQQFqIQEMxgELAkAgASIEIAJHDQBBhAEhEAzgAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBg8+AgABqLQAARw3IASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhAEhEAzgAgsgAEEANgIAIBBBAWohAUEjIRAMxQELAkAgASIEIAJHDQBBhQEhEAzfAgsCQAJAIAQtAABBtH9qDggAyAHIAcgByAHIAcgBAcgBCyAEQQFqIQFB7wAhEAzGAgsgBEEBaiEBQfAAIRAMxQILAkAgASIEIAJHDQBBhgEhEAzeAgsgBC0AAEHFAEcNxQEgBEEBaiEBDIMCCwJAIAEiBCACRw0AQYcBIRAM3QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQYjPgIAAai0AAEcNxQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYcBIRAM3QILIABBADYCACAQQQFqIQFBLSEQDMIBCwJAIAEiBCACRw0AQYgBIRAM3AILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNxAEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYgBIRAM3AILIABBADYCACAQQQFqIQFBKSEQDMEBCwJAIAEiASACRw0AQYkBIRAM2wILQQEhECABLQAAQd8ARw3AASABQQFqIQEMgQILAkAgASIEIAJHDQBBigEhEAzaAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQA0AgBC0AACABQYzPgIAAai0AAEcNwQEgAUEBRg2vAiABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGKASEQDNkCCwJAIAEiBCACRw0AQYsBIRAM2QILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQY7PgIAAai0AAEcNwQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYsBIRAM2QILIABBADYCACAQQQFqIQFBAiEQDL4BCwJAIAEiBCACRw0AQYwBIRAM2AILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNwAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYwBIRAM2AILIABBADYCACAQQQFqIQFBHyEQDL0BCwJAIAEiBCACRw0AQY0BIRAM1wILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNvwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY0BIRAM1wILIABBADYCACAQQQFqIQFBCSEQDLwBCwJAIAEiBCACRw0AQY4BIRAM1gILAkACQCAELQAAQbd/ag4HAL8BvwG/Ab8BvwEBvwELIARBAWohAUH4ACEQDL0CCyAEQQFqIQFB+QAhEAy8AgsCQCABIgQgAkcNAEGPASEQDNUCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGRz4CAAGotAABHDb0BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGPASEQDNUCCyAAQQA2AgAgEEEBaiEBQRghEAy6AQsCQCABIgQgAkcNAEGQASEQDNQCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUGXz4CAAGotAABHDbwBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGQASEQDNQCCyAAQQA2AgAgEEEBaiEBQRchEAy5AQsCQCABIgQgAkcNAEGRASEQDNMCCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUGaz4CAAGotAABHDbsBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGRASEQDNMCCyAAQQA2AgAgEEEBaiEBQRUhEAy4AQsCQCABIgQgAkcNAEGSASEQDNICCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGhz4CAAGotAABHDboBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGSASEQDNICCyAAQQA2AgAgEEEBaiEBQR4hEAy3AQsCQCABIgQgAkcNAEGTASEQDNECCyAELQAAQcwARw24ASAEQQFqIQFBCiEQDLYBCwJAIAQgAkcNAEGUASEQDNACCwJAAkAgBC0AAEG/f2oODwC5AbkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AQG5AQsgBEEBaiEBQf4AIRAMtwILIARBAWohAUH/ACEQDLYCCwJAIAQgAkcNAEGVASEQDM8CCwJAAkAgBC0AAEG/f2oOAwC4AQG4AQsgBEEBaiEBQf0AIRAMtgILIARBAWohBEGAASEQDLUCCwJAIAQgAkcNAEGWASEQDM4CCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUGnz4CAAGotAABHDbYBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGWASEQDM4CCyAAQQA2AgAgEEEBaiEBQQshEAyzAQsCQCAEIAJHDQBBlwEhEAzNAgsCQAJAAkACQCAELQAAQVNqDiMAuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AQG4AbgBuAG4AbgBArgBuAG4AQO4AQsgBEEBaiEBQfsAIRAMtgILIARBAWohAUH8ACEQDLUCCyAEQQFqIQRBgQEhEAy0AgsgBEEBaiEEQYIBIRAMswILAkAgBCACRw0AQZgBIRAMzAILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQanPgIAAai0AAEcNtAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZgBIRAMzAILIABBADYCACAQQQFqIQFBGSEQDLEBCwJAIAQgAkcNAEGZASEQDMsCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGuz4CAAGotAABHDbMBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGZASEQDMsCCyAAQQA2AgAgEEEBaiEBQQYhEAywAQsCQCAEIAJHDQBBmgEhEAzKAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBtM+AgABqLQAARw2yASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmgEhEAzKAgsgAEEANgIAIBBBAWohAUEcIRAMrwELAkAgBCACRw0AQZsBIRAMyQILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbbPgIAAai0AAEcNsQEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZsBIRAMyQILIABBADYCACAQQQFqIQFBJyEQDK4BCwJAIAQgAkcNAEGcASEQDMgCCwJAAkAgBC0AAEGsf2oOAgABsQELIARBAWohBEGGASEQDK8CCyAEQQFqIQRBhwEhEAyuAgsCQCAEIAJHDQBBnQEhEAzHAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBuM+AgABqLQAARw2vASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBnQEhEAzHAgsgAEEANgIAIBBBAWohAUEmIRAMrAELAkAgBCACRw0AQZ4BIRAMxgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbrPgIAAai0AAEcNrgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ4BIRAMxgILIABBADYCACAQQQFqIQFBAyEQDKsBCwJAIAQgAkcNAEGfASEQDMUCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDa0BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGfASEQDMUCCyAAQQA2AgAgEEEBaiEBQQwhEAyqAQsCQCAEIAJHDQBBoAEhEAzEAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBvM+AgABqLQAARw2sASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBoAEhEAzEAgsgAEEANgIAIBBBAWohAUENIRAMqQELAkAgBCACRw0AQaEBIRAMwwILAkACQCAELQAAQbp/ag4LAKwBrAGsAawBrAGsAawBrAGsAQGsAQsgBEEBaiEEQYsBIRAMqgILIARBAWohBEGMASEQDKkCCwJAIAQgAkcNAEGiASEQDMICCyAELQAAQdAARw2pASAEQQFqIQQM6QELAkAgBCACRw0AQaMBIRAMwQILAkACQCAELQAAQbd/ag4HAaoBqgGqAaoBqgEAqgELIARBAWohBEGOASEQDKgCCyAEQQFqIQFBIiEQDKYBCwJAIAQgAkcNAEGkASEQDMACCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHAz4CAAGotAABHDagBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGkASEQDMACCyAAQQA2AgAgEEEBaiEBQR0hEAylAQsCQCAEIAJHDQBBpQEhEAy/AgsCQAJAIAQtAABBrn9qDgMAqAEBqAELIARBAWohBEGQASEQDKYCCyAEQQFqIQFBBCEQDKQBCwJAIAQgAkcNAEGmASEQDL4CCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCqAaoBqgGqAaoBqgGqAaoBqgGqAQGqAaoBAqoBqgEDqgGqAQSqAQsgBEEBaiEEQYgBIRAMqAILIARBAWohBEGJASEQDKcCCyAEQQFqIQRBigEhEAymAgsgBEEBaiEEQY8BIRAMpQILIARBAWohBEGRASEQDKQCCwJAIAQgAkcNAEGnASEQDL0CCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDaUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGnASEQDL0CCyAAQQA2AgAgEEEBaiEBQREhEAyiAQsCQCAEIAJHDQBBqAEhEAy8AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBws+AgABqLQAARw2kASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqAEhEAy8AgsgAEEANgIAIBBBAWohAUEsIRAMoQELAkAgBCACRw0AQakBIRAMuwILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQcXPgIAAai0AAEcNowEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQakBIRAMuwILIABBADYCACAQQQFqIQFBKyEQDKABCwJAIAQgAkcNAEGqASEQDLoCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHKz4CAAGotAABHDaIBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGqASEQDLoCCyAAQQA2AgAgEEEBaiEBQRQhEAyfAQsCQCAEIAJHDQBBqwEhEAy5AgsCQAJAAkACQCAELQAAQb5/ag4PAAECpAGkAaQBpAGkAaQBpAGkAaQBpAGkAQOkAQsgBEEBaiEEQZMBIRAMogILIARBAWohBEGUASEQDKECCyAEQQFqIQRBlQEhEAygAgsgBEEBaiEEQZYBIRAMnwILAkAgBCACRw0AQawBIRAMuAILIAQtAABBxQBHDZ8BIARBAWohBAzgAQsCQCAEIAJHDQBBrQEhEAy3AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBzc+AgABqLQAARw2fASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrQEhEAy3AgsgAEEANgIAIBBBAWohAUEOIRAMnAELAkAgBCACRw0AQa4BIRAMtgILIAQtAABB0ABHDZ0BIARBAWohAUElIRAMmwELAkAgBCACRw0AQa8BIRAMtQILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNnQEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQa8BIRAMtQILIABBADYCACAQQQFqIQFBKiEQDJoBCwJAIAQgAkcNAEGwASEQDLQCCwJAAkAgBC0AAEGrf2oOCwCdAZ0BnQGdAZ0BnQGdAZ0BnQEBnQELIARBAWohBEGaASEQDJsCCyAEQQFqIQRBmwEhEAyaAgsCQCAEIAJHDQBBsQEhEAyzAgsCQAJAIAQtAABBv39qDhQAnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBAZwBCyAEQQFqIQRBmQEhEAyaAgsgBEEBaiEEQZwBIRAMmQILAkAgBCACRw0AQbIBIRAMsgILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQdnPgIAAai0AAEcNmgEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbIBIRAMsgILIABBADYCACAQQQFqIQFBISEQDJcBCwJAIAQgAkcNAEGzASEQDLECCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUHdz4CAAGotAABHDZkBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGzASEQDLECCyAAQQA2AgAgEEEBaiEBQRohEAyWAQsCQCAEIAJHDQBBtAEhEAywAgsCQAJAAkAgBC0AAEG7f2oOEQCaAZoBmgGaAZoBmgGaAZoBmgEBmgGaAZoBmgGaAQKaAQsgBEEBaiEEQZ0BIRAMmAILIARBAWohBEGeASEQDJcCCyAEQQFqIQRBnwEhEAyWAgsCQCAEIAJHDQBBtQEhEAyvAgsgAiAEayAAKAIAIgFqIRQgBCABa0EFaiEQAkADQCAELQAAIAFB5M+AgABqLQAARw2XASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtQEhEAyvAgsgAEEANgIAIBBBAWohAUEoIRAMlAELAkAgBCACRw0AQbYBIRAMrgILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQerPgIAAai0AAEcNlgEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbYBIRAMrgILIABBADYCACAQQQFqIQFBByEQDJMBCwJAIAQgAkcNAEG3ASEQDK0CCwJAAkAgBC0AAEG7f2oODgCWAZYBlgGWAZYBlgGWAZYBlgGWAZYBlgEBlgELIARBAWohBEGhASEQDJQCCyAEQQFqIQRBogEhEAyTAgsCQCAEIAJHDQBBuAEhEAysAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB7c+AgABqLQAARw2UASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuAEhEAysAgsgAEEANgIAIBBBAWohAUESIRAMkQELAkAgBCACRw0AQbkBIRAMqwILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNkwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbkBIRAMqwILIABBADYCACAQQQFqIQFBICEQDJABCwJAIAQgAkcNAEG6ASEQDKoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHyz4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG6ASEQDKoCCyAAQQA2AgAgEEEBaiEBQQ8hEAyPAQsCQCAEIAJHDQBBuwEhEAypAgsCQAJAIAQtAABBt39qDgcAkgGSAZIBkgGSAQGSAQsgBEEBaiEEQaUBIRAMkAILIARBAWohBEGmASEQDI8CCwJAIAQgAkcNAEG8ASEQDKgCCyACIARrIAAoAgAiAWohFCAEIAFrQQdqIRACQANAIAQtAAAgAUH0z4CAAGotAABHDZABIAFBB0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG8ASEQDKgCCyAAQQA2AgAgEEEBaiEBQRshEAyNAQsCQCAEIAJHDQBBvQEhEAynAgsCQAJAAkAgBC0AAEG+f2oOEgCRAZEBkQGRAZEBkQGRAZEBkQEBkQGRAZEBkQGRAZEBApEBCyAEQQFqIQRBpAEhEAyPAgsgBEEBaiEEQacBIRAMjgILIARBAWohBEGoASEQDI0CCwJAIAQgAkcNAEG+ASEQDKYCCyAELQAAQc4ARw2NASAEQQFqIQQMzwELAkAgBCACRw0AQb8BIRAMpQILAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBC0AAEG/f2oOFQABAgOcAQQFBpwBnAGcAQcICQoLnAEMDQ4PnAELIARBAWohAUHoACEQDJoCCyAEQQFqIQFB6QAhEAyZAgsgBEEBaiEBQe4AIRAMmAILIARBAWohAUHyACEQDJcCCyAEQQFqIQFB8wAhEAyWAgsgBEEBaiEBQfYAIRAMlQILIARBAWohAUH3ACEQDJQCCyAEQQFqIQFB+gAhEAyTAgsgBEEBaiEEQYMBIRAMkgILIARBAWohBEGEASEQDJECCyAEQQFqIQRBhQEhEAyQAgsgBEEBaiEEQZIBIRAMjwILIARBAWohBEGYASEQDI4CCyAEQQFqIQRBoAEhEAyNAgsgBEEBaiEEQaMBIRAMjAILIARBAWohBEGqASEQDIsCCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEGrASEQDIsCC0HAASEQDKMCCyAAIAUgAhCqgICAACIBDYsBIAUhAQxcCwJAIAYgAkYNACAGQQFqIQUMjQELQcIBIRAMoQILA0ACQCAQLQAAQXZqDgSMAQAAjwEACyAQQQFqIhAgAkcNAAtBwwEhEAygAgsCQCAHIAJGDQAgAEGRgICAADYCCCAAIAc2AgQgByEBQQEhEAyHAgtBxAEhEAyfAgsCQCAHIAJHDQBBxQEhEAyfAgsCQAJAIActAABBdmoOBAHOAc4BAM4BCyAHQQFqIQYMjQELIAdBAWohBQyJAQsCQCAHIAJHDQBBxgEhEAyeAgsCQAJAIActAABBdmoOFwGPAY8BAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAQCPAQsgB0EBaiEHC0GwASEQDIQCCwJAIAggAkcNAEHIASEQDJ0CCyAILQAAQSBHDY0BIABBADsBMiAIQQFqIQFBswEhEAyDAgsgASEXAkADQCAXIgcgAkYNASAHLQAAQVBqQf8BcSIQQQpPDcwBAkAgAC8BMiIUQZkzSw0AIAAgFEEKbCIUOwEyIBBB//8DcyAUQf7/A3FJDQAgB0EBaiEXIAAgFCAQaiIQOwEyIBBB//8DcUHoB0kNAQsLQQAhECAAQQA2AhwgAEHBiYCAADYCECAAQQ02AgwgACAHQQFqNgIUDJwCC0HHASEQDJsCCyAAIAggAhCugICAACIQRQ3KASAQQRVHDYwBIABByAE2AhwgACAINgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAyaAgsCQCAJIAJHDQBBzAEhEAyaAgtBACEUQQEhF0EBIRZBACEQAkACQAJAAkACQAJAAkACQAJAIAktAABBUGoOCpYBlQEAAQIDBAUGCJcBC0ECIRAMBgtBAyEQDAULQQQhEAwEC0EFIRAMAwtBBiEQDAILQQchEAwBC0EIIRALQQAhF0EAIRZBACEUDI4BC0EJIRBBASEUQQAhF0EAIRYMjQELAkAgCiACRw0AQc4BIRAMmQILIAotAABBLkcNjgEgCkEBaiEJDMoBCyALIAJHDY4BQdABIRAMlwILAkAgCyACRg0AIABBjoCAgAA2AgggACALNgIEQbcBIRAM/gELQdEBIRAMlgILAkAgBCACRw0AQdIBIRAMlgILIAIgBGsgACgCACIQaiEUIAQgEGtBBGohCwNAIAQtAAAgEEH8z4CAAGotAABHDY4BIBBBBEYN6QEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB0gEhEAyVAgsgACAMIAIQrICAgAAiAQ2NASAMIQEMuAELAkAgBCACRw0AQdQBIRAMlAILIAIgBGsgACgCACIQaiEUIAQgEGtBAWohDANAIAQtAAAgEEGB0ICAAGotAABHDY8BIBBBAUYNjgEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB1AEhEAyTAgsCQCAEIAJHDQBB1gEhEAyTAgsgAiAEayAAKAIAIhBqIRQgBCAQa0ECaiELA0AgBC0AACAQQYPQgIAAai0AAEcNjgEgEEECRg2QASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHWASEQDJICCwJAIAQgAkcNAEHXASEQDJICCwJAAkAgBC0AAEG7f2oOEACPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAY8BCyAEQQFqIQRBuwEhEAz5AQsgBEEBaiEEQbwBIRAM+AELAkAgBCACRw0AQdgBIRAMkQILIAQtAABByABHDYwBIARBAWohBAzEAQsCQCAEIAJGDQAgAEGQgICAADYCCCAAIAQ2AgRBvgEhEAz3AQtB2QEhEAyPAgsCQCAEIAJHDQBB2gEhEAyPAgsgBC0AAEHIAEYNwwEgAEEBOgAoDLkBCyAAQQI6AC8gACAEIAIQpoCAgAAiEA2NAUHCASEQDPQBCyAALQAoQX9qDgK3AbkBuAELA0ACQCAELQAAQXZqDgQAjgGOAQCOAQsgBEEBaiIEIAJHDQALQd0BIRAMiwILIABBADoALyAALQAtQQRxRQ2EAgsgAEEAOgAvIABBAToANCABIQEMjAELIBBBFUYN2gEgAEEANgIcIAAgATYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMiAILAkAgACAQIAIQtICAgAAiBA0AIBAhAQyBAgsCQCAEQRVHDQAgAEEDNgIcIAAgEDYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMiAILIABBADYCHCAAIBA2AhQgAEGnjoCAADYCECAAQRI2AgxBACEQDIcCCyAQQRVGDdYBIABBADYCHCAAIAE2AhQgAEHajYCAADYCECAAQRQ2AgxBACEQDIYCCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNjQEgAEEHNgIcIAAgEDYCFCAAIBQ2AgxBACEQDIUCCyAAIAAvATBBgAFyOwEwIAEhAQtBKiEQDOoBCyAQQRVGDdEBIABBADYCHCAAIAE2AhQgAEGDjICAADYCECAAQRM2AgxBACEQDIICCyAQQRVGDc8BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDIECCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyNAQsgAEEMNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDIACCyAQQRVGDcwBIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDP8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyMAQsgAEENNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDP4BCyAQQRVGDckBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDP0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyLAQsgAEEONgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPwBCyAAQQA2AhwgACABNgIUIABBwJWAgAA2AhAgAEECNgIMQQAhEAz7AQsgEEEVRg3FASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhEAz6AQsgAEEQNgIcIAAgATYCFCAAIBA2AgxBACEQDPkBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQzxAQsgAEERNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPgBCyAQQRVGDcEBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPcBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyIAQsgAEETNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPYBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQztAQsgAEEUNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPUBCyAQQRVGDb0BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDPQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyGAQsgAEEWNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQt4CAgAAiBA0AIAFBAWohAQzpAQsgAEEXNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPIBCyAAQQA2AhwgACABNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzxAQtCASERCyAQQQFqIQECQCAAKQMgIhJC//////////8PVg0AIAAgEkIEhiARhDcDICABIQEMhAELIABBADYCHCAAIAE2AhQgAEGtiYCAADYCECAAQQw2AgxBACEQDO8BCyAAQQA2AhwgACAQNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzuAQsgACgCBCEXIABBADYCBCAQIBGnaiIWIQEgACAXIBAgFiAUGyIQELWAgIAAIhRFDXMgAEEFNgIcIAAgEDYCFCAAIBQ2AgxBACEQDO0BCyAAQQA2AhwgACAQNgIUIABBqpyAgAA2AhAgAEEPNgIMQQAhEAzsAQsgACAQIAIQtICAgAAiAQ0BIBAhAQtBDiEQDNEBCwJAIAFBFUcNACAAQQI2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAzqAQsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAM6QELIAFBAWohEAJAIAAvATAiAUGAAXFFDQACQCAAIBAgAhC7gICAACIBDQAgECEBDHALIAFBFUcNugEgAEEFNgIcIAAgEDYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAM6QELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIBA2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEQDOkBCyAAIBAgAhC9gICAABogECEBAkACQAJAAkACQCAAIBAgAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAQIQELQSYhEAzRAQsgAEEjNgIcIAAgEDYCFCAAQaWWgIAANgIQIABBFTYCDEEAIRAM6QELIABBADYCHCAAIBA2AhQgAEHVi4CAADYCECAAQRE2AgxBACEQDOgBCyAALQAtQQFxRQ0BQcMBIRAMzgELAkAgDSACRg0AA0ACQCANLQAAQSBGDQAgDSEBDMQBCyANQQFqIg0gAkcNAAtBJSEQDOcBC0ElIRAM5gELIAAoAgQhBCAAQQA2AgQgACAEIA0Qr4CAgAAiBEUNrQEgAEEmNgIcIAAgBDYCDCAAIA1BAWo2AhRBACEQDOUBCyAQQRVGDasBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEQDOQBCyAAQSc2AhwgACABNgIUIAAgEDYCDEEAIRAM4wELIBAhAUEBIRQCQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhFAwBC0EEIRQLIABBAToALCAAIAAvATAgFHI7ATALIBAhAQtBKyEQDMoBCyAAQQA2AhwgACAQNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhEAziAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAIRAM4QELIABBADoALCAQIQEMvQELIBAhAUEBIRQCQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0EpIRAMxQELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEQDN0BCwJAIA4tAABBDUcNACAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA5BAWohAQx1CyAAQSw2AhwgACABNgIMIAAgDkEBajYCFEEAIRAM3QELIAAtAC1BAXFFDQFBxAEhEAzDAQsCQCAOIAJHDQBBLSEQDNwBCwJAAkADQAJAIA4tAABBdmoOBAIAAAMACyAOQQFqIg4gAkcNAAtBLSEQDN0BCyAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA4hAQx0CyAAQSw2AhwgACAONgIUIAAgATYCDEEAIRAM3AELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHMLIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzbAQsgACgCBCEEIABBADYCBCAAIAQgDhCxgICAACIEDaABIA4hAQzOAQsgEEEsRw0BIAFBAWohEEEBIQECQAJAAkACQAJAIAAtACxBe2oOBAMBAgQACyAQIQEMBAtBAiEBDAELQQQhAQsgAEEBOgAsIAAgAC8BMCABcjsBMCAQIQEMAQsgACAALwEwQQhyOwEwIBAhAQtBOSEQDL8BCyAAQQA6ACwgASEBC0E0IRAMvQELIAAgAC8BMEEgcjsBMCABIQEMAgsgACgCBCEEIABBADYCBAJAIAAgBCABELGAgIAAIgQNACABIQEMxwELIABBNzYCHCAAIAE2AhQgACAENgIMQQAhEAzUAQsgAEEIOgAsIAEhAQtBMCEQDLkBCwJAIAAtAChBAUYNACABIQEMBAsgAC0ALUEIcUUNkwEgASEBDAMLIAAtADBBIHENlAFBxQEhEAy3AQsCQCAPIAJGDQACQANAAkAgDy0AAEFQaiIBQf8BcUEKSQ0AIA8hAUE1IRAMugELIAApAyAiEUKZs+bMmbPmzBlWDQEgACARQgp+IhE3AyAgESABrUL/AYMiEkJ/hVYNASAAIBEgEnw3AyAgD0EBaiIPIAJHDQALQTkhEAzRAQsgACgCBCECIABBADYCBCAAIAIgD0EBaiIEELGAgIAAIgINlQEgBCEBDMMBC0E5IRAMzwELAkAgAC8BMCIBQQhxRQ0AIAAtAChBAUcNACAALQAtQQhxRQ2QAQsgACABQff7A3FBgARyOwEwIA8hAQtBNyEQDLQBCyAAIAAvATBBEHI7ATAMqwELIBBBFUYNiwEgAEEANgIcIAAgATYCFCAAQfCOgIAANgIQIABBHDYCDEEAIRAMywELIABBwwA2AhwgACABNgIMIAAgDUEBajYCFEEAIRAMygELAkAgAS0AAEE6Rw0AIAAoAgQhECAAQQA2AgQCQCAAIBAgARCvgICAACIQDQAgAUEBaiEBDGMLIABBwwA2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMygELIABBADYCHCAAIAE2AhQgAEGxkYCAADYCECAAQQo2AgxBACEQDMkBCyAAQQA2AhwgACABNgIUIABBoJmAgAA2AhAgAEEeNgIMQQAhEAzIAQsgAEEANgIACyAAQYASOwEqIAAgF0EBaiIBIAIQqICAgAAiEA0BIAEhAQtBxwAhEAysAQsgEEEVRw2DASAAQdEANgIcIAAgATYCFCAAQeOXgIAANgIQIABBFTYCDEEAIRAMxAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDF4LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMwwELIABBADYCHCAAIBQ2AhQgAEHBqICAADYCECAAQQc2AgwgAEEANgIAQQAhEAzCAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAzBAQtBACEQIABBADYCHCAAIAE2AhQgAEGAkYCAADYCECAAQQk2AgwMwAELIBBBFUYNfSAAQQA2AhwgACABNgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAy/AQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgAUEBaiEBAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBAJAIAAgECABEK2AgIAAIhANACABIQEMXAsgAEHYADYCHCAAIAE2AhQgACAQNgIMQQAhEAy+AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMrQELIABB2QA2AhwgACABNgIUIAAgBDYCDEEAIRAMvQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKsBCyAAQdoANgIcIAAgATYCFCAAIAQ2AgxBACEQDLwBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQypAQsgAEHcADYCHCAAIAE2AhQgACAENgIMQQAhEAy7AQsCQCABLQAAQVBqIhBB/wFxQQpPDQAgACAQOgAqIAFBAWohAUHPACEQDKIBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQynAQsgAEHeADYCHCAAIAE2AhQgACAENgIMQQAhEAy6AQsgAEEANgIAIBdBAWohAQJAIAAtAClBI08NACABIQEMWQsgAEEANgIcIAAgATYCFCAAQdOJgIAANgIQIABBCDYCDEEAIRAMuQELIABBADYCAAtBACEQIABBADYCHCAAIAE2AhQgAEGQs4CAADYCECAAQQg2AgwMtwELIABBADYCACAXQQFqIQECQCAALQApQSFHDQAgASEBDFYLIABBADYCHCAAIAE2AhQgAEGbioCAADYCECAAQQg2AgxBACEQDLYBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKSIQQV1qQQtPDQAgASEBDFULAkAgEEEGSw0AQQEgEHRBygBxRQ0AIAEhAQxVC0EAIRAgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDAy1AQsgEEEVRg1xIABBADYCHCAAIAE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBACEQDJYBCyAAKAIEIQUgAEEANgIEIAAgBSAQEKmAgIAAIgUNASAQQQFqIQULQa0BIRAMewsgAEHBATYCHCAAIAU2AgwgACAQQQFqNgIUQQAhEAyTAQsgACgCBCEGIABBADYCBCAAIAYgEBCpgICAACIGDQEgEEEBaiEGC0GuASEQDHgLIABBwgE2AhwgACAGNgIMIAAgEEEBajYCFEEAIRAMkAELIABBADYCHCAAIAc2AhQgAEGXi4CAADYCECAAQQ02AgxBACEQDI8BCyAAQQA2AhwgACAINgIUIABB45CAgAA2AhAgAEEJNgIMQQAhEAyOAQsgAEEANgIcIAAgCDYCFCAAQZSNgIAANgIQIABBITYCDEEAIRAMjQELQQEhFkEAIRdBACEUQQEhEAsgACAQOgArIAlBAWohCAJAAkAgAC0ALUEQcQ0AAkACQAJAIAAtACoOAwEAAgQLIBZFDQMMAgsgFA0BDAILIBdFDQELIAAoAgQhECAAQQA2AgQgACAQIAgQrYCAgAAiEEUNPSAAQckBNgIcIAAgCDYCFCAAIBA2AgxBACEQDIwBCyAAKAIEIQQgAEEANgIEIAAgBCAIEK2AgIAAIgRFDXYgAEHKATYCHCAAIAg2AhQgACAENgIMQQAhEAyLAQsgACgCBCEEIABBADYCBCAAIAQgCRCtgICAACIERQ10IABBywE2AhwgACAJNgIUIAAgBDYCDEEAIRAMigELIAAoAgQhBCAAQQA2AgQgACAEIAoQrYCAgAAiBEUNciAAQc0BNgIcIAAgCjYCFCAAIAQ2AgxBACEQDIkBCwJAIAstAABBUGoiEEH/AXFBCk8NACAAIBA6ACogC0EBaiEKQbYBIRAMcAsgACgCBCEEIABBADYCBCAAIAQgCxCtgICAACIERQ1wIABBzwE2AhwgACALNgIUIAAgBDYCDEEAIRAMiAELIABBADYCHCAAIAQ2AhQgAEGQs4CAADYCECAAQQg2AgwgAEEANgIAQQAhEAyHAQsgAUEVRg0/IABBADYCHCAAIAw2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDIYBCyAAQYEEOwEoIAAoAgQhECAAQgA3AwAgACAQIAxBAWoiDBCrgICAACIQRQ04IABB0wE2AhwgACAMNgIUIAAgEDYCDEEAIRAMhQELIABBADYCAAtBACEQIABBADYCHCAAIAQ2AhQgAEHYm4CAADYCECAAQQg2AgwMgwELIAAoAgQhECAAQgA3AwAgACAQIAtBAWoiCxCrgICAACIQDQFBxgEhEAxpCyAAQQI6ACgMVQsgAEHVATYCHCAAIAs2AhQgACAQNgIMQQAhEAyAAQsgEEEVRg03IABBADYCHCAAIAQ2AhQgAEGkjICAADYCECAAQRA2AgxBACEQDH8LIAAtADRBAUcNNCAAIAQgAhC8gICAACIQRQ00IBBBFUcNNSAAQdwBNgIcIAAgBDYCFCAAQdWWgIAANgIQIABBFTYCDEEAIRAMfgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQMfQtBACEQDGMLQQIhEAxiC0ENIRAMYQtBDyEQDGALQSUhEAxfC0ETIRAMXgtBFSEQDF0LQRYhEAxcC0EXIRAMWwtBGCEQDFoLQRkhEAxZC0EaIRAMWAtBGyEQDFcLQRwhEAxWC0EdIRAMVQtBHyEQDFQLQSEhEAxTC0EjIRAMUgtBxgAhEAxRC0EuIRAMUAtBLyEQDE8LQTshEAxOC0E9IRAMTQtByAAhEAxMC0HJACEQDEsLQcsAIRAMSgtBzAAhEAxJC0HOACEQDEgLQdEAIRAMRwtB1QAhEAxGC0HYACEQDEULQdkAIRAMRAtB2wAhEAxDC0HkACEQDEILQeUAIRAMQQtB8QAhEAxAC0H0ACEQDD8LQY0BIRAMPgtBlwEhEAw9C0GpASEQDDwLQawBIRAMOwtBwAEhEAw6C0G5ASEQDDkLQa8BIRAMOAtBsQEhEAw3C0GyASEQDDYLQbQBIRAMNQtBtQEhEAw0C0G6ASEQDDMLQb0BIRAMMgtBvwEhEAwxC0HBASEQDDALIABBADYCHCAAIAQ2AhQgAEHpi4CAADYCECAAQR82AgxBACEQDEgLIABB2wE2AhwgACAENgIUIABB+paAgAA2AhAgAEEVNgIMQQAhEAxHCyAAQfgANgIcIAAgDDYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMRgsgAEHRADYCHCAAIAU2AhQgAEGwl4CAADYCECAAQRU2AgxBACEQDEULIABB+QA2AhwgACABNgIUIAAgEDYCDEEAIRAMRAsgAEH4ADYCHCAAIAE2AhQgAEHKmICAADYCECAAQRU2AgxBACEQDEMLIABB5AA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAxCCyAAQdcANgIcIAAgATYCFCAAQcmXgIAANgIQIABBFTYCDEEAIRAMQQsgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMQAsgAEHCADYCHCAAIAE2AhQgAEHjmICAADYCECAAQRU2AgxBACEQDD8LIABBADYCBCAAIA8gDxCxgICAACIERQ0BIABBOjYCHCAAIAQ2AgwgACAPQQFqNgIUQQAhEAw+CyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBEUNACAAQTs2AhwgACAENgIMIAAgAUEBajYCFEEAIRAMPgsgAUEBaiEBDC0LIA9BAWohAQwtCyAAQQA2AhwgACAPNgIUIABB5JKAgAA2AhAgAEEENgIMQQAhEAw7CyAAQTY2AhwgACAENgIUIAAgAjYCDEEAIRAMOgsgAEEuNgIcIAAgDjYCFCAAIAQ2AgxBACEQDDkLIABB0AA2AhwgACABNgIUIABBkZiAgAA2AhAgAEEVNgIMQQAhEAw4CyANQQFqIQEMLAsgAEEVNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMNgsgAEEbNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNQsgAEEPNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNAsgAEELNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMMwsgAEEaNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMgsgAEELNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMQsgAEEKNgIcIAAgATYCFCAAQeSWgIAANgIQIABBFTYCDEEAIRAMMAsgAEEeNgIcIAAgATYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAMLwsgAEEANgIcIAAgEDYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMLgsgAEEENgIcIAAgATYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMLQsgAEEANgIAIAtBAWohCwtBuAEhEAwSCyAAQQA2AgAgEEEBaiEBQfUAIRAMEQsgASEBAkAgAC0AKUEFRw0AQeMAIRAMEQtB4gAhEAwQC0EAIRAgAEEANgIcIABB5JGAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAwoCyAAQQA2AgAgF0EBaiEBQcAAIRAMDgtBASEBCyAAIAE6ACwgAEEANgIAIBdBAWohAQtBKCEQDAsLIAEhAQtBOCEQDAkLAkAgASIPIAJGDQADQAJAIA8tAABBgL6AgABqLQAAIgFBAUYNACABQQJHDQMgD0EBaiEBDAQLIA9BAWoiDyACRw0AC0E+IRAMIgtBPiEQDCELIABBADoALCAPIQEMAQtBCyEQDAYLQTohEAwFCyABQQFqIQFBLSEQDAQLIAAgAToALCAAQQA2AgAgFkEBaiEBQQwhEAwDCyAAQQA2AgAgF0EBaiEBQQohEAwCCyAAQQA2AgALIABBADoALCANIQFBCSEQDAALC0EAIRAgAEEANgIcIAAgCzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAIRAgAEEANgIcIAAgCjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAIRAgAEEANgIcIAAgCTYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAIRAgAEEANgIcIAAgCDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAIRAgAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAIRAgAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAIRAgAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAIRAgAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAIRAgAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAIRAgAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAIRAgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAIRAgAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAIRAgAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAIRAgAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBAjYCDAwIC0EAIRAgAEEANgIcIAAgATYCFCAAQfKVgIAANgIQIABBAjYCDAwHCyAAQQI2AhwgACABNgIUIABBnJqAgAA2AhAgAEEWNgIMQQAhEAwGC0EBIRAMBQtB1AAhECABIgQgAkYNBCADQQhqIAAgBCACQdjCgIAAQQoQxYCAgAAgAygCDCEEIAMoAggOAwEEAgALEMqAgIAAAAsgAEEANgIcIABBtZqAgAA2AhAgAEEXNgIMIAAgBEEBajYCFEEAIRAMAgsgAEEANgIcIAAgBDYCFCAAQcqagIAANgIQIABBCTYCDEEAIRAMAQsCQCABIgQgAkcNAEEiIRAMAQsgAEGJgICAADYCCCAAIAQ2AgRBISEQCyADQRBqJICAgIAAIBALrwEBAn8gASgCACEGAkACQCACIANGDQAgBCAGaiEEIAYgA2ogAmshByACIAZBf3MgBWoiBmohBQNAAkAgAi0AACAELQAARg0AQQIhBAwDCwJAIAYNAEEAIQQgBSECDAMLIAZBf2ohBiAEQQFqIQQgAkEBaiICIANHDQALIAchBiADIQILIABBATYCACABIAY2AgAgACACNgIEDwsgAUEANgIAIAAgBDYCACAAIAI2AgQLCgAgABDHgICAAAvyNgELfyOAgICAAEEQayIBJICAgIAAAkBBACgCoNCAgAANAEEAEMuAgIAAQYDUhIAAayICQdkASQ0AQQAhAwJAQQAoAuDTgIAAIgQNAEEAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEIakFwcUHYqtWqBXMiBDYC4NOAgABBAEEANgL004CAAEEAQQA2AsTTgIAAC0EAIAI2AszTgIAAQQBBgNSEgAA2AsjTgIAAQQBBgNSEgAA2ApjQgIAAQQAgBDYCrNCAgABBAEF/NgKo0ICAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALQYDUhIAAQXhBgNSEgABrQQ9xQQBBgNSEgABBCGpBD3EbIgNqIgRBBGogAkFIaiIFIANrIgNBAXI2AgBBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAQYDUhIAAIAVqQTg2AgQLAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKI0ICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQACQAJAIANBAXEgBHJBAXMiBUEDdCIEQbDQgIAAaiIDIARBuNCAgABqKAIAIgQoAggiAkcNAEEAIAZBfiAFd3E2AojQgIAADAELIAMgAjYCCCACIAM2AgwLIARBCGohAyAEIAVBA3QiBUEDcjYCBCAEIAVqIgQgBCgCBEEBcjYCBAwMCyACQQAoApDQgIAAIgdNDQECQCADRQ0AAkACQCADIAR0QQIgBHQiA0EAIANrcnEiA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqIgRBA3QiA0Gw0ICAAGoiBSADQbjQgIAAaigCACIDKAIIIgBHDQBBACAGQX4gBHdxIgY2AojQgIAADAELIAUgADYCCCAAIAU2AgwLIAMgAkEDcjYCBCADIARBA3QiBGogBCACayIFNgIAIAMgAmoiACAFQQFyNgIEAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQQCQAJAIAZBASAHQQN2dCIIcQ0AQQAgBiAIcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCAENgIMIAIgBDYCCCAEIAI2AgwgBCAINgIICyADQQhqIQNBACAANgKc0ICAAEEAIAU2ApDQgIAADAwLQQAoAozQgIAAIglFDQEgCUEAIAlrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqQQJ0QbjSgIAAaigCACIAKAIEQXhxIAJrIQQgACEFAkADQAJAIAUoAhAiAw0AIAVBFGooAgAiA0UNAgsgAygCBEF4cSACayIFIAQgBSAESSIFGyEEIAMgACAFGyEAIAMhBQwACwsgACgCGCEKAkAgACgCDCIIIABGDQAgACgCCCIDQQAoApjQgIAASRogCCADNgIIIAMgCDYCDAwLCwJAIABBFGoiBSgCACIDDQAgACgCECIDRQ0DIABBEGohBQsDQCAFIQsgAyIIQRRqIgUoAgAiAw0AIAhBEGohBSAIKAIQIgMNAAsgC0EANgIADAoLQX8hAiAAQb9/Sw0AIABBE2oiA0FwcSECQQAoAozQgIAAIgdFDQBBACELAkAgAkGAAkkNAEEfIQsgAkH///8HSw0AIANBCHYiAyADQYD+P2pBEHZBCHEiA3QiBCAEQYDgH2pBEHZBBHEiBHQiBSAFQYCAD2pBEHZBAnEiBXRBD3YgAyAEciAFcmsiA0EBdCACIANBFWp2QQFxckEcaiELC0EAIAJrIQQCQAJAAkACQCALQQJ0QbjSgIAAaigCACIFDQBBACEDQQAhCAwBC0EAIQMgAkEAQRkgC0EBdmsgC0EfRht0IQBBACEIA0ACQCAFKAIEQXhxIAJrIgYgBE8NACAGIQQgBSEIIAYNAEEAIQQgBSEIIAUhAwwDCyADIAVBFGooAgAiBiAGIAUgAEEddkEEcWpBEGooAgAiBUYbIAMgBhshAyAAQQF0IQAgBQ0ACwsCQCADIAhyDQBBACEIQQIgC3QiA0EAIANrciAHcSIDRQ0DIANBACADa3FBf2oiAyADQQx2QRBxIgN2IgVBBXZBCHEiACADciAFIAB2IgNBAnZBBHEiBXIgAyAFdiIDQQF2QQJxIgVyIAMgBXYiA0EBdkEBcSIFciADIAV2akECdEG40oCAAGooAgAhAwsgA0UNAQsDQCADKAIEQXhxIAJrIgYgBEkhAAJAIAMoAhAiBQ0AIANBFGooAgAhBQsgBiAEIAAbIQQgAyAIIAAbIQggBSEDIAUNAAsLIAhFDQAgBEEAKAKQ0ICAACACa08NACAIKAIYIQsCQCAIKAIMIgAgCEYNACAIKAIIIgNBACgCmNCAgABJGiAAIAM2AgggAyAANgIMDAkLAkAgCEEUaiIFKAIAIgMNACAIKAIQIgNFDQMgCEEQaiEFCwNAIAUhBiADIgBBFGoiBSgCACIDDQAgAEEQaiEFIAAoAhAiAw0ACyAGQQA2AgAMCAsCQEEAKAKQ0ICAACIDIAJJDQBBACgCnNCAgAAhBAJAAkAgAyACayIFQRBJDQAgBCACaiIAIAVBAXI2AgRBACAFNgKQ0ICAAEEAIAA2ApzQgIAAIAQgA2ogBTYCACAEIAJBA3I2AgQMAQsgBCADQQNyNgIEIAQgA2oiAyADKAIEQQFyNgIEQQBBADYCnNCAgABBAEEANgKQ0ICAAAsgBEEIaiEDDAoLAkBBACgClNCAgAAiACACTQ0AQQAoAqDQgIAAIgMgAmoiBCAAIAJrIgVBAXI2AgRBACAFNgKU0ICAAEEAIAQ2AqDQgIAAIAMgAkEDcjYCBCADQQhqIQMMCgsCQAJAQQAoAuDTgIAARQ0AQQAoAujTgIAAIQQMAQtBAEJ/NwLs04CAAEEAQoCAhICAgMAANwLk04CAAEEAIAFBDGpBcHFB2KrVqgVzNgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgABBgIAEIQQLQQAhAwJAIAQgAkHHAGoiB2oiBkEAIARrIgtxIgggAksNAEEAQTA2AvjTgIAADAoLAkBBACgCwNOAgAAiA0UNAAJAQQAoArjTgIAAIgQgCGoiBSAETQ0AIAUgA00NAQtBACEDQQBBMDYC+NOAgAAMCgtBAC0AxNOAgABBBHENBAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQAJAIAMoAgAiBSAESw0AIAUgAygCBGogBEsNAwsgAygCCCIDDQALC0EAEMuAgIAAIgBBf0YNBSAIIQYCQEEAKALk04CAACIDQX9qIgQgAHFFDQAgCCAAayAEIABqQQAgA2txaiEGCyAGIAJNDQUgBkH+////B0sNBQJAQQAoAsDTgIAAIgNFDQBBACgCuNOAgAAiBCAGaiIFIARNDQYgBSADSw0GCyAGEMuAgIAAIgMgAEcNAQwHCyAGIABrIAtxIgZB/v///wdLDQQgBhDLgICAACIAIAMoAgAgAygCBGpGDQMgACEDCwJAIANBf0YNACACQcgAaiAGTQ0AAkAgByAGa0EAKALo04CAACIEakEAIARrcSIEQf7///8HTQ0AIAMhAAwHCwJAIAQQy4CAgABBf0YNACAEIAZqIQYgAyEADAcLQQAgBmsQy4CAgAAaDAQLIAMhACADQX9HDQUMAwtBACEIDAcLQQAhAAwFCyAAQX9HDQILQQBBACgCxNOAgABBBHI2AsTTgIAACyAIQf7///8HSw0BIAgQy4CAgAAhAEEAEMuAgIAAIQMgAEF/Rg0BIANBf0YNASAAIANPDQEgAyAAayIGIAJBOGpNDQELQQBBACgCuNOAgAAgBmoiAzYCuNOAgAACQCADQQAoArzTgIAATQ0AQQAgAzYCvNOAgAALAkACQAJAAkBBACgCoNCAgAAiBEUNAEHI04CAACEDA0AgACADKAIAIgUgAygCBCIIakYNAiADKAIIIgMNAAwDCwsCQAJAQQAoApjQgIAAIgNFDQAgACADTw0BC0EAIAA2ApjQgIAAC0EAIQNBACAGNgLM04CAAEEAIAA2AsjTgIAAQQBBfzYCqNCAgABBAEEAKALg04CAADYCrNCAgABBAEEANgLU04CAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgQgBkFIaiIFIANrIgNBAXI2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAIAAgBWpBODYCBAwCCyADLQAMQQhxDQAgBCAFSQ0AIAQgAE8NACAEQXggBGtBD3FBACAEQQhqQQ9xGyIFaiIAQQAoApTQgIAAIAZqIgsgBWsiBUEBcjYCBCADIAggBmo2AgRBAEEAKALw04CAADYCpNCAgABBACAFNgKU0ICAAEEAIAA2AqDQgIAAIAQgC2pBODYCBAwBCwJAIABBACgCmNCAgAAiCE8NAEEAIAA2ApjQgIAAIAAhCAsgACAGaiEFQcjTgIAAIQMCQAJAAkACQAJAAkACQANAIAMoAgAgBUYNASADKAIIIgMNAAwCCwsgAy0ADEEIcUUNAQtByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiIFIARLDQMLIAMoAgghAwwACwsgAyAANgIAIAMgAygCBCAGajYCBCAAQXggAGtBD3FBACAAQQhqQQ9xG2oiCyACQQNyNgIEIAVBeCAFa0EPcUEAIAVBCGpBD3EbaiIGIAsgAmoiAmshAwJAIAYgBEcNAEEAIAI2AqDQgIAAQQBBACgClNCAgAAgA2oiAzYClNCAgAAgAiADQQFyNgIEDAMLAkAgBkEAKAKc0ICAAEcNAEEAIAI2ApzQgIAAQQBBACgCkNCAgAAgA2oiAzYCkNCAgAAgAiADQQFyNgIEIAIgA2ogAzYCAAwDCwJAIAYoAgQiBEEDcUEBRw0AIARBeHEhBwJAAkAgBEH/AUsNACAGKAIIIgUgBEEDdiIIQQN0QbDQgIAAaiIARhoCQCAGKAIMIgQgBUcNAEEAQQAoAojQgIAAQX4gCHdxNgKI0ICAAAwCCyAEIABGGiAEIAU2AgggBSAENgIMDAELIAYoAhghCQJAAkAgBigCDCIAIAZGDQAgBigCCCIEIAhJGiAAIAQ2AgggBCAANgIMDAELAkAgBkEUaiIEKAIAIgUNACAGQRBqIgQoAgAiBQ0AQQAhAAwBCwNAIAQhCCAFIgBBFGoiBCgCACIFDQAgAEEQaiEEIAAoAhAiBQ0ACyAIQQA2AgALIAlFDQACQAJAIAYgBigCHCIFQQJ0QbjSgIAAaiIEKAIARw0AIAQgADYCACAADQFBAEEAKAKM0ICAAEF+IAV3cTYCjNCAgAAMAgsgCUEQQRQgCSgCECAGRhtqIAA2AgAgAEUNAQsgACAJNgIYAkAgBigCECIERQ0AIAAgBDYCECAEIAA2AhgLIAYoAhQiBEUNACAAQRRqIAQ2AgAgBCAANgIYCyAHIANqIQMgBiAHaiIGKAIEIQQLIAYgBEF+cTYCBCACIANqIAM2AgAgAiADQQFyNgIEAkAgA0H/AUsNACADQXhxQbDQgIAAaiEEAkACQEEAKAKI0ICAACIFQQEgA0EDdnQiA3ENAEEAIAUgA3I2AojQgIAAIAQhAwwBCyAEKAIIIQMLIAMgAjYCDCAEIAI2AgggAiAENgIMIAIgAzYCCAwDC0EfIQQCQCADQf///wdLDQAgA0EIdiIEIARBgP4/akEQdkEIcSIEdCIFIAVBgOAfakEQdkEEcSIFdCIAIABBgIAPakEQdkECcSIAdEEPdiAEIAVyIAByayIEQQF0IAMgBEEVanZBAXFyQRxqIQQLIAIgBDYCHCACQgA3AhAgBEECdEG40oCAAGohBQJAQQAoAozQgIAAIgBBASAEdCIIcQ0AIAUgAjYCAEEAIAAgCHI2AozQgIAAIAIgBTYCGCACIAI2AgggAiACNgIMDAMLIANBAEEZIARBAXZrIARBH0YbdCEEIAUoAgAhAANAIAAiBSgCBEF4cSADRg0CIARBHXYhACAEQQF0IQQgBSAAQQRxakEQaiIIKAIAIgANAAsgCCACNgIAIAIgBTYCGCACIAI2AgwgAiACNgIIDAILIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgsgBkFIaiIIIANrIgNBAXI2AgQgACAIakE4NgIEIAQgBUE3IAVrQQ9xQQAgBUFJakEPcRtqQUFqIgggCCAEQRBqSRsiCEEjNgIEQQBBACgC8NOAgAA2AqTQgIAAQQAgAzYClNCAgABBACALNgKg0ICAACAIQRBqQQApAtDTgIAANwIAIAhBACkCyNOAgAA3AghBACAIQQhqNgLQ04CAAEEAIAY2AszTgIAAQQAgADYCyNOAgABBAEEANgLU04CAACAIQSRqIQMDQCADQQc2AgAgA0EEaiIDIAVJDQALIAggBEYNAyAIIAgoAgRBfnE2AgQgCCAIIARrIgA2AgAgBCAAQQFyNgIEAkAgAEH/AUsNACAAQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgAEEDdnQiAHENAEEAIAUgAHI2AojQgIAAIAMhBQwBCyADKAIIIQULIAUgBDYCDCADIAQ2AgggBCADNgIMIAQgBTYCCAwEC0EfIQMCQCAAQf///wdLDQAgAEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCIIIAhBgIAPakEQdkECcSIIdEEPdiADIAVyIAhyayIDQQF0IAAgA0EVanZBAXFyQRxqIQMLIAQgAzYCHCAEQgA3AhAgA0ECdEG40oCAAGohBQJAQQAoAozQgIAAIghBASADdCIGcQ0AIAUgBDYCAEEAIAggBnI2AozQgIAAIAQgBTYCGCAEIAQ2AgggBCAENgIMDAQLIABBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhCANAIAgiBSgCBEF4cSAARg0DIANBHXYhCCADQQF0IQMgBSAIQQRxakEQaiIGKAIAIggNAAsgBiAENgIAIAQgBTYCGCAEIAQ2AgwgBCAENgIIDAMLIAUoAggiAyACNgIMIAUgAjYCCCACQQA2AhggAiAFNgIMIAIgAzYCCAsgC0EIaiEDDAULIAUoAggiAyAENgIMIAUgBDYCCCAEQQA2AhggBCAFNgIMIAQgAzYCCAtBACgClNCAgAAiAyACTQ0AQQAoAqDQgIAAIgQgAmoiBSADIAJrIgNBAXI2AgRBACADNgKU0ICAAEEAIAU2AqDQgIAAIAQgAkEDcjYCBCAEQQhqIQMMAwtBACEDQQBBMDYC+NOAgAAMAgsCQCALRQ0AAkACQCAIIAgoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAA2AgAgAA0BQQAgB0F+IAV3cSIHNgKM0ICAAAwCCyALQRBBFCALKAIQIAhGG2ogADYCACAARQ0BCyAAIAs2AhgCQCAIKAIQIgNFDQAgACADNgIQIAMgADYCGAsgCEEUaigCACIDRQ0AIABBFGogAzYCACADIAA2AhgLAkACQCAEQQ9LDQAgCCAEIAJqIgNBA3I2AgQgCCADaiIDIAMoAgRBAXI2AgQMAQsgCCACaiIAIARBAXI2AgQgCCACQQNyNgIEIAAgBGogBDYCAAJAIARB/wFLDQAgBEF4cUGw0ICAAGohAwJAAkBBACgCiNCAgAAiBUEBIARBA3Z0IgRxDQBBACAFIARyNgKI0ICAACADIQQMAQsgAygCCCEECyAEIAA2AgwgAyAANgIIIAAgAzYCDCAAIAQ2AggMAQtBHyEDAkAgBEH///8HSw0AIARBCHYiAyADQYD+P2pBEHZBCHEiA3QiBSAFQYDgH2pBEHZBBHEiBXQiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAFciACcmsiA0EBdCAEIANBFWp2QQFxckEcaiEDCyAAIAM2AhwgAEIANwIQIANBAnRBuNKAgABqIQUCQCAHQQEgA3QiAnENACAFIAA2AgBBACAHIAJyNgKM0ICAACAAIAU2AhggACAANgIIIAAgADYCDAwBCyAEQQBBGSADQQF2ayADQR9GG3QhAyAFKAIAIQICQANAIAIiBSgCBEF4cSAERg0BIANBHXYhAiADQQF0IQMgBSACQQRxakEQaiIGKAIAIgINAAsgBiAANgIAIAAgBTYCGCAAIAA2AgwgACAANgIIDAELIAUoAggiAyAANgIMIAUgADYCCCAAQQA2AhggACAFNgIMIAAgAzYCCAsgCEEIaiEDDAELAkAgCkUNAAJAAkAgACAAKAIcIgVBAnRBuNKAgABqIgMoAgBHDQAgAyAINgIAIAgNAUEAIAlBfiAFd3E2AozQgIAADAILIApBEEEUIAooAhAgAEYbaiAINgIAIAhFDQELIAggCjYCGAJAIAAoAhAiA0UNACAIIAM2AhAgAyAINgIYCyAAQRRqKAIAIgNFDQAgCEEUaiADNgIAIAMgCDYCGAsCQAJAIARBD0sNACAAIAQgAmoiA0EDcjYCBCAAIANqIgMgAygCBEEBcjYCBAwBCyAAIAJqIgUgBEEBcjYCBCAAIAJBA3I2AgQgBSAEaiAENgIAAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQMCQAJAQQEgB0EDdnQiCCAGcQ0AQQAgCCAGcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCADNgIMIAIgAzYCCCADIAI2AgwgAyAINgIIC0EAIAU2ApzQgIAAQQAgBDYCkNCAgAALIABBCGohAwsgAUEQaiSAgICAACADCwoAIAAQyYCAgAAL4g0BB38CQCAARQ0AIABBeGoiASAAQXxqKAIAIgJBeHEiAGohAwJAIAJBAXENACACQQNxRQ0BIAEgASgCACICayIBQQAoApjQgIAAIgRJDQEgAiAAaiEAAkAgAUEAKAKc0ICAAEYNAAJAIAJB/wFLDQAgASgCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAwsgAiAGRhogAiAENgIIIAQgAjYCDAwCCyABKAIYIQcCQAJAIAEoAgwiBiABRg0AIAEoAggiAiAESRogBiACNgIIIAIgBjYCDAwBCwJAIAFBFGoiAigCACIEDQAgAUEQaiICKAIAIgQNAEEAIQYMAQsDQCACIQUgBCIGQRRqIgIoAgAiBA0AIAZBEGohAiAGKAIQIgQNAAsgBUEANgIACyAHRQ0BAkACQCABIAEoAhwiBEECdEG40oCAAGoiAigCAEcNACACIAY2AgAgBg0BQQBBACgCjNCAgABBfiAEd3E2AozQgIAADAMLIAdBEEEUIAcoAhAgAUYbaiAGNgIAIAZFDQILIAYgBzYCGAJAIAEoAhAiAkUNACAGIAI2AhAgAiAGNgIYCyABKAIUIgJFDQEgBkEUaiACNgIAIAIgBjYCGAwBCyADKAIEIgJBA3FBA0cNACADIAJBfnE2AgRBACAANgKQ0ICAACABIABqIAA2AgAgASAAQQFyNgIEDwsgASADTw0AIAMoAgQiAkEBcUUNAAJAAkAgAkECcQ0AAkAgA0EAKAKg0ICAAEcNAEEAIAE2AqDQgIAAQQBBACgClNCAgAAgAGoiADYClNCAgAAgASAAQQFyNgIEIAFBACgCnNCAgABHDQNBAEEANgKQ0ICAAEEAQQA2ApzQgIAADwsCQCADQQAoApzQgIAARw0AQQAgATYCnNCAgABBAEEAKAKQ0ICAACAAaiIANgKQ0ICAACABIABBAXI2AgQgASAAaiAANgIADwsgAkF4cSAAaiEAAkACQCACQf8BSw0AIAMoAggiBCACQQN2IgVBA3RBsNCAgABqIgZGGgJAIAMoAgwiAiAERw0AQQBBACgCiNCAgABBfiAFd3E2AojQgIAADAILIAIgBkYaIAIgBDYCCCAEIAI2AgwMAQsgAygCGCEHAkACQCADKAIMIgYgA0YNACADKAIIIgJBACgCmNCAgABJGiAGIAI2AgggAiAGNgIMDAELAkAgA0EUaiICKAIAIgQNACADQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQACQAJAIAMgAygCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAgsgB0EQQRQgBygCECADRhtqIAY2AgAgBkUNAQsgBiAHNgIYAkAgAygCECICRQ0AIAYgAjYCECACIAY2AhgLIAMoAhQiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABqIAA2AgAgASAAQQFyNgIEIAFBACgCnNCAgABHDQFBACAANgKQ0ICAAA8LIAMgAkF+cTYCBCABIABqIAA2AgAgASAAQQFyNgIECwJAIABB/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALC45IAQBBgAgLhkgBAAAAAgAAAAMAAAAAAAAAAAAAAAQAAAAFAAAAAAAAAAAAAAAGAAAABwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="});var jp=Q((Nj,_p)=>{"use strict";_p.exports="AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AcsBygG4AckBuQHIAboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBANwBC0EAIRAMxgELQQ4hEAzFAQtBDSEQDMQBC0EPIRAMwwELQRAhEAzCAQtBEyEQDMEBC0EUIRAMwAELQRUhEAy/AQtBFiEQDL4BC0EXIRAMvQELQRghEAy8AQtBGSEQDLsBC0EaIRAMugELQRshEAy5AQtBHCEQDLgBC0EIIRAMtwELQR0hEAy2AQtBICEQDLUBC0EfIRAMtAELQQchEAyzAQtBISEQDLIBC0EiIRAMsQELQR4hEAywAQtBIyEQDK8BC0ESIRAMrgELQREhEAytAQtBJCEQDKwBC0ElIRAMqwELQSYhEAyqAQtBJyEQDKkBC0HDASEQDKgBC0EpIRAMpwELQSshEAymAQtBLCEQDKUBC0EtIRAMpAELQS4hEAyjAQtBLyEQDKIBC0HEASEQDKEBC0EwIRAMoAELQTQhEAyfAQtBDCEQDJ4BC0ExIRAMnQELQTIhEAycAQtBMyEQDJsBC0E5IRAMmgELQTUhEAyZAQtBxQEhEAyYAQtBCyEQDJcBC0E6IRAMlgELQTYhEAyVAQtBCiEQDJQBC0E3IRAMkwELQTghEAySAQtBPCEQDJEBC0E7IRAMkAELQT0hEAyPAQtBCSEQDI4BC0EoIRAMjQELQT4hEAyMAQtBPyEQDIsBC0HAACEQDIoBC0HBACEQDIkBC0HCACEQDIgBC0HDACEQDIcBC0HEACEQDIYBC0HFACEQDIUBC0HGACEQDIQBC0EqIRAMgwELQccAIRAMggELQcgAIRAMgQELQckAIRAMgAELQcoAIRAMfwtBywAhEAx+C0HNACEQDH0LQcwAIRAMfAtBzgAhEAx7C0HPACEQDHoLQdAAIRAMeQtB0QAhEAx4C0HSACEQDHcLQdMAIRAMdgtB1AAhEAx1C0HWACEQDHQLQdUAIRAMcwtBBiEQDHILQdcAIRAMcQtBBSEQDHALQdgAIRAMbwtBBCEQDG4LQdkAIRAMbQtB2gAhEAxsC0HbACEQDGsLQdwAIRAMagtBAyEQDGkLQd0AIRAMaAtB3gAhEAxnC0HfACEQDGYLQeEAIRAMZQtB4AAhEAxkC0HiACEQDGMLQeMAIRAMYgtBAiEQDGELQeQAIRAMYAtB5QAhEAxfC0HmACEQDF4LQecAIRAMXQtB6AAhEAxcC0HpACEQDFsLQeoAIRAMWgtB6wAhEAxZC0HsACEQDFgLQe0AIRAMVwtB7gAhEAxWC0HvACEQDFULQfAAIRAMVAtB8QAhEAxTC0HyACEQDFILQfMAIRAMUQtB9AAhEAxQC0H1ACEQDE8LQfYAIRAMTgtB9wAhEAxNC0H4ACEQDEwLQfkAIRAMSwtB+gAhEAxKC0H7ACEQDEkLQfwAIRAMSAtB/QAhEAxHC0H+ACEQDEYLQf8AIRAMRQtBgAEhEAxEC0GBASEQDEMLQYIBIRAMQgtBgwEhEAxBC0GEASEQDEALQYUBIRAMPwtBhgEhEAw+C0GHASEQDD0LQYgBIRAMPAtBiQEhEAw7C0GKASEQDDoLQYsBIRAMOQtBjAEhEAw4C0GNASEQDDcLQY4BIRAMNgtBjwEhEAw1C0GQASEQDDQLQZEBIRAMMwtBkgEhEAwyC0GTASEQDDELQZQBIRAMMAtBlQEhEAwvC0GWASEQDC4LQZcBIRAMLQtBmAEhEAwsC0GZASEQDCsLQZoBIRAMKgtBmwEhEAwpC0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAMLIAFBAWoiASACRw0AC0EVIRAM3wMLQRUhEAzeAwsDQAJAIAEtAABB8LmAgABqLQAAIhBBAkYNACAQQX9qDgTeAewB4AHrAewBCyABQQFqIgEgAkcNAAtBGCEQDN0DCwJAIAEiASACRg0AIABBi4CAgAA2AgggACABNgIEIAEhAUEHIRAMxAMLQRkhEAzcAwsgAUEBaiEBDAILAkAgASIUIAJHDQBBGiEQDNsDCyAUIQECQCAULQAAQXNqDhTdAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAgDuAgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQM2gMLAkAgAS0AACIQQTtGDQAgEEENRw3oASABQQFqIQEM5QILIAFBAWohAQtBIiEQDL8DCwJAIAEiECACRw0AQRwhEAzYAwtCACERIBAhASAQLQAAQVBqDjfnAeYBAQIDBAUGBwgAAAAAAAAACQoLDA0OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPEBESExQAC0EeIRAMvQMLQgIhEQzlAQtCAyERDOQBC0IEIREM4wELQgUhEQziAQtCBiERDOEBC0IHIREM4AELQgghEQzfAQtCCSERDN4BC0IKIREM3QELQgshEQzcAQtCDCERDNsBC0INIREM2gELQg4hEQzZAQtCDyERDNgBC0IKIREM1wELQgshEQzWAQtCDCERDNUBC0INIREM1AELQg4hEQzTAQtCDyERDNIBC0IAIRECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAtAABBUGoON+UB5AEAAQIDBAUGB+YB5gHmAeYB5gHmAeYBCAkKCwwN5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAQ4PEBESE+YBC0ICIREM5AELQgMhEQzjAQtCBCERDOIBC0IFIREM4QELQgYhEQzgAQtCByERDN8BC0IIIREM3gELQgkhEQzdAQtCCiERDNwBC0ILIREM2wELQgwhEQzaAQtCDSERDNkBC0IOIREM2AELQg8hEQzXAQtCCiERDNYBC0ILIREM1QELQgwhEQzUAQtCDSERDNMBC0IOIREM0gELQg8hEQzRAQsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3SAUEfIRAMwAMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQSQhEAynAwtBICEQDL8DCyAAIAEiECACEL6AgIAAQX9qDgW2AQDFAgHRAdIBC0ERIRAMpAMLIABBAToALyAQIQEMuwMLIAEiASACRw3SAUEkIRAMuwMLIAEiDSACRw0eQcYAIRAMugMLIAAgASIBIAIQsoCAgAAiEA3UASABIQEMtQELIAEiECACRw0mQdAAIRAMuAMLAkAgASIBIAJHDQBBKCEQDLgDCyAAQQA2AgQgAEGMgICAADYCCCAAIAEgARCxgICAACIQDdMBIAEhAQzYAQsCQCABIhAgAkcNAEEpIRAMtwMLIBAtAAAiAUEgRg0UIAFBCUcN0wEgEEEBaiEBDBULAkAgASIBIAJGDQAgAUEBaiEBDBcLQSohEAy1AwsCQCABIhAgAkcNAEErIRAMtQMLAkAgEC0AACIBQQlGDQAgAUEgRw3VAQsgAC0ALEEIRg3TASAQIQEMkQMLAkAgASIBIAJHDQBBLCEQDLQDCyABLQAAQQpHDdUBIAFBAWohAQzJAgsgASIOIAJHDdUBQS8hEAyyAwsDQAJAIAEtAAAiEEEgRg0AAkAgEEF2ag4EANwB3AEA2gELIAEhAQzgAQsgAUEBaiIBIAJHDQALQTEhEAyxAwtBMiEQIAEiFCACRg2wAyACIBRrIAAoAgAiAWohFSAUIAFrQQNqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB8LuAgABqLQAARw0BAkAgAUEDRw0AQQYhAQyWAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMsQMLIABBADYCACAUIQEM2QELQTMhECABIhQgAkYNrwMgAiAUayAAKAIAIgFqIRUgFCABa0EIaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfS7gIAAai0AAEcNAQJAIAFBCEcNAEEFIQEMlQMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLADCyAAQQA2AgAgFCEBDNgBC0E0IRAgASIUIAJGDa4DIAIgFGsgACgCACIBaiEVIBQgAWtBBWohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUHQwoCAAGotAABHDQECQCABQQVHDQBBByEBDJQDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAyvAwsgAEEANgIAIBQhAQzXAQsCQCABIgEgAkYNAANAAkAgAS0AAEGAvoCAAGotAAAiEEEBRg0AIBBBAkYNCiABIQEM3QELIAFBAWoiASACRw0AC0EwIRAMrgMLQTAhEAytAwsCQCABIgEgAkYNAANAAkAgAS0AACIQQSBGDQAgEEF2ag4E2QHaAdoB2QHaAQsgAUEBaiIBIAJHDQALQTghEAytAwtBOCEQDKwDCwNAAkAgAS0AACIQQSBGDQAgEEEJRw0DCyABQQFqIgEgAkcNAAtBPCEQDKsDCwNAAkAgAS0AACIQQSBGDQACQAJAIBBBdmoOBNoBAQHaAQALIBBBLEYN2wELIAEhAQwECyABQQFqIgEgAkcNAAtBPyEQDKoDCyABIQEM2wELQcAAIRAgASIUIAJGDagDIAIgFGsgACgCACIBaiEWIBQgAWtBBmohFwJAA0AgFC0AAEEgciABQYDAgIAAai0AAEcNASABQQZGDY4DIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADKkDCyAAQQA2AgAgFCEBC0E2IRAMjgMLAkAgASIPIAJHDQBBwQAhEAynAwsgAEGMgICAADYCCCAAIA82AgQgDyEBIAAtACxBf2oOBM0B1QHXAdkBhwMLIAFBAWohAQzMAQsCQCABIgEgAkYNAANAAkAgAS0AACIQQSByIBAgEEG/f2pB/wFxQRpJG0H/AXEiEEEJRg0AIBBBIEYNAAJAAkACQAJAIBBBnX9qDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTEhEAyRAwsgAUEBaiEBQTIhEAyQAwsgAUEBaiEBQTMhEAyPAwsgASEBDNABCyABQQFqIgEgAkcNAAtBNSEQDKUDC0E1IRAMpAMLAkAgASIBIAJGDQADQAJAIAEtAABBgLyAgABqLQAAQQFGDQAgASEBDNMBCyABQQFqIgEgAkcNAAtBPSEQDKQDC0E9IRAMowMLIAAgASIBIAIQsICAgAAiEA3WASABIQEMAQsgEEEBaiEBC0E8IRAMhwMLAkAgASIBIAJHDQBBwgAhEAygAwsCQANAAkAgAS0AAEF3ag4YAAL+Av4ChAP+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gIA/gILIAFBAWoiASACRw0AC0HCACEQDKADCyABQQFqIQEgAC0ALUEBcUUNvQEgASEBC0EsIRAMhQMLIAEiASACRw3TAUHEACEQDJ0DCwNAAkAgAS0AAEGQwICAAGotAABBAUYNACABIQEMtwILIAFBAWoiASACRw0AC0HFACEQDJwDCyANLQAAIhBBIEYNswEgEEE6Rw2BAyAAKAIEIQEgAEEANgIEIAAgASANEK+AgIAAIgEN0AEgDUEBaiEBDLMCC0HHACEQIAEiDSACRg2aAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQZDCgIAAai0AAEcNgAMgAUEFRg30AiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyaAwtByAAhECABIg0gAkYNmQMgAiANayAAKAIAIgFqIRYgDSABa0EJaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGWwoCAAGotAABHDf8CAkAgAUEJRw0AQQIhAQz1AgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmQMLAkAgASINIAJHDQBByQAhEAyZAwsCQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZJ/ag4HAIADgAOAA4ADgAMBgAMLIA1BAWohAUE+IRAMgAMLIA1BAWohAUE/IRAM/wILQcoAIRAgASINIAJGDZcDIAIgDWsgACgCACIBaiEWIA0gAWtBAWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBoMKAgABqLQAARw39AiABQQFGDfACIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJcDC0HLACEQIAEiDSACRg2WAyACIA1rIAAoAgAiAWohFiANIAFrQQ5qIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaLCgIAAai0AAEcN/AIgAUEORg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyWAwtBzAAhECABIg0gAkYNlQMgAiANayAAKAIAIgFqIRYgDSABa0EPaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUHAwoCAAGotAABHDfsCAkAgAUEPRw0AQQMhAQzxAgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlQMLQc0AIRAgASINIAJGDZQDIAIgDWsgACgCACIBaiEWIA0gAWtBBWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw36AgJAIAFBBUcNAEEEIQEM8AILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJQDCwJAIAEiDSACRw0AQc4AIRAMlAMLAkACQAJAAkAgDS0AACIBQSByIAEgAUG/f2pB/wFxQRpJG0H/AXFBnX9qDhMA/QL9Av0C/QL9Av0C/QL9Av0C/QL9Av0CAf0C/QL9AgID/QILIA1BAWohAUHBACEQDP0CCyANQQFqIQFBwgAhEAz8AgsgDUEBaiEBQcMAIRAM+wILIA1BAWohAUHEACEQDPoCCwJAIAEiASACRg0AIABBjYCAgAA2AgggACABNgIEIAEhAUHFACEQDPoCC0HPACEQDJIDCyAQIQECQAJAIBAtAABBdmoOBAGoAqgCAKgCCyAQQQFqIQELQSchEAz4AgsCQCABIgEgAkcNAEHRACEQDJEDCwJAIAEtAABBIEYNACABIQEMjQELIAFBAWohASAALQAtQQFxRQ3HASABIQEMjAELIAEiFyACRw3IAUHSACEQDI8DC0HTACEQIAEiFCACRg2OAyACIBRrIAAoAgAiAWohFiAUIAFrQQFqIRcDQCAULQAAIAFB1sKAgABqLQAARw3MASABQQFGDccBIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADI4DCwJAIAEiASACRw0AQdUAIRAMjgMLIAEtAABBCkcNzAEgAUEBaiEBDMcBCwJAIAEiASACRw0AQdYAIRAMjQMLAkACQCABLQAAQXZqDgQAzQHNAQHNAQsgAUEBaiEBDMcBCyABQQFqIQFBygAhEAzzAgsgACABIgEgAhCugICAACIQDcsBIAEhAUHNACEQDPICCyAALQApQSJGDYUDDKYCCwJAIAEiASACRw0AQdsAIRAMigMLQQAhFEEBIRdBASEWQQAhEAJAAkACQAJAAkACQAJAAkACQCABLQAAQVBqDgrUAdMBAAECAwQFBgjVAQtBAiEQDAYLQQMhEAwFC0EEIRAMBAtBBSEQDAMLQQYhEAwCC0EHIRAMAQtBCCEQC0EAIRdBACEWQQAhFAzMAQtBCSEQQQEhFEEAIRdBACEWDMsBCwJAIAEiASACRw0AQd0AIRAMiQMLIAEtAABBLkcNzAEgAUEBaiEBDKYCCyABIgEgAkcNzAFB3wAhEAyHAwsCQCABIgEgAkYNACAAQY6AgIAANgIIIAAgATYCBCABIQFB0AAhEAzuAgtB4AAhEAyGAwtB4QAhECABIgEgAkYNhQMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQeLCgIAAai0AAEcNzQEgFEEDRg3MASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyFAwtB4gAhECABIgEgAkYNhAMgAiABayAAKAIAIhRqIRYgASAUa0ECaiEXA0AgAS0AACAUQebCgIAAai0AAEcNzAEgFEECRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyEAwtB4wAhECABIgEgAkYNgwMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQenCgIAAai0AAEcNywEgFEEDRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyDAwsCQCABIgEgAkcNAEHlACEQDIMDCyAAIAFBAWoiASACEKiAgIAAIhANzQEgASEBQdYAIRAM6QILAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AAkACQAJAIBBBuH9qDgsAAc8BzwHPAc8BzwHPAc8BzwECzwELIAFBAWohAUHSACEQDO0CCyABQQFqIQFB0wAhEAzsAgsgAUEBaiEBQdQAIRAM6wILIAFBAWoiASACRw0AC0HkACEQDIIDC0HkACEQDIEDCwNAAkAgAS0AAEHwwoCAAGotAAAiEEEBRg0AIBBBfmoOA88B0AHRAdIBCyABQQFqIgEgAkcNAAtB5gAhEAyAAwsCQCABIgEgAkYNACABQQFqIQEMAwtB5wAhEAz/AgsDQAJAIAEtAABB8MSAgABqLQAAIhBBAUYNAAJAIBBBfmoOBNIB0wHUAQDVAQsgASEBQdcAIRAM5wILIAFBAWoiASACRw0AC0HoACEQDP4CCwJAIAEiASACRw0AQekAIRAM/gILAkAgAS0AACIQQXZqDhq6AdUB1QG8AdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAcoB1QHVAQDTAQsgAUEBaiEBC0EGIRAM4wILA0ACQCABLQAAQfDGgIAAai0AAEEBRg0AIAEhAQyeAgsgAUEBaiIBIAJHDQALQeoAIRAM+wILAkAgASIBIAJGDQAgAUEBaiEBDAMLQesAIRAM+gILAkAgASIBIAJHDQBB7AAhEAz6AgsgAUEBaiEBDAELAkAgASIBIAJHDQBB7QAhEAz5AgsgAUEBaiEBC0EEIRAM3gILAkAgASIUIAJHDQBB7gAhEAz3AgsgFCEBAkACQAJAIBQtAABB8MiAgABqLQAAQX9qDgfUAdUB1gEAnAIBAtcBCyAUQQFqIQEMCgsgFEEBaiEBDM0BC0EAIRAgAEEANgIcIABBm5KAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAz2AgsCQANAAkAgAS0AAEHwyICAAGotAAAiEEEERg0AAkACQCAQQX9qDgfSAdMB1AHZAQAEAdkBCyABIQFB2gAhEAzgAgsgAUEBaiEBQdwAIRAM3wILIAFBAWoiASACRw0AC0HvACEQDPYCCyABQQFqIQEMywELAkAgASIUIAJHDQBB8AAhEAz1AgsgFC0AAEEvRw3UASAUQQFqIQEMBgsCQCABIhQgAkcNAEHxACEQDPQCCwJAIBQtAAAiAUEvRw0AIBRBAWohAUHdACEQDNsCCyABQXZqIgRBFksN0wFBASAEdEGJgIACcUUN0wEMygILAkAgASIBIAJGDQAgAUEBaiEBQd4AIRAM2gILQfIAIRAM8gILAkAgASIUIAJHDQBB9AAhEAzyAgsgFCEBAkAgFC0AAEHwzICAAGotAABBf2oOA8kClAIA1AELQeEAIRAM2AILAkAgASIUIAJGDQADQAJAIBQtAABB8MqAgABqLQAAIgFBA0YNAAJAIAFBf2oOAssCANUBCyAUIQFB3wAhEAzaAgsgFEEBaiIUIAJHDQALQfMAIRAM8QILQfMAIRAM8AILAkAgASIBIAJGDQAgAEGPgICAADYCCCAAIAE2AgQgASEBQeAAIRAM1wILQfUAIRAM7wILAkAgASIBIAJHDQBB9gAhEAzvAgsgAEGPgICAADYCCCAAIAE2AgQgASEBC0EDIRAM1AILA0AgAS0AAEEgRw3DAiABQQFqIgEgAkcNAAtB9wAhEAzsAgsCQCABIgEgAkcNAEH4ACEQDOwCCyABLQAAQSBHDc4BIAFBAWohAQzvAQsgACABIgEgAhCsgICAACIQDc4BIAEhAQyOAgsCQCABIgQgAkcNAEH6ACEQDOoCCyAELQAAQcwARw3RASAEQQFqIQFBEyEQDM8BCwJAIAEiBCACRw0AQfsAIRAM6QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEANAIAQtAAAgAUHwzoCAAGotAABHDdABIAFBBUYNzgEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBB+wAhEAzoAgsCQCABIgQgAkcNAEH8ACEQDOgCCwJAAkAgBC0AAEG9f2oODADRAdEB0QHRAdEB0QHRAdEB0QHRAQHRAQsgBEEBaiEBQeYAIRAMzwILIARBAWohAUHnACEQDM4CCwJAIAEiBCACRw0AQf0AIRAM5wILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNzwEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf0AIRAM5wILIABBADYCACAQQQFqIQFBECEQDMwBCwJAIAEiBCACRw0AQf4AIRAM5gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQfbOgIAAai0AAEcNzgEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf4AIRAM5gILIABBADYCACAQQQFqIQFBFiEQDMsBCwJAIAEiBCACRw0AQf8AIRAM5QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQfzOgIAAai0AAEcNzQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf8AIRAM5QILIABBADYCACAQQQFqIQFBBSEQDMoBCwJAIAEiBCACRw0AQYABIRAM5AILIAQtAABB2QBHDcsBIARBAWohAUEIIRAMyQELAkAgASIEIAJHDQBBgQEhEAzjAgsCQAJAIAQtAABBsn9qDgMAzAEBzAELIARBAWohAUHrACEQDMoCCyAEQQFqIQFB7AAhEAzJAgsCQCABIgQgAkcNAEGCASEQDOICCwJAAkAgBC0AAEG4f2oOCADLAcsBywHLAcsBywEBywELIARBAWohAUHqACEQDMkCCyAEQQFqIQFB7QAhEAzIAgsCQCABIgQgAkcNAEGDASEQDOECCyACIARrIAAoAgAiAWohECAEIAFrQQJqIRQCQANAIAQtAAAgAUGAz4CAAGotAABHDckBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgEDYCAEGDASEQDOECC0EAIRAgAEEANgIAIBRBAWohAQzGAQsCQCABIgQgAkcNAEGEASEQDOACCyACIARrIAAoAgAiAWohFCAEIAFrQQRqIRACQANAIAQtAAAgAUGDz4CAAGotAABHDcgBIAFBBEYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGEASEQDOACCyAAQQA2AgAgEEEBaiEBQSMhEAzFAQsCQCABIgQgAkcNAEGFASEQDN8CCwJAAkAgBC0AAEG0f2oOCADIAcgByAHIAcgByAEByAELIARBAWohAUHvACEQDMYCCyAEQQFqIQFB8AAhEAzFAgsCQCABIgQgAkcNAEGGASEQDN4CCyAELQAAQcUARw3FASAEQQFqIQEMgwILAkAgASIEIAJHDQBBhwEhEAzdAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBiM+AgABqLQAARw3FASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhwEhEAzdAgsgAEEANgIAIBBBAWohAUEtIRAMwgELAkAgASIEIAJHDQBBiAEhEAzcAgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw3EASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiAEhEAzcAgsgAEEANgIAIBBBAWohAUEpIRAMwQELAkAgASIBIAJHDQBBiQEhEAzbAgtBASEQIAEtAABB3wBHDcABIAFBAWohAQyBAgsCQCABIgQgAkcNAEGKASEQDNoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRADQCAELQAAIAFBjM+AgABqLQAARw3BASABQQFGDa8CIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYoBIRAM2QILAkAgASIEIAJHDQBBiwEhEAzZAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBjs+AgABqLQAARw3BASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiwEhEAzZAgsgAEEANgIAIBBBAWohAUECIRAMvgELAkAgASIEIAJHDQBBjAEhEAzYAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw3AASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjAEhEAzYAgsgAEEANgIAIBBBAWohAUEfIRAMvQELAkAgASIEIAJHDQBBjQEhEAzXAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8s+AgABqLQAARw2/ASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjQEhEAzXAgsgAEEANgIAIBBBAWohAUEJIRAMvAELAkAgASIEIAJHDQBBjgEhEAzWAgsCQAJAIAQtAABBt39qDgcAvwG/Ab8BvwG/AQG/AQsgBEEBaiEBQfgAIRAMvQILIARBAWohAUH5ACEQDLwCCwJAIAEiBCACRw0AQY8BIRAM1QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQZHPgIAAai0AAEcNvQEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY8BIRAM1QILIABBADYCACAQQQFqIQFBGCEQDLoBCwJAIAEiBCACRw0AQZABIRAM1AILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQZfPgIAAai0AAEcNvAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZABIRAM1AILIABBADYCACAQQQFqIQFBFyEQDLkBCwJAIAEiBCACRw0AQZEBIRAM0wILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQZrPgIAAai0AAEcNuwEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZEBIRAM0wILIABBADYCACAQQQFqIQFBFSEQDLgBCwJAIAEiBCACRw0AQZIBIRAM0gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQaHPgIAAai0AAEcNugEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZIBIRAM0gILIABBADYCACAQQQFqIQFBHiEQDLcBCwJAIAEiBCACRw0AQZMBIRAM0QILIAQtAABBzABHDbgBIARBAWohAUEKIRAMtgELAkAgBCACRw0AQZQBIRAM0AILAkACQCAELQAAQb9/ag4PALkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AbkBAbkBCyAEQQFqIQFB/gAhEAy3AgsgBEEBaiEBQf8AIRAMtgILAkAgBCACRw0AQZUBIRAMzwILAkACQCAELQAAQb9/ag4DALgBAbgBCyAEQQFqIQFB/QAhEAy2AgsgBEEBaiEEQYABIRAMtQILAkAgBCACRw0AQZYBIRAMzgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQafPgIAAai0AAEcNtgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZYBIRAMzgILIABBADYCACAQQQFqIQFBCyEQDLMBCwJAIAQgAkcNAEGXASEQDM0CCwJAAkACQAJAIAQtAABBU2oOIwC4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBAbgBuAG4AbgBuAECuAG4AbgBA7gBCyAEQQFqIQFB+wAhEAy2AgsgBEEBaiEBQfwAIRAMtQILIARBAWohBEGBASEQDLQCCyAEQQFqIQRBggEhEAyzAgsCQCAEIAJHDQBBmAEhEAzMAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBqc+AgABqLQAARw20ASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmAEhEAzMAgsgAEEANgIAIBBBAWohAUEZIRAMsQELAkAgBCACRw0AQZkBIRAMywILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQa7PgIAAai0AAEcNswEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZkBIRAMywILIABBADYCACAQQQFqIQFBBiEQDLABCwJAIAQgAkcNAEGaASEQDMoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG0z4CAAGotAABHDbIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGaASEQDMoCCyAAQQA2AgAgEEEBaiEBQRwhEAyvAQsCQCAEIAJHDQBBmwEhEAzJAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBts+AgABqLQAARw2xASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmwEhEAzJAgsgAEEANgIAIBBBAWohAUEnIRAMrgELAkAgBCACRw0AQZwBIRAMyAILAkACQCAELQAAQax/ag4CAAGxAQsgBEEBaiEEQYYBIRAMrwILIARBAWohBEGHASEQDK4CCwJAIAQgAkcNAEGdASEQDMcCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG4z4CAAGotAABHDa8BIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGdASEQDMcCCyAAQQA2AgAgEEEBaiEBQSYhEAysAQsCQCAEIAJHDQBBngEhEAzGAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBus+AgABqLQAARw2uASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBngEhEAzGAgsgAEEANgIAIBBBAWohAUEDIRAMqwELAkAgBCACRw0AQZ8BIRAMxQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNrQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ8BIRAMxQILIABBADYCACAQQQFqIQFBDCEQDKoBCwJAIAQgAkcNAEGgASEQDMQCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUG8z4CAAGotAABHDawBIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGgASEQDMQCCyAAQQA2AgAgEEEBaiEBQQ0hEAypAQsCQCAEIAJHDQBBoQEhEAzDAgsCQAJAIAQtAABBun9qDgsArAGsAawBrAGsAawBrAGsAawBAawBCyAEQQFqIQRBiwEhEAyqAgsgBEEBaiEEQYwBIRAMqQILAkAgBCACRw0AQaIBIRAMwgILIAQtAABB0ABHDakBIARBAWohBAzpAQsCQCAEIAJHDQBBowEhEAzBAgsCQAJAIAQtAABBt39qDgcBqgGqAaoBqgGqAQCqAQsgBEEBaiEEQY4BIRAMqAILIARBAWohAUEiIRAMpgELAkAgBCACRw0AQaQBIRAMwAILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQcDPgIAAai0AAEcNqAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaQBIRAMwAILIABBADYCACAQQQFqIQFBHSEQDKUBCwJAIAQgAkcNAEGlASEQDL8CCwJAAkAgBC0AAEGuf2oOAwCoAQGoAQsgBEEBaiEEQZABIRAMpgILIARBAWohAUEEIRAMpAELAkAgBCACRw0AQaYBIRAMvgILAkACQAJAAkACQCAELQAAQb9/ag4VAKoBqgGqAaoBqgGqAaoBqgGqAaoBAaoBqgECqgGqAQOqAaoBBKoBCyAEQQFqIQRBiAEhEAyoAgsgBEEBaiEEQYkBIRAMpwILIARBAWohBEGKASEQDKYCCyAEQQFqIQRBjwEhEAylAgsgBEEBaiEEQZEBIRAMpAILAkAgBCACRw0AQacBIRAMvQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNpQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQacBIRAMvQILIABBADYCACAQQQFqIQFBESEQDKIBCwJAIAQgAkcNAEGoASEQDLwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHCz4CAAGotAABHDaQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGoASEQDLwCCyAAQQA2AgAgEEEBaiEBQSwhEAyhAQsCQCAEIAJHDQBBqQEhEAy7AgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBxc+AgABqLQAARw2jASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqQEhEAy7AgsgAEEANgIAIBBBAWohAUErIRAMoAELAkAgBCACRw0AQaoBIRAMugILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQcrPgIAAai0AAEcNogEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaoBIRAMugILIABBADYCACAQQQFqIQFBFCEQDJ8BCwJAIAQgAkcNAEGrASEQDLkCCwJAAkACQAJAIAQtAABBvn9qDg8AAQKkAaQBpAGkAaQBpAGkAaQBpAGkAaQBA6QBCyAEQQFqIQRBkwEhEAyiAgsgBEEBaiEEQZQBIRAMoQILIARBAWohBEGVASEQDKACCyAEQQFqIQRBlgEhEAyfAgsCQCAEIAJHDQBBrAEhEAy4AgsgBC0AAEHFAEcNnwEgBEEBaiEEDOABCwJAIAQgAkcNAEGtASEQDLcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHNz4CAAGotAABHDZ8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGtASEQDLcCCyAAQQA2AgAgEEEBaiEBQQ4hEAycAQsCQCAEIAJHDQBBrgEhEAy2AgsgBC0AAEHQAEcNnQEgBEEBaiEBQSUhEAybAQsCQCAEIAJHDQBBrwEhEAy1AgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw2dASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrwEhEAy1AgsgAEEANgIAIBBBAWohAUEqIRAMmgELAkAgBCACRw0AQbABIRAMtAILAkACQCAELQAAQat/ag4LAJ0BnQGdAZ0BnQGdAZ0BnQGdAQGdAQsgBEEBaiEEQZoBIRAMmwILIARBAWohBEGbASEQDJoCCwJAIAQgAkcNAEGxASEQDLMCCwJAAkAgBC0AAEG/f2oOFACcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAEBnAELIARBAWohBEGZASEQDJoCCyAEQQFqIQRBnAEhEAyZAgsCQCAEIAJHDQBBsgEhEAyyAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFB2c+AgABqLQAARw2aASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBsgEhEAyyAgsgAEEANgIAIBBBAWohAUEhIRAMlwELAkAgBCACRw0AQbMBIRAMsQILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQd3PgIAAai0AAEcNmQEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbMBIRAMsQILIABBADYCACAQQQFqIQFBGiEQDJYBCwJAIAQgAkcNAEG0ASEQDLACCwJAAkACQCAELQAAQbt/ag4RAJoBmgGaAZoBmgGaAZoBmgGaAQGaAZoBmgGaAZoBApoBCyAEQQFqIQRBnQEhEAyYAgsgBEEBaiEEQZ4BIRAMlwILIARBAWohBEGfASEQDJYCCwJAIAQgAkcNAEG1ASEQDK8CCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUHkz4CAAGotAABHDZcBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG1ASEQDK8CCyAAQQA2AgAgEEEBaiEBQSghEAyUAQsCQCAEIAJHDQBBtgEhEAyuAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB6s+AgABqLQAARw2WASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtgEhEAyuAgsgAEEANgIAIBBBAWohAUEHIRAMkwELAkAgBCACRw0AQbcBIRAMrQILAkACQCAELQAAQbt/ag4OAJYBlgGWAZYBlgGWAZYBlgGWAZYBlgGWAQGWAQsgBEEBaiEEQaEBIRAMlAILIARBAWohBEGiASEQDJMCCwJAIAQgAkcNAEG4ASEQDKwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDZQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG4ASEQDKwCCyAAQQA2AgAgEEEBaiEBQRIhEAyRAQsCQCAEIAJHDQBBuQEhEAyrAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw2TASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuQEhEAyrAgsgAEEANgIAIBBBAWohAUEgIRAMkAELAkAgBCACRw0AQboBIRAMqgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNkgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQboBIRAMqgILIABBADYCACAQQQFqIQFBDyEQDI8BCwJAIAQgAkcNAEG7ASEQDKkCCwJAAkAgBC0AAEG3f2oOBwCSAZIBkgGSAZIBAZIBCyAEQQFqIQRBpQEhEAyQAgsgBEEBaiEEQaYBIRAMjwILAkAgBCACRw0AQbwBIRAMqAILIAIgBGsgACgCACIBaiEUIAQgAWtBB2ohEAJAA0AgBC0AACABQfTPgIAAai0AAEcNkAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbwBIRAMqAILIABBADYCACAQQQFqIQFBGyEQDI0BCwJAIAQgAkcNAEG9ASEQDKcCCwJAAkACQCAELQAAQb5/ag4SAJEBkQGRAZEBkQGRAZEBkQGRAQGRAZEBkQGRAZEBkQECkQELIARBAWohBEGkASEQDI8CCyAEQQFqIQRBpwEhEAyOAgsgBEEBaiEEQagBIRAMjQILAkAgBCACRw0AQb4BIRAMpgILIAQtAABBzgBHDY0BIARBAWohBAzPAQsCQCAEIAJHDQBBvwEhEAylAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA5wBBAUGnAGcAZwBBwgJCgucAQwNDg+cAQsgBEEBaiEBQegAIRAMmgILIARBAWohAUHpACEQDJkCCyAEQQFqIQFB7gAhEAyYAgsgBEEBaiEBQfIAIRAMlwILIARBAWohAUHzACEQDJYCCyAEQQFqIQFB9gAhEAyVAgsgBEEBaiEBQfcAIRAMlAILIARBAWohAUH6ACEQDJMCCyAEQQFqIQRBgwEhEAySAgsgBEEBaiEEQYQBIRAMkQILIARBAWohBEGFASEQDJACCyAEQQFqIQRBkgEhEAyPAgsgBEEBaiEEQZgBIRAMjgILIARBAWohBEGgASEQDI0CCyAEQQFqIQRBowEhEAyMAgsgBEEBaiEEQaoBIRAMiwILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBIRAMiwILQcABIRAMowILIAAgBSACEKqAgIAAIgENiwEgBSEBDFwLAkAgBiACRg0AIAZBAWohBQyNAQtBwgEhEAyhAgsDQAJAIBAtAABBdmoOBIwBAACPAQALIBBBAWoiECACRw0AC0HDASEQDKACCwJAIAcgAkYNACAAQZGAgIAANgIIIAAgBzYCBCAHIQFBASEQDIcCC0HEASEQDJ8CCwJAIAcgAkcNAEHFASEQDJ8CCwJAAkAgBy0AAEF2ag4EAc4BzgEAzgELIAdBAWohBgyNAQsgB0EBaiEFDIkBCwJAIAcgAkcNAEHGASEQDJ4CCwJAAkAgBy0AAEF2ag4XAY8BjwEBjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAI8BCyAHQQFqIQcLQbABIRAMhAILAkAgCCACRw0AQcgBIRAMnQILIAgtAABBIEcNjQEgAEEAOwEyIAhBAWohAUGzASEQDIMCCyABIRcCQANAIBciByACRg0BIActAABBUGpB/wFxIhBBCk8NzAECQCAALwEyIhRBmTNLDQAgACAUQQpsIhQ7ATIgEEH//wNzIBRB/v8DcUkNACAHQQFqIRcgACAUIBBqIhA7ATIgEEH//wNxQegHSQ0BCwtBACEQIABBADYCHCAAQcGJgIAANgIQIABBDTYCDCAAIAdBAWo2AhQMnAILQccBIRAMmwILIAAgCCACEK6AgIAAIhBFDcoBIBBBFUcNjAEgAEHIATYCHCAAIAg2AhQgAEHJl4CAADYCECAAQRU2AgxBACEQDJoCCwJAIAkgAkcNAEHMASEQDJoCC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgCS0AAEFQag4KlgGVAQABAgMEBQYIlwELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMjgELQQkhEEEBIRRBACEXQQAhFgyNAQsCQCAKIAJHDQBBzgEhEAyZAgsgCi0AAEEuRw2OASAKQQFqIQkMygELIAsgAkcNjgFB0AEhEAyXAgsCQCALIAJGDQAgAEGOgICAADYCCCAAIAs2AgRBtwEhEAz+AQtB0QEhEAyWAgsCQCAEIAJHDQBB0gEhEAyWAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EEaiELA0AgBC0AACAQQfzPgIAAai0AAEcNjgEgEEEERg3pASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHSASEQDJUCCyAAIAwgAhCsgICAACIBDY0BIAwhAQy4AQsCQCAEIAJHDQBB1AEhEAyUAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EBaiEMA0AgBC0AACAQQYHQgIAAai0AAEcNjwEgEEEBRg2OASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHUASEQDJMCCwJAIAQgAkcNAEHWASEQDJMCCyACIARrIAAoAgAiEGohFCAEIBBrQQJqIQsDQCAELQAAIBBBg9CAgABqLQAARw2OASAQQQJGDZABIBBBAWohECAEQQFqIgQgAkcNAAsgACAUNgIAQdYBIRAMkgILAkAgBCACRw0AQdcBIRAMkgILAkACQCAELQAAQbt/ag4QAI8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwEBjwELIARBAWohBEG7ASEQDPkBCyAEQQFqIQRBvAEhEAz4AQsCQCAEIAJHDQBB2AEhEAyRAgsgBC0AAEHIAEcNjAEgBEEBaiEEDMQBCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEG+ASEQDPcBC0HZASEQDI8CCwJAIAQgAkcNAEHaASEQDI8CCyAELQAAQcgARg3DASAAQQE6ACgMuQELIABBAjoALyAAIAQgAhCmgICAACIQDY0BQcIBIRAM9AELIAAtAChBf2oOArcBuQG4AQsDQAJAIAQtAABBdmoOBACOAY4BAI4BCyAEQQFqIgQgAkcNAAtB3QEhEAyLAgsgAEEAOgAvIAAtAC1BBHFFDYQCCyAAQQA6AC8gAEEBOgA0IAEhAQyMAQsgEEEVRg3aASAAQQA2AhwgACABNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAyIAgsCQCAAIBAgAhC0gICAACIEDQAgECEBDIECCwJAIARBFUcNACAAQQM2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAyIAgsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMhwILIBBBFUYN1gEgAEEANgIcIAAgATYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMhgILIAAoAgQhFyAAQQA2AgQgECARp2oiFiEBIAAgFyAQIBYgFBsiEBC1gICAACIURQ2NASAAQQc2AhwgACAQNgIUIAAgFDYCDEEAIRAMhQILIAAgAC8BMEGAAXI7ATAgASEBC0EqIRAM6gELIBBBFUYN0QEgAEEANgIcIAAgATYCFCAAQYOMgIAANgIQIABBEzYCDEEAIRAMggILIBBBFUYNzwEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAMgQILIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDI0BCyAAQQw2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMgAILIBBBFUYNzAEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM/wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIwBCyAAQQ02AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/gELIBBBFUYNyQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM/QELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIsBCyAAQQ42AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/AELIABBADYCHCAAIAE2AhQgAEHAlYCAADYCECAAQQI2AgxBACEQDPsBCyAQQRVGDcUBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPoBCyAAQRA2AhwgACABNgIUIAAgEDYCDEEAIRAM+QELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDPEBCyAAQRE2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM+AELIBBBFUYNwQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM9wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIgBCyAAQRM2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM9gELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDO0BCyAAQRQ2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM9QELIBBBFUYNvQEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM9AELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIYBCyAAQRY2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM8wELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC3gICAACIEDQAgAUEBaiEBDOkBCyAAQRc2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM8gELIABBADYCHCAAIAE2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDPEBC0IBIRELIBBBAWohAQJAIAApAyAiEkL//////////w9WDQAgACASQgSGIBGENwMgIAEhAQyEAQsgAEEANgIcIAAgATYCFCAAQa2JgIAANgIQIABBDDYCDEEAIRAM7wELIABBADYCHCAAIBA2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDO4BCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNcyAAQQU2AhwgACAQNgIUIAAgFDYCDEEAIRAM7QELIABBADYCHCAAIBA2AhQgAEGqnICAADYCECAAQQ82AgxBACEQDOwBCyAAIBAgAhC0gICAACIBDQEgECEBC0EOIRAM0QELAkAgAUEVRw0AIABBAjYCHCAAIBA2AhQgAEGwmICAADYCECAAQRU2AgxBACEQDOoBCyAAQQA2AhwgACAQNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAzpAQsgAUEBaiEQAkAgAC8BMCIBQYABcUUNAAJAIAAgECACELuAgIAAIgENACAQIQEMcAsgAUEVRw26ASAAQQU2AhwgACAQNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAzpAQsCQCABQaAEcUGgBEcNACAALQAtQQJxDQAgAEEANgIcIAAgEDYCFCAAQZaTgIAANgIQIABBBDYCDEEAIRAM6QELIAAgECACEL2AgIAAGiAQIQECQAJAAkACQAJAIAAgECACELOAgIAADhYCAQAEBAQEBAQEBAQEBAQEBAQEBAQDBAsgAEEBOgAuCyAAIAAvATBBwAByOwEwIBAhAQtBJiEQDNEBCyAAQSM2AhwgACAQNgIUIABBpZaAgAA2AhAgAEEVNgIMQQAhEAzpAQsgAEEANgIcIAAgEDYCFCAAQdWLgIAANgIQIABBETYCDEEAIRAM6AELIAAtAC1BAXFFDQFBwwEhEAzOAQsCQCANIAJGDQADQAJAIA0tAABBIEYNACANIQEMxAELIA1BAWoiDSACRw0AC0ElIRAM5wELQSUhEAzmAQsgACgCBCEEIABBADYCBCAAIAQgDRCvgICAACIERQ2tASAAQSY2AhwgACAENgIMIAAgDUEBajYCFEEAIRAM5QELIBBBFUYNqwEgAEEANgIcIAAgATYCFCAAQf2NgIAANgIQIABBHTYCDEEAIRAM5AELIABBJzYCHCAAIAE2AhQgACAQNgIMQQAhEAzjAQsgECEBQQEhFAJAAkACQAJAAkACQAJAIAAtACxBfmoOBwYFBQMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0ErIRAMygELIABBADYCHCAAIBA2AhQgAEGrkoCAADYCECAAQQs2AgxBACEQDOIBCyAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMQQAhEAzhAQsgAEEAOgAsIBAhAQy9AQsgECEBQQEhFAJAAkACQAJAAkAgAC0ALEF7ag4EAwECAAULIAAgAC8BMEEIcjsBMAwDC0ECIRQMAQtBBCEUCyAAQQE6ACwgACAALwEwIBRyOwEwCyAQIQELQSkhEAzFAQsgAEEANgIcIAAgATYCFCAAQfCUgIAANgIQIABBAzYCDEEAIRAM3QELAkAgDi0AAEENRw0AIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHULIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzdAQsgAC0ALUEBcUUNAUHEASEQDMMBCwJAIA4gAkcNAEEtIRAM3AELAkACQANAAkAgDi0AAEF2ag4EAgAAAwALIA5BAWoiDiACRw0AC0EtIRAM3QELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDiEBDHQLIABBLDYCHCAAIA42AhQgACABNgIMQQAhEAzcAQsgACgCBCEBIABBADYCBAJAIAAgASAOELGAgIAAIgENACAOQQFqIQEMcwsgAEEsNgIcIAAgATYCDCAAIA5BAWo2AhRBACEQDNsBCyAAKAIEIQQgAEEANgIEIAAgBCAOELGAgIAAIgQNoAEgDiEBDM4BCyAQQSxHDQEgAUEBaiEQQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIBAhAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIBAhAQwBCyAAIAAvATBBCHI7ATAgECEBC0E5IRAMvwELIABBADoALCABIQELQTQhEAy9AQsgACAALwEwQSByOwEwIAEhAQwCCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBA0AIAEhAQzHAQsgAEE3NgIcIAAgATYCFCAAIAQ2AgxBACEQDNQBCyAAQQg6ACwgASEBC0EwIRAMuQELAkAgAC0AKEEBRg0AIAEhAQwECyAALQAtQQhxRQ2TASABIQEMAwsgAC0AMEEgcQ2UAUHFASEQDLcBCwJAIA8gAkYNAAJAA0ACQCAPLQAAQVBqIgFB/wFxQQpJDQAgDyEBQTUhEAy6AQsgACkDICIRQpmz5syZs+bMGVYNASAAIBFCCn4iETcDICARIAGtQv8BgyISQn+FVg0BIAAgESASfDcDICAPQQFqIg8gAkcNAAtBOSEQDNEBCyAAKAIEIQIgAEEANgIEIAAgAiAPQQFqIgQQsYCAgAAiAg2VASAEIQEMwwELQTkhEAzPAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDZABCyAAIAFB9/sDcUGABHI7ATAgDyEBC0E3IRAMtAELIAAgAC8BMEEQcjsBMAyrAQsgEEEVRg2LASAAQQA2AhwgACABNgIUIABB8I6AgAA2AhAgAEEcNgIMQQAhEAzLAQsgAEHDADYCHCAAIAE2AgwgACANQQFqNgIUQQAhEAzKAQsCQCABLQAAQTpHDQAgACgCBCEQIABBADYCBAJAIAAgECABEK+AgIAAIhANACABQQFqIQEMYwsgAEHDADYCHCAAIBA2AgwgACABQQFqNgIUQQAhEAzKAQsgAEEANgIcIAAgATYCFCAAQbGRgIAANgIQIABBCjYCDEEAIRAMyQELIABBADYCHCAAIAE2AhQgAEGgmYCAADYCECAAQR42AgxBACEQDMgBCyAAQQA2AgALIABBgBI7ASogACAXQQFqIgEgAhCogICAACIQDQEgASEBC0HHACEQDKwBCyAQQRVHDYMBIABB0QA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAzEAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAzDAQsgAEEANgIcIAAgFDYCFCAAQcGogIAANgIQIABBBzYCDCAAQQA2AgBBACEQDMIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxdCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDMEBC0EAIRAgAEEANgIcIAAgATYCFCAAQYCRgIAANgIQIABBCTYCDAzAAQsgEEEVRg19IABBADYCHCAAIAE2AhQgAEGUjYCAADYCECAAQSE2AgxBACEQDL8BC0EBIRZBACEXQQAhFEEBIRALIAAgEDoAKyABQQFqIQECQAJAIAAtAC1BEHENAAJAAkACQCAALQAqDgMBAAIECyAWRQ0DDAILIBQNAQwCCyAXRQ0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQrYCAgAAiEA0AIAEhAQxcCyAAQdgANgIcIAAgATYCFCAAIBA2AgxBACEQDL4BCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQytAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhEAy9AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqwELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAIRAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMQwsgAEHlADYCHCAAIBQ2AhQgACABNgIMQQAhEAyiAQsgAEEANgIcIAAgFDYCFCAAQcOPgIAANgIQIABBBzYCDEEAIRAMoQELIABBADYCHCAAIAE2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKABC0EAIRAgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDAyfAQsgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDEEAIRAMngELIABBADYCHCAAIBQ2AhQgAEH+kYCAADYCECAAQQc2AgxBACEQDJ0BCyAAQQA2AhwgACABNgIUIABBjpuAgAA2AhAgAEEGNgIMQQAhEAycAQsgEEEVRg1XIABBADYCHCAAIAE2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDJsBCyAAQQA2AgAgEEEBaiEBQSQhEAsgACAQOgApIAAoAgQhECAAQQA2AgQgACAQIAEQq4CAgAAiEA1UIAEhAQw+CyAAQQA2AgALQQAhECAAQQA2AhwgACAENgIUIABB8ZuAgAA2AhAgAEEGNgIMDJcBCyABQRVGDVAgAEEANgIcIAAgBTYCFCAAQfCMgIAANgIQIABBGzYCDEEAIRAMlgELIAAoAgQhBSAAQQA2AgQgACAFIBAQqYCAgAAiBQ0BIBBBAWohBQtBrQEhEAx7CyAAQcEBNgIcIAAgBTYCDCAAIBBBAWo2AhRBACEQDJMBCyAAKAIEIQYgAEEANgIEIAAgBiAQEKmAgIAAIgYNASAQQQFqIQYLQa4BIRAMeAsgAEHCATYCHCAAIAY2AgwgACAQQQFqNgIUQQAhEAyQAQsgAEEANgIcIAAgBzYCFCAAQZeLgIAANgIQIABBDTYCDEEAIRAMjwELIABBADYCHCAAIAg2AhQgAEHjkICAADYCECAAQQk2AgxBACEQDI4BCyAAQQA2AhwgACAINgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAyNAQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgCUEBaiEIAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBCAAIBAgCBCtgICAACIQRQ09IABByQE2AhwgACAINgIUIAAgEDYCDEEAIRAMjAELIAAoAgQhBCAAQQA2AgQgACAEIAgQrYCAgAAiBEUNdiAAQcoBNgIcIAAgCDYCFCAAIAQ2AgxBACEQDIsBCyAAKAIEIQQgAEEANgIEIAAgBCAJEK2AgIAAIgRFDXQgAEHLATYCHCAAIAk2AhQgACAENgIMQQAhEAyKAQsgACgCBCEEIABBADYCBCAAIAQgChCtgICAACIERQ1yIABBzQE2AhwgACAKNgIUIAAgBDYCDEEAIRAMiQELAkAgCy0AAEFQaiIQQf8BcUEKTw0AIAAgEDoAKiALQQFqIQpBtgEhEAxwCyAAKAIEIQQgAEEANgIEIAAgBCALEK2AgIAAIgRFDXAgAEHPATYCHCAAIAs2AhQgACAENgIMQQAhEAyIAQsgAEEANgIcIAAgBDYCFCAAQZCzgIAANgIQIABBCDYCDCAAQQA2AgBBACEQDIcBCyABQRVGDT8gAEEANgIcIAAgDDYCFCAAQcyOgIAANgIQIABBIDYCDEEAIRAMhgELIABBgQQ7ASggACgCBCEQIABCADcDACAAIBAgDEEBaiIMEKuAgIAAIhBFDTggAEHTATYCHCAAIAw2AhQgACAQNgIMQQAhEAyFAQsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQdibgIAANgIQIABBCDYCDAyDAQsgACgCBCEQIABCADcDACAAIBAgC0EBaiILEKuAgIAAIhANAUHGASEQDGkLIABBAjoAKAxVCyAAQdUBNgIcIAAgCzYCFCAAIBA2AgxBACEQDIABCyAQQRVGDTcgAEEANgIcIAAgBDYCFCAAQaSMgIAANgIQIABBEDYCDEEAIRAMfwsgAC0ANEEBRw00IAAgBCACELyAgIAAIhBFDTQgEEEVRw01IABB3AE2AhwgACAENgIUIABB1ZaAgAA2AhAgAEEVNgIMQQAhEAx+C0EAIRAgAEEANgIcIABBr4uAgAA2AhAgAEECNgIMIAAgFEEBajYCFAx9C0EAIRAMYwtBAiEQDGILQQ0hEAxhC0EPIRAMYAtBJSEQDF8LQRMhEAxeC0EVIRAMXQtBFiEQDFwLQRchEAxbC0EYIRAMWgtBGSEQDFkLQRohEAxYC0EbIRAMVwtBHCEQDFYLQR0hEAxVC0EfIRAMVAtBISEQDFMLQSMhEAxSC0HGACEQDFELQS4hEAxQC0EvIRAMTwtBOyEQDE4LQT0hEAxNC0HIACEQDEwLQckAIRAMSwtBywAhEAxKC0HMACEQDEkLQc4AIRAMSAtB0QAhEAxHC0HVACEQDEYLQdgAIRAMRQtB2QAhEAxEC0HbACEQDEMLQeQAIRAMQgtB5QAhEAxBC0HxACEQDEALQfQAIRAMPwtBjQEhEAw+C0GXASEQDD0LQakBIRAMPAtBrAEhEAw7C0HAASEQDDoLQbkBIRAMOQtBrwEhEAw4C0GxASEQDDcLQbIBIRAMNgtBtAEhEAw1C0G1ASEQDDQLQboBIRAMMwtBvQEhEAwyC0G/ASEQDDELQcEBIRAMMAsgAEEANgIcIAAgBDYCFCAAQemLgIAANgIQIABBHzYCDEEAIRAMSAsgAEHbATYCHCAAIAQ2AhQgAEH6loCAADYCECAAQRU2AgxBACEQDEcLIABB+AA2AhwgACAMNgIUIABBypiAgAA2AhAgAEEVNgIMQQAhEAxGCyAAQdEANgIcIAAgBTYCFCAAQbCXgIAANgIQIABBFTYCDEEAIRAMRQsgAEH5ADYCHCAAIAE2AhQgACAQNgIMQQAhEAxECyAAQfgANgIcIAAgATYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMQwsgAEHkADYCHCAAIAE2AhQgAEHjl4CAADYCECAAQRU2AgxBACEQDEILIABB1wA2AhwgACABNgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAxBCyAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhEAxACyAAQcIANgIcIAAgATYCFCAAQeOYgIAANgIQIABBFTYCDEEAIRAMPwsgAEEANgIEIAAgDyAPELGAgIAAIgRFDQEgAEE6NgIcIAAgBDYCDCAAIA9BAWo2AhRBACEQDD4LIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCxgICAACIERQ0AIABBOzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhEAw+CyABQQFqIQEMLQsgD0EBaiEBDC0LIABBADYCHCAAIA82AhQgAEHkkoCAADYCECAAQQQ2AgxBACEQDDsLIABBNjYCHCAAIAQ2AhQgACACNgIMQQAhEAw6CyAAQS42AhwgACAONgIUIAAgBDYCDEEAIRAMOQsgAEHQADYCHCAAIAE2AhQgAEGRmICAADYCECAAQRU2AgxBACEQDDgLIA1BAWohAQwsCyAAQRU2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAw2CyAAQRs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw1CyAAQQ82AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw0CyAAQQs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAwzCyAAQRo2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwyCyAAQQs2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwxCyAAQQo2AhwgACABNgIUIABB5JaAgAA2AhAgAEEVNgIMQQAhEAwwCyAAQR42AhwgACABNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAwvCyAAQQA2AhwgACAQNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhEAwuCyAAQQQ2AhwgACABNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAwtCyAAQQA2AgAgC0EBaiELC0G4ASEQDBILIABBADYCACAQQQFqIQFB9QAhEAwRCyABIQECQCAALQApQQVHDQBB4wAhEAwRC0HiACEQDBALQQAhECAAQQA2AhwgAEHkkYCAADYCECAAQQc2AgwgACAUQQFqNgIUDCgLIABBADYCACAXQQFqIQFBwAAhEAwOC0EBIQELIAAgAToALCAAQQA2AgAgF0EBaiEBC0EoIRAMCwsgASEBC0E4IRAMCQsCQCABIg8gAkYNAANAAkAgDy0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyAPQQFqIQEMBAsgD0EBaiIPIAJHDQALQT4hEAwiC0E+IRAMIQsgAEEAOgAsIA8hAQwBC0ELIRAMBgtBOiEQDAULIAFBAWohAUEtIRAMBAsgACABOgAsIABBADYCACAWQQFqIQFBDCEQDAMLIABBADYCACAXQQFqIQFBCiEQDAILIABBADYCAAsgAEEAOgAsIA0hAUEJIRAMAAsLQQAhECAAQQA2AhwgACALNgIUIABBzZCAgAA2AhAgAEEJNgIMDBcLQQAhECAAQQA2AhwgACAKNgIUIABB6YqAgAA2AhAgAEEJNgIMDBYLQQAhECAAQQA2AhwgACAJNgIUIABBt5CAgAA2AhAgAEEJNgIMDBULQQAhECAAQQA2AhwgACAINgIUIABBnJGAgAA2AhAgAEEJNgIMDBQLQQAhECAAQQA2AhwgACABNgIUIABBzZCAgAA2AhAgAEEJNgIMDBMLQQAhECAAQQA2AhwgACABNgIUIABB6YqAgAA2AhAgAEEJNgIMDBILQQAhECAAQQA2AhwgACABNgIUIABBt5CAgAA2AhAgAEEJNgIMDBELQQAhECAAQQA2AhwgACABNgIUIABBnJGAgAA2AhAgAEEJNgIMDBALQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA8LQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA4LQQAhECAAQQA2AhwgACABNgIUIABBwJKAgAA2AhAgAEELNgIMDA0LQQAhECAAQQA2AhwgACABNgIUIABBlYmAgAA2AhAgAEELNgIMDAwLQQAhECAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMDAsLQQAhECAAQQA2AhwgACABNgIUIABB+4+AgAA2AhAgAEEKNgIMDAoLQQAhECAAQQA2AhwgACABNgIUIABB8ZmAgAA2AhAgAEECNgIMDAkLQQAhECAAQQA2AhwgACABNgIUIABBxJSAgAA2AhAgAEECNgIMDAgLQQAhECAAQQA2AhwgACABNgIUIABB8pWAgAA2AhAgAEECNgIMDAcLIABBAjYCHCAAIAE2AhQgAEGcmoCAADYCECAAQRY2AgxBACEQDAYLQQEhEAwFC0HUACEQIAEiBCACRg0EIANBCGogACAEIAJB2MKAgABBChDFgICAACADKAIMIQQgAygCCA4DAQQCAAsQyoCAgAAACyAAQQA2AhwgAEG1moCAADYCECAAQRc2AgwgACAEQQFqNgIUQQAhEAwCCyAAQQA2AhwgACAENgIUIABBypqAgAA2AhAgAEEJNgIMQQAhEAwBCwJAIAEiBCACRw0AQSIhEAwBCyAAQYmAgIAANgIIIAAgBDYCBEEhIRALIANBEGokgICAgAAgEAuvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAEMeAgIAAC/I2AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKg0ICAAA0AQQAQy4CAgABBgNSEgABrIgJB2QBJDQBBACEDAkBBACgC4NOAgAAiBA0AQQBCfzcC7NOAgABBAEKAgISAgIDAADcC5NOAgABBACABQQhqQXBxQdiq1aoFcyIENgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgAALQQAgAjYCzNOAgABBAEGA1ISAADYCyNOAgABBAEGA1ISAADYCmNCAgABBACAENgKs0ICAAEEAQX82AqjQgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgNSEgABBeEGA1ISAAGtBD3FBAEGA1ISAAEEIakEPcRsiA2oiBEEEaiACQUhqIgUgA2siA0EBcjYCAEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgABBgNSEgAAgBWpBODYCBAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAUsNAAJAQQAoAojQgIAAIgZBECAAQRNqQXBxIABBC0kbIgJBA3YiBHYiA0EDcUUNAAJAAkAgA0EBcSAEckEBcyIFQQN0IgRBsNCAgABqIgMgBEG40ICAAGooAgAiBCgCCCICRw0AQQAgBkF+IAV3cTYCiNCAgAAMAQsgAyACNgIIIAIgAzYCDAsgBEEIaiEDIAQgBUEDdCIFQQNyNgIEIAQgBWoiBCAEKAIEQQFyNgIEDAwLIAJBACgCkNCAgAAiB00NAQJAIANFDQACQAJAIAMgBHRBAiAEdCIDQQAgA2tycSIDQQAgA2txQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmoiBEEDdCIDQbDQgIAAaiIFIANBuNCAgABqKAIAIgMoAggiAEcNAEEAIAZBfiAEd3EiBjYCiNCAgAAMAQsgBSAANgIIIAAgBTYCDAsgAyACQQNyNgIEIAMgBEEDdCIEaiAEIAJrIgU2AgAgAyACaiIAIAVBAXI2AgQCQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhBAJAAkAgBkEBIAdBA3Z0IghxDQBBACAGIAhyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAQ2AgwgAiAENgIIIAQgAjYCDCAEIAg2AggLIANBCGohA0EAIAA2ApzQgIAAQQAgBTYCkNCAgAAMDAtBACgCjNCAgAAiCUUNASAJQQAgCWtxQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmpBAnRBuNKAgABqKAIAIgAoAgRBeHEgAmshBCAAIQUCQANAAkAgBSgCECIDDQAgBUEUaigCACIDRQ0CCyADKAIEQXhxIAJrIgUgBCAFIARJIgUbIQQgAyAAIAUbIQAgAyEFDAALCyAAKAIYIQoCQCAAKAIMIgggAEYNACAAKAIIIgNBACgCmNCAgABJGiAIIAM2AgggAyAINgIMDAsLAkAgAEEUaiIFKAIAIgMNACAAKAIQIgNFDQMgAEEQaiEFCwNAIAUhCyADIghBFGoiBSgCACIDDQAgCEEQaiEFIAgoAhAiAw0ACyALQQA2AgAMCgtBfyECIABBv39LDQAgAEETaiIDQXBxIQJBACgCjNCAgAAiB0UNAEEAIQsCQCACQYACSQ0AQR8hCyACQf///wdLDQAgA0EIdiIDIANBgP4/akEQdkEIcSIDdCIEIARBgOAfakEQdkEEcSIEdCIFIAVBgIAPakEQdkECcSIFdEEPdiADIARyIAVyayIDQQF0IAIgA0EVanZBAXFyQRxqIQsLQQAgAmshBAJAAkACQAJAIAtBAnRBuNKAgABqKAIAIgUNAEEAIQNBACEIDAELQQAhAyACQQBBGSALQQF2ayALQR9GG3QhAEEAIQgDQAJAIAUoAgRBeHEgAmsiBiAETw0AIAYhBCAFIQggBg0AQQAhBCAFIQggBSEDDAMLIAMgBUEUaigCACIGIAYgBSAAQR12QQRxakEQaigCACIFRhsgAyAGGyEDIABBAXQhACAFDQALCwJAIAMgCHINAEEAIQhBAiALdCIDQQAgA2tyIAdxIgNFDQMgA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBUEFdkEIcSIAIANyIAUgAHYiA0ECdkEEcSIFciADIAV2IgNBAXZBAnEiBXIgAyAFdiIDQQF2QQFxIgVyIAMgBXZqQQJ0QbjSgIAAaigCACEDCyADRQ0BCwNAIAMoAgRBeHEgAmsiBiAESSEAAkAgAygCECIFDQAgA0EUaigCACEFCyAGIAQgABshBCADIAggABshCCAFIQMgBQ0ACwsgCEUNACAEQQAoApDQgIAAIAJrTw0AIAgoAhghCwJAIAgoAgwiACAIRg0AIAgoAggiA0EAKAKY0ICAAEkaIAAgAzYCCCADIAA2AgwMCQsCQCAIQRRqIgUoAgAiAw0AIAgoAhAiA0UNAyAIQRBqIQULA0AgBSEGIAMiAEEUaiIFKAIAIgMNACAAQRBqIQUgACgCECIDDQALIAZBADYCAAwICwJAQQAoApDQgIAAIgMgAkkNAEEAKAKc0ICAACEEAkACQCADIAJrIgVBEEkNACAEIAJqIgAgBUEBcjYCBEEAIAU2ApDQgIAAQQAgADYCnNCAgAAgBCADaiAFNgIAIAQgAkEDcjYCBAwBCyAEIANBA3I2AgQgBCADaiIDIAMoAgRBAXI2AgRBAEEANgKc0ICAAEEAQQA2ApDQgIAACyAEQQhqIQMMCgsCQEEAKAKU0ICAACIAIAJNDQBBACgCoNCAgAAiAyACaiIEIAAgAmsiBUEBcjYCBEEAIAU2ApTQgIAAQQAgBDYCoNCAgAAgAyACQQNyNgIEIANBCGohAwwKCwJAAkBBACgC4NOAgABFDQBBACgC6NOAgAAhBAwBC0EAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEMakFwcUHYqtWqBXM2AuDTgIAAQQBBADYC9NOAgABBAEEANgLE04CAAEGAgAQhBAtBACEDAkAgBCACQccAaiIHaiIGQQAgBGsiC3EiCCACSw0AQQBBMDYC+NOAgAAMCgsCQEEAKALA04CAACIDRQ0AAkBBACgCuNOAgAAiBCAIaiIFIARNDQAgBSADTQ0BC0EAIQNBAEEwNgL404CAAAwKC0EALQDE04CAAEEEcQ0EAkACQAJAQQAoAqDQgIAAIgRFDQBByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiAESw0DCyADKAIIIgMNAAsLQQAQy4CAgAAiAEF/Rg0FIAghBgJAQQAoAuTTgIAAIgNBf2oiBCAAcUUNACAIIABrIAQgAGpBACADa3FqIQYLIAYgAk0NBSAGQf7///8HSw0FAkBBACgCwNOAgAAiA0UNAEEAKAK404CAACIEIAZqIgUgBE0NBiAFIANLDQYLIAYQy4CAgAAiAyAARw0BDAcLIAYgAGsgC3EiBkH+////B0sNBCAGEMuAgIAAIgAgAygCACADKAIEakYNAyAAIQMLAkAgA0F/Rg0AIAJByABqIAZNDQACQCAHIAZrQQAoAujTgIAAIgRqQQAgBGtxIgRB/v///wdNDQAgAyEADAcLAkAgBBDLgICAAEF/Rg0AIAQgBmohBiADIQAMBwtBACAGaxDLgICAABoMBAsgAyEAIANBf0cNBQwDC0EAIQgMBwtBACEADAULIABBf0cNAgtBAEEAKALE04CAAEEEcjYCxNOAgAALIAhB/v///wdLDQEgCBDLgICAACEAQQAQy4CAgAAhAyAAQX9GDQEgA0F/Rg0BIAAgA08NASADIABrIgYgAkE4ak0NAQtBAEEAKAK404CAACAGaiIDNgK404CAAAJAIANBACgCvNOAgABNDQBBACADNgK804CAAAsCQAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQCAAIAMoAgAiBSADKAIEIghqRg0CIAMoAggiAw0ADAMLCwJAAkBBACgCmNCAgAAiA0UNACAAIANPDQELQQAgADYCmNCAgAALQQAhA0EAIAY2AszTgIAAQQAgADYCyNOAgABBAEF/NgKo0ICAAEEAQQAoAuDTgIAANgKs0ICAAEEAQQA2AtTTgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiBCAGQUhqIgUgA2siA0EBcjYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgAAgACAFakE4NgIEDAILIAMtAAxBCHENACAEIAVJDQAgBCAATw0AIARBeCAEa0EPcUEAIARBCGpBD3EbIgVqIgBBACgClNCAgAAgBmoiCyAFayIFQQFyNgIEIAMgCCAGajYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAU2ApTQgIAAQQAgADYCoNCAgAAgBCALakE4NgIEDAELAkAgAEEAKAKY0ICAACIITw0AQQAgADYCmNCAgAAgACEICyAAIAZqIQVByNOAgAAhAwJAAkACQAJAAkACQAJAA0AgAygCACAFRg0BIAMoAggiAw0ADAILCyADLQAMQQhxRQ0BC0HI04CAACEDA0ACQCADKAIAIgUgBEsNACAFIAMoAgRqIgUgBEsNAwsgAygCCCEDDAALCyADIAA2AgAgAyADKAIEIAZqNgIEIABBeCAAa0EPcUEAIABBCGpBD3EbaiILIAJBA3I2AgQgBUF4IAVrQQ9xQQAgBUEIakEPcRtqIgYgCyACaiICayEDAkAgBiAERw0AQQAgAjYCoNCAgABBAEEAKAKU0ICAACADaiIDNgKU0ICAACACIANBAXI2AgQMAwsCQCAGQQAoApzQgIAARw0AQQAgAjYCnNCAgABBAEEAKAKQ0ICAACADaiIDNgKQ0ICAACACIANBAXI2AgQgAiADaiADNgIADAMLAkAgBigCBCIEQQNxQQFHDQAgBEF4cSEHAkACQCAEQf8BSw0AIAYoAggiBSAEQQN2IghBA3RBsNCAgABqIgBGGgJAIAYoAgwiBCAFRw0AQQBBACgCiNCAgABBfiAId3E2AojQgIAADAILIAQgAEYaIAQgBTYCCCAFIAQ2AgwMAQsgBigCGCEJAkACQCAGKAIMIgAgBkYNACAGKAIIIgQgCEkaIAAgBDYCCCAEIAA2AgwMAQsCQCAGQRRqIgQoAgAiBQ0AIAZBEGoiBCgCACIFDQBBACEADAELA0AgBCEIIAUiAEEUaiIEKAIAIgUNACAAQRBqIQQgACgCECIFDQALIAhBADYCAAsgCUUNAAJAAkAgBiAGKAIcIgVBAnRBuNKAgABqIgQoAgBHDQAgBCAANgIAIAANAUEAQQAoAozQgIAAQX4gBXdxNgKM0ICAAAwCCyAJQRBBFCAJKAIQIAZGG2ogADYCACAARQ0BCyAAIAk2AhgCQCAGKAIQIgRFDQAgACAENgIQIAQgADYCGAsgBigCFCIERQ0AIABBFGogBDYCACAEIAA2AhgLIAcgA2ohAyAGIAdqIgYoAgQhBAsgBiAEQX5xNgIEIAIgA2ogAzYCACACIANBAXI2AgQCQCADQf8BSw0AIANBeHFBsNCAgABqIQQCQAJAQQAoAojQgIAAIgVBASADQQN2dCIDcQ0AQQAgBSADcjYCiNCAgAAgBCEDDAELIAQoAgghAwsgAyACNgIMIAQgAjYCCCACIAQ2AgwgAiADNgIIDAMLQR8hBAJAIANB////B0sNACADQQh2IgQgBEGA/j9qQRB2QQhxIgR0IgUgBUGA4B9qQRB2QQRxIgV0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAQgBXIgAHJrIgRBAXQgAyAEQRVqdkEBcXJBHGohBAsgAiAENgIcIAJCADcCECAEQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiAEEBIAR0IghxDQAgBSACNgIAQQAgACAIcjYCjNCAgAAgAiAFNgIYIAIgAjYCCCACIAI2AgwMAwsgA0EAQRkgBEEBdmsgBEEfRht0IQQgBSgCACEAA0AgACIFKAIEQXhxIANGDQIgBEEddiEAIARBAXQhBCAFIABBBHFqQRBqIggoAgAiAA0ACyAIIAI2AgAgAiAFNgIYIAIgAjYCDCACIAI2AggMAgsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiCyAGQUhqIgggA2siA0EBcjYCBCAAIAhqQTg2AgQgBCAFQTcgBWtBD3FBACAFQUlqQQ9xG2pBQWoiCCAIIARBEGpJGyIIQSM2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAs2AqDQgIAAIAhBEGpBACkC0NOAgAA3AgAgCEEAKQLI04CAADcCCEEAIAhBCGo2AtDTgIAAQQAgBjYCzNOAgABBACAANgLI04CAAEEAQQA2AtTTgIAAIAhBJGohAwNAIANBBzYCACADQQRqIgMgBUkNAAsgCCAERg0DIAggCCgCBEF+cTYCBCAIIAggBGsiADYCACAEIABBAXI2AgQCQCAAQf8BSw0AIABBeHFBsNCAgABqIQMCQAJAQQAoAojQgIAAIgVBASAAQQN2dCIAcQ0AQQAgBSAAcjYCiNCAgAAgAyEFDAELIAMoAgghBQsgBSAENgIMIAMgBDYCCCAEIAM2AgwgBCAFNgIIDAQLQR8hAwJAIABB////B0sNACAAQQh2IgMgA0GA/j9qQRB2QQhxIgN0IgUgBUGA4B9qQRB2QQRxIgV0IgggCEGAgA9qQRB2QQJxIgh0QQ92IAMgBXIgCHJrIgNBAXQgACADQRVqdkEBcXJBHGohAwsgBCADNgIcIARCADcCECADQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiCEEBIAN0IgZxDQAgBSAENgIAQQAgCCAGcjYCjNCAgAAgBCAFNgIYIAQgBDYCCCAEIAQ2AgwMBAsgAEEAQRkgA0EBdmsgA0EfRht0IQMgBSgCACEIA0AgCCIFKAIEQXhxIABGDQMgA0EddiEIIANBAXQhAyAFIAhBBHFqQRBqIgYoAgAiCA0ACyAGIAQ2AgAgBCAFNgIYIAQgBDYCDCAEIAQ2AggMAwsgBSgCCCIDIAI2AgwgBSACNgIIIAJBADYCGCACIAU2AgwgAiADNgIICyALQQhqIQMMBQsgBSgCCCIDIAQ2AgwgBSAENgIIIARBADYCGCAEIAU2AgwgBCADNgIIC0EAKAKU0ICAACIDIAJNDQBBACgCoNCAgAAiBCACaiIFIAMgAmsiA0EBcjYCBEEAIAM2ApTQgIAAQQAgBTYCoNCAgAAgBCACQQNyNgIEIARBCGohAwwDC0EAIQNBAEEwNgL404CAAAwCCwJAIAtFDQACQAJAIAggCCgCHCIFQQJ0QbjSgIAAaiIDKAIARw0AIAMgADYCACAADQFBACAHQX4gBXdxIgc2AozQgIAADAILIAtBEEEUIAsoAhAgCEYbaiAANgIAIABFDQELIAAgCzYCGAJAIAgoAhAiA0UNACAAIAM2AhAgAyAANgIYCyAIQRRqKAIAIgNFDQAgAEEUaiADNgIAIAMgADYCGAsCQAJAIARBD0sNACAIIAQgAmoiA0EDcjYCBCAIIANqIgMgAygCBEEBcjYCBAwBCyAIIAJqIgAgBEEBcjYCBCAIIAJBA3I2AgQgACAEaiAENgIAAkAgBEH/AUsNACAEQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgBEEDdnQiBHENAEEAIAUgBHI2AojQgIAAIAMhBAwBCyADKAIIIQQLIAQgADYCDCADIAA2AgggACADNgIMIAAgBDYCCAwBC0EfIQMCQCAEQf///wdLDQAgBEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCICIAJBgIAPakEQdkECcSICdEEPdiADIAVyIAJyayIDQQF0IAQgA0EVanZBAXFyQRxqIQMLIAAgAzYCHCAAQgA3AhAgA0ECdEG40oCAAGohBQJAIAdBASADdCICcQ0AIAUgADYCAEEAIAcgAnI2AozQgIAAIAAgBTYCGCAAIAA2AgggACAANgIMDAELIARBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhAgJAA0AgAiIFKAIEQXhxIARGDQEgA0EddiECIANBAXQhAyAFIAJBBHFqQRBqIgYoAgAiAg0ACyAGIAA2AgAgACAFNgIYIAAgADYCDCAAIAA2AggMAQsgBSgCCCIDIAA2AgwgBSAANgIIIABBADYCGCAAIAU2AgwgACADNgIICyAIQQhqIQMMAQsCQCAKRQ0AAkACQCAAIAAoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAg2AgAgCA0BQQAgCUF+IAV3cTYCjNCAgAAMAgsgCkEQQRQgCigCECAARhtqIAg2AgAgCEUNAQsgCCAKNgIYAkAgACgCECIDRQ0AIAggAzYCECADIAg2AhgLIABBFGooAgAiA0UNACAIQRRqIAM2AgAgAyAINgIYCwJAAkAgBEEPSw0AIAAgBCACaiIDQQNyNgIEIAAgA2oiAyADKAIEQQFyNgIEDAELIAAgAmoiBSAEQQFyNgIEIAAgAkEDcjYCBCAFIARqIAQ2AgACQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhAwJAAkBBASAHQQN2dCIIIAZxDQBBACAIIAZyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAM2AgwgAiADNgIIIAMgAjYCDCADIAg2AggLQQAgBTYCnNCAgABBACAENgKQ0ICAAAsgAEEIaiEDCyABQRBqJICAgIAAIAMLCgAgABDJgICAAAviDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQEgASABKAIAIgJrIgFBACgCmNCAgAAiBEkNASACIABqIQACQCABQQAoApzQgIAARg0AAkAgAkH/AUsNACABKAIIIgQgAkEDdiIFQQN0QbDQgIAAaiIGRhoCQCABKAIMIgIgBEcNAEEAQQAoAojQgIAAQX4gBXdxNgKI0ICAAAwDCyACIAZGGiACIAQ2AgggBCACNgIMDAILIAEoAhghBwJAAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiAGIAI2AgggAiAGNgIMDAELAkAgAUEUaiICKAIAIgQNACABQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQECQAJAIAEgASgCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAwsgB0EQQRQgBygCECABRhtqIAY2AgAgBkUNAgsgBiAHNgIYAkAgASgCECICRQ0AIAYgAjYCECACIAY2AhgLIAEoAhQiAkUNASAGQRRqIAI2AgAgAiAGNgIYDAELIAMoAgQiAkEDcUEDRw0AIAMgAkF+cTYCBEEAIAA2ApDQgIAAIAEgAGogADYCACABIABBAXI2AgQPCyABIANPDQAgAygCBCICQQFxRQ0AAkACQCACQQJxDQACQCADQQAoAqDQgIAARw0AQQAgATYCoNCAgABBAEEAKAKU0ICAACAAaiIANgKU0ICAACABIABBAXI2AgQgAUEAKAKc0ICAAEcNA0EAQQA2ApDQgIAAQQBBADYCnNCAgAAPCwJAIANBACgCnNCAgABHDQBBACABNgKc0ICAAEEAQQAoApDQgIAAIABqIgA2ApDQgIAAIAEgAEEBcjYCBCABIABqIAA2AgAPCyACQXhxIABqIQACQAJAIAJB/wFLDQAgAygCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgAygCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAgsgAiAGRhogAiAENgIIIAQgAjYCDAwBCyADKAIYIQcCQAJAIAMoAgwiBiADRg0AIAMoAggiAkEAKAKY0ICAAEkaIAYgAjYCCCACIAY2AgwMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEGDAELA0AgAiEFIAQiBkEUaiICKAIAIgQNACAGQRBqIQIgBigCECIEDQALIAVBADYCAAsgB0UNAAJAAkAgAyADKAIcIgRBAnRBuNKAgABqIgIoAgBHDQAgAiAGNgIAIAYNAUEAQQAoAozQgIAAQX4gBHdxNgKM0ICAAAwCCyAHQRBBFCAHKAIQIANGG2ogBjYCACAGRQ0BCyAGIAc2AhgCQCADKAIQIgJFDQAgBiACNgIQIAIgBjYCGAsgAygCFCICRQ0AIAZBFGogAjYCACACIAY2AhgLIAEgAGogADYCACABIABBAXI2AgQgAUEAKAKc0ICAAEcNAUEAIAA2ApDQgIAADwsgAyACQX5xNgIEIAEgAGogADYCACABIABBAXI2AgQLAkAgAEH/AUsNACAAQXhxQbDQgIAAaiECAkACQEEAKAKI0ICAACIEQQEgAEEDdnQiAHENAEEAIAQgAHI2AojQgIAAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY3AwAgAUEgaiEBIAJBYGoiAkEfSw0ACwsgAAsLjkgBAEGACAuGSAEAAAACAAAAAwAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="});var Hs=Q((xj,Em)=>{"use strict";var D=require("assert"),Xp=require("net"),BM=require("http"),{pipeline:pM}=require("stream"),k=W(),CE=gB(),IE=Up(),mM=Ms(),{RequestContentLengthMismatchError:Kt,ResponseContentLengthMismatchError:yM,InvalidArgumentError:Ue,RequestAbortedError:bE,HeadersTimeoutError:wM,HeadersOverflowError:RM,SocketError:oi,InformationalError:yt,BodyTimeoutError:DM,HTTPParserError:bM,ResponseExceededMaxSizeError:kM,ClientDestroyedError:SM}=le(),FM=vs(),{kUrl:Ke,kReset:sA,kServerName:yr,kClient:wt,kBusy:BE,kParser:Se,kConnect:NM,kBlocking:ai,kResuming:Wr,kRunning:be,kPending:jr,kSize:_r,kWriting:Zt,kQueue:Ie,kConnected:xM,kConnecting:si,kNeedDrain:Rr,kNoRef:Gs,kKeepAliveDefaultTimeout:pE,kHostHeader:zp,kPendingIdx:bA,kRunningIdx:Be,kError:Ze,kPipelining:Dr,kSocket:Fe,kKeepAliveTimeoutValue:Vs,kMaxHeadersSize:Ic,kKeepAliveMaxTimeout:$p,kKeepAliveTimeoutThreshold:em,kHeadersTimeout:Am,kBodyTimeout:tm,kStrictContentLength:qs,kConnector:Js,kMaxRedirections:LM,kMaxRequests:Os,kCounter:rm,kClose:UM,kDestroy:TM,kDispatch:MM,kInterceptors:vM,kLocalAddress:Ys,kMaxResponseSize:nm,kHTTPConnVersion:Rt,kHost:im,kHTTP2Session:kA,kHTTP2SessionState:pc,kHTTP2BuildRequest:PM,kHTTP2CopyHeaders:GM,kHTTP1BuildRequest:JM}=de(),mc;try{mc=require("http2")}catch{mc={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:YM,HTTP2_HEADER_METHOD:VM,HTTP2_HEADER_PATH:qM,HTTP2_HEADER_SCHEME:OM,HTTP2_HEADER_CONTENT_LENGTH:HM,HTTP2_HEADER_EXPECT:WM,HTTP2_HEADER_STATUS:_M}}=mc,Kp=!1,Cc=Buffer[Symbol.species],wr=Symbol("kClosedResolve"),eA={};try{let e=require("diagnostics_channel");eA.sendHeaders=e.channel("undici:client:sendHeaders"),eA.beforeConnect=e.channel("undici:client:beforeConnect"),eA.connectError=e.channel("undici:client:connectError"),eA.connected=e.channel("undici:client:connected")}catch{eA.sendHeaders={hasSubscribers:!1},eA.beforeConnect={hasSubscribers:!1},eA.connectError={hasSubscribers:!1},eA.connected={hasSubscribers:!1}}var mE=class extends mM{constructor(A,{interceptors:t,maxHeaderSize:r,headersTimeout:n,socketTimeout:i,requestTimeout:s,connectTimeout:o,bodyTimeout:a,idleTimeout:c,keepAlive:g,keepAliveTimeout:l,maxKeepAliveTimeout:u,keepAliveMaxTimeout:E,keepAliveTimeoutThreshold:h,socketPath:d,pipelining:C,tls:I,strictContentLength:p,maxCachedSessions:w,maxRedirections:m,connect:K,maxRequestsPerClient:H,localAddress:ne,maxResponseSize:q,autoSelectFamily:ae,autoSelectFamilyAttemptTimeout:De,allowH2:ee,maxConcurrentStreams:Y}={}){if(super(),g!==void 0)throw new Ue("unsupported keepAlive, use pipelining=0 instead");if(i!==void 0)throw new Ue("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(s!==void 0)throw new Ue("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(c!==void 0)throw new Ue("unsupported idleTimeout, use keepAliveTimeout instead");if(u!==void 0)throw new Ue("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(r!=null&&!Number.isFinite(r))throw new Ue("invalid maxHeaderSize");if(d!=null&&typeof d!="string")throw new Ue("invalid socketPath");if(o!=null&&(!Number.isFinite(o)||o<0))throw new Ue("invalid connectTimeout");if(l!=null&&(!Number.isFinite(l)||l<=0))throw new Ue("invalid keepAliveTimeout");if(E!=null&&(!Number.isFinite(E)||E<=0))throw new Ue("invalid keepAliveMaxTimeout");if(h!=null&&!Number.isFinite(h))throw new Ue("invalid keepAliveTimeoutThreshold");if(n!=null&&(!Number.isInteger(n)||n<0))throw new Ue("headersTimeout must be a positive integer or zero");if(a!=null&&(!Number.isInteger(a)||a<0))throw new Ue("bodyTimeout must be a positive integer or zero");if(K!=null&&typeof K!="function"&&typeof K!="object")throw new Ue("connect must be a function or an object");if(m!=null&&(!Number.isInteger(m)||m<0))throw new Ue("maxRedirections must be a positive number");if(H!=null&&(!Number.isInteger(H)||H<0))throw new Ue("maxRequestsPerClient must be a positive number");if(ne!=null&&(typeof ne!="string"||Xp.isIP(ne)===0))throw new Ue("localAddress must be valid string IP address");if(q!=null&&(!Number.isInteger(q)||q<-1))throw new Ue("maxResponseSize must be a positive number");if(De!=null&&(!Number.isInteger(De)||De<-1))throw new Ue("autoSelectFamilyAttemptTimeout must be a positive number");if(ee!=null&&typeof ee!="boolean")throw new Ue("allowH2 must be a valid boolean value");if(Y!=null&&(typeof Y!="number"||Y<1))throw new Ue("maxConcurrentStreams must be a possitive integer, greater than 0");typeof K!="function"&&(K=FM({...I,maxCachedSessions:w,allowH2:ee,socketPath:d,timeout:o,...k.nodeHasAutoSelectFamily&&ae?{autoSelectFamily:ae,autoSelectFamilyAttemptTimeout:De}:void 0,...K})),this[vM]=t&&t.Client&&Array.isArray(t.Client)?t.Client:[zM({maxRedirections:m})],this[Ke]=k.parseOrigin(A),this[Js]=K,this[Fe]=null,this[Dr]=C??1,this[Ic]=r||BM.maxHeaderSize,this[pE]=l??4e3,this[$p]=E??6e5,this[em]=h??1e3,this[Vs]=this[pE],this[yr]=null,this[Ys]=ne??null,this[Wr]=0,this[Rr]=0,this[zp]=`host: ${this[Ke].hostname}${this[Ke].port?`:${this[Ke].port}`:""}\r +`,this[tm]=a??3e5,this[Am]=n??3e5,this[qs]=p??!0,this[LM]=m,this[Os]=H,this[wr]=null,this[nm]=q>-1?q:-1,this[Rt]="h1",this[kA]=null,this[pc]=ee?{openStreams:0,maxConcurrentStreams:Y??100}:null,this[im]=`${this[Ke].hostname}${this[Ke].port?`:${this[Ke].port}`:""}`,this[Ie]=[],this[Be]=0,this[bA]=0}get pipelining(){return this[Dr]}set pipelining(A){this[Dr]=A,SA(this,!0)}get[jr](){return this[Ie].length-this[bA]}get[be](){return this[bA]-this[Be]}get[_r](){return this[Ie].length-this[Be]}get[xM](){return!!this[Fe]&&!this[si]&&!this[Fe].destroyed}get[BE](){let A=this[Fe];return A&&(A[sA]||A[Zt]||A[ai])||this[_r]>=(this[Dr]||1)||this[jr]>0}[NM](A){cm(this),this.once("connect",A)}[MM](A,t){let r=A.origin||this[Ke].origin,n=this[Rt]==="h2"?IE[PM](r,A,t):IE[JM](r,A,t);return this[Ie].push(n),this[Wr]||(k.bodyLength(n.body)==null&&k.isIterable(n.body)?(this[Wr]=1,process.nextTick(SA,this)):SA(this,!0)),this[Wr]&&this[Rr]!==2&&this[BE]&&(this[Rr]=2),this[Rr]<2}async[UM](){return new Promise(A=>{this[_r]?this[wr]=A:A(null)})}async[TM](A){return new Promise(t=>{let r=this[Ie].splice(this[bA]);for(let i=0;i{this[wr]&&(this[wr](),this[wr]=null),t()};this[kA]!=null&&(k.destroy(this[kA],A),this[kA]=null,this[pc]=null),this[Fe]?k.destroy(this[Fe].on("close",n),A):queueMicrotask(n),SA(this)})}};function jM(e){D(e.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Fe][Ze]=e,Rc(this[wt],e)}function KM(e,A,t){let r=new yt(`HTTP/2: "frameError" received - type ${e}, code ${A}`);t===0&&(this[Fe][Ze]=r,Rc(this[wt],r))}function ZM(){k.destroy(this,new oi("other side closed")),k.destroy(this[Fe],new oi("other side closed"))}function XM(e){let A=this[wt],t=new yt(`HTTP/2: "GOAWAY" frame received with code ${e}`);if(A[Fe]=null,A[kA]=null,A.destroyed){D(this[jr]===0);let r=A[Ie].splice(A[Be]);for(let n=0;n0){let r=A[Ie][A[Be]];A[Ie][A[Be]++]=null,oA(A,r,t)}A[bA]=A[Be],D(A[be]===0),A.emit("disconnect",A[Ke],[A],t),SA(A)}var Bt=Yp(),zM=Qc(),$M=Buffer.alloc(0);async function ev(){let e=process.env.JEST_WORKER_ID?QE():void 0,A;try{A=await WebAssembly.compile(Buffer.from(jp(),"base64"))}catch{A=await WebAssembly.compile(Buffer.from(e||QE(),"base64"))}return await WebAssembly.instantiate(A,{env:{wasm_on_url:(t,r,n)=>0,wasm_on_status:(t,r,n)=>{D.strictEqual(Ge.ptr,t);let i=r-mt+pt.byteOffset;return Ge.onStatus(new Cc(pt.buffer,i,n))||0},wasm_on_message_begin:t=>(D.strictEqual(Ge.ptr,t),Ge.onMessageBegin()||0),wasm_on_header_field:(t,r,n)=>{D.strictEqual(Ge.ptr,t);let i=r-mt+pt.byteOffset;return Ge.onHeaderField(new Cc(pt.buffer,i,n))||0},wasm_on_header_value:(t,r,n)=>{D.strictEqual(Ge.ptr,t);let i=r-mt+pt.byteOffset;return Ge.onHeaderValue(new Cc(pt.buffer,i,n))||0},wasm_on_headers_complete:(t,r,n,i)=>(D.strictEqual(Ge.ptr,t),Ge.onHeadersComplete(r,!!n,!!i)||0),wasm_on_body:(t,r,n)=>{D.strictEqual(Ge.ptr,t);let i=r-mt+pt.byteOffset;return Ge.onBody(new Cc(pt.buffer,i,n))||0},wasm_on_message_complete:t=>(D.strictEqual(Ge.ptr,t),Ge.onMessageComplete()||0)}})}var fE=null,yE=ev();yE.catch();var Ge=null,pt=null,fc=0,mt=null,ci=1,Bc=2,wE=3,RE=class{constructor(A,t,{exports:r}){D(Number.isFinite(A[Ic])&&A[Ic]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(Bt.TYPE.RESPONSE),this.client=A,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=A[Ic],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=A[nm]}setTimeout(A,t){this.timeoutType=t,A!==this.timeoutValue?(CE.clearTimeout(this.timeout),A?(this.timeout=CE.setTimeout(Av,A,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=A):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(D(this.ptr!=null),D(Ge==null),this.llhttp.llhttp_resume(this.ptr),D(this.timeoutType===Bc),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||$M),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let A=this.socket.read();if(A===null)break;this.execute(A)}}execute(A){D(this.ptr!=null),D(Ge==null),D(!this.paused);let{socket:t,llhttp:r}=this;A.length>fc&&(mt&&r.free(mt),fc=Math.ceil(A.length/4096)*4096,mt=r.malloc(fc)),new Uint8Array(r.memory.buffer,mt,fc).set(A);try{let n;try{pt=A,Ge=this,n=r.llhttp_execute(this.ptr,mt,A.length)}catch(s){throw s}finally{Ge=null,pt=null}let i=r.llhttp_get_error_pos(this.ptr)-mt;if(n===Bt.ERROR.PAUSED_UPGRADE)this.onUpgrade(A.slice(i));else if(n===Bt.ERROR.PAUSED)this.paused=!0,t.unshift(A.slice(i));else if(n!==Bt.ERROR.OK){let s=r.llhttp_get_error_reason(this.ptr),o="";if(s){let a=new Uint8Array(r.memory.buffer,s).indexOf(0);o="Response does not match the HTTP/1.1 protocol ("+Buffer.from(r.memory.buffer,s,a).toString()+")"}throw new bM(o,Bt.ERROR[n],A.slice(i))}}catch(n){k.destroy(t,n)}}destroy(){D(this.ptr!=null),D(Ge==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,CE.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(A){this.statusText=A.toString()}onMessageBegin(){let{socket:A,client:t}=this;if(A.destroyed||!t[Ie][t[Be]])return-1}onHeaderField(A){let t=this.headers.length;t&1?this.headers[t-1]=Buffer.concat([this.headers[t-1],A]):this.headers.push(A),this.trackHeader(A.length)}onHeaderValue(A){let t=this.headers.length;(t&1)===1?(this.headers.push(A),t+=1):this.headers[t-1]=Buffer.concat([this.headers[t-1],A]);let r=this.headers[t-2];r.length===10&&r.toString().toLowerCase()==="keep-alive"?this.keepAlive+=A.toString():r.length===10&&r.toString().toLowerCase()==="connection"?this.connection+=A.toString():r.length===14&&r.toString().toLowerCase()==="content-length"&&(this.contentLength+=A.toString()),this.trackHeader(A.length)}trackHeader(A){this.headersSize+=A,this.headersSize>=this.headersMaxSize&&k.destroy(this.socket,new RM)}onUpgrade(A){let{upgrade:t,client:r,socket:n,headers:i,statusCode:s}=this;D(t);let o=r[Ie][r[Be]];D(o),D(!n.destroyed),D(n===r[Fe]),D(!this.paused),D(o.upgrade||o.method==="CONNECT"),this.statusCode=null,this.statusText="",this.shouldKeepAlive=null,D(this.headers.length%2===0),this.headers=[],this.headersSize=0,n.unshift(A),n[Se].destroy(),n[Se]=null,n[wt]=null,n[Ze]=null,n.removeListener("error",om).removeListener("readable",sm).removeListener("end",am).removeListener("close",DE),r[Fe]=null,r[Ie][r[Be]++]=null,r.emit("disconnect",r[Ke],[r],new yt("upgrade"));try{o.onUpgrade(s,i,n)}catch(a){k.destroy(n,a)}SA(r)}onHeadersComplete(A,t,r){let{client:n,socket:i,headers:s,statusText:o}=this;if(i.destroyed)return-1;let a=n[Ie][n[Be]];if(!a)return-1;if(D(!this.upgrade),D(this.statusCode<200),A===100)return k.destroy(i,new oi("bad response",k.getSocketInfo(i))),-1;if(t&&!a.upgrade)return k.destroy(i,new oi("bad upgrade",k.getSocketInfo(i))),-1;if(D.strictEqual(this.timeoutType,ci),this.statusCode=A,this.shouldKeepAlive=r||a.method==="HEAD"&&!i[sA]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let g=a.bodyTimeout!=null?a.bodyTimeout:n[tm];this.setTimeout(g,Bc)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(a.method==="CONNECT")return D(n[be]===1),this.upgrade=!0,2;if(t)return D(n[be]===1),this.upgrade=!0,2;if(D(this.headers.length%2===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&n[Dr]){let g=this.keepAlive?k.parseKeepAliveTimeout(this.keepAlive):null;if(g!=null){let l=Math.min(g-n[em],n[$p]);l<=0?i[sA]=!0:n[Vs]=l}else n[Vs]=n[pE]}else i[sA]=!0;let c=a.onHeaders(A,s,this.resume,o)===!1;return a.aborted?-1:a.method==="HEAD"||A<200?1:(i[ai]&&(i[ai]=!1,SA(n)),c?Bt.ERROR.PAUSED:0)}onBody(A){let{client:t,socket:r,statusCode:n,maxResponseSize:i}=this;if(r.destroyed)return-1;let s=t[Ie][t[Be]];if(D(s),D.strictEqual(this.timeoutType,Bc),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),D(n>=200),i>-1&&this.bytesRead+A.length>i)return k.destroy(r,new kM),-1;if(this.bytesRead+=A.length,s.onData(A)===!1)return Bt.ERROR.PAUSED}onMessageComplete(){let{client:A,socket:t,statusCode:r,upgrade:n,headers:i,contentLength:s,bytesRead:o,shouldKeepAlive:a}=this;if(t.destroyed&&(!r||a))return-1;if(n)return;let c=A[Ie][A[Be]];if(D(c),D(r>=100),this.statusCode=null,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",D(this.headers.length%2===0),this.headers=[],this.headersSize=0,!(r<200)){if(c.method!=="HEAD"&&s&&o!==parseInt(s,10))return k.destroy(t,new yM),-1;if(c.onComplete(i),A[Ie][A[Be]++]=null,t[Zt])return D.strictEqual(A[be],0),k.destroy(t,new yt("reset")),Bt.ERROR.PAUSED;if(a){if(t[sA]&&A[be]===0)return k.destroy(t,new yt("reset")),Bt.ERROR.PAUSED;A[Dr]===1?setImmediate(SA,A):SA(A)}else return k.destroy(t,new yt("reset")),Bt.ERROR.PAUSED}}};function Av(e){let{socket:A,timeoutType:t,client:r}=e;t===ci?(!A[Zt]||A.writableNeedDrain||r[be]>1)&&(D(!e.paused,"cannot be paused while waiting for headers"),k.destroy(A,new wM)):t===Bc?e.paused||k.destroy(A,new DM):t===wE&&(D(r[be]===0&&r[Vs]),k.destroy(A,new yt("socket idle timeout")))}function sm(){let{[Se]:e}=this;e&&e.readMore()}function om(e){let{[wt]:A,[Se]:t}=this;if(D(e.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),A[Rt]!=="h2"&&e.code==="ECONNRESET"&&t.statusCode&&!t.shouldKeepAlive){t.onMessageComplete();return}this[Ze]=e,Rc(this[wt],e)}function Rc(e,A){if(e[be]===0&&A.code!=="UND_ERR_INFO"&&A.code!=="UND_ERR_SOCKET"){D(e[bA]===e[Be]);let t=e[Ie].splice(e[Be]);for(let r=0;r0&&t.code!=="UND_ERR_INFO"){let r=e[Ie][e[Be]];e[Ie][e[Be]++]=null,oA(e,r,t)}e[bA]=e[Be],D(e[be]===0),e.emit("disconnect",e[Ke],[e],t),SA(e)}async function cm(e){D(!e[si]),D(!e[Fe]);let{host:A,hostname:t,protocol:r,port:n}=e[Ke];if(t[0]==="["){let i=t.indexOf("]");D(i!==-1);let s=t.substring(1,i);D(Xp.isIP(s)),t=s}e[si]=!0,eA.beforeConnect.hasSubscribers&&eA.beforeConnect.publish({connectParams:{host:A,hostname:t,protocol:r,port:n,servername:e[yr],localAddress:e[Ys]},connector:e[Js]});try{let i=await new Promise((o,a)=>{e[Js]({host:A,hostname:t,protocol:r,port:n,servername:e[yr],localAddress:e[Ys]},(c,g)=>{c?a(c):o(g)})});if(e.destroyed){k.destroy(i.on("error",()=>{}),new SM);return}if(e[si]=!1,D(i),i.alpnProtocol==="h2"){Kp||(Kp=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let o=mc.connect(e[Ke],{createConnection:()=>i,peerMaxConcurrentStreams:e[pc].maxConcurrentStreams});e[Rt]="h2",o[wt]=e,o[Fe]=i,o.on("error",jM),o.on("frameError",KM),o.on("end",ZM),o.on("goaway",XM),o.on("close",DE),o.unref(),e[kA]=o,i[kA]=o}else fE||(fE=await yE,yE=null),i[Gs]=!1,i[Zt]=!1,i[sA]=!1,i[ai]=!1,i[Se]=new RE(e,i,fE);i[rm]=0,i[Os]=e[Os],i[wt]=e,i[Ze]=null,i.on("error",om).on("readable",sm).on("end",am).on("close",DE),e[Fe]=i,eA.connected.hasSubscribers&&eA.connected.publish({connectParams:{host:A,hostname:t,protocol:r,port:n,servername:e[yr],localAddress:e[Ys]},connector:e[Js],socket:i}),e.emit("connect",e[Ke],[e])}catch(i){if(e.destroyed)return;if(e[si]=!1,eA.connectError.hasSubscribers&&eA.connectError.publish({connectParams:{host:A,hostname:t,protocol:r,port:n,servername:e[yr],localAddress:e[Ys]},connector:e[Js],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(D(e[be]===0);e[jr]>0&&e[Ie][e[bA]].servername===e[yr];){let s=e[Ie][e[bA]++];oA(e,s,i)}else Rc(e,i);e.emit("connectionError",e[Ke],[e],i)}SA(e)}function Zp(e){e[Rr]=0,e.emit("drain",e[Ke],[e])}function SA(e,A){e[Wr]!==2&&(e[Wr]=2,tv(e,A),e[Wr]=0,e[Be]>256&&(e[Ie].splice(0,e[Be]),e[bA]-=e[Be],e[Be]=0))}function tv(e,A){for(;;){if(e.destroyed){D(e[jr]===0);return}if(e[wr]&&!e[_r]){e[wr](),e[wr]=null;return}let t=e[Fe];if(t&&!t.destroyed&&t.alpnProtocol!=="h2"){if(e[_r]===0?!t[Gs]&&t.unref&&(t.unref(),t[Gs]=!0):t[Gs]&&t.ref&&(t.ref(),t[Gs]=!1),e[_r]===0)t[Se].timeoutType!==wE&&t[Se].setTimeout(e[Vs],wE);else if(e[be]>0&&t[Se].statusCode<200&&t[Se].timeoutType!==ci){let n=e[Ie][e[Be]],i=n.headersTimeout!=null?n.headersTimeout:e[Am];t[Se].setTimeout(i,ci)}}if(e[BE])e[Rr]=2;else if(e[Rr]===2){A?(e[Rr]=1,process.nextTick(Zp,e)):Zp(e);continue}if(e[jr]===0||e[be]>=(e[Dr]||1))return;let r=e[Ie][e[bA]];if(e[Ke].protocol==="https:"&&e[yr]!==r.servername){if(e[be]>0)return;if(e[yr]=r.servername,t&&t.servername!==r.servername){k.destroy(t,new yt("servername changed"));return}}if(e[si])return;if(!t&&!e[kA]){cm(e);return}if(t.destroyed||t[Zt]||t[sA]||t[ai]||e[be]>0&&!r.idempotent||e[be]>0&&(r.upgrade||r.method==="CONNECT")||e[be]>0&&k.bodyLength(r.body)!==0&&(k.isStream(r.body)||k.isAsyncIterable(r.body)))return;!r.aborted&&rv(e,r)?e[bA]++:e[Ie].splice(e[bA],1)}}function gm(e){return e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS"&&e!=="TRACE"&&e!=="CONNECT"}function rv(e,A){if(e[Rt]==="h2"){nv(e,e[kA],A);return}let{body:t,method:r,path:n,host:i,upgrade:s,headers:o,blocking:a,reset:c}=A,g=r==="PUT"||r==="POST"||r==="PATCH";t&&typeof t.read=="function"&&t.read(0);let l=k.bodyLength(t),u=l;if(u===null&&(u=A.contentLength),u===0&&!g&&(u=null),gm(r)&&u>0&&A.contentLength!==null&&A.contentLength!==u){if(e[qs])return oA(e,A,new Kt),!1;process.emitWarning(new Kt)}let E=e[Fe];try{A.onConnect(d=>{A.aborted||A.completed||(oA(e,A,d||new bE),k.destroy(E,new yt("aborted")))})}catch(d){oA(e,A,d)}if(A.aborted)return!1;r==="HEAD"&&(E[sA]=!0),(s||r==="CONNECT")&&(E[sA]=!0),c!=null&&(E[sA]=c),e[Os]&&E[rm]++>=e[Os]&&(E[sA]=!0),a&&(E[ai]=!0);let h=`${r} ${n} HTTP/1.1\r +`;return typeof i=="string"?h+=`host: ${i}\r +`:h+=e[zp],s?h+=`connection: upgrade\r +upgrade: ${s}\r +`:e[Dr]&&!E[sA]?h+=`connection: keep-alive\r +`:h+=`connection: close\r +`,o&&(h+=o),eA.sendHeaders.hasSubscribers&&eA.sendHeaders.publish({request:A,headers:h,socket:E}),!t||l===0?(u===0?E.write(`${h}content-length: 0\r +\r +`,"latin1"):(D(u===null,"no body must not have content length"),E.write(`${h}\r +`,"latin1")),A.onRequestSent()):k.isBuffer(t)?(D(u===t.byteLength,"buffer body must have content length"),E.cork(),E.write(`${h}content-length: ${u}\r +\r +`,"latin1"),E.write(t),E.uncork(),A.onBodySent(t),A.onRequestSent(),g||(E[sA]=!0)):k.isBlobLike(t)?typeof t.stream=="function"?yc({body:t.stream(),client:e,request:A,socket:E,contentLength:u,header:h,expectsPayload:g}):um({body:t,client:e,request:A,socket:E,contentLength:u,header:h,expectsPayload:g}):k.isStream(t)?lm({body:t,client:e,request:A,socket:E,contentLength:u,header:h,expectsPayload:g}):k.isIterable(t)?yc({body:t,client:e,request:A,socket:E,contentLength:u,header:h,expectsPayload:g}):D(!1),!0}function nv(e,A,t){let{body:r,method:n,path:i,host:s,upgrade:o,expectContinue:a,signal:c,headers:g}=t,l;if(typeof g=="string"?l=IE[GM](g.trim()):l=g,o)return oA(e,t,new Error("Upgrade not supported for H2")),!1;try{t.onConnect(p=>{t.aborted||t.completed||oA(e,t,p||new bE)})}catch(p){oA(e,t,p)}if(t.aborted)return!1;let u,E=e[pc];if(l[YM]=s||e[im],l[VM]=n,n==="CONNECT")return A.ref(),u=A.request(l,{endStream:!1,signal:c}),u.id&&!u.pending?(t.onUpgrade(null,null,u),++E.openStreams):u.once("ready",()=>{t.onUpgrade(null,null,u),++E.openStreams}),u.once("close",()=>{E.openStreams-=1,E.openStreams===0&&A.unref()}),!0;l[qM]=i,l[OM]="https";let h=n==="PUT"||n==="POST"||n==="PATCH";r&&typeof r.read=="function"&&r.read(0);let d=k.bodyLength(r);if(d==null&&(d=t.contentLength),(d===0||!h)&&(d=null),gm(n)&&d>0&&t.contentLength!=null&&t.contentLength!==d){if(e[qs])return oA(e,t,new Kt),!1;process.emitWarning(new Kt)}d!=null&&(D(r,"no body must not have content length"),l[HM]=`${d}`),A.ref();let C=n==="GET"||n==="HEAD";return a?(l[WM]="100-continue",u=A.request(l,{endStream:C,signal:c}),u.once("continue",I)):(u=A.request(l,{endStream:C,signal:c}),I()),++E.openStreams,u.once("response",p=>{let{[_M]:w,...m}=p;t.onHeaders(Number(w),m,u.resume.bind(u),"")===!1&&u.pause()}),u.once("end",()=>{t.onComplete([])}),u.on("data",p=>{t.onData(p)===!1&&u.pause()}),u.once("close",()=>{E.openStreams-=1,E.openStreams===0&&A.unref()}),u.once("error",function(p){e[kA]&&!e[kA].destroyed&&!this.closed&&!this.destroyed&&(E.streams-=1,k.destroy(u,p))}),u.once("frameError",(p,w)=>{let m=new yt(`HTTP/2: "frameError" received - type ${p}, code ${w}`);oA(e,t,m),e[kA]&&!e[kA].destroyed&&!this.closed&&!this.destroyed&&(E.streams-=1,k.destroy(u,m))}),!0;function I(){r?k.isBuffer(r)?(D(d===r.byteLength,"buffer body must have content length"),u.cork(),u.write(r),u.uncork(),u.end(),t.onBodySent(r),t.onRequestSent()):k.isBlobLike(r)?typeof r.stream=="function"?yc({client:e,request:t,contentLength:d,h2stream:u,expectsPayload:h,body:r.stream(),socket:e[Fe],header:""}):um({body:r,client:e,request:t,contentLength:d,expectsPayload:h,h2stream:u,header:"",socket:e[Fe]}):k.isStream(r)?lm({body:r,client:e,request:t,contentLength:d,expectsPayload:h,socket:e[Fe],h2stream:u,header:""}):k.isIterable(r)?yc({body:r,client:e,request:t,contentLength:d,expectsPayload:h,header:"",h2stream:u,socket:e[Fe]}):D(!1):t.onRequestSent()}}function lm({h2stream:e,body:A,client:t,request:r,socket:n,contentLength:i,header:s,expectsPayload:o}){if(D(i!==0||t[be]===0,"stream body cannot be pipelined"),t[Rt]==="h2"){let d=function(C){r.onBodySent(C)},h=pM(A,e,C=>{C?(k.destroy(A,C),k.destroy(e,C)):r.onRequestSent()});h.on("data",d),h.once("end",()=>{h.removeListener("data",d),k.destroy(h)});return}let a=!1,c=new wc({socket:n,request:r,contentLength:i,client:t,expectsPayload:o,header:s}),g=function(h){if(!a)try{!c.write(h)&&this.pause&&this.pause()}catch(d){k.destroy(this,d)}},l=function(){a||A.resume&&A.resume()},u=function(){if(a)return;let h=new bE;queueMicrotask(()=>E(h))},E=function(h){if(!a){if(a=!0,D(n.destroyed||n[Zt]&&t[be]<=1),n.off("drain",l).off("error",E),A.removeListener("data",g).removeListener("end",E).removeListener("error",E).removeListener("close",u),!h)try{c.end()}catch(d){h=d}c.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?k.destroy(A,h):k.destroy(A)}};A.on("data",g).on("end",E).on("error",E).on("close",u),A.resume&&A.resume(),n.on("drain",l).on("error",E)}async function um({h2stream:e,body:A,client:t,request:r,socket:n,contentLength:i,header:s,expectsPayload:o}){D(i===A.size,"blob body must have content length");let a=t[Rt]==="h2";try{if(i!=null&&i!==A.size)throw new Kt;let c=Buffer.from(await A.arrayBuffer());a?(e.cork(),e.write(c),e.uncork()):(n.cork(),n.write(`${s}content-length: ${i}\r +\r +`,"latin1"),n.write(c),n.uncork()),r.onBodySent(c),r.onRequestSent(),o||(n[sA]=!0),SA(t)}catch(c){k.destroy(a?e:n,c)}}async function yc({h2stream:e,body:A,client:t,request:r,socket:n,contentLength:i,header:s,expectsPayload:o}){D(i!==0||t[be]===0,"iterator body cannot be pipelined");let a=null;function c(){if(a){let u=a;a=null,u()}}let g=()=>new Promise((u,E)=>{D(a===null),n[Ze]?E(n[Ze]):a=u});if(t[Rt]==="h2"){e.on("close",c).on("drain",c);try{for await(let u of A){if(n[Ze])throw n[Ze];let E=e.write(u);r.onBodySent(u),E||await g()}}catch(u){e.destroy(u)}finally{r.onRequestSent(),e.end(),e.off("close",c).off("drain",c)}return}n.on("close",c).on("drain",c);let l=new wc({socket:n,request:r,contentLength:i,client:t,expectsPayload:o,header:s});try{for await(let u of A){if(n[Ze])throw n[Ze];l.write(u)||await g()}l.end()}catch(u){l.destroy(u)}finally{n.off("close",c).off("drain",c)}}var wc=class{constructor({socket:A,request:t,contentLength:r,client:n,expectsPayload:i,header:s}){this.socket=A,this.request=t,this.contentLength=r,this.client=n,this.bytesWritten=0,this.expectsPayload=i,this.header=s,A[Zt]=!0}write(A){let{socket:t,request:r,contentLength:n,client:i,bytesWritten:s,expectsPayload:o,header:a}=this;if(t[Ze])throw t[Ze];if(t.destroyed)return!1;let c=Buffer.byteLength(A);if(!c)return!0;if(n!==null&&s+c>n){if(i[qs])throw new Kt;process.emitWarning(new Kt)}t.cork(),s===0&&(o||(t[sA]=!0),n===null?t.write(`${a}transfer-encoding: chunked\r +`,"latin1"):t.write(`${a}content-length: ${n}\r +\r +`,"latin1")),n===null&&t.write(`\r +${c.toString(16)}\r +`,"latin1"),this.bytesWritten+=c;let g=t.write(A);return t.uncork(),r.onBodySent(A),g||t[Se].timeout&&t[Se].timeoutType===ci&&t[Se].timeout.refresh&&t[Se].timeout.refresh(),g}end(){let{socket:A,contentLength:t,client:r,bytesWritten:n,expectsPayload:i,header:s,request:o}=this;if(o.onRequestSent(),A[Zt]=!1,A[Ze])throw A[Ze];if(!A.destroyed){if(n===0?i?A.write(`${s}content-length: 0\r +\r +`,"latin1"):A.write(`${s}\r +`,"latin1"):t===null&&A.write(`\r +0\r +\r +`,"latin1"),t!==null&&n!==t){if(r[qs])throw new Kt;process.emitWarning(new Kt)}A[Se].timeout&&A[Se].timeoutType===ci&&A[Se].timeout.refresh&&A[Se].timeout.refresh(),SA(r)}}destroy(A){let{socket:t,client:r}=this;t[Zt]=!1,A&&(D(r[be]<=1,"pipeline should only contain this request"),k.destroy(t,A))}};function oA(e,A,t){try{A.onError(t),D(A.aborted)}catch(r){e.emit("error",r)}}Em.exports=mE});var dm=Q((Uj,hm)=>{"use strict";var Dc=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(A){this.list[this.top]=A,this.top=this.top+1&2047}shift(){let A=this.list[this.bottom];return A===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,A)}};hm.exports=class{constructor(){this.head=this.tail=new Dc}isEmpty(){return this.head.isEmpty()}push(A){this.head.isFull()&&(this.head=this.head.next=new Dc),this.head.push(A)}shift(){let A=this.tail,t=A.shift();return A.isEmpty()&&A.next!==null&&(this.tail=A.next),t}}});var Cm=Q((Tj,Qm)=>{"use strict";var{kFree:iv,kConnected:sv,kPending:ov,kQueued:av,kRunning:cv,kSize:gv}=de(),Kr=Symbol("pool"),kE=class{constructor(A){this[Kr]=A}get connected(){return this[Kr][sv]}get free(){return this[Kr][iv]}get pending(){return this[Kr][ov]}get queued(){return this[Kr][av]}get running(){return this[Kr][cv]}get size(){return this[Kr][gv]}};Qm.exports=kE});var UE=Q((Mj,bm)=>{"use strict";var lv=Ms(),uv=dm(),{kConnected:SE,kSize:fm,kRunning:Im,kPending:Bm,kQueued:Ws,kBusy:Ev,kFree:hv,kUrl:dv,kClose:Qv,kDestroy:Cv,kDispatch:fv}=de(),Iv=Cm(),CA=Symbol("clients"),aA=Symbol("needDrain"),_s=Symbol("queue"),FE=Symbol("closed resolve"),NE=Symbol("onDrain"),pm=Symbol("onConnect"),mm=Symbol("onDisconnect"),ym=Symbol("onConnectionError"),xE=Symbol("get dispatcher"),Rm=Symbol("add client"),Dm=Symbol("remove client"),wm=Symbol("stats"),LE=class extends lv{constructor(){super(),this[_s]=new uv,this[CA]=[],this[Ws]=0;let A=this;this[NE]=function(r,n){let i=A[_s],s=!1;for(;!s;){let o=i.shift();if(!o)break;A[Ws]--,s=!this.dispatch(o.opts,o.handler)}this[aA]=s,!this[aA]&&A[aA]&&(A[aA]=!1,A.emit("drain",r,[A,...n])),A[FE]&&i.isEmpty()&&Promise.all(A[CA].map(o=>o.close())).then(A[FE])},this[pm]=(t,r)=>{A.emit("connect",t,[A,...r])},this[mm]=(t,r,n)=>{A.emit("disconnect",t,[A,...r],n)},this[ym]=(t,r,n)=>{A.emit("connectionError",t,[A,...r],n)},this[wm]=new Iv(this)}get[Ev](){return this[aA]}get[SE](){return this[CA].filter(A=>A[SE]).length}get[hv](){return this[CA].filter(A=>A[SE]&&!A[aA]).length}get[Bm](){let A=this[Ws];for(let{[Bm]:t}of this[CA])A+=t;return A}get[Im](){let A=0;for(let{[Im]:t}of this[CA])A+=t;return A}get[fm](){let A=this[Ws];for(let{[fm]:t}of this[CA])A+=t;return A}get stats(){return this[wm]}async[Qv](){return this[_s].isEmpty()?Promise.all(this[CA].map(A=>A.close())):new Promise(A=>{this[FE]=A})}async[Cv](A){for(;;){let t=this[_s].shift();if(!t)break;t.handler.onError(A)}return Promise.all(this[CA].map(t=>t.destroy(A)))}[fv](A,t){let r=this[xE]();return r?r.dispatch(A,t)||(r[aA]=!0,this[aA]=!this[xE]()):(this[aA]=!0,this[_s].push({opts:A,handler:t}),this[Ws]++),!this[aA]}[Rm](A){return A.on("drain",this[NE]).on("connect",this[pm]).on("disconnect",this[mm]).on("connectionError",this[ym]),this[CA].push(A),this[aA]&&process.nextTick(()=>{this[aA]&&this[NE](A[dv],[this,A])}),this}[Dm](A){A.close(()=>{let t=this[CA].indexOf(A);t!==-1&&this[CA].splice(t,1)}),this[aA]=this[CA].some(t=>!t[aA]&&t.closed!==!0&&t.destroyed!==!0)}};bm.exports={PoolBase:LE,kClients:CA,kNeedDrain:aA,kAddClient:Rm,kRemoveClient:Dm,kGetDispatcher:xE}});var gi=Q((vj,Nm)=>{"use strict";var{PoolBase:Bv,kClients:km,kNeedDrain:pv,kAddClient:mv,kGetDispatcher:yv}=UE(),wv=Hs(),{InvalidArgumentError:TE}=le(),ME=W(),{kUrl:Sm,kInterceptors:Rv}=de(),Dv=vs(),vE=Symbol("options"),PE=Symbol("connections"),Fm=Symbol("factory");function bv(e,A){return new wv(e,A)}var GE=class extends Bv{constructor(A,{connections:t,factory:r=bv,connect:n,connectTimeout:i,tls:s,maxCachedSessions:o,socketPath:a,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:g,allowH2:l,...u}={}){if(super(),t!=null&&(!Number.isFinite(t)||t<0))throw new TE("invalid connections");if(typeof r!="function")throw new TE("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new TE("connect must be a function or an object");typeof n!="function"&&(n=Dv({...s,maxCachedSessions:o,allowH2:l,socketPath:a,timeout:i,...ME.nodeHasAutoSelectFamily&&c?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:g}:void 0,...n})),this[Rv]=u.interceptors&&u.interceptors.Pool&&Array.isArray(u.interceptors.Pool)?u.interceptors.Pool:[],this[PE]=t||null,this[Sm]=ME.parseOrigin(A),this[vE]={...ME.deepClone(u),connect:n,allowH2:l},this[vE].interceptors=u.interceptors?{...u.interceptors}:void 0,this[Fm]=r}[yv](){let A=this[km].find(t=>!t[pv]);return A||((!this[PE]||this[km].length{"use strict";var{BalancedPoolMissingUpstreamError:kv,InvalidArgumentError:Sv}=le(),{PoolBase:Fv,kClients:cA,kNeedDrain:js,kAddClient:Nv,kRemoveClient:xv,kGetDispatcher:Lv}=UE(),Uv=gi(),{kUrl:JE,kInterceptors:Tv}=de(),{parseOrigin:xm}=W(),Lm=Symbol("factory"),bc=Symbol("options"),Um=Symbol("kGreatestCommonDivisor"),Zr=Symbol("kCurrentWeight"),Xr=Symbol("kIndex"),VA=Symbol("kWeight"),kc=Symbol("kMaxWeightPerServer"),Sc=Symbol("kErrorPenalty");function Tm(e,A){return A===0?e:Tm(A,e%A)}function Mv(e,A){return new Uv(e,A)}var YE=class extends Fv{constructor(A=[],{factory:t=Mv,...r}={}){if(super(),this[bc]=r,this[Xr]=-1,this[Zr]=0,this[kc]=this[bc].maxWeightPerServer||100,this[Sc]=this[bc].errorPenalty||15,Array.isArray(A)||(A=[A]),typeof t!="function")throw new Sv("factory must be a function.");this[Tv]=r.interceptors&&r.interceptors.BalancedPool&&Array.isArray(r.interceptors.BalancedPool)?r.interceptors.BalancedPool:[],this[Lm]=t;for(let n of A)this.addUpstream(n);this._updateBalancedPoolStats()}addUpstream(A){let t=xm(A).origin;if(this[cA].find(n=>n[JE].origin===t&&n.closed!==!0&&n.destroyed!==!0))return this;let r=this[Lm](t,Object.assign({},this[bc]));this[Nv](r),r.on("connect",()=>{r[VA]=Math.min(this[kc],r[VA]+this[Sc])}),r.on("connectionError",()=>{r[VA]=Math.max(1,r[VA]-this[Sc]),this._updateBalancedPoolStats()}),r.on("disconnect",(...n)=>{let i=n[2];i&&i.code==="UND_ERR_SOCKET"&&(r[VA]=Math.max(1,r[VA]-this[Sc]),this._updateBalancedPoolStats())});for(let n of this[cA])n[VA]=this[kc];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){this[Um]=this[cA].map(A=>A[VA]).reduce(Tm,0)}removeUpstream(A){let t=xm(A).origin,r=this[cA].find(n=>n[JE].origin===t&&n.closed!==!0&&n.destroyed!==!0);return r&&this[xv](r),this}get upstreams(){return this[cA].filter(A=>A.closed!==!0&&A.destroyed!==!0).map(A=>A[JE].origin)}[Lv](){if(this[cA].length===0)throw new kv;if(!this[cA].find(i=>!i[js]&&i.closed!==!0&&i.destroyed!==!0)||this[cA].map(i=>i[js]).reduce((i,s)=>i&&s,!0))return;let r=0,n=this[cA].findIndex(i=>!i[js]);for(;r++this[cA][n][VA]&&!i[js]&&(n=this[Xr]),this[Xr]===0&&(this[Zr]=this[Zr]-this[Um],this[Zr]<=0&&(this[Zr]=this[kc])),i[VA]>=this[Zr]&&!i[js])return i}return this[Zr]=this[cA][n][VA],this[Xr]=n,this[cA][n]}};Mm.exports=YE});var VE=Q((Gj,Jm)=>{"use strict";var{kConnected:Pm,kSize:Gm}=de(),Fc=class{constructor(A){this.value=A}deref(){return this.value[Pm]===0&&this.value[Gm]===0?void 0:this.value}},Nc=class{constructor(A){this.finalizer=A}register(A,t){A.on&&A.on("disconnect",()=>{A[Pm]===0&&A[Gm]===0&&this.finalizer(t)})}};Jm.exports=function(){return process.env.NODE_V8_COVERAGE?{WeakRef:Fc,FinalizationRegistry:Nc}:{WeakRef:global.WeakRef||Fc,FinalizationRegistry:global.FinalizationRegistry||Nc}}});var Ks=Q((Jj,jm)=>{"use strict";var{InvalidArgumentError:xc}=le(),{kClients:br,kRunning:Ym,kClose:vv,kDestroy:Pv,kDispatch:Gv,kInterceptors:Jv}=de(),Yv=Ms(),Vv=gi(),qv=Hs(),Ov=W(),Hv=Qc(),{WeakRef:Wv,FinalizationRegistry:_v}=VE()(),Vm=Symbol("onConnect"),qm=Symbol("onDisconnect"),Om=Symbol("onConnectionError"),jv=Symbol("maxRedirections"),Hm=Symbol("onDrain"),Wm=Symbol("factory"),_m=Symbol("finalizer"),qE=Symbol("options");function Kv(e,A){return A&&A.connections===1?new qv(e,A):new Vv(e,A)}var OE=class extends Yv{constructor({factory:A=Kv,maxRedirections:t=0,connect:r,...n}={}){if(super(),typeof A!="function")throw new xc("factory must be a function.");if(r!=null&&typeof r!="function"&&typeof r!="object")throw new xc("connect must be a function or an object");if(!Number.isInteger(t)||t<0)throw new xc("maxRedirections must be a positive number");r&&typeof r!="function"&&(r={...r}),this[Jv]=n.interceptors&&n.interceptors.Agent&&Array.isArray(n.interceptors.Agent)?n.interceptors.Agent:[Hv({maxRedirections:t})],this[qE]={...Ov.deepClone(n),connect:r},this[qE].interceptors=n.interceptors?{...n.interceptors}:void 0,this[jv]=t,this[Wm]=A,this[br]=new Map,this[_m]=new _v(s=>{let o=this[br].get(s);o!==void 0&&o.deref()===void 0&&this[br].delete(s)});let i=this;this[Hm]=(s,o)=>{i.emit("drain",s,[i,...o])},this[Vm]=(s,o)=>{i.emit("connect",s,[i,...o])},this[qm]=(s,o,a)=>{i.emit("disconnect",s,[i,...o],a)},this[Om]=(s,o,a)=>{i.emit("connectionError",s,[i,...o],a)}}get[Ym](){let A=0;for(let t of this[br].values()){let r=t.deref();r&&(A+=r[Ym])}return A}[Gv](A,t){let r;if(A.origin&&(typeof A.origin=="string"||A.origin instanceof URL))r=String(A.origin);else throw new xc("opts.origin must be a non-empty string or URL.");let n=this[br].get(r),i=n?n.deref():null;return i||(i=this[Wm](A.origin,this[qE]).on("drain",this[Hm]).on("connect",this[Vm]).on("disconnect",this[qm]).on("connectionError",this[Om]),this[br].set(r,new Wv(i)),this[_m].register(i,r)),i.dispatch(A,t)}async[vv](){let A=[];for(let t of this[br].values()){let r=t.deref();r&&A.push(r.close())}await Promise.all(A)}async[Pv](A){let t=[];for(let r of this[br].values()){let n=r.deref();n&&t.push(n.destroy(A))}await Promise.all(t)}};jm.exports=OE});var ry=Q((Vj,ty)=>{"use strict";var zm=require("assert"),{Readable:Zv}=require("stream"),{RequestAbortedError:$m,NotSupportedError:Xv,InvalidArgumentError:zv}=le(),Tc=W(),{ReadableStreamFrom:$v,toUSVString:eP}=W(),HE,FA=Symbol("kConsume"),Lc=Symbol("kReading"),kr=Symbol("kBody"),Km=Symbol("abort"),ey=Symbol("kContentType"),Zm=()=>{};ty.exports=class extends Zv{constructor({resume:A,abort:t,contentType:r="",highWaterMark:n=64*1024}){super({autoDestroy:!0,read:A,highWaterMark:n}),this._readableState.dataEmitted=!1,this[Km]=t,this[FA]=null,this[kr]=null,this[ey]=r,this[Lc]=!1}destroy(A){return this.destroyed?this:(!A&&!this._readableState.endEmitted&&(A=new $m),A&&this[Km](),super.destroy(A))}emit(A,...t){return A==="data"?this._readableState.dataEmitted=!0:A==="error"&&(this._readableState.errorEmitted=!0),super.emit(A,...t)}on(A,...t){return(A==="data"||A==="readable")&&(this[Lc]=!0),super.on(A,...t)}addListener(A,...t){return this.on(A,...t)}off(A,...t){let r=super.off(A,...t);return(A==="data"||A==="readable")&&(this[Lc]=this.listenerCount("data")>0||this.listenerCount("readable")>0),r}removeListener(A,...t){return this.off(A,...t)}push(A){return this[FA]&&A!==null&&this.readableLength===0?(Ay(this[FA],A),this[Lc]?super.push(A):!0):super.push(A)}async text(){return Uc(this,"text")}async json(){return Uc(this,"json")}async blob(){return Uc(this,"blob")}async arrayBuffer(){return Uc(this,"arrayBuffer")}async formData(){throw new Xv}get bodyUsed(){return Tc.isDisturbed(this)}get body(){return this[kr]||(this[kr]=$v(this),this[FA]&&(this[kr].getReader(),zm(this[kr].locked))),this[kr]}dump(A){let t=A&&Number.isFinite(A.limit)?A.limit:262144,r=A&&A.signal;if(r)try{if(typeof r!="object"||!("aborted"in r))throw new zv("signal must be an AbortSignal");Tc.throwIfAborted(r)}catch(n){return Promise.reject(n)}return this.closed?Promise.resolve(null):new Promise((n,i)=>{let s=r?Tc.addAbortListener(r,()=>{this.destroy()}):Zm;this.on("close",function(){s(),r&&r.aborted?i(r.reason||Object.assign(new Error("The operation was aborted"),{name:"AbortError"})):n(null)}).on("error",Zm).on("data",function(o){t-=o.length,t<=0&&this.destroy()}).resume()})}};function AP(e){return e[kr]&&e[kr].locked===!0||e[FA]}function tP(e){return Tc.isDisturbed(e)||AP(e)}async function Uc(e,A){if(tP(e))throw new TypeError("unusable");return zm(!e[FA]),new Promise((t,r)=>{e[FA]={type:A,stream:e,resolve:t,reject:r,length:0,body:[]},e.on("error",function(n){WE(this[FA],n)}).on("close",function(){this[FA].body!==null&&WE(this[FA],new $m)}),process.nextTick(rP,e[FA])})}function rP(e){if(e.body===null)return;let{_readableState:A}=e.stream;for(let t of A.buffer)Ay(e,t);for(A.endEmitted?Xm(this[FA]):e.stream.on("end",function(){Xm(this[FA])}),e.stream.resume();e.stream.read()!=null;);}function Xm(e){let{type:A,body:t,resolve:r,stream:n,length:i}=e;try{if(A==="text")r(eP(Buffer.concat(t)));else if(A==="json")r(JSON.parse(Buffer.concat(t)));else if(A==="arrayBuffer"){let s=new Uint8Array(i),o=0;for(let a of t)s.set(a,o),o+=a.byteLength;r(s.buffer)}else A==="blob"&&(HE||(HE=require("buffer").Blob),r(new HE(t,{type:n[ey]})));WE(e)}catch(s){n.destroy(s)}}function Ay(e,A){e.length+=A.length,e.body.push(A)}function WE(e,A){e.body!==null&&(A?e.reject(A):e.resolve(),e.type=null,e.stream=null,e.resolve=null,e.reject=null,e.length=0,e.body=null)}});var _E=Q((qj,iy)=>{"use strict";var nP=require("assert"),{ResponseStatusCodeError:Mc}=le(),{toUSVString:ny}=W();async function iP({callback:e,body:A,contentType:t,statusCode:r,statusMessage:n,headers:i}){nP(A);let s=[],o=0;for await(let a of A)if(s.push(a),o+=a.length,o>128*1024){s=null;break}if(r===204||!t||!s){process.nextTick(e,new Mc(`Response status code ${r}${n?`: ${n}`:""}`,r,i));return}try{if(t.startsWith("application/json")){let a=JSON.parse(ny(Buffer.concat(s)));process.nextTick(e,new Mc(`Response status code ${r}${n?`: ${n}`:""}`,r,i,a));return}if(t.startsWith("text/")){let a=ny(Buffer.concat(s));process.nextTick(e,new Mc(`Response status code ${r}${n?`: ${n}`:""}`,r,i,a));return}}catch{}process.nextTick(e,new Mc(`Response status code ${r}${n?`: ${n}`:""}`,r,i))}iy.exports={getResolveErrorBodyCallback:iP}});var ui=Q((Oj,oy)=>{"use strict";var{addAbortListener:sP}=W(),{RequestAbortedError:oP}=le(),li=Symbol("kListener"),Sr=Symbol("kSignal");function sy(e){e.abort?e.abort():e.onError(new oP)}function aP(e,A){if(e[Sr]=null,e[li]=null,!!A){if(A.aborted){sy(e);return}e[Sr]=A,e[li]=()=>{sy(e)},sP(e[Sr],e[li])}}function cP(e){e[Sr]&&("removeEventListener"in e[Sr]?e[Sr].removeEventListener("abort",e[li]):e[Sr].removeListener("abort",e[li]),e[Sr]=null,e[li]=null)}oy.exports={addSignal:aP,removeSignal:cP}});var gy=Q((Hj,jE)=>{"use strict";var gP=ry(),{InvalidArgumentError:Ei,RequestAbortedError:lP}=le(),Dt=W(),{getResolveErrorBodyCallback:uP}=_E(),{AsyncResource:EP}=require("async_hooks"),{addSignal:hP,removeSignal:ay}=ui(),vc=class extends EP{constructor(A,t){if(!A||typeof A!="object")throw new Ei("invalid opts");let{signal:r,method:n,opaque:i,body:s,onInfo:o,responseHeaders:a,throwOnError:c,highWaterMark:g}=A;try{if(typeof t!="function")throw new Ei("invalid callback");if(g&&(typeof g!="number"||g<0))throw new Ei("invalid highWaterMark");if(r&&typeof r.on!="function"&&typeof r.addEventListener!="function")throw new Ei("signal must be an EventEmitter or EventTarget");if(n==="CONNECT")throw new Ei("invalid method");if(o&&typeof o!="function")throw new Ei("invalid onInfo callback");super("UNDICI_REQUEST")}catch(l){throw Dt.isStream(s)&&Dt.destroy(s.on("error",Dt.nop),l),l}this.responseHeaders=a||null,this.opaque=i||null,this.callback=t,this.res=null,this.abort=null,this.body=s,this.trailers={},this.context=null,this.onInfo=o||null,this.throwOnError=c,this.highWaterMark=g,Dt.isStream(s)&&s.on("error",l=>{this.onError(l)}),hP(this,r)}onConnect(A,t){if(!this.callback)throw new lP;this.abort=A,this.context=t}onHeaders(A,t,r,n){let{callback:i,opaque:s,abort:o,context:a,responseHeaders:c,highWaterMark:g}=this,l=c==="raw"?Dt.parseRawHeaders(t):Dt.parseHeaders(t);if(A<200){this.onInfo&&this.onInfo({statusCode:A,headers:l});return}let E=(c==="raw"?Dt.parseHeaders(t):l)["content-type"],h=new gP({resume:r,abort:o,contentType:E,highWaterMark:g});this.callback=null,this.res=h,i!==null&&(this.throwOnError&&A>=400?this.runInAsyncScope(uP,null,{callback:i,body:h,contentType:E,statusCode:A,statusMessage:n,headers:l}):this.runInAsyncScope(i,null,null,{statusCode:A,headers:l,trailers:this.trailers,opaque:s,body:h,context:a}))}onData(A){let{res:t}=this;return t.push(A)}onComplete(A){let{res:t}=this;ay(this),Dt.parseHeaders(A,this.trailers),t.push(null)}onError(A){let{res:t,callback:r,body:n,opaque:i}=this;ay(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,A,{opaque:i})})),t&&(this.res=null,queueMicrotask(()=>{Dt.destroy(t,A)})),n&&(this.body=null,Dt.destroy(n,A))}};function cy(e,A){if(A===void 0)return new Promise((t,r)=>{cy.call(this,e,(n,i)=>n?r(n):t(i))});try{this.dispatch(e,new vc(e,A))}catch(t){if(typeof A!="function")throw t;let r=e&&e.opaque;queueMicrotask(()=>A(t,{opaque:r}))}}jE.exports=cy;jE.exports.RequestHandler=vc});var hy=Q((Wj,Ey)=>{"use strict";var{finished:dP,PassThrough:QP}=require("stream"),{InvalidArgumentError:hi,InvalidReturnValueError:CP,RequestAbortedError:fP}=le(),At=W(),{getResolveErrorBodyCallback:IP}=_E(),{AsyncResource:BP}=require("async_hooks"),{addSignal:pP,removeSignal:ly}=ui(),KE=class extends BP{constructor(A,t,r){if(!A||typeof A!="object")throw new hi("invalid opts");let{signal:n,method:i,opaque:s,body:o,onInfo:a,responseHeaders:c,throwOnError:g}=A;try{if(typeof r!="function")throw new hi("invalid callback");if(typeof t!="function")throw new hi("invalid factory");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new hi("signal must be an EventEmitter or EventTarget");if(i==="CONNECT")throw new hi("invalid method");if(a&&typeof a!="function")throw new hi("invalid onInfo callback");super("UNDICI_STREAM")}catch(l){throw At.isStream(o)&&At.destroy(o.on("error",At.nop),l),l}this.responseHeaders=c||null,this.opaque=s||null,this.factory=t,this.callback=r,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=o,this.onInfo=a||null,this.throwOnError=g||!1,At.isStream(o)&&o.on("error",l=>{this.onError(l)}),pP(this,n)}onConnect(A,t){if(!this.callback)throw new fP;this.abort=A,this.context=t}onHeaders(A,t,r,n){let{factory:i,opaque:s,context:o,callback:a,responseHeaders:c}=this,g=c==="raw"?At.parseRawHeaders(t):At.parseHeaders(t);if(A<200){this.onInfo&&this.onInfo({statusCode:A,headers:g});return}this.factory=null;let l;if(this.throwOnError&&A>=400){let h=(c==="raw"?At.parseHeaders(t):g)["content-type"];l=new QP,this.callback=null,this.runInAsyncScope(IP,null,{callback:a,body:l,contentType:h,statusCode:A,statusMessage:n,headers:g})}else{if(i===null)return;if(l=this.runInAsyncScope(i,null,{statusCode:A,headers:g,opaque:s,context:o}),!l||typeof l.write!="function"||typeof l.end!="function"||typeof l.on!="function")throw new CP("expected Writable");dP(l,{readable:!1},E=>{let{callback:h,res:d,opaque:C,trailers:I,abort:p}=this;this.res=null,(E||!d.readable)&&At.destroy(d,E),this.callback=null,this.runInAsyncScope(h,null,E||null,{opaque:C,trailers:I}),E&&p()})}return l.on("drain",r),this.res=l,(l.writableNeedDrain!==void 0?l.writableNeedDrain:l._writableState&&l._writableState.needDrain)!==!0}onData(A){let{res:t}=this;return t?t.write(A):!0}onComplete(A){let{res:t}=this;ly(this),t&&(this.trailers=At.parseHeaders(A),t.end())}onError(A){let{res:t,callback:r,opaque:n,body:i}=this;ly(this),this.factory=null,t?(this.res=null,At.destroy(t,A)):r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,A,{opaque:n})})),i&&(this.body=null,At.destroy(i,A))}};function uy(e,A,t){if(t===void 0)return new Promise((r,n)=>{uy.call(this,e,A,(i,s)=>i?n(i):r(s))});try{this.dispatch(e,new KE(e,A,t))}catch(r){if(typeof t!="function")throw r;let n=e&&e.opaque;queueMicrotask(()=>t(r,{opaque:n}))}}Ey.exports=uy});var Cy=Q((_j,Qy)=>{"use strict";var{Readable:dy,Duplex:mP,PassThrough:yP}=require("stream"),{InvalidArgumentError:Zs,InvalidReturnValueError:wP,RequestAbortedError:Pc}=le(),qA=W(),{AsyncResource:RP}=require("async_hooks"),{addSignal:DP,removeSignal:bP}=ui(),kP=require("assert"),di=Symbol("resume"),ZE=class extends dy{constructor(){super({autoDestroy:!0}),this[di]=null}_read(){let{[di]:A}=this;A&&(this[di]=null,A())}_destroy(A,t){this._read(),t(A)}},XE=class extends dy{constructor(A){super({autoDestroy:!0}),this[di]=A}_read(){this[di]()}_destroy(A,t){!A&&!this._readableState.endEmitted&&(A=new Pc),t(A)}},zE=class extends RP{constructor(A,t){if(!A||typeof A!="object")throw new Zs("invalid opts");if(typeof t!="function")throw new Zs("invalid handler");let{signal:r,method:n,opaque:i,onInfo:s,responseHeaders:o}=A;if(r&&typeof r.on!="function"&&typeof r.addEventListener!="function")throw new Zs("signal must be an EventEmitter or EventTarget");if(n==="CONNECT")throw new Zs("invalid method");if(s&&typeof s!="function")throw new Zs("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=i||null,this.responseHeaders=o||null,this.handler=t,this.abort=null,this.context=null,this.onInfo=s||null,this.req=new ZE().on("error",qA.nop),this.ret=new mP({readableObjectMode:A.objectMode,autoDestroy:!0,read:()=>{let{body:a}=this;a&&a.resume&&a.resume()},write:(a,c,g)=>{let{req:l}=this;l.push(a,c)||l._readableState.destroyed?g():l[di]=g},destroy:(a,c)=>{let{body:g,req:l,res:u,ret:E,abort:h}=this;!a&&!E._readableState.endEmitted&&(a=new Pc),h&&a&&h(),qA.destroy(g,a),qA.destroy(l,a),qA.destroy(u,a),bP(this),c(a)}}).on("prefinish",()=>{let{req:a}=this;a.push(null)}),this.res=null,DP(this,r)}onConnect(A,t){let{ret:r,res:n}=this;if(kP(!n,"pipeline cannot be retried"),r.destroyed)throw new Pc;this.abort=A,this.context=t}onHeaders(A,t,r){let{opaque:n,handler:i,context:s}=this;if(A<200){if(this.onInfo){let a=this.responseHeaders==="raw"?qA.parseRawHeaders(t):qA.parseHeaders(t);this.onInfo({statusCode:A,headers:a})}return}this.res=new XE(r);let o;try{this.handler=null;let a=this.responseHeaders==="raw"?qA.parseRawHeaders(t):qA.parseHeaders(t);o=this.runInAsyncScope(i,null,{statusCode:A,headers:a,opaque:n,body:this.res,context:s})}catch(a){throw this.res.on("error",qA.nop),a}if(!o||typeof o.on!="function")throw new wP("expected Readable");o.on("data",a=>{let{ret:c,body:g}=this;!c.push(a)&&g.pause&&g.pause()}).on("error",a=>{let{ret:c}=this;qA.destroy(c,a)}).on("end",()=>{let{ret:a}=this;a.push(null)}).on("close",()=>{let{ret:a}=this;a._readableState.ended||qA.destroy(a,new Pc)}),this.body=o}onData(A){let{res:t}=this;return t.push(A)}onComplete(A){let{res:t}=this;t.push(null)}onError(A){let{ret:t}=this;this.handler=null,qA.destroy(t,A)}};function SP(e,A){try{let t=new zE(e,A);return this.dispatch({...e,body:t.req},t),t.ret}catch(t){return new yP().destroy(t)}}Qy.exports=SP});var my=Q((jj,py)=>{"use strict";var{InvalidArgumentError:$E,RequestAbortedError:FP,SocketError:NP}=le(),{AsyncResource:xP}=require("async_hooks"),fy=W(),{addSignal:LP,removeSignal:Iy}=ui(),UP=require("assert"),eh=class extends xP{constructor(A,t){if(!A||typeof A!="object")throw new $E("invalid opts");if(typeof t!="function")throw new $E("invalid callback");let{signal:r,opaque:n,responseHeaders:i}=A;if(r&&typeof r.on!="function"&&typeof r.addEventListener!="function")throw new $E("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=i||null,this.opaque=n||null,this.callback=t,this.abort=null,this.context=null,LP(this,r)}onConnect(A,t){if(!this.callback)throw new FP;this.abort=A,this.context=null}onHeaders(){throw new NP("bad upgrade",null)}onUpgrade(A,t,r){let{callback:n,opaque:i,context:s}=this;UP.strictEqual(A,101),Iy(this),this.callback=null;let o=this.responseHeaders==="raw"?fy.parseRawHeaders(t):fy.parseHeaders(t);this.runInAsyncScope(n,null,null,{headers:o,socket:r,opaque:i,context:s})}onError(A){let{callback:t,opaque:r}=this;Iy(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,A,{opaque:r})}))}};function By(e,A){if(A===void 0)return new Promise((t,r)=>{By.call(this,e,(n,i)=>n?r(n):t(i))});try{let t=new eh(e,A);this.dispatch({...e,method:e.method||"GET",upgrade:e.protocol||"Websocket"},t)}catch(t){if(typeof A!="function")throw t;let r=e&&e.opaque;queueMicrotask(()=>A(t,{opaque:r}))}}py.exports=By});var by=Q((Kj,Dy)=>{"use strict";var{AsyncResource:TP}=require("async_hooks"),{InvalidArgumentError:Ah,RequestAbortedError:MP,SocketError:vP}=le(),yy=W(),{addSignal:PP,removeSignal:wy}=ui(),th=class extends TP{constructor(A,t){if(!A||typeof A!="object")throw new Ah("invalid opts");if(typeof t!="function")throw new Ah("invalid callback");let{signal:r,opaque:n,responseHeaders:i}=A;if(r&&typeof r.on!="function"&&typeof r.addEventListener!="function")throw new Ah("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=n||null,this.responseHeaders=i||null,this.callback=t,this.abort=null,PP(this,r)}onConnect(A,t){if(!this.callback)throw new MP;this.abort=A,this.context=t}onHeaders(){throw new vP("bad connect",null)}onUpgrade(A,t,r){let{callback:n,opaque:i,context:s}=this;wy(this),this.callback=null;let o=t;o!=null&&(o=this.responseHeaders==="raw"?yy.parseRawHeaders(t):yy.parseHeaders(t)),this.runInAsyncScope(n,null,null,{statusCode:A,headers:o,socket:r,opaque:i,context:s})}onError(A){let{callback:t,opaque:r}=this;wy(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,A,{opaque:r})}))}};function Ry(e,A){if(A===void 0)return new Promise((t,r)=>{Ry.call(this,e,(n,i)=>n?r(n):t(i))});try{let t=new th(e,A);this.dispatch({...e,method:"CONNECT"},t)}catch(t){if(typeof A!="function")throw t;let r=e&&e.opaque;queueMicrotask(()=>A(t,{opaque:r}))}}Dy.exports=Ry});var ky=Q((Zj,Qi)=>{"use strict";Qi.exports.request=gy();Qi.exports.stream=hy();Qi.exports.pipeline=Cy();Qi.exports.upgrade=my();Qi.exports.connect=by()});var nh=Q((Xj,Sy)=>{"use strict";var{UndiciError:GP}=le(),rh=class e extends GP{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="MockNotMatchedError",this.message=A||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}};Sy.exports={MockNotMatchedError:rh}});var Ci=Q((zj,Fy)=>{"use strict";Fy.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var Xs=Q(($j,Vy)=>{"use strict";var{MockNotMatchedError:zr}=nh(),{kDispatches:Gc,kMockAgent:JP,kOriginalDispatch:YP,kOrigin:VP,kGetNetConnect:qP}=Ci(),{buildURL:OP,nop:HP}=W(),{STATUS_CODES:WP}=require("http"),{types:{isPromise:_P}}=require("util");function Xt(e,A){return typeof e=="string"?e===A:e instanceof RegExp?e.test(A):typeof e=="function"?e(A)===!0:!1}function xy(e){return Object.fromEntries(Object.entries(e).map(([A,t])=>[A.toLocaleLowerCase(),t]))}function Ly(e,A){if(Array.isArray(e)){for(let t=0;t"u")return!0;if(typeof A!="object"||typeof e.headers!="object")return!1;for(let[t,r]of Object.entries(e.headers)){let n=Ly(A,t);if(!Xt(r,n))return!1}return!0}function Ny(e){if(typeof e!="string")return e;let A=e.split("?");if(A.length!==2)return e;let t=new URLSearchParams(A.pop());return t.sort(),[...A,t.toString()].join("?")}function jP(e,{path:A,method:t,body:r,headers:n}){let i=Xt(e.path,A),s=Xt(e.method,t),o=typeof e.body<"u"?Xt(e.body,r):!0,a=Ty(e,n);return i&&s&&o&&a}function My(e){return Buffer.isBuffer(e)?e:typeof e=="object"?JSON.stringify(e):e.toString()}function vy(e,A){let t=A.query?OP(A.path,A.query):A.path,r=typeof t=="string"?Ny(t):t,n=e.filter(({consumed:i})=>!i).filter(({path:i})=>Xt(Ny(i),r));if(n.length===0)throw new zr(`Mock dispatch not matched for path '${r}'`);if(n=n.filter(({method:i})=>Xt(i,A.method)),n.length===0)throw new zr(`Mock dispatch not matched for method '${A.method}'`);if(n=n.filter(({body:i})=>typeof i<"u"?Xt(i,A.body):!0),n.length===0)throw new zr(`Mock dispatch not matched for body '${A.body}'`);if(n=n.filter(i=>Ty(i,A.headers)),n.length===0)throw new zr(`Mock dispatch not matched for headers '${typeof A.headers=="object"?JSON.stringify(A.headers):A.headers}'`);return n[0]}function KP(e,A,t){let r={timesInvoked:0,times:1,persist:!1,consumed:!1},n=typeof t=="function"?{callback:t}:{...t},i={...r,...A,pending:!0,data:{error:null,...n}};return e.push(i),i}function ih(e,A){let t=e.findIndex(r=>r.consumed?jP(r,A):!1);t!==-1&&e.splice(t,1)}function Py(e){let{path:A,method:t,body:r,headers:n,query:i}=e;return{path:A,method:t,body:r,headers:n,query:i}}function sh(e){return Object.entries(e).reduce((A,[t,r])=>[...A,Buffer.from(`${t}`),Array.isArray(r)?r.map(n=>Buffer.from(`${n}`)):Buffer.from(`${r}`)],[])}function Gy(e){return WP[e]||"unknown"}async function ZP(e){let A=[];for await(let t of e)A.push(t);return Buffer.concat(A).toString("utf8")}function Jy(e,A){let t=Py(e),r=vy(this[Gc],t);r.timesInvoked++,r.data.callback&&(r.data={...r.data,...r.data.callback(e)});let{data:{statusCode:n,data:i,headers:s,trailers:o,error:a},delay:c,persist:g}=r,{timesInvoked:l,times:u}=r;if(r.consumed=!g&&l>=u,r.pending=l0?setTimeout(()=>{E(this[Gc])},c):E(this[Gc]);function E(d,C=i){let I=Array.isArray(e.headers)?Uy(e.headers):e.headers,p=typeof C=="function"?C({...e,headers:I}):C;if(_P(p)){p.then(H=>E(d,H));return}let w=My(p),m=sh(s),K=sh(o);A.abort=HP,A.onHeaders(n,m,h,Gy(n)),A.onData(Buffer.from(w)),A.onComplete(K),ih(d,t)}function h(){}return!0}function XP(){let e=this[JP],A=this[VP],t=this[YP];return function(n,i){if(e.isMockActive)try{Jy.call(this,n,i)}catch(s){if(s instanceof zr){let o=e[qP]();if(o===!1)throw new zr(`${s.message}: subsequent request to origin ${A} was not allowed (net.connect disabled)`);if(Yy(o,A))t.call(this,n,i);else throw new zr(`${s.message}: subsequent request to origin ${A} was not allowed (net.connect is not enabled for this origin)`)}else throw s}else t.call(this,n,i)}}function Yy(e,A){let t=new URL(A);return e===!0?!0:!!(Array.isArray(e)&&e.some(r=>Xt(r,t.host)))}function zP(e){if(e){let{agent:A,...t}=e;return t}}Vy.exports={getResponseData:My,getMockDispatch:vy,addMockDispatch:KP,deleteMockDispatch:ih,buildKey:Py,generateKeyValues:sh,matchValue:Xt,getResponse:ZP,getStatusText:Gy,mockDispatch:Jy,buildMockDispatch:XP,checkNetConnect:Yy,buildMockOptions:zP,getHeaderByName:Ly}});var Eh=Q((e8,uh)=>{"use strict";var{getResponseData:$P,buildKey:e2,addMockDispatch:oh}=Xs(),{kDispatches:Jc,kDispatchKey:Yc,kDefaultHeaders:ah,kDefaultTrailers:ch,kContentLength:gh,kMockDispatch:Vc}=Ci(),{InvalidArgumentError:tt}=le(),{buildURL:A2}=W(),fi=class{constructor(A){this[Vc]=A}delay(A){if(typeof A!="number"||!Number.isInteger(A)||A<=0)throw new tt("waitInMs must be a valid integer > 0");return this[Vc].delay=A,this}persist(){return this[Vc].persist=!0,this}times(A){if(typeof A!="number"||!Number.isInteger(A)||A<=0)throw new tt("repeatTimes must be a valid integer > 0");return this[Vc].times=A,this}},lh=class{constructor(A,t){if(typeof A!="object")throw new tt("opts must be an object");if(typeof A.path>"u")throw new tt("opts.path must be defined");if(typeof A.method>"u"&&(A.method="GET"),typeof A.path=="string")if(A.query)A.path=A2(A.path,A.query);else{let r=new URL(A.path,"data://");A.path=r.pathname+r.search}typeof A.method=="string"&&(A.method=A.method.toUpperCase()),this[Yc]=e2(A),this[Jc]=t,this[ah]={},this[ch]={},this[gh]=!1}createMockScopeDispatchData(A,t,r={}){let n=$P(t),i=this[gh]?{"content-length":n.length}:{},s={...this[ah],...i,...r.headers},o={...this[ch],...r.trailers};return{statusCode:A,data:t,headers:s,trailers:o}}validateReplyParameters(A,t,r){if(typeof A>"u")throw new tt("statusCode must be defined");if(typeof t>"u")throw new tt("data must be defined");if(typeof r!="object")throw new tt("responseOptions must be an object")}reply(A){if(typeof A=="function"){let o=c=>{let g=A(c);if(typeof g!="object")throw new tt("reply options callback must return an object");let{statusCode:l,data:u="",responseOptions:E={}}=g;return this.validateReplyParameters(l,u,E),{...this.createMockScopeDispatchData(l,u,E)}},a=oh(this[Jc],this[Yc],o);return new fi(a)}let[t,r="",n={}]=[...arguments];this.validateReplyParameters(t,r,n);let i=this.createMockScopeDispatchData(t,r,n),s=oh(this[Jc],this[Yc],i);return new fi(s)}replyWithError(A){if(typeof A>"u")throw new tt("error must be defined");let t=oh(this[Jc],this[Yc],{error:A});return new fi(t)}defaultReplyHeaders(A){if(typeof A>"u")throw new tt("headers must be defined");return this[ah]=A,this}defaultReplyTrailers(A){if(typeof A>"u")throw new tt("trailers must be defined");return this[ch]=A,this}replyContentLength(){return this[gh]=!0,this}};uh.exports.MockInterceptor=lh;uh.exports.MockScope=fi});var Qh=Q((A8,Ky)=>{"use strict";var{promisify:t2}=require("util"),r2=Hs(),{buildMockDispatch:n2}=Xs(),{kDispatches:qy,kMockAgent:Oy,kClose:Hy,kOriginalClose:Wy,kOrigin:_y,kOriginalDispatch:i2,kConnected:hh}=Ci(),{MockInterceptor:s2}=Eh(),jy=de(),{InvalidArgumentError:o2}=le(),dh=class extends r2{constructor(A,t){if(super(A,t),!t||!t.agent||typeof t.agent.dispatch!="function")throw new o2("Argument opts.agent must implement Agent");this[Oy]=t.agent,this[_y]=A,this[qy]=[],this[hh]=1,this[i2]=this.dispatch,this[Wy]=this.close.bind(this),this.dispatch=n2.call(this),this.close=this[Hy]}get[jy.kConnected](){return this[hh]}intercept(A){return new s2(A,this[qy])}async[Hy](){await t2(this[Wy])(),this[hh]=0,this[Oy][jy.kClients].delete(this[_y])}};Ky.exports=dh});var Ih=Q((t8,tw)=>{"use strict";var{promisify:a2}=require("util"),c2=gi(),{buildMockDispatch:g2}=Xs(),{kDispatches:Zy,kMockAgent:Xy,kClose:zy,kOriginalClose:$y,kOrigin:ew,kOriginalDispatch:l2,kConnected:Ch}=Ci(),{MockInterceptor:u2}=Eh(),Aw=de(),{InvalidArgumentError:E2}=le(),fh=class extends c2{constructor(A,t){if(super(A,t),!t||!t.agent||typeof t.agent.dispatch!="function")throw new E2("Argument opts.agent must implement Agent");this[Xy]=t.agent,this[ew]=A,this[Zy]=[],this[Ch]=1,this[l2]=this.dispatch,this[$y]=this.close.bind(this),this.dispatch=g2.call(this),this.close=this[zy]}get[Aw.kConnected](){return this[Ch]}intercept(A){return new u2(A,this[Zy])}async[zy](){await a2(this[$y])(),this[Ch]=0,this[Xy][Aw.kClients].delete(this[ew])}};tw.exports=fh});var nw=Q((n8,rw)=>{"use strict";var h2={pronoun:"it",is:"is",was:"was",this:"this"},d2={pronoun:"they",is:"are",was:"were",this:"these"};rw.exports=class{constructor(A,t){this.singular=A,this.plural=t}pluralize(A){let t=A===1,r=t?h2:d2,n=t?this.singular:this.plural;return{...r,count:A,noun:n}}}});var sw=Q((s8,iw)=>{"use strict";var{Transform:Q2}=require("stream"),{Console:C2}=require("console");iw.exports=class{constructor({disableColors:A}={}){this.transform=new Q2({transform(t,r,n){n(null,t)}}),this.logger=new C2({stdout:this.transform,inspectOptions:{colors:!A&&!process.env.CI}})}format(A){let t=A.map(({method:r,path:n,data:{statusCode:i},persist:s,times:o,timesInvoked:a,origin:c})=>({Method:r,Origin:c,Path:n,"Status code":i,Persistent:s?"\u2705":"\u274C",Invocations:a,Remaining:s?1/0:o-a}));return this.logger.table(t),this.transform.read().toString()}}});var gw=Q((o8,cw)=>{"use strict";var{kClients:$r}=de(),f2=Ks(),{kAgent:Bh,kMockAgentSet:qc,kMockAgentGet:ow,kDispatches:ph,kIsMockActive:Oc,kNetConnect:en,kGetNetConnect:I2,kOptions:Hc,kFactory:Wc}=Ci(),B2=Qh(),p2=Ih(),{matchValue:m2,buildMockOptions:y2}=Xs(),{InvalidArgumentError:aw,UndiciError:w2}=le(),R2=uc(),D2=nw(),b2=sw(),mh=class{constructor(A){this.value=A}deref(){return this.value}},yh=class extends R2{constructor(A){if(super(A),this[en]=!0,this[Oc]=!0,A&&A.agent&&typeof A.agent.dispatch!="function")throw new aw("Argument opts.agent must implement Agent");let t=A&&A.agent?A.agent:new f2(A);this[Bh]=t,this[$r]=t[$r],this[Hc]=y2(A)}get(A){let t=this[ow](A);return t||(t=this[Wc](A),this[qc](A,t)),t}dispatch(A,t){return this.get(A.origin),this[Bh].dispatch(A,t)}async close(){await this[Bh].close(),this[$r].clear()}deactivate(){this[Oc]=!1}activate(){this[Oc]=!0}enableNetConnect(A){if(typeof A=="string"||typeof A=="function"||A instanceof RegExp)Array.isArray(this[en])?this[en].push(A):this[en]=[A];else if(typeof A>"u")this[en]=!0;else throw new aw("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[en]=!1}get isMockActive(){return this[Oc]}[qc](A,t){this[$r].set(A,new mh(t))}[Wc](A){let t=Object.assign({agent:this},this[Hc]);return this[Hc]&&this[Hc].connections===1?new B2(A,t):new p2(A,t)}[ow](A){let t=this[$r].get(A);if(t)return t.deref();if(typeof A!="string"){let r=this[Wc]("http://localhost:9999");return this[qc](A,r),r}for(let[r,n]of Array.from(this[$r])){let i=n.deref();if(i&&typeof r!="string"&&m2(r,A)){let s=this[Wc](A);return this[qc](A,s),s[ph]=i[ph],s}}}[I2](){return this[en]}pendingInterceptors(){let A=this[$r];return Array.from(A.entries()).flatMap(([t,r])=>r.deref()[ph].map(n=>({...n,origin:t}))).filter(({pending:t})=>t)}assertNoPendingInterceptors({pendingInterceptorsFormatter:A=new b2}={}){let t=this.pendingInterceptors();if(t.length===0)return;let r=new D2("interceptor","interceptors").pluralize(t.length);throw new w2(` +${r.count} ${r.noun} ${r.is} pending: + +${A.format(t)} +`.trim())}};cw.exports=yh});var Qw=Q((a8,dw)=>{"use strict";var{kProxy:k2,kClose:S2,kDestroy:F2,kInterceptors:N2}=de(),{URL:lw}=require("url"),uw=Ks(),x2=gi(),L2=Ms(),{InvalidArgumentError:eo,RequestAbortedError:U2}=le(),Ew=vs(),zs=Symbol("proxy agent"),_c=Symbol("proxy client"),$s=Symbol("proxy headers"),wh=Symbol("request tls settings"),T2=Symbol("proxy tls settings"),hw=Symbol("connect endpoint function");function M2(e){return e==="https:"?443:80}function v2(e){if(typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new eo("Proxy opts.uri is mandatory");return{uri:e.uri,protocol:e.protocol||"https"}}function P2(e,A){return new x2(e,A)}var Rh=class extends L2{constructor(A){if(super(A),this[k2]=v2(A),this[zs]=new uw(A),this[N2]=A.interceptors&&A.interceptors.ProxyAgent&&Array.isArray(A.interceptors.ProxyAgent)?A.interceptors.ProxyAgent:[],typeof A=="string"&&(A={uri:A}),!A||!A.uri)throw new eo("Proxy opts.uri is mandatory");let{clientFactory:t=P2}=A;if(typeof t!="function")throw new eo("Proxy opts.clientFactory must be a function.");this[wh]=A.requestTls,this[T2]=A.proxyTls,this[$s]=A.headers||{};let r=new lw(A.uri),{origin:n,port:i,host:s,username:o,password:a}=r;if(A.auth&&A.token)throw new eo("opts.auth cannot be used in combination with opts.token");A.auth?this[$s]["proxy-authorization"]=`Basic ${A.auth}`:A.token?this[$s]["proxy-authorization"]=A.token:o&&a&&(this[$s]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(o)}:${decodeURIComponent(a)}`).toString("base64")}`);let c=Ew({...A.proxyTls});this[hw]=Ew({...A.requestTls}),this[_c]=t(r,{connect:c}),this[zs]=new uw({...A,connect:async(g,l)=>{let u=g.host;g.port||(u+=`:${M2(g.protocol)}`);try{let{socket:E,statusCode:h}=await this[_c].connect({origin:n,port:i,path:u,signal:g.signal,headers:{...this[$s],host:s}});if(h!==200&&(E.on("error",()=>{}).destroy(),l(new U2(`Proxy response (${h}) !== 200 when HTTP Tunneling`))),g.protocol!=="https:"){l(null,E);return}let d;this[wh]?d=this[wh].servername:d=g.servername,this[hw]({...g,servername:d,httpSocket:E},l)}catch(E){l(E)}}})}dispatch(A,t){let{host:r}=new lw(A.origin),n=G2(A.headers);return J2(n),this[zs].dispatch({...A,headers:{...n,host:r}},t)}async[S2](){await this[zs].close(),await this[_c].close()}async[F2](){await this[zs].destroy(),await this[_c].destroy()}};function G2(e){if(Array.isArray(e)){let A={};for(let t=0;tt.toLowerCase()==="proxy-authorization"))throw new eo("Proxy-Authorization should be sent in ProxyAgent constructor")}dw.exports=Rh});var pw=Q((c8,Bw)=>{"use strict";var An=require("assert"),{kRetryHandlerDefaultRetry:Cw}=de(),{RequestRetryError:jc}=le(),{isDisturbed:fw,parseHeaders:Y2,parseRangeHeader:Iw}=W();function V2(e){let A=Date.now();return new Date(e).getTime()-A}var Dh=class e{constructor(A,t){let{retryOptions:r,...n}=A,{retry:i,maxRetries:s,maxTimeout:o,minTimeout:a,timeoutFactor:c,methods:g,errorCodes:l,retryAfter:u,statusCodes:E}=r??{};this.dispatch=t.dispatch,this.handler=t.handler,this.opts=n,this.abort=null,this.aborted=!1,this.retryOpts={retry:i??e[Cw],retryAfter:u??!0,maxTimeout:o??30*1e3,timeout:a??500,timeoutFactor:c??2,maxRetries:s??5,methods:g??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:E??[500,502,503,504,429],errorCodes:l??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(h=>{this.aborted=!0,this.abort?this.abort(h):this.reason=h})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(A,t,r){this.handler.onUpgrade&&this.handler.onUpgrade(A,t,r)}onConnect(A){this.aborted?A(this.reason):this.abort=A}onBodySent(A){if(this.handler.onBodySent)return this.handler.onBodySent(A)}static[Cw](A,{state:t,opts:r},n){let{statusCode:i,code:s,headers:o}=A,{method:a,retryOptions:c}=r,{maxRetries:g,timeout:l,maxTimeout:u,timeoutFactor:E,statusCodes:h,errorCodes:d,methods:C}=c,{counter:I,currentTimeout:p}=t;if(p=p!=null&&p>0?p:l,s&&s!=="UND_ERR_REQ_RETRY"&&s!=="UND_ERR_SOCKET"&&!d.includes(s)){n(A);return}if(Array.isArray(C)&&!C.includes(a)){n(A);return}if(i!=null&&Array.isArray(h)&&!h.includes(i)){n(A);return}if(I>g){n(A);return}let w=o!=null&&o["retry-after"];w&&(w=Number(w),w=isNaN(w)?V2(w):w*1e3);let m=w>0?Math.min(w,u):Math.min(p*E**I,u);t.currentTimeout=m,setTimeout(()=>n(null),m)}onHeaders(A,t,r,n){let i=Y2(t);if(this.retryCount+=1,A>=300)return this.abort(new jc("Request failed",A,{headers:i,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,A!==206)return!0;let o=Iw(i["content-range"]);if(!o)return this.abort(new jc("Content-Range mismatch",A,{headers:i,count:this.retryCount})),!1;if(this.etag!=null&&this.etag!==i.etag)return this.abort(new jc("ETag mismatch",A,{headers:i,count:this.retryCount})),!1;let{start:a,size:c,end:g=c}=o;return An(this.start===a,"content-range mismatch"),An(this.end==null||this.end===g,"content-range mismatch"),this.resume=r,!0}if(this.end==null){if(A===206){let o=Iw(i["content-range"]);if(o==null)return this.handler.onHeaders(A,t,r,n);let{start:a,size:c,end:g=c}=o;An(a!=null&&Number.isFinite(a)&&this.start!==a,"content-range mismatch"),An(Number.isFinite(a)),An(g!=null&&Number.isFinite(g)&&this.end!==g,"invalid content-length"),this.start=a,this.end=g}if(this.end==null){let o=i["content-length"];this.end=o!=null?Number(o):null}return An(Number.isFinite(this.start)),An(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=r,this.etag=i.etag!=null?i.etag:null,this.handler.onHeaders(A,t,r,n)}let s=new jc("Request failed",A,{headers:i,count:this.retryCount});return this.abort(s),!1}onData(A){return this.start+=A.length,this.handler.onData(A)}onComplete(A){return this.retryCount=0,this.handler.onComplete(A)}onError(A){if(this.aborted||fw(this.opts.body))return this.handler.onError(A);this.retryOpts.retry(A,{state:{counter:this.retryCount++,currentTimeout:this.retryAfter},opts:{retryOptions:this.retryOpts,...this.opts}},t.bind(this));function t(r){if(r!=null||this.aborted||fw(this.opts.body))return this.handler.onError(r);this.start!==0&&(this.opts={...this.opts,headers:{...this.opts.headers,range:`bytes=${this.start}-${this.end??""}`}});try{this.dispatch(this.opts,this)}catch(n){this.handler.onError(n)}}}};Bw.exports=Dh});var Ii=Q((g8,Rw)=>{"use strict";var mw=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:q2}=le(),O2=Ks();ww()===void 0&&yw(new O2);function yw(e){if(!e||typeof e.dispatch!="function")throw new q2("Argument agent must implement Agent");Object.defineProperty(globalThis,mw,{value:e,writable:!0,enumerable:!1,configurable:!1})}function ww(){return globalThis[mw]}Rw.exports={setGlobalDispatcher:yw,getGlobalDispatcher:ww}});var bw=Q((u8,Dw)=>{"use strict";Dw.exports=class{constructor(A){this.handler=A}onConnect(...A){return this.handler.onConnect(...A)}onError(...A){return this.handler.onError(...A)}onUpgrade(...A){return this.handler.onUpgrade(...A)}onHeaders(...A){return this.handler.onHeaders(...A)}onData(...A){return this.handler.onData(...A)}onComplete(...A){return this.handler.onComplete(...A)}onBodySent(...A){return this.handler.onBodySent(...A)}}});var tn=Q((E8,xw)=>{"use strict";var{kHeadersList:IA,kConstruct:H2}=de(),{kGuard:kt}=qt(),{kEnumerableProperty:bt}=W(),{makeIterator:Bi,isValidHeaderName:Ao,isValidHeaderValue:Sw}=YA(),{webidl:V}=iA(),W2=require("assert"),fA=Symbol("headers map"),Xe=Symbol("headers map sorted");function kw(e){return e===10||e===13||e===9||e===32}function Fw(e){let A=0,t=e.length;for(;t>A&&kw(e.charCodeAt(t-1));)--t;for(;t>A&&kw(e.charCodeAt(A));)++A;return A===0&&t===e.length?e:e.substring(A,t)}function Nw(e,A){if(Array.isArray(A))for(let t=0;t>","record"]})}function bh(e,A,t){if(t=Fw(t),Ao(A)){if(!Sw(t))throw V.errors.invalidArgument({prefix:"Headers.append",value:t,type:"header value"})}else throw V.errors.invalidArgument({prefix:"Headers.append",value:A,type:"header name"});if(e[kt]==="immutable")throw new TypeError("immutable");return e[kt],e[IA].append(A,t)}var Kc=class e{constructor(A){Dd(this,"cookies",null);A instanceof e?(this[fA]=new Map(A[fA]),this[Xe]=A[Xe],this.cookies=A.cookies===null?null:[...A.cookies]):(this[fA]=new Map(A),this[Xe]=null)}contains(A){return A=A.toLowerCase(),this[fA].has(A)}clear(){this[fA].clear(),this[Xe]=null,this.cookies=null}append(A,t){this[Xe]=null;let r=A.toLowerCase(),n=this[fA].get(r);if(n){let i=r==="cookie"?"; ":", ";this[fA].set(r,{name:n.name,value:`${n.value}${i}${t}`})}else this[fA].set(r,{name:A,value:t});r==="set-cookie"&&(this.cookies??=[],this.cookies.push(t))}set(A,t){this[Xe]=null;let r=A.toLowerCase();r==="set-cookie"&&(this.cookies=[t]),this[fA].set(r,{name:A,value:t})}delete(A){this[Xe]=null,A=A.toLowerCase(),A==="set-cookie"&&(this.cookies=null),this[fA].delete(A)}get(A){let t=this[fA].get(A.toLowerCase());return t===void 0?null:t.value}*[Symbol.iterator](){for(let[A,{value:t}]of this[fA])yield[A,t]}get entries(){let A={};if(this[fA].size)for(let{name:t,value:r}of this[fA].values())A[t]=r;return A}},pi=class e{constructor(A=void 0){A!==H2&&(this[IA]=new Kc,this[kt]="none",A!==void 0&&(A=V.converters.HeadersInit(A),Nw(this,A)))}append(A,t){return V.brandCheck(this,e),V.argumentLengthCheck(arguments,2,{header:"Headers.append"}),A=V.converters.ByteString(A),t=V.converters.ByteString(t),bh(this,A,t)}delete(A){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,1,{header:"Headers.delete"}),A=V.converters.ByteString(A),!Ao(A))throw V.errors.invalidArgument({prefix:"Headers.delete",value:A,type:"header name"});if(this[kt]==="immutable")throw new TypeError("immutable");this[kt],this[IA].contains(A)&&this[IA].delete(A)}get(A){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,1,{header:"Headers.get"}),A=V.converters.ByteString(A),!Ao(A))throw V.errors.invalidArgument({prefix:"Headers.get",value:A,type:"header name"});return this[IA].get(A)}has(A){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,1,{header:"Headers.has"}),A=V.converters.ByteString(A),!Ao(A))throw V.errors.invalidArgument({prefix:"Headers.has",value:A,type:"header name"});return this[IA].contains(A)}set(A,t){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,2,{header:"Headers.set"}),A=V.converters.ByteString(A),t=V.converters.ByteString(t),t=Fw(t),Ao(A)){if(!Sw(t))throw V.errors.invalidArgument({prefix:"Headers.set",value:t,type:"header value"})}else throw V.errors.invalidArgument({prefix:"Headers.set",value:A,type:"header name"});if(this[kt]==="immutable")throw new TypeError("immutable");this[kt],this[IA].set(A,t)}getSetCookie(){V.brandCheck(this,e);let A=this[IA].cookies;return A?[...A]:[]}get[Xe](){if(this[IA][Xe])return this[IA][Xe];let A=[],t=[...this[IA]].sort((n,i)=>n[0]A,"Headers","key")}return Bi(()=>[...this[Xe].values()],"Headers","key")}values(){if(V.brandCheck(this,e),this[kt]==="immutable"){let A=this[Xe];return Bi(()=>A,"Headers","value")}return Bi(()=>[...this[Xe].values()],"Headers","value")}entries(){if(V.brandCheck(this,e),this[kt]==="immutable"){let A=this[Xe];return Bi(()=>A,"Headers","key+value")}return Bi(()=>[...this[Xe].values()],"Headers","key+value")}forEach(A,t=globalThis){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,1,{header:"Headers.forEach"}),typeof A!="function")throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");for(let[r,n]of this)A.apply(t,[n,r,this])}[Symbol.for("nodejs.util.inspect.custom")](){return V.brandCheck(this,e),this[IA]}};pi.prototype[Symbol.iterator]=pi.prototype.entries;Object.defineProperties(pi.prototype,{append:bt,delete:bt,get:bt,has:bt,set:bt,getSetCookie:bt,keys:bt,values:bt,entries:bt,forEach:bt,[Symbol.iterator]:{enumerable:!1},[Symbol.toStringTag]:{value:"Headers",configurable:!0}});V.converters.HeadersInit=function(e){if(V.util.Type(e)==="Object")return e[Symbol.iterator]?V.converters["sequence>"](e):V.converters["record"](e);throw V.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};xw.exports={fill:Nw,Headers:pi,HeadersList:Kc}});var $c=Q((d8,Jw)=>{"use strict";var{Headers:_2,HeadersList:Lw,fill:j2}=tn(),{extractBody:Uw,cloneBody:K2,mixinBody:Z2}=Ls(),Fh=W(),{kEnumerableProperty:xA}=Fh,{isValidReasonPhrase:X2,isCancelled:z2,isAborted:$2,isBlobLike:e1,serializeJavascriptValueToJSONString:A1,isErrorLike:t1,isomorphicEncode:r1}=YA(),{redirectStatusSet:n1,nullBodyStatus:i1,DOMException:Tw}=mr(),{kState:Re,kHeaders:We,kGuard:mi,kRealm:NA}=qt(),{webidl:J}=iA(),{FormData:s1}=cc(),{getGlobalOrigin:o1}=Xn(),{URLSerializer:Mw}=$A(),{kHeadersList:kh,kConstruct:a1}=de(),Nh=require("assert"),{types:Sh}=require("util"),Pw=globalThis.ReadableStream||require("stream/web").ReadableStream,c1=new TextEncoder("utf-8"),yi=class e{static error(){let A={settingsObject:{}},t=new e;return t[Re]=Xc(),t[NA]=A,t[We][kh]=t[Re].headersList,t[We][mi]="immutable",t[We][NA]=A,t}static json(A,t={}){J.argumentLengthCheck(arguments,1,{header:"Response.json"}),t!==null&&(t=J.converters.ResponseInit(t));let r=c1.encode(A1(A)),n=Uw(r),i={settingsObject:{}},s=new e;return s[NA]=i,s[We][mi]="response",s[We][NA]=i,vw(s,t,{body:n[0],type:"application/json"}),s}static redirect(A,t=302){let r={settingsObject:{}};J.argumentLengthCheck(arguments,1,{header:"Response.redirect"}),A=J.converters.USVString(A),t=J.converters["unsigned short"](t);let n;try{n=new URL(A,o1())}catch(o){throw Object.assign(new TypeError("Failed to parse URL from "+A),{cause:o})}if(!n1.has(t))throw new RangeError("Invalid status code "+t);let i=new e;i[NA]=r,i[We][mi]="immutable",i[We][NA]=r,i[Re].status=t;let s=r1(Mw(n));return i[Re].headersList.append("location",s),i}constructor(A=null,t={}){A!==null&&(A=J.converters.BodyInit(A)),t=J.converters.ResponseInit(t),this[NA]={settingsObject:{}},this[Re]=zc({}),this[We]=new _2(a1),this[We][mi]="response",this[We][kh]=this[Re].headersList,this[We][NA]=this[NA];let r=null;if(A!=null){let[n,i]=Uw(A);r={body:n,type:i}}vw(this,t,r)}get type(){return J.brandCheck(this,e),this[Re].type}get url(){J.brandCheck(this,e);let A=this[Re].urlList,t=A[A.length-1]??null;return t===null?"":Mw(t,!0)}get redirected(){return J.brandCheck(this,e),this[Re].urlList.length>1}get status(){return J.brandCheck(this,e),this[Re].status}get ok(){return J.brandCheck(this,e),this[Re].status>=200&&this[Re].status<=299}get statusText(){return J.brandCheck(this,e),this[Re].statusText}get headers(){return J.brandCheck(this,e),this[We]}get body(){return J.brandCheck(this,e),this[Re].body?this[Re].body.stream:null}get bodyUsed(){return J.brandCheck(this,e),!!this[Re].body&&Fh.isDisturbed(this[Re].body.stream)}clone(){if(J.brandCheck(this,e),this.bodyUsed||this.body&&this.body.locked)throw J.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let A=xh(this[Re]),t=new e;return t[Re]=A,t[NA]=this[NA],t[We][kh]=A.headersList,t[We][mi]=this[We][mi],t[We][NA]=this[We][NA],t}};Z2(yi);Object.defineProperties(yi.prototype,{type:xA,url:xA,status:xA,ok:xA,redirected:xA,statusText:xA,headers:xA,clone:xA,body:xA,bodyUsed:xA,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(yi,{json:xA,redirect:xA,error:xA});function xh(e){if(e.internalResponse)return Gw(xh(e.internalResponse),e.type);let A=zc({...e,body:null});return e.body!=null&&(A.body=K2(e.body)),A}function zc(e){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...e,headersList:e.headersList?new Lw(e.headersList):new Lw,urlList:e.urlList?[...e.urlList]:[]}}function Xc(e){let A=t1(e);return zc({type:"error",status:0,error:A?e:new Error(e&&String(e)),aborted:e&&e.name==="AbortError"})}function Zc(e,A){return A={internalResponse:e,...A},new Proxy(e,{get(t,r){return r in A?A[r]:t[r]},set(t,r,n){return Nh(!(r in A)),t[r]=n,!0}})}function Gw(e,A){if(A==="basic")return Zc(e,{type:"basic",headersList:e.headersList});if(A==="cors")return Zc(e,{type:"cors",headersList:e.headersList});if(A==="opaque")return Zc(e,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});if(A==="opaqueredirect")return Zc(e,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});Nh(!1)}function g1(e,A=null){return Nh(z2(e)),$2(e)?Xc(Object.assign(new Tw("The operation was aborted.","AbortError"),{cause:A})):Xc(Object.assign(new Tw("Request was cancelled."),{cause:A}))}function vw(e,A,t){if(A.status!==null&&(A.status<200||A.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in A&&A.statusText!=null&&!X2(String(A.statusText)))throw new TypeError("Invalid statusText");if("status"in A&&A.status!=null&&(e[Re].status=A.status),"statusText"in A&&A.statusText!=null&&(e[Re].statusText=A.statusText),"headers"in A&&A.headers!=null&&j2(e[We],A.headers),t){if(i1.includes(e.status))throw J.errors.exception({header:"Response constructor",message:"Invalid response status code "+e.status});e[Re].body=t.body,t.type!=null&&!e[Re].headersList.contains("Content-Type")&&e[Re].headersList.append("content-type",t.type)}}J.converters.ReadableStream=J.interfaceConverter(Pw);J.converters.FormData=J.interfaceConverter(s1);J.converters.URLSearchParams=J.interfaceConverter(URLSearchParams);J.converters.XMLHttpRequestBodyInit=function(e){return typeof e=="string"?J.converters.USVString(e):e1(e)?J.converters.Blob(e,{strict:!1}):Sh.isArrayBuffer(e)||Sh.isTypedArray(e)||Sh.isDataView(e)?J.converters.BufferSource(e):Fh.isFormDataLike(e)?J.converters.FormData(e,{strict:!1}):e instanceof URLSearchParams?J.converters.URLSearchParams(e):J.converters.DOMString(e)};J.converters.BodyInit=function(e){return e instanceof Pw?J.converters.ReadableStream(e):e?.[Symbol.asyncIterator]?e:J.converters.XMLHttpRequestBodyInit(e)};J.converters.ResponseInit=J.dictionaryConverter([{key:"status",converter:J.converters["unsigned short"],defaultValue:200},{key:"statusText",converter:J.converters.ByteString,defaultValue:""},{key:"headers",converter:J.converters.HeadersInit}]);Jw.exports={makeNetworkError:Xc,makeResponse:zc,makeAppropriateNetworkError:g1,filterResponse:Gw,Response:yi,cloneResponse:xh}});var no=Q((Q8,Ww)=>{"use strict";var{extractBody:l1,mixinBody:u1,cloneBody:E1}=Ls(),{Headers:Yw,fill:h1,HeadersList:rg}=tn(),{FinalizationRegistry:d1}=VE()(),ro=W(),{isValidHTTPToken:Q1,sameOrigin:Vw,normalizeMethod:C1,makePolicyContainer:f1,normalizeMethodRecord:I1}=YA(),{forbiddenMethodsSet:B1,corsSafeListedMethodsSet:p1,referrerPolicy:m1,requestRedirect:y1,requestMode:w1,requestCredentials:R1,requestCache:D1,requestDuplex:b1}=mr(),{kEnumerableProperty:Me}=ro,{kHeaders:AA,kSignal:to,kState:pe,kGuard:eg,kRealm:LA}=qt(),{webidl:U}=iA(),{getGlobalOrigin:k1}=Xn(),{URLSerializer:S1}=$A(),{kHeadersList:Ag,kConstruct:tg}=de(),F1=require("assert"),{getMaxListeners:qw,setMaxListeners:Ow,getEventListeners:N1,defaultMaxListeners:Hw}=require("events"),Lh=globalThis.TransformStream,x1=Symbol("abortController"),L1=new d1(({signal:e,abort:A})=>{e.removeEventListener("abort",A)}),rn=class e{constructor(A,t={}){if(A===tg)return;U.argumentLengthCheck(arguments,1,{header:"Request constructor"}),A=U.converters.RequestInfo(A),t=U.converters.RequestInit(t),this[LA]={settingsObject:{baseUrl:k1(),get origin(){return this.baseUrl?.origin},policyContainer:f1()}};let r=null,n=null,i=this[LA].settingsObject.baseUrl,s=null;if(typeof A=="string"){let C;try{C=new URL(A,i)}catch(I){throw new TypeError("Failed to parse URL from "+A,{cause:I})}if(C.username||C.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+A);r=ng({urlList:[C]}),n="cors"}else F1(A instanceof e),r=A[pe],s=A[to];let o=this[LA].settingsObject.origin,a="client";if(r.window?.constructor?.name==="EnvironmentSettingsObject"&&Vw(r.window,o)&&(a=r.window),t.window!=null)throw new TypeError(`'window' option '${a}' must be null`);"window"in t&&(a="no-window"),r=ng({method:r.method,headersList:r.headersList,unsafeRequest:r.unsafeRequest,client:this[LA].settingsObject,window:a,priority:r.priority,origin:r.origin,referrer:r.referrer,referrerPolicy:r.referrerPolicy,mode:r.mode,credentials:r.credentials,cache:r.cache,redirect:r.redirect,integrity:r.integrity,keepalive:r.keepalive,reloadNavigation:r.reloadNavigation,historyNavigation:r.historyNavigation,urlList:[...r.urlList]});let c=Object.keys(t).length!==0;if(c&&(r.mode==="navigate"&&(r.mode="same-origin"),r.reloadNavigation=!1,r.historyNavigation=!1,r.origin="client",r.referrer="client",r.referrerPolicy="",r.url=r.urlList[r.urlList.length-1],r.urlList=[r.url]),t.referrer!==void 0){let C=t.referrer;if(C==="")r.referrer="no-referrer";else{let I;try{I=new URL(C,i)}catch(p){throw new TypeError(`Referrer "${C}" is not a valid URL.`,{cause:p})}I.protocol==="about:"&&I.hostname==="client"||o&&!Vw(I,this[LA].settingsObject.baseUrl)?r.referrer="client":r.referrer=I}}t.referrerPolicy!==void 0&&(r.referrerPolicy=t.referrerPolicy);let g;if(t.mode!==void 0?g=t.mode:g=n,g==="navigate")throw U.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(g!=null&&(r.mode=g),t.credentials!==void 0&&(r.credentials=t.credentials),t.cache!==void 0&&(r.cache=t.cache),r.cache==="only-if-cached"&&r.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(t.redirect!==void 0&&(r.redirect=t.redirect),t.integrity!=null&&(r.integrity=String(t.integrity)),t.keepalive!==void 0&&(r.keepalive=!!t.keepalive),t.method!==void 0){let C=t.method;if(!Q1(C))throw new TypeError(`'${C}' is not a valid HTTP method.`);if(B1.has(C.toUpperCase()))throw new TypeError(`'${C}' HTTP method is unsupported.`);C=I1[C]??C1(C),r.method=C}t.signal!==void 0&&(s=t.signal),this[pe]=r;let l=new AbortController;if(this[to]=l.signal,this[to][LA]=this[LA],s!=null){if(!s||typeof s.aborted!="boolean"||typeof s.addEventListener!="function")throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(s.aborted)l.abort(s.reason);else{this[x1]=l;let C=new WeakRef(l),I=function(){let p=C.deref();p!==void 0&&p.abort(this.reason)};try{(typeof qw=="function"&&qw(s)===Hw||N1(s,"abort").length>=Hw)&&Ow(100,s)}catch{}ro.addAbortListener(s,I),L1.register(l,{signal:s,abort:I})}}if(this[AA]=new Yw(tg),this[AA][Ag]=r.headersList,this[AA][eg]="request",this[AA][LA]=this[LA],g==="no-cors"){if(!p1.has(r.method))throw new TypeError(`'${r.method} is unsupported in no-cors mode.`);this[AA][eg]="request-no-cors"}if(c){let C=this[AA][Ag],I=t.headers!==void 0?t.headers:new rg(C);if(C.clear(),I instanceof rg){for(let[p,w]of I)C.append(p,w);C.cookies=I.cookies}else h1(this[AA],I)}let u=A instanceof e?A[pe].body:null;if((t.body!=null||u!=null)&&(r.method==="GET"||r.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let E=null;if(t.body!=null){let[C,I]=l1(t.body,r.keepalive);E=C,I&&!this[AA][Ag].contains("content-type")&&this[AA].append("content-type",I)}let h=E??u;if(h!=null&&h.source==null){if(E!=null&&t.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(r.mode!=="same-origin"&&r.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');r.useCORSPreflightFlag=!0}let d=h;if(E==null&&u!=null){if(ro.isDisturbed(u.stream)||u.stream.locked)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");Lh||(Lh=require("stream/web").TransformStream);let C=new Lh;u.stream.pipeThrough(C),d={source:u.source,length:u.length,stream:C.readable}}this[pe].body=d}get method(){return U.brandCheck(this,e),this[pe].method}get url(){return U.brandCheck(this,e),S1(this[pe].url)}get headers(){return U.brandCheck(this,e),this[AA]}get destination(){return U.brandCheck(this,e),this[pe].destination}get referrer(){return U.brandCheck(this,e),this[pe].referrer==="no-referrer"?"":this[pe].referrer==="client"?"about:client":this[pe].referrer.toString()}get referrerPolicy(){return U.brandCheck(this,e),this[pe].referrerPolicy}get mode(){return U.brandCheck(this,e),this[pe].mode}get credentials(){return this[pe].credentials}get cache(){return U.brandCheck(this,e),this[pe].cache}get redirect(){return U.brandCheck(this,e),this[pe].redirect}get integrity(){return U.brandCheck(this,e),this[pe].integrity}get keepalive(){return U.brandCheck(this,e),this[pe].keepalive}get isReloadNavigation(){return U.brandCheck(this,e),this[pe].reloadNavigation}get isHistoryNavigation(){return U.brandCheck(this,e),this[pe].historyNavigation}get signal(){return U.brandCheck(this,e),this[to]}get body(){return U.brandCheck(this,e),this[pe].body?this[pe].body.stream:null}get bodyUsed(){return U.brandCheck(this,e),!!this[pe].body&&ro.isDisturbed(this[pe].body.stream)}get duplex(){return U.brandCheck(this,e),"half"}clone(){if(U.brandCheck(this,e),this.bodyUsed||this.body?.locked)throw new TypeError("unusable");let A=U1(this[pe]),t=new e(tg);t[pe]=A,t[LA]=this[LA],t[AA]=new Yw(tg),t[AA][Ag]=A.headersList,t[AA][eg]=this[AA][eg],t[AA][LA]=this[AA][LA];let r=new AbortController;return this.signal.aborted?r.abort(this.signal.reason):ro.addAbortListener(this.signal,()=>{r.abort(this.signal.reason)}),t[to]=r.signal,t}};u1(rn);function ng(e){let A={method:"GET",localURLsOnly:!1,unsafeRequest:!1,body:null,client:null,reservedClient:null,replacesClientId:"",window:"client",keepalive:!1,serviceWorkers:"all",initiator:"",destination:"",priority:null,origin:"client",policyContainer:"client",referrer:"client",referrerPolicy:"",mode:"no-cors",useCORSPreflightFlag:!1,credentials:"same-origin",useCredentials:!1,cache:"default",redirect:"follow",integrity:"",cryptoGraphicsNonceMetadata:"",parserMetadata:"",reloadNavigation:!1,historyNavigation:!1,userActivation:!1,taintedOrigin:!1,redirectCount:0,responseTainting:"basic",preventNoCacheCacheControlHeaderModification:!1,done:!1,timingAllowFailed:!1,...e,headersList:e.headersList?new rg(e.headersList):new rg};return A.url=A.urlList[0],A}function U1(e){let A=ng({...e,body:null});return e.body!=null&&(A.body=E1(e.body)),A}Object.defineProperties(rn.prototype,{method:Me,url:Me,headers:Me,redirect:Me,clone:Me,signal:Me,duplex:Me,destination:Me,body:Me,bodyUsed:Me,isHistoryNavigation:Me,isReloadNavigation:Me,keepalive:Me,integrity:Me,cache:Me,credentials:Me,attribute:Me,referrerPolicy:Me,referrer:Me,mode:Me,[Symbol.toStringTag]:{value:"Request",configurable:!0}});U.converters.Request=U.interfaceConverter(rn);U.converters.RequestInfo=function(e){return typeof e=="string"?U.converters.USVString(e):e instanceof rn?U.converters.Request(e):U.converters.USVString(e)};U.converters.AbortSignal=U.interfaceConverter(AbortSignal);U.converters.RequestInit=U.dictionaryConverter([{key:"method",converter:U.converters.ByteString},{key:"headers",converter:U.converters.HeadersInit},{key:"body",converter:U.nullableConverter(U.converters.BodyInit)},{key:"referrer",converter:U.converters.USVString},{key:"referrerPolicy",converter:U.converters.DOMString,allowedValues:m1},{key:"mode",converter:U.converters.DOMString,allowedValues:w1},{key:"credentials",converter:U.converters.DOMString,allowedValues:R1},{key:"cache",converter:U.converters.DOMString,allowedValues:D1},{key:"redirect",converter:U.converters.DOMString,allowedValues:y1},{key:"integrity",converter:U.converters.DOMString},{key:"keepalive",converter:U.converters.boolean},{key:"signal",converter:U.nullableConverter(e=>U.converters.AbortSignal(e,{strict:!1}))},{key:"window",converter:U.converters.any},{key:"duplex",converter:U.converters.DOMString,allowedValues:b1}]);Ww.exports={Request:rn,makeRequest:ng}});var lg=Q((C8,s0)=>{"use strict";var{Response:T1,makeNetworkError:ue,makeAppropriateNetworkError:ig,filterResponse:Uh,makeResponse:sg}=$c(),{Headers:_w}=tn(),{Request:M1,makeRequest:v1}=no(),io=require("zlib"),{bytesMatch:P1,makePolicyContainer:G1,clonePolicyContainer:J1,requestBadPort:Y1,TAOCheck:V1,appendRequestOriginHeader:q1,responseLocationURL:O1,requestCurrentURL:St,setRequestReferrerPolicyOnRedirect:H1,tryUpgradeRequestToAPotentiallyTrustworthyURL:W1,createOpaqueTimingInfo:qh,appendFetchMetadata:_1,corsCheck:j1,crossOriginResourcePolicyCheck:K1,determineRequestsReferrer:Z1,coarsenedSharedCurrentTime:Oh,createDeferredPromise:X1,isBlobLike:z1,sameOrigin:Jh,isCancelled:Ri,isAborted:jw,isErrorLike:$1,fullyReadBody:zw,readableStreamClose:eG,isomorphicEncode:Yh,urlIsLocal:AG,urlIsHttpHttpsScheme:Hh,urlHasHttpsScheme:tG}=YA(),{kState:Vh,kHeaders:Th,kGuard:rG,kRealm:Kw}=qt(),Di=require("assert"),{safelyExtractBody:og}=Ls(),{redirectStatusSet:$w,nullBodyStatus:e0,safeMethodsSet:nG,requestBodyHeader:iG,subresourceSet:sG,DOMException:ag}=mr(),{kHeadersList:wi}=de(),oG=require("events"),{Readable:aG,pipeline:cG}=require("stream"),{addAbortListener:gG,isErrored:lG,isReadable:cg,nodeMajor:Zw,nodeMinor:uG}=W(),{dataURLProcessor:EG,serializeAMimeType:hG}=$A(),{TransformStream:dG}=require("stream/web"),{getGlobalDispatcher:QG}=Ii(),{webidl:CG}=iA(),{STATUS_CODES:fG}=require("http"),IG=["GET","HEAD"],Mh,vh=globalThis.ReadableStream,gg=class extends oG{constructor(A){super(),this.dispatcher=A,this.connection=null,this.dump=!1,this.state="ongoing",this.setMaxListeners(21)}terminate(A){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(A),this.emit("terminated",A))}abort(A){this.state==="ongoing"&&(this.state="aborted",A||(A=new ag("The operation was aborted.","AbortError")),this.serializedAbortReason=A,this.connection?.destroy(A),this.emit("terminated",A))}};function BG(e,A={}){CG.argumentLengthCheck(arguments,1,{header:"globalThis.fetch"});let t=X1(),r;try{r=new M1(e,A)}catch(u){return t.reject(u),t.promise}let n=r[Vh];if(r.signal.aborted)return Ph(t,n,null,r.signal.reason),t.promise;n.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(n.serviceWorkers="none");let s=null,o=null,a=!1,c=null;return gG(r.signal,()=>{a=!0,Di(c!=null),c.abort(r.signal.reason),Ph(t,n,s,r.signal.reason)}),c=t0({request:n,processResponseEndOfBody:u=>A0(u,"fetch"),processResponse:u=>{if(a)return Promise.resolve();if(u.aborted)return Ph(t,n,s,c.serializedAbortReason),Promise.resolve();if(u.type==="error")return t.reject(Object.assign(new TypeError("fetch failed"),{cause:u.error})),Promise.resolve();s=new T1,s[Vh]=u,s[Kw]=o,s[Th][wi]=u.headersList,s[Th][rG]="immutable",s[Th][Kw]=o,t.resolve(s)},dispatcher:A.dispatcher??QG()}),t.promise}function A0(e,A="other"){if(e.type==="error"&&e.aborted||!e.urlList?.length)return;let t=e.urlList[0],r=e.timingInfo,n=e.cacheState;Hh(t)&&r!==null&&(e.timingAllowPassed||(r=qh({startTime:r.startTime}),n=""),r.endTime=Oh(),e.timingInfo=r,pG(r,t,A,globalThis,n))}function pG(e,A,t,r,n){(Zw>18||Zw===18&&uG>=2)&&performance.markResourceTiming(e,A.href,t,r,n)}function Ph(e,A,t,r){if(r||(r=new ag("The operation was aborted.","AbortError")),e.reject(r),A.body!=null&&cg(A.body?.stream)&&A.body.stream.cancel(r).catch(i=>{if(i.code!=="ERR_INVALID_STATE")throw i}),t==null)return;let n=t[Vh];n.body!=null&&cg(n.body?.stream)&&n.body.stream.cancel(r).catch(i=>{if(i.code!=="ERR_INVALID_STATE")throw i})}function t0({request:e,processRequestBodyChunkLength:A,processRequestEndOfBody:t,processResponse:r,processResponseEndOfBody:n,processResponseConsumeBody:i,useParallelQueue:s=!1,dispatcher:o}){let a=null,c=!1;e.client!=null&&(a=e.client.globalObject,c=e.client.crossOriginIsolatedCapability);let g=Oh(c),l=qh({startTime:g}),u={controller:new gg(o),request:e,timingInfo:l,processRequestBodyChunkLength:A,processRequestEndOfBody:t,processResponse:r,processResponseConsumeBody:i,processResponseEndOfBody:n,taskDestination:a,crossOriginIsolatedCapability:c};return Di(!e.body||e.body.stream),e.window==="client"&&(e.window=e.client?.globalObject?.constructor?.name==="Window"?e.client:"no-window"),e.origin==="client"&&(e.origin=e.client?.origin),e.policyContainer==="client"&&(e.client!=null?e.policyContainer=J1(e.client.policyContainer):e.policyContainer=G1()),e.headersList.contains("accept")||e.headersList.append("accept","*/*"),e.headersList.contains("accept-language")||e.headersList.append("accept-language","*"),e.priority,sG.has(e.destination),r0(u).catch(E=>{u.controller.terminate(E)}),u.controller}async function r0(e,A=!1){let t=e.request,r=null;if(t.localURLsOnly&&!AG(St(t))&&(r=ue("local URLs only")),W1(t),Y1(t)==="blocked"&&(r=ue("bad port")),t.referrerPolicy===""&&(t.referrerPolicy=t.policyContainer.referrerPolicy),t.referrer!=="no-referrer"&&(t.referrer=Z1(t)),r===null&&(r=await(async()=>{let i=St(t);return Jh(i,t.url)&&t.responseTainting==="basic"||i.protocol==="data:"||t.mode==="navigate"||t.mode==="websocket"?(t.responseTainting="basic",await Xw(e)):t.mode==="same-origin"?ue('request mode cannot be "same-origin"'):t.mode==="no-cors"?t.redirect!=="follow"?ue('redirect mode cannot be "follow" for "no-cors" request'):(t.responseTainting="opaque",await Xw(e)):Hh(St(t))?(t.responseTainting="cors",await n0(e)):ue("URL scheme must be a HTTP(S) scheme")})()),A)return r;r.status!==0&&!r.internalResponse&&(t.responseTainting,t.responseTainting==="basic"?r=Uh(r,"basic"):t.responseTainting==="cors"?r=Uh(r,"cors"):t.responseTainting==="opaque"?r=Uh(r,"opaque"):Di(!1));let n=r.status===0?r:r.internalResponse;if(n.urlList.length===0&&n.urlList.push(...t.urlList),t.timingAllowFailed||(r.timingAllowPassed=!0),r.type==="opaque"&&n.status===206&&n.rangeRequested&&!t.headers.contains("range")&&(r=n=ue()),r.status!==0&&(t.method==="HEAD"||t.method==="CONNECT"||e0.includes(n.status))&&(n.body=null,e.controller.dump=!0),t.integrity){let i=o=>Gh(e,ue(o));if(t.responseTainting==="opaque"||r.body==null){i(r.error);return}let s=o=>{if(!P1(o,t.integrity)){i("integrity mismatch");return}r.body=og(o)[0],Gh(e,r)};await zw(r.body,s,i)}else Gh(e,r)}function Xw(e){if(Ri(e)&&e.request.redirectCount===0)return Promise.resolve(ig(e));let{request:A}=e,{protocol:t}=St(A);switch(t){case"about:":return Promise.resolve(ue("about scheme is not supported"));case"blob:":{Mh||(Mh=require("buffer").resolveObjectURL);let r=St(A);if(r.search.length!==0)return Promise.resolve(ue("NetworkError when attempting to fetch resource."));let n=Mh(r.toString());if(A.method!=="GET"||!z1(n))return Promise.resolve(ue("invalid method"));let i=og(n),s=i[0],o=Yh(`${s.length}`),a=i[1]??"",c=sg({statusText:"OK",headersList:[["content-length",{name:"Content-Length",value:o}],["content-type",{name:"Content-Type",value:a}]]});return c.body=s,Promise.resolve(c)}case"data:":{let r=St(A),n=EG(r);if(n==="failure")return Promise.resolve(ue("failed to fetch the data URL"));let i=hG(n.mimeType);return Promise.resolve(sg({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:i}]],body:og(n.body)[0]}))}case"file:":return Promise.resolve(ue("not implemented... yet..."));case"http:":case"https:":return n0(e).catch(r=>ue(r));default:return Promise.resolve(ue("unknown scheme"))}}function mG(e,A){e.request.done=!0,e.processResponseDone!=null&&queueMicrotask(()=>e.processResponseDone(A))}function Gh(e,A){A.type==="error"&&(A.urlList=[e.request.urlList[0]],A.timingInfo=qh({startTime:e.timingInfo.startTime}));let t=()=>{e.request.done=!0,e.processResponseEndOfBody!=null&&queueMicrotask(()=>e.processResponseEndOfBody(A))};if(e.processResponse!=null&&queueMicrotask(()=>e.processResponse(A)),A.body==null)t();else{let r=(i,s)=>{s.enqueue(i)},n=new dG({start(){},transform:r,flush:t},{size(){return 1}},{size(){return 1}});A.body={stream:A.body.stream.pipeThrough(n)}}if(e.processResponseConsumeBody!=null){let r=i=>e.processResponseConsumeBody(A,i),n=i=>e.processResponseConsumeBody(A,i);if(A.body==null)queueMicrotask(()=>r(null));else return zw(A.body,r,n);return Promise.resolve()}}async function n0(e){let A=e.request,t=null,r=null,n=e.timingInfo;if(A.serviceWorkers,t===null){if(A.redirect==="follow"&&(A.serviceWorkers="none"),r=t=await i0(e),A.responseTainting==="cors"&&j1(A,t)==="failure")return ue("cors failure");V1(A,t)==="failure"&&(A.timingAllowFailed=!0)}return(A.responseTainting==="opaque"||t.type==="opaque")&&K1(A.origin,A.client,A.destination,r)==="blocked"?ue("blocked"):($w.has(r.status)&&(A.redirect!=="manual"&&e.controller.connection.destroy(),A.redirect==="error"?t=ue("unexpected redirect"):A.redirect==="manual"?t=r:A.redirect==="follow"?t=await yG(e,t):Di(!1)),t.timingInfo=n,t)}function yG(e,A){let t=e.request,r=A.internalResponse?A.internalResponse:A,n;try{if(n=O1(r,St(t).hash),n==null)return A}catch(s){return Promise.resolve(ue(s))}if(!Hh(n))return Promise.resolve(ue("URL scheme must be a HTTP(S) scheme"));if(t.redirectCount===20)return Promise.resolve(ue("redirect count exceeded"));if(t.redirectCount+=1,t.mode==="cors"&&(n.username||n.password)&&!Jh(t,n))return Promise.resolve(ue('cross origin not allowed for request mode "cors"'));if(t.responseTainting==="cors"&&(n.username||n.password))return Promise.resolve(ue('URL cannot contain credentials for request mode "cors"'));if(r.status!==303&&t.body!=null&&t.body.source==null)return Promise.resolve(ue());if([301,302].includes(r.status)&&t.method==="POST"||r.status===303&&!IG.includes(t.method)){t.method="GET",t.body=null;for(let s of iG)t.headersList.delete(s)}Jh(St(t),n)||(t.headersList.delete("authorization"),t.headersList.delete("proxy-authorization",!0),t.headersList.delete("cookie"),t.headersList.delete("host")),t.body!=null&&(Di(t.body.source!=null),t.body=og(t.body.source)[0]);let i=e.timingInfo;return i.redirectEndTime=i.postRedirectStartTime=Oh(e.crossOriginIsolatedCapability),i.redirectStartTime===0&&(i.redirectStartTime=i.startTime),t.urlList.push(n),H1(t,r),r0(e,!0)}async function i0(e,A=!1,t=!1){let r=e.request,n=null,i=null,s=null,o=null,a=!1;r.window==="no-window"&&r.redirect==="error"?(n=e,i=r):(i=v1(r),n={...e},n.request=i);let c=r.credentials==="include"||r.credentials==="same-origin"&&r.responseTainting==="basic",g=i.body?i.body.length:null,l=null;if(i.body==null&&["POST","PUT"].includes(i.method)&&(l="0"),g!=null&&(l=Yh(`${g}`)),l!=null&&i.headersList.append("content-length",l),g!=null&&i.keepalive,i.referrer instanceof URL&&i.headersList.append("referer",Yh(i.referrer.href)),q1(i),_1(i),i.headersList.contains("user-agent")||i.headersList.append("user-agent",typeof esbuildDetection>"u"?"undici":"node"),i.cache==="default"&&(i.headersList.contains("if-modified-since")||i.headersList.contains("if-none-match")||i.headersList.contains("if-unmodified-since")||i.headersList.contains("if-match")||i.headersList.contains("if-range"))&&(i.cache="no-store"),i.cache==="no-cache"&&!i.preventNoCacheCacheControlHeaderModification&&!i.headersList.contains("cache-control")&&i.headersList.append("cache-control","max-age=0"),(i.cache==="no-store"||i.cache==="reload")&&(i.headersList.contains("pragma")||i.headersList.append("pragma","no-cache"),i.headersList.contains("cache-control")||i.headersList.append("cache-control","no-cache")),i.headersList.contains("range")&&i.headersList.append("accept-encoding","identity"),i.headersList.contains("accept-encoding")||(tG(St(i))?i.headersList.append("accept-encoding","br, gzip, deflate"):i.headersList.append("accept-encoding","gzip, deflate")),i.headersList.delete("host"),o==null&&(i.cache="no-store"),i.mode!=="no-store"&&i.mode,s==null){if(i.mode==="only-if-cached")return ue("only if cached");let u=await wG(n,c,t);!nG.has(i.method)&&u.status>=200&&u.status<=399,a&&u.status,s==null&&(s=u)}if(s.urlList=[...i.urlList],i.headersList.contains("range")&&(s.rangeRequested=!0),s.requestIncludesCredentials=c,s.status===407)return r.window==="no-window"?ue():Ri(e)?ig(e):ue("proxy authentication required");if(s.status===421&&!t&&(r.body==null||r.body.source!=null)){if(Ri(e))return ig(e);e.controller.connection.destroy(),s=await i0(e,A,!0)}return s}async function wG(e,A=!1,t=!1){Di(!e.controller.connection||e.controller.connection.destroyed),e.controller.connection={abort:null,destroyed:!1,destroy(h){this.destroyed||(this.destroyed=!0,this.abort?.(h??new ag("The operation was aborted.","AbortError")))}};let r=e.request,n=null,i=e.timingInfo;null==null&&(r.cache="no-store");let o=t?"yes":"no";r.mode;let a=null;if(r.body==null&&e.processRequestEndOfBody)queueMicrotask(()=>e.processRequestEndOfBody());else if(r.body!=null){let h=async function*(I){Ri(e)||(yield I,e.processRequestBodyChunkLength?.(I.byteLength))},d=()=>{Ri(e)||e.processRequestEndOfBody&&e.processRequestEndOfBody()},C=I=>{Ri(e)||(I.name==="AbortError"?e.controller.abort():e.controller.terminate(I))};a=async function*(){try{for await(let I of r.body.stream)yield*h(I);d()}catch(I){C(I)}}()}try{let{body:h,status:d,statusText:C,headersList:I,socket:p}=await E({body:a});if(p)n=sg({status:d,statusText:C,headersList:I,socket:p});else{let w=h[Symbol.asyncIterator]();e.controller.next=()=>w.next(),n=sg({status:d,statusText:C,headersList:I})}}catch(h){return h.name==="AbortError"?(e.controller.connection.destroy(),ig(e,h)):ue(h)}let c=()=>{e.controller.resume()},g=h=>{e.controller.abort(h)};vh||(vh=require("stream/web").ReadableStream);let l=new vh({async start(h){e.controller.controller=h},async pull(h){await c(h)},async cancel(h){await g(h)}},{highWaterMark:0,size(){return 1}});n.body={stream:l},e.controller.on("terminated",u),e.controller.resume=async()=>{for(;;){let h,d;try{let{done:C,value:I}=await e.controller.next();if(jw(e))break;h=C?void 0:I}catch(C){e.controller.ended&&!i.encodedBodySize?h=void 0:(h=C,d=!0)}if(h===void 0){eG(e.controller.controller),mG(e,n);return}if(i.decodedBodySize+=h?.byteLength??0,d){e.controller.terminate(h);return}if(e.controller.controller.enqueue(new Uint8Array(h)),lG(l)){e.controller.terminate();return}if(!e.controller.controller.desiredSize)return}};function u(h){jw(e)?(n.aborted=!0,cg(l)&&e.controller.controller.error(e.controller.serializedAbortReason)):cg(l)&&e.controller.controller.error(new TypeError("terminated",{cause:$1(h)?h:void 0})),e.controller.connection.destroy()}return n;async function E({body:h}){let d=St(r),C=e.controller.dispatcher;return new Promise((I,p)=>C.dispatch({path:d.pathname+d.search,origin:d.origin,method:r.method,body:e.controller.dispatcher.isMockActive?r.body&&(r.body.source||r.body.stream):h,headers:r.headersList.entries,maxRedirections:0,upgrade:r.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(w){let{connection:m}=e.controller;m.destroyed?w(new ag("The operation was aborted.","AbortError")):(e.controller.on("terminated",w),this.abort=m.abort=w)},onHeaders(w,m,K,H){if(w<200)return;let ne=[],q="",ae=new _w;if(Array.isArray(m))for(let Y=0;Yfe.trim()):ce.toLowerCase()==="location"&&(q=Je),ae[wi].append(ce,Je)}else{let Y=Object.keys(m);for(let ce of Y){let Je=m[ce];ce.toLowerCase()==="content-encoding"?ne=Je.toLowerCase().split(",").map(fe=>fe.trim()).reverse():ce.toLowerCase()==="location"&&(q=Je),ae[wi].append(ce,Je)}}this.body=new aG({read:K});let De=[],ee=r.redirect==="follow"&&q&&$w.has(w);if(r.method!=="HEAD"&&r.method!=="CONNECT"&&!e0.includes(w)&&!ee)for(let Y of ne)if(Y==="x-gzip"||Y==="gzip")De.push(io.createGunzip({flush:io.constants.Z_SYNC_FLUSH,finishFlush:io.constants.Z_SYNC_FLUSH}));else if(Y==="deflate")De.push(io.createInflate());else if(Y==="br")De.push(io.createBrotliDecompress());else{De.length=0;break}return I({status:w,statusText:H,headersList:ae[wi],body:De.length?cG(this.body,...De,()=>{}):this.body.on("error",()=>{})}),!0},onData(w){if(e.controller.dump)return;let m=w;return i.encodedBodySize+=m.byteLength,this.body.push(m)},onComplete(){this.abort&&e.controller.off("terminated",this.abort),e.controller.ended=!0,this.body.push(null)},onError(w){this.abort&&e.controller.off("terminated",this.abort),this.body?.destroy(w),e.controller.terminate(w),p(w)},onUpgrade(w,m,K){if(w!==101)return;let H=new _w;for(let ne=0;ne{"use strict";o0.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var c0=Q((I8,a0)=>{"use strict";var{webidl:UA}=iA(),ug=Symbol("ProgressEvent state"),_h=class e extends Event{constructor(A,t={}){A=UA.converters.DOMString(A),t=UA.converters.ProgressEventInit(t??{}),super(A,t),this[ug]={lengthComputable:t.lengthComputable,loaded:t.loaded,total:t.total}}get lengthComputable(){return UA.brandCheck(this,e),this[ug].lengthComputable}get loaded(){return UA.brandCheck(this,e),this[ug].loaded}get total(){return UA.brandCheck(this,e),this[ug].total}};UA.converters.ProgressEventInit=UA.dictionaryConverter([{key:"lengthComputable",converter:UA.converters.boolean,defaultValue:!1},{key:"loaded",converter:UA.converters["unsigned long long"],defaultValue:0},{key:"total",converter:UA.converters["unsigned long long"],defaultValue:0},{key:"bubbles",converter:UA.converters.boolean,defaultValue:!1},{key:"cancelable",converter:UA.converters.boolean,defaultValue:!1},{key:"composed",converter:UA.converters.boolean,defaultValue:!1}]);a0.exports={ProgressEvent:_h}});var l0=Q((B8,g0)=>{"use strict";function RG(e){if(!e)return"failure";switch(e.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}g0.exports={getEncoding:RG}});var I0=Q((p8,f0)=>{"use strict";var{kState:bi,kError:jh,kResult:u0,kAborted:so,kLastProgressEventFired:Kh}=Wh(),{ProgressEvent:DG}=c0(),{getEncoding:E0}=l0(),{DOMException:bG}=mr(),{serializeAMimeType:kG,parseMIMEType:h0}=$A(),{types:SG}=require("util"),{StringDecoder:d0}=require("string_decoder"),{btoa:Q0}=require("buffer"),FG={enumerable:!0,writable:!1,configurable:!1};function NG(e,A,t,r){if(e[bi]==="loading")throw new bG("Invalid state","InvalidStateError");e[bi]="loading",e[u0]=null,e[jh]=null;let i=A.stream().getReader(),s=[],o=i.read(),a=!0;(async()=>{for(;!e[so];)try{let{done:c,value:g}=await o;if(a&&!e[so]&&queueMicrotask(()=>{Fr("loadstart",e)}),a=!1,!c&&SG.isUint8Array(g))s.push(g),(e[Kh]===void 0||Date.now()-e[Kh]>=50)&&!e[so]&&(e[Kh]=Date.now(),queueMicrotask(()=>{Fr("progress",e)})),o=i.read();else if(c){queueMicrotask(()=>{e[bi]="done";try{let l=xG(s,t,A.type,r);if(e[so])return;e[u0]=l,Fr("load",e)}catch(l){e[jh]=l,Fr("error",e)}e[bi]!=="loading"&&Fr("loadend",e)});break}}catch(c){if(e[so])return;queueMicrotask(()=>{e[bi]="done",e[jh]=c,Fr("error",e),e[bi]!=="loading"&&Fr("loadend",e)});break}})()}function Fr(e,A){let t=new DG(e,{bubbles:!1,cancelable:!1});A.dispatchEvent(t)}function xG(e,A,t,r){switch(A){case"DataURL":{let n="data:",i=h0(t||"application/octet-stream");i!=="failure"&&(n+=kG(i)),n+=";base64,";let s=new d0("latin1");for(let o of e)n+=Q0(s.write(o));return n+=Q0(s.end()),n}case"Text":{let n="failure";if(r&&(n=E0(r)),n==="failure"&&t){let i=h0(t);i!=="failure"&&(n=E0(i.parameters.get("charset")))}return n==="failure"&&(n="UTF-8"),LG(e,n)}case"ArrayBuffer":return C0(e).buffer;case"BinaryString":{let n="",i=new d0("latin1");for(let s of e)n+=i.write(s);return n+=i.end(),n}}}function LG(e,A){let t=C0(e),r=UG(t),n=0;r!==null&&(A=r,n=r==="UTF-8"?3:2);let i=t.slice(n);return new TextDecoder(A).decode(i)}function UG(e){let[A,t,r]=e;return A===239&&t===187&&r===191?"UTF-8":A===254&&t===255?"UTF-16BE":A===255&&t===254?"UTF-16LE":null}function C0(e){let A=e.reduce((r,n)=>r+n.byteLength,0),t=0;return e.reduce((r,n)=>(r.set(n,t),t+=n.byteLength,r),new Uint8Array(A))}f0.exports={staticPropertyDescriptors:FG,readOperation:NG,fireAProgressEvent:Fr}});var y0=Q((m8,m0)=>{"use strict";var{staticPropertyDescriptors:ki,readOperation:Eg,fireAProgressEvent:B0}=I0(),{kState:nn,kError:p0,kResult:hg,kEvents:$,kAborted:TG}=Wh(),{webidl:se}=iA(),{kEnumerableProperty:BA}=W(),rt=class e extends EventTarget{constructor(){super(),this[nn]="empty",this[hg]=null,this[p0]=null,this[$]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(A){se.brandCheck(this,e),se.argumentLengthCheck(arguments,1,{header:"FileReader.readAsArrayBuffer"}),A=se.converters.Blob(A,{strict:!1}),Eg(this,A,"ArrayBuffer")}readAsBinaryString(A){se.brandCheck(this,e),se.argumentLengthCheck(arguments,1,{header:"FileReader.readAsBinaryString"}),A=se.converters.Blob(A,{strict:!1}),Eg(this,A,"BinaryString")}readAsText(A,t=void 0){se.brandCheck(this,e),se.argumentLengthCheck(arguments,1,{header:"FileReader.readAsText"}),A=se.converters.Blob(A,{strict:!1}),t!==void 0&&(t=se.converters.DOMString(t)),Eg(this,A,"Text",t)}readAsDataURL(A){se.brandCheck(this,e),se.argumentLengthCheck(arguments,1,{header:"FileReader.readAsDataURL"}),A=se.converters.Blob(A,{strict:!1}),Eg(this,A,"DataURL")}abort(){if(this[nn]==="empty"||this[nn]==="done"){this[hg]=null;return}this[nn]==="loading"&&(this[nn]="done",this[hg]=null),this[TG]=!0,B0("abort",this),this[nn]!=="loading"&&B0("loadend",this)}get readyState(){switch(se.brandCheck(this,e),this[nn]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return se.brandCheck(this,e),this[hg]}get error(){return se.brandCheck(this,e),this[p0]}get onloadend(){return se.brandCheck(this,e),this[$].loadend}set onloadend(A){se.brandCheck(this,e),this[$].loadend&&this.removeEventListener("loadend",this[$].loadend),typeof A=="function"?(this[$].loadend=A,this.addEventListener("loadend",A)):this[$].loadend=null}get onerror(){return se.brandCheck(this,e),this[$].error}set onerror(A){se.brandCheck(this,e),this[$].error&&this.removeEventListener("error",this[$].error),typeof A=="function"?(this[$].error=A,this.addEventListener("error",A)):this[$].error=null}get onloadstart(){return se.brandCheck(this,e),this[$].loadstart}set onloadstart(A){se.brandCheck(this,e),this[$].loadstart&&this.removeEventListener("loadstart",this[$].loadstart),typeof A=="function"?(this[$].loadstart=A,this.addEventListener("loadstart",A)):this[$].loadstart=null}get onprogress(){return se.brandCheck(this,e),this[$].progress}set onprogress(A){se.brandCheck(this,e),this[$].progress&&this.removeEventListener("progress",this[$].progress),typeof A=="function"?(this[$].progress=A,this.addEventListener("progress",A)):this[$].progress=null}get onload(){return se.brandCheck(this,e),this[$].load}set onload(A){se.brandCheck(this,e),this[$].load&&this.removeEventListener("load",this[$].load),typeof A=="function"?(this[$].load=A,this.addEventListener("load",A)):this[$].load=null}get onabort(){return se.brandCheck(this,e),this[$].abort}set onabort(A){se.brandCheck(this,e),this[$].abort&&this.removeEventListener("abort",this[$].abort),typeof A=="function"?(this[$].abort=A,this.addEventListener("abort",A)):this[$].abort=null}};rt.EMPTY=rt.prototype.EMPTY=0;rt.LOADING=rt.prototype.LOADING=1;rt.DONE=rt.prototype.DONE=2;Object.defineProperties(rt.prototype,{EMPTY:ki,LOADING:ki,DONE:ki,readAsArrayBuffer:BA,readAsBinaryString:BA,readAsText:BA,readAsDataURL:BA,abort:BA,readyState:BA,result:BA,error:BA,onloadstart:BA,onprogress:BA,onload:BA,onabort:BA,onerror:BA,onloadend:BA,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(rt,{EMPTY:ki,LOADING:ki,DONE:ki});m0.exports={FileReader:rt}});var dg=Q((y8,w0)=>{"use strict";w0.exports={kConstruct:de().kConstruct}});var b0=Q((w8,D0)=>{"use strict";var MG=require("assert"),{URLSerializer:R0}=$A(),{isValidHeaderName:vG}=YA();function PG(e,A,t=!1){let r=R0(e,t),n=R0(A,t);return r===n}function GG(e){MG(e!==null);let A=[];for(let t of e.split(",")){if(t=t.trim(),t.length){if(!vG(t))continue}else continue;A.push(t)}return A}D0.exports={urlEquals:PG,fieldValues:GG}});var U0=Q((R8,L0)=>{"use strict";var{kConstruct:JG}=dg(),{urlEquals:YG,fieldValues:Zh}=b0(),{kEnumerableProperty:sn,isDisturbed:VG}=W(),{kHeadersList:k0}=de(),{webidl:F}=iA(),{Response:F0,cloneResponse:qG}=$c(),{Request:Ft}=no(),{kState:gA,kHeaders:Qg,kGuard:S0,kRealm:OG}=qt(),{fetching:HG}=lg(),{urlIsHttpHttpsScheme:Cg,createDeferredPromise:Si,readAllBytes:WG}=YA(),Xh=require("assert"),{getGlobalDispatcher:_G}=Ii(),Nt,pA,fg,Fi,N0,zt=class zt{constructor(){Ne(this,pA);Ne(this,Nt);arguments[0]!==JG&&F.illegalConstructor(),Ae(this,Nt,arguments[1])}async match(A,t={}){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,1,{header:"Cache.match"}),A=F.converters.RequestInfo(A),t=F.converters.CacheQueryOptions(t);let r=await this.matchAll(A,t);if(r.length!==0)return r[0]}async matchAll(A=void 0,t={}){F.brandCheck(this,zt),A!==void 0&&(A=F.converters.RequestInfo(A)),t=F.converters.CacheQueryOptions(t);let r=null;if(A!==void 0)if(A instanceof Ft){if(r=A[gA],r.method!=="GET"&&!t.ignoreMethod)return[]}else typeof A=="string"&&(r=new Ft(A)[gA]);let n=[];if(A===void 0)for(let s of f(this,Nt))n.push(s[1]);else{let s=MA(this,pA,Fi).call(this,r,t);for(let o of s)n.push(o[1])}let i=[];for(let s of n){let o=new F0(s.body?.source??null),a=o[gA].body;o[gA]=s,o[gA].body=a,o[Qg][k0]=s.headersList,o[Qg][S0]="immutable",i.push(o)}return Object.freeze(i)}async add(A){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,1,{header:"Cache.add"}),A=F.converters.RequestInfo(A);let t=[A];return await this.addAll(t)}async addAll(A){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,1,{header:"Cache.addAll"}),A=F.converters["sequence"](A);let t=[],r=[];for(let l of A){if(typeof l=="string")continue;let u=l[gA];if(!Cg(u.url)||u.method!=="GET")throw F.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme when method is not GET."})}let n=[];for(let l of A){let u=new Ft(l)[gA];if(!Cg(u.url))throw F.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme."});u.initiator="fetch",u.destination="subresource",r.push(u);let E=Si();n.push(HG({request:u,dispatcher:_G(),processResponse(h){if(h.type==="error"||h.status===206||h.status<200||h.status>299)E.reject(F.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(h.headersList.contains("vary")){let d=Zh(h.headersList.get("vary"));for(let C of d)if(C==="*"){E.reject(F.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let I of n)I.abort();return}}},processResponseEndOfBody(h){if(h.aborted){E.reject(new DOMException("aborted","AbortError"));return}E.resolve(h)}})),t.push(E.promise)}let s=await Promise.all(t),o=[],a=0;for(let l of s){let u={type:"put",request:r[a],response:l};o.push(u),a++}let c=Si(),g=null;try{MA(this,pA,fg).call(this,o)}catch(l){g=l}return queueMicrotask(()=>{g===null?c.resolve(void 0):c.reject(g)}),c.promise}async put(A,t){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,2,{header:"Cache.put"}),A=F.converters.RequestInfo(A),t=F.converters.Response(t);let r=null;if(A instanceof Ft?r=A[gA]:r=new Ft(A)[gA],!Cg(r.url)||r.method!=="GET")throw F.errors.exception({header:"Cache.put",message:"Expected an http/s scheme when method is not GET"});let n=t[gA];if(n.status===206)throw F.errors.exception({header:"Cache.put",message:"Got 206 status"});if(n.headersList.contains("vary")){let u=Zh(n.headersList.get("vary"));for(let E of u)if(E==="*")throw F.errors.exception({header:"Cache.put",message:"Got * vary field value"})}if(n.body&&(VG(n.body.stream)||n.body.stream.locked))throw F.errors.exception({header:"Cache.put",message:"Response body is locked or disturbed"});let i=qG(n),s=Si();if(n.body!=null){let E=n.body.stream.getReader();WG(E).then(s.resolve,s.reject)}else s.resolve(void 0);let o=[],a={type:"put",request:r,response:i};o.push(a);let c=await s.promise;i.body!=null&&(i.body.source=c);let g=Si(),l=null;try{MA(this,pA,fg).call(this,o)}catch(u){l=u}return queueMicrotask(()=>{l===null?g.resolve():g.reject(l)}),g.promise}async delete(A,t={}){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,1,{header:"Cache.delete"}),A=F.converters.RequestInfo(A),t=F.converters.CacheQueryOptions(t);let r=null;if(A instanceof Ft){if(r=A[gA],r.method!=="GET"&&!t.ignoreMethod)return!1}else Xh(typeof A=="string"),r=new Ft(A)[gA];let n=[],i={type:"delete",request:r,options:t};n.push(i);let s=Si(),o=null,a;try{a=MA(this,pA,fg).call(this,n)}catch(c){o=c}return queueMicrotask(()=>{o===null?s.resolve(!!a?.length):s.reject(o)}),s.promise}async keys(A=void 0,t={}){F.brandCheck(this,zt),A!==void 0&&(A=F.converters.RequestInfo(A)),t=F.converters.CacheQueryOptions(t);let r=null;if(A!==void 0)if(A instanceof Ft){if(r=A[gA],r.method!=="GET"&&!t.ignoreMethod)return[]}else typeof A=="string"&&(r=new Ft(A)[gA]);let n=Si(),i=[];if(A===void 0)for(let s of f(this,Nt))i.push(s[0]);else{let s=MA(this,pA,Fi).call(this,r,t);for(let o of s)i.push(o[0])}return queueMicrotask(()=>{let s=[];for(let o of i){let a=new Ft("https://a");a[gA]=o,a[Qg][k0]=o.headersList,a[Qg][S0]="immutable",a[OG]=o.client,s.push(a)}n.resolve(Object.freeze(s))}),n.promise}};Nt=new WeakMap,pA=new WeakSet,fg=function(A){let t=f(this,Nt),r=[...t],n=[],i=[];try{for(let s of A){if(s.type!=="delete"&&s.type!=="put")throw F.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(s.type==="delete"&&s.response!=null)throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(MA(this,pA,Fi).call(this,s.request,s.options,n).length)throw new DOMException("???","InvalidStateError");let o;if(s.type==="delete"){if(o=MA(this,pA,Fi).call(this,s.request,s.options),o.length===0)return[];for(let a of o){let c=t.indexOf(a);Xh(c!==-1),t.splice(c,1)}}else if(s.type==="put"){if(s.response==null)throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let a=s.request;if(!Cg(a.url))throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(a.method!=="GET")throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(s.options!=null)throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});o=MA(this,pA,Fi).call(this,s.request);for(let c of o){let g=t.indexOf(c);Xh(g!==-1),t.splice(g,1)}t.push([s.request,s.response]),n.push([s.request,s.response])}i.push([s.request,s.response])}return i}catch(s){throw f(this,Nt).length=0,Ae(this,Nt,r),s}},Fi=function(A,t,r){let n=[],i=r??f(this,Nt);for(let s of i){let[o,a]=s;MA(this,pA,N0).call(this,A,o,a,t)&&n.push(s)}return n},N0=function(A,t,r=null,n){let i=new URL(A.url),s=new URL(t.url);if(n?.ignoreSearch&&(s.search="",i.search=""),!YG(i,s,!0))return!1;if(r==null||n?.ignoreVary||!r.headersList.contains("vary"))return!0;let o=Zh(r.headersList.get("vary"));for(let a of o){if(a==="*")return!1;let c=t.headersList.get(a),g=A.headersList.get(a);if(c!==g)return!1}return!0};var Ig=zt;Object.defineProperties(Ig.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:sn,matchAll:sn,add:sn,addAll:sn,put:sn,delete:sn,keys:sn});var x0=[{key:"ignoreSearch",converter:F.converters.boolean,defaultValue:!1},{key:"ignoreMethod",converter:F.converters.boolean,defaultValue:!1},{key:"ignoreVary",converter:F.converters.boolean,defaultValue:!1}];F.converters.CacheQueryOptions=F.dictionaryConverter(x0);F.converters.MultiCacheQueryOptions=F.dictionaryConverter([...x0,{key:"cacheName",converter:F.converters.DOMString}]);F.converters.Response=F.interfaceConverter(F0);F.converters["sequence"]=F.sequenceConverter(F.converters.RequestInfo);L0.exports={Cache:Ig}});var M0=Q((b8,T0)=>{"use strict";var{kConstruct:oo}=dg(),{Cache:Bg}=U0(),{webidl:lA}=iA(),{kEnumerableProperty:ao}=W(),OA,on=class on{constructor(){Ne(this,OA,new Map);arguments[0]!==oo&&lA.illegalConstructor()}async match(A,t={}){if(lA.brandCheck(this,on),lA.argumentLengthCheck(arguments,1,{header:"CacheStorage.match"}),A=lA.converters.RequestInfo(A),t=lA.converters.MultiCacheQueryOptions(t),t.cacheName!=null){if(f(this,OA).has(t.cacheName)){let r=f(this,OA).get(t.cacheName);return await new Bg(oo,r).match(A,t)}}else for(let r of f(this,OA).values()){let i=await new Bg(oo,r).match(A,t);if(i!==void 0)return i}}async has(A){return lA.brandCheck(this,on),lA.argumentLengthCheck(arguments,1,{header:"CacheStorage.has"}),A=lA.converters.DOMString(A),f(this,OA).has(A)}async open(A){if(lA.brandCheck(this,on),lA.argumentLengthCheck(arguments,1,{header:"CacheStorage.open"}),A=lA.converters.DOMString(A),f(this,OA).has(A)){let r=f(this,OA).get(A);return new Bg(oo,r)}let t=[];return f(this,OA).set(A,t),new Bg(oo,t)}async delete(A){return lA.brandCheck(this,on),lA.argumentLengthCheck(arguments,1,{header:"CacheStorage.delete"}),A=lA.converters.DOMString(A),f(this,OA).delete(A)}async keys(){return lA.brandCheck(this,on),[...f(this,OA).keys()]}};OA=new WeakMap;var pg=on;Object.defineProperties(pg.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:ao,has:ao,open:ao,delete:ao,keys:ao});T0.exports={CacheStorage:pg}});var P0=Q((S8,v0)=>{"use strict";v0.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var zh=Q((F8,Y0)=>{"use strict";var G0=require("assert"),{kHeadersList:J0}=de();function jG(e){if(e.length===0)return!1;for(let A of e){let t=A.charCodeAt(0);if(t>=0||t<=8||t>=10||t<=31||t===127)return!1}}function KG(e){for(let A of e){let t=A.charCodeAt(0);if(t<=32||t>127||A==="("||A===")"||A===">"||A==="<"||A==="@"||A===","||A===";"||A===":"||A==="\\"||A==='"'||A==="/"||A==="["||A==="]"||A==="?"||A==="="||A==="{"||A==="}")throw new Error("Invalid cookie name")}}function ZG(e){for(let A of e){let t=A.charCodeAt(0);if(t<33||t===34||t===44||t===59||t===92||t>126)throw new Error("Invalid header value")}}function XG(e){for(let A of e)if(A.charCodeAt(0)<33||A===";")throw new Error("Invalid cookie path")}function zG(e){if(e.startsWith("-")||e.endsWith(".")||e.endsWith("-"))throw new Error("Invalid cookie domain")}function $G(e){typeof e=="number"&&(e=new Date(e));let A=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=A[e.getUTCDay()],n=e.getUTCDate().toString().padStart(2,"0"),i=t[e.getUTCMonth()],s=e.getUTCFullYear(),o=e.getUTCHours().toString().padStart(2,"0"),a=e.getUTCMinutes().toString().padStart(2,"0"),c=e.getUTCSeconds().toString().padStart(2,"0");return`${r}, ${n} ${i} ${s} ${o}:${a}:${c} GMT`}function eJ(e){if(e<0)throw new Error("Invalid cookie max-age")}function AJ(e){if(e.name.length===0)return null;KG(e.name),ZG(e.value);let A=[`${e.name}=${e.value}`];e.name.startsWith("__Secure-")&&(e.secure=!0),e.name.startsWith("__Host-")&&(e.secure=!0,e.domain=null,e.path="/"),e.secure&&A.push("Secure"),e.httpOnly&&A.push("HttpOnly"),typeof e.maxAge=="number"&&(eJ(e.maxAge),A.push(`Max-Age=${e.maxAge}`)),e.domain&&(zG(e.domain),A.push(`Domain=${e.domain}`)),e.path&&(XG(e.path),A.push(`Path=${e.path}`)),e.expires&&e.expires.toString()!=="Invalid Date"&&A.push(`Expires=${$G(e.expires)}`),e.sameSite&&A.push(`SameSite=${e.sameSite}`);for(let t of e.unparsed){if(!t.includes("="))throw new Error("Invalid unparsed");let[r,...n]=t.split("=");A.push(`${r.trim()}=${n.join("=")}`)}return A.join("; ")}var mg;function tJ(e){if(e[J0])return e[J0];mg||(mg=Object.getOwnPropertySymbols(e).find(t=>t.description==="headers list"),G0(mg,"Headers cannot be parsed"));let A=e[mg];return G0(A),A}Y0.exports={isCTLExcludingHtab:jG,stringify:AJ,getHeadersList:tJ}});var q0=Q((N8,V0)=>{"use strict";var{maxNameValuePairSize:rJ,maxAttributeValueSize:nJ}=P0(),{isCTLExcludingHtab:iJ}=zh(),{collectASequenceOfCodePointsFast:yg}=$A(),sJ=require("assert");function oJ(e){if(iJ(e))return null;let A="",t="",r="",n="";if(e.includes(";")){let i={position:0};A=yg(";",e,i),t=e.slice(i.position)}else A=e;if(!A.includes("="))n=A;else{let i={position:0};r=yg("=",A,i),n=A.slice(i.position+1)}return r=r.trim(),n=n.trim(),r.length+n.length>rJ?null:{name:r,value:n,...Ni(t)}}function Ni(e,A={}){if(e.length===0)return A;sJ(e[0]===";"),e=e.slice(1);let t="";e.includes(";")?(t=yg(";",e,{position:0}),e=e.slice(t.length)):(t=e,e="");let r="",n="";if(t.includes("=")){let s={position:0};r=yg("=",t,s),n=t.slice(s.position+1)}else r=t;if(r=r.trim(),n=n.trim(),n.length>nJ)return Ni(e,A);let i=r.toLowerCase();if(i==="expires"){let s=new Date(n);A.expires=s}else if(i==="max-age"){let s=n.charCodeAt(0);if((s<48||s>57)&&n[0]!=="-"||!/^\d+$/.test(n))return Ni(e,A);let o=Number(n);A.maxAge=o}else if(i==="domain"){let s=n;s[0]==="."&&(s=s.slice(1)),s=s.toLowerCase(),A.domain=s}else if(i==="path"){let s="";n.length===0||n[0]!=="/"?s="/":s=n,A.path=s}else if(i==="secure")A.secure=!0;else if(i==="httponly")A.httpOnly=!0;else if(i==="samesite"){let s="Default",o=n.toLowerCase();o.includes("none")&&(s="None"),o.includes("strict")&&(s="Strict"),o.includes("lax")&&(s="Lax"),A.sameSite=s}else A.unparsed??=[],A.unparsed.push(`${r}=${n}`);return Ni(e,A)}V0.exports={parseSetCookie:oJ,parseUnparsedAttributes:Ni}});var _0=Q((x8,W0)=>{"use strict";var{parseSetCookie:aJ}=q0(),{stringify:O0,getHeadersList:cJ}=zh(),{webidl:O}=iA(),{Headers:wg}=tn();function gJ(e){O.argumentLengthCheck(arguments,1,{header:"getCookies"}),O.brandCheck(e,wg,{strict:!1});let A=e.get("cookie"),t={};if(!A)return t;for(let r of A.split(";")){let[n,...i]=r.split("=");t[n.trim()]=i.join("=")}return t}function lJ(e,A,t){O.argumentLengthCheck(arguments,2,{header:"deleteCookie"}),O.brandCheck(e,wg,{strict:!1}),A=O.converters.DOMString(A),t=O.converters.DeleteCookieAttributes(t),H0(e,{name:A,value:"",expires:new Date(0),...t})}function uJ(e){O.argumentLengthCheck(arguments,1,{header:"getSetCookies"}),O.brandCheck(e,wg,{strict:!1});let A=cJ(e).cookies;return A?A.map(t=>aJ(Array.isArray(t)?t[1]:t)):[]}function H0(e,A){O.argumentLengthCheck(arguments,2,{header:"setCookie"}),O.brandCheck(e,wg,{strict:!1}),A=O.converters.Cookie(A),O0(A)&&e.append("Set-Cookie",O0(A))}O.converters.DeleteCookieAttributes=O.dictionaryConverter([{converter:O.nullableConverter(O.converters.DOMString),key:"path",defaultValue:null},{converter:O.nullableConverter(O.converters.DOMString),key:"domain",defaultValue:null}]);O.converters.Cookie=O.dictionaryConverter([{converter:O.converters.DOMString,key:"name"},{converter:O.converters.DOMString,key:"value"},{converter:O.nullableConverter(e=>typeof e=="number"?O.converters["unsigned long long"](e):new Date(e)),key:"expires",defaultValue:null},{converter:O.nullableConverter(O.converters["long long"]),key:"maxAge",defaultValue:null},{converter:O.nullableConverter(O.converters.DOMString),key:"domain",defaultValue:null},{converter:O.nullableConverter(O.converters.DOMString),key:"path",defaultValue:null},{converter:O.nullableConverter(O.converters.boolean),key:"secure",defaultValue:null},{converter:O.nullableConverter(O.converters.boolean),key:"httpOnly",defaultValue:null},{converter:O.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:O.sequenceConverter(O.converters.DOMString),key:"unparsed",defaultValue:[]}]);W0.exports={getCookies:gJ,deleteCookie:lJ,getSetCookies:uJ,setCookie:H0}});var xi=Q((L8,j0)=>{"use strict";var EJ="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hJ={enumerable:!0,writable:!1,configurable:!1},dJ={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},QJ={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},CJ=2**16-1,fJ={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},IJ=Buffer.allocUnsafe(0);j0.exports={uid:EJ,staticPropertyDescriptors:hJ,states:dJ,opcodes:QJ,maxUnsigned16Bit:CJ,parserStates:fJ,emptyBuffer:IJ}});var co=Q((U8,K0)=>{"use strict";K0.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var ed=Q((T8,Z0)=>{"use strict";var{webidl:N}=iA(),{kEnumerableProperty:mA}=W(),{MessagePort:BJ}=require("worker_threads"),nt,$t=class $t extends Event{constructor(t,r={}){N.argumentLengthCheck(arguments,1,{header:"MessageEvent constructor"}),t=N.converters.DOMString(t),r=N.converters.MessageEventInit(r);super(t,r);Ne(this,nt);Ae(this,nt,r)}get data(){return N.brandCheck(this,$t),f(this,nt).data}get origin(){return N.brandCheck(this,$t),f(this,nt).origin}get lastEventId(){return N.brandCheck(this,$t),f(this,nt).lastEventId}get source(){return N.brandCheck(this,$t),f(this,nt).source}get ports(){return N.brandCheck(this,$t),Object.isFrozen(f(this,nt).ports)||Object.freeze(f(this,nt).ports),f(this,nt).ports}initMessageEvent(t,r=!1,n=!1,i=null,s="",o="",a=null,c=[]){return N.brandCheck(this,$t),N.argumentLengthCheck(arguments,1,{header:"MessageEvent.initMessageEvent"}),new $t(t,{bubbles:r,cancelable:n,data:i,origin:s,lastEventId:o,source:a,ports:c})}};nt=new WeakMap;var Rg=$t,cn,go=class go extends Event{constructor(t,r={}){N.argumentLengthCheck(arguments,1,{header:"CloseEvent constructor"}),t=N.converters.DOMString(t),r=N.converters.CloseEventInit(r);super(t,r);Ne(this,cn);Ae(this,cn,r)}get wasClean(){return N.brandCheck(this,go),f(this,cn).wasClean}get code(){return N.brandCheck(this,go),f(this,cn).code}get reason(){return N.brandCheck(this,go),f(this,cn).reason}};cn=new WeakMap;var Dg=go,er,an=class an extends Event{constructor(t,r){N.argumentLengthCheck(arguments,1,{header:"ErrorEvent constructor"});super(t,r);Ne(this,er);t=N.converters.DOMString(t),r=N.converters.ErrorEventInit(r??{}),Ae(this,er,r)}get message(){return N.brandCheck(this,an),f(this,er).message}get filename(){return N.brandCheck(this,an),f(this,er).filename}get lineno(){return N.brandCheck(this,an),f(this,er).lineno}get colno(){return N.brandCheck(this,an),f(this,er).colno}get error(){return N.brandCheck(this,an),f(this,er).error}};er=new WeakMap;var bg=an;Object.defineProperties(Rg.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:mA,origin:mA,lastEventId:mA,source:mA,ports:mA,initMessageEvent:mA});Object.defineProperties(Dg.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:mA,code:mA,wasClean:mA});Object.defineProperties(bg.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:mA,filename:mA,lineno:mA,colno:mA,error:mA});N.converters.MessagePort=N.interfaceConverter(BJ);N.converters["sequence"]=N.sequenceConverter(N.converters.MessagePort);var $h=[{key:"bubbles",converter:N.converters.boolean,defaultValue:!1},{key:"cancelable",converter:N.converters.boolean,defaultValue:!1},{key:"composed",converter:N.converters.boolean,defaultValue:!1}];N.converters.MessageEventInit=N.dictionaryConverter([...$h,{key:"data",converter:N.converters.any,defaultValue:null},{key:"origin",converter:N.converters.USVString,defaultValue:""},{key:"lastEventId",converter:N.converters.DOMString,defaultValue:""},{key:"source",converter:N.nullableConverter(N.converters.MessagePort),defaultValue:null},{key:"ports",converter:N.converters["sequence"],get defaultValue(){return[]}}]);N.converters.CloseEventInit=N.dictionaryConverter([...$h,{key:"wasClean",converter:N.converters.boolean,defaultValue:!1},{key:"code",converter:N.converters["unsigned short"],defaultValue:0},{key:"reason",converter:N.converters.USVString,defaultValue:""}]);N.converters.ErrorEventInit=N.dictionaryConverter([...$h,{key:"message",converter:N.converters.DOMString,defaultValue:""},{key:"filename",converter:N.converters.USVString,defaultValue:""},{key:"lineno",converter:N.converters["unsigned long"],defaultValue:0},{key:"colno",converter:N.converters["unsigned long"],defaultValue:0},{key:"error",converter:N.converters.any}]);Z0.exports={MessageEvent:Rg,CloseEvent:Dg,ErrorEvent:bg}});var Fg=Q((v8,$0)=>{"use strict";var{kReadyState:kg,kController:pJ,kResponse:mJ,kBinaryType:yJ,kWebSocketURL:wJ}=co(),{states:Sg,opcodes:X0}=xi(),{MessageEvent:RJ,ErrorEvent:DJ}=ed();function bJ(e){return e[kg]===Sg.OPEN}function kJ(e){return e[kg]===Sg.CLOSING}function SJ(e){return e[kg]===Sg.CLOSED}function Ad(e,A,t=Event,r){let n=new t(e,r);A.dispatchEvent(n)}function FJ(e,A,t){if(e[kg]!==Sg.OPEN)return;let r;if(A===X0.TEXT)try{r=new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch{z0(e,"Received invalid UTF-8 in text frame.");return}else A===X0.BINARY&&(e[yJ]==="blob"?r=new Blob([t]):r=new Uint8Array(t).buffer);Ad("message",e,RJ,{origin:e[wJ].origin,data:r})}function NJ(e){if(e.length===0)return!1;for(let A of e){let t=A.charCodeAt(0);if(t<33||t>126||A==="("||A===")"||A==="<"||A===">"||A==="@"||A===","||A===";"||A===":"||A==="\\"||A==='"'||A==="/"||A==="["||A==="]"||A==="?"||A==="="||A==="{"||A==="}"||t===32||t===9)return!1}return!0}function xJ(e){return e>=1e3&&e<1015?e!==1004&&e!==1005&&e!==1006:e>=3e3&&e<=4999}function z0(e,A){let{[pJ]:t,[mJ]:r}=e;t.abort(),r?.socket&&!r.socket.destroyed&&r.socket.destroy(),A&&Ad("error",e,DJ,{error:new Error(A)})}$0.exports={isEstablished:bJ,isClosing:kJ,isClosed:SJ,fireEvent:Ad,isValidSubprotocol:NJ,isValidStatusCode:xJ,failWebsocketConnection:z0,websocketMessageReceived:FJ}});var iR=Q((P8,nR)=>{"use strict";var rd=require("diagnostics_channel"),{uid:LJ,states:AR}=xi(),{kReadyState:tR,kSentClose:eR,kByteParser:rR,kReceivedClose:UJ}=co(),{fireEvent:TJ,failWebsocketConnection:gn}=Fg(),{CloseEvent:MJ}=ed(),{makeRequest:vJ}=no(),{fetching:PJ}=lg(),{Headers:GJ}=tn(),{getGlobalDispatcher:JJ}=Ii(),{kHeadersList:YJ}=de(),Ar={};Ar.open=rd.channel("undici:websocket:open");Ar.close=rd.channel("undici:websocket:close");Ar.socketError=rd.channel("undici:websocket:socket_error");var td;try{td=require("crypto")}catch{}function VJ(e,A,t,r,n){let i=e;i.protocol=e.protocol==="ws:"?"http:":"https:";let s=vJ({urlList:[i],serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(n.headers){let g=new GJ(n.headers)[YJ];s.headersList=g}let o=td.randomBytes(16).toString("base64");s.headersList.append("sec-websocket-key",o),s.headersList.append("sec-websocket-version","13");for(let g of A)s.headersList.append("sec-websocket-protocol",g);let a="";return PJ({request:s,useParallelQueue:!0,dispatcher:n.dispatcher??JJ(),processResponse(g){if(g.type==="error"||g.status!==101){gn(t,"Received network error or non-101 status code.");return}if(A.length!==0&&!g.headersList.get("Sec-WebSocket-Protocol")){gn(t,"Server did not respond with sent protocols.");return}if(g.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){gn(t,'Server did not set Upgrade header to "websocket".');return}if(g.headersList.get("Connection")?.toLowerCase()!=="upgrade"){gn(t,'Server did not set Connection header to "upgrade".');return}let l=g.headersList.get("Sec-WebSocket-Accept"),u=td.createHash("sha1").update(o+LJ).digest("base64");if(l!==u){gn(t,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let E=g.headersList.get("Sec-WebSocket-Extensions");if(E!==null&&E!==a){gn(t,"Received different permessage-deflate than the one set.");return}let h=g.headersList.get("Sec-WebSocket-Protocol");if(h!==null&&h!==s.headersList.get("Sec-WebSocket-Protocol")){gn(t,"Protocol was not set in the opening handshake.");return}g.socket.on("data",qJ),g.socket.on("close",OJ),g.socket.on("error",HJ),Ar.open.hasSubscribers&&Ar.open.publish({address:g.socket.address(),protocol:h,extensions:E}),r(g)}})}function qJ(e){this.ws[rR].write(e)||this.pause()}function OJ(){let{ws:e}=this,A=e[eR]&&e[UJ],t=1005,r="",n=e[rR].closingInfo;n?(t=n.code??1005,r=n.reason):e[eR]||(t=1006),e[tR]=AR.CLOSED,TJ("close",e,MJ,{wasClean:A,code:t,reason:r}),Ar.close.hasSubscribers&&Ar.close.publish({websocket:e,code:t,reason:r})}function HJ(e){let{ws:A}=this;A[tR]=AR.CLOSING,Ar.socketError.hasSubscribers&&Ar.socketError.publish(e),this.destroy()}nR.exports={establishWebSocketConnection:VJ}});var id=Q((G8,oR)=>{"use strict";var{maxUnsigned16Bit:WJ}=xi(),sR;try{sR=require("crypto")}catch{}var nd=class{constructor(A){this.frameData=A,this.maskKey=sR.randomBytes(4)}createFrame(A){let t=this.frameData?.byteLength??0,r=t,n=6;t>WJ?(n+=8,r=127):t>125&&(n+=2,r=126);let i=Buffer.allocUnsafe(t+n);i[0]=i[1]=0,i[0]|=128,i[0]=(i[0]&240)+A;i[n-4]=this.maskKey[0],i[n-3]=this.maskKey[1],i[n-2]=this.maskKey[2],i[n-1]=this.maskKey[3],i[1]=r,r===126?i.writeUInt16BE(t,2):r===127&&(i[2]=i[3]=0,i.writeUIntBE(t,4,6)),i[1]|=128;for(let s=0;s{"use strict";var{Writable:_J}=require("stream"),ER=require("diagnostics_channel"),{parserStates:HA,opcodes:WA,states:jJ,emptyBuffer:KJ}=xi(),{kReadyState:ZJ,kSentClose:aR,kResponse:cR,kReceivedClose:gR}=co(),{isValidStatusCode:lR,failWebsocketConnection:lo,websocketMessageReceived:XJ}=Fg(),{WebsocketFrameSend:uR}=id(),Li={};Li.ping=ER.channel("undici:websocket:ping");Li.pong=ER.channel("undici:websocket:pong");var it,uA,yA,_,Ui,sd=class extends _J{constructor(t){super();Ne(this,it,[]);Ne(this,uA,0);Ne(this,yA,HA.INFO);Ne(this,_,{});Ne(this,Ui,[]);this.ws=t}_write(t,r,n){f(this,it).push(t),Ae(this,uA,f(this,uA)+t.length),this.run(n)}run(t){for(;;){if(f(this,yA)===HA.INFO){if(f(this,uA)<2)return t();let r=this.consume(2);if(f(this,_).fin=(r[0]&128)!==0,f(this,_).opcode=r[0]&15,f(this,_).originalOpcode??=f(this,_).opcode,f(this,_).fragmented=!f(this,_).fin&&f(this,_).opcode!==WA.CONTINUATION,f(this,_).fragmented&&f(this,_).opcode!==WA.BINARY&&f(this,_).opcode!==WA.TEXT){lo(this.ws,"Invalid frame type was fragmented.");return}let n=r[1]&127;if(n<=125?(f(this,_).payloadLength=n,Ae(this,yA,HA.READ_DATA)):n===126?Ae(this,yA,HA.PAYLOADLENGTH_16):n===127&&Ae(this,yA,HA.PAYLOADLENGTH_64),f(this,_).fragmented&&n>125){lo(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((f(this,_).opcode===WA.PING||f(this,_).opcode===WA.PONG||f(this,_).opcode===WA.CLOSE)&&n>125){lo(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(f(this,_).opcode===WA.CLOSE){if(n===1){lo(this.ws,"Received close frame with a 1-byte body.");return}let i=this.consume(n);if(f(this,_).closeInfo=this.parseCloseBody(!1,i),!this.ws[aR]){let s=Buffer.allocUnsafe(2);s.writeUInt16BE(f(this,_).closeInfo.code,0);let o=new uR(s);this.ws[cR].socket.write(o.createFrame(WA.CLOSE),a=>{a||(this.ws[aR]=!0)})}this.ws[ZJ]=jJ.CLOSING,this.ws[gR]=!0,this.end();return}else if(f(this,_).opcode===WA.PING){let i=this.consume(n);if(!this.ws[gR]){let s=new uR(i);this.ws[cR].socket.write(s.createFrame(WA.PONG)),Li.ping.hasSubscribers&&Li.ping.publish({payload:i})}if(Ae(this,yA,HA.INFO),f(this,uA)>0)continue;t();return}else if(f(this,_).opcode===WA.PONG){let i=this.consume(n);if(Li.pong.hasSubscribers&&Li.pong.publish({payload:i}),f(this,uA)>0)continue;t();return}}else if(f(this,yA)===HA.PAYLOADLENGTH_16){if(f(this,uA)<2)return t();let r=this.consume(2);f(this,_).payloadLength=r.readUInt16BE(0),Ae(this,yA,HA.READ_DATA)}else if(f(this,yA)===HA.PAYLOADLENGTH_64){if(f(this,uA)<8)return t();let r=this.consume(8),n=r.readUInt32BE(0);if(n>2**31-1){lo(this.ws,"Received payload length > 2^31 bytes.");return}let i=r.readUInt32BE(4);f(this,_).payloadLength=(n<<8)+i,Ae(this,yA,HA.READ_DATA)}else if(f(this,yA)===HA.READ_DATA){if(f(this,uA)=f(this,_).payloadLength){let r=this.consume(f(this,_).payloadLength);if(f(this,Ui).push(r),!f(this,_).fragmented||f(this,_).fin&&f(this,_).opcode===WA.CONTINUATION){let n=Buffer.concat(f(this,Ui));XJ(this.ws,f(this,_).originalOpcode,n),Ae(this,_,{}),f(this,Ui).length=0}Ae(this,yA,HA.INFO)}}if(!(f(this,uA)>0)){t();break}}}consume(t){if(t>f(this,uA))return null;if(t===0)return KJ;if(f(this,it)[0].length===t)return Ae(this,uA,f(this,uA)-f(this,it)[0].length),f(this,it).shift();let r=Buffer.allocUnsafe(t),n=0;for(;n!==t;){let i=f(this,it)[0],{length:s}=i;if(s+n===t){r.set(f(this,it).shift(),n);break}else if(s+n>t){r.set(i.subarray(0,t-n),n),f(this,it)[0]=i.subarray(t-n);break}else r.set(f(this,it).shift(),n),n+=i.length}return Ae(this,uA,f(this,uA)-t),r}parseCloseBody(t,r){let n;if(r.length>=2&&(n=r.readUInt16BE(0)),t)return lR(n)?{code:n}:null;let i=r.subarray(2);if(i[0]===239&&i[1]===187&&i[2]===191&&(i=i.subarray(3)),n!==void 0&&!lR(n))return null;try{i=new TextDecoder("utf-8",{fatal:!0}).decode(i)}catch{return null}return{code:n,reason:i}}get closingInfo(){return f(this,_).closeInfo}};it=new WeakMap,uA=new WeakMap,yA=new WeakMap,_=new WeakMap,Ui=new WeakMap;hR.exports={ByteParser:sd}});var wR=Q((V8,yR)=>{"use strict";var{webidl:M}=iA(),{DOMException:Nr}=mr(),{URLSerializer:zJ}=$A(),{getGlobalOrigin:$J}=Xn(),{staticPropertyDescriptors:xr,states:Ti,opcodes:uo,emptyBuffer:eY}=xi(),{kWebSocketURL:QR,kReadyState:tr,kController:AY,kBinaryType:Ng,kResponse:xg,kSentClose:tY,kByteParser:rY}=co(),{isEstablished:CR,isClosing:fR,isValidSubprotocol:nY,failWebsocketConnection:iY,fireEvent:sY}=Fg(),{establishWebSocketConnection:oY}=iR(),{WebsocketFrameSend:Eo}=id(),{ByteParser:aY}=dR(),{kEnumerableProperty:_A,isBlobLike:BR}=W(),{getGlobalDispatcher:cY}=Ii(),{types:pR}=require("util"),IR=!1,ke,jA,ho,Qo,Lg,mR,me=class me extends EventTarget{constructor(t,r=[]){super();Ne(this,Lg);Ne(this,ke,{open:null,error:null,close:null,message:null});Ne(this,jA,0);Ne(this,ho,"");Ne(this,Qo,"");M.argumentLengthCheck(arguments,1,{header:"WebSocket constructor"}),IR||(IR=!0,process.emitWarning("WebSockets are experimental, expect them to change at any time.",{code:"UNDICI-WS"}));let n=M.converters["DOMString or sequence or WebSocketInit"](r);t=M.converters.USVString(t),r=n.protocols;let i=$J(),s;try{s=new URL(t,i)}catch(o){throw new Nr(o,"SyntaxError")}if(s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),s.protocol!=="ws:"&&s.protocol!=="wss:")throw new Nr(`Expected a ws: or wss: protocol, got ${s.protocol}`,"SyntaxError");if(s.hash||s.href.endsWith("#"))throw new Nr("Got fragment","SyntaxError");if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(o=>o.toLowerCase())).size)throw new Nr("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(o=>nY(o)))throw new Nr("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[QR]=new URL(s.href),this[AY]=oY(s,r,this,o=>MA(this,Lg,mR).call(this,o),n),this[tr]=me.CONNECTING,this[Ng]="blob"}close(t=void 0,r=void 0){if(M.brandCheck(this,me),t!==void 0&&(t=M.converters["unsigned short"](t,{clamp:!0})),r!==void 0&&(r=M.converters.USVString(r)),t!==void 0&&t!==1e3&&(t<3e3||t>4999))throw new Nr("invalid code","InvalidAccessError");let n=0;if(r!==void 0&&(n=Buffer.byteLength(r),n>123))throw new Nr(`Reason must be less than 123 bytes; received ${n}`,"SyntaxError");if(!(this[tr]===me.CLOSING||this[tr]===me.CLOSED))if(!CR(this))iY(this,"Connection was closed before it was established."),this[tr]=me.CLOSING;else if(fR(this))this[tr]=me.CLOSING;else{let i=new Eo;t!==void 0&&r===void 0?(i.frameData=Buffer.allocUnsafe(2),i.frameData.writeUInt16BE(t,0)):t!==void 0&&r!==void 0?(i.frameData=Buffer.allocUnsafe(2+n),i.frameData.writeUInt16BE(t,0),i.frameData.write(r,2,"utf-8")):i.frameData=eY,this[xg].socket.write(i.createFrame(uo.CLOSE),o=>{o||(this[tY]=!0)}),this[tr]=Ti.CLOSING}}send(t){if(M.brandCheck(this,me),M.argumentLengthCheck(arguments,1,{header:"WebSocket.send"}),t=M.converters.WebSocketSendData(t),this[tr]===me.CONNECTING)throw new Nr("Sent before connected.","InvalidStateError");if(!CR(this)||fR(this))return;let r=this[xg].socket;if(typeof t=="string"){let n=Buffer.from(t),s=new Eo(n).createFrame(uo.TEXT);Ae(this,jA,f(this,jA)+n.byteLength),r.write(s,()=>{Ae(this,jA,f(this,jA)-n.byteLength)})}else if(pR.isArrayBuffer(t)){let n=Buffer.from(t),s=new Eo(n).createFrame(uo.BINARY);Ae(this,jA,f(this,jA)+n.byteLength),r.write(s,()=>{Ae(this,jA,f(this,jA)-n.byteLength)})}else if(ArrayBuffer.isView(t)){let n=Buffer.from(t,t.byteOffset,t.byteLength),s=new Eo(n).createFrame(uo.BINARY);Ae(this,jA,f(this,jA)+n.byteLength),r.write(s,()=>{Ae(this,jA,f(this,jA)-n.byteLength)})}else if(BR(t)){let n=new Eo;t.arrayBuffer().then(i=>{let s=Buffer.from(i);n.frameData=s;let o=n.createFrame(uo.BINARY);Ae(this,jA,f(this,jA)+s.byteLength),r.write(o,()=>{Ae(this,jA,f(this,jA)-s.byteLength)})})}}get readyState(){return M.brandCheck(this,me),this[tr]}get bufferedAmount(){return M.brandCheck(this,me),f(this,jA)}get url(){return M.brandCheck(this,me),zJ(this[QR])}get extensions(){return M.brandCheck(this,me),f(this,Qo)}get protocol(){return M.brandCheck(this,me),f(this,ho)}get onopen(){return M.brandCheck(this,me),f(this,ke).open}set onopen(t){M.brandCheck(this,me),f(this,ke).open&&this.removeEventListener("open",f(this,ke).open),typeof t=="function"?(f(this,ke).open=t,this.addEventListener("open",t)):f(this,ke).open=null}get onerror(){return M.brandCheck(this,me),f(this,ke).error}set onerror(t){M.brandCheck(this,me),f(this,ke).error&&this.removeEventListener("error",f(this,ke).error),typeof t=="function"?(f(this,ke).error=t,this.addEventListener("error",t)):f(this,ke).error=null}get onclose(){return M.brandCheck(this,me),f(this,ke).close}set onclose(t){M.brandCheck(this,me),f(this,ke).close&&this.removeEventListener("close",f(this,ke).close),typeof t=="function"?(f(this,ke).close=t,this.addEventListener("close",t)):f(this,ke).close=null}get onmessage(){return M.brandCheck(this,me),f(this,ke).message}set onmessage(t){M.brandCheck(this,me),f(this,ke).message&&this.removeEventListener("message",f(this,ke).message),typeof t=="function"?(f(this,ke).message=t,this.addEventListener("message",t)):f(this,ke).message=null}get binaryType(){return M.brandCheck(this,me),this[Ng]}set binaryType(t){M.brandCheck(this,me),t!=="blob"&&t!=="arraybuffer"?this[Ng]="blob":this[Ng]=t}};ke=new WeakMap,jA=new WeakMap,ho=new WeakMap,Qo=new WeakMap,Lg=new WeakSet,mR=function(t){this[xg]=t;let r=new aY(this);r.on("drain",function(){this.ws[xg].socket.resume()}),t.socket.ws=this,this[rY]=r,this[tr]=Ti.OPEN;let n=t.headersList.get("sec-websocket-extensions");n!==null&&Ae(this,Qo,n);let i=t.headersList.get("sec-websocket-protocol");i!==null&&Ae(this,ho,i),sY("open",this)};var TA=me;TA.CONNECTING=TA.prototype.CONNECTING=Ti.CONNECTING;TA.OPEN=TA.prototype.OPEN=Ti.OPEN;TA.CLOSING=TA.prototype.CLOSING=Ti.CLOSING;TA.CLOSED=TA.prototype.CLOSED=Ti.CLOSED;Object.defineProperties(TA.prototype,{CONNECTING:xr,OPEN:xr,CLOSING:xr,CLOSED:xr,url:_A,readyState:_A,bufferedAmount:_A,onopen:_A,onerror:_A,onclose:_A,close:_A,onmessage:_A,binaryType:_A,send:_A,extensions:_A,protocol:_A,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(TA,{CONNECTING:xr,OPEN:xr,CLOSING:xr,CLOSED:xr});M.converters["sequence"]=M.sequenceConverter(M.converters.DOMString);M.converters["DOMString or sequence"]=function(e){return M.util.Type(e)==="Object"&&Symbol.iterator in e?M.converters["sequence"](e):M.converters.DOMString(e)};M.converters.WebSocketInit=M.dictionaryConverter([{key:"protocols",converter:M.converters["DOMString or sequence"],get defaultValue(){return[]}},{key:"dispatcher",converter:e=>e,get defaultValue(){return cY()}},{key:"headers",converter:M.nullableConverter(M.converters.HeadersInit)}]);M.converters["DOMString or sequence or WebSocketInit"]=function(e){return M.util.Type(e)==="Object"&&!(Symbol.iterator in e)?M.converters.WebSocketInit(e):{protocols:M.converters["DOMString or sequence"](e)}};M.converters.WebSocketSendData=function(e){if(M.util.Type(e)==="Object"){if(BR(e))return M.converters.Blob(e,{strict:!1});if(ArrayBuffer.isView(e)||pR.isAnyArrayBuffer(e))return M.converters.BufferSource(e)}return M.converters.USVString(e)};yR.exports={WebSocket:TA}});var kR=Q((O8,G)=>{"use strict";var gY=Hs(),RR=uc(),DR=le(),lY=gi(),uY=vm(),EY=Ks(),ln=W(),{InvalidArgumentError:Ug}=DR,Mi=ky(),hY=vs(),dY=Qh(),QY=gw(),CY=Ih(),fY=nh(),IY=Qw(),BY=pw(),{getGlobalDispatcher:bR,setGlobalDispatcher:pY}=Ii(),mY=bw(),yY=dE(),wY=Qc(),od;try{require("crypto"),od=!0}catch{od=!1}Object.assign(RR.prototype,Mi);G.exports.Dispatcher=RR;G.exports.Client=gY;G.exports.Pool=lY;G.exports.BalancedPool=uY;G.exports.Agent=EY;G.exports.ProxyAgent=IY;G.exports.RetryHandler=BY;G.exports.DecoratorHandler=mY;G.exports.RedirectHandler=yY;G.exports.createRedirectInterceptor=wY;G.exports.buildConnector=hY;G.exports.errors=DR;function Co(e){return(A,t,r)=>{if(typeof t=="function"&&(r=t,t=null),!A||typeof A!="string"&&typeof A!="object"&&!(A instanceof URL))throw new Ug("invalid url");if(t!=null&&typeof t!="object")throw new Ug("invalid opts");if(t&&t.path!=null){if(typeof t.path!="string")throw new Ug("invalid opts.path");let s=t.path;t.path.startsWith("/")||(s=`/${s}`),A=new URL(ln.parseOrigin(A).origin+s)}else t||(t=typeof A=="object"?A:{}),A=ln.parseURL(A);let{agent:n,dispatcher:i=bR()}=t;if(n)throw new Ug("unsupported opts.agent. Did you mean opts.client?");return e.call(i,{...t,origin:A.origin,path:A.search?`${A.pathname}${A.search}`:A.pathname,method:t.method||(t.body?"PUT":"GET")},r)}}G.exports.setGlobalDispatcher=pY;G.exports.getGlobalDispatcher=bR;if(ln.nodeMajor>16||ln.nodeMajor===16&&ln.nodeMinor>=8){let e=null;G.exports.fetch=async function(s){e||(e=lg().fetch);try{return await e(...arguments)}catch(o){throw typeof o=="object"&&Error.captureStackTrace(o,this),o}},G.exports.Headers=tn().Headers,G.exports.Response=$c().Response,G.exports.Request=no().Request,G.exports.FormData=cc().FormData,G.exports.File=oc().File,G.exports.FileReader=y0().FileReader;let{setGlobalOrigin:A,getGlobalOrigin:t}=Xn();G.exports.setGlobalOrigin=A,G.exports.getGlobalOrigin=t;let{CacheStorage:r}=M0(),{kConstruct:n}=dg();G.exports.caches=new r(n)}if(ln.nodeMajor>=16){let{deleteCookie:e,getCookies:A,getSetCookies:t,setCookie:r}=_0();G.exports.deleteCookie=e,G.exports.getCookies=A,G.exports.getSetCookies=t,G.exports.setCookie=r;let{parseMIMEType:n,serializeAMimeType:i}=$A();G.exports.parseMIMEType=n,G.exports.serializeAMimeType=i}if(ln.nodeMajor>=18&&od){let{WebSocket:e}=wR();G.exports.WebSocket=e}G.exports.request=Co(Mi.request);G.exports.stream=Co(Mi.stream);G.exports.pipeline=Co(Mi.pipeline);G.exports.connect=Co(Mi.connect);G.exports.upgrade=Co(Mi.upgrade);G.exports.MockClient=dY;G.exports.MockPool=CY;G.exports.MockAgent=QY;G.exports.mockErrors=fY});var sV={};Wi(sV,{Debug:()=>Zg,Decimal:()=>ut,Extensions:()=>Wg,MetricsClient:()=>Yn,NotFoundError:()=>Pt,PrismaClientInitializationError:()=>z,PrismaClientKnownRequestError:()=>xe,PrismaClientRustPanicError:()=>JA,PrismaClientUnknownRequestError:()=>ve,PrismaClientValidationError:()=>Oe,Public:()=>_g,Sql:()=>dA,defineDmmfProperty:()=>Zf,deserializeJsonResponse:()=>Sn,dmmfToRuntimeDataModel:()=>Kf,empty:()=>eI,getPrismaClient:()=>DD,getRuntime:()=>xI,join:()=>$f,makeStrictEnum:()=>bD,makeTypedQueryFactory:()=>Xf,objectEnumValues:()=>Na,raw:()=>tu,serializeJsonQuery:()=>va,skip:()=>Ma,sqltag:()=>ru,warnEnvConflicts:()=>kD,warnOnce:()=>as});module.exports=MD(sV);var Wg={};Wi(Wg,{defineExtension:()=>bd,getExtensionContext:()=>kd});function bd(e){return typeof e=="function"?e:A=>A.$extends(e)}function kd(e){return e}var _g={};Wi(_g,{validator:()=>Sd});function Sd(...e){return A=>A}var vo={};Wi(vo,{$:()=>Ud,bgBlack:()=>WD,bgBlue:()=>ZD,bgCyan:()=>zD,bgGreen:()=>jD,bgMagenta:()=>XD,bgRed:()=>_D,bgWhite:()=>$D,bgYellow:()=>KD,black:()=>VD,blue:()=>Ut,bold:()=>Ve,cyan:()=>Tt,dim:()=>Ur,gray:()=>_i,green:()=>ir,grey:()=>HD,hidden:()=>JD,inverse:()=>GD,italic:()=>PD,magenta:()=>qD,red:()=>vA,reset:()=>vD,strikethrough:()=>YD,underline:()=>EA,white:()=>OD,yellow:()=>Lt});var jg,Fd,Nd,xd,Ld=!0;typeof process<"u"&&({FORCE_COLOR:jg,NODE_DISABLE_COLORS:Fd,NO_COLOR:Nd,TERM:xd}=process.env||{},Ld=process.stdout&&process.stdout.isTTY);var Ud={enabled:!Fd&&Nd==null&&xd!=="dumb"&&(jg!=null&&jg!=="0"||Ld)};function Ee(e,A){let t=new RegExp(`\\x1b\\[${A}m`,"g"),r=`\x1B[${e}m`,n=`\x1B[${A}m`;return function(i){return!Ud.enabled||i==null?i:r+(~(""+i).indexOf(n)?i.replace(t,n+r):i)+n}}var vD=Ee(0,0),Ve=Ee(1,22),Ur=Ee(2,22),PD=Ee(3,23),EA=Ee(4,24),GD=Ee(7,27),JD=Ee(8,28),YD=Ee(9,29),VD=Ee(30,39),vA=Ee(31,39),ir=Ee(32,39),Lt=Ee(33,39),Ut=Ee(34,39),qD=Ee(35,39),Tt=Ee(36,39),OD=Ee(37,39),_i=Ee(90,39),HD=Ee(90,39),WD=Ee(40,49),_D=Ee(41,49),jD=Ee(42,49),KD=Ee(43,49),ZD=Ee(44,49),XD=Ee(45,49),zD=Ee(46,49),$D=Ee(47,49);var eb=100,Td=["green","yellow","blue","magenta","cyan","red"],ji=[],Md=Date.now(),Ab=0,Kg=typeof process<"u"?process.env:{};globalThis.DEBUG??=Kg.DEBUG??"";globalThis.DEBUG_COLORS??=Kg.DEBUG_COLORS?Kg.DEBUG_COLORS==="true":!0;var Ki={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let A=globalThis.DEBUG.split(",").map(n=>n.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=A.some(n=>n===""||n[0]==="-"?!1:e.match(RegExp(n.split("*").join(".*")+"$"))),r=A.some(n=>n===""||n[0]!=="-"?!1:e.match(RegExp(n.slice(1).split("*").join(".*")+"$")));return t&&!r},log:(...e)=>{let[A,t,...r]=e;(console.warn??console.log)(`${A} ${t}`,...r)},formatters:{}};function tb(e){let A={color:Td[Ab++%Td.length],enabled:Ki.enabled(e),namespace:e,log:Ki.log,extend:()=>{}},t=(...r)=>{let{enabled:n,namespace:i,color:s,log:o}=A;if(r.length!==0&&ji.push([i,...r]),ji.length>eb&&ji.shift(),Ki.enabled(i)||n){let a=r.map(g=>typeof g=="string"?g:rb(g)),c=`+${Date.now()-Md}ms`;Md=Date.now(),globalThis.DEBUG_COLORS?o(vo[s](Ve(i)),...a,vo[s](c)):o(i,...a,c)}};return new Proxy(t,{get:(r,n)=>A[n],set:(r,n,i)=>A[n]=i})}var Zg=new Proxy(tb,{get:(e,A)=>Ki[A],set:(e,A,t)=>Ki[A]=t});function rb(e,A=2){let t=new Set;return JSON.stringify(e,(r,n)=>{if(typeof n=="object"&&n!==null){if(t.has(n))return"[Circular *]";t.add(n)}else if(typeof n=="bigint")return n.toString();return n},A)}function vd(e=7500){let A=ji.map(([t,...r])=>`${t} ${r.map(n=>typeof n=="string"?n:JSON.stringify(n)).join(" ")}`).join(` +`);return A.length!!(e&&typeof e=="object"),Jo=e=>e&&!!e[Mt],ct=(e,A,t)=>{if(Jo(e)){let r=e[Mt](),{matched:n,selections:i}=r.match(A);return n&&i&&Object.keys(i).forEach(s=>t(s,i[s])),n}if(zg(e)){if(!zg(A))return!1;if(Array.isArray(e)){if(!Array.isArray(A))return!1;let r=[],n=[],i=[];for(let s of e.keys()){let o=e[s];Jo(o)&&o[nb]?i.push(o):i.length?n.push(o):r.push(o)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(A.lengthct(c,s[g],t))&&n.every((c,g)=>ct(c,o[g],t))&&(i.length===0||ct(i[0],a,t))}return e.length===A.length&&e.every((s,o)=>ct(s,A[o],t))}return Object.keys(e).every(r=>{let n=e[r];return(r in A||Jo(i=n)&&i[Mt]().matcherType==="optional")&&ct(n,A[r],t);var i})}return Object.is(A,e)},gr=e=>{var A,t,r;return zg(e)?Jo(e)?(A=(t=(r=e[Mt]()).getSelectionKeys)==null?void 0:t.call(r))!=null?A:[]:Array.isArray(e)?Zi(e,gr):Zi(Object.values(e),gr):[]},Zi=(e,A)=>e.reduce((t,r)=>t.concat(A(r)),[]);function PA(e){return Object.assign(e,{optional:()=>ib(e),and:A=>ye(e,A),or:A=>sb(e,A),select:A=>A===void 0?Gd(e):Gd(A,e)})}function ib(e){return PA({[Mt]:()=>({match:A=>{let t={},r=(n,i)=>{t[n]=i};return A===void 0?(gr(e).forEach(n=>r(n,void 0)),{matched:!0,selections:t}):{matched:ct(e,A,r),selections:t}},getSelectionKeys:()=>gr(e),matcherType:"optional"})})}function ye(...e){return PA({[Mt]:()=>({match:A=>{let t={},r=(n,i)=>{t[n]=i};return{matched:e.every(n=>ct(n,A,r)),selections:t}},getSelectionKeys:()=>Zi(e,gr),matcherType:"and"})})}function sb(...e){return PA({[Mt]:()=>({match:A=>{let t={},r=(n,i)=>{t[n]=i};return Zi(e,gr).forEach(n=>r(n,void 0)),{matched:e.some(n=>ct(n,A,r)),selections:t}},getSelectionKeys:()=>Zi(e,gr),matcherType:"or"})})}function X(e){return{[Mt]:()=>({match:A=>({matched:!!e(A)})})}}function Gd(...e){let A=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return PA({[Mt]:()=>({match:r=>{let n={[A??Yo]:r};return{matched:t===void 0||ct(t,r,(i,s)=>{n[i]=s}),selections:n}},getSelectionKeys:()=>[A??Yo].concat(t===void 0?[]:gr(t))})})}function ot(e){return typeof e=="number"}function sr(e){return typeof e=="string"}function or(e){return typeof e=="bigint"}var fV=PA(X(function(e){return!0}));var ar=e=>Object.assign(PA(e),{startsWith:A=>{return ar(ye(e,(t=A,X(r=>sr(r)&&r.startsWith(t)))));var t},endsWith:A=>{return ar(ye(e,(t=A,X(r=>sr(r)&&r.endsWith(t)))));var t},minLength:A=>ar(ye(e,(t=>X(r=>sr(r)&&r.length>=t))(A))),length:A=>ar(ye(e,(t=>X(r=>sr(r)&&r.length===t))(A))),maxLength:A=>ar(ye(e,(t=>X(r=>sr(r)&&r.length<=t))(A))),includes:A=>{return ar(ye(e,(t=A,X(r=>sr(r)&&r.includes(t)))));var t},regex:A=>{return ar(ye(e,(t=A,X(r=>sr(r)&&!!r.match(t)))));var t}}),IV=ar(X(sr)),at=e=>Object.assign(PA(e),{between:(A,t)=>at(ye(e,((r,n)=>X(i=>ot(i)&&r<=i&&n>=i))(A,t))),lt:A=>at(ye(e,(t=>X(r=>ot(r)&&rat(ye(e,(t=>X(r=>ot(r)&&r>t))(A))),lte:A=>at(ye(e,(t=>X(r=>ot(r)&&r<=t))(A))),gte:A=>at(ye(e,(t=>X(r=>ot(r)&&r>=t))(A))),int:()=>at(ye(e,X(A=>ot(A)&&Number.isInteger(A)))),finite:()=>at(ye(e,X(A=>ot(A)&&Number.isFinite(A)))),positive:()=>at(ye(e,X(A=>ot(A)&&A>0))),negative:()=>at(ye(e,X(A=>ot(A)&&A<0)))}),BV=at(X(ot)),cr=e=>Object.assign(PA(e),{between:(A,t)=>cr(ye(e,((r,n)=>X(i=>or(i)&&r<=i&&n>=i))(A,t))),lt:A=>cr(ye(e,(t=>X(r=>or(r)&&rcr(ye(e,(t=>X(r=>or(r)&&r>t))(A))),lte:A=>cr(ye(e,(t=>X(r=>or(r)&&r<=t))(A))),gte:A=>cr(ye(e,(t=>X(r=>or(r)&&r>=t))(A))),positive:()=>cr(ye(e,X(A=>or(A)&&A>0))),negative:()=>cr(ye(e,X(A=>or(A)&&A<0)))}),pV=cr(X(or)),mV=PA(X(function(e){return typeof e=="boolean"})),yV=PA(X(function(e){return typeof e=="symbol"})),wV=PA(X(function(e){return e==null})),RV=PA(X(function(e){return e!=null}));var $g={matched:!1,value:void 0};function Vo(e){return new el(e,$g)}var el=class e{constructor(A,t){this.input=void 0,this.state=void 0,this.input=A,this.state=t}with(...A){if(this.state.matched)return this;let t=A[A.length-1],r=[A[0]],n;A.length===3&&typeof A[1]=="function"?n=A[1]:A.length>2&&r.push(...A.slice(1,A.length-1));let i=!1,s={},o=(c,g)=>{i=!0,s[c]=g},a=!r.some(c=>ct(c,this.input,o))||n&&!n(this.input)?$g:{matched:!0,value:t(i?Yo in s?s[Yo]:s:this.input,this.input)};return new e(this.input,a)}when(A,t){if(this.state.matched)return this;let r=!!A(this.input);return new e(this.input,r?{matched:!0,value:t(this.input,this.input)}:$g)}otherwise(A){return this.state.matched?this.state.value:A(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let A;try{A=JSON.stringify(this.input)}catch{A=this.input}throw new Error(`Pattern matching error: no pattern matches value ${A}`)}run(){return this.exhaustive()}returnType(){return this}};var qd=require("util");var ob={warn:Lt("prisma:warn")},ab={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function qo(e,...A){ab.warn()&&console.warn(`${ob.warn} ${e}`,...A)}var cb=(0,qd.promisify)(Vd.default.exec),rA=ie("prisma:get-platform"),gb=["1.0.x","1.1.x","3.0.x"];async function Od(){let e=Ho.default.platform(),A=process.arch;if(e==="freebsd"){let s=await Wo("freebsd-version");if(s&&s.trim().length>0){let a=/^(\d+)\.?/.exec(s);if(a)return{platform:"freebsd",targetDistro:`freebsd${a[1]}`,arch:A}}}if(e!=="linux")return{platform:e,arch:A};let t=await ub(),r=await pb(),n=hb({arch:A,archFromUname:r,familyDistro:t.familyDistro}),{libssl:i}=await db(n);return{platform:"linux",libssl:i,arch:A,archFromUname:r,...t}}function lb(e){let A=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,r=A.exec(e),n=r&&r[1]&&r[1].toLowerCase()||"",i=t.exec(e),s=i&&i[1]&&i[1].toLowerCase()||"",o=Vo({id:n,idLike:s}).with({id:"alpine"},({id:a})=>({targetDistro:"musl",familyDistro:a,originalDistro:a})).with({id:"raspbian"},({id:a})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:a})).with({id:"nixos"},({id:a})=>({targetDistro:"nixos",originalDistro:a,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:a})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:a})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:a})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:a})).when(({idLike:a})=>a.includes("debian")||a.includes("ubuntu"),({id:a})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:a})).when(({idLike:a})=>n==="arch"||a.includes("arch"),({id:a})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:a})).when(({idLike:a})=>a.includes("centos")||a.includes("fedora")||a.includes("rhel")||a.includes("suse"),({id:a})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:a})).otherwise(({id:a})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:a}));return rA(`Found distro info: +${JSON.stringify(o,null,2)}`),o}async function ub(){let e="/etc/os-release";try{let A=await Al.default.readFile(e,{encoding:"utf-8"});return lb(A)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Eb(e){let A=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(A){let t=`${A[1]}.x`;return Hd(t)}}function Jd(e){let A=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(A){let t=`${A[1]}${A[2]??".0"}.x`;return Hd(t)}}function Hd(e){let A=(()=>{if(Wd(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(gb.includes(A))return A}function hb(e){return Vo(e).with({familyDistro:"musl"},()=>(rA('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:A})=>(rA('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${A}-linux-gnu`,`/lib/${A}-linux-gnu`])).with({familyDistro:"rhel"},()=>(rA('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:A,arch:t,archFromUname:r})=>(rA(`Don't know any platform-specific paths for "${A}" on ${t} (${r})`),[]))}async function db(e){let A='grep -v "libssl.so.0"',t=await Yd(e);if(t){rA(`Found libssl.so file using platform-specific paths: ${t}`);let i=Jd(t);if(rA(`The parsed libssl version is: ${i}`),i)return{libssl:i,strategy:"libssl-specific-path"}}rA('Falling back to "ldconfig" and other generic paths');let r=await Wo(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${A}`);if(r||(r=await Yd(["/lib64","/usr/lib64","/lib"])),r){rA(`Found libssl.so file using "ldconfig" or other generic paths: ${r}`);let i=Jd(r);if(rA(`The parsed libssl version is: ${i}`),i)return{libssl:i,strategy:"ldconfig"}}let n=await Wo("openssl version -v");if(n){rA(`Found openssl binary with version: ${n}`);let i=Eb(n);if(rA(`The parsed openssl version is: ${i}`),i)return{libssl:i,strategy:"openssl-binary"}}return rA("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Yd(e){for(let A of e){let t=await Qb(A);if(t)return t}}async function Qb(e){try{return(await Al.default.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(A){if(A.code==="ENOENT")return;throw A}}async function Tr(){let{binaryTarget:e}=await fb();return e}function Cb(e){return e.binaryTarget!==void 0}var Oo={};async function fb(){if(Cb(Oo))return Promise.resolve({...Oo,memoized:!0});let e=await Od(),A=Ib(e);return Oo={...e,binaryTarget:A},{...Oo,memoized:!1}}function Ib(e){let{platform:A,arch:t,archFromUname:r,libssl:n,targetDistro:i,familyDistro:s,originalDistro:o}=e;A==="linux"&&!["x64","arm64"].includes(t)&&qo(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" 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 "${r}".`);let a="1.1.x";if(A==="linux"&&n===void 0){let g=Vo({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.");qo(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${a}". +${g}`)}let c="debian";if(A==="linux"&&i===void 0&&rA(`Distro is "${o}". Falling back to Prisma engines built for "${c}".`),A==="darwin"&&t==="arm64")return"darwin-arm64";if(A==="darwin")return"darwin";if(A==="win32")return"windows";if(A==="freebsd")return i;if(A==="openbsd")return"openbsd";if(A==="netbsd")return"netbsd";if(A==="linux"&&i==="nixos")return"linux-nixos";if(A==="linux"&&t==="arm64")return`${i==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${n||a}`;if(A==="linux"&&t==="arm")return`linux-arm-openssl-${n||a}`;if(A==="linux"&&i==="musl"){let g="linux-musl";return!n||Wd(n)?g:`${g}-openssl-${n}`}return A==="linux"&&i&&n?`${i}-openssl-${n}`:(A!=="linux"&&qo(`Prisma detected unknown OS "${A}" and may not work as expected. Defaulting to "linux".`),n?`${c}-openssl-${n}`:i?`${i}-openssl-${a}`:`${c}-openssl-${a}`)}async function Bb(e){try{return await e()}catch{return}}function Wo(e){return Bb(async()=>{let A=await cb(e);return rA(`Command "${e}" successfully returned "${A.stdout}"`),A.stdout})}async function pb(){return typeof Ho.default.machine=="function"?Ho.default.machine():(await Wo("uname -m"))?.trim()}function Wd(e){return e.startsWith("1.")}var pS=Z(yl());var he=Z(require("path")),mS=Z(yl()),Uq=ie("prisma:engines");function MC(){return he.default.join(__dirname,"../")}var Tq="libquery-engine";he.default.join(__dirname,"../query-engine-darwin");he.default.join(__dirname,"../query-engine-darwin-arm64");he.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");he.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");he.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");he.default.join(__dirname,"../query-engine-linux-static-x64");he.default.join(__dirname,"../query-engine-linux-static-arm64");he.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");he.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");he.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");he.default.join(__dirname,"../libquery_engine-darwin.dylib.node");he.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");he.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");he.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");he.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");he.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");he.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");he.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");he.default.join(__dirname,"../libquery_engine-linux-musl.so.node");he.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");he.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");he.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");he.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");he.default.join(__dirname,"../query_engine-windows.dll.node");var wl=Z(require("fs")),vC=ie("chmodPlusX");function Rl(e){if(process.platform==="win32")return;let A=wl.default.statSync(e),t=A.mode|64|8|1;if(A.mode===t){vC(`Execution permissions of ${e} are fine`);return}let r=t.toString(8).slice(-3);vC(`Have to call chmodPlusX on ${e}`),wl.default.chmodSync(e,r)}var kl=Z(JC()),la=Z(require("fs"));var Rn=Z(require("path"));function YC(e){let A=e.ignoreProcessEnv?{}:process.env,t=r=>r.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(i,s){let o=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!o)return i;let a=o[1],c,g;if(a==="\\")g=o[0],c=g.replace("\\$","$");else{let l=o[2];g=o[0].substring(a.length),c=Object.hasOwnProperty.call(A,l)?A[l]:e.parsed[l]||"",c=t(c)}return i.replace(g,c)},r)??r;for(let r in e.parsed){let n=Object.hasOwnProperty.call(A,r)?A[r]:e.parsed[r];e.parsed[r]=t(n)}for(let r in e.parsed)A[r]=e.parsed[r];return e}var bl=ie("prisma:tryLoadEnv");function ts({rootEnvPath:e,schemaEnvPath:A},t={conflictCheck:"none"}){let r=VC(e);t.conflictCheck!=="none"&&xS(r,A,t.conflictCheck);let n=null;return qC(r?.path,A)||(n=VC(A)),!r&&!n&&bl("No Environment variables loaded"),n?.dotenvResult.error?console.error(vA(Ve("Schema Env Error: "))+n.dotenvResult.error):{message:[r?.message,n?.message].filter(Boolean).join(` +`),parsed:{...r?.dotenvResult?.parsed,...n?.dotenvResult?.parsed}}}function xS(e,A,t){let r=e?.dotenvResult.parsed,n=!qC(e?.path,A);if(r&&A&&n&&la.default.existsSync(A)){let i=kl.default.parse(la.default.readFileSync(A)),s=[];for(let o in i)r[o]===i[o]&&s.push(o);if(s.length>0){let o=Rn.default.relative(process.cwd(),e.path),a=Rn.default.relative(process.cwd(),A);if(t==="error"){let c=`There is a conflict between env var${s.length>1?"s":""} in ${EA(o)} and ${EA(a)} +Conflicting env vars: +${s.map(g=>` ${Ve(g)}`).join(` +`)} + +We suggest to move the contents of ${EA(a)} to ${EA(o)} to consolidate your env vars. +`;throw new Error(c)}else if(t==="warn"){let c=`Conflict for env var${s.length>1?"s":""} ${s.map(g=>Ve(g)).join(", ")} in ${EA(o)} and ${EA(a)} +Env vars from ${EA(a)} overwrite the ones from ${EA(o)} + `;console.warn(`${Lt("warn(prisma)")} ${c}`)}}}}function VC(e){if(LS(e)){bl(`Environment variables loaded from ${e}`);let A=kl.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:YC(A),message:Ur(`Environment variables loaded from ${Rn.default.relative(process.cwd(),e)}`),path:e}}else bl(`Environment variables not found at ${e}`);return null}function qC(e,A){return e&&A&&Rn.default.resolve(e)===Rn.default.resolve(A)}function LS(e){return!!(e&&la.default.existsSync(e))}var OC="library";function rs(e){let A=US();return A||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":OC)}function US(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var lr;(A=>{let e;(m=>(m.findUnique="findUnique",m.findUniqueOrThrow="findUniqueOrThrow",m.findFirst="findFirst",m.findFirstOrThrow="findFirstOrThrow",m.findMany="findMany",m.create="create",m.createMany="createMany",m.createManyAndReturn="createManyAndReturn",m.update="update",m.updateMany="updateMany",m.upsert="upsert",m.delete="delete",m.deleteMany="deleteMany",m.groupBy="groupBy",m.count="count",m.aggregate="aggregate",m.findRaw="findRaw",m.aggregateRaw="aggregateRaw"))(e=A.ModelAction||={})})(lr||={});var ns=Z(require("path"));function Sl(e){return ns.default.sep===ns.default.posix.sep?e:e.split(ns.default.sep).join(ns.default.posix.sep)}var ZC=Z(Fl());function xl(e){return String(new Nl(e))}var Nl=class{constructor(A){this.config=A}toString(){let{config:A}=this,t=A.provider.fromEnvVar?`env("${A.provider.fromEnvVar}")`:A.provider.value,r=JSON.parse(JSON.stringify({provider:t,binaryTargets:MS(A.binaryTargets)}));return`generator ${A.name} { +${(0,ZC.default)(vS(r),2)} +}`}};function MS(e){let A;if(e.length>0){let t=e.find(r=>r.fromEnvVar!==null);t?A=`env("${t.fromEnvVar}")`:A=e.map(r=>r.native?"native":r.value)}else A=void 0;return A}function vS(e){let A=Object.keys(e).reduce((t,r)=>Math.max(t,r.length),0);return Object.entries(e).map(([t,r])=>`${t.padEnd(A)} = ${PS(r)}`).join(` +`)}function PS(e){return JSON.parse(JSON.stringify(e,(A,t)=>Array.isArray(t)?`[${t.map(r=>JSON.stringify(r)).join(", ")}]`:JSON.stringify(t)))}var ss={};Wi(ss,{error:()=>YS,info:()=>JS,log:()=>GS,query:()=>VS,should:()=>XC,tags:()=>is,warn:()=>Ll});var is={error:vA("prisma:error"),warn:Lt("prisma:warn"),info:Tt("prisma:info"),query:Ut("prisma:query")},XC={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function GS(...e){console.log(...e)}function Ll(e,...A){XC.warn()&&console.warn(`${is.warn} ${e}`,...A)}function JS(e,...A){console.info(`${is.info} ${e}`,...A)}function YS(e,...A){console.error(`${is.error} ${e}`,...A)}function VS(e,...A){console.log(`${is.query} ${e}`,...A)}function vt(e,A){throw new Error(A)}var ua=Z(require("stream")),Af=Z(require("util"));function os(e,A){return OS(e,A)}function OS(e,A){return e?HS(e,A):new Gr(A)}function HS(e,A){if(!e)throw new Error("expected readStream");if(!e.readable)throw new Error("readStream must be readable");let t=new Gr(A);return e.pipe(t),t}function Gr(e){ua.default.Transform.call(this,e),e=e||{},this._readableState.objectMode=!0,this._lineBuffer=[],this._keepEmptyLines=e.keepEmptyLines||!1,this._lastChunkEndedWithCR=!1,this.on("pipe",function(A){this.encoding||A instanceof ua.default.Readable&&(this.encoding=A._readableState.encoding)})}Af.default.inherits(Gr,ua.default.Transform);Gr.prototype._transform=function(e,A,t){A=A||"utf8",Buffer.isBuffer(e)&&(A=="buffer"?(e=e.toString(),A="utf8"):e=e.toString(A)),this._chunkEncoding=A;let r=e.split(/\r\n|\r|\n/g);this._lastChunkEndedWithCR&&e[0]==` +`&&r.shift(),this._lineBuffer.length>0&&(this._lineBuffer[this._lineBuffer.length-1]+=r[0],r.shift()),this._lastChunkEndedWithCR=e[e.length-1]=="\r",this._lineBuffer=this._lineBuffer.concat(r),this._pushBuffer(A,1,t)};Gr.prototype._pushBuffer=function(e,A,t){for(;this._lineBuffer.length>A;){let r=this._lineBuffer.shift();if((this._keepEmptyLines||r.length>0)&&!this.push(this._reencode(r,e))){let n=this;setImmediate(function(){n._pushBuffer(e,A,t)});return}}t()};Gr.prototype._flush=function(e){this._pushBuffer(this._chunkEncoding,0,e)};Gr.prototype._reencode=function(e,A){return this.encoding&&this.encoding!=A?Buffer.from(e,A).toString(this.encoding):this.encoding?e:Buffer.from(e,A)};function Tl(e,A){return Object.prototype.hasOwnProperty.call(e,A)}var Ml=(e,A)=>e.reduce((t,r)=>(t[A(r)]=r,t),{});function Dn(e,A){let t={};for(let r of Object.keys(e))t[r]=A(e[r],r);return t}function vl(e,A){if(e.length===0)return;let t=e[0];for(let r=1;r{rf.has(e)||(rf.add(e),Ll(A,...t))};var xe=class extends Error{constructor(A,{code:t,clientVersion:r,meta:n,batchRequestIdx:i}){super(A),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=r,this.meta=n,Object.defineProperty(this,"batchRequestIdx",{value:i,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};L(xe,"PrismaClientKnownRequestError");var Pt=class extends xe{constructor(A,t){super(A,{code:"P2025",clientVersion:t}),this.name="NotFoundError"}};L(Pt,"NotFoundError");var z=class e extends Error{constructor(A,t,r){super(A),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=r,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};L(z,"PrismaClientInitializationError");var JA=class extends Error{constructor(A,t){super(A),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};L(JA,"PrismaClientRustPanicError");var ve=class extends Error{constructor(A,{clientVersion:t,batchRequestIdx:r}){super(A),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:r,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};L(ve,"PrismaClientUnknownRequestError");var Oe=class extends Error{constructor(t,{clientVersion:r}){super(t);this.name="PrismaClientValidationError";this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};L(Oe,"PrismaClientValidationError");var bn=9e15,dr=1e9,Pl="0123456789abcdef",Qa="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Ca="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gl={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-bn,maxE:bn,crypto:!1},af,Gt,T=!0,Ia="[DecimalError] ",hr=Ia+"Invalid argument: ",cf=Ia+"Precision limit exceeded",gf=Ia+"crypto unavailable",lf="[object Decimal]",ze=Math.floor,Pe=Math.pow,WS=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_S=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,jS=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uf=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ZA=1e7,x=7,KS=9007199254740991,ZS=Qa.length-1,Jl=Ca.length-1,B={toStringTag:lf};B.absoluteValue=B.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),b(e)};B.ceil=function(){return b(new this.constructor(this),this.e+1,2)};B.clampedTo=B.clamp=function(e,A){var t,r=this,n=r.constructor;if(e=new n(e),A=new n(A),!e.s||!A.s)return new n(NaN);if(e.gt(A))throw Error(hr+A);return t=r.cmp(e),t<0?e:r.cmp(A)>0?A:new n(r)};B.comparedTo=B.cmp=function(e){var A,t,r,n,i=this,s=i.d,o=(e=new i.constructor(e)).d,a=i.s,c=e.s;if(!s||!o)return!a||!c?NaN:a!==c?a:s===o?0:!s^a<0?1:-1;if(!s[0]||!o[0])return s[0]?a:o[0]?-c:0;if(a!==c)return a;if(i.e!==e.e)return i.e>e.e^a<0?1:-1;for(r=s.length,n=o.length,A=0,t=ro[A]^a<0?1:-1;return r===n?0:r>n^a<0?1:-1};B.cosine=B.cos=function(){var e,A,t=this,r=t.constructor;return t.d?t.d[0]?(e=r.precision,A=r.rounding,r.precision=e+Math.max(t.e,t.sd())+x,r.rounding=1,t=XS(r,Cf(r,t)),r.precision=e,r.rounding=A,b(Gt==2||Gt==3?t.neg():t,e,A,!0)):new r(1):new r(NaN)};B.cubeRoot=B.cbrt=function(){var e,A,t,r,n,i,s,o,a,c,g=this,l=g.constructor;if(!g.isFinite()||g.isZero())return new l(g);for(T=!1,i=g.s*Pe(g.s*g,1/3),!i||Math.abs(i)==1/0?(t=_e(g.d),e=g.e,(i=(e-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=Pe(t,1/3),e=ze((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t),r.s=g.s):r=new l(i.toString()),s=(e=l.precision)+3;;)if(o=r,a=o.times(o).times(o),c=a.plus(g),r=ge(c.plus(g).times(o),c.plus(a),s+2,1),_e(o.d).slice(0,s)===(t=_e(r.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!n&&t=="4999"){if(!n&&(b(o,e+1,0),o.times(o).times(o).eq(g))){r=o;break}s+=4,n=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(b(r,e+1,1),A=!r.times(r).times(r).eq(g));break}return T=!0,b(r,e,l.rounding,A)};B.decimalPlaces=B.dp=function(){var e,A=this.d,t=NaN;if(A){if(e=A.length-1,t=(e-ze(this.e/x))*x,e=A[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};B.dividedBy=B.div=function(e){return ge(this,new this.constructor(e))};B.dividedToIntegerBy=B.divToInt=function(e){var A=this,t=A.constructor;return b(ge(A,new t(e),0,1,1),t.precision,t.rounding)};B.equals=B.eq=function(e){return this.cmp(e)===0};B.floor=function(){return b(new this.constructor(this),this.e+1,3)};B.greaterThan=B.gt=function(e){return this.cmp(e)>0};B.greaterThanOrEqualTo=B.gte=function(e){var A=this.cmp(e);return A==1||A===0};B.hyperbolicCosine=B.cosh=function(){var e,A,t,r,n,i=this,s=i.constructor,o=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return o;t=s.precision,r=s.rounding,s.precision=t+Math.max(i.e,i.sd())+4,s.rounding=1,n=i.d.length,n<32?(e=Math.ceil(n/3),A=(1/pa(4,e)).toString()):(e=16,A="2.3283064365386962890625e-10"),i=kn(s,1,i.times(A),new s(1),!0);for(var a,c=e,g=new s(8);c--;)a=i.times(i),i=o.minus(a.times(g.minus(a.times(g))));return b(i,s.precision=t,s.rounding=r,!0)};B.hyperbolicSine=B.sinh=function(){var e,A,t,r,n=this,i=n.constructor;if(!n.isFinite()||n.isZero())return new i(n);if(A=i.precision,t=i.rounding,i.precision=A+Math.max(n.e,n.sd())+4,i.rounding=1,r=n.d.length,r<3)n=kn(i,2,n,n,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,n=n.times(1/pa(5,e)),n=kn(i,2,n,n,!0);for(var s,o=new i(5),a=new i(16),c=new i(20);e--;)s=n.times(n),n=n.times(o.plus(s.times(a.times(s).plus(c))))}return i.precision=A,i.rounding=t,b(n,A,t,!0)};B.hyperbolicTangent=B.tanh=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+7,r.rounding=1,ge(t.sinh(),t.cosh(),r.precision=e,r.rounding=A)):new r(t.s)};B.inverseCosine=B.acos=function(){var e,A=this,t=A.constructor,r=A.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?A.isNeg()?KA(t,n,i):new t(0):new t(NaN):A.isZero()?KA(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,A=A.asin(),e=KA(t,n+4,i).times(.5),t.precision=n,t.rounding=i,e.minus(A))};B.inverseHyperbolicCosine=B.acosh=function(){var e,A,t=this,r=t.constructor;return t.lte(1)?new r(t.eq(1)?0:NaN):t.isFinite()?(e=r.precision,A=r.rounding,r.precision=e+Math.max(Math.abs(t.e),t.sd())+4,r.rounding=1,T=!1,t=t.times(t).minus(1).sqrt().plus(t),T=!0,r.precision=e,r.rounding=A,t.ln()):new r(t)};B.inverseHyperbolicSine=B.asinh=function(){var e,A,t=this,r=t.constructor;return!t.isFinite()||t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,r.rounding=1,T=!1,t=t.times(t).plus(1).sqrt().plus(t),T=!0,r.precision=e,r.rounding=A,t.ln())};B.inverseHyperbolicTangent=B.atanh=function(){var e,A,t,r,n=this,i=n.constructor;return n.isFinite()?n.e>=0?new i(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=i.precision,A=i.rounding,r=n.sd(),Math.max(r,e)<2*-n.e-1?b(new i(n),e,A,!0):(i.precision=t=r-n.e,n=ge(n.plus(1),new i(1).minus(n),t+e,1),i.precision=e+4,i.rounding=1,n=n.ln(),i.precision=e,i.rounding=A,n.times(.5))):new i(NaN)};B.inverseSine=B.asin=function(){var e,A,t,r,n=this,i=n.constructor;return n.isZero()?new i(n):(A=n.abs().cmp(1),t=i.precision,r=i.rounding,A!==-1?A===0?(e=KA(i,t+4,r).times(.5),e.s=n.s,e):new i(NaN):(i.precision=t+6,i.rounding=1,n=n.div(new i(1).minus(n.times(n)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=r,n.times(2)))};B.inverseTangent=B.atan=function(){var e,A,t,r,n,i,s,o,a,c=this,g=c.constructor,l=g.precision,u=g.rounding;if(c.isFinite()){if(c.isZero())return new g(c);if(c.abs().eq(1)&&l+4<=Jl)return s=KA(g,l+4,u).times(.25),s.s=c.s,s}else{if(!c.s)return new g(NaN);if(l+4<=Jl)return s=KA(g,l+4,u).times(.5),s.s=c.s,s}for(g.precision=o=l+10,g.rounding=1,t=Math.min(28,o/x+2|0),e=t;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(T=!1,A=Math.ceil(o/x),r=1,a=c.times(c),s=new g(c),n=c;e!==-1;)if(n=n.times(a),i=s.minus(n.div(r+=2)),n=n.times(a),s=i.plus(n.div(r+=2)),s.d[A]!==void 0)for(e=A;s.d[e]===i.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};B.isNaN=function(){return!this.s};B.isNegative=B.isNeg=function(){return this.s<0};B.isPositive=B.isPos=function(){return this.s>0};B.isZero=function(){return!!this.d&&this.d[0]===0};B.lessThan=B.lt=function(e){return this.cmp(e)<0};B.lessThanOrEqualTo=B.lte=function(e){return this.cmp(e)<1};B.logarithm=B.log=function(e){var A,t,r,n,i,s,o,a,c=this,g=c.constructor,l=g.precision,u=g.rounding,E=5;if(e==null)e=new g(10),A=!0;else{if(e=new g(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new g(NaN);A=e.eq(10)}if(t=c.d,c.s<0||!t||!t[0]||c.eq(1))return new g(t&&!t[0]?-1/0:c.s!=1?NaN:t?0:1/0);if(A)if(t.length>1)i=!0;else{for(n=t[0];n%10===0;)n/=10;i=n!==1}if(T=!1,o=l+E,s=Er(c,o),r=A?fa(g,o+10):Er(e,o),a=ge(s,r,o,1),cs(a.d,n=l,u))do if(o+=10,s=Er(c,o),r=A?fa(g,o+10):Er(e,o),a=ge(s,r,o,1),!i){+_e(a.d).slice(n+1,n+15)+1==1e14&&(a=b(a,l+1,0));break}while(cs(a.d,n+=10,u));return T=!0,b(a,l,u)};B.minus=B.sub=function(e){var A,t,r,n,i,s,o,a,c,g,l,u,E=this,h=E.constructor;if(e=new h(e),!E.d||!e.d)return!E.s||!e.s?e=new h(NaN):E.d?e.s=-e.s:e=new h(e.d||E.s!==e.s?E:NaN),e;if(E.s!=e.s)return e.s=-e.s,E.plus(e);if(c=E.d,u=e.d,o=h.precision,a=h.rounding,!c[0]||!u[0]){if(u[0])e.s=-e.s;else if(c[0])e=new h(E);else return new h(a===3?-0:0);return T?b(e,o,a):e}if(t=ze(e.e/x),g=ze(E.e/x),c=c.slice(),i=g-t,i){for(l=i<0,l?(A=c,i=-i,s=u.length):(A=u,t=g,s=c.length),r=Math.max(Math.ceil(o/x),s)+2,i>r&&(i=r,A.length=1),A.reverse(),r=i;r--;)A.push(0);A.reverse()}else{for(r=c.length,s=u.length,l=r0;--r)c[s++]=0;for(r=u.length;r>i;){if(c[--r]s?i+1:s+1,n>s&&(n=s,t.length=1),t.reverse();n--;)t.push(0);t.reverse()}for(s=c.length,n=g.length,s-n<0&&(n=s,t=g,g=c,c=t),A=0;n;)A=(c[--n]=c[n]+g[n]+A)/ZA|0,c[n]%=ZA;for(A&&(c.unshift(A),++r),s=c.length;c[--s]==0;)c.pop();return e.d=c,e.e=Ba(c,r),T?b(e,o,a):e};B.precision=B.sd=function(e){var A,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(hr+e);return t.d?(A=Ef(t.d),e&&t.e+1>A&&(A=t.e+1)):A=NaN,A};B.round=function(){var e=this,A=e.constructor;return b(new A(e),e.e+1,A.rounding)};B.sine=B.sin=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+Math.max(t.e,t.sd())+x,r.rounding=1,t=$S(r,Cf(r,t)),r.precision=e,r.rounding=A,b(Gt>2?t.neg():t,e,A,!0)):new r(NaN)};B.squareRoot=B.sqrt=function(){var e,A,t,r,n,i,s=this,o=s.d,a=s.e,c=s.s,g=s.constructor;if(c!==1||!o||!o[0])return new g(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);for(T=!1,c=Math.sqrt(+s),c==0||c==1/0?(A=_e(o),(A.length+a)%2==0&&(A+="0"),c=Math.sqrt(A),a=ze((a+1)/2)-(a<0||a%2),c==1/0?A="5e"+a:(A=c.toExponential(),A=A.slice(0,A.indexOf("e")+1)+a),r=new g(A)):r=new g(c.toString()),t=(a=g.precision)+3;;)if(i=r,r=i.plus(ge(s,i,t+2,1)).times(.5),_e(i.d).slice(0,t)===(A=_e(r.d)).slice(0,t))if(A=A.slice(t-3,t+1),A=="9999"||!n&&A=="4999"){if(!n&&(b(i,a+1,0),i.times(i).eq(s))){r=i;break}t+=4,n=1}else{(!+A||!+A.slice(1)&&A.charAt(0)=="5")&&(b(r,a+1,1),e=!r.times(r).eq(s));break}return T=!0,b(r,a,g.rounding,e)};B.tangent=B.tan=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+10,r.rounding=1,t=t.sin(),t.s=1,t=ge(t,new r(1).minus(t.times(t)).sqrt(),e+10,0),r.precision=e,r.rounding=A,b(Gt==2||Gt==4?t.neg():t,e,A,!0)):new r(NaN)};B.times=B.mul=function(e){var A,t,r,n,i,s,o,a,c,g=this,l=g.constructor,u=g.d,E=(e=new l(e)).d;if(e.s*=g.s,!u||!u[0]||!E||!E[0])return new l(!e.s||u&&!u[0]&&!E||E&&!E[0]&&!u?NaN:!u||!E?e.s/0:e.s*0);for(t=ze(g.e/x)+ze(e.e/x),a=u.length,c=E.length,a=0;){for(A=0,n=a+r;n>r;)o=i[n]+E[r]*u[n-r-1]+A,i[n--]=o%ZA|0,A=o/ZA|0;i[n]=(i[n]+A)%ZA|0}for(;!i[--s];)i.pop();return A?++t:i.shift(),e.d=i,e.e=Ba(i,t),T?b(e,l.precision,l.rounding):e};B.toBinary=function(e,A){return ql(this,2,e,A)};B.toDecimalPlaces=B.toDP=function(e,A){var t=this,r=t.constructor;return t=new r(t),e===void 0?t:(hA(e,0,dr),A===void 0?A=r.rounding:hA(A,0,8),b(t,e+t.e+1,A))};B.toExponential=function(e,A){var t,r=this,n=r.constructor;return e===void 0?t=lt(r,!0):(hA(e,0,dr),A===void 0?A=n.rounding:hA(A,0,8),r=b(new n(r),e+1,A),t=lt(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+t:t};B.toFixed=function(e,A){var t,r,n=this,i=n.constructor;return e===void 0?t=lt(n):(hA(e,0,dr),A===void 0?A=i.rounding:hA(A,0,8),r=b(new i(n),e+n.e+1,A),t=lt(r,!1,e+r.e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};B.toFraction=function(e){var A,t,r,n,i,s,o,a,c,g,l,u,E=this,h=E.d,d=E.constructor;if(!h)return new d(E);if(c=t=new d(1),r=a=new d(0),A=new d(r),i=A.e=Ef(h)-E.e-1,s=i%x,A.d[0]=Pe(10,s<0?x+s:s),e==null)e=i>0?A:c;else{if(o=new d(e),!o.isInt()||o.lt(c))throw Error(hr+o);e=o.gt(A)?i>0?A:c:o}for(T=!1,o=new d(_e(h)),g=d.precision,d.precision=i=h.length*x*2;l=ge(o,A,0,1,1),n=t.plus(l.times(r)),n.cmp(e)!=1;)t=r,r=n,n=c,c=a.plus(l.times(n)),a=n,n=A,A=o.minus(l.times(n)),o=n;return n=ge(e.minus(t),r,0,1,1),a=a.plus(n.times(c)),t=t.plus(n.times(r)),a.s=c.s=E.s,u=ge(c,r,i,1).minus(E).abs().cmp(ge(a,t,i,1).minus(E).abs())<1?[c,r]:[a,t],d.precision=g,T=!0,u};B.toHexadecimal=B.toHex=function(e,A){return ql(this,16,e,A)};B.toNearest=function(e,A){var t=this,r=t.constructor;if(t=new r(t),e==null){if(!t.d)return t;e=new r(1),A=r.rounding}else{if(e=new r(e),A===void 0?A=r.rounding:hA(A,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(T=!1,t=ge(t,e,0,A,1).times(e),T=!0,b(t)):(e.s=t.s,t=e),t};B.toNumber=function(){return+this};B.toOctal=function(e,A){return ql(this,8,e,A)};B.toPower=B.pow=function(e){var A,t,r,n,i,s,o=this,a=o.constructor,c=+(e=new a(e));if(!o.d||!e.d||!o.d[0]||!e.d[0])return new a(Pe(+o,c));if(o=new a(o),o.eq(1))return o;if(r=a.precision,i=a.rounding,e.eq(1))return b(o,r,i);if(A=ze(e.e/x),A>=e.d.length-1&&(t=c<0?-c:c)<=KS)return n=hf(a,o,t,r),e.s<0?new a(1).div(n):b(n,r,i);if(s=o.s,s<0){if(Aa.maxE+1||A0?s/0:0):(T=!1,a.rounding=o.s=1,t=Math.min(12,(A+"").length),n=Yl(e.times(Er(o,r+t)),r),n.d&&(n=b(n,r+5,1),cs(n.d,r,i)&&(A=r+10,n=b(Yl(e.times(Er(o,A+t)),A),A+5,1),+_e(n.d).slice(r+1,r+15)+1==1e14&&(n=b(n,r+1,0)))),n.s=s,T=!0,a.rounding=i,b(n,r,i))};B.toPrecision=function(e,A){var t,r=this,n=r.constructor;return e===void 0?t=lt(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(hA(e,1,dr),A===void 0?A=n.rounding:hA(A,0,8),r=b(new n(r),e,A),t=lt(r,e<=r.e||r.e<=n.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+t:t};B.toSignificantDigits=B.toSD=function(e,A){var t=this,r=t.constructor;return e===void 0?(e=r.precision,A=r.rounding):(hA(e,1,dr),A===void 0?A=r.rounding:hA(A,0,8)),b(new r(t),e,A)};B.toString=function(){var e=this,A=e.constructor,t=lt(e,e.e<=A.toExpNeg||e.e>=A.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};B.truncated=B.trunc=function(){return b(new this.constructor(this),this.e+1,1)};B.valueOf=B.toJSON=function(){var e=this,A=e.constructor,t=lt(e,e.e<=A.toExpNeg||e.e>=A.toExpPos);return e.isNeg()?"-"+t:t};function _e(e){var A,t,r,n=e.length-1,i="",s=e[0];if(n>0){for(i+=s,A=1;At)throw Error(hr+e)}function cs(e,A,t,r){var n,i,s,o;for(i=e[0];i>=10;i/=10)--A;return--A<0?(A+=x,n=0):(n=Math.ceil((A+1)/x),A%=x),i=Pe(10,x-A),o=e[n]%i|0,r==null?A<3?(A==0?o=o/100|0:A==1&&(o=o/10|0),s=t<4&&o==99999||t>3&&o==49999||o==5e4||o==0):s=(t<4&&o+1==i||t>3&&o+1==i/2)&&(e[n+1]/i/100|0)==Pe(10,A-2)-1||(o==i/2||o==0)&&(e[n+1]/i/100|0)==0:A<4?(A==0?o=o/1e3|0:A==1?o=o/100|0:A==2&&(o=o/10|0),s=(r||t<4)&&o==9999||!r&&t>3&&o==4999):s=((r||t<4)&&o+1==i||!r&&t>3&&o+1==i/2)&&(e[n+1]/i/1e3|0)==Pe(10,A-3)-1,s}function da(e,A,t){for(var r,n=[0],i,s=0,o=e.length;st-1&&(n[r+1]===void 0&&(n[r+1]=0),n[r+1]+=n[r]/t|0,n[r]%=t)}return n.reverse()}function XS(e,A){var t,r,n;if(A.isZero())return A;r=A.d.length,r<32?(t=Math.ceil(r/3),n=(1/pa(4,t)).toString()):(t=16,n="2.3283064365386962890625e-10"),e.precision+=t,A=kn(e,1,A.times(n),new e(1));for(var i=t;i--;){var s=A.times(A);A=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,A}var ge=function(){function e(r,n,i){var s,o=0,a=r.length;for(r=r.slice();a--;)s=r[a]*n+o,r[a]=s%i|0,o=s/i|0;return o&&r.unshift(o),r}function A(r,n,i,s){var o,a;if(i!=s)a=i>s?1:-1;else for(o=a=0;on[o]?1:-1;break}return a}function t(r,n,i,s){for(var o=0;i--;)r[i]-=o,o=r[i]1;)r.shift()}return function(r,n,i,s,o,a){var c,g,l,u,E,h,d,C,I,p,w,m,K,H,ne,q,ae,De,ee,Y,ce=r.constructor,Je=r.s==n.s?1:-1,fe=r.d,P=n.d;if(!fe||!fe[0]||!P||!P[0])return new ce(!r.s||!n.s||(fe?P&&fe[0]==P[0]:!P)?NaN:fe&&fe[0]==0||!P?Je*0:Je/0);for(a?(E=1,g=r.e-n.e):(a=ZA,E=x,g=ze(r.e/E)-ze(n.e/E)),ee=P.length,ae=fe.length,I=new ce(Je),p=I.d=[],l=0;P[l]==(fe[l]||0);l++);if(P[l]>(fe[l]||0)&&g--,i==null?(H=i=ce.precision,s=ce.rounding):o?H=i+(r.e-n.e)+1:H=i,H<0)p.push(1),h=!0;else{if(H=H/E+2|0,l=0,ee==1){for(u=0,P=P[0],H++;(l1&&(P=e(P,u,a),fe=e(fe,u,a),ee=P.length,ae=fe.length),q=ee,w=fe.slice(0,ee),m=w.length;m=a/2&&++De;do u=0,c=A(P,w,ee,m),c<0?(K=w[0],ee!=m&&(K=K*a+(w[1]||0)),u=K/De|0,u>1?(u>=a&&(u=a-1),d=e(P,u,a),C=d.length,m=w.length,c=A(d,w,C,m),c==1&&(u--,t(d,ee=10;u/=10)l++;I.e=l+g*E-1,b(I,o?i+I.e+1:i,s,h)}return I}}();function b(e,A,t,r){var n,i,s,o,a,c,g,l,u,E=e.constructor;e:if(A!=null){if(l=e.d,!l)return e;for(n=1,o=l[0];o>=10;o/=10)n++;if(i=A-n,i<0)i+=x,s=A,g=l[u=0],a=g/Pe(10,n-s-1)%10|0;else if(u=Math.ceil((i+1)/x),o=l.length,u>=o)if(r){for(;o++<=u;)l.push(0);g=a=0,n=1,i%=x,s=i-x+1}else break e;else{for(g=o=l[u],n=1;o>=10;o/=10)n++;i%=x,s=i-x+n,a=s<0?0:g/Pe(10,n-s-1)%10|0}if(r=r||A<0||l[u+1]!==void 0||(s<0?g:g%Pe(10,n-s-1)),c=t<4?(a||r)&&(t==0||t==(e.s<0?3:2)):a>5||a==5&&(t==4||r||t==6&&(i>0?s>0?g/Pe(10,n-s):0:l[u-1])%10&1||t==(e.s<0?8:7)),A<1||!l[0])return l.length=0,c?(A-=e.e+1,l[0]=Pe(10,(x-A%x)%x),e.e=-A||0):l[0]=e.e=0,e;if(i==0?(l.length=u,o=1,u--):(l.length=u+1,o=Pe(10,x-i),l[u]=s>0?(g/Pe(10,n-s)%Pe(10,s)|0)*o:0),c)for(;;)if(u==0){for(i=1,s=l[0];s>=10;s/=10)i++;for(s=l[0]+=o,o=1;s>=10;s/=10)o++;i!=o&&(e.e++,l[0]==ZA&&(l[0]=1));break}else{if(l[u]+=o,l[u]!=ZA)break;l[u--]=0,o=1}for(i=l.length;l[--i]===0;)l.pop()}return T&&(e.e>E.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+ur(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):n<0?(i="0."+ur(-n-1)+i,t&&(r=t-s)>0&&(i+=ur(r))):n>=s?(i+=ur(n+1-s),t&&(r=t-n-1)>0&&(i=i+"."+ur(r))):((r=n+1)0&&(n+1===s&&(i+="."),i+=ur(r))),i}function Ba(e,A){var t=e[0];for(A*=x;t>=10;t/=10)A++;return A}function fa(e,A,t){if(A>ZS)throw T=!0,t&&(e.precision=t),Error(cf);return b(new e(Qa),A,1,!0)}function KA(e,A,t){if(A>Jl)throw Error(cf);return b(new e(Ca),A,t,!0)}function Ef(e){var A=e.length-1,t=A*x+1;if(A=e[A],A){for(;A%10==0;A/=10)t--;for(A=e[0];A>=10;A/=10)t++}return t}function ur(e){for(var A="";e--;)A+="0";return A}function hf(e,A,t,r){var n,i=new e(1),s=Math.ceil(r/x+4);for(T=!1;;){if(t%2&&(i=i.times(A),sf(i.d,s)&&(n=!0)),t=ze(t/2),t===0){t=i.d.length-1,n&&i.d[t]===0&&++i.d[t];break}A=A.times(A),sf(A.d,s)}return T=!0,i}function nf(e){return e.d[e.d.length-1]&1}function df(e,A,t){for(var r,n=new e(A[0]),i=0;++i17)return new u(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(A==null?(T=!1,a=h):a=A,o=new u(.03125);e.e>-2;)e=e.times(o),l+=5;for(r=Math.log(Pe(2,l))/Math.LN10*2+5|0,a+=r,t=i=s=new u(1),u.precision=a;;){if(i=b(i.times(e),a,1),t=t.times(++g),o=s.plus(ge(i,t,a,1)),_e(o.d).slice(0,a)===_e(s.d).slice(0,a)){for(n=l;n--;)s=b(s.times(s),a,1);if(A==null)if(c<3&&cs(s.d,a-r,E,c))u.precision=a+=10,t=i=o=new u(1),g=0,c++;else return b(s,u.precision=h,E,T=!0);else return u.precision=h,s}s=o}}function Er(e,A){var t,r,n,i,s,o,a,c,g,l,u,E=1,h=10,d=e,C=d.d,I=d.constructor,p=I.rounding,w=I.precision;if(d.s<0||!C||!C[0]||!d.e&&C[0]==1&&C.length==1)return new I(C&&!C[0]?-1/0:d.s!=1?NaN:C?0:d);if(A==null?(T=!1,g=w):g=A,I.precision=g+=h,t=_e(C),r=t.charAt(0),Math.abs(i=d.e)<15e14){for(;r<7&&r!=1||r==1&&t.charAt(1)>3;)d=d.times(e),t=_e(d.d),r=t.charAt(0),E++;i=d.e,r>1?(d=new I("0."+t),i++):d=new I(r+"."+t.slice(1))}else return c=fa(I,g+2,w).times(i+""),d=Er(new I(r+"."+t.slice(1)),g-h).plus(c),I.precision=w,A==null?b(d,w,p,T=!0):d;for(l=d,a=s=d=ge(d.minus(1),d.plus(1),g,1),u=b(d.times(d),g,1),n=3;;){if(s=b(s.times(u),g,1),c=a.plus(ge(s,new I(n),g,1)),_e(c.d).slice(0,g)===_e(a.d).slice(0,g))if(a=a.times(2),i!==0&&(a=a.plus(fa(I,g+2,w).times(i+""))),a=ge(a,new I(E),g,1),A==null)if(cs(a.d,g-h,p,o))I.precision=g+=h,c=s=d=ge(l.minus(1),l.plus(1),g,1),u=b(d.times(d),g,1),n=o=1;else return b(a,I.precision=w,p,T=!0);else return I.precision=w,a;a=c,n+=2}}function Qf(e){return String(e.s*e.s/0)}function Vl(e,A){var t,r,n;for((t=A.indexOf("."))>-1&&(A=A.replace(".","")),(r=A.search(/e/i))>0?(t<0&&(t=r),t+=+A.slice(r+1),A=A.substring(0,r)):t<0&&(t=A.length),r=0;A.charCodeAt(r)===48;r++);for(n=A.length;A.charCodeAt(n-1)===48;--n);if(A=A.slice(r,n),A){if(n-=r,e.e=t=t-r-1,e.d=[],r=(t+1)%x,t<0&&(r+=x),re.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(A=A.replace(/(\d)_(?=\d)/g,"$1"),uf.test(A))return Vl(e,A)}else if(A==="Infinity"||A==="NaN")return+A||(e.s=NaN),e.e=NaN,e.d=null,e;if(_S.test(A))t=16,A=A.toLowerCase();else if(WS.test(A))t=2;else if(jS.test(A))t=8;else throw Error(hr+A);for(i=A.search(/p/i),i>0?(a=+A.slice(i+1),A=A.substring(2,i)):A=A.slice(2),i=A.indexOf("."),s=i>=0,r=e.constructor,s&&(A=A.replace(".",""),o=A.length,i=o-i,n=hf(r,new r(t),i,i*2)),c=da(A,t,ZA),g=c.length-1,i=g;c[i]===0;--i)c.pop();return i<0?new r(e.s*0):(e.e=Ba(c,g),e.d=c,T=!1,s&&(e=ge(e,n,o*4)),a&&(e=e.times(Math.abs(a)<54?Pe(2,a):Jr.pow(2,a))),T=!0,e)}function $S(e,A){var t,r=A.d.length;if(r<3)return A.isZero()?A:kn(e,2,A,A);t=1.4*Math.sqrt(r),t=t>16?16:t|0,A=A.times(1/pa(5,t)),A=kn(e,2,A,A);for(var n,i=new e(5),s=new e(16),o=new e(20);t--;)n=A.times(A),A=A.times(i.plus(n.times(s.times(n).minus(o))));return A}function kn(e,A,t,r,n){var i,s,o,a,c=1,g=e.precision,l=Math.ceil(g/x);for(T=!1,a=t.times(t),o=new e(r);;){if(s=ge(o.times(a),new e(A++*A++),g,1),o=n?r.plus(s):r.minus(s),r=ge(s.times(a),new e(A++*A++),g,1),s=o.plus(r),s.d[l]!==void 0){for(i=l;s.d[i]===o.d[i]&&i--;);if(i==-1)break}i=o,o=r,r=s,s=i,c++}return T=!0,s.d.length=l+1,s}function pa(e,A){for(var t=e;--A;)t*=e;return t}function Cf(e,A){var t,r=A.s<0,n=KA(e,e.precision,1),i=n.times(.5);if(A=A.abs(),A.lte(i))return Gt=r?4:1,A;if(t=A.divToInt(n),t.isZero())Gt=r?3:2;else{if(A=A.minus(t.times(n)),A.lte(i))return Gt=nf(t)?r?2:3:r?4:1,A;Gt=nf(t)?r?1:4:r?3:2}return A.minus(n).abs()}function ql(e,A,t,r){var n,i,s,o,a,c,g,l,u,E=e.constructor,h=t!==void 0;if(h?(hA(t,1,dr),r===void 0?r=E.rounding:hA(r,0,8)):(t=E.precision,r=E.rounding),!e.isFinite())g=Qf(e);else{for(g=lt(e),s=g.indexOf("."),h?(n=2,A==16?t=t*4-3:A==8&&(t=t*3-2)):n=A,s>=0&&(g=g.replace(".",""),u=new E(1),u.e=g.length-s,u.d=da(lt(u),10,n),u.e=u.d.length),l=da(g,10,n),i=a=l.length;l[--a]==0;)l.pop();if(!l[0])g=h?"0p+0":"0";else{if(s<0?i--:(e=new E(e),e.d=l,e.e=i,e=ge(e,u,t,r,0,n),l=e.d,i=e.e,c=af),s=l[t],o=n/2,c=c||l[t+1]!==void 0,c=r<4?(s!==void 0||c)&&(r===0||r===(e.s<0?3:2)):s>o||s===o&&(r===4||c||r===6&&l[t-1]&1||r===(e.s<0?8:7)),l.length=t,c)for(;++l[--t]>n-1;)l[t]=0,t||(++i,l.unshift(1));for(a=l.length;!l[a-1];--a);for(s=0,g="";s1)if(A==16||A==8){for(s=A==16?4:3,--a;a%s;a++)g+="0";for(l=da(g,n,A),a=l.length;!l[a-1];--a);for(s=1,g="1.";sa)for(i-=a;i--;)g+="0";else iA)return e.length=A,!0}function eF(e){return new this(e).abs()}function AF(e){return new this(e).acos()}function tF(e){return new this(e).acosh()}function rF(e,A){return new this(e).plus(A)}function nF(e){return new this(e).asin()}function iF(e){return new this(e).asinh()}function sF(e){return new this(e).atan()}function oF(e){return new this(e).atanh()}function aF(e,A){e=new this(e),A=new this(A);var t,r=this.precision,n=this.rounding,i=r+4;return!e.s||!A.s?t=new this(NaN):!e.d&&!A.d?(t=KA(this,i,1).times(A.s>0?.25:.75),t.s=e.s):!A.d||e.isZero()?(t=A.s<0?KA(this,r,n):new this(0),t.s=e.s):!e.d||A.isZero()?(t=KA(this,i,1).times(.5),t.s=e.s):A.s<0?(this.precision=i,this.rounding=1,t=this.atan(ge(e,A,i,1)),A=KA(this,i,1),this.precision=r,this.rounding=n,t=e.s<0?t.minus(A):t.plus(A)):t=this.atan(ge(e,A,i,1)),t}function cF(e){return new this(e).cbrt()}function gF(e){return b(e=new this(e),e.e+1,2)}function lF(e,A,t){return new this(e).clamp(A,t)}function uF(e){if(!e||typeof e!="object")throw Error(Ia+"Object expected");var A,t,r,n=e.defaults===!0,i=["precision",1,dr,"rounding",0,8,"toExpNeg",-bn,0,"toExpPos",0,bn,"maxE",0,bn,"minE",-bn,0,"modulo",0,9];for(A=0;A=i[A+1]&&r<=i[A+2])this[t]=r;else throw Error(hr+t+": "+r);if(t="crypto",n&&(this[t]=Gl[t]),(r=e[t])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(gf);else this[t]=!1;else throw Error(hr+t+": "+r);return this}function EF(e){return new this(e).cos()}function hF(e){return new this(e).cosh()}function ff(e){var A,t,r;function n(i){var s,o,a,c=this;if(!(c instanceof n))return new n(i);if(c.constructor=n,of(i)){c.s=i.s,T?!i.d||i.e>n.maxE?(c.e=NaN,c.d=null):i.e=10;o/=10)s++;T?s>n.maxE?(c.e=NaN,c.d=null):s=429e7?A[i]=crypto.getRandomValues(new Uint32Array(1))[0]:o[i++]=n%1e7;else if(crypto.randomBytes){for(A=crypto.randomBytes(r*=4);i=214e7?crypto.randomBytes(4).copy(A,i):(o.push(n%1e7),i+=4);i=r/4}else throw Error(gf);else for(;i=10;n/=10)r++;rVe(Ut(e)),punctuation:Ut,directive:Tt,function:Tt,variable:e=>Ve(Ut(e)),string:e=>Ve(ir(e)),boolean:Lt,number:Tt,comment:_i};var YF=e=>e,ya={},VF=0,v={manual:ya.Prism&&ya.Prism.manual,disableWorkerMessageHandler:ya.Prism&&ya.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof XA){let A=e;return new XA(A.type,v.util.encode(A.content),A.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(De instanceof XA)continue;if(K&&q!=A.length-1){p.lastIndex=ae;var l=p.exec(e);if(!l)break;var g=l.index+(m?l[1].length:0),u=l.index+l[0].length,o=q,a=ae;for(let P=A.length;o=a&&(++q,ae=a);if(A[q]instanceof XA)continue;c=o-q,De=e.slice(ae,a),l.index-=ae}else{p.lastIndex=0;var l=p.exec(De),c=1}if(!l){if(i)break;continue}m&&(H=l[1]?l[1].length:0);var g=l.index+H,l=l[0].slice(H),u=g+l.length,E=De.slice(0,g),h=De.slice(u);let ee=[q,c];E&&(++q,ae+=E.length,ee.push(E));let Y=new XA(d,w?v.tokenize(l,w):l,ne,l,K);if(ee.push(Y),h&&ee.push(h),Array.prototype.splice.apply(A,ee),c!=1&&v.matchGrammar(e,A,t,q,ae,!0,d),i)break}}}},tokenize:function(e,A){let t=[e],r=A.rest;if(r){for(let n in r)A[n]=r[n];delete A.rest}return v.matchGrammar(e,t,A,0,0,!1),t},hooks:{all:{},add:function(e,A){let t=v.hooks.all;t[e]=t[e]||[],t[e].push(A)},run:function(e,A){let t=v.hooks.all[e];if(!(!t||!t.length))for(var r=0,n;n=t[r++];)n(A)}},Token:XA};v.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:/[{}[\];(),.:]/};v.languages.javascript=v.languages.extend("clike",{"class-name":[v.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}/});v.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;v.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:v.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:v.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:v.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:v.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});v.languages.markup&&v.languages.markup.tag.addInlined("script","javascript");v.languages.js=v.languages.javascript;v.languages.typescript=v.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/});v.languages.ts=v.languages.typescript;function XA(e,A,t,r,n){this.type=e,this.content=A,this.alias=t,this.length=(r||"").length|0,this.greedy=!!n}XA.stringify=function(e,A){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return XA.stringify(t,A)}).join(""):qF(e.type)(e.content)};function qF(e){return If[e]||YF}function Bf(e){return OF(e,v.languages.javascript)}function OF(e,A){return v.tokenize(e,A).map(r=>XA.stringify(r)).join("")}var pf=Z(jC());function mf(e){return(0,pf.default)(e)}var wa=class e{static read(A){let t;try{t=yf.default.readFileSync(A,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(A){let t=A.split(/\r?\n/);return new e(1,t)}constructor(A,t){this.firstLineNumber=A,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(A,t){if(Athis.lines.length+this.firstLineNumber)return this;let r=A-this.firstLineNumber,n=[...this.lines];return n[r]=t(n[r]),new e(this.firstLineNumber,n)}mapLines(A){return new e(this.firstLineNumber,this.lines.map((t,r)=>A(t,this.firstLineNumber+r)))}lineAt(A){return this.lines[A-this.firstLineNumber]}prependSymbolAt(A,t){return this.mapLines((r,n)=>n===A?`${t} ${r}`:` ${r}`)}slice(A,t){let r=this.lines.slice(A-1,t).join(` +`);return new e(A,mf(r).split(` +`))}highlight(){let A=Bf(this.toString());return new e(this.firstLineNumber,A.split(` +`))}toString(){return this.lines.join(` +`)}};var HF={red:vA,gray:_i,dim:Ur,bold:Ve,underline:EA,highlightSource:e=>e.highlight()},WF={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function _F({message:e,originalMethod:A,isPanic:t,callArguments:r}){return{functionName:`prisma.${A}()`,message:e,isPanic:t??!1,callArguments:r}}function jF({callsite:e,message:A,originalMethod:t,isPanic:r,callArguments:n},i){let s=_F({message:A,originalMethod:t,isPanic:r,callArguments:n});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let o=e.getLocation();if(!o||!o.lineNumber||!o.columnNumber)return s;let a=Math.max(1,o.lineNumber-3),c=wa.read(o.fileName)?.slice(a,o.lineNumber),g=c?.lineAt(o.lineNumber);if(c&&g){let l=ZF(g),u=KF(g);if(!u)return s;s.functionName=`${u.code})`,s.location=o,r||(c=c.mapLineAt(o.lineNumber,h=>h.slice(0,u.openingBraceIndex))),c=i.highlightSource(c);let E=String(c.lastLineNumber).length;if(s.contextLines=c.mapLines((h,d)=>i.gray(String(d).padStart(E))+" "+h).mapLines(h=>i.dim(h)).prependSymbolAt(o.lineNumber,i.bold(i.red("\u2192"))),n){let h=l+E+1;h+=2,s.callArguments=(0,wf.default)(n,h).slice(h)}}return s}function KF(e){let A=Object.keys(lr.ModelAction).join("|"),r=new RegExp(String.raw`\.(${A})\(`).exec(e);if(r){let n=r.index+r[0].length,i=e.lastIndexOf(" ",r.index)+1;return{code:e.slice(i,n),openingBraceIndex:n}}return null}function ZF(e){let A=0;for(let t=0;t"Unknown error")}function Sf(e){return e.errors.flatMap(A=>A.kind==="Union"?Sf(A):[A])}function $F(e){let A=new Map,t=[];for(let r of e){if(r.kind!=="InvalidArgumentType"){t.push(r);continue}let n=`${r.selectionPath.join(".")}:${r.argumentPath.join(".")}`,i=A.get(n);i?A.set(n,{...r,argument:{...r.argument,typeNames:eN(i.argument.typeNames,r.argument.typeNames)}}):A.set(n,r)}return t.push(...A.values()),t}function eN(e,A){return[...new Set(e.concat(A))]}function AN(e){return vl(e,(A,t)=>{let r=Df(A),n=Df(t);return r!==n?r-n:bf(A)-bf(t)})}function Df(e){let A=0;return Array.isArray(e.selectionPath)&&(A+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(A+=e.argumentPath.length),A}function bf(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var RA=class{constructor(A,t){this.name=A;this.value=t;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(A){let{colors:{green:t}}=A.context;A.addMarginSymbol(t(this.isRequired?"+":"?")),A.write(t(this.name)),this.isRequired||A.write(t("?")),A.write(t(": ")),typeof this.value=="string"?A.write(t(this.value)):A.write(this.value)}};var Un=class{constructor(A=0,t){this.context=t;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=A}write(A){return typeof A=="string"?this.currentLine+=A:A.write(this),this}writeJoined(A,t,r=(n,i)=>i.write(n)){let n=t.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(A){return this.marginSymbol=A,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let A=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+A.slice(1):A}};var Da=class{constructor(A){this.value=A}write(A){A.write(this.value)}markAsError(){this.value.markAsError()}};var ba=e=>e,ka={bold:ba,red:ba,green:ba,dim:ba,enabled:!1},Ff={bold:Ve,red:vA,green:ir,dim:Ur,enabled:!0},Tn={write(e){e.writeLine(",")}};var Et=class{constructor(A){this.contents=A;this.isUnderlined=!1;this.color=A=>A}underline(){return this.isUnderlined=!0,this}setColor(A){return this.color=A,this}write(A){let t=A.getCurrentLineLength();A.write(this.color(this.contents)),this.isUnderlined&&A.afterNextNewline(()=>{A.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var Qr=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Mn=class extends Qr{constructor(){super(...arguments);this.items=[]}addItem(t){return this.items.push(new Da(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Et("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(Tn,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var vn=class e extends Qr{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let s=i;for(let o of n){let a;if(s.value instanceof e?a=s.value.getField(o):s.value instanceof Mn&&(a=s.value.getField(Number(o))),!a)return;s=a}return s}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let s=n.value.getFieldValue(i);if(!s||!(s instanceof e))return;let o=s.getSelectionParent();if(!o)return;n=o}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Et("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(Tn,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};var He=class extends Qr{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let r=new Et(this.text);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r)}asObject(){}};var gs=class{constructor(){this.fields=[]}addField(A,t){return this.fields.push({write(r){let{green:n,dim:i}=r.context.colors;r.write(n(i(`${A}: ${t}`))).addMarginSymbol(n(i("+")))}}),this}write(A){let{colors:{green:t}}=A.context;A.writeLine(t("{")).withIndent(()=>{A.writeJoined(Tn,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function Ra(e,A,t){switch(e.kind){case"MutuallyExclusiveFields":rN(e,A);break;case"IncludeOnScalar":nN(e,A);break;case"EmptySelection":iN(e,A,t);break;case"UnknownSelectionField":cN(e,A);break;case"InvalidSelectionValue":gN(e,A);break;case"UnknownArgument":lN(e,A);break;case"UnknownInputField":uN(e,A);break;case"RequiredArgumentMissing":EN(e,A);break;case"InvalidArgumentType":hN(e,A);break;case"InvalidArgumentValue":dN(e,A);break;case"ValueTooLarge":QN(e,A);break;case"SomeFieldsMissing":CN(e,A);break;case"TooManyFieldsGiven":fN(e,A);break;case"Union":kf(e,A,t);break;default:throw new Error("not implemented: "+e.kind)}}function rN(e,A){let t=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),A.addErrorMessage(r=>`Please ${r.bold("either")} use ${r.green(`\`${e.firstField}\``)} or ${r.green(`\`${e.secondField}\``)}, but ${r.red("not both")} at the same time.`)}function nN(e,A){let[t,r]=ls(e.selectionPath),n=e.outputType,i=A.arguments.getDeepSelectionParent(t)?.value;if(i&&(i.getField(r)?.markAsError(),n))for(let s of n.fields)s.isRelation&&i.addSuggestion(new RA(s.name,"true"));A.addErrorMessage(s=>{let o=`Invalid scalar field ${s.red(`\`${r}\``)} for ${s.bold("include")} statement`;return n?o+=` on model ${s.bold(n.name)}. ${us(s)}`:o+=".",o+=` +Note that ${s.bold("include")} statements only accept relation fields.`,o})}function iN(e,A,t){let r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getField("omit")?.value.asObject();if(n){sN(e,A,n);return}if(r.hasField("select")){oN(e,A);return}}if(t?.[Fn(e.outputType.name)]){aN(e,A);return}A.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function sN(e,A,t){t.removeAllFields();for(let r of e.outputType.fields)t.addSuggestion(new RA(r.name,"false"));A.addErrorMessage(r=>`The ${r.red("omit")} statement includes every field of the model ${r.bold(e.outputType.name)}. At least one field must be included in the result`)}function oN(e,A){let t=e.outputType,r=A.arguments.getDeepSelectionParent(e.selectionPath)?.value,n=r?.isEmpty()??!1;r&&(r.removeAllFields(),Uf(r,t)),A.addErrorMessage(i=>n?`The ${i.red("`select`")} statement for type ${i.bold(t.name)} must not be empty. ${us(i)}`:`The ${i.red("`select`")} statement for type ${i.bold(t.name)} needs ${i.bold("at least one truthy value")}.`)}function aN(e,A){let t=new gs;for(let n of e.outputType.fields)n.isRelation||t.addField(n.name,"false");let r=new RA("omit",t).makeRequired();if(e.selectionPath.length===0)A.arguments.addSuggestion(r);else{let[n,i]=ls(e.selectionPath),o=A.arguments.getDeepSelectionParent(n)?.value.asObject()?.getField(i);if(o){let a=o?.value.asObject()??new vn;a.addSuggestion(r),o.value=a}}A.addErrorMessage(n=>`The global ${n.red("omit")} configuration excludes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function cN(e,A){let t=Tf(e.selectionPath,A);if(t.parentKind!=="unknown"){t.field.markAsError();let r=t.parent;switch(t.parentKind){case"select":Uf(r,e.outputType);break;case"include":IN(r,e.outputType);break;case"omit":BN(r,e.outputType);break}}A.addErrorMessage(r=>{let n=[`Unknown field ${r.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&n.push(`for ${r.bold(t.parentKind)} statement`),n.push(`on model ${r.bold(`\`${e.outputType.name}\``)}.`),n.push(us(r)),n.join(" ")})}function gN(e,A){let t=Tf(e.selectionPath,A);t.parentKind!=="unknown"&&t.field.value.markAsError(),A.addErrorMessage(r=>`Invalid value for selection field \`${r.red(t.fieldName)}\`: ${e.underlyingError}`)}function lN(e,A){let t=e.argumentPath[0],r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(t)?.markAsError(),pN(r,e.arguments)),A.addErrorMessage(n=>xf(n,t,e.arguments.map(i=>i.name)))}function uN(e,A){let[t,r]=ls(e.argumentPath),n=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){n.getDeepField(e.argumentPath)?.markAsError();let i=n.getDeepFieldValue(t)?.asObject();i&&Mf(i,e.inputType)}A.addErrorMessage(i=>xf(i,r,e.inputType.fields.map(s=>s.name)))}function xf(e,A,t){let r=[`Unknown argument \`${e.red(A)}\`.`],n=yN(A,t);return n&&r.push(`Did you mean \`${e.green(n)}\`?`),t.length>0&&r.push(us(e)),r.join(" ")}function EN(e,A){let t;A.addErrorMessage(a=>t?.value instanceof He&&t.value.text==="null"?`Argument \`${a.green(i)}\` must not be ${a.red("null")}.`:`Argument \`${a.green(i)}\` is missing.`);let r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!r)return;let[n,i]=ls(e.argumentPath),s=new gs,o=r.getDeepFieldValue(n)?.asObject();if(o)if(t=o.getField(i),t&&o.removeField(i),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let a of e.inputTypes[0].fields)s.addField(a.name,a.typeNames.join(" | "));o.addSuggestion(new RA(i,s).makeRequired())}else{let a=e.inputTypes.map(Lf).join(" | ");o.addSuggestion(new RA(i,a).makeRequired())}}function Lf(e){return e.kind==="list"?`${Lf(e.elementType)}[]`:e.name}function hN(e,A){let t=e.argument.name,r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&r.getDeepFieldValue(e.argumentPath)?.markAsError(),A.addErrorMessage(n=>{let i=Sa("or",e.argument.typeNames.map(s=>n.green(s)));return`Argument \`${n.bold(t)}\`: Invalid value provided. Expected ${i}, provided ${n.red(e.inferredType)}.`})}function dN(e,A){let t=e.argument.name,r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&r.getDeepFieldValue(e.argumentPath)?.markAsError(),A.addErrorMessage(n=>{let i=[`Invalid value for argument \`${n.bold(t)}\``];if(e.underlyingError&&i.push(`: ${e.underlyingError}`),i.push("."),e.argument.typeNames.length>0){let s=Sa("or",e.argument.typeNames.map(o=>n.green(o)));i.push(` Expected ${s}.`)}return i.join("")})}function QN(e,A){let t=e.argument.name,r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),n;if(r){let s=r.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof He&&(n=s.text)}A.addErrorMessage(i=>{let s=["Unable to fit value"];return n&&s.push(i.red(n)),s.push(`into a 64-bit signed integer for field \`${i.bold(t)}\``),s.join(" ")})}function CN(e,A){let t=e.argumentPath[e.argumentPath.length-1],r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getDeepFieldValue(e.argumentPath)?.asObject();n&&Mf(n,e.inputType)}A.addErrorMessage(n=>{let i=[`Argument \`${n.bold(t)}\` of type ${n.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?i.push(`${n.green("at least one of")} ${Sa("or",e.constraints.requiredFields.map(s=>`\`${n.bold(s)}\``))} arguments.`):i.push(`${n.green("at least one")} argument.`):i.push(`${n.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),i.push(us(n)),i.join(" ")})}function fN(e,A){let t=e.argumentPath[e.argumentPath.length-1],r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),n=[];if(r){let i=r.getDeepFieldValue(e.argumentPath)?.asObject();i&&(i.markAsError(),n=Object.keys(i.getFields()))}A.addErrorMessage(i=>{let s=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${i.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${i.green("at most one")} argument,`):s.push(`${i.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sa("and",n.map(o=>i.red(o)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Uf(e,A){for(let t of A.fields)e.hasField(t.name)||e.addSuggestion(new RA(t.name,"true"))}function IN(e,A){for(let t of A.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new RA(t.name,"true"))}function BN(e,A){for(let t of A.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new RA(t.name,"true"))}function pN(e,A){for(let t of A)e.hasField(t.name)||e.addSuggestion(new RA(t.name,t.typeNames.join(" | ")))}function Tf(e,A){let[t,r]=ls(e),n=A.arguments.getDeepSubSelectionValue(t)?.asObject();if(!n)return{parentKind:"unknown",fieldName:r};let i=n.getFieldValue("select")?.asObject(),s=n.getFieldValue("include")?.asObject(),o=n.getFieldValue("omit")?.asObject(),a=i?.getField(r);return i&&a?{parentKind:"select",parent:i,field:a,fieldName:r}:(a=s?.getField(r),s&&a?{parentKind:"include",field:a,parent:s,fieldName:r}:(a=o?.getField(r),o&&a?{parentKind:"omit",field:a,parent:o,fieldName:r}:{parentKind:"unknown",fieldName:r}))}function Mf(e,A){if(A.kind==="object")for(let t of A.fields)e.hasField(t.name)||e.addSuggestion(new RA(t.name,t.typeNames.join(" | ")))}function ls(e){let A=[...e],t=A.pop();if(!t)throw new Error("unexpected empty path");return[A,t]}function us({green:e,enabled:A}){return"Available options are "+(A?`listed in ${e("green")}`:"marked with ?")+"."}function Sa(e,A){if(A.length===1)return A[0];let t=[...A],r=t.pop();return`${t.join(", ")} ${e} ${r}`}var mN=3;function yN(e,A){let t=1/0,r;for(let n of A){let i=(0,Nf.default)(e,n);i>mN||i`}};function Pn(e){return e instanceof Es}var Fa=Symbol(),Hl=new WeakMap,Jt=class{constructor(A){A===Fa?Hl.set(this,`Prisma.${this._getName()}`):Hl.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Hl.get(this)}},hs=class extends Jt{_getNamespace(){return"NullTypes"}},ds=class extends hs{};Wl(ds,"DbNull");var Qs=class extends hs{};Wl(Qs,"JsonNull");var Cs=class extends hs{};Wl(Cs,"AnyNull");var Na={classes:{DbNull:ds,JsonNull:Qs,AnyNull:Cs},instances:{DbNull:new ds(Fa),JsonNull:new Qs(Fa),AnyNull:new Cs(Fa)}};function Wl(e,A){Object.defineProperty(e,"name",{value:A,configurable:!0})}var Pf=": ",xa=class{constructor(A,t){this.name=A;this.value=t;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Pf.length}write(A){let t=new Et(this.name);this.hasError&&t.underline().setColor(A.context.colors.red),A.write(t).write(Pf).write(this.value)}};var _l=class{constructor(A){this.errorMessages=[];this.arguments=A}write(A){A.write(this.arguments)}addErrorMessage(A){this.errorMessages.push(A)}renderAllMessages(A){return this.errorMessages.map(t=>t(A)).join(` +`)}};function Gn(e){return new _l(Gf(e))}function Gf(e){let A=new vn;for(let[t,r]of Object.entries(e)){let n=new xa(t,Jf(r));A.addField(n)}return A}function Jf(e){if(typeof e=="string")return new He(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new He(String(e));if(typeof e=="bigint")return new He(`${e}n`);if(e===null)return new He("null");if(e===void 0)return new He("undefined");if(xn(e))return new He(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new He(`Buffer.alloc(${e.byteLength})`):new He(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let A=ma(e)?e.toISOString():"Invalid Date";return new He(`new Date("${A}")`)}return e instanceof Jt?new He(`Prisma.${e._getName()}`):Pn(e)?new He(`prisma.${vf(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?wN(e):typeof e=="object"?Gf(e):new He(Object.prototype.toString.call(e))}function wN(e){let A=new Mn;for(let t of e)A.addItem(Jf(t));return A}function La(e,A){let t=A==="pretty"?Ff:ka,r=e.renderAllMessages(t),n=new Un(0,{colors:t}).write(e).toString();return{message:r,args:n}}function Ua({args:e,errors:A,errorFormat:t,callsite:r,originalMethod:n,clientVersion:i,globalOmit:s}){let o=Gn(e);for(let l of A)Ra(l,o,s);let{message:a,args:c}=La(o,t),g=Ln({message:a,callsite:r,originalMethod:n,showColors:t==="pretty",callArguments:c});throw new Oe(g,{clientVersion:i})}var ht=class{constructor(){this._map=new Map}get(A){return this._map.get(A)?.value}set(A,t){this._map.set(A,{value:t})}getOrCreate(A,t){let r=this._map.get(A);if(r)return r.value;let n=t();return this.set(A,n),n}};function fs(e){let A;return{get(){return A||(A={value:e()}),A.value}}}function dt(e){return e.replace(/^./,A=>A.toLowerCase())}function Vf(e,A,t){let r=dt(t);return!A.result||!(A.result.$allModels||A.result[r])?e:RN({...e,...Yf(A.name,e,A.result.$allModels),...Yf(A.name,e,A.result[r])})}function RN(e){let A=new ht,t=(r,n)=>A.getOrCreate(r,()=>n.has(r)?[r]:(n.add(r),e[r]?e[r].needs.flatMap(i=>t(i,n)):[r]));return Dn(e,r=>({...r,needs:t(r.name,new Set)}))}function Yf(e,A,t){return t?Dn(t,({needs:r,compute:n},i)=>({name:i,needs:r?Object.keys(r).filter(s=>r[s]):[],compute:DN(A,i,n)})):{}}function DN(e,A,t){let r=e?.[A]?.compute;return r?n=>t({...n,[A]:r(n)}):t}function qf(e,A){if(!A)return e;let t={...e};for(let r of Object.values(A))if(e[r.name])for(let n of r.needs)t[n]=!0;return t}function Of(e,A){if(!A)return e;let t={...e};for(let r of Object.values(A))if(!e[r.name])for(let n of r.needs)delete t[n];return t}var Ta=class{constructor(A,t){this.extension=A;this.previous=t;this.computedFieldsCache=new ht;this.modelExtensionsCache=new ht;this.queryCallbacksCache=new ht;this.clientExtensions=fs(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=fs(()=>{let A=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?A.concat(t):A})}getAllComputedFields(A){return this.computedFieldsCache.getOrCreate(A,()=>Vf(this.previous?.getAllComputedFields(A),this.extension,A))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(A){return this.modelExtensionsCache.getOrCreate(A,()=>{let t=dt(A);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(A):{...this.previous?.getAllModelExtensions(A),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(A,t){return this.queryCallbacksCache.getOrCreate(`${A}:${t}`,()=>{let r=this.previous?.getAllQueryCallbacks(A,t)??[],n=[],i=this.extension.query;return!i||!(i[A]||i.$allModels||i[t]||i.$allOperations)?r:(i[A]!==void 0&&(i[A][t]!==void 0&&n.push(i[A][t]),i[A].$allOperations!==void 0&&n.push(i[A].$allOperations)),A!=="$none"&&i.$allModels!==void 0&&(i.$allModels[t]!==void 0&&n.push(i.$allModels[t]),i.$allModels.$allOperations!==void 0&&n.push(i.$allModels.$allOperations)),i[t]!==void 0&&n.push(i[t]),i.$allOperations!==void 0&&n.push(i.$allOperations),r.concat(n))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Jn=class e{constructor(A){this.head=A}static empty(){return new e}static single(A){return new e(new Ta(A))}isEmpty(){return this.head===void 0}append(A){return new e(new Ta(A,this.head))}getAllComputedFields(A){return this.head?.getAllComputedFields(A)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(A){return this.head?.getAllModelExtensions(A)}getAllQueryCallbacks(A,t){return this.head?.getAllQueryCallbacks(A,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Hf=Symbol(),Is=class{constructor(A){if(A!==Hf)throw new Error("Skip instance can not be constructed directly")}ifUndefined(A){return A===void 0?Ma:A}},Ma=new Is(Hf);function Qt(e){return e instanceof Is}var bN={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"},Wf="explicitly `undefined` values are not allowed";function va({modelName:e,action:A,args:t,runtimeDataModel:r,extensions:n=Jn.empty(),callsite:i,clientMethod:s,errorFormat:o,clientVersion:a,previewFeatures:c,globalOmit:g}){let l=new jl({runtimeDataModel:r,modelName:e,action:A,rootArgs:t,callsite:i,extensions:n,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:o,clientVersion:a,previewFeatures:c,globalOmit:g});return{modelName:e,action:bN[A],query:Bs(t,l)}}function Bs({select:e,include:A,...t}={},r){let n;return r.isPreviewFeatureOn("omitApi")&&(n=t.omit,delete t.omit),{arguments:jf(t,r),selection:kN(e,A,n,r)}}function kN(e,A,t,r){return e?(A?r.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:r.getSelectionPath()}):t&&r.isPreviewFeatureOn("omitApi")&&r.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:r.getSelectionPath()}),xN(e,r)):SN(r,A,t)}function SN(e,A,t){let r={};return e.modelOrType&&!e.isRawAction()&&(r.$composites=!0,r.$scalars=!0),A&&FN(r,A,e),e.isPreviewFeatureOn("omitApi")&&NN(r,t,e),r}function FN(e,A,t){for(let[r,n]of Object.entries(A)){if(Qt(n))continue;let i=t.nestSelection(r);if(Kl(n,i),n===!1||n===void 0){e[r]=!1;continue}let s=t.findField(r);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(r),outputType:t.getOutputTypeDescription()}),s){e[r]=Bs(n===!0?{}:n,i);continue}if(n===!0){e[r]=!0;continue}e[r]=Bs(n,i)}}function NN(e,A,t){let r=t.getComputedFields(),n={...t.getGlobalOmit(),...A},i=Of(n,r);for(let[s,o]of Object.entries(i)){if(Qt(o))continue;Kl(o,t.nestSelection(s));let a=t.findField(s);r?.[s]&&!a||(e[s]=!o)}}function xN(e,A){let t={},r=A.getComputedFields(),n=qf(e,r);for(let[i,s]of Object.entries(n)){if(Qt(s))continue;let o=A.nestSelection(i);Kl(s,o);let a=A.findField(i);if(!(r?.[i]&&!a)){if(s===!1||s===void 0||Qt(s)){t[i]=!1;continue}if(s===!0){a?.kind==="object"?t[i]=Bs({},o):t[i]=!0;continue}t[i]=Bs(s,o)}}return t}function _f(e,A){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(Nn(e)){if(ma(e))return{$type:"DateTime",value:e.toISOString()};A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:A.getSelectionPath(),argumentPath:A.getArgumentPath(),argument:{name:A.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Pn(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return LN(e,A);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:Buffer.from(e).toString("base64")};if(UN(e))return e.values;if(xn(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Jt){if(e!==Na.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(TN(e))return e.toJSON();if(typeof e=="object")return jf(e,A);A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:A.getSelectionPath(),argumentPath:A.getArgumentPath(),argument:{name:A.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 jf(e,A){if(e.$type)return{$type:"Raw",value:e};let t={};for(let r in e){let n=e[r],i=A.nestArgument(r);Qt(n)||(n!==void 0?t[r]=_f(n,i):A.isPreviewFeatureOn("strictUndefinedChecks")&&A.throwValidationError({kind:"InvalidArgumentValue",argumentPath:i.getArgumentPath(),selectionPath:A.getSelectionPath(),argument:{name:A.getArgumentName(),typeNames:[]},underlyingError:Wf}))}return t}function LN(e,A){let t=[];for(let r=0;r({name:A.name,typeName:"boolean",isRelation:A.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(A){return this.params.previewFeatures.includes(A)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(A){return this.modelOrType?.fields.find(t=>t.name===A)}nestSelection(A){let t=this.findField(A),r=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:r,selectionPath:this.params.selectionPath.concat(A)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Fn(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:vt(this.params.action,"Unknown action")}}nestArgument(A){return new e({...this.params,argumentPath:this.params.argumentPath.concat(A)})}};var Yn=class{constructor(A){this._engine=A}prometheus(A){return this._engine.metrics({format:"prometheus",...A})}json(A){return this._engine.metrics({format:"json",...A})}};function Kf(e){return{models:Zl(e.models),enums:Zl(e.enums),types:Zl(e.types)}}function Zl(e){let A={};for(let{name:t,...r}of e)A[t]=r;return A}function Zf(e,A){let t=fs(()=>MN(A));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function MN(e){return{datamodel:{models:Xl(e.models),enums:Xl(e.enums),types:Xl(e.types)}}}function Xl(e){return Object.entries(e).map(([A,t])=>({name:A,...t}))}var zl=new WeakMap,Pa="$$PrismaTypedSql",$l=class{constructor(A,t){zl.set(this,{sql:A,values:t}),Object.defineProperty(this,Pa,{value:Pa})}get sql(){return zl.get(this).sql}get values(){return zl.get(this).values}};function Xf(e){return(...A)=>new $l(e,A)}function zf(e){return e!=null&&e[Pa]===Pa}function ps(e){return{ok:!1,error:e,map(){return ps(e)},flatMap(){return ps(e)}}}var eu=class{constructor(){this.registeredErrors=[]}consumeError(A){return this.registeredErrors[A]}registerNewError(A){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:A},t}},Au=e=>{let A=new eu,t=Ct(A,e.transactionContext.bind(e)),r={adapterName:e.adapterName,errorRegistry:A,queryRaw:Ct(A,e.queryRaw.bind(e)),executeRaw:Ct(A,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...n)=>(await t(...n)).map(s=>vN(A,s))};return e.getConnectionInfo&&(r.getConnectionInfo=GN(A,e.getConnectionInfo.bind(e))),r},vN=(e,A)=>{let t=Ct(e,A.startTransaction.bind(A));return{adapterName:A.adapterName,provider:A.provider,queryRaw:Ct(e,A.queryRaw.bind(A)),executeRaw:Ct(e,A.executeRaw.bind(A)),startTransaction:async(...r)=>(await t(...r)).map(i=>PN(e,i))}},PN=(e,A)=>({adapterName:A.adapterName,provider:A.provider,options:A.options,queryRaw:Ct(e,A.queryRaw.bind(A)),executeRaw:Ct(e,A.executeRaw.bind(A)),commit:Ct(e,A.commit.bind(A)),rollback:Ct(e,A.rollback.bind(A))});function Ct(e,A){return async(...t)=>{try{return await A(...t)}catch(r){let n=e.registerNewError(r);return ps({kind:"GenericJs",id:n})}}}function GN(e,A){return(...t)=>{try{return A(...t)}catch(r){let n=e.registerNewError(r);return ps({kind:"GenericJs",id:n})}}}var mD=Z(ml());var yD=require("async_hooks"),wD=require("events"),RD=Z(require("fs")),Uo=Z(require("path"));var dA=class e{constructor(A,t){if(A.length-1!==t.length)throw A.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${A.length} strings to have ${A.length-1} values`);let r=t.reduce((s,o)=>s+(o instanceof e?o.values.length:1),0);this.values=new Array(r),this.strings=new Array(r+1),this.strings[0]=A[0];let n=0,i=0;for(;ne.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var Ga={enumerable:!0,configurable:!0,writable:!0};function Ja(e){let A=new Set(e);return{getOwnPropertyDescriptor:()=>Ga,has:(t,r)=>A.has(r),set:(t,r,n)=>A.add(r)&&Reflect.set(t,r,n),ownKeys:()=>[...A]}}var AI=Symbol.for("nodejs.util.inspect.custom");function ft(e,A){let t=JN(A),r=new Set,n=new Proxy(e,{get(i,s){if(r.has(s))return i[s];let o=t.get(s);return o?o.getPropertyValue(s):i[s]},has(i,s){if(r.has(s))return!0;let o=t.get(s);return o?o.has?.(s)??!0:Reflect.has(i,s)},ownKeys(i){let s=tI(Reflect.ownKeys(i),t),o=tI(Array.from(t.keys()),t);return[...new Set([...s,...o,...r])]},set(i,s,o){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(r.add(s),Reflect.set(i,s,o))},getOwnPropertyDescriptor(i,s){let o=Reflect.getOwnPropertyDescriptor(i,s);if(o&&!o.configurable)return o;let a=t.get(s);return a?a.getPropertyDescriptor?{...Ga,...a?.getPropertyDescriptor(s)}:Ga:o},defineProperty(i,s,o){return r.add(s),Reflect.defineProperty(i,s,o)}});return n[AI]=function(){let i={...this};return delete i[AI],i},n}function JN(e){let A=new Map;for(let t of e){let r=t.getKeys();for(let n of r)A.set(n,t)}return A}function tI(e,A){return e.filter(t=>A.get(t)?.has?.(t)??!0)}function Vn(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function qn(e,A){return{batch:e,transaction:A?.kind==="batch"?{isolationLevel:A.options.isolationLevel}:void 0}}function rI(e){if(e===void 0)return"";let A=Gn(e);return new Un(0,{colors:ka}).write(A).toString()}var YN="P2037";function Yt({error:e,user_facing_error:A},t,r){return A.error_code?new xe(VN(A,r),{code:A.error_code,clientVersion:t,meta:A.meta,batchRequestIdx:A.batch_request_idx}):new ve(e,{clientVersion:t,batchRequestIdx:A.batch_request_idx})}function VN(e,A){let t=e.message;return(A==="postgresql"||A==="postgres"||A==="mysql")&&e.error_code===YN&&(t+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var ys="";function nI(e){var A=e.split(` +`);return A.reduce(function(t,r){var n=HN(r)||_N(r)||ZN(r)||ex(r)||zN(r);return n&&t.push(n),t},[])}var qN=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ON=/\((\S*)(?::(\d+))(?::(\d+))\)/;function HN(e){var A=qN.exec(e);if(!A)return null;var t=A[2]&&A[2].indexOf("native")===0,r=A[2]&&A[2].indexOf("eval")===0,n=ON.exec(A[2]);return r&&n!=null&&(A[2]=n[1],A[3]=n[2],A[4]=n[3]),{file:t?null:A[2],methodName:A[1]||ys,arguments:t?[A[2]]:[],lineNumber:A[3]?+A[3]:null,column:A[4]?+A[4]:null}}var WN=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function _N(e){var A=WN.exec(e);return A?{file:A[2],methodName:A[1]||ys,arguments:[],lineNumber:+A[3],column:A[4]?+A[4]:null}:null}var jN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,KN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function ZN(e){var A=jN.exec(e);if(!A)return null;var t=A[3]&&A[3].indexOf(" > eval")>-1,r=KN.exec(A[3]);return t&&r!=null&&(A[3]=r[1],A[4]=r[2],A[5]=null),{file:A[3],methodName:A[1]||ys,arguments:A[2]?A[2].split(","):[],lineNumber:A[4]?+A[4]:null,column:A[5]?+A[5]:null}}var XN=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function zN(e){var A=XN.exec(e);return A?{file:A[3],methodName:A[1]||ys,arguments:[],lineNumber:+A[4],column:A[5]?+A[5]:null}:null}var $N=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function ex(e){var A=$N.exec(e);return A?{file:A[2],methodName:A[1]||ys,arguments:[],lineNumber:+A[3],column:A[4]?+A[4]:null}:null}var nu=class{getLocation(){return null}},iu=class{constructor(){this._error=new Error}getLocation(){let A=this._error.stack;if(!A)return null;let r=nI(A).find(n=>{if(!n.file)return!1;let i=Sl(n.file);return i!==""&&!i.includes("@prisma")&&!i.includes("/packages/client/src/runtime/")&&!i.endsWith("/runtime/binary.js")&&!i.endsWith("/runtime/library.js")&&!i.endsWith("/runtime/edge.js")&&!i.endsWith("/runtime/edge-esm.js")&&!i.startsWith("internal/")&&!n.methodName.includes("new ")&&!n.methodName.includes("getCallSite")&&!n.methodName.includes("Proxy.")&&n.methodName.split(".").length<4});return!r||!r.file?null:{fileName:r.file,lineNumber:r.lineNumber,columnNumber:r.column}}};function Cr(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new nu:new iu}var iI={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function On(e={}){let A=tx(e);return Object.entries(A).reduce((r,[n,i])=>(iI[n]!==void 0?r.select[n]={select:i}:r[n]=i,r),{select:{}})}function tx(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Ya(e={}){return A=>(typeof e._count=="boolean"&&(A._count=A._count._all),A)}function sI(e,A){let t=Ya(e);return A({action:"aggregate",unpacker:t,argsMapper:On})(e)}function rx(e={}){let{select:A,...t}=e;return typeof A=="object"?On({...t,_count:A}):On({...t,_count:{_all:!0}})}function nx(e={}){return typeof e.select=="object"?A=>Ya(e)(A)._count:A=>Ya(e)(A)._count._all}function oI(e,A){return A({action:"count",unpacker:nx(e),argsMapper:rx})(e)}function ix(e={}){let A=On(e);if(Array.isArray(A.by))for(let t of A.by)typeof t=="string"&&(A.select[t]=!0);else typeof A.by=="string"&&(A.select[A.by]=!0);return A}function sx(e={}){return A=>(typeof e?._count=="boolean"&&A.forEach(t=>{t._count=t._count._all}),A)}function aI(e,A){return A({action:"groupBy",unpacker:sx(e),argsMapper:ix})(e)}function cI(e,A,t){if(A==="aggregate")return r=>sI(r,t);if(A==="count")return r=>oI(r,t);if(A==="groupBy")return r=>aI(r,t)}function gI(e,A){let t=A.fields.filter(n=>!n.relationName),r=Ml(t,n=>n.name);return new Proxy({},{get(n,i){if(i in n||typeof i=="symbol")return n[i];let s=r[i];if(s)return new Es(e,i,s.type,s.isList,s.kind==="enum")},...Ja(Object.keys(r))})}var lI=e=>Array.isArray(e)?e:e.split("."),su=(e,A)=>lI(A).reduce((t,r)=>t&&t[r],e),uI=(e,A,t)=>lI(A).reduceRight((r,n,i,s)=>Object.assign({},su(e,s.slice(0,i)),{[n]:r}),t);function ox(e,A){return e===void 0||A===void 0?[]:[...A,"select",e]}function ax(e,A,t){return A===void 0?e??{}:uI(A,t,e||!0)}function ou(e,A,t,r,n,i){let o=e._runtimeDataModel.models[A].fields.reduce((a,c)=>({...a,[c.name]:c}),{});return a=>{let c=Cr(e._errorFormat),g=ox(r,n),l=ax(a,i,g),u=t({dataPath:g,callsite:c})(l),E=cx(e,A);return new Proxy(u,{get(h,d){if(!E.includes(d))return h[d];let I=[o[d].type,t,d],p=[g,l];return ou(e,...I,...p)},...Ja([...E,...Object.getOwnPropertyNames(u)])})}}function cx(e,A){return e._runtimeDataModel.models[A].fields.filter(t=>t.kind==="object").map(t=>t.name)}function EI(e,A,t,r){return e===lr.ModelAction.findFirstOrThrow||e===lr.ModelAction.findUniqueOrThrow?gx(A,t,r):r}function gx(e,A,t){return async r=>{if("rejectOnNotFound"in r.args){let i=Ln({originalMethod:r.clientMethod,callsite:r.callsite,message:"'rejectOnNotFound' option is not supported"});throw new Oe(i,{clientVersion:A})}return await t(r).catch(i=>{throw i instanceof xe&&i.code==="P2025"?new Pt(`No ${e} found`,A):i})}}var lx=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ux=["aggregate","count","groupBy"];function au(e,A){let t=e._extensions.getAllModelExtensions(A)??{},r=[Ex(e,A),dx(e,A),ms(t),nA("name",()=>A),nA("$name",()=>A),nA("$parent",()=>e._appliedParent)];return ft({},r)}function Ex(e,A){let t=dt(A),r=Object.keys(lr.ModelAction).concat("count");return{getKeys(){return r},getPropertyValue(n){let i=n,s=a=>e._request(a);s=EI(i,A,e._clientVersion,s);let o=a=>c=>{let g=Cr(e._errorFormat);return e._createPrismaPromise(l=>{let u={args:c,dataPath:[],action:i,model:A,clientMethod:`${t}.${n}`,jsModelName:t,transaction:l,callsite:g};return s({...u,...a})})};return lx.includes(i)?ou(e,A,o):hx(n)?cI(e,n,o):o({})}}}function hx(e){return ux.includes(e)}function dx(e,A){return Yr(nA("fields",()=>{let t=e._runtimeDataModel.models[A];return gI(A,t)}))}function hI(e){return e.replace(/^./,A=>A.toUpperCase())}var cu=Symbol();function ws(e){let A=[Qx(e),nA(cu,()=>e),nA("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&A.push(ms(t)),ft(e,A)}function Qx(e){let A=Object.keys(e._runtimeDataModel.models),t=A.map(dt),r=[...new Set(A.concat(t))];return Yr({getKeys(){return r},getPropertyValue(n){let i=hI(n);if(e._runtimeDataModel.models[i]!==void 0)return au(e,i);if(e._runtimeDataModel.models[n]!==void 0)return au(e,n)},getPropertyDescriptor(n){if(!t.includes(n))return{enumerable:!1}}})}function dI(e){return e[cu]?e[cu]:e}function QI(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let A=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return ws(A)}function CI({result:e,modelName:A,select:t,omit:r,extensions:n}){let i=n.getAllComputedFields(A);if(!i)return e;let s=[],o=[];for(let a of Object.values(i)){if(r){if(r[a.name])continue;let c=a.needs.filter(g=>r[g]);c.length>0&&o.push(Vn(c))}else if(t){if(!t[a.name])continue;let c=a.needs.filter(g=>!t[g]);c.length>0&&o.push(Vn(c))}Cx(e,a.needs)&&s.push(fx(a,ft(e,s)))}return s.length>0||o.length>0?ft(e,[...s,...o]):e}function Cx(e,A){return A.every(t=>Tl(e,t))}function fx(e,A){return Yr(nA(e.name,()=>e.compute(A)))}function Va({visitor:e,result:A,args:t,runtimeDataModel:r,modelName:n}){if(Array.isArray(A)){for(let s=0;sg.name===i);if(!a||a.kind!=="object"||!a.relationName)continue;let c=typeof s=="object"?s:{};A[i]=Va({visitor:n,result:A[i],args:c,modelName:a.type,runtimeDataModel:r})}}function II({result:e,modelName:A,args:t,extensions:r,runtimeDataModel:n,globalOmit:i}){return r.isEmpty()||e==null||typeof e!="object"||!n.models[A]?e:Va({result:e,args:t??{},modelName:A,runtimeDataModel:n,visitor:(o,a,c)=>{let g=dt(a);return CI({result:o,modelName:g,select:c.select,omit:c.select?void 0:{...i?.[g],...c.omit},extensions:r})}})}function BI(e){if(e instanceof dA)return Ix(e);if(Array.isArray(e)){let t=[e[0]];for(let r=1;r{let i=A.customDataProxyFetch;return"transaction"in A&&n!==void 0&&(A.transaction?.kind==="batch"&&A.transaction.lock.then(),A.transaction=n),r===t.length?e._executeRequest(A):t[r]({model:A.model,operation:A.model?A.action:A.clientMethod,args:BI(A.args??{}),__internalParams:A,query:(s,o=A)=>{let a=o.customDataProxyFetch;return o.customDataProxyFetch=DI(i,a),o.args=s,mI(e,o,t,r+1)}})})}function yI(e,A){let{jsModelName:t,action:r,clientMethod:n}=A,i=t?r:n;if(e._extensions.isEmpty())return e._executeRequest(A);let s=e._extensions.getAllQueryCallbacks(t??"$none",i);return mI(e,A,s)}function wI(e){return A=>{let t={requests:A},r=A[0].extensions.getAllBatchQueryCallbacks();return r.length?RI(t,r,0,e):e(t)}}function RI(e,A,t,r){if(t===A.length)return r(e);let n=e.customDataProxyFetch,i=e.requests[0].transaction;return A[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:i?{isolationLevel:i.kind==="batch"?i.isolationLevel:void 0}:void 0},__internalParams:e,query(s,o=e){let a=o.customDataProxyFetch;return o.customDataProxyFetch=DI(n,a),RI(o,A,t+1,r)}})}var pI=e=>e;function DI(e=pI,A=pI){return t=>e(A(t))}var bI=ie("prisma:client"),kI={Vercel:"vercel","Netlify CI":"netlify"};function SI({postinstall:e,ciName:A,clientVersion:t}){if(bI("checkPlatformCaching:postinstall",e),bI("checkPlatformCaching:ciName",A),e===!0&&A&&A in kI){let r=`Prisma has detected that this project was built on ${A}, 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/${kI[A]}-build`;throw console.error(r),new z(r,t)}}function FI(e,A){return e?e.datasources?e.datasources:e.datasourceUrl?{[A[0]]:{url:e.datasourceUrl}}:{}:{}}var Bx="Cloudflare-Workers",px="node";function NI(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Bx?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===px?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var mx={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 xI(){let e=NI();return{id:e,prettyName:mx[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var UR=require("child_process"),TR=Z(kC()),Tg=Z(require("fs"));var MR=Z(TC());function Hn(e){return typeof e=="string"?e:e.message}function LI(e){if(e.fields?.message){let A=e.fields?.message;return e.fields?.file&&(A+=` in ${e.fields.file}`,e.fields?.line&&(A+=`:${e.fields.line}`),e.fields?.column&&(A+=`:${e.fields.column}`)),e.fields?.reason&&(A+=` +${e.fields?.reason}`),A}return"Unknown error"}function UI(e){return e.fields?.message==="PANIC"}function yx(e){return e.timestamp&&typeof e.level=="string"&&typeof e.target=="string"}function gu(e){return yx(e)&&(e.level==="error"||e.fields?.message?.includes("fatal error"))}function TI(e){let t=wx(e.fields)?"query":e.level.toLowerCase();return{...e,level:t,timestamp:new Date(e.timestamp)}}function wx(e){return!!e.query}var Ds=class extends Error{constructor({clientVersion:A,error:t}){let r=LI(t);super(r??"Unknown error"),this._isPanic=UI(t),this.clientVersion=A}get[Symbol.toStringTag](){return"PrismaClientRustError"}isPanic(){return this._isPanic}};L(Ds,"PrismaClientRustError");var JI=Z(require("fs")),bs=Z(require("path"));function qa(e){let{runtimeBinaryTarget:A}=e;return`Add "${A}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: + +${Rx(e)}`}function Rx(e){let{generator:A,generatorBinaryTargets:t,runtimeBinaryTarget:r}=e,n={fromEnvVar:null,value:r},i=[...t,n];return xl({...A,binaryTargets:i})}function fr(e){let{runtimeBinaryTarget:A}=e;return`Prisma Client could not locate the Query Engine for runtime "${A}".`}function Ir(e){let{searchedLocations:A}=e;return`The following locations have been searched: +${[...new Set(A)].map(n=>` ${n}`).join(` +`)}`}function MI(e){let{runtimeBinaryTarget:A}=e;return`${fr(e)} + +This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${A}". +${qa(e)} + +${Ir(e)}`}function Oa(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 Ha(e){let{errorStack:A}=e;return A?.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 vI(e){let{queryEngineName:A}=e;return`${fr(e)}${Ha(e)} + +This is likely caused by a bundler that has not copied "${A}" next to the resulting bundle. +Ensure that "${A}" has been copied next to the bundle or in "${e.expectedLocation}". + +${Oa("engine-not-found-bundler-investigation")} + +${Ir(e)}`}function PI(e){let{runtimeBinaryTarget:A,generatorBinaryTargets:t}=e,r=t.find(n=>n.native);return`${fr(e)} + +This happened because Prisma Client was generated for "${r?.value??"unknown"}", but the actual deployment required "${A}". +${qa(e)} + +${Ir(e)}`}function GI(e){let{queryEngineName:A}=e;return`${fr(e)}${Ha(e)} + +This is likely caused by tooling that has not copied "${A}" to the deployment folder. +Ensure that you ran \`prisma generate\` and that "${A}" has been copied to "${e.expectedLocation}". + +${Oa("engine-not-found-tooling-investigation")} + +${Ir(e)}`}var Dx=ie("prisma:client:engines:resolveEnginePath"),bx=()=>new RegExp("runtime[\\\\/]binary\\.m?js$");async function lu(e,A){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??A.prismaPath;if(t!==void 0)return t;let{enginePath:r,searchedLocations:n}=await kx(e,A);if(Dx("enginePath",r),r!==void 0&&e==="binary"&&Rl(r),r!==void 0)return A.prismaPath=r;let i=await Tr(),s=A.generator?.binaryTargets??[],o=s.some(u=>u.native),a=!s.some(u=>u.value===i),c=__filename.match(bx())===null,g={searchedLocations:n,generatorBinaryTargets:s,generator:A.generator,runtimeBinaryTarget:i,queryEngineName:YI(e,i),expectedLocation:bs.default.relative(process.cwd(),A.dirname),errorStack:new Error().stack},l;throw o&&a?l=PI(g):a?l=MI(g):c?l=vI(g):l=GI(g),new z(l,A.clientVersion)}async function kx(engineType,config){let binaryTarget=await Tr(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,bs.default.resolve(dirname,".."),config.generator?.output?.value??dirname,bs.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(MC());for(let e of searchLocations){let A=YI(engineType,binaryTarget),t=bs.default.join(e,A);if(searchedLocations.push(e),JI.default.existsSync(t))return{enginePath:t,searchedLocations}}return{enginePath:void 0,searchedLocations}}function YI(e,A){return e==="library"?Go(A,"fs"):`query-engine-${A}${A==="windows"?".exe":""}`}var uu=Z(Ul());function VI(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,A=>`${A[0]}5`):""}function qI(e){return e.split(` +`).map(A=>A.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 OI=Z(tf());function HI({title:e,user:A="prisma",repo:t="prisma",template:r="bug_report.yml",body:n}){return(0,OI.default)({user:A,repo:t,template:r,title:e,body:n})}function WI({version:e,binaryTarget:A,title:t,description:r,engineVersion:n,database:i,query:s}){let o=vd(6e3-(s?.length??0)),a=qI((0,uu.default)(o)),c=r?`# Description +\`\`\` +${r} +\`\`\``:"",g=(0,uu.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${process.version?.padEnd(19)}| +| OS | ${A?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${n?.padEnd(19)}| +| Database | ${i?.padEnd(19)}| + +${c} + +## Logs +\`\`\` +${a} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?VI(s):""} +\`\`\` +`),l=HI({title:t,body:g});return`${t} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${EA(l)} + +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. +`}var SR=Z(fl()),RY=()=>kR();function DY(e){if(e===void 0)throw new Error("Connection has not been opened")}var rr=class{constructor(){}static async onHttpError(A,t){let r=await A;return r.statusCode>=400?t(r):r}open(A,t){this._pool||(this._pool=new(RY()).Pool(A,{connections:1e3,keepAliveMaxTimeout:6e5,headersTimeout:0,bodyTimeout:0,...t}))}async raw(A,t,r,n,i=!0){DY(this._pool);let s=await this._pool.request({path:t,method:A,headers:{"Content-Type":"application/json",...r},body:n}),o=await(0,SR.default)(s.body);return{statusCode:s.statusCode,headers:s.headers,data:i?JSON.parse(o):o}}post(A,t,r,n){return this.raw("POST",A,r,t,n)}get(A,t){return this.raw("GET",A,t)}close(){this._pool&&this._pool.close(()=>{}),this._pool=void 0}};var tA=ie("prisma:engine"),fo=(...e)=>{},FR=[...Xg,"native"],Mg=[],NR=process.env.PRISMA_CLIENT_NO_RETRY?1:2,xR=process.env.PRISMA_CLIENT_NO_RETRY?1:2,Bo=class{constructor(A){this.name="BinaryEngine";this.startCount=0;this.previewFeatures=[];this.stderrLogs="";this.handleRequestError=async A=>{tA({error:A}),this.startPromise&&await this.startPromise;let t=["ECONNRESET","ECONNREFUSED","UND_ERR_CLOSED","UND_ERR_SOCKET","UND_ERR_DESTROYED","UND_ERR_ABORTED"].includes(A.code);if(A instanceof xe)return{error:A,shouldRetry:!1};try{if(this.throwAsyncErrorIfExists(),this.currentRequestPromise?.isCanceled)this.throwAsyncErrorIfExists();else if(t){if(this.globalKillSignalReceived&&!this.child?.connected)throw new ve(`The Node.js process already received a ${this.globalKillSignalReceived} signal, therefore the Prisma query engine exited + and your request can't be processed. + You probably have some open handle that prevents your process from exiting. + It could be an open http server or stream that didn't close yet. + We recommend using the \`wtfnode\` package to debug open handles.`,{clientVersion:this.clientVersion});if(this.throwAsyncErrorIfExists(),this.startCount>NR){for(let r=0;r<5;r++)await new Promise(n=>setTimeout(n,50)),this.throwAsyncErrorIfExists(!0);throw new Error(`Query engine is trying to restart, but can't. + Please look into the logs or turn on the env var DEBUG=* to debug the constantly restarting query engine.`)}}throw this.throwAsyncErrorIfExists(!0),A}catch(r){return{error:r,shouldRetry:t}}};this.config=A,this.env=A.env,this.cwd=this.resolveCwd(A.cwd),this.enableDebugLogs=A.enableDebugLogs??!1,this.allowTriggerPanic=A.allowTriggerPanic??!1,this.datamodelPath=A.datamodelPath,this.tracingHelper=A.tracingHelper,this.logEmitter=A.logEmitter,this.showColors=A.showColors??!1,this.logQueries=A.logQueries??!1,this.clientVersion=A.clientVersion,this.flags=A.flags??[],this.previewFeatures=A.previewFeatures??[],this.activeProvider=A.activeProvider,this.connection=new rr;let t=Object.keys(A.overrideDatasources)[0],r=A.overrideDatasources[t]?.url;t!==void 0&&r!==void 0&&(this.datasourceOverrides=[{name:t,url:r}]),bY();let n=["middlewares","aggregateApi","distinct","aggregations","insensitiveFilters","atomicNumberOperations","transactionApi","transaction","connectOrCreate","uncheckedScalarInputs","nativeTypes","createMany","groupBy","referentialActions","microsoftSqlServer"],i=this.previewFeatures.filter(s=>n.includes(s));if(i.length>0&&!process.env.PRISMA_HIDE_PREVIEW_FLAG_WARNINGS&&console.log(`${Ut(Ve("info"))} The preview flags \`${i.join("`, `")}\` were removed, you can now safely remove them from your schema.prisma.`),this.previewFeatures=this.previewFeatures.filter(s=>!n.includes(s)),this.engineEndpoint=A.engineEndpoint,this.binaryTarget){if(!FR.includes(this.binaryTarget)&&!Tg.default.existsSync(this.binaryTarget))throw new z(`Unknown ${vA("PRISMA_QUERY_ENGINE_BINARY")} ${vA(Ve(this.binaryTarget))}. Possible binaryTargets: ${ir(FR.join(", "))} or a path to the query engine binary. +You may have to run ${ir("prisma generate")} for your changes to take effect.`,this.clientVersion)}else this.getCurrentBinaryTarget();this.enableDebugLogs&&ie.enable("*"),Mg.push(this)}setError(A){gu(A)&&(this.lastError=new Ds({clientVersion:this.clientVersion,error:A}),this.lastError.isPanic()&&(this.child&&(this.stopPromise=kY(this.child)),this.currentRequestPromise?.cancel&&this.currentRequestPromise.cancel()))}resolveCwd(A){return Tg.default.existsSync(A)&&Tg.default.lstatSync(A).isDirectory()?A:process.cwd()}onBeforeExit(A){this.beforeExitListener=A}async emitExit(){if(this.beforeExitListener)try{await this.beforeExitListener()}catch(A){console.error(A)}}async getCurrentBinaryTarget(){return this.binaryTargetPromise?this.binaryTargetPromise:(this.binaryTargetPromise=Tr(),this.binaryTargetPromise)}printDatasources(){return this.datasourceOverrides?JSON.stringify(this.datasourceOverrides):"[]"}async start(){this.stopPromise&&await this.stopPromise;let A={times:10},t=async()=>{try{await this.internalStart()}catch(n){throw n.retryable===!0&&A.times>0&&(A.times--,await t()),n}},r=async()=>{if(this.startPromise||(this.startCount++,this.startPromise=t()),await this.startPromise,!this.child&&!this.engineEndpoint)throw new ve("Can't perform request, as the Engine has already been stopped",{clientVersion:this.clientVersion})};return this.startPromise?r():this.tracingHelper.runInChildSpan("connect",r)}getEngineEnvVars(){let A={PRISMA_DML_PATH:this.datamodelPath};this.logQueries&&(A.LOG_QUERIES="true"),this.datasourceOverrides&&(A.OVERWRITE_DATASOURCES=this.printDatasources()),!process.env.NO_COLOR&&this.showColors&&(A.CLICOLOR_FORCE="1");let t=this.tracingHelper.getTraceParent();return t&&(A.TRACE_CONTEXT=JSON.stringify({traceparent:t})),{...this.env,...process.env,...A,RUST_BACKTRACE:process.env.RUST_BACKTRACE??"1",RUST_LOG:process.env.RUST_LOG??"info"}}internalStart(){return new Promise(async(A,t)=>{if(await new Promise(r=>process.nextTick(r)),this.stopPromise&&await this.stopPromise,this.engineEndpoint){try{this.connection.open(this.engineEndpoint),await(0,MR.default)(()=>this.connection.get("/status"),{retries:10})}catch(r){return t(r)}return A()}try{(this.child?.connected||this.child&&!this.child?.killed)&&tA("There is a child that still runs and we want to start again"),this.lastError=void 0,fo("startin & resettin"),this.globalKillSignalReceived=void 0,tA({cwd:this.cwd});let r=await lu("binary",this.config),n=this.allowTriggerPanic?["--debug"]:[],i=["--enable-raw-queries","--enable-metrics","--enable-open-telemetry",...this.flags,...n];i.push("--port","0"),i.push("--engine-protocol","json"),tA({flags:i});let s=this.getEngineEnvVars();if(this.child=(0,UR.spawn)(r,i,{env:s,cwd:this.cwd,windowsHide:!0,stdio:["ignore","pipe","pipe"]}),os(this.child.stderr).on("data",o=>{let a=String(o);tA("stderr",a);try{let c=JSON.parse(a);if(typeof c.is_panic<"u"&&(tA(c),this.setError(c),this.engineStartDeferred)){let g=new z(c.message,this.clientVersion,c.error_code);this.engineStartDeferred.reject(g)}}catch{!a.includes("Printing to stderr")&&!a.includes("Listening on ")&&(this.stderrLogs+=` +`+a)}}),os(this.child.stdout).on("data",o=>{let a=String(o);try{let c=JSON.parse(a);if(tA("stdout",Hn(c)),this.engineStartDeferred&&c.level==="INFO"&&c.target==="query_engine::server"&&c.fields?.message?.startsWith("Started query engine http server")){let g=c.fields.ip,l=c.fields.port;if(g===void 0||l===void 0){this.engineStartDeferred.reject(new z('This version of Query Engine is not compatible with Prisma Client: "ip" and "port" fields are missing in the startup log entry',this.clientVersion));return}this.connection.open(`http://${g}:${l}`),this.engineStartDeferred.resolve(),this.engineStartDeferred=void 0}if(typeof c.is_panic>"u"){if(c.span===!0){this.tracingHelper.createEngineSpan(c);return}let g=TI(c);gu(g)?this.setError(g):g.level==="query"?this.logEmitter.emit(g.level,{timestamp:g.timestamp,query:g.fields.query,params:g.fields.params,duration:g.fields.duration_ms,target:g.target}):this.logEmitter.emit(g.level,{timestamp:g.timestamp,message:g.fields.message,target:g.target})}else this.setError(c)}catch(c){tA(c,a)}}),this.child.on("exit",o=>{if(fo("removing startPromise"),this.startPromise=void 0,this.engineStopDeferred){this.engineStopDeferred.resolve(o);return}if(this.connection.close(),o!==0&&this.engineStartDeferred&&this.startCount===1){let a,c=this.stderrLogs;this.lastError&&(c=Hn(this.lastError)),o!==null?(a=new z(`Query engine exited with code ${o} +`+c,this.clientVersion),a.retryable=!0):this.child?.signalCode?(a=new z(`Query engine process killed with signal ${this.child.signalCode} for unknown reason. +Make sure that the engine binary at ${r} is not corrupt. +`+c,this.clientVersion),a.retryable=!0):a=new z(c,this.clientVersion),this.engineStartDeferred.reject(a)}this.child&&(this.lastError||o===126&&this.setError({timestamp:new Date,target:"binary engine process exit",level:"error",fields:{message:`Couldn't start query engine as it's not executable on this operating system. +You very likely have the wrong "binaryTarget" defined in the schema.prisma file.`}}))}),this.child.on("error",o=>{this.setError({timestamp:new Date,target:"binary engine process error",level:"error",fields:{message:`Couldn't start query engine: ${o}`}}),t(o)}),this.child.on("close",(o,a)=>{this.connection.close();let c;o===null&&a==="SIGABRT"&&this.child?c=new JA(this.getErrorMessageWithLink("Panic in Query Engine with SIGABRT signal"),this.clientVersion):o===255&&a===null&&this.lastError&&(c=this.lastError),c&&this.logEmitter.emit("error",{message:c.message,timestamp:new Date,target:"binary engine process close"})}),this.lastError)return t(new z(Hn(this.lastError),this.clientVersion));try{await new Promise((o,a)=>{this.engineStartDeferred={resolve:o,reject:a}})}catch(o){throw this.child?.kill(),o}(async()=>{try{let o=await this.version(!0);tA(`Client Version: ${this.clientVersion}`),tA(`Engine Version: ${o}`),tA(`Active provider: ${this.activeProvider}`)}catch(o){tA(o)}})(),this.stopPromise=void 0,A()}catch(r){t(r)}})}async stop(){let A=async()=>(this.stopPromise||(this.stopPromise=this._stop()),this.stopPromise);return this.tracingHelper.runInChildSpan("disconnect",A)}async _stop(){if(this.startPromise&&await this.startPromise,await new Promise(t=>process.nextTick(t)),this.currentRequestPromise)try{await this.currentRequestPromise}catch{}let A;this.child&&(tA("Stopping Prisma engine"),this.startPromise&&(tA("Waiting for start promise"),await this.startPromise),tA("Done waiting for start promise"),this.child.exitCode===null?A=new Promise((t,r)=>{this.engineStopDeferred={resolve:t,reject:r}}):tA("Child already exited with code",this.child.exitCode),this.connection.close(),this.child.kill(),this.child=void 0),A&&await A,await new Promise(t=>process.nextTick(t)),this.startPromise=void 0,this.engineStopDeferred=void 0}kill(A){this.globalKillSignalReceived=A,this.child?.kill(),this.connection.close()}async version(A=!1){return this.versionPromise&&!A?this.versionPromise:(this.versionPromise=this.internalVersion(),this.versionPromise)}async internalVersion(){let A=await lu("binary",this.config),t=await(0,TR.default)(A,["--version"]);return this.lastVersion=t.stdout,this.lastVersion}async request(A,{traceparent:t,numTry:r=1,isWrite:n,interactiveTransaction:i}){await this.start();let s={};t&&(s.traceparent=t),i&&(s["X-transaction-id"]=i.id);let o=JSON.stringify(A);this.currentRequestPromise=rr.onHttpError(this.connection.post("/",o,s),a=>this.httpErrorHandler(a)),this.lastQuery=o;try{let{data:a,headers:c}=await this.currentRequestPromise;if(a.errors)throw a.errors.length===1?Yt(a.errors[0],this.clientVersion,this.config.activeProvider):new ve(JSON.stringify(a.errors),{clientVersion:this.clientVersion});let g=parseInt(c["x-elapsed"])/1e3;return this.startCount>0&&(this.startCount=0),this.currentRequestPromise=void 0,{data:a,elapsed:g}}catch(a){fo("req - e",a);let{error:c,shouldRetry:g}=await this.handleRequestError(a);if(r<=xR&&g&&!n)return fo("trying a retry now"),this.request(A,{traceparent:t,numTry:r+1,isWrite:n,interactiveTransaction:i});throw c}}async requestBatch(A,{traceparent:t,transaction:r,numTry:n=1,containsWrite:i}){await this.start();let s={};t&&(s.traceparent=t);let o=r?.kind==="itx"?r.options:void 0;o&&(s["X-transaction-id"]=o.id);let a=qn(A,r);return this.lastQuery=JSON.stringify(a),this.currentRequestPromise=rr.onHttpError(this.connection.post("/",this.lastQuery,s),c=>this.httpErrorHandler(c)),this.currentRequestPromise.then(({data:c,headers:g})=>{let l=parseInt(g["x-elapsed"])/1e3,{batchResult:u}=c;if(Array.isArray(u))return u.map(E=>E.errors&&E.errors.length>0?Yt(E.errors[0],this.clientVersion,this.config.activeProvider):{data:E,elapsed:l});throw Yt(c.errors[0],this.clientVersion,this.config.activeProvider)}).catch(async c=>{let{error:g,shouldRetry:l}=await this.handleRequestError(c);if(l&&!i&&n<=xR)return this.requestBatch(A,{traceparent:t,transaction:r,numTry:n+1,containsWrite:i});throw g})}async transaction(A,t,r){if(await this.start(),A==="start"){let n=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel});return(await rr.onHttpError(this.connection.post("/transaction/start",n,t),s=>this.httpErrorHandler(s))).data}else A==="commit"?await rr.onHttpError(this.connection.post(`/transaction/${r.id}/commit`,void 0,t),n=>this.httpErrorHandler(n)):A==="rollback"&&await rr.onHttpError(this.connection.post(`/transaction/${r.id}/rollback`,void 0,t),n=>this.httpErrorHandler(n))}get hasMaxRestarts(){return this.startCount>=NR}throwAsyncErrorIfExists(A=!1){if(fo("throwAsyncErrorIfExists",this.startCount,this.hasMaxRestarts),this.lastError&&(this.hasMaxRestarts||A)){let t=this.lastError;throw this.lastError=void 0,t.isPanic()?new JA(this.getErrorMessageWithLink(Hn(t)),this.clientVersion):new ve(this.getErrorMessageWithLink(Hn(t)),{clientVersion:this.clientVersion})}}getErrorMessageWithLink(A){return WI({binaryTarget:this.binaryTarget,title:A,version:this.clientVersion,engineVersion:this.lastVersion,database:this.lastActiveProvider,query:this.lastQuery})}async metrics({format:A,globalLabels:t}){await this.start();let r=A==="json";return(await this.connection.post(`/metrics?format=${encodeURIComponent(A)}`,JSON.stringify(t),null,r)).data}httpErrorHandler(A){let t=A.data;throw new xe(t.message,{code:t.error_code,clientVersion:this.clientVersion,meta:t.meta})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Io(e,A=!1){process.once(e,async()=>{for(let t of Mg)await t.emitExit(),t.kill(e);Mg.splice(0,Mg.length),A&&process.listenerCount(e)===0&&process.exit()})}var LR=!1;function bY(){LR||(Io("beforeExit"),Io("exit"),Io("SIGINT",!0),Io("SIGUSR2",!0),Io("SIGTERM",!0),LR=!0)}function kY(e){return new Promise(A=>{e.once("exit",A),e.kill()})}function vi({inlineDatasources:e,overrideDatasources:A,env:t,clientVersion:r}){let n,i=Object.keys(e)[0],s=e[i]?.url,o=A[i]?.url;if(i===void 0?n=void 0:o?n=o:s?.value?n=s.value:s?.fromEnvVar&&(n=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&n===void 0)throw new z(`error: Environment variable not found: ${s.fromEnvVar}.`,r);if(n===void 0)throw new z("error: Missing URL environment variable, value, or override.",r);return n}var vg=class extends Error{constructor(A,t){super(A),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var wA=class extends vg{constructor(A,t){super(A,t),this.isRetryable=t.isRetryable??!0}};function j(e,A){return{...e,isRetryable:A}}var Pi=class extends wA{constructor(t){super("This request must be retried",j(t,!0));this.name="ForcedRetryError";this.code="P5001"}};L(Pi,"ForcedRetryError");var un=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="InvalidDatasourceError";this.code="P6001"}};L(un,"InvalidDatasourceError");var En=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="NotImplementedYetError";this.code="P5004"}};L(En,"NotImplementedYetError");var Ce=class extends wA{constructor(A,t){super(A,t),this.response=t.response;let r=this.response.headers.get("prisma-request-id");if(r){let n=`(The request id was: ${r})`;this.message=this.message+" "+n}}};var hn=class extends Ce{constructor(t){super("Schema needs to be uploaded",j(t,!0));this.name="SchemaMissingError";this.code="P5005"}};L(hn,"SchemaMissingError");var ad="This request could not be understood by the server",po=class extends Ce{constructor(t,r,n){super(r||ad,j(t,!1));this.name="BadRequestError";this.code="P5000";n&&(this.code=n)}};L(po,"BadRequestError");var mo=class extends Ce{constructor(t,r){super("Engine not started: healthcheck timeout",j(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=r}};L(mo,"HealthcheckTimeoutError");var yo=class extends Ce{constructor(t,r,n){super(r,j(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=n}};L(yo,"EngineStartupError");var wo=class extends Ce{constructor(t){super("Engine version is not supported",j(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};L(wo,"EngineVersionNotSupportedError");var cd="Request timed out",Ro=class extends Ce{constructor(t,r=cd){super(r,j(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};L(Ro,"GatewayTimeoutError");var SY="Interactive transaction error",Do=class extends Ce{constructor(t,r=SY){super(r,j(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};L(Do,"InteractiveTransactionError");var FY="Request parameters are invalid",bo=class extends Ce{constructor(t,r=FY){super(r,j(t,!1));this.name="InvalidRequestError";this.code="P5011"}};L(bo,"InvalidRequestError");var gd="Requested resource does not exist",ko=class extends Ce{constructor(t,r=gd){super(r,j(t,!1));this.name="NotFoundError";this.code="P5003"}};L(ko,"NotFoundError");var ld="Unknown server error",Gi=class extends Ce{constructor(t,r,n){super(r||ld,j(t,!0));this.name="ServerError";this.code="P5006";this.logs=n}};L(Gi,"ServerError");var ud="Unauthorized, check your connection string",So=class extends Ce{constructor(t,r=ud){super(r,j(t,!1));this.name="UnauthorizedError";this.code="P5007"}};L(So,"UnauthorizedError");var Ed="Usage exceeded, retry again later",Fo=class extends Ce{constructor(t,r=Ed){super(r,j(t,!0));this.name="UsageExceededError";this.code="P5008"}};L(Fo,"UsageExceededError");async function NY(e){let A;try{A=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(A);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let r=Object.values(t)[0].reason;return typeof r=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(r)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return A===""?{type:"EmptyError"}:{type:"UnknownTextError",body:A}}}async function No(e,A){if(e.ok)return;let t={clientVersion:A,response:e},r=await NY(e);if(r.type==="QueryEngineError")throw new xe(r.body.message,{code:r.body.error_code,clientVersion:A});if(r.type==="DataProxyError"){if(r.body==="InternalDataProxyError")throw new Gi(t,"Internal Data Proxy error");if("EngineNotStarted"in r.body){if(r.body.EngineNotStarted.reason==="SchemaMissing")return new hn(t);if(r.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new wo(t);if("EngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,logs:i}=r.body.EngineNotStarted.reason.EngineStartupError;throw new yo(t,n,i)}if("KnownEngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,error_code:i}=r.body.EngineNotStarted.reason.KnownEngineStartupError;throw new z(n,A,i)}if("HealthcheckTimeout"in r.body.EngineNotStarted.reason){let{logs:n}=r.body.EngineNotStarted.reason.HealthcheckTimeout;throw new mo(t,n)}}if("InteractiveTransactionMisrouted"in r.body){let n={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 Do(t,n[r.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in r.body)throw new bo(t,r.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new So(t,Ji(ud,r));if(e.status===404)return new ko(t,Ji(gd,r));if(e.status===429)throw new Fo(t,Ji(Ed,r));if(e.status===504)throw new Ro(t,Ji(cd,r));if(e.status>=500)throw new Gi(t,Ji(ld,r));if(e.status>=400)throw new po(t,Ji(ad,r))}function Ji(e,A){return A.type==="EmptyError"?e:`${e}: ${JSON.stringify(A)}`}function vR(e){let A=Math.pow(2,e)*50,t=Math.ceil(Math.random()*A)-Math.ceil(A/2),r=A+t;return new Promise(n=>setTimeout(()=>n(r),r))}var nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function PR(e){let A=new TextEncoder().encode(e),t="",r=A.byteLength,n=r%3,i=r-n,s,o,a,c,g;for(let l=0;l>18,o=(g&258048)>>12,a=(g&4032)>>6,c=g&63,t+=nr[s]+nr[o]+nr[a]+nr[c];return n==1?(g=A[i],s=(g&252)>>2,o=(g&3)<<4,t+=nr[s]+nr[o]+"=="):n==2&&(g=A[i]<<8|A[i+1],s=(g&64512)>>10,o=(g&1008)>>4,a=(g&15)<<2,t+=nr[s]+nr[o]+nr[a]+"="),t}function GR(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new z("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 xY(e){return e[0]*1e3+e[1]/1e6}function JR(e){return new Date(xY(e))}var YR={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var xo=class extends wA{constructor(t,r){super(`Cannot fetch data from service: +${t}`,j(r,!0));this.name="RequestError";this.code="P5010"}};L(xo,"RequestError");async function dn(e,A,t=r=>r){let r=A.clientVersion;try{return typeof fetch=="function"?await t(fetch)(e,A):await t(hd)(e,A)}catch(n){let i=n.message??"Unknown error";throw new xo(i,{clientVersion:r})}}function UY(e){return{...e.headers,"Content-Type":"application/json"}}function TY(e){return{method:e.method,headers:UY(e)}}function MY(e,A){return{text:()=>Promise.resolve(Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(Buffer.concat(e).toString())),ok:A.statusCode>=200&&A.statusCode<=299,status:A.statusCode,url:A.url,headers:new dd(A.headers)}}async function hd(e,A={}){let t=vY("https"),r=TY(A),n=[],{origin:i}=new URL(e);return new Promise((s,o)=>{let a=t.request(e,r,c=>{let{statusCode:g,headers:{location:l}}=c;g>=301&&g<=399&&l&&(l.startsWith("http")===!1?s(hd(`${i}${l}`,A)):s(hd(l,A))),c.on("data",u=>n.push(u)),c.on("end",()=>s(MY(n,c))),c.on("error",o)});a.on("error",o),a.end(A.body??"")})}var vY=typeof require<"u"?require:()=>{},dd=class{constructor(A={}){this.headers=new Map;for(let[t,r]of Object.entries(A))if(typeof r=="string")this.headers.set(t,r);else if(Array.isArray(r))for(let n of r)this.headers.set(t,n)}append(A,t){this.headers.set(A,t)}delete(A){this.headers.delete(A)}get(A){return this.headers.get(A)??null}has(A){return this.headers.has(A)}set(A,t){this.headers.set(A,t)}forEach(A,t){for(let[r,n]of this.headers)A.call(t,n,r,this)}};var PY=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,VR=ie("prisma:client:dataproxyEngine");async function GY(e,A){let t=YR["@prisma/engines-version"],r=A.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&r!=="0.0.0"&&r!=="in-memory")return r;let[n,i]=r?.split("-")??[];if(i===void 0&&PY.test(n))return n;if(i!==void 0||r==="0.0.0"||r==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=t.split("-")??[],[o,a,c]=s.split("."),g=JY(`<=${o}.${a}.${c}`),l=await dn(g,{clientVersion:r});if(!l.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${l.status} ${l.statusText}, response body: ${await l.text()||""}`);let u=await l.text();VR("length of body fetched from unpkg.com",u.length);let E;try{E=JSON.parse(u)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",u),h}return E.version}throw new En("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:r})}async function qR(e,A){let t=await GY(e,A);return VR("version",t),t}function JY(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var OR=3,Qd=ie("prisma:client:dataproxyEngine"),Cd=class{constructor({apiKey:A,tracingHelper:t,logLevel:r,logQueries:n,engineHash:i}){this.apiKey=A,this.tracingHelper=t,this.logLevel=r,this.logQueries=n,this.engineHash=i}build({traceparent:A,interactiveTransaction:t}={}){let r={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(r.traceparent=A??this.tracingHelper.getTraceParent()),t&&(r["X-transaction-id"]=t.id);let n=this.buildCaptureSettings();return n.length>0&&(r["X-capture-telemetry"]=n.join(", ")),r}buildCaptureSettings(){let A=[];return this.tracingHelper.isEnabled()&&A.push("tracing"),this.logLevel&&A.push(this.logLevel),this.logQueries&&A.push("query"),A}},Lo=class{constructor(A){this.name="DataProxyEngine";GR(A),this.config=A,this.env={...A.env,...typeof process<"u"?process.env:{}},this.inlineSchema=PR(A.inlineSchema),this.inlineDatasources=A.inlineDatasources,this.inlineSchemaHash=A.inlineSchemaHash,this.clientVersion=A.clientVersion,this.engineHash=A.engineVersion,this.logEmitter=A.logEmitter,this.tracingHelper=A.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[A,t]=this.extractHostAndApiKey();this.host=A,this.headerBuilder=new Cd({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await qR(A,this.config),Qd("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(A){A?.logs?.length&&A.logs.forEach(t=>{switch(t.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let r=typeof t.attributes.query=="string"?t.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[n]=r.split("/* traceparent");r=n}this.logEmitter.emit("query",{query:r,timestamp:JR(t.timestamp),duration:Number(t.attributes.duration_ms),params:t.attributes.params,target:t.attributes.target})}}}),A?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:A.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(A){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${A}`}async uploadSchema(){let A={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(A,async()=>{let t=await dn(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Qd("schema response status",t.status);let r=await No(t,this.clientVersion);if(r)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${r.message}`,timestamp:new Date,target:""}),r;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(A,{traceparent:t,interactiveTransaction:r,customDataProxyFetch:n}){return this.requestInternal({body:A,traceparent:t,interactiveTransaction:r,customDataProxyFetch:n})}async requestBatch(A,{traceparent:t,transaction:r,customDataProxyFetch:n}){let i=r?.kind==="itx"?r.options:void 0,s=qn(A,r),{batchResult:o,elapsed:a}=await this.requestInternal({body:s,customDataProxyFetch:n,interactiveTransaction:i,traceparent:t});return o.map(c=>"errors"in c&&c.errors.length>0?Yt(c.errors[0],this.clientVersion,this.config.activeProvider):{data:c,elapsed:a})}requestInternal({body:A,traceparent:t,customDataProxyFetch:r,interactiveTransaction:n}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:i})=>{let s=n?`${n.payload.endpoint}/graphql`:await this.url("graphql");i(s);let o=await dn(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,interactiveTransaction:n}),body:JSON.stringify(A),clientVersion:this.clientVersion},r);o.ok||Qd("graphql response status",o.status),await this.handleError(await No(o,this.clientVersion));let a=await o.json(),c=a.extensions;if(c&&this.propagateResponseExtensions(c),a.errors)throw a.errors.length===1?Yt(a.errors[0],this.config.clientVersion,this.config.activeProvider):new ve(a.errors,{clientVersion:this.config.clientVersion});return a}})}async transaction(A,t,r){let n={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${n[A]} transaction`,callback:async({logHttpCall:i})=>{if(A==="start"){let s=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel}),o=await this.url("transaction/start");i(o);let a=await dn(o,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await No(a,this.clientVersion));let c=await a.json(),g=c.extensions;g&&this.propagateResponseExtensions(g);let l=c.id,u=c["data-proxy"].endpoint;return{id:l,payload:{endpoint:u}}}else{let s=`${r.payload.endpoint}/${A}`;i(s);let o=await dn(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await No(o,this.clientVersion));let c=(await o.json()).extensions;c&&this.propagateResponseExtensions(c);return}}})}extractHostAndApiKey(){let A={clientVersion:this.clientVersion},t=Object.keys(this.inlineDatasources)[0],r=vi({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),n;try{n=new URL(r)}catch{throw new un(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,A)}let{protocol:i,host:s,searchParams:o}=n;if(i!=="prisma:"&&i!=="prisma+postgres:")throw new un(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,A);let a=o.get("api_key");if(a===null||a.length<1)throw new un(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,A);return[s,a]}metrics(){throw new En("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(A){for(let t=0;;t++){let r=n=>{this.logEmitter.emit("info",{message:`Calling ${n} (n=${t})`,timestamp:new Date,target:""})};try{return await A.callback({logHttpCall:r})}catch(n){if(!(n instanceof wA)||!n.isRetryable)throw n;if(t>=OR)throw n instanceof Pi?n.cause:n;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${OR} failed for ${A.actionGerund}: ${n.message??"(unknown)"}`,timestamp:new Date,target:""});let i=await vR(t);this.logEmitter.emit("warn",{message:`Retrying after ${i}ms`,timestamp:new Date,target:""})}}}async handleError(A){if(A instanceof hn)throw await this.uploadSchema(),new Pi({clientVersion:this.clientVersion,cause:A});if(A)throw A}applyPendingMigrations(){throw new Error("Method not implemented.")}};function HR({copyEngine:e=!0},A){let t;try{t=vi({inlineDatasources:A.inlineDatasources,overrideDatasources:A.overrideDatasources,env:{...A.env,...process.env},clientVersion:A.clientVersion})}catch{}let r=!!(t?.startsWith("prisma://")||t?.startsWith("prisma+postgres://"));e&&r&&as("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=rs(A.generator),i=r||!e,s=!!A.adapter,o=n==="library",a=n==="binary";if(i&&s||s&&!1){let c;throw e?t?.startsWith("prisma://")?c=["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."]:c=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:c=["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 Oe(c.join(` +`),{clientVersion:A.clientVersion})}if(i)return new Lo(A);if(a)return new Bo(A);throw new Oe("Invalid client engine type, please use `library` or `binary`",{clientVersion:A.clientVersion})}function Pg({generator:e}){return e?.previewFeatures??[]}var WR=e=>({command:e});var _R=e=>e.strings.reduce((A,t,r)=>`${A}@P${r}${t}`);function Yi(e){try{return jR(e,"fast")}catch{return jR(e,"slow")}}function jR(e,A){return JSON.stringify(e.map(t=>ZR(t,A)))}function ZR(e,A){return Array.isArray(e)?e.map(t=>ZR(t,A)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:Nn(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ut.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:YY(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&A==="slow"?XR(e):e}function YY(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function XR(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(KR);let A={};for(let t of Object.keys(e))A[t]=KR(e[t]);return A}function KR(e){return typeof e=="bigint"?e.toString():XR(e)}var VY=["$connect","$disconnect","$on","$transaction","$use","$extends"],zR=VY;var qY=/^(\s*alter\s)/i,$R=ie("prisma:client");function fd(e,A,t,r){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&qY.exec(A))throw new Error(`Running ALTER using ${r} 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 Id=({clientMethod:e,activeProvider:A})=>t=>{let r="",n;if(zf(t))r=t.sql,n={values:Yi(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[i,...s]=t;r=i,n={values:Yi(s||[]),__prismaRawParameters__:!0}}else switch(A){case"sqlite":case"mysql":{r=t.sql,n={values:Yi(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{r=t.text,n={values:Yi(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{r=_R(t),n={values:Yi(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${A} provider does not support ${e}`)}return n?.values?$R(`prisma.${e}(${r}, ${n.values})`):$R(`prisma.${e}(${r})`),{query:r,parameters:n}},eD={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[A,...t]=e;return new dA(A,t)}},AD={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Bd(e){return function(t){let r,n=(i=e)=>{try{return i===void 0||i?.kind==="itx"?r??=tD(t(i)):tD(t(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return n().then(i,s)},catch(i){return n().catch(i)},finally(i){return n().finally(i)},requestTransaction(i){let s=n(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function tD(e){return typeof e.then=="function"?e:Promise.resolve(e)}var rD={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,A){return A()}},pd=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(A){return this.getGlobalTracingHelper().getTraceParent(A)}createEngineSpan(A){return this.getGlobalTracingHelper().createEngineSpan(A)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(A,t){return this.getGlobalTracingHelper().runInChildSpan(A,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??rD}};function nD(e){return e.includes("tracing")?new pd:rD}function iD(e,A=()=>{}){let t,r=new Promise(n=>t=n);return{then(n){return--e===0&&t(A()),n?.(r)}}}function sD(e){return typeof e=="string"?e:e.reduce((A,t)=>{let r=typeof t=="string"?t:t.level;return r==="query"?A:A&&(t==="info"||A==="info")?"info":r},void 0)}var Gg=class{constructor(){this._middlewares=[]}use(A){this._middlewares.push(A)}get(A){return this._middlewares[A]}has(A){return!!this._middlewares[A]}length(){return this._middlewares.length}};var cD=Z(Ul());function Jg(e){return typeof e.batchRequestIdx=="number"}function oD(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let A=[];return e.modelName&&A.push(e.modelName),e.query.arguments&&A.push(md(e.query.arguments)),A.push(md(e.query.selection)),A.join("")}function md(e){return`(${Object.keys(e).sort().map(t=>{let r=e[t];return typeof r=="object"&&r!==null?`(${t} ${md(r)})`:t}).join(" ")})`}var OY={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 yd(e){return OY[e]}var Yg=class{constructor(A){this.options=A;this.tickActive=!1;this.batches={}}request(A){let t=this.options.batchBy(A);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((r,n)=>{this.batches[t].push({request:A,resolve:r,reject:n})})):this.options.singleLoader(A)}dispatchBatches(){for(let A in this.batches){let t=this.batches[A];delete this.batches[A],t.length===1?this.options.singleLoader(t[0].request).then(r=>{r instanceof Error?t[0].reject(r):t[0].resolve(r)}).catch(r=>{t[0].reject(r)}):(t.sort((r,n)=>this.options.batchOrder(r.request,n.request)),this.options.batchLoader(t.map(r=>r.request)).then(r=>{if(r instanceof Error)for(let n=0;n{for(let n=0;nQn("bigint",t));case"bytes-array":return A.map(t=>Qn("bytes",t));case"decimal-array":return A.map(t=>Qn("decimal",t));case"datetime-array":return A.map(t=>Qn("datetime",t));case"date-array":return A.map(t=>Qn("date",t));case"time-array":return A.map(t=>Qn("time",t));default:return A}}function aD(e){let A=[],t=HY(e);for(let r=0;r{let{transaction:i,otelParentCtx:s}=r[0],o=r.map(l=>l.protocolQuery),a=this.client._tracingHelper.getTraceParent(s),c=r.some(l=>yd(l.protocolQuery.action));return(await this.client._engine.requestBatch(o,{traceparent:a,transaction:_Y(i),containsWrite:c,customDataProxyFetch:n})).map((l,u)=>{if(l instanceof Error)return l;try{return this.mapQueryEngineResult(r[u],l)}catch(E){return E}})}),singleLoader:async r=>{let n=r.transaction?.kind==="itx"?gD(r.transaction):void 0,i=await this.client._engine.request(r.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:n,isWrite:yd(r.protocolQuery.action),customDataProxyFetch:r.customDataProxyFetch});return this.mapQueryEngineResult(r,i)},batchBy:r=>r.transaction?.id?`transaction-${r.transaction.id}`:oD(r.protocolQuery),batchOrder(r,n){return r.transaction?.kind==="batch"&&n.transaction?.kind==="batch"?r.transaction.index-n.transaction.index:0}})}async request(A){try{return await this.dataloader.request(A)}catch(t){let{clientMethod:r,callsite:n,transaction:i,args:s,modelName:o}=A;this.handleAndLogRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:s,modelName:o,globalOmit:A.globalOmit})}}mapQueryEngineResult({dataPath:A,unpacker:t},r){let n=r?.data,i=r?.elapsed,s=this.unpack(n,A,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:i}:s}handleAndLogRequestError(A){try{this.handleRequestError(A)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:A.clientMethod,timestamp:new Date}),t}}handleRequestError({error:A,clientMethod:t,callsite:r,transaction:n,args:i,modelName:s,globalOmit:o}){if(WY(A),jY(A,n)||A instanceof Pt)throw A;if(A instanceof xe&&KY(A)){let c=lD(A.meta);Ua({args:i,errors:[c],callsite:r,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:o})}let a=A.message;if(r&&(a=Ln({callsite:r,originalMethod:t,isPanic:A.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),A.code){let c=s?{modelName:s,...A.meta}:A.meta;throw new xe(a,{code:A.code,clientVersion:this.client._clientVersion,meta:c,batchRequestIdx:A.batchRequestIdx})}else{if(A.isPanic)throw new JA(a,this.client._clientVersion);if(A instanceof ve)throw new ve(a,{clientVersion:this.client._clientVersion,batchRequestIdx:A.batchRequestIdx});if(A instanceof z)throw new z(a,this.client._clientVersion);if(A instanceof JA)throw new JA(a,this.client._clientVersion)}throw A.clientVersion=this.client._clientVersion,A}sanitizeMessage(A){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,cD.default)(A):A}unpack(A,t,r){if(!A||(A.data&&(A=A.data),!A))return A;let n=Object.keys(A)[0],i=Object.values(A)[0],s=t.filter(c=>c!=="select"&&c!=="include"),o=su(i,s),a=n==="queryRaw"?aD(o):Sn(o);return r?r(a):a}get[Symbol.toStringTag](){return"RequestHandler"}};function _Y(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:gD(e)};vt(e,"Unknown transaction kind")}}function gD(e){return{id:e.id,payload:e.payload}}function jY(e,A){return Jg(e)&&A?.kind==="batch"&&e.batchRequestIdx!==A.index}function KY(e){return e.code==="P2009"||e.code==="P2012"}function lD(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(lD)};if(Array.isArray(e.selectionPath)){let[,...A]=e.selectionPath;return{...e,selectionPath:A}}return e}var uD="5.22.0";var ED=uD;var fD=Z(Ol());var oe=class extends Error{constructor(A){super(A+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};L(oe,"PrismaClientConstructorValidationError");var hD=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],dD=["pretty","colorless","minimal"],QD=["info","query","warn","error"],XY={datasources:(e,{datasourceNames:A})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,r]of Object.entries(e)){if(!A.includes(t)){let n=Vi(t,A)||` Available datasources: ${A.join(", ")}`;throw new oe(`Unknown datasource ${t} provided to PrismaClient constructor.${n}`)}if(typeof r!="object"||Array.isArray(r))throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(r&&typeof r=="object")for(let[n,i]of Object.entries(r)){if(n!=="url")throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new oe(`Invalid value ${JSON.stringify(i)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,A)=>{if(e===null)return;if(e===void 0)throw new oe('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Pg(A).includes("driverAdapters"))throw new oe('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(rs()==="binary")throw new oe('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 oe(`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 oe(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!dD.includes(e)){let A=Vi(e,dD);throw new oe(`Invalid errorFormat ${e} provided to PrismaClient constructor.${A}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function A(t){if(typeof t=="string"&&!QD.includes(t)){let r=Vi(t,QD);throw new oe(`Invalid log level "${t}" provided to PrismaClient constructor.${r}`)}}for(let t of e){A(t);let r={level:A,emit:n=>{let i=["stdout","event"];if(!i.includes(n)){let s=Vi(n,i);throw new oe(`Invalid value ${JSON.stringify(n)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(t&&typeof t=="object")for(let[n,i]of Object.entries(t))if(r[n])r[n](i);else throw new oe(`Invalid property ${n} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let A=e.maxWait;if(A!=null&&A<=0)throw new oe(`Invalid value ${A} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let t=e.timeout;if(t!=null&&t<=0)throw new oe(`Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,A)=>{if(typeof e!="object")throw new oe('"omit" option is expected to be an object.');if(e===null)throw new oe('"omit" option can not be `null`');let t=[];for(let[r,n]of Object.entries(e)){let i=$Y(r,A.runtimeDataModel);if(!i){t.push({kind:"UnknownModel",modelKey:r});continue}for(let[s,o]of Object.entries(n)){let a=i.fields.find(c=>c.name===s);if(!a){t.push({kind:"UnknownField",modelKey:r,fieldName:s});continue}if(a.relationName){t.push({kind:"RelationInOmit",modelKey:r,fieldName:s});continue}typeof o!="boolean"&&t.push({kind:"InvalidFieldValue",modelKey:r,fieldName:s})}}if(t.length>0)throw new oe(eV(e,t))},__internal:e=>{if(!e)return;let A=["debug","engine","configOverride"];if(typeof e!="object")throw new oe(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[t]of Object.entries(e))if(!A.includes(t)){let r=Vi(t,A);throw new oe(`Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${r}`)}}};function ID(e,A){for(let[t,r]of Object.entries(e)){if(!hD.includes(t)){let n=Vi(t,hD);throw new oe(`Unknown property ${t} provided to PrismaClient constructor.${n}`)}XY[t](r,A)}if(e.datasourceUrl&&e.datasources)throw new oe('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Vi(e,A){if(A.length===0||typeof e!="string")return"";let t=zY(e,A);return t?` Did you mean "${t}"?`:""}function zY(e,A){if(A.length===0)return null;let t=A.map(n=>({value:n,distance:(0,fD.default)(e,n)}));t.sort((n,i)=>n.distanceFn(r)===A);if(t)return e[t]}function eV(e,A){let t=Gn(e);for(let i of A)switch(i.kind){case"UnknownModel":t.arguments.getField(i.modelKey)?.markAsError(),t.addErrorMessage(()=>`Unknown model name: ${i.modelKey}.`);break;case"UnknownField":t.arguments.getDeepField([i.modelKey,i.fieldName])?.markAsError(),t.addErrorMessage(()=>`Model "${i.modelKey}" does not have a field named "${i.fieldName}".`);break;case"RelationInOmit":t.arguments.getDeepField([i.modelKey,i.fieldName])?.markAsError(),t.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":t.arguments.getDeepFieldValue([i.modelKey,i.fieldName])?.markAsError(),t.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:r,args:n}=La(t,"colorless");return`Error validating "omit" option: + +${n} + +${r}`}function BD(e){return e.length===0?Promise.resolve([]):new Promise((A,t)=>{let r=new Array(e.length),n=null,i=!1,s=0,o=()=>{i||(s++,s===e.length&&(i=!0,n?t(n):A(r)))},a=c=>{i||(i=!0,t(c))};for(let c=0;c{r[c]=g,o()},g=>{if(!Jg(g)){a(g);return}g.batchRequestIdx===c?a(g):(n||(n=g),o())})})}var Lr=ie("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var AV={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},tV=Symbol.for("prisma.client.transaction.id"),rV={id:0,nextId(){return++this.id}};function DD(e){class A{constructor(r){this._originalClient=this;this._middlewares=new Gg;this._createPrismaPromise=Bd();this.$extends=QI;e=r?.__internal?.configOverride?.(e)??e,SI(e),r&&ID(r,e);let n=new wD.EventEmitter().on("error",()=>{});this._extensions=Jn.empty(),this._previewFeatures=Pg(e),this._clientVersion=e.clientVersion??ED,this._activeProvider=e.activeProvider,this._globalOmit=r?.omit,this._tracingHelper=nD(this._previewFeatures);let i={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Uo.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Uo.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(r?.adapter){s=Au(r.adapter);let a=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==a)throw new z(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${a}\` specified in the Prisma schema.`,this._clientVersion);if(r.datasources||r.datasourceUrl!==void 0)throw new z("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 o=!s&&ts(i,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let a=r??{},c=a.__internal??{},g=c.debug===!0;g&&ie.enable("prisma:client");let l=Uo.default.resolve(e.dirname,e.relativePath);RD.default.existsSync(l)||(l=e.dirname),Lr("dirname",e.dirname),Lr("relativePath",e.relativePath),Lr("cwd",l);let u=c.engine||{};if(a.errorFormat?this._errorFormat=a.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:l,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:u.allowTriggerPanic,datamodelPath:Uo.default.join(e.dirname,e.filename??"schema.prisma"),prismaPath:u.binaryPath??void 0,engineEndpoint:u.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:a.log&&sD(a.log),logQueries:a.log&&!!(typeof a.log=="string"?a.log==="query":a.log.find(E=>typeof E=="string"?E==="query":E.level==="query")),env:o?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:FI(a,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:a.transactionOptions?.maxWait??2e3,timeout:a.transactionOptions?.timeout??5e3,isolationLevel:a.transactionOptions?.isolationLevel},logEmitter:n,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:vi,getBatchRequestPayload:qn,prismaGraphQLToJSError:Yt,PrismaClientUnknownRequestError:ve,PrismaClientInitializationError:z,PrismaClientKnownRequestError:xe,debug:ie("prisma:client:accelerateEngine"),engineVersion:mD.version,clientVersion:e.clientVersion}},Lr("clientVersion",e.clientVersion),this._engine=HR(e,this._engineConfig),this._requestHandler=new Vg(this,n),a.log)for(let E of a.log){let h=typeof E=="string"?E:E.emit==="stdout"?E.level:null;h&&this.$on(h,d=>{ss.log(`${ss.tags[h]??""}`,d.message||d.query)})}this._metrics=new Yn(this._engine)}catch(a){throw a.clientVersion=this._clientVersion,a}return this._appliedParent=ws(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(r){this._middlewares.use(r)}$on(r,n){r==="beforeExit"?this._engine.onBeforeExit(n):r&&this._engineConfig.logEmitter.on(r,n)}$connect(){try{return this._engine.start()}catch(r){throw r.clientVersion=this._clientVersion,r}}async $disconnect(){try{await this._engine.stop()}catch(r){throw r.clientVersion=this._clientVersion,r}finally{Pd()}}$executeRawInternal(r,n,i,s){let o=this._activeProvider;return this._request({action:"executeRaw",args:i,transaction:r,clientMethod:n,argsMapper:Id({clientMethod:n,activeProvider:o}),callsite:Cr(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(r,...n){return this._createPrismaPromise(i=>{if(r.raw!==void 0||r.sql!==void 0){let[s,o]=pD(r,n);return fd(this._activeProvider,s.text,s.values,Array.isArray(r)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(i,"$executeRaw",s,o)}throw new Oe("`$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(r,...n){return this._createPrismaPromise(i=>(fd(this._activeProvider,r,n,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(i,"$executeRawUnsafe",[r,...n])))}$runCommandRaw(r){if(e.activeProvider!=="mongodb")throw new Oe(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(n=>this._request({args:r,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:WR,callsite:Cr(this._errorFormat),transaction:n}))}async $queryRawInternal(r,n,i,s){let o=this._activeProvider;return this._request({action:"queryRaw",args:i,transaction:r,clientMethod:n,argsMapper:Id({clientMethod:n,activeProvider:o}),callsite:Cr(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(r,...n){return this._createPrismaPromise(i=>{if(r.raw!==void 0||r.sql!==void 0)return this.$queryRawInternal(i,"$queryRaw",...pD(r,n));throw new Oe("`$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(r){return this._createPrismaPromise(n=>{if(!this._hasPreviewFlag("typedSql"))throw new Oe("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(n,"$queryRawTyped",r)})}$queryRawUnsafe(r,...n){return this._createPrismaPromise(i=>this.$queryRawInternal(i,"$queryRawUnsafe",[r,...n]))}_transactionWithArray({promises:r,options:n}){let i=rV.nextId(),s=iD(r.length),o=r.map((a,c)=>{if(a?.[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=n?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,l={kind:"batch",id:i,index:c,isolationLevel:g,lock:s};return a.requestTransaction?.(l)??a});return BD(o)}async _transactionWithCallback({callback:r,options:n}){let i={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:n?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:n?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:n?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},o=await this._engine.transaction("start",i,s),a;try{let c={kind:"itx",...o};a=await r(this._createItxClient(c)),await this._engine.transaction("commit",i,o)}catch(c){throw await this._engine.transaction("rollback",i,o).catch(()=>{}),c}return a}_createItxClient(r){return ws(ft(dI(this),[nA("_appliedParent",()=>this._appliedParent._createItxClient(r)),nA("_createPrismaPromise",()=>Bd(r)),nA(tV,()=>r.id),Vn(zR)]))}$transaction(r,n){let i;typeof r=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?i=()=>{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.")}:i=()=>this._transactionWithCallback({callback:r,options:n}):i=()=>this._transactionWithArray({promises:r,options:n});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,i)}_request(r){r.otelParentCtx=this._tracingHelper.getActiveContext();let n=r.middlewareArgsMapper??AV,i={args:n.requestArgsToMiddlewareArgs(r.args),dataPath:r.dataPath,runInTransaction:!!r.transaction,action:r.action,model:r.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:i.action,model:i.model,name:i.model?`${i.model}.${i.action}`:i.action}}},o=-1,a=async c=>{let g=this._middlewares.get(++o);if(g)return this._tracingHelper.runInChildSpan(s.middleware,C=>g(c,I=>(C?.end(),a(I))));let{runInTransaction:l,args:u,...E}=c,h={...r,...E};u&&(h.args=n.middlewareArgsToRequestArgs(u)),r.transaction!==void 0&&l===!1&&delete h.transaction;let d=await yI(this,h);return h.model?II({result:d,modelName:h.model,args:h.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):d};return this._tracingHelper.runInChildSpan(s.operation,()=>new yD.AsyncResource("prisma-client-request").runInAsyncScope(()=>a(i)))}async _executeRequest({args:r,clientMethod:n,dataPath:i,callsite:s,action:o,model:a,argsMapper:c,transaction:g,unpacker:l,otelParentCtx:u,customDataProxyFetch:E}){try{r=c?c(r):r;let h={name:"serialize"},d=this._tracingHelper.runInChildSpan(h,()=>va({modelName:a,runtimeDataModel:this._runtimeDataModel,action:o,args:r,clientMethod:n,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ie.enabled("prisma:client")&&(Lr("Prisma Client call:"),Lr(`prisma.${n}(${rI(r)})`),Lr("Generated request:"),Lr(JSON.stringify(d,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:d,modelName:a,action:o,clientMethod:n,dataPath:i,callsite:s,args:r,extensions:this._extensions,transaction:g,unpacker:l,otelParentCtx:u,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:E})}catch(h){throw h.clientVersion=this._clientVersion,h}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new Oe("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(r){return!!this._engineConfig.previewFeatures?.includes(r)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return A}function pD(e,A){return nV(e)?[new dA(e,A),eD]:[e,AD]}function nV(e){return Array.isArray(e)&&Array.isArray(e.raw)}var iV=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function bD(e){return new Proxy(e,{get(A,t){if(t in A)return A[t];if(!iV.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function kD(e){ts(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: + +undici/lib/fetch/body.js: + (*! formdata-polyfill. MIT License. Jimmy Wärting *) + +undici/lib/websocket/frame.js: + (*! ws. MIT License. Einar Otto Stangvik *) + +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=binary.js.map diff --git a/apps/api/release/vendor/@prisma/client/runtime/edge-esm.js b/apps/api/release/vendor/@prisma/client/runtime/edge-esm.js new file mode 100644 index 0000000..dda5f88 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/edge-esm.js @@ -0,0 +1,31 @@ +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/apps/api/release/vendor/@prisma/client/runtime/edge.js b/apps/api/release/vendor/@prisma/client/runtime/edge.js new file mode 100644 index 0000000..f8010b0 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/edge.js @@ -0,0 +1,31 @@ +"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/apps/api/release/vendor/@prisma/client/runtime/index-browser.d.ts b/apps/api/release/vendor/@prisma/client/runtime/index-browser.d.ts new file mode 100644 index 0000000..fefa233 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/index-browser.d.ts @@ -0,0 +1,365 @@ +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/apps/api/release/vendor/@prisma/client/runtime/index-browser.js b/apps/api/release/vendor/@prisma/client/runtime/index-browser.js new file mode 100644 index 0000000..8f0457d --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/index-browser.js @@ -0,0 +1,13 @@ +"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/apps/api/release/vendor/@prisma/client/runtime/library.d.ts b/apps/api/release/vendor/@prisma/client/runtime/library.d.ts new file mode 100644 index 0000000..d92cd02 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/library.d.ts @@ -0,0 +1,3403 @@ +/** + * @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/apps/api/release/vendor/@prisma/client/runtime/library.js b/apps/api/release/vendor/@prisma/client/runtime/library.js new file mode 100644 index 0000000..f60b9c2 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/library.js @@ -0,0 +1,143 @@ +"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/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.js b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.js new file mode 100644 index 0000000..c83c47b --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.js @@ -0,0 +1,2 @@ +"use strict";var j=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var U=(t,e)=>{for(var n in e)j(t,n,{get:e[n],enumerable:!0})},B=(t,e,n,_)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D(e))!M.call(t,o)&&o!==n&&j(t,o,{get:()=>e[o],enumerable:!(_=R(e,o))||_.enumerable});return t};var N=t=>B(j({},"__esModule",{value:!0}),t);var Oe={};U(Oe,{QueryEngine:()=>G,__wbg_String_88810dfeb4021902:()=>Ft,__wbg_buffer_344d9b41efe96da7:()=>Dt,__wbg_call_53fc3abd42e24ec8:()=>ue,__wbg_call_669127b9d730c650:()=>Ht,__wbg_crypto_58f13aa23ffcb166:()=>$t,__wbg_done_bc26bf4ada718266:()=>Yt,__wbg_entries_6d727b73ee02b7ce:()=>xe,__wbg_getRandomValues_504510b5564925af:()=>Nt,__wbg_getTime_ed6ee333b702f8fc:()=>it,__wbg_get_2aff440840bb6202:()=>ee,__wbg_get_4a9aa5157afeb382:()=>Gt,__wbg_get_94990005bd6ca07c:()=>Et,__wbg_getwithrefkey_5e6d9547403deab8:()=>kt,__wbg_globalThis_17eff828815f7d84:()=>_e,__wbg_global_46f939f6541643c5:()=>oe,__wbg_has_cdf8b85f6e903c80:()=>_t,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d:()=>pe,__wbg_instanceof_Promise_cfbcc42300367513:()=>ft,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1:()=>we,__wbg_isArray_38525be7442aa21e:()=>ie,__wbg_isSafeInteger_c38b0a16d0c7cef7:()=>se,__wbg_iterator_7ee1a391d310f8e4:()=>gt,__wbg_length_a5587d6cd79ab197:()=>ge,__wbg_length_cace2e0b3ddc0502:()=>bt,__wbg_msCrypto_abcb1295e768d1f2:()=>Wt,__wbg_new0_ad75dd38f92424e2:()=>ct,__wbg_new_08236689f0afb357:()=>Tt,__wbg_new_1b94180eeb48f2a2:()=>St,__wbg_new_c728d68b8b34487e:()=>At,__wbg_new_d8a000788389a31e:()=>Ut,__wbg_new_feb65b865d980ae2:()=>Y,__wbg_newnoargs_ccdcae30fd002262:()=>ce,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3:()=>Mt,__wbg_newwithlength_13b5319ab422dcf6:()=>Jt,__wbg_next_15da6a3df9290720:()=>te,__wbg_next_1989a20442400aaa:()=>Xt,__wbg_node_523d7bd03ef69fba:()=>Lt,__wbg_now_28a6b413aca4a96a:()=>de,__wbg_now_4579335d3581594c:()=>st,__wbg_now_8ed1a4454e40ecd1:()=>ut,__wbg_parse_3f0cb48976ca4123:()=>ot,__wbg_process_5b786e71d465a513:()=>Vt,__wbg_push_fd3233d09cf81821:()=>vt,__wbg_randomFillSync_a0d98aa11c81fe89:()=>Ct,__wbg_require_2784e593a4674877:()=>Pt,__wbg_resolve_a3252b2860f0a09e:()=>Ae,__wbg_self_3fad056edded10bd:()=>ne,__wbg_setTimeout_631fe61f31fa2fad:()=>Z,__wbg_set_0ac78a2bc07da03c:()=>It,__wbg_set_3355b9f2d3092e3b:()=>jt,__wbg_set_40f7786a25a9cc7e:()=>fe,__wbg_set_841ac57cff3d672b:()=>qt,__wbg_set_dcfd613a3420f908:()=>be,__wbg_set_wasm:()=>C,__wbg_stringify_4039297315a25b00:()=>ae,__wbg_subarray_6ca5cfa7fbb9abbe:()=>Bt,__wbg_then_1bbc9edafd859b06:()=>Se,__wbg_then_89e1c559530b85cf:()=>Ie,__wbg_valueOf_ff4b62641803432a:()=>Kt,__wbg_value_0570714ff7d75f35:()=>Zt,__wbg_versions_c2ab80650590b6a2:()=>zt,__wbg_window_a4f46c98a61d4089:()=>re,__wbindgen_bigint_from_i64:()=>pt,__wbindgen_bigint_from_u64:()=>yt,__wbindgen_bigint_get_as_i64:()=>me,__wbindgen_boolean_get:()=>dt,__wbindgen_cb_drop:()=>Te,__wbindgen_closure_wrapper6979:()=>je,__wbindgen_debug_string:()=>he,__wbindgen_error_new:()=>X,__wbindgen_in:()=>xt,__wbindgen_is_bigint:()=>lt,__wbindgen_is_function:()=>Qt,__wbindgen_is_object:()=>at,__wbindgen_is_string:()=>Ot,__wbindgen_is_undefined:()=>rt,__wbindgen_jsval_eq:()=>mt,__wbindgen_jsval_loose_eq:()=>le,__wbindgen_memory:()=>Rt,__wbindgen_number_get:()=>wt,__wbindgen_number_new:()=>ht,__wbindgen_object_clone_ref:()=>nt,__wbindgen_object_drop_ref:()=>tt,__wbindgen_string_get:()=>K,__wbindgen_string_new:()=>et,__wbindgen_throw:()=>ye,debug_panic:()=>Q,getBuildTimeInfo:()=>J});module.exports=N(Oe);var T=()=>{};T.prototype=T;let c;function C(t){c=t}const w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);function r(t){return w[t]}let a=0,I=null;function S(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(c.memory.buffer)),I}const $=typeof TextEncoder>"u"?(0,module.require)("util").TextEncoder:TextEncoder;let A=new $("utf-8");const V=typeof A.encodeInto=="function"?function(t,e){return A.encodeInto(t,e)}:function(t,e){const n=A.encode(t);return e.set(n),{read:t.length,written:n.length}};function d(t,e,n){if(n===void 0){const s=A.encode(t),p=e(s.length,1)>>>0;return S().subarray(p,p+s.length).set(s),a=s.length,p}let _=t.length,o=e(_,1)>>>0;const f=S();let u=0;for(;u<_;u++){const s=t.charCodeAt(u);if(s>127)break;f[o+u]=s}if(u!==_){u!==0&&(t=t.slice(u)),o=n(o,_,_=u+t.length*3,1)>>>0;const s=S().subarray(o+u,o+_),p=V(t,s);u+=p.written,o=n(o,_,u,1)>>>0}return a=u,o}function x(t){return t==null}let y=null;function l(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==c.memory.buffer)&&(y=new DataView(c.memory.buffer)),y}const z=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let q=new z("utf-8",{ignoreBOM:!0,fatal:!0});q.decode();function m(t,e){return t=t>>>0,q.decode(S().subarray(t,t+e))}let h=w.length;function i(t){h===w.length&&w.push(w.length+1);const e=h;return h=w[e],w[e]=t,e}function L(t){t<132||(w[t]=h,h=t)}function b(t){const e=r(t);return L(t),e}function O(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){const o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){const o=t.length;let f="[";o>0&&(f+=O(t[0]));for(let u=1;u1)_=n[1];else return toString.call(t);if(_=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:_}const k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{c.__wbindgen_export_2.get(t.dtor)(t.a,t.b)});function P(t,e,n,_){const o={a:t,b:e,cnt:1,dtor:n},f=(...u)=>{o.cnt++;const s=o.a;o.a=0;try{return _(s,o.b,...u)}finally{--o.cnt===0?(c.__wbindgen_export_2.get(o.dtor)(s,o.b),k.unregister(o)):o.a=s}};return f.original=o,k.register(f,o,o),f}function W(t,e,n){c._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9eef02caf99553a1(t,e,i(n))}function J(){const t=c.getBuildTimeInfo();return b(t)}function Q(t){try{const f=c.__wbindgen_add_to_stack_pointer(-16);var e=x(t)?0:d(t,c.__wbindgen_malloc,c.__wbindgen_realloc),n=a;c.debug_panic(f,e,n);var _=l().getInt32(f+4*0,!0),o=l().getInt32(f+4*1,!0);if(o)throw b(_)}finally{c.__wbindgen_add_to_stack_pointer(16)}}function g(t,e){try{return t.apply(this,e)}catch(n){c.__wbindgen_exn_store(i(n))}}function H(t,e,n,_){c.wasm_bindgen__convert__closures__invoke2_mut__h174c8485536aed69(t,e,i(n),i(_))}const v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>c.__wbg_queryengine_free(t>>>0,1));class G{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,v.unregister(this),e}free(){const e=this.__destroy_into_raw();c.__wbg_queryengine_free(e,0)}constructor(e,n,_){try{const s=c.__wbindgen_add_to_stack_pointer(-16);c.queryengine_new(s,i(e),i(n),i(_));var o=l().getInt32(s+4*0,!0),f=l().getInt32(s+4*1,!0),u=l().getInt32(s+4*2,!0);if(u)throw b(f);return this.__wbg_ptr=o>>>0,v.register(this,this.__wbg_ptr,this),this}finally{c.__wbindgen_add_to_stack_pointer(16)}}connect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_connect(this.__wbg_ptr,n,_);return b(o)}disconnect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_disconnect(this.__wbg_ptr,n,_);return b(o)}query(e,n,_){const o=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a,u=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),s=a;var p=x(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),E=a;const F=c.queryengine_query(this.__wbg_ptr,o,f,u,s,p,E);return b(F)}startTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_startTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}commitTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_commitTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}rollbackTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_rollbackTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}metrics(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_metrics(this.__wbg_ptr,n,_);return b(o)}}function K(t,e){const n=r(e),_=typeof n=="string"?n:void 0;var o=x(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a;l().setInt32(t+4*1,f,!0),l().setInt32(t+4*0,o,!0)}function X(t,e){const n=new Error(m(t,e));return i(n)}function Y(t,e){try{var n={a:t,b:e},_=(f,u)=>{const s=n.a;n.a=0;try{return H(s,n.b,f,u)}finally{n.a=s}};const o=new Promise(_);return i(o)}finally{n.a=n.b=0}}function Z(t,e){return setTimeout(r(t),e>>>0)}function tt(t){b(t)}function et(t,e){const n=m(t,e);return i(n)}function nt(t){const e=r(t);return i(e)}function rt(t){return r(t)===void 0}function _t(){return g(function(t,e){return Reflect.has(r(t),r(e))},arguments)}function ot(){return g(function(t,e){const n=JSON.parse(m(t,e));return i(n)},arguments)}function ct(){return i(new Date)}function it(t){return r(t).getTime()}function ut(t){return r(t).now()}function st(){return Date.now()}function ft(t){let e;try{e=r(t)instanceof Promise}catch{e=!1}return e}function at(t){const e=r(t);return typeof e=="object"&&e!==null}function bt(t){return r(t).length}function gt(){return i(Symbol.iterator)}function dt(t){const e=r(t);return typeof e=="boolean"?e?1:0:2}function lt(t){return typeof r(t)=="bigint"}function wt(t,e){const n=r(e),_=typeof n=="number"?n:void 0;l().setFloat64(t+8*1,x(_)?0:_,!0),l().setInt32(t+4*0,!x(_),!0)}function pt(t){return i(t)}function xt(t,e){return r(t)in r(e)}function yt(t){const e=BigInt.asUintN(64,t);return i(e)}function mt(t,e){return r(t)===r(e)}function ht(t){return i(t)}function Tt(){const t=new Array;return i(t)}function It(t,e,n){r(t)[e>>>0]=b(n)}function St(){return i(new Map)}function At(){const t=new Object;return i(t)}function jt(t,e,n){const _=r(t).set(r(e),r(n));return i(_)}function Ot(t){return typeof r(t)=="string"}function qt(t,e,n){r(t)[b(e)]=b(n)}function kt(t,e){const n=r(t)[r(e)];return i(n)}function vt(t,e){return r(t).push(r(e))}function Et(){return g(function(t,e){const n=r(t)[b(e)];return i(n)},arguments)}function Ft(t,e){const n=String(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Rt(){const t=c.memory;return i(t)}function Dt(t){const e=r(t).buffer;return i(e)}function Mt(t,e,n){const _=new Uint8Array(r(t),e>>>0,n>>>0);return i(_)}function Ut(t){const e=new Uint8Array(r(t));return i(e)}function Bt(t,e,n){const _=r(t).subarray(e>>>0,n>>>0);return i(_)}function Nt(){return g(function(t,e){r(t).getRandomValues(r(e))},arguments)}function Ct(){return g(function(t,e){r(t).randomFillSync(b(e))},arguments)}function $t(t){const e=r(t).crypto;return i(e)}function Vt(t){const e=r(t).process;return i(e)}function zt(t){const e=r(t).versions;return i(e)}function Lt(t){const e=r(t).node;return i(e)}function Pt(){return g(function(){const t=module.require;return i(t)},arguments)}function Wt(t){const e=r(t).msCrypto;return i(e)}function Jt(t){const e=new Uint8Array(t>>>0);return i(e)}function Qt(t){return typeof r(t)=="function"}function Ht(){return g(function(t,e){const n=r(t).call(r(e));return i(n)},arguments)}function Gt(t,e){const n=r(t)[e>>>0];return i(n)}function Kt(t){return r(t).valueOf()}function Xt(){return g(function(t){const e=r(t).next();return i(e)},arguments)}function Yt(t){return r(t).done}function Zt(t){const e=r(t).value;return i(e)}function te(t){const e=r(t).next;return i(e)}function ee(){return g(function(t,e){const n=Reflect.get(r(t),r(e));return i(n)},arguments)}function ne(){return g(function(){const t=self.self;return i(t)},arguments)}function re(){return g(function(){const t=window.window;return i(t)},arguments)}function _e(){return g(function(){const t=globalThis.globalThis;return i(t)},arguments)}function oe(){return g(function(){const t=global.global;return i(t)},arguments)}function ce(t,e){const n=new T(m(t,e));return i(n)}function ie(t){return Array.isArray(r(t))}function ue(){return g(function(t,e,n){const _=r(t).call(r(e),r(n));return i(_)},arguments)}function se(t){return Number.isSafeInteger(r(t))}function fe(){return g(function(t,e,n){return Reflect.set(r(t),r(e),r(n))},arguments)}function ae(){return g(function(t){const e=JSON.stringify(r(t));return i(e)},arguments)}function be(t,e,n){r(t).set(r(e),n>>>0)}function ge(t){return r(t).length}function de(){return g(function(){return Date.now()},arguments)}function le(t,e){return r(t)==r(e)}function we(t){let e;try{e=r(t)instanceof Uint8Array}catch{e=!1}return e}function pe(t){let e;try{e=r(t)instanceof ArrayBuffer}catch{e=!1}return e}function xe(t){const e=Object.entries(r(t));return i(e)}function ye(t,e){throw new Error(m(t,e))}function me(t,e){const n=r(e),_=typeof n=="bigint"?n:void 0;l().setBigInt64(t+8*1,x(_)?BigInt(0):_,!0),l().setInt32(t+4*0,!x(_),!0)}function he(t,e){const n=O(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Te(t){const e=b(t).original;return e.cnt--==1?(e.a=0,!0):!1}function Ie(t,e){const n=r(t).then(r(e));return i(n)}function Se(t,e,n){const _=r(t).then(r(e),r(n));return i(_)}function Ae(t){const e=Promise.resolve(r(t));return i(e)}function je(t,e,n){const _=P(t,e,540,W);return i(_)}0&&(module.exports={QueryEngine,__wbg_String_88810dfeb4021902,__wbg_buffer_344d9b41efe96da7,__wbg_call_53fc3abd42e24ec8,__wbg_call_669127b9d730c650,__wbg_crypto_58f13aa23ffcb166,__wbg_done_bc26bf4ada718266,__wbg_entries_6d727b73ee02b7ce,__wbg_getRandomValues_504510b5564925af,__wbg_getTime_ed6ee333b702f8fc,__wbg_get_2aff440840bb6202,__wbg_get_4a9aa5157afeb382,__wbg_get_94990005bd6ca07c,__wbg_getwithrefkey_5e6d9547403deab8,__wbg_globalThis_17eff828815f7d84,__wbg_global_46f939f6541643c5,__wbg_has_cdf8b85f6e903c80,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d,__wbg_instanceof_Promise_cfbcc42300367513,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1,__wbg_isArray_38525be7442aa21e,__wbg_isSafeInteger_c38b0a16d0c7cef7,__wbg_iterator_7ee1a391d310f8e4,__wbg_length_a5587d6cd79ab197,__wbg_length_cace2e0b3ddc0502,__wbg_msCrypto_abcb1295e768d1f2,__wbg_new0_ad75dd38f92424e2,__wbg_new_08236689f0afb357,__wbg_new_1b94180eeb48f2a2,__wbg_new_c728d68b8b34487e,__wbg_new_d8a000788389a31e,__wbg_new_feb65b865d980ae2,__wbg_newnoargs_ccdcae30fd002262,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3,__wbg_newwithlength_13b5319ab422dcf6,__wbg_next_15da6a3df9290720,__wbg_next_1989a20442400aaa,__wbg_node_523d7bd03ef69fba,__wbg_now_28a6b413aca4a96a,__wbg_now_4579335d3581594c,__wbg_now_8ed1a4454e40ecd1,__wbg_parse_3f0cb48976ca4123,__wbg_process_5b786e71d465a513,__wbg_push_fd3233d09cf81821,__wbg_randomFillSync_a0d98aa11c81fe89,__wbg_require_2784e593a4674877,__wbg_resolve_a3252b2860f0a09e,__wbg_self_3fad056edded10bd,__wbg_setTimeout_631fe61f31fa2fad,__wbg_set_0ac78a2bc07da03c,__wbg_set_3355b9f2d3092e3b,__wbg_set_40f7786a25a9cc7e,__wbg_set_841ac57cff3d672b,__wbg_set_dcfd613a3420f908,__wbg_set_wasm,__wbg_stringify_4039297315a25b00,__wbg_subarray_6ca5cfa7fbb9abbe,__wbg_then_1bbc9edafd859b06,__wbg_then_89e1c559530b85cf,__wbg_valueOf_ff4b62641803432a,__wbg_value_0570714ff7d75f35,__wbg_versions_c2ab80650590b6a2,__wbg_window_a4f46c98a61d4089,__wbindgen_bigint_from_i64,__wbindgen_bigint_from_u64,__wbindgen_bigint_get_as_i64,__wbindgen_boolean_get,__wbindgen_cb_drop,__wbindgen_closure_wrapper6979,__wbindgen_debug_string,__wbindgen_error_new,__wbindgen_in,__wbindgen_is_bigint,__wbindgen_is_function,__wbindgen_is_object,__wbindgen_is_string,__wbindgen_is_undefined,__wbindgen_jsval_eq,__wbindgen_jsval_loose_eq,__wbindgen_memory,__wbindgen_number_get,__wbindgen_number_new,__wbindgen_object_clone_ref,__wbindgen_object_drop_ref,__wbindgen_string_get,__wbindgen_string_new,__wbindgen_throw,debug_panic,getBuildTimeInfo}); diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.wasm b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.wasm new file mode 100644 index 0000000..33e9c47 Binary files /dev/null and b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.wasm differ diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.js b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.js new file mode 100644 index 0000000..f5ecb75 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.js @@ -0,0 +1,2 @@ +"use strict";var j=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var U=(t,e)=>{for(var n in e)j(t,n,{get:e[n],enumerable:!0})},B=(t,e,n,_)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D(e))!M.call(t,o)&&o!==n&&j(t,o,{get:()=>e[o],enumerable:!(_=R(e,o))||_.enumerable});return t};var N=t=>B(j({},"__esModule",{value:!0}),t);var Ee={};U(Ee,{QueryEngine:()=>G,__wbg_String_88810dfeb4021902:()=>Dt,__wbg_buffer_344d9b41efe96da7:()=>Ut,__wbg_call_53fc3abd42e24ec8:()=>fe,__wbg_call_669127b9d730c650:()=>Kt,__wbg_crypto_58f13aa23ffcb166:()=>zt,__wbg_done_bc26bf4ada718266:()=>te,__wbg_entries_6d727b73ee02b7ce:()=>me,__wbg_exec_393fa168a3695345:()=>Ft,__wbg_getRandomValues_504510b5564925af:()=>$t,__wbg_getTime_ed6ee333b702f8fc:()=>ct,__wbg_get_2aff440840bb6202:()=>re,__wbg_get_4a9aa5157afeb382:()=>Xt,__wbg_get_94990005bd6ca07c:()=>Rt,__wbg_getwithrefkey_5e6d9547403deab8:()=>Et,__wbg_globalThis_17eff828815f7d84:()=>ce,__wbg_global_46f939f6541643c5:()=>ie,__wbg_has_cdf8b85f6e903c80:()=>rt,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d:()=>ye,__wbg_instanceof_Promise_cfbcc42300367513:()=>at,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1:()=>xe,__wbg_isArray_38525be7442aa21e:()=>se,__wbg_isSafeInteger_c38b0a16d0c7cef7:()=>ae,__wbg_iterator_7ee1a391d310f8e4:()=>gt,__wbg_length_a5587d6cd79ab197:()=>le,__wbg_length_cace2e0b3ddc0502:()=>bt,__wbg_msCrypto_abcb1295e768d1f2:()=>Qt,__wbg_new0_ad75dd38f92424e2:()=>ot,__wbg_new_00f9fd9cefd9f65c:()=>vt,__wbg_new_08236689f0afb357:()=>Tt,__wbg_new_1b94180eeb48f2a2:()=>St,__wbg_new_c728d68b8b34487e:()=>At,__wbg_new_d8a000788389a31e:()=>Nt,__wbg_new_feb65b865d980ae2:()=>Y,__wbg_newnoargs_ccdcae30fd002262:()=>ue,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3:()=>Bt,__wbg_newwithlength_13b5319ab422dcf6:()=>Ht,__wbg_next_15da6a3df9290720:()=>ne,__wbg_next_1989a20442400aaa:()=>Zt,__wbg_node_523d7bd03ef69fba:()=>Wt,__wbg_now_28a6b413aca4a96a:()=>we,__wbg_now_4579335d3581594c:()=>st,__wbg_now_8ed1a4454e40ecd1:()=>ut,__wbg_parse_3f0cb48976ca4123:()=>_t,__wbg_process_5b786e71d465a513:()=>Lt,__wbg_push_fd3233d09cf81821:()=>kt,__wbg_randomFillSync_a0d98aa11c81fe89:()=>Vt,__wbg_require_2784e593a4674877:()=>Jt,__wbg_resolve_a3252b2860f0a09e:()=>Oe,__wbg_self_3fad056edded10bd:()=>_e,__wbg_setTimeout_631fe61f31fa2fad:()=>Z,__wbg_set_0ac78a2bc07da03c:()=>It,__wbg_set_3355b9f2d3092e3b:()=>jt,__wbg_set_40f7786a25a9cc7e:()=>be,__wbg_set_841ac57cff3d672b:()=>qt,__wbg_set_dcfd613a3420f908:()=>de,__wbg_set_wasm:()=>C,__wbg_stringify_4039297315a25b00:()=>ge,__wbg_subarray_6ca5cfa7fbb9abbe:()=>Ct,__wbg_then_1bbc9edafd859b06:()=>je,__wbg_then_89e1c559530b85cf:()=>Ae,__wbg_valueOf_ff4b62641803432a:()=>Yt,__wbg_value_0570714ff7d75f35:()=>ee,__wbg_versions_c2ab80650590b6a2:()=>Pt,__wbg_window_a4f46c98a61d4089:()=>oe,__wbindgen_bigint_from_i64:()=>pt,__wbindgen_bigint_from_u64:()=>yt,__wbindgen_bigint_get_as_i64:()=>Te,__wbindgen_boolean_get:()=>dt,__wbindgen_cb_drop:()=>Se,__wbindgen_closure_wrapper7038:()=>qe,__wbindgen_debug_string:()=>Ie,__wbindgen_error_new:()=>X,__wbindgen_in:()=>xt,__wbindgen_is_bigint:()=>lt,__wbindgen_is_function:()=>Gt,__wbindgen_is_object:()=>ft,__wbindgen_is_string:()=>Ot,__wbindgen_is_undefined:()=>nt,__wbindgen_jsval_eq:()=>mt,__wbindgen_jsval_loose_eq:()=>pe,__wbindgen_memory:()=>Mt,__wbindgen_number_get:()=>wt,__wbindgen_number_new:()=>ht,__wbindgen_object_clone_ref:()=>et,__wbindgen_object_drop_ref:()=>it,__wbindgen_string_get:()=>K,__wbindgen_string_new:()=>tt,__wbindgen_throw:()=>he,debug_panic:()=>Q,getBuildTimeInfo:()=>J});module.exports=N(Ee);var T=()=>{};T.prototype=T;let c;function C(t){c=t}const w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);function r(t){return w[t]}let a=0,I=null;function S(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(c.memory.buffer)),I}const $=typeof TextEncoder>"u"?(0,module.require)("util").TextEncoder:TextEncoder;let A=new $("utf-8");const V=typeof A.encodeInto=="function"?function(t,e){return A.encodeInto(t,e)}:function(t,e){const n=A.encode(t);return e.set(n),{read:t.length,written:n.length}};function d(t,e,n){if(n===void 0){const s=A.encode(t),y=e(s.length,1)>>>0;return S().subarray(y,y+s.length).set(s),a=s.length,y}let _=t.length,o=e(_,1)>>>0;const f=S();let u=0;for(;u<_;u++){const s=t.charCodeAt(u);if(s>127)break;f[o+u]=s}if(u!==_){u!==0&&(t=t.slice(u)),o=n(o,_,_=u+t.length*3,1)>>>0;const s=S().subarray(o+u,o+_),y=V(t,s);u+=y.written,o=n(o,_,u,1)>>>0}return a=u,o}function p(t){return t==null}let m=null;function l(){return(m===null||m.buffer.detached===!0||m.buffer.detached===void 0&&m.buffer!==c.memory.buffer)&&(m=new DataView(c.memory.buffer)),m}const z=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let q=new z("utf-8",{ignoreBOM:!0,fatal:!0});q.decode();function x(t,e){return t=t>>>0,q.decode(S().subarray(t,t+e))}let h=w.length;function i(t){h===w.length&&w.push(w.length+1);const e=h;return h=w[e],w[e]=t,e}function L(t){t<132||(w[t]=h,h=t)}function b(t){const e=r(t);return L(t),e}function O(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){const o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){const o=t.length;let f="[";o>0&&(f+=O(t[0]));for(let u=1;u1)_=n[1];else return toString.call(t);if(_=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:_}const E=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{c.__wbindgen_export_2.get(t.dtor)(t.a,t.b)});function P(t,e,n,_){const o={a:t,b:e,cnt:1,dtor:n},f=(...u)=>{o.cnt++;const s=o.a;o.a=0;try{return _(s,o.b,...u)}finally{--o.cnt===0?(c.__wbindgen_export_2.get(o.dtor)(s,o.b),E.unregister(o)):o.a=s}};return f.original=o,E.register(f,o,o),f}function W(t,e,n){c._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9eef02caf99553a1(t,e,i(n))}function J(){const t=c.getBuildTimeInfo();return b(t)}function Q(t){try{const f=c.__wbindgen_add_to_stack_pointer(-16);var e=p(t)?0:d(t,c.__wbindgen_malloc,c.__wbindgen_realloc),n=a;c.debug_panic(f,e,n);var _=l().getInt32(f+4*0,!0),o=l().getInt32(f+4*1,!0);if(o)throw b(_)}finally{c.__wbindgen_add_to_stack_pointer(16)}}function g(t,e){try{return t.apply(this,e)}catch(n){c.__wbindgen_exn_store(i(n))}}function H(t,e,n,_){c.wasm_bindgen__convert__closures__invoke2_mut__h174c8485536aed69(t,e,i(n),i(_))}const k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>c.__wbg_queryengine_free(t>>>0,1));class G{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,k.unregister(this),e}free(){const e=this.__destroy_into_raw();c.__wbg_queryengine_free(e,0)}constructor(e,n,_){try{const s=c.__wbindgen_add_to_stack_pointer(-16);c.queryengine_new(s,i(e),i(n),i(_));var o=l().getInt32(s+4*0,!0),f=l().getInt32(s+4*1,!0),u=l().getInt32(s+4*2,!0);if(u)throw b(f);return this.__wbg_ptr=o>>>0,k.register(this,this.__wbg_ptr,this),this}finally{c.__wbindgen_add_to_stack_pointer(16)}}connect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_connect(this.__wbg_ptr,n,_);return b(o)}disconnect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_disconnect(this.__wbg_ptr,n,_);return b(o)}query(e,n,_){const o=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a,u=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),s=a;var y=p(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),v=a;const F=c.queryengine_query(this.__wbg_ptr,o,f,u,s,y,v);return b(F)}startTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_startTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}commitTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_commitTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}rollbackTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_rollbackTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}metrics(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_metrics(this.__wbg_ptr,n,_);return b(o)}}function K(t,e){const n=r(e),_=typeof n=="string"?n:void 0;var o=p(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a;l().setInt32(t+4*1,f,!0),l().setInt32(t+4*0,o,!0)}function X(t,e){const n=new Error(x(t,e));return i(n)}function Y(t,e){try{var n={a:t,b:e},_=(f,u)=>{const s=n.a;n.a=0;try{return H(s,n.b,f,u)}finally{n.a=s}};const o=new Promise(_);return i(o)}finally{n.a=n.b=0}}function Z(t,e){return setTimeout(r(t),e>>>0)}function tt(t,e){const n=x(t,e);return i(n)}function et(t){const e=r(t);return i(e)}function nt(t){return r(t)===void 0}function rt(){return g(function(t,e){return Reflect.has(r(t),r(e))},arguments)}function _t(){return g(function(t,e){const n=JSON.parse(x(t,e));return i(n)},arguments)}function ot(){return i(new Date)}function ct(t){return r(t).getTime()}function it(t){b(t)}function ut(t){return r(t).now()}function st(){return Date.now()}function ft(t){const e=r(t);return typeof e=="object"&&e!==null}function at(t){let e;try{e=r(t)instanceof Promise}catch{e=!1}return e}function bt(t){return r(t).length}function gt(){return i(Symbol.iterator)}function dt(t){const e=r(t);return typeof e=="boolean"?e?1:0:2}function lt(t){return typeof r(t)=="bigint"}function wt(t,e){const n=r(e),_=typeof n=="number"?n:void 0;l().setFloat64(t+8*1,p(_)?0:_,!0),l().setInt32(t+4*0,!p(_),!0)}function pt(t){return i(t)}function xt(t,e){return r(t)in r(e)}function yt(t){const e=BigInt.asUintN(64,t);return i(e)}function mt(t,e){return r(t)===r(e)}function ht(t){return i(t)}function Tt(){const t=new Array;return i(t)}function It(t,e,n){r(t)[e>>>0]=b(n)}function St(){return i(new Map)}function At(){const t=new Object;return i(t)}function jt(t,e,n){const _=r(t).set(r(e),r(n));return i(_)}function Ot(t){return typeof r(t)=="string"}function qt(t,e,n){r(t)[b(e)]=b(n)}function Et(t,e){const n=r(t)[r(e)];return i(n)}function kt(t,e){return r(t).push(r(e))}function vt(t,e,n,_){const o=new RegExp(x(t,e),x(n,_));return i(o)}function Ft(t,e,n){const _=r(t).exec(x(e,n));return p(_)?0:i(_)}function Rt(){return g(function(t,e){const n=r(t)[b(e)];return i(n)},arguments)}function Dt(t,e){const n=String(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Mt(){const t=c.memory;return i(t)}function Ut(t){const e=r(t).buffer;return i(e)}function Bt(t,e,n){const _=new Uint8Array(r(t),e>>>0,n>>>0);return i(_)}function Nt(t){const e=new Uint8Array(r(t));return i(e)}function Ct(t,e,n){const _=r(t).subarray(e>>>0,n>>>0);return i(_)}function $t(){return g(function(t,e){r(t).getRandomValues(r(e))},arguments)}function Vt(){return g(function(t,e){r(t).randomFillSync(b(e))},arguments)}function zt(t){const e=r(t).crypto;return i(e)}function Lt(t){const e=r(t).process;return i(e)}function Pt(t){const e=r(t).versions;return i(e)}function Wt(t){const e=r(t).node;return i(e)}function Jt(){return g(function(){const t=module.require;return i(t)},arguments)}function Qt(t){const e=r(t).msCrypto;return i(e)}function Ht(t){const e=new Uint8Array(t>>>0);return i(e)}function Gt(t){return typeof r(t)=="function"}function Kt(){return g(function(t,e){const n=r(t).call(r(e));return i(n)},arguments)}function Xt(t,e){const n=r(t)[e>>>0];return i(n)}function Yt(t){return r(t).valueOf()}function Zt(){return g(function(t){const e=r(t).next();return i(e)},arguments)}function te(t){return r(t).done}function ee(t){const e=r(t).value;return i(e)}function ne(t){const e=r(t).next;return i(e)}function re(){return g(function(t,e){const n=Reflect.get(r(t),r(e));return i(n)},arguments)}function _e(){return g(function(){const t=self.self;return i(t)},arguments)}function oe(){return g(function(){const t=window.window;return i(t)},arguments)}function ce(){return g(function(){const t=globalThis.globalThis;return i(t)},arguments)}function ie(){return g(function(){const t=global.global;return i(t)},arguments)}function ue(t,e){const n=new T(x(t,e));return i(n)}function se(t){return Array.isArray(r(t))}function fe(){return g(function(t,e,n){const _=r(t).call(r(e),r(n));return i(_)},arguments)}function ae(t){return Number.isSafeInteger(r(t))}function be(){return g(function(t,e,n){return Reflect.set(r(t),r(e),r(n))},arguments)}function ge(){return g(function(t){const e=JSON.stringify(r(t));return i(e)},arguments)}function de(t,e,n){r(t).set(r(e),n>>>0)}function le(t){return r(t).length}function we(){return g(function(){return Date.now()},arguments)}function pe(t,e){return r(t)==r(e)}function xe(t){let e;try{e=r(t)instanceof Uint8Array}catch{e=!1}return e}function ye(t){let e;try{e=r(t)instanceof ArrayBuffer}catch{e=!1}return e}function me(t){const e=Object.entries(r(t));return i(e)}function he(t,e){throw new Error(x(t,e))}function Te(t,e){const n=r(e),_=typeof n=="bigint"?n:void 0;l().setBigInt64(t+8*1,p(_)?BigInt(0):_,!0),l().setInt32(t+4*0,!p(_),!0)}function Ie(t,e){const n=O(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Se(t){const e=b(t).original;return e.cnt--==1?(e.a=0,!0):!1}function Ae(t,e){const n=r(t).then(r(e));return i(n)}function je(t,e,n){const _=r(t).then(r(e),r(n));return i(_)}function Oe(t){const e=Promise.resolve(r(t));return i(e)}function qe(t,e,n){const _=P(t,e,541,W);return i(_)}0&&(module.exports={QueryEngine,__wbg_String_88810dfeb4021902,__wbg_buffer_344d9b41efe96da7,__wbg_call_53fc3abd42e24ec8,__wbg_call_669127b9d730c650,__wbg_crypto_58f13aa23ffcb166,__wbg_done_bc26bf4ada718266,__wbg_entries_6d727b73ee02b7ce,__wbg_exec_393fa168a3695345,__wbg_getRandomValues_504510b5564925af,__wbg_getTime_ed6ee333b702f8fc,__wbg_get_2aff440840bb6202,__wbg_get_4a9aa5157afeb382,__wbg_get_94990005bd6ca07c,__wbg_getwithrefkey_5e6d9547403deab8,__wbg_globalThis_17eff828815f7d84,__wbg_global_46f939f6541643c5,__wbg_has_cdf8b85f6e903c80,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d,__wbg_instanceof_Promise_cfbcc42300367513,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1,__wbg_isArray_38525be7442aa21e,__wbg_isSafeInteger_c38b0a16d0c7cef7,__wbg_iterator_7ee1a391d310f8e4,__wbg_length_a5587d6cd79ab197,__wbg_length_cace2e0b3ddc0502,__wbg_msCrypto_abcb1295e768d1f2,__wbg_new0_ad75dd38f92424e2,__wbg_new_00f9fd9cefd9f65c,__wbg_new_08236689f0afb357,__wbg_new_1b94180eeb48f2a2,__wbg_new_c728d68b8b34487e,__wbg_new_d8a000788389a31e,__wbg_new_feb65b865d980ae2,__wbg_newnoargs_ccdcae30fd002262,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3,__wbg_newwithlength_13b5319ab422dcf6,__wbg_next_15da6a3df9290720,__wbg_next_1989a20442400aaa,__wbg_node_523d7bd03ef69fba,__wbg_now_28a6b413aca4a96a,__wbg_now_4579335d3581594c,__wbg_now_8ed1a4454e40ecd1,__wbg_parse_3f0cb48976ca4123,__wbg_process_5b786e71d465a513,__wbg_push_fd3233d09cf81821,__wbg_randomFillSync_a0d98aa11c81fe89,__wbg_require_2784e593a4674877,__wbg_resolve_a3252b2860f0a09e,__wbg_self_3fad056edded10bd,__wbg_setTimeout_631fe61f31fa2fad,__wbg_set_0ac78a2bc07da03c,__wbg_set_3355b9f2d3092e3b,__wbg_set_40f7786a25a9cc7e,__wbg_set_841ac57cff3d672b,__wbg_set_dcfd613a3420f908,__wbg_set_wasm,__wbg_stringify_4039297315a25b00,__wbg_subarray_6ca5cfa7fbb9abbe,__wbg_then_1bbc9edafd859b06,__wbg_then_89e1c559530b85cf,__wbg_valueOf_ff4b62641803432a,__wbg_value_0570714ff7d75f35,__wbg_versions_c2ab80650590b6a2,__wbg_window_a4f46c98a61d4089,__wbindgen_bigint_from_i64,__wbindgen_bigint_from_u64,__wbindgen_bigint_get_as_i64,__wbindgen_boolean_get,__wbindgen_cb_drop,__wbindgen_closure_wrapper7038,__wbindgen_debug_string,__wbindgen_error_new,__wbindgen_in,__wbindgen_is_bigint,__wbindgen_is_function,__wbindgen_is_object,__wbindgen_is_string,__wbindgen_is_undefined,__wbindgen_jsval_eq,__wbindgen_jsval_loose_eq,__wbindgen_memory,__wbindgen_number_get,__wbindgen_number_new,__wbindgen_object_clone_ref,__wbindgen_object_drop_ref,__wbindgen_string_get,__wbindgen_string_new,__wbindgen_throw,debug_panic,getBuildTimeInfo}); diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.wasm b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.wasm new file mode 100644 index 0000000..fb1c932 Binary files /dev/null and b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.wasm differ diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.js b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.js new file mode 100644 index 0000000..8b8c033 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.js @@ -0,0 +1,2 @@ +"use strict";var j=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var U=(t,e)=>{for(var n in e)j(t,n,{get:e[n],enumerable:!0})},B=(t,e,n,_)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D(e))!M.call(t,o)&&o!==n&&j(t,o,{get:()=>e[o],enumerable:!(_=R(e,o))||_.enumerable});return t};var N=t=>B(j({},"__esModule",{value:!0}),t);var Oe={};U(Oe,{QueryEngine:()=>G,__wbg_String_88810dfeb4021902:()=>Et,__wbg_buffer_344d9b41efe96da7:()=>Rt,__wbg_call_53fc3abd42e24ec8:()=>ie,__wbg_call_669127b9d730c650:()=>Qt,__wbg_crypto_58f13aa23ffcb166:()=>Ct,__wbg_done_bc26bf4ada718266:()=>Xt,__wbg_entries_6d727b73ee02b7ce:()=>pe,__wbg_getRandomValues_504510b5564925af:()=>Bt,__wbg_getTime_ed6ee333b702f8fc:()=>ct,__wbg_get_2aff440840bb6202:()=>te,__wbg_get_4a9aa5157afeb382:()=>Ht,__wbg_get_94990005bd6ca07c:()=>vt,__wbg_getwithrefkey_5e6d9547403deab8:()=>qt,__wbg_globalThis_17eff828815f7d84:()=>re,__wbg_global_46f939f6541643c5:()=>_e,__wbg_has_cdf8b85f6e903c80:()=>rt,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d:()=>we,__wbg_instanceof_Promise_cfbcc42300367513:()=>st,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1:()=>le,__wbg_isArray_38525be7442aa21e:()=>ce,__wbg_isSafeInteger_c38b0a16d0c7cef7:()=>ue,__wbg_iterator_7ee1a391d310f8e4:()=>bt,__wbg_length_a5587d6cd79ab197:()=>be,__wbg_length_cace2e0b3ddc0502:()=>at,__wbg_msCrypto_abcb1295e768d1f2:()=>Pt,__wbg_new0_ad75dd38f92424e2:()=>ot,__wbg_new_08236689f0afb357:()=>ht,__wbg_new_1b94180eeb48f2a2:()=>It,__wbg_new_c728d68b8b34487e:()=>St,__wbg_new_d8a000788389a31e:()=>Mt,__wbg_new_feb65b865d980ae2:()=>Y,__wbg_newnoargs_ccdcae30fd002262:()=>oe,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3:()=>Dt,__wbg_newwithlength_13b5319ab422dcf6:()=>Wt,__wbg_next_15da6a3df9290720:()=>Zt,__wbg_next_1989a20442400aaa:()=>Kt,__wbg_node_523d7bd03ef69fba:()=>zt,__wbg_now_28a6b413aca4a96a:()=>ge,__wbg_now_4579335d3581594c:()=>ut,__wbg_now_8ed1a4454e40ecd1:()=>it,__wbg_parse_3f0cb48976ca4123:()=>_t,__wbg_process_5b786e71d465a513:()=>$t,__wbg_push_fd3233d09cf81821:()=>kt,__wbg_randomFillSync_a0d98aa11c81fe89:()=>Nt,__wbg_require_2784e593a4674877:()=>Lt,__wbg_resolve_a3252b2860f0a09e:()=>Ae,__wbg_self_3fad056edded10bd:()=>ee,__wbg_setTimeout_631fe61f31fa2fad:()=>Z,__wbg_set_0ac78a2bc07da03c:()=>Tt,__wbg_set_3355b9f2d3092e3b:()=>At,__wbg_set_40f7786a25a9cc7e:()=>se,__wbg_set_841ac57cff3d672b:()=>Ot,__wbg_set_dcfd613a3420f908:()=>ae,__wbg_set_wasm:()=>C,__wbg_stringify_4039297315a25b00:()=>fe,__wbg_subarray_6ca5cfa7fbb9abbe:()=>Ut,__wbg_then_1bbc9edafd859b06:()=>Se,__wbg_then_89e1c559530b85cf:()=>Ie,__wbg_valueOf_ff4b62641803432a:()=>Gt,__wbg_value_0570714ff7d75f35:()=>Yt,__wbg_versions_c2ab80650590b6a2:()=>Vt,__wbg_window_a4f46c98a61d4089:()=>ne,__wbindgen_bigint_from_i64:()=>wt,__wbindgen_bigint_from_u64:()=>xt,__wbindgen_bigint_get_as_i64:()=>ye,__wbindgen_boolean_get:()=>gt,__wbindgen_cb_drop:()=>he,__wbindgen_closure_wrapper6700:()=>je,__wbindgen_debug_string:()=>me,__wbindgen_error_new:()=>X,__wbindgen_in:()=>pt,__wbindgen_is_bigint:()=>dt,__wbindgen_is_function:()=>Jt,__wbindgen_is_object:()=>ft,__wbindgen_is_string:()=>jt,__wbindgen_is_undefined:()=>nt,__wbindgen_jsval_eq:()=>yt,__wbindgen_jsval_loose_eq:()=>de,__wbindgen_memory:()=>Ft,__wbindgen_number_get:()=>lt,__wbindgen_number_new:()=>mt,__wbindgen_object_clone_ref:()=>et,__wbindgen_object_drop_ref:()=>Te,__wbindgen_string_get:()=>K,__wbindgen_string_new:()=>tt,__wbindgen_throw:()=>xe,debug_panic:()=>Q,getBuildTimeInfo:()=>J});module.exports=N(Oe);var T=()=>{};T.prototype=T;let c;function C(t){c=t}const w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);function r(t){return w[t]}let a=0,I=null;function S(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(c.memory.buffer)),I}const $=typeof TextEncoder>"u"?(0,module.require)("util").TextEncoder:TextEncoder;let A=new $("utf-8");const V=typeof A.encodeInto=="function"?function(t,e){return A.encodeInto(t,e)}:function(t,e){const n=A.encode(t);return e.set(n),{read:t.length,written:n.length}};function d(t,e,n){if(n===void 0){const s=A.encode(t),p=e(s.length,1)>>>0;return S().subarray(p,p+s.length).set(s),a=s.length,p}let _=t.length,o=e(_,1)>>>0;const f=S();let u=0;for(;u<_;u++){const s=t.charCodeAt(u);if(s>127)break;f[o+u]=s}if(u!==_){u!==0&&(t=t.slice(u)),o=n(o,_,_=u+t.length*3,1)>>>0;const s=S().subarray(o+u,o+_),p=V(t,s);u+=p.written,o=n(o,_,u,1)>>>0}return a=u,o}function x(t){return t==null}let y=null;function l(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==c.memory.buffer)&&(y=new DataView(c.memory.buffer)),y}const z=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let q=new z("utf-8",{ignoreBOM:!0,fatal:!0});q.decode();function m(t,e){return t=t>>>0,q.decode(S().subarray(t,t+e))}let h=w.length;function i(t){h===w.length&&w.push(w.length+1);const e=h;return h=w[e],w[e]=t,e}function O(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){const o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){const o=t.length;let f="[";o>0&&(f+=O(t[0]));for(let u=1;u1)_=n[1];else return toString.call(t);if(_=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:_}function L(t){t<132||(w[t]=h,h=t)}function b(t){const e=r(t);return L(t),e}const k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{c.__wbindgen_export_2.get(t.dtor)(t.a,t.b)});function P(t,e,n,_){const o={a:t,b:e,cnt:1,dtor:n},f=(...u)=>{o.cnt++;const s=o.a;o.a=0;try{return _(s,o.b,...u)}finally{--o.cnt===0?(c.__wbindgen_export_2.get(o.dtor)(s,o.b),k.unregister(o)):o.a=s}};return f.original=o,k.register(f,o,o),f}function W(t,e,n){c._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9eef02caf99553a1(t,e,i(n))}function J(){const t=c.getBuildTimeInfo();return b(t)}function Q(t){try{const f=c.__wbindgen_add_to_stack_pointer(-16);var e=x(t)?0:d(t,c.__wbindgen_malloc,c.__wbindgen_realloc),n=a;c.debug_panic(f,e,n);var _=l().getInt32(f+4*0,!0),o=l().getInt32(f+4*1,!0);if(o)throw b(_)}finally{c.__wbindgen_add_to_stack_pointer(16)}}function g(t,e){try{return t.apply(this,e)}catch(n){c.__wbindgen_exn_store(i(n))}}function H(t,e,n,_){c.wasm_bindgen__convert__closures__invoke2_mut__h174c8485536aed69(t,e,i(n),i(_))}const v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>c.__wbg_queryengine_free(t>>>0,1));class G{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,v.unregister(this),e}free(){const e=this.__destroy_into_raw();c.__wbg_queryengine_free(e,0)}constructor(e,n,_){try{const s=c.__wbindgen_add_to_stack_pointer(-16);c.queryengine_new(s,i(e),i(n),i(_));var o=l().getInt32(s+4*0,!0),f=l().getInt32(s+4*1,!0),u=l().getInt32(s+4*2,!0);if(u)throw b(f);return this.__wbg_ptr=o>>>0,v.register(this,this.__wbg_ptr,this),this}finally{c.__wbindgen_add_to_stack_pointer(16)}}connect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_connect(this.__wbg_ptr,n,_);return b(o)}disconnect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_disconnect(this.__wbg_ptr,n,_);return b(o)}query(e,n,_){const o=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a,u=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),s=a;var p=x(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),E=a;const F=c.queryengine_query(this.__wbg_ptr,o,f,u,s,p,E);return b(F)}startTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_startTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}commitTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_commitTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}rollbackTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_rollbackTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}metrics(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_metrics(this.__wbg_ptr,n,_);return b(o)}}function K(t,e){const n=r(e),_=typeof n=="string"?n:void 0;var o=x(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a;l().setInt32(t+4*1,f,!0),l().setInt32(t+4*0,o,!0)}function X(t,e){const n=new Error(m(t,e));return i(n)}function Y(t,e){try{var n={a:t,b:e},_=(f,u)=>{const s=n.a;n.a=0;try{return H(s,n.b,f,u)}finally{n.a=s}};const o=new Promise(_);return i(o)}finally{n.a=n.b=0}}function Z(t,e){return setTimeout(r(t),e>>>0)}function tt(t,e){const n=m(t,e);return i(n)}function et(t){const e=r(t);return i(e)}function nt(t){return r(t)===void 0}function rt(){return g(function(t,e){return Reflect.has(r(t),r(e))},arguments)}function _t(){return g(function(t,e){const n=JSON.parse(m(t,e));return i(n)},arguments)}function ot(){return i(new Date)}function ct(t){return r(t).getTime()}function it(t){return r(t).now()}function ut(){return Date.now()}function st(t){let e;try{e=r(t)instanceof Promise}catch{e=!1}return e}function ft(t){const e=r(t);return typeof e=="object"&&e!==null}function at(t){return r(t).length}function bt(){return i(Symbol.iterator)}function gt(t){const e=r(t);return typeof e=="boolean"?e?1:0:2}function dt(t){return typeof r(t)=="bigint"}function lt(t,e){const n=r(e),_=typeof n=="number"?n:void 0;l().setFloat64(t+8*1,x(_)?0:_,!0),l().setInt32(t+4*0,!x(_),!0)}function wt(t){return i(t)}function pt(t,e){return r(t)in r(e)}function xt(t){const e=BigInt.asUintN(64,t);return i(e)}function yt(t,e){return r(t)===r(e)}function mt(t){return i(t)}function ht(){const t=new Array;return i(t)}function Tt(t,e,n){r(t)[e>>>0]=b(n)}function It(){return i(new Map)}function St(){const t=new Object;return i(t)}function At(t,e,n){const _=r(t).set(r(e),r(n));return i(_)}function jt(t){return typeof r(t)=="string"}function Ot(t,e,n){r(t)[b(e)]=b(n)}function qt(t,e){const n=r(t)[r(e)];return i(n)}function kt(t,e){return r(t).push(r(e))}function vt(){return g(function(t,e){const n=r(t)[b(e)];return i(n)},arguments)}function Et(t,e){const n=String(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Ft(){const t=c.memory;return i(t)}function Rt(t){const e=r(t).buffer;return i(e)}function Dt(t,e,n){const _=new Uint8Array(r(t),e>>>0,n>>>0);return i(_)}function Mt(t){const e=new Uint8Array(r(t));return i(e)}function Ut(t,e,n){const _=r(t).subarray(e>>>0,n>>>0);return i(_)}function Bt(){return g(function(t,e){r(t).getRandomValues(r(e))},arguments)}function Nt(){return g(function(t,e){r(t).randomFillSync(b(e))},arguments)}function Ct(t){const e=r(t).crypto;return i(e)}function $t(t){const e=r(t).process;return i(e)}function Vt(t){const e=r(t).versions;return i(e)}function zt(t){const e=r(t).node;return i(e)}function Lt(){return g(function(){const t=module.require;return i(t)},arguments)}function Pt(t){const e=r(t).msCrypto;return i(e)}function Wt(t){const e=new Uint8Array(t>>>0);return i(e)}function Jt(t){return typeof r(t)=="function"}function Qt(){return g(function(t,e){const n=r(t).call(r(e));return i(n)},arguments)}function Ht(t,e){const n=r(t)[e>>>0];return i(n)}function Gt(t){return r(t).valueOf()}function Kt(){return g(function(t){const e=r(t).next();return i(e)},arguments)}function Xt(t){return r(t).done}function Yt(t){const e=r(t).value;return i(e)}function Zt(t){const e=r(t).next;return i(e)}function te(){return g(function(t,e){const n=Reflect.get(r(t),r(e));return i(n)},arguments)}function ee(){return g(function(){const t=self.self;return i(t)},arguments)}function ne(){return g(function(){const t=window.window;return i(t)},arguments)}function re(){return g(function(){const t=globalThis.globalThis;return i(t)},arguments)}function _e(){return g(function(){const t=global.global;return i(t)},arguments)}function oe(t,e){const n=new T(m(t,e));return i(n)}function ce(t){return Array.isArray(r(t))}function ie(){return g(function(t,e,n){const _=r(t).call(r(e),r(n));return i(_)},arguments)}function ue(t){return Number.isSafeInteger(r(t))}function se(){return g(function(t,e,n){return Reflect.set(r(t),r(e),r(n))},arguments)}function fe(){return g(function(t){const e=JSON.stringify(r(t));return i(e)},arguments)}function ae(t,e,n){r(t).set(r(e),n>>>0)}function be(t){return r(t).length}function ge(){return g(function(){return Date.now()},arguments)}function de(t,e){return r(t)==r(e)}function le(t){let e;try{e=r(t)instanceof Uint8Array}catch{e=!1}return e}function we(t){let e;try{e=r(t)instanceof ArrayBuffer}catch{e=!1}return e}function pe(t){const e=Object.entries(r(t));return i(e)}function xe(t,e){throw new Error(m(t,e))}function ye(t,e){const n=r(e),_=typeof n=="bigint"?n:void 0;l().setBigInt64(t+8*1,x(_)?BigInt(0):_,!0),l().setInt32(t+4*0,!x(_),!0)}function me(t,e){const n=O(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function he(t){const e=b(t).original;return e.cnt--==1?(e.a=0,!0):!1}function Te(t){b(t)}function Ie(t,e){const n=r(t).then(r(e));return i(n)}function Se(t,e,n){const _=r(t).then(r(e),r(n));return i(_)}function Ae(t){const e=Promise.resolve(r(t));return i(e)}function je(t,e,n){const _=P(t,e,530,W);return i(_)}0&&(module.exports={QueryEngine,__wbg_String_88810dfeb4021902,__wbg_buffer_344d9b41efe96da7,__wbg_call_53fc3abd42e24ec8,__wbg_call_669127b9d730c650,__wbg_crypto_58f13aa23ffcb166,__wbg_done_bc26bf4ada718266,__wbg_entries_6d727b73ee02b7ce,__wbg_getRandomValues_504510b5564925af,__wbg_getTime_ed6ee333b702f8fc,__wbg_get_2aff440840bb6202,__wbg_get_4a9aa5157afeb382,__wbg_get_94990005bd6ca07c,__wbg_getwithrefkey_5e6d9547403deab8,__wbg_globalThis_17eff828815f7d84,__wbg_global_46f939f6541643c5,__wbg_has_cdf8b85f6e903c80,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d,__wbg_instanceof_Promise_cfbcc42300367513,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1,__wbg_isArray_38525be7442aa21e,__wbg_isSafeInteger_c38b0a16d0c7cef7,__wbg_iterator_7ee1a391d310f8e4,__wbg_length_a5587d6cd79ab197,__wbg_length_cace2e0b3ddc0502,__wbg_msCrypto_abcb1295e768d1f2,__wbg_new0_ad75dd38f92424e2,__wbg_new_08236689f0afb357,__wbg_new_1b94180eeb48f2a2,__wbg_new_c728d68b8b34487e,__wbg_new_d8a000788389a31e,__wbg_new_feb65b865d980ae2,__wbg_newnoargs_ccdcae30fd002262,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3,__wbg_newwithlength_13b5319ab422dcf6,__wbg_next_15da6a3df9290720,__wbg_next_1989a20442400aaa,__wbg_node_523d7bd03ef69fba,__wbg_now_28a6b413aca4a96a,__wbg_now_4579335d3581594c,__wbg_now_8ed1a4454e40ecd1,__wbg_parse_3f0cb48976ca4123,__wbg_process_5b786e71d465a513,__wbg_push_fd3233d09cf81821,__wbg_randomFillSync_a0d98aa11c81fe89,__wbg_require_2784e593a4674877,__wbg_resolve_a3252b2860f0a09e,__wbg_self_3fad056edded10bd,__wbg_setTimeout_631fe61f31fa2fad,__wbg_set_0ac78a2bc07da03c,__wbg_set_3355b9f2d3092e3b,__wbg_set_40f7786a25a9cc7e,__wbg_set_841ac57cff3d672b,__wbg_set_dcfd613a3420f908,__wbg_set_wasm,__wbg_stringify_4039297315a25b00,__wbg_subarray_6ca5cfa7fbb9abbe,__wbg_then_1bbc9edafd859b06,__wbg_then_89e1c559530b85cf,__wbg_valueOf_ff4b62641803432a,__wbg_value_0570714ff7d75f35,__wbg_versions_c2ab80650590b6a2,__wbg_window_a4f46c98a61d4089,__wbindgen_bigint_from_i64,__wbindgen_bigint_from_u64,__wbindgen_bigint_get_as_i64,__wbindgen_boolean_get,__wbindgen_cb_drop,__wbindgen_closure_wrapper6700,__wbindgen_debug_string,__wbindgen_error_new,__wbindgen_in,__wbindgen_is_bigint,__wbindgen_is_function,__wbindgen_is_object,__wbindgen_is_string,__wbindgen_is_undefined,__wbindgen_jsval_eq,__wbindgen_jsval_loose_eq,__wbindgen_memory,__wbindgen_number_get,__wbindgen_number_new,__wbindgen_object_clone_ref,__wbindgen_object_drop_ref,__wbindgen_string_get,__wbindgen_string_new,__wbindgen_throw,debug_panic,getBuildTimeInfo}); diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.wasm b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.wasm new file mode 100644 index 0000000..0d6cce1 Binary files /dev/null and b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.wasm differ diff --git a/apps/api/release/vendor/@prisma/client/runtime/react-native.d.ts b/apps/api/release/vendor/@prisma/client/runtime/react-native.d.ts new file mode 100644 index 0000000..d92cd02 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/react-native.d.ts @@ -0,0 +1,3403 @@ +/** + * @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/apps/api/release/vendor/@prisma/client/runtime/react-native.js b/apps/api/release/vendor/@prisma/client/runtime/react-native.js new file mode 100644 index 0000000..e542e40 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/react-native.js @@ -0,0 +1,80 @@ +"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/apps/api/release/vendor/@prisma/client/runtime/wasm.js b/apps/api/release/vendor/@prisma/client/runtime/wasm.js new file mode 100644 index 0000000..c3ed3bd --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/wasm.js @@ -0,0 +1,32 @@ +"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/apps/api/release/vendor/@prisma/client/scripts/colors.js b/apps/api/release/vendor/@prisma/client/scripts/colors.js new file mode 100644 index 0000000..ac30d2e --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/colors.js @@ -0,0 +1,176 @@ +'use strict' + +const isObject = (val) => val !== null && typeof val === 'object' && !Array.isArray(val) + +// this is a modified version of https://github.com/chalk/ansi-regex (MIT License) +const ANSI_REGEX = + /* eslint-disable-next-line no-control-regex */ + /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g + +const create = () => { + const colors = { enabled: true, visible: true, styles: {}, keys: {} } + + if ('FORCE_COLOR' in process.env) { + colors.enabled = process.env.FORCE_COLOR !== '0' + } + + const ansi = (style) => { + let open = (style.open = `\u001b[${style.codes[0]}m`) + let close = (style.close = `\u001b[${style.codes[1]}m`) + let regex = (style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g')) + style.wrap = (input, newline) => { + if (input.includes(close)) input = input.replace(regex, close + open) + let output = open + input + close + // see https://github.com/chalk/chalk/pull/92, thanks to the + // chalk contributors for this fix. However, we've confirmed that + // this issue is also present in Windows terminals + return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output + } + return style + } + + const wrap = (style, input, newline) => { + return typeof style === 'function' ? style(input) : style.wrap(input, newline) + } + + const style = (input, stack) => { + if (input === '' || input == null) return '' + if (colors.enabled === false) return input + if (colors.visible === false) return '' + let str = '' + input + let nl = str.includes('\n') + let n = stack.length + if (n > 0 && stack.includes('unstyle')) { + stack = [...new Set(['unstyle', ...stack])].reverse() + } + while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl) + return str + } + + const define = (name, codes, type) => { + colors.styles[name] = ansi({ name, codes }) + let keys = colors.keys[type] || (colors.keys[type] = []) + keys.push(name) + + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value) + }, + get() { + let color = (input) => style(input, color.stack) + Reflect.setPrototypeOf(color, colors) + color.stack = this.stack ? this.stack.concat(name) : [name] + return color + }, + }) + } + + define('reset', [0, 0], 'modifier') + define('bold', [1, 22], 'modifier') + define('dim', [2, 22], 'modifier') + define('italic', [3, 23], 'modifier') + define('underline', [4, 24], 'modifier') + define('inverse', [7, 27], 'modifier') + define('hidden', [8, 28], 'modifier') + define('strikethrough', [9, 29], 'modifier') + + define('black', [30, 39], 'color') + define('red', [31, 39], 'color') + define('green', [32, 39], 'color') + define('yellow', [33, 39], 'color') + define('blue', [34, 39], 'color') + define('magenta', [35, 39], 'color') + define('cyan', [36, 39], 'color') + define('white', [37, 39], 'color') + define('gray', [90, 39], 'color') + define('grey', [90, 39], 'color') + + define('bgBlack', [40, 49], 'bg') + define('bgRed', [41, 49], 'bg') + define('bgGreen', [42, 49], 'bg') + define('bgYellow', [43, 49], 'bg') + define('bgBlue', [44, 49], 'bg') + define('bgMagenta', [45, 49], 'bg') + define('bgCyan', [46, 49], 'bg') + define('bgWhite', [47, 49], 'bg') + + define('blackBright', [90, 39], 'bright') + define('redBright', [91, 39], 'bright') + define('greenBright', [92, 39], 'bright') + define('yellowBright', [93, 39], 'bright') + define('blueBright', [94, 39], 'bright') + define('magentaBright', [95, 39], 'bright') + define('cyanBright', [96, 39], 'bright') + define('whiteBright', [97, 39], 'bright') + + define('bgBlackBright', [100, 49], 'bgBright') + define('bgRedBright', [101, 49], 'bgBright') + define('bgGreenBright', [102, 49], 'bgBright') + define('bgYellowBright', [103, 49], 'bgBright') + define('bgBlueBright', [104, 49], 'bgBright') + define('bgMagentaBright', [105, 49], 'bgBright') + define('bgCyanBright', [106, 49], 'bgBright') + define('bgWhiteBright', [107, 49], 'bgBright') + + colors.ansiRegex = ANSI_REGEX + colors.hasColor = colors.hasAnsi = (str) => { + colors.ansiRegex.lastIndex = 0 + return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str) + } + + colors.alias = (name, color) => { + let fn = typeof color === 'string' ? colors[color] : color + + if (typeof fn !== 'function') { + throw new TypeError('Expected alias to be the name of an existing color (string) or a function') + } + + if (!fn.stack) { + Reflect.defineProperty(fn, 'name', { value: name }) + colors.styles[name] = fn + fn.stack = [name] + } + + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value) + }, + get() { + let color = (input) => style(input, color.stack) + Reflect.setPrototypeOf(color, colors) + color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack + return color + }, + }) + } + + colors.theme = (custom) => { + if (!isObject(custom)) throw new TypeError('Expected theme to be an object') + for (let name of Object.keys(custom)) { + colors.alias(name, custom[name]) + } + return colors + } + + colors.alias('unstyle', (str) => { + if (typeof str === 'string' && str !== '') { + colors.ansiRegex.lastIndex = 0 + return str.replace(colors.ansiRegex, '') + } + return '' + }) + + colors.alias('noop', (str) => str) + colors.none = colors.clear = colors.noop + + colors.stripColor = colors.unstyle + colors.define = define + return colors +} + +module.exports = create() +module.exports.create = create diff --git a/apps/api/release/vendor/@prisma/client/scripts/default-deno-edge.ts b/apps/api/release/vendor/@prisma/client/scripts/default-deno-edge.ts new file mode 100644 index 0000000..bca0a97 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/default-deno-edge.ts @@ -0,0 +1,9 @@ +class PrismaClient { + constructor() { + throw new Error( + '@prisma/client/deno/edge did not initialize yet. Please run "prisma generate" and try to import it again.', + ) + } +} + +export { PrismaClient } diff --git a/apps/api/release/vendor/@prisma/client/scripts/default-index.d.ts b/apps/api/release/vendor/@prisma/client/scripts/default-index.d.ts new file mode 100644 index 0000000..bac7a5c --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/default-index.d.ts @@ -0,0 +1,110 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import * as runtime from '@prisma/client/runtime/library' + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new Prisma() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client). + */ +export declare const PrismaClient: any + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new Prisma() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client). + */ +export declare type PrismaClient = any + +export declare class PrismaClientExtends< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> { + $extends: { extArgs: ExtArgs } & (< + R extends runtime.Types.Extensions.UserArgs['result'] = {}, + M extends runtime.Types.Extensions.UserArgs['model'] = {}, + Q extends runtime.Types.Extensions.UserArgs['query'] = {}, + C extends runtime.Types.Extensions.UserArgs['client'] = {}, + Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs, + >( + args: + | ((client: PrismaClientExtends) => { $extends: { extArgs: Args } }) + | { name?: string } + | { result?: R & runtime.Types.Extensions.UserArgs['result'] } + | { model?: M & runtime.Types.Extensions.UserArgs['model'] } + | { query?: Q & runtime.Types.Extensions.UserArgs['query'] } + | { client?: C & runtime.Types.Extensions.UserArgs['client'] }, + ) => PrismaClientExtends & Args['client']) + + $transaction( + fn: (prisma: Omit) => Promise, + options?: { maxWait?: number; timeout?: number; isolationLevel?: string }, + ): Promise + $transaction

[]>( + arg: [...P], + options?: { isolationLevel?: string }, + ): Promise> +} + +export declare const dmmf: any +export declare type dmmf = any + +/** + * Get the type of the value, that the Promise holds. + */ +export declare type PromiseType> = T extends PromiseLike ? U : T + +/** + * Get the return type of a function which returns a Promise. + */ +export declare type PromiseReturnType Promise> = PromiseType> + +export namespace Prisma { + export type TransactionClient = any + + export function defineExtension< + R extends runtime.Types.Extensions.UserArgs['result'] = {}, + M extends runtime.Types.Extensions.UserArgs['model'] = {}, + Q extends runtime.Types.Extensions.UserArgs['query'] = {}, + C extends runtime.Types.Extensions.UserArgs['client'] = {}, + Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs, + >( + args: + | ((client: PrismaClientExtends) => { $extends: { extArgs: Args } }) + | { name?: string } + | { result?: R & runtime.Types.Extensions.UserArgs['result'] } + | { model?: M & runtime.Types.Extensions.UserArgs['model'] } + | { query?: Q & runtime.Types.Extensions.UserArgs['query'] } + | { client?: C & runtime.Types.Extensions.UserArgs['client'] }, + ): (client: any) => PrismaClientExtends + + export type Extension = runtime.Types.Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export import Args = runtime.Types.Public.Args + export import Payload = runtime.Types.Public.Payload + export import Result = runtime.Types.Public.Result + export import Exact = runtime.Types.Public.Exact + export import PrismaPromise = runtime.Types.Public.PrismaPromise + + export const prismaVersion: { + client: string + engine: string + } +} diff --git a/apps/api/release/vendor/@prisma/client/scripts/default-index.js b/apps/api/release/vendor/@prisma/client/scripts/default-index.js new file mode 100644 index 0000000..1938e5c --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/default-index.js @@ -0,0 +1,65 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/scripts/default-index.ts +var default_index_exports = {}; +__export(default_index_exports, { + Prisma: () => Prisma, + PrismaClient: () => PrismaClient, + default: () => default_index_default +}); +module.exports = __toCommonJS(default_index_exports); + +// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json +var prisma = { + enginesVersion: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" +}; + +// package.json +var version = "5.22.0"; + +// src/runtime/utils/clientVersion.ts +var clientVersion = version; + +// src/scripts/default-index.ts +var PrismaClient = class { + constructor() { + throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.'); + } +}; +function defineExtension(ext) { + if (typeof ext === "function") { + return ext; + } + return (client) => client.$extends(ext); +} +function getExtensionContext(that) { + return that; +} +var Prisma = { + defineExtension, + getExtensionContext, + prismaVersion: { client: clientVersion, engine: prisma.enginesVersion } +}; +var default_index_default = { Prisma }; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Prisma, + PrismaClient +}); diff --git a/apps/api/release/vendor/@prisma/client/scripts/postinstall.d.ts b/apps/api/release/vendor/@prisma/client/scripts/postinstall.d.ts new file mode 100644 index 0000000..3b9fc2c --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/postinstall.d.ts @@ -0,0 +1,5 @@ +export function getPostInstallTrigger(): string +export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__EMPTY_STRING +export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING +export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR +export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR diff --git a/apps/api/release/vendor/@prisma/client/scripts/postinstall.js b/apps/api/release/vendor/@prisma/client/scripts/postinstall.js new file mode 100644 index 0000000..fec6746 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/postinstall.js @@ -0,0 +1,410 @@ +// @ts-check +const childProcess = require('child_process') +const { promisify } = require('util') +const fs = require('fs') +const path = require('path') +const c = require('./colors') + +const exec = promisify(childProcess.exec) + +function debug(message, ...optionalParams) { + if (process.env.DEBUG && process.env.DEBUG === 'prisma:postinstall') { + console.log(message, ...optionalParams) + } +} +/** + * Adds `package.json` to the end of a path if it doesn't already exist' + * @param {string} pth + */ +function addPackageJSON(pth) { + if (pth.endsWith('package.json')) return pth + return path.join(pth, 'package.json') +} + +/** + * Looks up for a `package.json` which is not `@prisma/cli` or `prisma` and returns the directory of the package + * @param {string | null} startPath - Path to Start At + * @param {number} limit - Find Up limit + * @returns {string | null} + */ +function findPackageRoot(startPath, limit = 10) { + if (!startPath || !fs.existsSync(startPath)) return null + let currentPath = startPath + // Limit traversal + for (let i = 0; i < limit; i++) { + const pkgPath = addPackageJSON(currentPath) + if (fs.existsSync(pkgPath)) { + try { + const pkg = require(pkgPath) + if (pkg.name && !['@prisma/cli', 'prisma'].includes(pkg.name)) { + return pkgPath.replace('package.json', '') + } + } catch {} // eslint-disable-line no-empty + } + currentPath = path.join(currentPath, '../') + } + return null +} + +/** + * The `postinstall` hook of client sets up the ground and env vars for the `prisma generate` command, + * and runs it, showing a warning if the schema is not found. + * - initializes the ./node_modules/.prisma/client folder with the default index(-browser).js/index.d.ts, + * which define a `PrismaClient` class stub that throws an error if instantiated before the `prisma generate` + * command is successfully executed. + * - sets the path of the root of the project (TODO: to verify) to the `process.env.PRISMA_GENERATE_IN_POSTINSTALL` + * variable, or `'true'` if the project root cannot be found. + * - runs `prisma generate`, passing through additional information about the command that triggered the generation, + * which is useful for debugging/telemetry. It tries to use the local `prisma` package if it is installed, otherwise it + * falls back to the global `prisma` package. If neither options are available, it warns the user to install `prisma` first. + */ +async function main() { + if (process.env.INIT_CWD) { + process.chdir(process.env.INIT_CWD) // necessary, because npm chooses __dirname as process.cwd() + // in the postinstall hook + } + + await createDefaultGeneratedThrowFiles() + + // TODO: consider using the `which` package + const localPath = getLocalPackagePath() + + // Only execute if !localpath + const installedGlobally = localPath ? undefined : await isInstalledGlobally() + + // this is needed, so we can find the correct schemas in yarn workspace projects + const root = findPackageRoot(localPath) + + process.env.PRISMA_GENERATE_IN_POSTINSTALL = root ? root : 'true' + + debug({ + localPath, + installedGlobally, + init_cwd: process.env.INIT_CWD, + PRISMA_GENERATE_IN_POSTINSTALL: process.env.PRISMA_GENERATE_IN_POSTINSTALL, + }) + try { + if (localPath) { + await run('node', [localPath, 'generate', '--postinstall', doubleQuote(getPostInstallTrigger())]) + return + } + if (installedGlobally) { + await run('prisma', ['generate', '--postinstall', doubleQuote(getPostInstallTrigger())]) + return + } + } catch (e) { + // if exit code = 1 do not print + if (e && e !== 1) { + console.error(e) + } + debug(e) + } + + if (!localPath && !installedGlobally) { + console.error( + `${c.yellow( + 'warning', + )} In order to use "@prisma/client", please install Prisma CLI. You can install it with "npm add -D prisma".`, + ) + } +} + +function getLocalPackagePath() { + try { + const packagePath = require.resolve('prisma/package.json') + if (packagePath) { + return require.resolve('prisma') + } + } catch (e) {} // eslint-disable-line no-empty + + // TODO: consider removing this + try { + const packagePath = require.resolve('@prisma/cli/package.json') + if (packagePath) { + return require.resolve('@prisma/cli') + } + } catch (e) {} // eslint-disable-line no-empty + + return null +} + +async function isInstalledGlobally() { + try { + const result = await exec('prisma -v') + if (result.stdout.includes('@prisma/client')) { + return true + } else { + console.error(`${c.yellow('warning')} You still have the ${c.bold('prisma')} cli (Prisma 1) installed globally. +Please uninstall it with either ${c.green('npm remove -g prisma')} or ${c.green('yarn global remove prisma')}.`) + } + } catch (e) { + return false + } +} + +if (!process.env.PRISMA_SKIP_POSTINSTALL_GENERATE) { + main() + .catch((e) => { + if (e.stderr) { + if (e.stderr.includes(`Can't find schema.prisma`)) { + console.error( + `${c.yellow('warning')} @prisma/client needs a ${c.bold('schema.prisma')} to function, but couldn't find it. + Please either create one manually or use ${c.bold('prisma init')}. + Once you created it, run ${c.bold('prisma generate')}. + To keep Prisma related things separate, we recommend creating it in a subfolder called ${c.underline( + './prisma', + )} like so: ${c.underline('./prisma/schema.prisma')}\n`, + ) + } else { + console.error(e.stderr) + } + } else { + console.error(e) + } + process.exit(0) + }) + .finally(() => { + debug(`postinstall trigger: ${getPostInstallTrigger()}`) + }) +} + +function run(cmd, params, cwd = process.cwd()) { + const child = childProcess.spawn(cmd, params, { + stdio: ['pipe', 'inherit', 'inherit'], + cwd, + }) + + return new Promise((resolve, reject) => { + child.on('close', () => { + resolve(undefined) + }) + child.on('exit', (code) => { + if (code === 0) { + resolve(undefined) + } else { + reject(code) + } + }) + child.on('error', () => { + reject() + }) + }) +} + +/** + * Copies our default "throw" files into the default generation folder. These + * files are dummy and informative because they just throw an error to let the + * user know that they have forgotten to run `prisma generate` or that they + * don't have a a schema file yet. We only add these files at the default + * location `node_modules/.prisma/client`. + */ +async function createDefaultGeneratedThrowFiles() { + try { + const dotPrismaClientDir = path.join(__dirname, '../../../.prisma/client') + const denoPrismaClientDir = path.join(__dirname, '../../../.prisma/client/deno') + + await makeDir(dotPrismaClientDir) + await makeDir(denoPrismaClientDir) + + const defaultFileConfig = { + js: path.join(__dirname, 'default-index.js'), + ts: path.join(__dirname, 'default-index.d.ts'), + } + + /** + * @type {Record} + */ + const defaultFiles = { + index: defaultFileConfig, + edge: defaultFileConfig, + default: defaultFileConfig, + wasm: defaultFileConfig, + 'index-browser': { + js: path.join(__dirname, 'default-index.js'), + ts: undefined, + }, + 'deno/edge': { + js: undefined, + ts: path.join(__dirname, 'default-deno-edge.ts'), + }, + } + + for (const file of Object.keys(defaultFiles)) { + const { js, ts } = defaultFiles[file] ?? {} + const dotPrismaJsFilePath = path.join(dotPrismaClientDir, `${file}.js`) + const dotPrismaTsFilePath = path.join(dotPrismaClientDir, `${file}.d.ts`) + + if (js && !fs.existsSync(dotPrismaJsFilePath) && fs.existsSync(js)) { + await fs.promises.copyFile(js, dotPrismaJsFilePath) + } + + if (ts && !fs.existsSync(dotPrismaTsFilePath) && fs.existsSync(ts)) { + await fs.promises.copyFile(ts, dotPrismaTsFilePath) + } + } + } catch (e) { + console.error(e) + } +} + +// TODO: can this be replaced some utility eg. mkdir +function makeDir(input) { + const make = async (pth) => { + try { + await fs.promises.mkdir(pth) + + return pth + } catch (error) { + if (error.code === 'EPERM') { + throw error + } + + if (error.code === 'ENOENT') { + if (path.dirname(pth) === pth) { + throw new Error(`operation not permitted, mkdir '${pth}'`) + } + + if (error.message.includes('null bytes')) { + throw error + } + + await make(path.dirname(pth)) + + return make(pth) + } + + try { + const stats = await fs.promises.stat(pth) + if (!stats.isDirectory()) { + throw new Error('The path is not a directory') + } + } catch (_) { + throw error + } + + return pth + } + } + + return make(path.resolve(input)) +} + +/** + * Get the command that triggered this postinstall script being run. If there is + * an error while attempting to get this value then the string constant + * 'ERROR_WHILE_FINDING_POSTINSTALL_TRIGGER' is returned. + * This information is just necessary for telemetry. + * This is passed to `prisma generate` as a string like `--postinstall value`. + */ +function getPostInstallTrigger() { + /* + npm_config_argv` is not officially documented so here are our research notes + + `npm_config_argv` is available to the postinstall script when the containing package has been installed by npm into some project. + + An example of its value: + + ``` + npm_config_argv: '{"remain":["../test"],"cooked":["add","../test"],"original":["add","../test"]}', + ``` + + We are interesting in the data contained in the "original" field. + + Trivia/Note: `npm_config_argv` is not available when running e.g. `npm install` on the containing package itself (e.g. when working on it) + + Yarn mimics this data and environment variable. Here is an example following `yarn add` for the same package: + + ``` + npm_config_argv: '{"remain":[],"cooked":["add"],"original":["add","../test"]}' + ``` + + Other package managers like `pnpm` have not been tested. + */ + + const maybe_npm_config_argv_string = process.env.npm_config_argv + + if (maybe_npm_config_argv_string === undefined) { + return UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING + } + + let npm_config_argv + try { + npm_config_argv = JSON.parse(maybe_npm_config_argv_string) + } catch (e) { + return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR}: ${maybe_npm_config_argv_string}` + } + + if (typeof npm_config_argv !== 'object' || npm_config_argv === null) { + return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}` + } + + const npm_config_argv_original_arr = npm_config_argv.original + + if (!Array.isArray(npm_config_argv_original_arr)) { + return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}` + } + + const npm_config_argv_original = npm_config_argv_original_arr.filter((arg) => arg !== '').join(' ') + + const command = + npm_config_argv_original === '' + ? getPackageManagerName() + : [getPackageManagerName(), npm_config_argv_original].join(' ') + + return command +} + +/** + * Wrap double quotes around the given string. + */ +function doubleQuote(x) { + return `"${x}"` +} + +/** + * Get the package manager name currently being used. If parsing fails, then the following pattern is returned: + * UNKNOWN_NPM_CONFIG_USER_AGENT(). + */ +function getPackageManagerName() { + const userAgent = process.env.npm_config_user_agent + if (!userAgent) return 'MISSING_NPM_CONFIG_USER_AGENT' + + const name = parsePackageManagerName(userAgent) + if (!name) return `UNKNOWN_NPM_CONFIG_USER_AGENT(${userAgent})` + + return name +} + +/** + * Parse package manager name from useragent. If parsing fails, `null` is returned. + */ +function parsePackageManagerName(userAgent) { + let packageManager = null + + // example: 'yarn/1.22.4 npm/? node/v13.11.0 darwin x64' + // References: + // - https://pnpm.io/only-allow-pnpm + // - https://github.com/cameronhunter/npm-config-user-agent-parser + if (userAgent) { + const matchResult = userAgent.match(/^([^/]+)\/.+/) + if (matchResult) { + packageManager = matchResult[1].trim() + } + } + + return packageManager +} + +// prettier-ignore +const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING' +// prettier-ignore +const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR' +// prettier-ignore +const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR' + +// expose for testing + +exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING +exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR = UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR +exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR = UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR +exports.getPostInstallTrigger = getPostInstallTrigger diff --git a/apps/api/release/vendor/@prisma/client/sql.d.ts b/apps/api/release/vendor/@prisma/client/sql.d.ts new file mode 100644 index 0000000..ff2b18f --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/sql.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/sql' diff --git a/apps/api/release/vendor/@prisma/client/sql.js b/apps/api/release/vendor/@prisma/client/sql.js new file mode 100644 index 0000000..6d54621 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/sql.js @@ -0,0 +1,4 @@ +'use strict' +module.exports = { + ...require('.prisma/client/sql'), +} diff --git a/apps/api/release/vendor/@prisma/client/sql.mjs b/apps/api/release/vendor/@prisma/client/sql.mjs new file mode 100644 index 0000000..9349dbf --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/sql.mjs @@ -0,0 +1 @@ +export * from '../../.prisma/client/sql/index.mjs' diff --git a/apps/api/release/vendor/@prisma/client/wasm.d.ts b/apps/api/release/vendor/@prisma/client/wasm.d.ts new file mode 100644 index 0000000..1a47896 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/wasm.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/wasm' diff --git a/apps/api/release/vendor/@prisma/client/wasm.js b/apps/api/release/vendor/@prisma/client/wasm.js new file mode 100644 index 0000000..a63271a --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/wasm.js @@ -0,0 +1,4 @@ +module.exports = { + // https://github.com/prisma/prisma/pull/12907 + ...require('.prisma/client/wasm'), +} diff --git a/apps/api/scripts/bundle-release.cjs b/apps/api/scripts/bundle-release.cjs index 3a81f65..b4c66f0 100644 --- a/apps/api/scripts/bundle-release.cjs +++ b/apps/api/scripts/bundle-release.cjs @@ -1,6 +1,6 @@ /** * باندل تک‌فایل برای Docker (release/app.js) بعد از nest build. - * Prisma client + engines را کنار app.js کپی می‌کند تا روی Alpine بدون npm کار کند. + * Prisma client + engines را در release/vendor می‌گذارد (نه node_modules تا gitignore نخورد). */ const esbuild = require('esbuild'); const { @@ -15,6 +15,7 @@ const path = require('path'); const root = path.join(__dirname, '..'); const config = require(path.join(root, 'esbuild.release.config.cjs')); const releaseDir = path.join(root, 'release'); +const vendorDir = path.join(releaseDir, 'vendor'); function resolvePkg(name) { return path.dirname(require.resolve(`${name}/package.json`, { paths: [root] })); @@ -22,30 +23,25 @@ function resolvePkg(name) { function copyPrismaIntoRelease() { const prismaClientSrc = resolvePkg('@prisma/client'); - const prismaClientDest = path.join(releaseDir, 'node_modules', '@prisma', 'client'); + const prismaClientDest = path.join(vendorDir, '@prisma', 'client'); mkdirSync(path.dirname(prismaClientDest), { recursive: true }); cpSync(prismaClientSrc, prismaClientDest, { recursive: true }); - // .prisma/client lives next to @prisma/client in pnpm layout (or under node_modules/.prisma) const candidates = [ path.join(root, 'node_modules', '.prisma', 'client'), path.join(prismaClientSrc, '..', '.prisma', 'client'), path.join(path.dirname(prismaClientSrc), '.prisma', 'client'), + path.join(prismaClientSrc, '..', '..', '.prisma', 'client'), ]; - let prismaEngineSrc = candidates.find((p) => existsSync(p)); - if (!prismaEngineSrc) { - // pnpm: @prisma/client -> .../node_modules/@prisma/client ; .prisma is sibling under node_modules - const nm = path.join(prismaClientSrc, '..', '..', '.prisma', 'client'); - if (existsSync(nm)) prismaEngineSrc = nm; - } + const prismaEngineSrc = candidates.find((p) => existsSync(p)); if (!prismaEngineSrc) { throw new Error( 'Prisma generated client (.prisma/client) یافت نشد. ابتدا: pnpm --filter api exec prisma generate', ); } - const prismaEngineDest = path.join(releaseDir, 'node_modules', '.prisma', 'client'); + const prismaEngineDest = path.join(vendorDir, '.prisma', 'client'); mkdirSync(path.dirname(prismaEngineDest), { recursive: true }); cpSync(realpathSync(prismaEngineSrc), prismaEngineDest, { recursive: true }); } @@ -69,7 +65,7 @@ async function main() { copyPrismaIntoRelease(); console.log('نوشت:', config.outfile); - console.log('Prisma client در release/node_modules کپی شد.'); + console.log('Prisma client در release/vendor کپی شد.'); } main().catch((err) => {